/* Fit accessories to the illustrated face and feet. */
.avatar .wear-glasses{top:13.2%;left:29%;width:43%;height:11%;transform:rotate(-3deg)}
.avatar.boy .wear-glasses{top:12.5%;left:27%;width:46%;height:11%;transform:rotate(-3deg)}
.avatar .wear-cap{top:-8%;left:21%;width:58%;height:24%;transform:none}
.avatar.boy .wear-cap{top:-8%;left:20%;width:60%;height:24%}
.avatar .wear-cap.item-0{top:-8%;left:21%;width:58%;height:24%}
.avatar .wear-cap.item-1{top:-6%;left:22%;width:56%;height:22%}
.avatar .wear-cap.item-2{top:-14%;left:11%;width:78%;height:40%}
.avatar.boy .wear-cap.item-2{top:-14%;left:11%;width:78%;height:40%}
.avatar .wear-cap.item-2 .wear-art{transform:scaleX(1.3);transform-origin:center}
.avatar .wear-boots{top:82%;height:16.5%;width:20%;z-index:3}
.avatar .wear-boots.foot-0{left:36%}
.avatar .wear-boots.foot-1{left:51%}
.avatar.boy .wear-boots{top:82%;height:16.5%;width:24%;z-index:3}
.avatar.boy .wear-boots.foot-0{left:21%}
.avatar.boy .wear-boots.foot-1{left:56%}
.avatar:has(.wear-boots) .avatar-body:not(.head-replaced){clip-path:inset(0 0 15.5% 0)}
.avatar:has(.wear-boots) .avatar-body.head-replaced{clip-path:inset(33% 0 15.5% 0)}
.shop-screen .shop-layout .outfit:not(.base-item){min-height:305px}

/* Narrow shop cards keep each picture and its controls in its own row. */
@media(max-width:700px){
  .shop-screen .shop-layout .outfit:not(.base-item){display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:8px;min-height:270px}
  .shop-screen .shop-layout .outfit:not(.base-item)>:first-child{display:flex;align-items:center;justify-content:center;flex:none;width:100%;height:128px;box-sizing:border-box;align-self:auto;overflow:hidden}
  .shop-screen .shop-layout .outfit:not(.base-item)>.item-heading{display:flex;width:100%;min-height:36px;margin:0;align-items:center;gap:5px}
  .shop-screen .shop-layout .outfit:not(.base-item)>.item-heading h3{font-size:14px;line-height:1.15}
  .shop-screen .shop-layout .outfit:not(.base-item)>.item-heading .price{font-size:16px}
  .shop-screen .shop-layout .outfit:not(.base-item)>button{flex:none;width:100%;min-height:36px;margin:0;padding:5px 2px;font-size:12px}
  .shop-screen .shop-layout .new-item-thumb .wear-art{display:block;width:100%;height:100%;max-height:none}
}

/* Purchased cards give the name the full row; ownership sits beneath it. */
.shop-screen .shop-layout .outfit.owned:not(.base-item)>.item-heading{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:3px;min-height:52px}
.shop-screen .shop-layout .outfit.owned:not(.base-item)>.item-heading h3{flex:none;width:100%;min-height:0;margin:0;line-height:1.15;font-size:14px}
.shop-screen .shop-layout .outfit.owned:not(.base-item)>.item-heading .price{flex:none;margin:0;line-height:1.1;font-size:16px}

/* Fit previews to the same head and feet at desktop and phone sizes. */
.avatar .wear-cap.item-0,.avatar.boy .wear-cap.item-0{top:-3%;left:16%;width:68%;height:27%}
.avatar .wear-cap.item-1,.avatar.boy .wear-cap.item-1{top:-1%;left:28%;width:44%;height:16%}
.avatar .wear-cap.item-2,.avatar.boy .wear-cap.item-2{top:-3%;left:25%;width:50%;height:23%}
.avatar .wear-cap.item-2 .wear-art{transform:none}
.avatar .avatar-body{z-index:1}
.avatar .avatar-head{z-index:2}
.avatar .wear-bag.item-4{z-index:0;left:57%;top:36%;width:32%;height:31%}
.avatar .wear-boots.item-8{top:88%;width:17%;height:10%;z-index:3}
.avatar .wear-boots.item-8.foot-0{left:37%}
.avatar .wear-boots.item-8.foot-1{left:51%}
.avatar.boy .wear-boots.item-8{top:87%;width:21%;height:11%}
.avatar.boy .wear-boots.item-8.foot-0{left:22%}
.avatar.boy .wear-boots.item-8.foot-1{left:56%}
.avatar .wear-boots.item-8.foot-0 .wear-art{transform:scaleX(-1)}
.avatar:has(.wear-boots.item-8) .avatar-body:not(.head-replaced){clip-path:inset(0 0 11% 0)}
.avatar:has(.wear-boots.item-8) .avatar-body.head-replaced{clip-path:inset(33% 0 11% 0)}
.shop-screen .shoe-pair{display:flex;width:100%;height:100%;align-items:center;justify-content:center;gap:0}
.shop-screen .shoe-pair img{width:48%;height:86%;object-fit:contain}

/* Give the catalogue the full phone width while keeping the child visible. */
@media(max-width:700px){
 .shop-screen .shop-layout{display:flex;flex-direction:column;gap:7px}
 .shop-screen .shop-layout .shop-avatar{flex:none;height:132px;min-height:132px;flex-direction:row;justify-content:center;gap:14px;padding:4px 10px;overflow:hidden}
 .shop-screen .shop-layout .shop-avatar .avatar{width:88px!important;height:132px!important}
 .shop-screen .shop-layout .shop-avatar>div:last-child{min-width:0}
 .shop-screen .shop-layout .shop-items{flex:1;min-height:0}
 .shop-screen .shop-layout .outfit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:360px){.shop-screen .shop-layout .outfit-grid{grid-template-columns:minmax(0,1fr)}}
.shop-screen .shoe-pair img:first-child{transform:scaleX(-1)}
/* Final fitting adjustments after viewing the actual illustrated boy. */
.avatar .wear-cap.item-0,.avatar.boy .wear-cap.item-0{top:-9%;height:22%}
.avatar .wear-bag.item-4{top:20%;left:57%;width:32%;height:31%}
.avatar .wear-boots.item-8{top:85%;width:19%;height:14%}
.avatar .wear-boots.item-8.foot-0{left:36%}
.avatar .wear-boots.item-8.foot-1{left:51%}
.avatar.boy .wear-boots.item-8{top:84%;width:23%;height:15%}
.avatar.boy .wear-boots.item-8.foot-0{left:21%}
.avatar.boy .wear-boots.item-8.foot-1{left:55%}
