@import url("./wardrobe-polish.css?v=racing-fixes-v3-20261024");
.studio-shop { margin: 12px 0 16px; padding: 13px; border: 1px solid #d5e5f7; border-radius: 15px; background: #f4f8ff; color: #24466c; }
.studio-shop-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.studio-shop-heading h3 { margin: 0; color: #24466c; font-size: 17px; font-weight: 850; }
.studio-shop-heading a { color: #246ac3; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.studio-shop-wallet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-top: 10px; color: #47658a; font-size: 12px; }
.studio-shop-wallet strong { color: #183d6a; font-size: 23px; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.studio-shop-collection { margin: 3px 0 8px; color: #647c98; font-size: 11px; }
.studio-shop-note, .studio-shop-status { margin: 8px 0; color: #56708f; font-size: 12px; line-height: 1.4; }
.studio-shop-status:empty { display: none; }
.studio-shop-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.studio-shop-item { display: flex; flex-direction: column; min-width: 0; padding: 10px; border: 1px solid #d8e5f5; border-radius: 12px; background: #fff; }
.studio-shop-item-heading { display: flex; align-items: center; gap: 7px; }
.studio-shop-item-heading > span { font-size: 24px; line-height: 1.2; }
.studio-shop-item-heading h4 { margin: 0; color: #24466c; font-size: 13px; font-weight: 850; line-height: 1.2; }
.studio-shop-price { margin: 7px 0 4px; color: #4c688c; font-size: 11px; }
.studio-shop-price strong { color: #1d579b; font-size: 17px; font-weight: 900; }
.studio-shop-item-note { flex: 1; margin: 0 0 9px; color: #71849a; font-size: 11px; line-height: 1.3; }
.studio-shop-item button { width: 100%; min-height: 37px; padding: 7px 9px; border: 1px solid #2472ca; border-radius: 9px; background: linear-gradient(#4197ee, #236ccb); color: #fff; font-family: inherit; font-size: 12px; font-weight: 800; line-height: 1.25; cursor: pointer; }
.studio-shop-item button[aria-pressed="true"] { outline: 2px solid #6bb0fc; outline-offset: 2px; }
.studio-shop-item button:disabled { border-color: #d5e1ef; background: #ecf2f9; color: #6b8099; cursor: default; }
.studio-shop-item button:focus-visible, .studio-shop-heading a:focus-visible { outline: 3px solid #a3caff; outline-offset: 3px; }
@media (max-width: 480px) {
  .studio-shop { padding: 11px; }
  .studio-shop-items { gap: 8px; }
  .studio-shop-item { padding: 9px; }
  .studio-shop-item button { min-height: 40px; }
}
@media (max-width: 350px) { .studio-shop-items { grid-template-columns: 1fr; } }
@media (min-width: 801px) {
  #profile-dialog #profile-form .avatar-studio-layout { height: 100%; min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
  #profile-dialog #profile-form .avatar-studio-controls { height: 100%; min-height: 0; overflow-y: auto !important; overscroll-behavior: contain; padding-right: 8px; scrollbar-width: thin; }
}
#profile-dialog #profile-form .studio-footer { background: #fff !important; }
@media (min-width: 1100px) {
  .studio-shop-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio-shop-item-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .studio-shop-item-heading h4 { overflow-wrap: anywhere; }
}

/* Catalogue: touch targets, explicit ownership and a fixed fitting-room preview. */
.wardrobe-category-tabs{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin:12px 0}.wardrobe-category-tabs button{flex:1 0 105px;min-height:42px;padding:9px!important;font-size:12px!important;border-radius:10px!important}.wardrobe-category-tabs button[aria-selected=true]{background:#194d9e!important;color:white!important}
.wardrobe-remove-options{display:flex;gap:6px;flex-wrap:wrap}.wardrobe-remove-options button{min-height:36px;font:inherit;font-size:11px;border:1px solid #c7d8ed;border-radius:8px;background:#fff;color:#33557b;padding:7px}.wardrobe-remove-options button:disabled{opacity:.4}
.wardrobe-item-art{height:85px;display:grid;place-items:center;border-radius:10px;background:#eff5ff;position:relative}.wardrobe-item-art>span{font-size:49px;filter:drop-shadow(0 4px 3px #1b36521f)}.wardrobe-item-art>i{position:absolute;right:8px;bottom:8px;width:23px;height:23px;border-radius:50%;background:var(--item-colour);border:2px solid #fff;box-shadow:0 1px 3px #1b36524d}.studio-shop-item h4{font-size:12px;line-height:1.4;color:#1c3e69;margin:9px 0 0}.wardrobe-item-badge{font-size:10px;color:#36624b;margin:1px 0 7px}.studio-shop-item button+button{margin-top:6px}.studio-shop-item .wardrobe-try{background:#edf4ff;color:#1d5caa;border-color:#aac9ed}.studio-shop-item.is-tried{border-color:#387cdf;box-shadow:0 0 0 2px #3d8cf126}.wardrobe-unowned-preview{padding:10px;border-radius:9px;background:#fff3d4;color:#795016;font-size:12px}.wardrobe-avatar{overflow:visible}.studio-shop-item{scroll-margin:20px}.studio-wardrobe{margin-bottom:12px}
@media(max-width:800px){#profile-dialog .avatar-builder-preview{position:sticky;top:0;z-index:2;max-height:40vh;background:#e8edf2}#profile-dialog .fitting-room-stage{max-height:38vh}#profile-dialog .portrait-character{max-height:31vh!important}.wardrobe-category-tabs button{flex-basis:88px}.studio-shop-items{grid-template-columns:repeat(2,minmax(0,1fr))}}
.wardrobe-item-art>svg{width:100%;height:100%}.wardrobe-item-art>.racer-vehicle{display:block;position:relative;width:100%;height:100%}.wardrobe-item-art .vehicle-body{position:absolute;inset:0;width:100%;height:100%}.wardrobe-item-art .vehicle-cockpit-front{display:none}.wardrobe-vehicle-preview{position:absolute;right:2%;bottom:2%;width:38%;height:28%;z-index:5;pointer-events:none}.wardrobe-vehicle-preview .racer-vehicle{display:block;position:relative;width:100%;height:100%;filter:drop-shadow(0 5px 3px #132d4c44)}.wardrobe-vehicle-preview .vehicle-body{position:absolute;inset:0;width:100%;height:100%}.wardrobe-vehicle-preview .vehicle-cockpit-front{display:none}
.wardrobe-item-art .vehicle-wheel,.wardrobe-item-art .vehicle-flame,.wardrobe-vehicle-preview .vehicle-wheel,.wardrobe-vehicle-preview .vehicle-flame{display:none!important}
@media(max-width:800px){
 #profile-dialog #profile-form{height:92dvh!important;max-height:92dvh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:10px}
 #profile-dialog .studio-heading{flex:none;margin:0;padding-bottom:8px}
 #profile-dialog .studio-heading h2{font-size:22px!important}
 #profile-dialog .studio-heading p{font-size:11px;margin-bottom:0}
 #profile-dialog #profile-form .avatar-studio-layout{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(180px,30dvh) minmax(0,1fr)!important;gap:10px;flex:1;min-height:0;height:auto!important;overflow:hidden}
 #profile-dialog .avatar-studio-layout .avatar-builder-preview{position:relative!important;top:auto!important;height:100%!important;min-height:0!important;max-height:none!important;padding:0!important;display:block!important}
 #profile-dialog .fitting-room-stage{height:100%!important;min-height:0!important;max-height:none!important}
 #profile-dialog .portrait-character{max-height:27dvh!important}
 #profile-dialog #profile-form .avatar-studio-controls{height:100%;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;padding:2px 5px 10px}
 #profile-dialog .studio-footer{flex:none;margin:0;padding:5px 0!important;min-height:48px;position:relative}
 #profile-dialog .studio-footer button{width:100%;font-size:13px!important}
 #profile-dialog .studio-fitting-label{top:8px;left:8px;font-size:6px;padding:5px}
 #profile-dialog .wardrobe-vehicle-preview{right:3%;width:29%;height:36%}
}
@media(orientation:landscape) and (max-height:600px){
 #profile-dialog #profile-form{height:94dvh!important;max-height:94dvh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:5px}
 #profile-dialog .studio-heading{padding:0!important;min-height:44px;margin:0!important}
 #profile-dialog .studio-heading p,#profile-dialog .studio-heading .panel-label{display:none}
 #profile-dialog .studio-heading h2{font-size:19px!important}.studio-brand img{height:34px!important;width:auto!important}
 #profile-dialog #profile-form .avatar-studio-layout{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;grid-template-rows:minmax(0,1fr)!important;flex:1;min-height:0;gap:12px}
 #profile-dialog .avatar-studio-layout .avatar-builder-preview{height:100%!important;max-height:none!important}
 #profile-dialog .portrait-character{max-height:46dvh!important}
 #profile-dialog #profile-form .avatar-studio-controls{min-height:0;height:100%;overflow-y:auto!important}
 #profile-dialog .studio-footer{min-height:38px;padding:0!important}
 #profile-dialog .studio-footer button{min-height:36px!important;padding:7px!important}
}

/* Compact cabin: one title, large pinned preview, scrolling collection. */
#profile-dialog{overflow:hidden!important;max-height:calc(100dvh - 16px)!important}
#profile-dialog #profile-form{padding:10px!important;gap:6px!important;box-sizing:border-box!important;overflow:hidden!important;grid-template-rows:28px minmax(0,1fr) 32px!important}
#profile-dialog #profile-form .studio-heading{height:28px!important;min-height:28px!important;padding:0 40px 0 2px!important;margin:0!important;border:0!important;flex:none!important}
#profile-dialog .studio-heading .studio-brand,#profile-dialog .studio-heading .panel-label,#profile-dialog .studio-heading p,#profile-dialog .studio-fitting-label{display:none!important}
#profile-dialog .studio-heading h2{font-size:13px!important;line-height:20px!important;letter-spacing:0!important;margin:0!important}
#profile-dialog .modal-close{top:8px!important;right:8px!important;width:32px!important;height:32px!important;min-height:32px!important;z-index:20!important}
#profile-dialog #profile-form .avatar-studio-layout{margin:0!important;gap:8px!important}
#profile-dialog .studio-name-field{margin:0 0 7px!important}
#profile-dialog .studio-name-field>span,#profile-dialog .studio-collection-heading{display:none!important}
#profile-dialog #name-input{padding:7px 10px!important;min-height:36px!important;font-size:14px!important}
#profile-dialog #avatar-picker{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:3px 2px 6px!important;margin:0 0 4px!important;scroll-snap-type:x proximity}
#profile-dialog #avatar-picker .avatar-choice{flex:0 0 58px!important;width:58px!important;height:74px!important;min-height:74px!important;scroll-snap-align:start}
#profile-dialog #avatar-picker .stylish-avatar{height:66px!important;width:48px!important}
#profile-dialog .studio-wardrobe-heading,#profile-dialog .wardrobe-category-tabs{display:none!important}
#profile-dialog .studio-wardrobe{padding:0!important;margin:0!important}
#profile-dialog .wardrobe-remove-options{gap:4px!important;margin:3px 0!important}
#profile-dialog .wardrobe-remove-options button{min-height:30px!important;padding:4px 6px!important;font-size:10px!important}
#profile-dialog .wardrobe-remove-options button:disabled{display:none!important}
#profile-dialog .studio-shop{margin:5px 0 10px!important;padding:9px!important}
#profile-dialog .studio-shop-note{display:none!important}
#profile-dialog .studio-shop-wallet{font-size:10px!important;margin-top:6px!important}
#profile-dialog .studio-shop-wallet strong{font-size:16px!important}
#profile-dialog .studio-shop-heading select{font-size:14px!important;min-height:40px!important}
#profile-dialog .wardrobe-preview{display:block!important;width:100%!important;min-height:0!important;background:transparent!important;border:0!important;border-radius:8px!important;color:#183d6a!important;padding:0!important;box-shadow:none!important;text-align:left!important;cursor:pointer}
#profile-dialog .wardrobe-preview .wardrobe-item-art{display:grid!important;width:100%!important;height:95px!important}
#profile-dialog .wardrobe-item-name{display:block;font-size:12px;line-height:16px;font-weight:800;margin-top:7px}
#profile-dialog .studio-shop-item button[aria-pressed=true]{outline:none!important}
#profile-dialog .studio-shop-item button:focus-visible{outline:3px solid #ffce4f!important}
#profile-dialog .studio-shop-item{padding:8px!important}
#profile-dialog .studio-shop-price{margin:5px 0 3px!important}
#profile-dialog .wardrobe-item-badge{margin:0 0 5px!important}
#profile-dialog .wardrobe-unowned-preview{font-size:11px!important;padding:6px!important;margin:5px 0!important}
#profile-dialog #profile-form .studio-footer{padding:0!important;min-height:32px!important;height:32px!important;gap:0!important;border:0!important;position:static!important;flex:none!important;justify-content:flex-end!important}
#profile-dialog #profile-form .studio-footer .start-button{width:auto!important;min-width:108px!important;min-height:32px!important;height:32px!important;padding:5px 14px!important;font-size:12px!important;border-radius:9px!important}
#profile-dialog #profile-signout{display:block;position:static!important;margin:20px auto 4px!important;padding:8px 18px!important;min-height:36px!important;width:auto!important;max-width:100%!important;border:1px solid #ced9e7!important;border-radius:9px!important;background:#f5f8fc!important;color:#4c607b!important;font:700 12px system-ui!important}
#profile-dialog #profile-signout[hidden]{display:none!important}
@media(max-width:800px){
 #profile-dialog #profile-form{height:96dvh!important;max-height:96dvh!important}
 #profile-dialog #profile-form .avatar-studio-layout{grid-template-rows:minmax(205px,32dvh) minmax(0,1fr)!important}
 #profile-dialog.has-original-portraits .portrait-character{height:87%!important;max-height:none!important;max-width:76%!important;bottom:7%!important}
}
@media(orientation:landscape) and (max-height:600px){
 #profile-dialog #profile-form{height:96dvh!important;max-height:96dvh!important}
 #profile-dialog #profile-form .avatar-studio-layout{grid-template-rows:minmax(0,1fr)!important}
 #profile-dialog.has-original-portraits .portrait-character{height:87%!important;max-height:none!important;max-width:76%!important;bottom:7%!important}
}
/* The label already belongs to the picture; return stays in its corner. */
#profile-dialog #profile-form{grid-template-rows:minmax(0,1fr) 32px!important}
#profile-dialog #profile-form .studio-heading{display:none!important}
#profile-dialog .studio-fitting-label{display:block!important;top:8px!important;left:8px!important;font-size:8px!important;line-height:11px!important;padding:5px 7px!important}
#profile-dialog .modal-close{top:8px!important;right:8px!important;width:36px!important;height:36px!important;min-height:36px!important;font-size:22px!important;border-radius:50%!important;background:#fffffffa!important;border:1px solid #d7e3ee!important;box-shadow:0 1px 4px #102b4822}
#profile-dialog .studio-shop-note{display:block!important;font-size:11px!important;line-height:15px!important;margin:5px 0 7px!important;color:#516c8b!important}

/* Swipe every clothing category; the selected card rises without obscuring the avatar. */
#profile-dialog .wardrobe-category-carousel{display:flex;gap:9px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x pan-y;padding:10px 6px 13px;scrollbar-width:thin;scrollbar-color:#97b4dd transparent;perspective:650px;position:sticky;top:0;z-index:6;background:#f2f7fd;border-radius:14px;margin:2px 0 8px}
#profile-dialog .wardrobe-category-carousel button{box-sizing:border-box;flex:0 0 88px;min-height:71px;scroll-snap-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:6px;border:1px solid #c5d8ef;border-radius:14px;background:linear-gradient(#ffffff,#e3edf9);color:#426186;box-shadow:0 3px 0 #b7cbe2,0 5px 8px #153a6515;transform:scale(.94) rotateY(-3deg);transition:transform .16s,background .16s;cursor:pointer}
#profile-dialog .wardrobe-category-carousel button span{font-size:25px;line-height:29px}
#profile-dialog .wardrobe-category-carousel button b{font:800 11px/1.15 system-ui;white-space:normal;overflow-wrap:normal;text-align:center}
#profile-dialog .wardrobe-category-carousel button[aria-selected=true]{background:linear-gradient(#297dcc,#104d98);border-color:#76c9ff;color:white;box-shadow:0 4px 0 #07336f,0 8px 12px #174b9730;transform:translateY(-3px) scale(1.02);z-index:1}
#profile-dialog .wardrobe-category-carousel button:focus-visible{outline:3px solid #ffce4f;outline-offset:2px}
#profile-dialog #cosmetic-pickers .wardrobe-category-tabs{display:none!important}
#profile-dialog .wardrobe-vehicle-guide{padding:8px 10px;background:#edf5ff;border:1px solid #cfe0f5;border-radius:12px;margin:7px 0 10px}
#profile-dialog .wardrobe-vehicle-guide p{font:600 12px/1.4 system-ui;color:#365b85;margin:0 0 7px}
#profile-dialog .wardrobe-vehicle-step{min-height:40px;border:1px solid #a8c7eb;border-radius:10px;padding:7px 12px;background:white;color:#165b9c;font:800 12px system-ui}
@media(orientation:landscape) and (max-height:500px){#profile-dialog .wardrobe-category-carousel{gap:7px;padding:7px 5px 10px}#profile-dialog .wardrobe-category-carousel button{min-height:60px;flex-basis:82px}#profile-dialog .wardrobe-category-carousel button span{font-size:20px;line-height:22px}}
@media(prefers-reduced-motion:reduce){#profile-dialog .wardrobe-category-carousel button{transition:none;transform:none}}

/* Each catalogue image occupies a definite box; names never share its paint area. */
#profile-dialog .wardrobe-preview .wardrobe-item-art{position:relative!important;overflow:hidden!important;min-width:0;min-height:0;isolation:isolate}
#profile-dialog .wardrobe-preview .wardrobe-item-art>svg{position:absolute!important;inset:6px!important;width:calc(100% - 12px)!important;height:calc(100% - 12px)!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;display:block!important;overflow:hidden!important}
#profile-dialog .wardrobe-item-name{position:relative;min-height:32px;overflow-wrap:anywhere}
#profile-dialog .studio-fitting-label{display:none!important}
#profile-dialog.has-original-portraits .portrait-character{left:23%!important;bottom:7%!important;height:87%!important;max-height:none!important;max-width:43%!important;transform:translateX(-50%)!important}
#profile-dialog .wardrobe-vehicle-preview{right:0!important;bottom:-7%!important;width:62%!important;height:66%!important;z-index:2}
#profile-dialog .wardrobe-vehicle-guide{font:600 12px/1.4 system-ui;color:#365b85;padding:9px 10px}
#profile-dialog .wardrobe-vehicle-palette{margin:14px 0 3px;padding:12px;border:1px solid #c7dbee;border-radius:14px;background:#fff}
#profile-dialog .wardrobe-vehicle-palette h4{font:800 13px/1.3 system-ui;color:#183d6a;margin:0 0 12px}
#profile-dialog .wardrobe-paint-swatches{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#profile-dialog .wardrobe-paint-swatches button{width:100%;height:38px;min-height:38px;padding:0;border:3px solid white;border-radius:50%;background:var(--swatch);box-shadow:0 0 0 1px #b6cbe2;color:white;text-shadow:0 1px 3px #10233e;font:900 19px system-ui;cursor:pointer}
#profile-dialog .wardrobe-paint-swatches button[aria-pressed=true]{outline:3px solid #175caa;outline-offset:1px}
#profile-dialog .wardrobe-paint-selection{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:14px;color:#183d6a}
#profile-dialog .wardrobe-paint-selection b,#profile-dialog .wardrobe-paint-selection small{display:block;font:800 12px/1.4 system-ui}
#profile-dialog .wardrobe-paint-selection small{font-weight:600;font-size:11px;margin-top:3px}
#profile-dialog .wardrobe-paint-selection button{min-height:38px;padding:7px 12px;border:1px solid #246db7;border-radius:9px;color:#fff;background:linear-gradient(#3998eb,#155fa8);font:800 12px system-ui}

#profile-dialog .wardrobe-vehicle-preview{bottom:7%!important;height:auto!important;aspect-ratio:1234/740}
#profile-dialog .wardrobe-vehicle-preview:has([data-model=plane]){aspect-ratio:1254/975}
#profile-dialog .wardrobe-vehicle-preview:has([data-model=rocket]){aspect-ratio:1230/700}
#profile-dialog .wardrobe-vehicle-preview:has([data-model=pod]){aspect-ratio:1234/660}
#profile-dialog .wardrobe-paint-swatches button{width:min(100%,38px);justify-self:center} @media(min-width:700px){#profile-dialog .wardrobe-paint-swatches{grid-template-columns:repeat(7,minmax(0,1fr))}}

@media(min-width:801px) and (max-width:1024px) and (orientation:portrait){
 #profile-dialog #profile-form{height:96dvh!important;max-height:96dvh!important}
 #profile-dialog #profile-form .avatar-studio-layout{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(260px,34dvh) minmax(0,1fr)!important;min-height:0!important;overflow:hidden!important}
 #profile-dialog .avatar-studio-layout .avatar-builder-preview{height:100%!important;min-height:0!important;max-height:none!important;padding:0!important;display:block!important}
 #profile-dialog .fitting-room-stage{height:100%!important;min-height:0!important;max-height:none!important}
 #profile-dialog #profile-form .avatar-studio-controls{height:100%;min-height:0;overflow-y:auto!important}
}

/* A larger vehicle sits behind the foreground character, for every model. */
#profile-dialog.has-original-portraits .portrait-character{left:31%!important;bottom:5%!important;height:92%!important;max-width:60%!important;z-index:4!important}
#profile-dialog .wardrobe-vehicle-preview{right:1%!important;bottom:12%!important;width:86%!important;max-height:82%!important;z-index:2!important}
@media(max-width:800px) and (orientation:portrait){
 #profile-dialog #profile-form .avatar-studio-layout{grid-template-rows:minmax(240px,37dvh) minmax(0,1fr)!important}
}

/* Wide portrait screens (opened Fold/tablet): use the available width beside the avatar. */
@media(orientation:portrait) and (min-width:600px) and (max-width:1024px){
 #profile-dialog.has-original-portraits .portrait-character{left:22%!important;max-width:42%!important}
 #profile-dialog .wardrobe-vehicle-preview{right:1%!important;bottom:5%!important;width:64%!important;max-height:80%!important}
}

/* Only paint expensive SVG previews when they approach the visible catalogue. */
@supports(content-visibility:auto){.studio-shop-item{content-visibility:auto;contain-intrinsic-size:auto 210px}}
