/* OUTFIT-01: the dress-up view (src/ui/wardrobe-panel.js). Owner theme: dark grey ground, cream slanted tags,
   diamonds, no outlines (focus ring excepted). Chosen = cream fill, so shape and lightness carry it, not hue.
   Every class starts with wd-. PC text stays at 18px or more */
.wd{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:calc(var(--u) * 12);font-size:max(18px,calc(var(--u) * 18))}
.wd-stagewrap{position:relative;min-width:0;min-height:260px;background:radial-gradient(70% 58% at 50% 42%,rgba(242,182,76,.1),rgba(242,182,76,0) 70%)}
.wd .inv-stage{bottom:max(60px,calc(var(--u) * 60))}      /* the name has its own strip under the character */
.wd-now{position:absolute;left:0;right:0;bottom:0;margin:0;display:flex;flex-direction:column;align-items:center;line-height:1.35;pointer-events:none;text-align:center}
.wd-now small{font-size:max(18px,calc(var(--u) * 18));color:var(--mute)}
.wd-now b{font-family:Mitr,sans-serif;font-weight:500;color:var(--hd-sun);font-size:max(22px,calc(var(--u) * 22))}
.wd-side{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:calc(var(--u) * 8);padding:2px 4px;scrollbar-width:thin;scrollbar-color:#3a445a transparent}
.wd-head{margin:calc(var(--u) * 4) 0 0;font-family:Mitr,sans-serif;font-weight:500;font-size:max(20px,calc(var(--u) * 20));color:var(--hd-cream)}
.wd-head small{font-weight:400;font-size:max(18px,calc(var(--u) * 18));color:var(--mute);margin-left:8px}
.wd-show,.wd-chs,.wd-reset{display:flex;flex-wrap:wrap;gap:6px calc(var(--u) * 4)}
/* a slanted tag: the slant is painted behind, so text and focus ring stay straight */
.wd .wd-tag{position:relative;isolation:isolate;display:flex;align-items:center;gap:8px;min-height:max(44px,calc(var(--u) * 44));padding:0 calc(var(--u) * 18);background:none;color:var(--hd-cream);font-family:Mitr,sans-serif;font-size:max(18px,calc(var(--u) * 18));white-space:nowrap}
.wd .wd-tag::before{content:"";position:absolute;inset:3px 0;z-index:-1;background:rgba(255,255,255,.08);transform:skewX(-12deg);border-radius:5px}
.wd .wd-tag:hover:not(:disabled):not([aria-pressed="true"])::before{background:rgba(255,255,255,.16)}
.wd .wd-tag[aria-pressed="true"]{color:var(--hd-cocoa)}
.wd .wd-tag[aria-pressed="true"]::before{background:var(--hd-cream)}
.wd .wd-tag:disabled{opacity:.4;cursor:default}
.wd-dia{flex:none;width:18px;height:18px;clip-path:var(--hd-dia);background:var(--c,#6a7386)}
.wd-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.wd .wd-item{display:flex;align-items:center;gap:calc(var(--u) * 12);width:100%;min-height:max(52px,calc(var(--u) * 52));padding:4px calc(var(--u) * 14);border-radius:10px;background:rgba(255,255,255,.045);color:var(--text);text-align:left;line-height:1.35}
.wd .wd-item:hover{background:rgba(255,255,255,.1)}
.wd-item span{display:flex;flex-direction:column;min-width:0}
.wd-item b{font-family:Mitr,sans-serif;font-weight:500;font-size:max(18px,calc(var(--u) * 18))}
.wd-item small{color:var(--mute);font-size:max(18px,calc(var(--u) * 18))}
.wd .wd-item[data-locked] b{color:var(--mute)}
.wd .wd-item[aria-pressed="true"]{background:var(--hd-cream);color:var(--hd-cocoa)}
.wd .wd-item[aria-pressed="true"] b{color:var(--hd-cocoa)}
.wd .wd-item[aria-pressed="true"] small{color:var(--hd-cocoa2)}
.wd .wd-item[aria-pressed="true"] .wd-dia{background:var(--hd-cocoa)}
.wd-dyes{display:flex;flex-wrap:wrap;gap:2px}
.wd .wd-swatch{width:48px;height:48px;padding:0;display:grid;place-items:center;background:none}
.wd-swatch i{display:block;width:34px;height:34px;clip-path:var(--hd-dia);background:var(--c);transition:transform .14s}
.wd-swatch:hover i{transform:scale(1.14)}
/* the chosen dye: bigger, on a cream diamond */
.wd .wd-swatch[aria-pressed="true"]{background:var(--hd-cream);clip-path:var(--hd-dia)}
.wd .wd-swatch[aria-pressed="true"] i{transform:scale(.82)}
.wd-note{margin:0;align-self:center;color:var(--mute);font-size:max(18px,calc(var(--u) * 18))}
/* the fitting room takes the whole page: a large character on the left, the shelves on the right */
.inv.fitting{grid-template-columns:minmax(0,1fr);grid-template-areas:"me"}
.inv.fitting>.inv-bag,.inv.fitting>.inv-detail,.inv.fitting .inv-power,.inv.fitting .inv-ground{display:none}
.wd.fit{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
.wd button:focus-visible{outline:3px solid var(--hd-sun);outline-offset:1px}
.wd .wd-swatch[aria-pressed="true"]:focus-visible{clip-path:none;background:radial-gradient(closest-side,var(--hd-cream) 80%,transparent 82%)}
/* WARDROBE-SLOTS-01: the armour / fashion switch over the character, the fashion slots and the owned list. Classes start with dm- */
/* the switch has its own row over both slot columns, so it can never lie on a slot */
.inv-doll{grid-template-rows:auto minmax(0,1fr)}
.dm-switch{grid-column:1/-1;display:flex;justify-content:center;gap:calc(var(--u) * 4)}
.dm-tag{position:relative;isolation:isolate;min-height:max(44px,calc(var(--u) * 44));padding:0 calc(var(--u) * 20);background:none;border:0;color:var(--hd-cream);font-family:Mitr,sans-serif;font-size:max(18px,calc(var(--u) * 18))}
.dm-tag::before{content:"";position:absolute;inset:3px 0;z-index:-1;background:rgba(255,255,255,.1);transform:skewX(-12deg);border-radius:5px}
.dm-tag:hover:not([aria-pressed="true"])::before{background:rgba(255,255,255,.18)}
.dm-tag[aria-pressed="true"]{color:var(--hd-cocoa)}
.dm-tag[aria-pressed="true"]::before{background:var(--hd-cream)}
.dm-slot{display:flex;flex-direction:column;align-items:center;gap:2px;max-width:100%;padding:0;background:none;border:0;color:var(--text);line-height:1.3}
.dm-box{width:var(--box);height:var(--box);border-radius:calc(var(--u) * 13);background:rgba(255,255,255,.07);display:grid;place-items:center}
.dm-box .wd-dia{width:46%;height:auto;aspect-ratio:1}
/* a worn slot is a cream box, so a dark outfit colour still reads */
.dm-slot:not(.vacant) .dm-box{background:var(--hd-cream)}
.dm-slot:not(.vacant) small{color:var(--hd-cream)}
.dm-slot.vacant .dm-box{background:rgba(255,255,255,.04)}
.dm-slot.vacant .wd-dia{background:rgba(155,165,184,.4)}
.dm-slot small{font-size:max(18px,calc(var(--u) * 18));color:var(--mute);text-align:center}
.dm-slot:disabled{cursor:default;opacity:.7}
.inv-doll[data-doll="fashion"]{flex-basis:calc(var(--box) * 4.4)}
.inv-doll[data-doll="fashion"] .inv-col{width:calc(var(--box) + var(--u) * 54)}
.dm-shelf{display:flex;flex-direction:column;gap:calc(var(--u) * 6);padding:0 4px 4px;font-size:max(18px,calc(var(--u) * 18))}
.dm-shelf .wd-note{align-self:flex-start}
/* the list and tags look as on the dress-up view (the rules above are scoped to .wd) */
.dm-shelf .wd-tag{position:relative;isolation:isolate;display:flex;align-items:center;gap:8px;min-height:max(44px,calc(var(--u) * 44));padding:0 calc(var(--u) * 18);background:none;color:var(--hd-cream);font-family:Mitr,sans-serif;font-size:max(18px,calc(var(--u) * 18));white-space:nowrap}
.dm-shelf .wd-tag::before{content:"";position:absolute;inset:3px 0;z-index:-1;background:rgba(255,255,255,.08);transform:skewX(-12deg);border-radius:5px}
.dm-shelf .wd-tag:hover:not(:disabled)::before{background:rgba(255,255,255,.16)}
.dm-shelf .wd-tag:disabled{opacity:.4;cursor:default}
.dm-shelf .wd-item{display:flex;align-items:center;gap:calc(var(--u) * 12);width:100%;min-height:max(52px,calc(var(--u) * 52));padding:4px calc(var(--u) * 14);border-radius:10px;background:rgba(255,255,255,.045);color:var(--text);text-align:left;line-height:1.35}
.dm-shelf .wd-item:hover{background:rgba(255,255,255,.1)}
.dm-shelf .wd-item span{display:flex;flex-direction:column;min-width:0}
.dm-shelf .wd-item b{font-family:Mitr,sans-serif;font-weight:500;font-size:max(18px,calc(var(--u) * 18))}
.dm-shelf .wd-item small{color:var(--mute);font-size:max(18px,calc(var(--u) * 18))}
.dm-shelf .wd-item[aria-pressed="true"]{background:var(--hd-cream);color:var(--hd-cocoa)}
.dm-shelf .wd-item[aria-pressed="true"] b{color:var(--hd-cocoa)}
.dm-shelf .wd-item[aria-pressed="true"] small{color:var(--hd-cocoa2)}
.dm-shelf .wd-item[aria-pressed="true"] .wd-dia{background:var(--hd-cocoa)}
.dm-tag:focus-visible,.dm-slot:focus-visible,.dm-shelf button:focus-visible{outline:3px solid var(--hd-sun);outline-offset:1px}
@media (max-height:520px) and (min-width:761px){
  .dm-shelf{flex:1 1 0;min-width:0;overflow:auto;font-size:14px}
  .dm-tag,.dm-slot small,.dm-shelf .wd-tag,.dm-shelf .wd-item b,.dm-shelf .wd-item small,.dm-shelf .wd-note,.dm-shelf .wd-head,.dm-shelf .wd-head small{font-size:13px}
  .inv-doll[data-doll="fashion"]{flex:1.35 1 0}.inv-doll[data-doll="fashion"] .inv-col{width:76px;gap:8px}
  .dm-tag{padding:0 14px}
}
@media (max-width:1100px){.wd,.wd.fit{grid-template-columns:minmax(0,1fr)}.wd-side{overflow:visible}.wd-stagewrap{min-height:300px}}
@media (max-height:520px) and (min-width:761px){.wd{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);font-size:14px}.wd-stagewrap{min-height:0}}

/* WEAPON-SKIN-02: skin items. A gold edge and a slanted cream "สกิน" tag in the bag, so a skin never reads as a weapon */
.inv button.inv-cell.skin{border-color:#d9b25a;background:var(--plate,none),linear-gradient(165deg,#4a3d2a,#2a2433 74%)}
.inv .inv-cell.skin::before{content:"สกิน";position:absolute;right:2px;bottom:2px;z-index:2;padding:0 6px;font:700 11px/16px inherit;font-family:inherit;color:#3a2a1e;background:#f1e3c4;transform:skewX(-14deg);pointer-events:none}
.ws-shelf .wd-item .item-img{width:40px;height:40px;flex:none}
.ws-slot .dm-box .item-img{width:100%;height:100%;object-fit:contain}
