/* Full-screen Shop matched to new ui/shop-potions-v1.png (941 × 1672 design ratio). */
#modal-layer:has(.shop-screen-v1){padding:0;background:#11131c url('assets/bg.png') center/cover no-repeat;backdrop-filter:none}
.shop-screen-v1{--edge:clamp(16px,4.2vw,38px);position:relative;width:min(100%,480px);height:min(100dvh,900px);overflow:hidden;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top) + 18px) var(--edge) calc(env(safe-area-inset-bottom) + 10px);box-sizing:border-box;background:url('assets/shop/market-background.png') center/cover no-repeat;color:#0c3157;font-family:Rajdhani,Sarabun,sans-serif;animation:shop-v1-in .2s ease-out}
.shop-screen-v1::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(0,41,70,.08),transparent 16%,transparent 84%,rgba(0,41,70,.08))}@keyframes shop-v1-in{from{opacity:0}to{opacity:1}}
.shop-v1-header{position:relative;z-index:2;height:68px;display:grid;grid-template-columns:58px 1fr auto 58px;align-items:center;gap:7px;margin-bottom:29px}
.shop-v1-back,.shop-v1-menu{width:58px;height:58px;border:2px solid #a9faff;border-radius:50%;background:linear-gradient(145deg,rgba(17,126,160,.94),rgba(17,73,111,.96));box-shadow:0 5px 9px rgba(0,51,77,.3),inset 0 0 13px rgba(101,239,255,.5);color:#fff;cursor:pointer}.shop-v1-back{font:700 3.3rem/42px Rajdhani}.shop-v1-menu{border-radius:17px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px}.shop-v1-menu i{width:29px;height:5px;border-radius:5px;background:#fff}
.shop-v1-title{height:43px;min-width:96px;border:1.5px solid #5df6ef;border-radius:23px;background:linear-gradient(100deg,rgba(0,113,119,.92),rgba(0,99,139,.88));display:flex;align-items:center;justify-content:center;gap:11px;color:#fff;box-shadow:inset 0 0 13px rgba(114,255,235,.25),0 4px 8px rgba(0,62,85,.22)}.shop-v1-title img{width:29px;height:29px;flex:0 0 auto}.shop-v1-title b{font-size:1.48rem;letter-spacing:.035em;white-space:nowrap}
.shop-v1-money{height:44px;width:105px;min-width:0;padding:0 9px 0 6px;box-sizing:border-box;border-radius:23px;background:rgba(10,58,98,.88);display:flex;align-items:center;justify-content:center;gap:3px;color:#fff;white-space:nowrap;overflow:hidden}.shop-v1-money img{width:38px;height:38px;object-fit:contain;flex:0 0 auto}.shop-v1-money b{min-width:0;overflow:hidden;text-overflow:clip;font-size:1.04rem}
.shop-v1-tabs{position:relative;z-index:3;height:48px;display:grid;grid-template-columns:1fr 1.2fr 1.05fr;gap:4px;padding:0 11px;margin-bottom:-2px}.shop-v1-tab{height:48px;min-width:0;border:1.5px solid rgba(211,249,255,.9);border-bottom:0;border-radius:18px 18px 0 0;background:linear-gradient(155deg,rgba(45,111,147,.96),rgba(36,72,113,.97));display:flex;align-items:center;justify-content:center;gap:6px;color:#cfe8f8;font:600 clamp(.76rem,3.5vw,1rem) Rajdhani,Sarabun,sans-serif;cursor:pointer}.shop-v1-tab img{width:28px;height:28px}.shop-v1-tab.active{height:51px;border:2px solid #82ffff;border-bottom-color:#13d3d1;background:linear-gradient(145deg,#0ebcc5,#087ca4);color:#fff;box-shadow:0 -4px 12px rgba(36,250,235,.4),inset 0 0 12px rgba(122,255,255,.4)}
.shop-v1-board{position:relative;z-index:2;flex:1;min-height:0;padding:16px 17px;border:2px solid rgba(208,253,255,.94);border-radius:20px;background:linear-gradient(145deg,rgba(211,248,248,.85),rgba(169,223,237,.84));box-shadow:0 6px 16px rgba(0,63,86,.28),inset 0 0 26px rgba(255,255,255,.38);overflow:hidden}.shop-v1-grid{height:100%;overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(203px,1fr);gap:10px;scrollbar-width:none;-ms-overflow-style:none}.shop-v1-grid::-webkit-scrollbar{display:none;width:0;height:0}
.shop-v1-product{min-width:0;padding:9px 7px 8px;border:1.5px solid rgba(228,255,255,.95);border-radius:19px;background:linear-gradient(145deg,rgba(227,253,250,.68),rgba(178,226,237,.72));box-shadow:inset 0 0 19px rgba(255,255,255,.44);display:flex;flex-direction:column;align-items:center;text-align:center;cursor:pointer}.shop-v1-product.selected{border:3px solid #25f7ee;box-shadow:0 0 14px rgba(0,255,239,.85),inset 0 0 20px rgba(118,255,234,.54)}
.shop-v1-art{height:87px;display:grid;place-items:center;background:radial-gradient(circle,rgba(116,230,184,.26),transparent 65%)}.shop-v1-art img{width:98px;height:98px;object-fit:contain;filter:drop-shadow(0 5px 4px rgba(15,54,71,.18))}.shop-v1-product h3{margin:2px 0 0;font-size:1.05rem;line-height:1}.shop-v1-product p{height:18px;margin:3px 0;color:#52718d;font-size:.72rem;line-height:1.1;white-space:nowrap}.shop-v1-product>span,.shop-v1-detail-copy span{display:inline-flex;align-items:center;justify-content:center;min-width:94px;height:21px;padding:0 8px;border-radius:12px;background:rgba(29,105,143,.65);color:#fff;font-weight:600;font-size:.74rem}
.shop-v1-buy{width:92%;height:38px;margin-top:auto;border:2px solid #fff4b4;border-radius:21px;background:linear-gradient(#ffd76a,#ffac28);box-shadow:0 4px 7px rgba(144,76,0,.3),inset 0 2px 3px rgba(255,255,255,.75);color:#542c00;font:700 .9rem Rajdhani,Sarabun,sans-serif;cursor:pointer}.shop-v1-buy:disabled{cursor:default}.shop-v1-buy.disabled{filter:grayscale(.55);opacity:.55}.shop-v1-buy.owned{background:#89b0c2;border-color:#d8f6ff;color:#fff;box-shadow:none}
.shop-v1-detail{position:relative;z-index:2;flex:0 0 116px;margin-top:10px;padding:11px 12px;border:2px solid rgba(215,255,255,.94);border-radius:20px;background:linear-gradient(110deg,rgba(219,255,244,.91),rgba(194,233,245,.9));box-shadow:0 5px 15px rgba(0,63,86,.26),inset 0 0 22px rgba(255,255,255,.5);display:grid;grid-template-columns:94px 1fr 135px;align-items:center;gap:10px}.shop-v1-detail-art{width:88px;height:88px;border:2px solid #7affdf;border-radius:18px;background:rgba(189,249,214,.68);display:grid;place-items:center}.shop-v1-detail-art img{width:91px;height:91px;object-fit:contain}.shop-v1-detail-copy{min-width:0}.shop-v1-detail-copy h3{margin:0;font-size:1.12rem;line-height:1}.shop-v1-detail-copy p{margin:4px 0;color:#52718d;font-size:.8rem;white-space:nowrap}.shop-v1-detail .detail-buy{width:100%;height:50px;font-size:1.02rem}.shop-v1-note{position:relative;z-index:2;flex:0 0 31px;display:flex;align-items:flex-end;justify-content:center;color:#365a76;font-size:.72rem;font-weight:600;text-shadow:0 1px 1px #fff}
.shop-v1-decorate{grid-column:1/-1;align-self:center;text-align:center;color:#37647d}.shop-v1-decorate img{width:82px;height:82px}.shop-v1-decorate h3{margin:5px 0 0;font-size:1.35rem}.shop-v1-decorate p{margin:3px 0 10px}.shop-v1-decorate b{padding:5px 12px;border-radius:12px;background:#ffbd32;color:#684000}.shop-v1-coming{display:flex;align-items:center;gap:12px;grid-column:1/-1;margin:auto}.shop-v1-coming img{width:62px;height:62px}.shop-v1-coming h3,.shop-v1-coming p{margin:0}
.shop-confirm-layer{position:absolute;z-index:20;inset:0;display:grid;place-items:center;padding:25px;background:rgba(4,35,60,.68);backdrop-filter:blur(3px)}.shop-confirm-card{width:min(100%,330px);padding:20px;box-sizing:border-box;border:2px solid #cfffff;border-radius:24px;background:linear-gradient(145deg,#f2ffff,#d2eeee);box-shadow:0 20px 45px rgba(0,25,50,.5);text-align:center}.shop-confirm-card>img{width:105px;height:105px;object-fit:contain}.shop-confirm-card small{display:block;color:#168e9d;font-weight:700}.shop-confirm-card h3{margin:2px 0}.shop-confirm-card p{margin:0;color:#57738d}.shop-confirm-card>b{display:block;margin:7px;font-size:1.15rem;color:#a86100}.shop-confirm-card>div{display:grid;grid-template-columns:1fr 1.25fr;gap:8px}.shop-confirm-card button{height:43px;border:1.5px solid #fff;border-radius:18px;background:#dce8ee;font-weight:700;color:#34536c}.shop-confirm-card button:last-child{background:linear-gradient(#ffd76a,#ffac28);color:#5a3100}
@media(max-width:380px){.shop-screen-v1{--edge:9px;padding-top:calc(env(safe-area-inset-top) + 8px)}.shop-v1-header{grid-template-columns:50px 1fr auto 50px;height:58px;margin-bottom:19px}.shop-v1-back,.shop-v1-menu{width:50px;height:50px}.shop-v1-title{height:39px}.shop-v1-title b{font-size:1.28rem}.shop-v1-title img{width:26px;height:26px}.shop-v1-money{min-width:88px;padding-right:9px}.shop-v1-money img{width:34px;height:34px}.shop-v1-tabs{padding-inline:5px}.shop-v1-tab{gap:3px;font-size:.72rem}.shop-v1-tab img{width:23px;height:23px}.shop-v1-board{padding:10px}.shop-v1-grid{grid-auto-rows:minmax(183px,1fr);gap:7px}.shop-v1-art{height:75px}.shop-v1-art img{width:83px;height:83px}.shop-v1-product h3{font-size:.92rem}.shop-v1-product p{font-size:.62rem}.shop-v1-detail{grid-template-columns:78px 1fr 112px;flex-basis:105px;padding:8px;gap:7px}.shop-v1-detail-art{width:74px;height:74px}.shop-v1-detail-art img{width:78px;height:78px}.shop-v1-detail-copy h3{font-size:.95rem}.shop-v1-detail-copy p{font-size:.68rem}.shop-v1-detail .detail-buy{height:43px;font-size:.87rem}}

/* Shared full-screen navigation geometry. Preserve the 941:1672 canvas on every page. */
.shop-screen-v1{--edge:min(14px,2.917vw);--nav-button:min(58px,12.083vw);--nav-money:min(105px,21.875vw);--nav-gap:min(7px,1.458vw);width:min(100%,480px,calc(100dvh * .5628));height:auto;aspect-ratio:941/1672;padding-top:calc(env(safe-area-inset-top) + min(16px,3.333vw))}
.shop-v1-header{height:min(66px,13.75vw);grid-template-columns:var(--nav-button) minmax(0,1fr) var(--nav-money) var(--nav-button);gap:var(--nav-gap)}
.shop-v1-back,.shop-v1-menu{width:var(--nav-button);height:var(--nav-button)}.shop-v1-title{height:min(44px,9.167vw);min-width:0}.shop-v1-money{width:var(--nav-money);min-width:0;height:min(44px,9.167vw)}
.shop-v1-back>img{display:block;width:52%;height:52%;margin:auto;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 1px rgba(0,39,69,.42))}
/* Furniture art is cropped tight (no padding like the potion icons), so at the shared 98px it spilled over the name. */
.shop-v1-product.is-furniture .shop-v1-art img{width:76px;height:76px}.shop-v1-product.is-furniture h3{line-height:1.25}
@media(max-width:380px){.shop-v1-product.is-furniture .shop-v1-art img{width:64px;height:64px}}
/* Bag-slot card (user 11-12): the backpack PNG has no padding, so at potion size it covered the title */
.shop-v1-product.is-bag .shop-v1-art img{width:64px;height:64px;object-fit:contain}
@media(max-width:380px){.shop-v1-product.is-bag .shop-v1-art img{width:54px;height:54px}}
.shop-confirm-card .shop-qty{display:flex;align-items:center;justify-content:center;gap:8px;margin:10px 0 2px}.shop-confirm-card .shop-qty button{width:40px;height:40px;padding:0;border-radius:14px;background:#dce8ee;color:#34536c;font-size:1.3rem;line-height:1}.shop-confirm-card .shop-qty button[data-qty="max"]{width:auto;padding:0 12px;font-size:.85rem}.shop-confirm-card .shop-qty button:disabled{opacity:.4}.shop-confirm-card .shop-qty output{min-width:44px;font-size:1.35rem;font-weight:800;color:#123b67}
/* Money pill = CRAFT's (user 11-12: "65,210 Z" was cut off). Same font/padding as .craft-money so the
   shortened "65.2K Z" fits even at 82px wide on a 375px phone. */
.shop-v1-money{padding:0 6px 0 2px}.shop-v1-money b{font-size:.86rem}
@media(max-width:420px){.shop-v1-money{padding:0 4px 0 1px;gap:2px}.shop-v1-money img{width:30px;height:30px}}
