body[data-screen="shop"]{max-width:100vw}
body[data-shop="room"]{overflow:hidden}
body[data-shop] #app:has(.shop-scene),
body[data-shop] #app:has(.shop-subpage){width:100vw;max-width:100%;margin:0;padding:0}
#app:has(.shop-scene){height:calc(100dvh - var(--nav-height));display:grid;grid-template-rows:minmax(0,1fr)}
#app:has(.shop-scene)>.move-banner{z-index:3}
#app:has(.shop-scene):has(>.move-banner){grid-template-rows:auto minmax(0,1fr)}
.shop-scene{position:relative;container-type:size;overflow:hidden;isolation:isolate;background:#bd8a5c;color:#392925}
.shop-art{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100cqw,133.334cqh);height:max(100cqh,75cqw);background:url('art/star_shop/shop_interior_ipad.webp') center/cover}
.shop-hud{position:relative;z-index:2;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:clamp(5px,2vw,16px);align-items:center;padding:clamp(8px,2vw,20px) max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));color:#372720}
.shop-heading{margin:0;font-size:clamp(20px,3.4vw,46px);line-height:1.05;text-shadow:0 1px #fff3dd}
.shop-heading:focus{outline:none}
.shop-hud .shop-back,.shop-balance,.shop-sign{background:#fffaeb;border:2px solid #b89d6d;border-radius:18px;color:#3f3029;font-weight:750;box-shadow:0 2px 0 #76533852}
.shop-hud .shop-back{min-height:48px;padding:5px clamp(10px,2vw,18px);font-size:clamp(16px,2.2vw,22px)}
.shop-balance{padding:5px clamp(8px,1.6vw,18px);font-size:clamp(14px,2vw,20px);white-space:nowrap}
.shop-zone{position:absolute;min-width:48px;min-height:52px;display:flex;align-items:end;justify-content:center;padding:6px;border:2px solid #fff4d782;border-radius:clamp(14px,2.3vw,30px);background:#fffaeb10;box-shadow:inset 0 0 0 1px #94573125;color:#3c2922;touch-action:manipulation}
.shop-zone:hover,.shop-zone:focus-visible{background:#fff3d43b;border-color:#fff3d4;outline:2px solid #69401d}
.shop-rack{left:max(2%,calc((100% - 100cqw)/2 + 4px));top:25%;width:27%;height:49%}
.shop-shelves{right:max(2.5%,calc((100% - 100cqw)/2 + 4px));top:29%;width:26%;height:46%}
.shop-sign{z-index:1;display:grid;place-items:center;min-height:52px;padding:4px clamp(5px,1.3vw,18px);font-size:clamp(14px,2.15vw,24px);line-height:1.1;text-align:center}
.shelf-sprites{position:absolute;inset:10% 12% 13%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,1fr);justify-items:center;align-items:end;gap:1%}
.shelf-sprites img{width:92%;height:100%;max-height:100%;min-height:0;object-fit:contain;filter:drop-shadow(0 3px 3px #482b29a0)}
.shelf-sprites img:last-child{grid-column:1/-1;width:45%}
.shop-avatar{position:absolute;left:50%;bottom:8%;transform:translateX(-50%);width:min(35%,53cqh);height:57%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 8px 5px #54351b70)}
.shop-subpage{min-height:calc(100dvh - var(--nav-height));padding-bottom:calc(var(--nav-height) + 1.75rem);background:linear-gradient(#5f3a2440,#5f3a244f),url('art/star_shop/shop_interior_ipad.webp') center top/cover fixed}
.shop-panel{width:min(940px,calc(100% - 24px));margin:0 auto;padding:clamp(12px,2vw,24px);background:#fff9ed;border:2px solid #dcc4a7;border-radius:24px;box-shadow:0 12px 36px #4e2e2445}
.shop-panel button{min-height:56px}
.shop-wardrobe{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:start;gap:clamp(10px,2vw,24px)}
.wardrobe-portrait{margin:0;background:#f6eddf;border:1px solid #dfc8a6;border-radius:18px;text-align:center;padding:8px}
.wardrobe-portrait img{display:block;height:min(44dvh,400px);width:100%;object-fit:contain;filter:drop-shadow(0 5px 4px #60432a43)}
.wardrobe-portrait figcaption,.shop-wearing{padding:.35rem;font-weight:650;color:#573a7c}
.wardrobe-options{min-height:0}
.wardrobe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.wardrobe-grid button,.wardrobe-locked{min-width:0;display:grid;justify-items:center;align-content:center;padding:6px;text-align:center;font-size:clamp(14px,2vw,20px);line-height:1.2}
.wardrobe-grid button[aria-pressed="true"]{background:#eee2fd;border-color:#7955a1}
.wardrobe-grid img{width:min(130px,100%);height:clamp(54px,14dvh,120px);object-fit:contain}
.wardrobe-locks{max-height:min(25dvh,220px);overflow:auto;overscroll-behavior:contain;list-style:none;padding:0 2px;margin:8px 0}
.wardrobe-locked{min-height:82px;border-radius:16px;border:1px solid #dccce8;background:#f4eef5;color:#594866;gap:5px}
.wardrobe-controls{display:flex;justify-content:center;margin-top:8px}
.shop-animal{max-width:550px;text-align:center}
.shop-animal p{margin:14px 0 0}
.shop-boxes{text-align:center;max-width:690px}
.shop-boxes .glowing-box{position:relative;display:block;width:min(48%,26dvh,220px);min-width:120px;margin:0 auto 12px;border:2px solid #d4ae67;padding:0;background:radial-gradient(#fff0a5,#f9e3b18c 45%,#f3e7fc 73%);box-shadow:0 0 24px #f4c04b8c;animation:shop-glow 3.6s ease-in-out infinite alternate}
@keyframes shop-glow{to{box-shadow:0 0 34px #f4c04bcf}}
.shop-boxes .glowing-box .vinyl-model{width:100%;height:auto;min-height:0;margin:0;aspect-ratio:1}
.box-price{position:absolute;right:3px;top:3px;padding:2px 7px;border-radius:999px;background:#fff5d5;color:#553918;font-size:clamp(12px,1.8vw,17px);white-space:nowrap;box-shadow:0 1px 4px #583f3251}
.shop-odds,.shop-tip{font-size:clamp(14px,1.8vw,18px);margin:8px 0}
.shop-tip:empty{display:none}
.display-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(3px,1.5vw,14px);margin:10px auto 0;max-width:430px}
.shop-panel .display-box{min-width:0;min-height:48px;padding:2px;border-color:#e0cdb6;background:#fff8eb}
.display-box img{width:100%;height:clamp(42px,10dvh,80px);object-fit:contain}
.box-confirm h2{font-size:clamp(18px,3vw,25px);margin:3px 0 8px}
.box-confirm .row{justify-content:center}
body[data-screen="shop"] .shop-subpage button{scroll-margin-block:10px calc(var(--nav-height) + 20px)}
@media(orientation:portrait){
 .shop-art{width:max(100cqw,56.25cqh);height:max(100cqh,177.778cqw);background-image:url('art/star_shop/shop_interior_portrait.webp')}
 .shop-rack{left:max(4%,calc((100% - 100cqw)/2 + 4px));top:32%;width:42%;height:33%}
 .shop-shelves{right:max(4%,calc((100% - 100cqw)/2 + 4px));top:33%;width:39%;height:32%}
 .shop-avatar{bottom:3%;width:min(41%,245px);height:32%}
 .shop-subpage{background-image:linear-gradient(#5f3a2440,#5f3a244f),url('art/star_shop/shop_interior_portrait.webp')}
}
@media(max-width:600px){
 .shop-wardrobe{grid-template-columns:1fr}
 .wardrobe-portrait img{height:clamp(114px,24dvh,190px)}
}
@media(max-height:470px) and (orientation:landscape){
 .shop-avatar{bottom:4%;height:59%}
 .shop-subpage .shop-hud{padding-top:4px}
}
@media(prefers-reduced-motion:reduce){.shop-boxes .glowing-box{animation:none}.shop-boxes .vinyl-model::after{animation:none}}
.shop-avatar{width:min(35%,53cqh);height:auto;aspect-ratio:1}
.wardrobe-portrait img{width:min(100%,44dvh,400px);height:auto;aspect-ratio:1;margin:auto}
@media(orientation:portrait){.shop-avatar{width:min(41%,30cqh,245px);height:auto}}
@media(max-width:600px){.wardrobe-portrait img{width:clamp(114px,24dvh,190px);height:auto}}
@media(max-height:470px) and (orientation:landscape){.shop-avatar{width:min(34%,59cqh);height:auto}}
