body[data-shop=true]{overflow:hidden}
body[data-shop=true] header,body[data-shop=true] .footer{display:none}
body[data-shop=true] .wrap{height:100dvh;max-width:none;margin:0;padding:0}
body[data-shop=true] #toast{z-index:120}
body[data-shop=true] .modal{z-index:130}
.shop-screen{position:fixed;inset:0;z-index:100;box-sizing:border-box;display:flex;flex-direction:column;gap:9px;padding:max(10px,env(safe-area-inset-top)) 14px max(10px,env(safe-area-inset-bottom));background:linear-gradient(135deg,#ffecf4,#e5f3ff);overflow:hidden}
.shop-screen .shop-title{width:min(100%,1280px);height:auto;min-height:47px;margin:0 auto;gap:14px}
.shop-screen .shop-home-button{flex:none;min-height:44px;margin:0;background:#d94387;border-color:#c12e73;color:#fff;font-size:16px}
.shop-screen .shop-title h1{font-size:clamp(19px,3vw,28px)}
.shop-screen .shop-layout{display:grid;grid-template-columns:minmax(170px,24%) minmax(0,1fr);width:min(100%,1280px);height:100%;flex:1;min-height:0;margin:0 auto;gap:12px;padding:0}
.shop-screen .shop-layout .shop-avatar{display:flex;flex-direction:column;justify-content:center;justify-content:safe center;align-items:center;min-width:0;min-height:0;padding:12px 6px;overflow:auto}
.shop-screen .shop-layout .shop-avatar .avatar{width:min(100%,230px)!important;height:auto!important;aspect-ratio:2/3;flex:none}
.shop-screen .shop-avatar h2{font-size:clamp(15px,2vw,20px);margin:5px 0}
.shop-screen .shop-avatar .secondary{min-height:42px}
.try-on-label{display:inline-block;margin:2px 0;padding:4px 10px;border-radius:999px;background:#fff0b8;color:#6f4d20;font-size:14px;font-weight:900}
.shop-screen .outfit .item-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0;margin:8px 0 4px}
.shop-screen .outfit .item-heading h3{flex:1;min-width:0;min-height:0;margin:0;font-size:clamp(14px,1.4vw,18px);line-height:1.2}
.shop-screen .outfit .item-heading .price{flex:none;white-space:nowrap;margin:0;font-size:clamp(17px,1.6vw,21px);line-height:1.1}
.avatar .wear-cap{left:20%;top:-2%;width:60%;height:24%;transform:none}
.avatar.boy .wear-cap{left:19%;top:-2%;width:62%;height:25%;transform:none}
.avatar .wear-cap.item-0{left:20%;top:-2%;width:60%;height:23%}
.avatar .wear-cap.item-1{left:21%;top:0;width:58%;height:19%}
.avatar .wear-cap.item-2{left:18%;top:-2%;width:64%;height:33%}
.avatar.boy .wear-cap.item-2{left:17%;top:-3%;width:66%;height:34%}
.avatar .wear-glasses{left:29%;width:42%;height:12%;transform:rotate(-6deg)}
.avatar.boy .wear-glasses{left:27%;width:45%;height:12%;transform:rotate(-5deg)}
.avatar .avatar-accessory{left:27%;top:1%;width:46%;height:20%}
.avatar .wear-shoes,.avatar .wear-boots{top:88%;width:13.5%;height:10%;z-index:3}
.avatar .wear-shoes.foot-0,.avatar .wear-boots.foot-0{left:39%}
.avatar .wear-shoes.foot-1,.avatar .wear-boots.foot-1{left:53%}
.avatar.boy .wear-shoes,.avatar.boy .wear-boots{top:88%;width:19.5%;height:10.5%}
.avatar.boy .wear-shoes.foot-0,.avatar.boy .wear-boots.foot-0{left:23.5%}
.avatar.boy .wear-shoes.foot-1,.avatar.boy .wear-boots.foot-1{left:58%}
.avatar:has(.wear-shoes,.wear-boots) .avatar-body:not(.head-replaced){clip-path:inset(0 0 11.5% 0)}
.avatar:has(.wear-shoes,.wear-boots) .avatar-body.head-replaced{clip-path:inset(33% 0 11.5% 0)}
.shop-screen .shop-layout .shop-items{min-width:0;min-height:0;padding:10px;overflow:hidden}
.shop-screen .shop-layout .categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:3px 0 7px;overflow:visible}
.shop-screen .shop-layout .category{min-width:0;min-height:44px;white-space:normal;font-size:clamp(13px,1.5vw,17px);padding:6px 4px;line-height:1.15}
.shop-screen .shop-layout .outfit-grid{flex:1;min-height:0;overflow-y:auto;align-content:start;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:5px 0 0;padding:4px 5px 18px}
.shop-screen .outfit{min-width:0;min-height:0}
.shop-screen .hair-preview,.shop-screen .shoe-thumb{height:136px;overflow:hidden;display:flex;justify-content:center;align-items:flex-start;padding:2px;box-sizing:border-box}
.shop-screen .hair-preview .avatar{width:min(100%,175px);height:auto;aspect-ratio:2/3;flex:none}
.shop-screen .shoe-thumb{align-items:center}
.shop-screen .shoe-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.shop-screen .base-item:has(.hair-preview){display:flex;flex-direction:column;grid-column:auto}
.shop-screen .base-item .hair-preview{width:100%}
@media(max-width:700px){
 .shop-screen{padding:max(5px,env(safe-area-inset-top)) 5px max(5px,env(safe-area-inset-bottom));gap:5px}
 .shop-screen .shop-title{min-height:42px}
 .shop-screen .shop-home-button{min-height:38px;padding:7px 9px;font-size:13px}
 .shop-screen .shop-title .back{min-height:38px;padding:7px 8px;font-size:13px}
 .shop-screen .shop-layout{display:grid;grid-template-columns:minmax(92px,29%) minmax(0,1fr);gap:5px}
 .shop-screen .shop-layout .shop-avatar{height:auto;min-height:0;padding:5px 2px;flex-direction:column;justify-content:center;justify-content:safe center;gap:3px}
 .shop-screen .shop-layout .shop-avatar .avatar{width:min(100%,145px)!important;height:auto!important;aspect-ratio:2/3}
 .shop-screen .shop-avatar h2{font-size:13px;margin:2px 0}
 .shop-screen .shop-avatar .secondary{min-height:38px;font-size:12px;padding:4px;line-height:1.15}
 .shop-screen .shop-layout .shop-items{min-height:0;padding:5px 4px}
 .shop-screen .shop-help{font-size:12px;line-height:1.2;margin:0 1px 3px}
 .shop-screen .shop-layout .categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:0 0 5px}
 .shop-screen .shop-layout .category{min-height:38px;padding:4px 2px;font-size:12px}
 .shop-screen .shop-layout .outfit-grid{grid-template-columns:minmax(0,1fr);gap:5px;margin:2px 0 0;padding:2px 2px 10px}
 .shop-screen .shop-layout .outfit:not(.base-item){display:grid;grid-template-columns:76px minmax(0,1fr);gap:3px 6px;padding:5px}
 .shop-screen .outfit:not(.base-item)>:first-child{grid-column:1;grid-row:1/5;height:102px;align-self:center}
 .shop-screen .outfit:not(.base-item)>.item-heading,.shop-screen .outfit:not(.base-item)>button{grid-column:2;width:100%;margin:0;min-height:0}
 .shop-screen .outfit .item-heading h3{font-size:14px;line-height:1.15}
 .shop-screen .outfit .item-heading .price{font-size:16px}
 .shop-screen .outfit:not(.base-item)>button{min-height:36px;padding:5px 2px;font-size:12px}
 .shop-screen .hair-preview .avatar{width:145px;max-width:none}
 .shop-screen .base-item:has(.hair-preview){display:grid;grid-template-columns:76px minmax(0,1fr);gap:4px;padding:5px}
 .shop-screen .base-item .hair-preview{grid-row:1/3;grid-column:1;height:102px}
 .shop-screen .base-item:has(.hair-preview) h3,.shop-screen .base-item:has(.hair-preview) button{grid-column:2;width:100%}
 .shop-screen .base-item:has(.hair-preview) h3{font-size:14px}
 .shop-screen .base-item:has(.hair-preview) button{font-size:12px;min-height:36px;padding:5px 2px}
}
