/* A backstage wardrobe: smoked plum, warm paper and brass. All rules scoped. */
.saved-looks { margin-block-start:20px; border-top:1px solid #685348; padding-top:12px; }
.saved-looks summary { cursor:pointer; min-height:44px; padding:10px 0; color:#edc181; }
.saved-looks p { color:#c6b5a1; font-size:12px; margin:4px 0 10px; }
.saved-look-row { display:flex; gap:6px; margin-block:7px; flex-wrap:wrap; }
#dress .saved-look-row button { min-height:44px; padding:8px 12px; border:1px solid #685348; border-radius:8px; background:#302630; color:#f6e9d5; font-size:12px; }
#dress .saved-look-row button:disabled { opacity:.5; }
.wardrobe-ui, .wardrobe-launcher {
  --wardrobe-ink:#f6e9d5; --wardrobe-muted:#c6b5a1; --wardrobe-brass:#edc181;
  --wardrobe-line:#685348; --wardrobe-base:#201922; --wardrobe-card:#302630;
  font-family:Rubik,Assistant,"Segoe UI",sans-serif; color:var(--wardrobe-ink);
  direction:rtl; -webkit-tap-highlight-color:transparent;
}
.wardrobe-ui *, .wardrobe-launcher { box-sizing:border-box; }
.wardrobe-ui [hidden], .wardrobe-ui[hidden], .wardrobe-launcher[hidden] { display:none !important; }
.wardrobe-ui button, .wardrobe-launcher { touch-action:manipulation; cursor:pointer; font-family:inherit; }
.wardrobe-ui button:focus-visible, .wardrobe-launcher:focus-visible {
  outline:3px solid #ffe1a0 !important; outline-offset:3px;
}
#setup .picker.wardrobe-ui {
  display:block; width:min(470px,90vw); padding:14px; border:1px solid var(--wardrobe-line);
  border-radius:19px; background:linear-gradient(155deg,#322329ef,#1b1722f5);
  box-shadow:0 14px 36px #0004, inset 0 1px #fff1;
}
/* Keep the native intro canvas and #stage measurement contract. Only the
   controls scroll; name, the turntable's viewport and entry remain in place. */
body #setup.wardrobe-setup {
  display:grid; direction:ltr; grid-template-columns:minmax(0,1fr) minmax(350px,470px);
  grid-template-rows:auto 46px minmax(0,1fr) 48px auto;
  column-gap:clamp(26px,5vw,86px); row-gap:14px;
  padding-block:clamp(24px,calc((100dvh - 790px)/2),100px);
  padding-inline:clamp(24px,5vw,80px);
  align-items:stretch; justify-content:normal; text-align:right; overflow:hidden;
}
body #setup.wardrobe-setup > h1 {
  grid-column:2; grid-row:1; font-size:clamp(26px,2.5vw,34px); line-height:1.3;
  direction:rtl; text-align:right; align-self:end; color:#ffe4bf; opacity:1;
  text-shadow:0 2px 10px #000,0 0 calc(12px + 16px * var(--power,0)) #d99b4d80;
}
#setup.wardrobe-setup > #stage {
  grid-column:1; grid-row:1 / -1; position:relative; inset:auto;
  width:100%; height:min(640px,100%); min-width:0; align-self:center; justify-self:center;
}
#setup.wardrobe-setup > #nameIn {
  grid-column:2; grid-row:2; width:100%; height:46px; padding:10px 18px;
  border:1px solid #ffe7c44d; border-radius:12px; font-size:16px;
}
#setup.wardrobe-setup > #nameIn:focus-visible { outline:3px solid #edc181; outline-offset:3px; }
#setup.wardrobe-setup > .picker.wardrobe-ui {
  grid-column:2; grid-row:3; width:100%; min-height:0; overflow-y:auto; overflow-x:hidden;
  overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#a48562 #251c26;
  border-radius:16px; padding:14px; scroll-padding-top:76px;
}
#setup.wardrobe-setup .wardrobe-tabs {
  position:sticky; top:-14px; z-index:2; margin-block-end:16px;
  box-shadow:0 -14px 0 #251c26,0 5px 0 #251c26;
}
#setup.wardrobe-setup > #enter {
  grid-column:2; grid-row:4; width:100%; height:48px; min-height:44px; margin:0;
  border-radius:12px; padding:10px 24px; font-size:16px; align-self:stretch;
}
body #setup.wardrobe-setup > .hint {
  grid-column:2; grid-row:5; direction:rtl; font-size:11px; line-height:1.65;
  text-align:center; margin:0; color:#c7b5a0;
}
#setup.wardrobe-setup > #soundHint {
  grid-column:1; grid-row:5; justify-self:center; align-self:end; max-width:100%;
  margin:0; font-size:11px; direction:rtl; text-align:center;
}
@media (max-width:760px) and (orientation:portrait) {
  body #setup.wardrobe-setup {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto clamp(150px,27dvh,220px) 44px minmax(0,1fr) 46px auto;
    gap:8px; padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  }
  body #setup.wardrobe-setup > h1 { grid-column:1; grid-row:1; text-align:center; font-size:26px; }
  #setup.wardrobe-setup > #stage { grid-column:1; grid-row:2; width:100%; height:100%; }
  #setup.wardrobe-setup > #nameIn { grid-column:1; grid-row:3; height:44px; }
  #setup.wardrobe-setup > .picker.wardrobe-ui { grid-column:1; grid-row:4; padding:12px; }
  #setup.wardrobe-setup .wardrobe-tabs { top:-12px; }
  #setup.wardrobe-setup > #enter { grid-column:1; grid-row:5; height:46px; }
  body #setup.wardrobe-setup > .hint { grid-column:1; grid-row:6; font-size:10px; line-height:1.5; }
  #setup.wardrobe-setup > #soundHint { grid-column:1; grid-row:2; align-self:end; font-size:10px; padding:3px 10px; }
}
@media (max-height:540px) and (orientation:landscape) {
  body #setup.wardrobe-setup {
    grid-template-columns:minmax(0,1fr) minmax(300px,1fr); grid-template-rows:auto 44px minmax(0,1fr) 44px auto;
    gap:8px 22px; padding:12px max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  body #setup.wardrobe-setup > h1 { font-size:23px; }
  #setup.wardrobe-setup > #nameIn, #setup.wardrobe-setup > #enter { height:44px; }
  #setup.wardrobe-setup > .picker.wardrobe-ui { padding:10px; scroll-padding-top:70px; }
  #setup.wardrobe-setup .wardrobe-tabs { top:-10px; }
  body #setup.wardrobe-setup > .hint { font-size:10px; line-height:1.4; }
}
.wardrobe-ui .wardrobe-tabs {
  display:flex; gap:5px; padding:4px; border:1px solid #72574380;
  border-radius:12px; background:#130f17; margin-block-end:16px; width:100%;
}
.wardrobe-ui .wardrobe-tab, #dress.wardrobe-ui .wardrobe-tab {
  flex:1; min-width:44px; min-height:44px; padding:10px 14px; border:0; border-radius:8px;
  color:var(--wardrobe-muted); background:transparent; font-size:14px; font-weight:500;
}
.wardrobe-ui .wardrobe-tab[aria-selected="true"], #dress.wardrobe-ui .wardrobe-tab[aria-selected="true"] {
  color:#261a13; background:var(--wardrobe-brass); box-shadow:0 2px 8px #0004; font-weight:700;
}
.wardrobe-ui .wardrobe-panel { display:grid; gap:17px; min-width:0; }
#setup .picker.wardrobe-ui .wardrobe-field, body #dress.wardrobe-ui .wardrobe-field {
  display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap; justify-content:flex-start;
  gap:8px; width:100%; max-width:none; margin:0; min-width:0;
}
#setup .picker.wardrobe-ui .wardrobe-field[hidden], #dress.wardrobe-ui .wardrobe-field[hidden] { display:none; }
#setup .picker.wardrobe-ui .lbl, #dress.wardrobe-ui .lbl {
  flex:0 0 auto; width:auto; padding:0; font:500 12px/1.4 Rubik,Assistant,sans-serif;
  text-align:right; color:var(--wardrobe-muted);
}
/* Optional concert looks sit after the everyday clothing controls. */
#setup .picker.wardrobe-ui .stage-outfit-disclosure,
body #dress.wardrobe-ui .stage-outfit-disclosure {
  display:block; margin-block-start:16px; border-top:1px solid var(--wardrobe-line); padding-top:6px;
}
#setup .picker.wardrobe-ui .stage-outfit-disclosure > summary,
#dress.wardrobe-ui .stage-outfit-disclosure > summary {
  display:list-item; min-height:44px; padding:13px 0; cursor:pointer;
  touch-action:manipulation; font-weight:500;
}
.wardrobe-ui .stage-outfit-disclosure > summary:focus-visible {
  outline:3px solid #ffe1a0; outline-offset:3px; border-radius:4px;
}
.wardrobe-ui .stage-outfit-disclosure[open] > .wardrobe-options { margin-top:4px; }
.wardrobe-ui .wardrobe-options { display:flex; flex-wrap:wrap; gap:10px; min-width:0; }
.wardrobe-ui .wardrobe-options[data-look-key="outfit"] {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;
}
#setup .picker.wardrobe-ui .wardrobe-garment, #dress.wardrobe-ui .wardrobe-garment {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  width:100%; min-width:44px; min-height:86px; margin:0; padding:9px 5px;
  border:1px solid var(--wardrobe-line); border-radius:12px;
  background:var(--wardrobe-card); color:var(--wardrobe-ink); font-size:11.5px; line-height:1.35;
  position:relative; transition:background .15s,border-color .15s;
}
.wardrobe-garment svg { width:35px; height:37px; fill:currentColor; fill-opacity:.14; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.wardrobe-ui .wardrobe-option-name { overflow-wrap:anywhere; }
#setup .picker.wardrobe-ui .wardrobe-hair, #dress.wardrobe-ui .wardrobe-hair {
  min-width:44px; min-height:44px; margin:0; padding:9px 12px;
  border:1px solid var(--wardrobe-line); border-radius:10px; color:var(--wardrobe-ink);
  background:var(--wardrobe-card); font-size:12px; line-height:1.4;
}
#setup .picker.wardrobe-ui .wardrobe-garment[aria-pressed="true"],
#dress.wardrobe-ui .wardrobe-garment[aria-pressed="true"],
#setup .picker.wardrobe-ui .wardrobe-hair[aria-pressed="true"],
#dress.wardrobe-ui .wardrobe-hair[aria-pressed="true"] {
  color:#fff0d2; background:#584031; border-color:var(--wardrobe-brass); box-shadow:inset 0 0 0 1px var(--wardrobe-brass);
}
.wardrobe-garment[aria-pressed="true"]::after { content:'✓'; position:absolute; inset-inline-end:6px; top:4px; font-size:12px; color:#ffe2a7; }
#setup .picker.wardrobe-ui .wardrobe-swatch, #dress.wardrobe-ui .wardrobe-swatch {
  position:relative; flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px;
  margin:0; padding:0; border:2px solid #decab060; border-radius:50%; transform:none;
  box-shadow:inset 0 0 0 1px #0004; transition:box-shadow .15s;
}
#setup .picker.wardrobe-ui .wardrobe-swatch[aria-pressed="true"],
#dress.wardrobe-ui .wardrobe-swatch[aria-pressed="true"] {
  outline:2px solid var(--wardrobe-brass); outline-offset:3px; box-shadow:inset 0 0 0 1px #0004;
}
.wardrobe-swatch[aria-pressed="true"]::after {
  content:'✓'; position:absolute; bottom:-3px; inset-inline-end:-4px; width:18px; height:18px;
  display:grid; place-items:center; border-radius:50%; background:#f7d69e; color:#281c14;
  font:700 12px/1 sans-serif; box-shadow:0 0 0 2px var(--wardrobe-base);
}
.wardrobe-ui .wardrobe-options[data-look-key="eye"] .wardrobe-swatch {
  border:6px solid #f7ead8 !important;
  box-shadow:inset 0 0 0 8px var(--iris),inset 0 0 0 18px #17131d !important;
}
.wardrobe-launcher {
  /* Left HUD also has #where and #recsBtn; keep their expanding panel clear. */
  position:fixed; z-index:29; right:max(14px,env(safe-area-inset-right));
  top:calc(max(14px,env(safe-area-inset-top)) + 108px);
  display:flex; align-items:center; justify-content:center; gap:7px;
  min-width:44px; min-height:44px; padding:8px 13px; border:1px solid #b18c58; border-radius:999px;
  background:linear-gradient(135deg,#3d2c25f5,#221a22fa); color:#ffe1ae; font-size:12px; font-weight:600;
  box-shadow:0 5px 18px #0006,inset 0 1px #ffe2aa20; pointer-events:auto;
}
.wardrobe-launcher svg { width:22px; height:24px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
body #dress.wardrobe-editor {
  --wardrobe-edge:16px;
  --wardrobe-left:max(var(--wardrobe-edge),env(safe-area-inset-left));
  --wardrobe-right:max(var(--wardrobe-edge),env(safe-area-inset-right));
  --wardrobe-top:max(var(--wardrobe-edge),env(safe-area-inset-top));
  --wardrobe-bottom:max(var(--wardrobe-edge),env(safe-area-inset-bottom));
  position:fixed; z-index:65; inset:var(--wardrobe-top) var(--wardrobe-right) var(--wardrobe-bottom) var(--wardrobe-left);
  margin:auto; transform:none;
  display:flex; flex-direction:column; gap:16px; width:min(850px,calc(100vw - var(--wardrobe-left) - var(--wardrobe-right)));
  height:min(700px,calc(100dvh - var(--wardrobe-top) - var(--wardrobe-bottom))); max-width:none; max-height:none;
  padding:22px; overflow:hidden; border-radius:22px; border:1px solid #897054;
  background:radial-gradient(ellipse at 10% 10%,#49332b70,transparent 65%),#201922;
  color:var(--wardrobe-ink); text-align:right; opacity:1; pointer-events:auto; transition:none;
  box-shadow:0 0 0 100vmax #0b080dbd,0 25px 90px #0009,inset 0 1px #fff1;
}
.wardrobe-head { flex:0 0 auto; }
.wardrobe-eyebrow { display:block; margin-bottom:5px; font-size:11px; color:var(--wardrobe-brass); }
.wardrobe-title { margin:0; font-size:24px; line-height:1.2; font-weight:600; }
.wardrobe-editor-body {
  display:grid; grid-template-columns:minmax(0,1.35fr) minmax(220px,1fr); gap:22px;
  flex:1; min-height:0; min-width:0;
}
.wardrobe-controls { grid-column:1; grid-row:1; overflow:auto; min-width:0; min-height:0; padding:4px 6px 8px; overscroll-behavior:contain; scrollbar-color:#88705c #211a24; scrollbar-width:thin; }
.wardrobe-controls .wardrobe-tabs { position:sticky; top:-4px; z-index:2; box-shadow:0 5px 0 var(--wardrobe-base); }
.wardrobe-preview-panel { grid-column:2; grid-row:1; min-height:0; min-width:0; display:flex; align-items:center; }
#wardrobePreview.wardrobe-preview {
  position:relative; isolation:isolate; width:100%; height:min(360px,100%); min-height:220px;
  border:1px solid #715344; border-radius:80px 80px 18px 18px; overflow:hidden;
  background:radial-gradient(ellipse at 50% 68%,#a876392d,transparent 65%),repeating-radial-gradient(ellipse at 50% 100%,transparent 0 22px,#b58a5820 23px 24px),#17141d;
  touch-action:pan-y;
}
#wardrobePreview.wardrobe-preview canvas { display:block; width:100%; height:100%; border-radius:inherit; touch-action:none; }
#wardrobePreview.wardrobe-preview canvas:focus-visible { outline:3px solid #ffe1a0; outline-offset:-4px; }
.wardrobe-footer { flex:0 0 auto; display:flex; justify-content:flex-end; padding-top:10px; border-top:1px solid #71534480; }
#dress.wardrobe-editor .wardrobe-done {
  display:block; min-width:110px; min-height:44px; margin:0; padding:10px 24px; border:0; border-radius:12px;
  background:var(--wardrobe-brass); color:#281d16; font:600 14px Rubik,Assistant,sans-serif;
}
@media (hover:hover) {
  .wardrobe-launcher:hover { background:#543d2f; }
  .wardrobe-ui .wardrobe-tab:hover, #dress.wardrobe-ui .wardrobe-tab:hover { color:#fff0d2; }
  .wardrobe-ui .wardrobe-tab[aria-selected="true"]:hover, #dress.wardrobe-ui .wardrobe-tab[aria-selected="true"]:hover { color:#261a13; }
  #setup .picker.wardrobe-ui .wardrobe-garment:hover, #dress.wardrobe-ui .wardrobe-garment:hover,
  #setup .picker.wardrobe-ui .wardrobe-hair:hover, #dress.wardrobe-ui .wardrobe-hair:hover { border-color:#e1b780; }
}
@media (max-width:600px) {
  #setup .picker.wardrobe-ui { padding:11px; }
  .wardrobe-ui .wardrobe-options { gap:9px; }
  body #dress.wardrobe-editor { --wardrobe-edge:10px; height:calc(100dvh - var(--wardrobe-top) - var(--wardrobe-bottom)); padding:14px; gap:10px; border-radius:18px; }
  .wardrobe-title { font-size:20px; }
  .wardrobe-editor-body { display:flex; flex-direction:column; gap:10px; }
  .wardrobe-preview-panel { flex:0 0 220px; }
  #wardrobePreview.wardrobe-preview { height:220px; min-height:220px; border-radius:32px 32px 14px 14px; }
  .wardrobe-controls { flex:1; padding:4px 5px 8px; }
  .wardrobe-controls .wardrobe-tabs { margin-bottom:12px; }
  .wardrobe-footer { padding-top:8px; }
  #dress.wardrobe-editor .wardrobe-done { width:100%; }
}
@media (max-height:540px) and (orientation:landscape) {
  body #dress.wardrobe-editor { --wardrobe-edge:10px; height:calc(100dvh - var(--wardrobe-top) - var(--wardrobe-bottom)); padding:12px 18px; gap:8px; }
  .wardrobe-head { display:flex; align-items:baseline; gap:10px; }
  .wardrobe-title { font-size:20px; }
  .wardrobe-eyebrow { margin:0; }
  .wardrobe-editor-body { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(140px,1fr); gap:12px; }
  .wardrobe-preview-panel { grid-column:2; grid-row:1; min-height:0; }
  #wardrobePreview.wardrobe-preview { min-height:0; height:100%; border-radius:32px 32px 14px 14px; }
  .wardrobe-controls { scroll-padding-top:70px; }
  .wardrobe-controls .wardrobe-options button { scroll-margin-top:70px; }
  .wardrobe-ui .wardrobe-tab, #dress.wardrobe-ui .wardrobe-tab { padding:8px 6px; font-size:12px; }
  .wardrobe-footer { padding-top:6px; }
}
@media (prefers-reduced-motion:reduce) {
  .wardrobe-ui *, .wardrobe-launcher { transition:none !important; animation:none !important; }
}
@media (forced-colors:active) {
  .wardrobe-ui .wardrobe-swatch { forced-color-adjust:none; }
  .wardrobe-ui button[aria-pressed="true"], .wardrobe-ui [aria-selected="true"] { outline:3px solid Highlight !important; }
}

.style-options{width:100%;display:grid;gap:18px}.style-choice>span{display:block;color:#c2afb8;font-size:12px;margin-bottom:7px}.style-choice>div{display:flex;flex-wrap:wrap;gap:7px}.style-chip{display:flex;align-items:center;gap:7px;min-height:42px;border:1px solid #68535f;border-radius:14px;background:#29212c;color:#f9e8d9;padding:8px 12px;cursor:pointer}.style-chip[aria-pressed=true]{border-color:#ffbc9e;background:#553745;box-shadow:0 0 0 1px #ffbc9e}.style-chip i{width:24px;height:24px;border-radius:50%;box-shadow:inset 0 0 0 1px #ffffff50}.style-chip:focus-visible{outline:2px solid #ffe2ae;outline-offset:3px}.wardrobe-tab{min-height:42px}
