/* =============================================================================
   x-studio.css · Look Studio (site/studio.html) · Agent B
   Builds on site.css tokens (--bg --ink --brass --rose --plum … --bulb --bulb-glow --bulb-on).
   Illustrations keep their own plum ink (--xs-ink) so they read on every theme.
   ============================================================================= */
.xs {
  --xs-ink: #3a2433;
  --xs-brass: var(--brass);
  --xs-lip: var(--rose);
  --xs-garment: var(--plum-2);
  --xs-frame: linear-gradient(160deg, var(--brass-2), var(--brass) 40%, var(--brass-3) 70%, var(--brass-2));
  --xs-mirror-in: radial-gradient(ellipse 70% 60% at 50% 38%, #ffffff, color-mix(in srgb, var(--bg-2) 85%, var(--blush)) 55%, var(--bg-3));
}
html[data-part="evening"] .xs { --xs-mirror-in: radial-gradient(ellipse 70% 60% at 50% 38%, #fff8ee, #fbe9da 55%, #efd3c3); }
html[data-part="closed"] .xs { --xs-mirror-in: radial-gradient(ellipse 70% 60% at 50% 40%, #3a2840, #24172a 60%, #170d1a); --xs-garment: #5c3a62; }

/* ---------------------------------------------------------------- hero */
.xs-hero { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 52px) 0 clamp(16px, 2.4vw, 26px);
  background: radial-gradient(ellipse 60% 80% at 85% 10%, var(--glow), transparent 70%), linear-gradient(180deg, var(--sky-1), var(--bg)); }
.xs-hero-strands { position: absolute; inset: 0; opacity: .55; pointer-events: none; }
.xs-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 28px 56px; align-items: end; }
.xs-hero h1 { margin-bottom: .25em; font-size: clamp(2.3rem, 4.4vw, 3.9rem); }
.xs-hero .lede { margin-bottom: 18px; font-size: clamp(1rem, 1.2vw, 1.1rem); }
.xs-hero-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-hero-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: .86rem; color: var(--ink-2); }
.xs-hero-steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cta); color: var(--cta-ink); font-size: .68rem; font-weight: 500; }
.xs-hero-tone { padding: 20px; }
.xs-tone-l { font: 600 .78rem/1.2 var(--f-sans); color: var(--ink-2); margin-bottom: 12px; }
.xs-tones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.xs-tone { display: grid; justify-items: center; gap: 6px; padding: 8px 2px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: .74rem; transition: border-color .2s, transform .2s; }
.xs-tone i { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.6), transparent 40%), var(--t); box-shadow: 0 0 0 1px var(--line-2), 0 6px 12px -6px rgba(0,0,0,.4); }
.xs-tone[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--ink); }
.xs-tone:hover { transform: translateY(-1px); }

/* ---------------------------------------------------------------- tabs */
.xs-studio { position: relative; padding: clamp(8px, 2vw, 18px) 0 clamp(40px, 6vw, 72px); }
.xs-tabs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; margin: 0 0 clamp(18px, 3vw, 30px);
  border-radius: 24px; background: linear-gradient(155deg, var(--glass-1), var(--glass-2)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-1);
  position: sticky; top: calc(var(--head-h) + 8px); z-index: 20; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.xs-tabs [role="tab"] { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 14px; border: 0; border-radius: 18px; background: transparent; color: var(--ink-2); text-align: left; transition: color .25s; }
.xs-tabs [role="tab"] b { display: block; font: 600 .98rem/1.15 var(--f-sans); }
.xs-tabs [role="tab"] small { display: block; font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.xs-tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.xs-tabs [role="tab"]:hover { color: var(--ink); }
.xs-tab-art { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--bg-3); color: var(--accent); }
.xs-tab-art svg { width: 26px; height: 26px; }
[aria-selected="true"] .xs-tab-art { background: var(--cta); color: var(--cta-ink); }
.xs-tabs-ink { position: absolute; z-index: 0; left: 0; top: 6px; bottom: 6px; border-radius: 18px; background: var(--card-solid); box-shadow: var(--shadow-1);
  transition: transform .45s var(--ease), width .45s var(--ease); }

/* ---------------------------------------------------------------- panel layout */
.xs-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 3.4vw, 48px); align-items: start; outline: none; }
.xs-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 20px; }
.xs-stage-col { position: sticky; top: calc(var(--head-h) + 96px); }
.xs-ctrl-col { display: grid; gap: 18px; min-width: 0; }

/* ---------------------------------------------------------------- the vanity mirror stage */
.xs-mirror { position: relative; margin: 0 auto; width: min(100%, 470px); aspect-ratio: 3 / 4; isolation: isolate; overflow: hidden;
  border-radius: 50% 50% 28px 28px / 37.5% 37.5% 28px 28px; background: var(--xs-mirror-in);
  box-shadow: 0 0 0 9px color-mix(in srgb, var(--brass) 70%, var(--bg-2)), 0 0 0 10px var(--brass-3), 0 0 0 11px color-mix(in srgb, var(--brass-2) 60%, transparent),
              0 0 80px 10px var(--glow), var(--shadow-2); }
.xs-mirror::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(118deg, transparent 38%, rgba(255,255,255,.28) 46%, transparent 54%), radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,.35), transparent 60%); mix-blend-mode: soft-light; }
html[data-part="closed"] .xs-mirror::before { opacity: .35; }
.xs-stage { position: absolute; inset: 6% 4% 12%; width: 92%; height: 82%; display: block; overflow: visible; }
.xs-mirror-hand .xs-stage { inset: 5% 3% 13%; width: 94%; }
.xs-mirror-brow { aspect-ratio: 3 / 3.2; border-radius: 50% 50% 28px 28px / 46.9% 46.9% 28px 28px; }
.xs-mirror-brow .xs-stage { inset: 9% 5% 16%; width: 90%; height: 75%; }
.xs-bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.xs-bulbs i { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--bulb) 60%); opacity: calc(.35 + var(--bulb-on) * .65);
  box-shadow: 0 0 calc(4px + var(--bulb-on) * 14px) calc(var(--bulb-on) * 4px) var(--bulb-glow); animation: xsBulb 1.4s var(--ease) both; animation-delay: calc(var(--k) * 60ms); }
@keyframes xsBulb { from { opacity: 0; transform: scale(.4); } to { opacity: calc(.35 + var(--bulb-on) * .65); transform: none; } }
.xs-cap { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); z-index: 4; max-width: 88%; width: max-content;
  padding: 8px 14px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: .82rem; line-height: 1.3; color: var(--ink-2); text-align: center; }
.xs-cap b { color: var(--ink); font-weight: 600; }
.xs-cap-k { font: 500 .66rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.xs-cap-split { display: flex; align-items: center; gap: 12px; }
.xs-cap-mid { display: inline-flex; align-items: center; gap: 6px; }
.xs-cap-mid i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px var(--line-2); }

/* live swap animations (stages only — never the off-screen share host) */
.xs-stage .xs-hair-front, .xs-stage .xs-hair-back { animation: xsHair .55s var(--ease) both; }
.xs-stage .xs-brows { animation: xsFade .45s var(--ease) both; }
@keyframes xsHair { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes xsFade { from { opacity: 0; } to { opacity: 1; } }
.xs-morph .xs-face { animation: xsMorph .6s var(--ease) both; transform-origin: 150px 170px; }
@keyframes xsMorph { from { transform: scale(.94); opacity: .4; } to { transform: none; opacity: 1; } }
.xs-mirror-hand .xs-stage > g[transform] { animation: xsFade .35s var(--ease) both; }

/* before / after */
.xs-mirror-split .xs-stage { cursor: ew-resize; touch-action: pan-y; }
.xs-ba { position: absolute; top: 18%; z-index: 4; font: 500 .66rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 6px 9px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); color: var(--ink-2); }
.xs-ba-l { left: 7%; } .xs-ba-r { right: 7%; color: var(--accent); }
.xs-split-ctl { display: flex; align-items: center; gap: 12px; width: min(100%, 470px); margin: 22px auto 0; padding: 8px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink-3); }
.xs-split-ctl input { flex: 1; accent-color: var(--accent); min-height: 30px; }

/* ---------------------------------------------------------------- control blocks */
.xs-block { padding: clamp(18px, 2.4vw, 26px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-width: 0; }
.xs-result { background: linear-gradient(160deg, var(--glass-1), var(--glass-2)); box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-1); }
.xs-h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); margin: 0 0 .25em; }
.xs-h4 { font: 600 .74rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.xs-h4 small { font: 500 .78rem/1.2 var(--f-sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.xs-sub { margin: 0 0 6px; font-size: .94rem; }
.xs-muted { color: var(--ink-2); font-size: .94rem; }
.xs-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xs-eyebrow { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.xs-result h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); margin-bottom: .3em; }
.xs-why, .xs-avoid { display: flex; gap: 10px; font-size: .93rem; margin: 10px 0; color: var(--ink-2); }
.xs-why i { color: var(--accent); } .xs-avoid i { color: var(--ink-3); }
.xs-link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
html[data-part="closed"] .xs-link { color: var(--brass-2); }

/* segmented radios (aria-checked) */
.xs-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 18px; background: var(--bg-3); border: 1px solid var(--line); max-width: 100%; }
.xs-seg > button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 14px; font: 500 .87rem/1.1 var(--f-sans); color: var(--ink-2); transition: background-color .2s, color .2s; }
.xs-seg > button:hover { color: var(--ink); }
.xs-seg > button[aria-checked="true"] { background: var(--card-solid); color: var(--ink); box-shadow: var(--shadow-1); }
.xs-seg > button[disabled] { opacity: .45; cursor: not-allowed; }
.xs-seg-sm > button { min-height: 30px; padding: 0 11px; font-size: .8rem; }
.xs-gseg > button { min-width: 64px; }

/* quiz */
.xs-quiz-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.xs-meter { --p: 0; flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xs-meter i { display: block; height: 100%; width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--brass), var(--rose)); transition: width .5s var(--ease); }
.xs-quiz { display: grid; gap: 4px; }
.xs-q { border: 0; padding: 10px 0 4px; margin: 0; min-width: 0; }
.xs-q legend { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.xs-qn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); font: 500 .7rem/1 var(--f-mono); color: var(--ink-3); }
.xs-qa { display: flex; flex-wrap: wrap; gap: 6px; }
.xs-opt { position: relative; }
.xs-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.xs-opt span { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--card-solid); font-size: .88rem; color: var(--ink-2); transition: background-color .2s, color .2s, border-color .2s; }
.xs-opt input:checked + span { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.xs-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.xs-opt:hover span { border-color: var(--ink-3); }
.xs-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.xs-or::before, .xs-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.xs-shapes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.xs-shape { display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink-2); font-size: .78rem; transition: border-color .2s, transform .2s, color .2s; }
.xs-shape svg { width: 30px; height: 40px; color: var(--plum-3); }
html[data-part="closed"] .xs-shape svg { color: var(--rose-2); }
.xs-shape:hover { transform: translateY(-2px); color: var(--ink); }
.xs-shape[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 10px 22px -14px var(--accent); color: var(--ink); }

/* face result */
.xs-res-head { display: flex; gap: 16px; align-items: flex-start; }
.xs-res-icon { flex: none; width: 58px; height: 74px; display: grid; place-items: center; border-radius: 18px; background: var(--bg-3); color: var(--accent); }
.xs-res-icon svg { width: 34px; height: 46px; }
.xs-cuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.xs-cut { display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card-solid); font-size: .82rem; line-height: 1.25; color: var(--ink-2); text-align: center; transition: transform .25s var(--ease), border-color .2s, box-shadow .2s; }
.xs-cut svg { width: 100%; aspect-ratio: 4 / 5; height: auto; border-radius: 12px; background: var(--xs-mirror-in); --xs-ink: #3a2433; }
.xs-cut:hover { transform: translateY(-2px); }
.xs-cut[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 14px 28px -18px var(--accent); color: var(--ink); font-weight: 600; }
.xs-detail { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.xs-detail h4 { font-size: 1.15rem; margin-bottom: .3em; }
.xs-detail > p { color: var(--ink-2); font-size: .94rem; }
.xs-maint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 12px 0; font-size: .86rem; }
.xs-maint > span { font: 500 .7rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.xs-maint > i { width: 22px; height: 6px; border-radius: 4px; background: var(--line-2); }
.xs-maint > i.on { background: linear-gradient(90deg, var(--brass), var(--rose)); }
.xs-maint > b { font-weight: 600; margin-left: 4px; }
.xs-maint > em { font-style: normal; color: var(--ink-2); }
.xs-beardb { font-size: .82rem !important; }
.xs-beardb i { color: var(--accent); }

/* estimate */
.xs-level { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 14px 0 8px; font-size: .84rem; color: var(--ink-3); }
.xs-est { list-style: none; margin: 8px 0 6px; padding: 0; border-radius: 16px; border: 1px solid var(--line); background: var(--card-solid); overflow: hidden; }
.xs-est li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.xs-est li:last-child { border-bottom: 0; }
.xs-est li span small { display: block; font: 500 .72rem/1.3 var(--f-mono); color: var(--ink-3); }
.xs-est-tot { background: var(--bg-3); font-weight: 600; }
.xs-est-tot b { font-size: 1.1rem; }
.xs-mono { font-family: var(--f-mono); font-feature-settings: "tnum"; white-space: nowrap; }
.xs-fine { font-size: .78rem; color: var(--ink-3); margin: 6px 0 0; }
.xs-inc-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.xs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 99px; font: 600 .92rem/1 var(--f-sans); border: 1px solid transparent; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s; }
.xs-btn:hover { transform: translateY(-1px); }
.xs-btn-solid { background: var(--cta); color: var(--cta-ink); box-shadow: 0 10px 22px -14px var(--cta); }
.xs-btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.xs-btn-ghost:hover { border-color: var(--ink); }
.xs-btn-sm { min-height: 34px; padding: 0 14px; font-size: .82rem; }
.xs-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card-solid); color: var(--ink); transition: transform .2s, border-color .2s; }
.xs-icon-btn:hover { transform: translateY(-1px); border-color: var(--ink-3); }

/* patch note */
.xs-patch { display: flex; gap: 12px; padding: 12px 14px; margin: 12px 0; border-radius: 16px; font-size: .88rem; line-height: 1.5;
  background: color-mix(in srgb, var(--rose) 9%, transparent); border: 1px solid color-mix(in srgb, var(--rose) 28%, transparent); color: var(--ink-2); }
.xs-patch > i { color: var(--rose); font-size: 1.2rem; }
html[data-part="closed"] .xs-patch > i { color: var(--rose-2); }
.xs-patch b { color: var(--ink); }

/* colour controls */
.xs-techs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.xs-tech { display: grid; gap: 3px; padding: 8px 8px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink-2); text-align: left; transition: border-color .2s, transform .2s; }
.xs-tech b { font-size: .88rem; color: var(--ink); font-weight: 600; }
.xs-tech small { font-size: .72rem; color: var(--ink-3); line-height: 1.25; }
.xs-tech:hover { transform: translateY(-2px); }
.xs-tech[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.xs-tech-sw { height: 38px; border-radius: 10px; margin-bottom: 4px; }
.xs-t-global { background: linear-gradient(180deg, #5e3a1c, #a9713f 35%, #c48a52); }
.xs-t-balayage { background: linear-gradient(180deg, #130d0c, #251a17 30%, #a9713f 65%, #dcab70); }
.xs-t-highlights { background: repeating-linear-gradient(100deg, #251a17 0 6px, #dcab70 6px 8px, #251a17 8px 13px); }
.xs-t-rootshadow { background: linear-gradient(180deg, #130d0c, #251a17 14%, #a9713f 34%, #dcab70); }
.xs-shades { display: grid; gap: 12px; }
.xs-shgroup { display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: center; }
.xs-shg { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.xs-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-sw { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--card-solid); font-size: .8rem; color: var(--ink-2); transition: border-color .2s, transform .2s; }
.xs-sw i { width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 40%), repeating-linear-gradient(115deg, transparent 0 3px, rgba(255,255,255,.12) 3px 4px), linear-gradient(160deg, var(--c), var(--b) 45%, var(--a));
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 6px 12px -6px rgba(0,0,0,.45); }
.xs-sw:hover { transform: translateY(-1px); border-color: var(--line-2); }
.xs-sw[aria-checked="true"] { border-color: var(--accent); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--accent) inset; }

/* nails */
.xs-nrow { margin-top: 4px; }
.xs-nrow .xs-h4 { margin-top: 16px; }
.xs-nshapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.xs-ns { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-solid); font-size: .78rem; color: var(--ink-2); transition: border-color .2s, transform .2s; }
.xs-ns svg { width: 22px; height: 34px; color: var(--plum-3); }
html[data-part="closed"] .xs-ns svg { color: var(--rose-2); }
.xs-ns:hover { transform: translateY(-2px); }
.xs-ns[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--ink); font-weight: 600; }
.xs-ncols { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-nc { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card-solid); transition: transform .2s; }
.xs-nc i { width: 28px; height: 28px; border-radius: 45% 45% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 32% 25%, rgba(255,255,255,.7), transparent 38%), var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 5px 10px -5px rgba(0,0,0,.5); }
.xs-nc:hover { transform: translateY(-2px); }
.xs-nc[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.xs-seg-wrap { display: flex; }
.xs-checks { display: grid; gap: 8px; margin-top: 18px; }
.xs-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.xs-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

/* brows */
.xs-brows { display: grid; gap: 8px; margin-top: 10px; }
.xs-bw { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-solid); color: var(--ink-2); text-align: left; transition: border-color .2s, transform .2s; }
.xs-bw svg { width: 74px; height: 34px; flex: none; color: #3a2a24; background: var(--bg-3); border-radius: 10px; padding: 2px 6px; }
html[data-part="closed"] .xs-bw svg { color: #e9d5c8; }
.xs-bw span { display: grid; font-size: .92rem; }
.xs-bw em { font-style: normal; font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.xs-bw:hover { transform: translateX(2px); }
.xs-bw[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- look tray */
.xs-tray { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 66; width: min(1120px, calc(100vw - 24px));
  border-radius: 24px; background: linear-gradient(155deg, var(--glass-1), var(--glass-2)); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow-2); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  animation: xsTrayIn .45s var(--ease) both; }
@keyframes xsTrayIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.xs-tray.xs-pulse { animation: xsPulse .7s var(--ease); }
@keyframes xsPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-2); } 100% { box-shadow: 0 0 0 16px transparent, var(--shadow-2); } }
.xs-tray-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 10px 10px 16px; }
.xs-chip-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.xs-tray-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: 600 .74rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); flex: none; }
.xs-tray-toggle .xs-chev { display: none; }
.xs-tray-chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1 1 480px; }
.xs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 99px; background: var(--card-solid); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); max-width: 100%; }
.xs-chip > b { font: 600 .66rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.xs-chip > i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.xs-chip-x { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bg-3); color: var(--ink-2); padding: 0; flex: none; }
.xs-chip-x:hover { background: var(--line-2); color: var(--ink); }
.xs-tray-tot { display: grid; text-align: right; flex: none; line-height: 1.2; margin-left: auto; }
.xs-tray-tot b { font-size: 1.15rem; }
.xs-tray-tot span { font-size: .72rem; color: var(--ink-3); }
.xs-tray-act { display: flex; align-items: center; gap: 8px; flex: none; }
.xs-tray-book { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.xs-tray-note { font-size: .72rem; color: var(--ink-3); width: 100%; text-align: right; }
body.xs-has-tray .sa-foot { padding-bottom: 120px; }

/* ---------------------------------------------------------------- saved looks + notes */
.xs-saved-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 40px; align-items: end; margin-bottom: 22px; }
.xs-saved-head p { margin: 0; }
.xs-count { font-size: .5em; color: var(--ink-3); vertical-align: middle; }
.xs-saved { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.xs-saved-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.xs-saved-sw { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 46px; }
.xs-saved-sw i { width: 21px; height: 21px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); }
.xs-saved-sw i:only-child { width: 46px; height: 46px; grid-column: span 2; }
.xs-sw-empty { background: var(--bg-3); }
.xs-saved-body h4 { font-size: 1.05rem; margin-bottom: .2em; }
.xs-saved-body p { font-size: .84rem; color: var(--ink-2); margin: 0 0 4px; }
.xs-saved-meta { font-size: .76rem !important; color: var(--ink-3) !important; }
.xs-saved-act { display: grid; gap: 6px; justify-items: end; }
.xs-saved-act .xs-icon-btn { width: 34px; height: 34px; font-size: .85rem; }
.xs-empty { display: flex; gap: 10px; align-items: center; padding: 18px; border-radius: 18px; border: 1px dashed var(--line-2); grid-column: 1 / -1; }
.xs-empty i { color: var(--accent); font-size: 1.3rem; }
.xs-notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.xs-notes .card > i { font-size: 1.4rem; color: var(--accent); }
.xs-notes h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.xs-notes p { font-size: .92rem; }
.xs-share-host { position: absolute; left: -10000px; top: 0; width: 360px; height: 380px; overflow: hidden; pointer-events: none; }
.xs-share-host svg { width: 300px; height: 366px; }
.xs-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; padding: 12px 18px; border-radius: 14px; background: var(--plum); color: #fff; opacity: 0; transition: opacity .3s; }
.xs-toast.show { opacity: 1; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1060px) {
  .xs-panel { grid-template-columns: minmax(0, 1fr); }
  .xs-stage-col { position: relative; top: 0; }
  .xs-mirror { width: min(100%, 400px); }
  .xs-tray-chips { display: none; }
  .xs-tray.open .xs-tray-chips { display: flex; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); padding: 12px; border-radius: 20px; background: var(--card-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
  .xs-tray-toggle .xs-chev { display: inline-block; transition: transform .3s; }
  .xs-tray.open .xs-chev { transform: rotate(180deg); }
  .xs-tray-in { flex-wrap: nowrap; justify-content: space-between; }
  .xs-tray-tot { margin-left: 0; }
  .xs-tray-act { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  .xs-tray-book { min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .xs-tray-note { display: none; }
}
@media (min-width: 1061px) {
  .xs-tray { width: min(1080px, calc(100vw - 360px)); }
}
@media (max-width: 860px) {
  .xs-hero-in { grid-template-columns: minmax(0, 1fr); }
  .xs-saved-head { grid-template-columns: minmax(0, 1fr); }
  .xs-notes-grid { grid-template-columns: minmax(0, 1fr); }
  .xs-tabs [role="tab"] { flex-direction: column; gap: 4px; padding: 6px 4px; text-align: center; min-height: 64px; }
  .xs-tabs [role="tab"] small { display: none; }
  .xs-tabs [role="tab"] b { font-size: .8rem; }
  .xs-tab-art { width: 30px; height: 30px; }
  .xs-tab-art svg { width: 20px; height: 20px; }
}
@media (max-width: 620px) {
  .xs-shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xs-techs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xs-shgroup { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .xs-cuts { gap: 6px; }
  .xs-cut { font-size: .74rem; padding: 6px 5px 8px; }
  .xs-tray { bottom: 8px; border-radius: 20px; }
  .xs-tray-in { gap: 6px; padding: 7px 7px 7px 10px; }
  .xs-tray-toggle span { display: none; }
  .xs-tray-tot { text-align: left; }
  .xs-tray-tot b { font-size: 1rem; }
  .xs-tray-tot span { display: none; }
  .xs-tray-act { gap: 6px; }
  .xs-tray-book { flex: 1 1 auto; justify-content: flex-start; }
  .xs-tray-book .xs-btn { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: .82rem; }
  .xs-tray-act > .xs-icon-btn { width: 38px; height: 38px; }
  .xs-icon-btn { width: 42px; height: 42px; }
  .xs-hero-steps span { font-size: .8rem; }
  .xs-ba { top: 16%; }
  .xs-cap { font-size: .74rem; padding: 6px 11px; }
  .xs-cap-split { gap: 8px; }
  .xs-nshapes { gap: 4px; }
  .xs-ns { font-size: .7rem; }
  .xs-seg > button { padding: 0 11px; font-size: .82rem; }
  .xs-tabs { top: calc(var(--head-h) + 4px); border-radius: 20px; }
  body.xs-has-tray .sa-foot { padding-bottom: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .xs-stage .xs-hair-front, .xs-stage .xs-hair-back, .xs-stage .xs-brows, .xs-morph .xs-face, .xs-bulbs i, .xs-tray, .xs-tray.xs-pulse, .xs-mirror-hand .xs-stage > g[transform] { animation: none !important; }
  .xs-tabs-ink, .xs-meter i { transition: none; }
}
