/* ============================================================
   BEDAZZLE — Virtual Wardrobe (/try) interactive mock
   ============================================================ */

.try-body { background: var(--bg); }

/* Free-test counter under the Generate button */
.free-tests { text-align: center; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ink-soft); min-height: 16px; }
.free-tests.is-out { color: var(--sage, var(--ink)); }

/* ---------- App header ---------- */
.try-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.try-header__inner {
  padding: 0 clamp(16px, 2vw, 32px);
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.try-header .wordmark { font-size: 18px; }
.try-breadcrumb { font-size: 13px; color: var(--ink-mute); letter-spacing: .04em; }
.try-breadcrumb::before { content: "/"; margin-right: 14px; color: var(--line-strong); }
.try-header__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.try-back { font-size: 13px; color: var(--ink-soft); }
.try-back:hover { color: var(--ink); }

/* ---------- App shell ---------- */
.try-app {
  padding: 22px clamp(16px, 2vw, 32px) 48px;
  display: flex; flex-direction: column; gap: 20px;
  overflow-x: clip; /* contain the alts bar's slide-in-from-right */
  min-height: calc(100vh - 64px);
}

/* ---------- Model selector ---------- */
.try-models__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.try-models__hint { font-size: 13px; color: var(--ink-soft); }
.model-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.model-card {
  flex: none; width: 88px; text-align: center; background: none; border: none; padding: 0; cursor: pointer;
}
.model-card__img {
  width: 88px; height: 110px; border-radius: var(--r-md); overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2);
  transition: border-color .2s, transform .2s;
}
.model-card__img img { width: 100%; height: 100%; object-fit: cover; }
.model-card:hover .model-card__img { transform: translateY(-2px); }
.model-card.is-active .model-card__img { border-color: var(--ink); }
.model-card__name { display: block; font-size: 12px; font-weight: 600; margin-top: 7px; }
.model-card--upload .model-card__img {
  display: grid; place-items: center; color: var(--ink-mute);
  border: 2px dashed var(--line-strong); background: var(--surface);
}

/* ---------- Stage ---------- */
.try-stage {
  height: calc(100vh - 134px); min-height: 0;
  display: flex; justify-content: center; align-items: stretch; gap: clamp(16px, 2vw, 28px);
}

/* Slots */
.try-slots {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px;
  flex: none; width: 320px;
  display: flex; flex-direction: column; gap: 14px; min-height: 0;
}
.try-slots__head { display: flex; align-items: center; justify-content: space-between; }
.try-total { font-size: 13px; font-weight: 700; }
/* Moodboard grid: filled items = big image tiles (2 per row); empties = compact "+" tiles */
.slot-list {
  display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
  overflow-y: auto; flex: 1 1 auto; min-height: 0;
  /* headroom so a tile's hover lift + shadow isn't clipped by the scroll container (pulled back with negative margins so layout is unchanged) */
  padding: 6px 6px 2px 6px; margin: -6px -4px 0 -6px;
}
.slot-break { flex-basis: 100%; height: 0; }
.slot-wrap--tile { position: relative; width: calc(50% - 5px); }
.slot--tile {
  display: flex; flex-direction: column; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 15px; overflow: hidden; cursor: pointer; padding: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.slot--tile:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.slot--tile.is-selected { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,17,13,.08); }
.slot__img { display: block; width: 100%; aspect-ratio: 3 / 4; background: var(--surface-2); }
.slot__img img { width: 100%; height: 100%; object-fit: cover; }
.slot__cap { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 11px; min-width: 0; }
.slot__slot { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.slot__name { font-size: 13px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__meta { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot--add {
  width: calc(33.333% - 6.67px); aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed var(--line-strong); border-radius: 14px;
  background: transparent; color: var(--ink-mute); cursor: pointer; padding: 6px;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.slot--add:hover { border-color: var(--ink); color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); transform: translateY(-2px); }
.slot__add-icon { display: grid; place-items: center; }
.slot__add-label { font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; text-align: center; line-height: 1.1; }
.slot-wrap--tile .slot-hide { top: 8px; right: 8px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(5px); }

/* Hover preview: a bigger picture of the original slot item (desktop only) */
.slot-preview {
  position: fixed; z-index: 200; width: 320px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; transform: translateX(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out);
}
.slot-preview__name { display: block; font-size: 14px; }
.slot-preview__meta { display: block; font-size: 13px; }

/* Magnifier loupe over the preview image */
.preview-loupe {
  position: absolute; width: 184px; height: 184px; border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 12px 32px rgba(0,0,0,.24), 0 0 0 1px rgba(0,0,0,.06), inset 0 0 0 1px rgba(255,255,255,.25);
  background-repeat: no-repeat; pointer-events: none; z-index: 8;
  opacity: 0; transition: opacity .14s var(--ease-out);
}
.preview-loupe.is-on { opacity: 1; }
.slot-preview.is-show { opacity: 1; transform: none; }
.slot-preview img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.slot-preview__cap { padding: 10px 12px 12px; }
.slot-preview__name { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.slot-preview__meta { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* Recreate-look hover preview — same card, pops to the RIGHT (slides in from the left edge) */
.alt-preview {
  position: fixed; z-index: 200; width: 290px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; transform: translateX(8px) scale(.98); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out);
}
.alt-preview.is-show { opacity: 1; transform: none; }
.alt-preview img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 42%; background: var(--surface-2); }
.alt-preview__cap { padding: 10px 12px 12px; }
.alt-preview__name { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.alt-preview__meta { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.slot__add { flex: none; color: var(--ink-mute); }

/* Preview */
.try-preview { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; height: 100%; }
.preview-frame {
  position: relative; flex: none;
  /* Fill the browser height (minus header/bar/button/padding ≈ 270px),
     but cap by available column width so it never overflows on tall/narrow windows. */
  height: max(380px, min(calc(100vh - 270px), calc((100vw - 452px) * 1.25)));
  aspect-ratio: 4 / 5; width: auto; max-width: 100%;
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #E9E1D6 0%, #E3DACB 55%, #D7CCB9 100%);
  box-shadow: var(--shadow-lg);
  transition: aspect-ratio .5s var(--ease-out), height .45s var(--ease-out); /* scale to the image / make room for the panel */
}
/* When the recreate panel is open on the right, give the preview less width so the row never overflows */
.try-stage:has(.try-alts:not(.is-hidden)) .preview-frame {
  height: max(340px, min(calc(100vh - 270px), calc((100vw - 800px) * 1.25)));
}
.preview-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.preview-img.revealing { animation: prevReveal .7s var(--ease-out); }
@keyframes prevReveal {
  from { clip-path: inset(0 0 100% 0); opacity: .35; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}
.preview-badge {
  position: absolute; top: 16px; left: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 13px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.preview-actions { position: absolute; bottom: 16px; left: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.generate-btn { width: min(420px, 100%); flex: none; }

/* Frosted "generating" overlay with a creeping progress bar */
.gen-overlay {
  position: absolute; inset: 0; z-index: 7;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-out);
}
.gen-overlay.is-on { opacity: 1; pointer-events: auto; }
.gen-overlay__spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-top-color: var(--ink); animation: gen-spin .8s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }
.gen-overlay__label { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.gen-overlay__bar { width: min(70%, 260px); height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.gen-overlay__fill { display: block; height: 100%; width: 0%; background: var(--ink); border-radius: 999px; }
.gen-overlay__sub { font-size: 12px; color: var(--ink-soft); max-width: 30ch; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .gen-overlay__spin { animation: none; } }

/* ---------- Alternatives ---------- */
.try-alts {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
  flex: none; width: clamp(290px, 23vw, 360px);
  display: flex; flex-direction: column; min-height: 0; /* right-hand column */
}
.try-alts__head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex: none; }
.try-alts__title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.try-alts__title b { font-weight: 700; }
.try-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }

/* ---------- Recreate-look: sort + budget controls ---------- */
.alt-controls { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.alt-sort { display: flex; width: 100%; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.seg {
  flex: 1 1 0; appearance: none; border: 0; background: transparent; cursor: pointer;
  height: 30px; padding: 0 6px; border-radius: var(--r-pill);
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.seg:hover { color: var(--ink); }
.seg.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.alt-budget { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.alt-budget__top { display: flex; align-items: baseline; justify-content: space-between; }
.alt-budget__lab { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.alt-budget__val { font-size: 12px; font-weight: 700; color: var(--ink); }

/* Dual-handle price slider — two overlaid range inputs sharing one track */
.range { position: relative; height: 28px; width: 100%; }
.range__track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; transform: translateY(-50%); background: var(--line-strong); border-radius: 999px; }
.range__fill { position: absolute; top: 0; height: 100%; background: var(--ink); border-radius: 999px; }
.range__input { position: absolute; top: 0; left: 0; width: 100%; height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range__input:focus { outline: none; }
.range__input::-webkit-slider-runnable-track { -webkit-appearance: none; height: 28px; background: none; }
.range__input::-moz-range-track { height: 28px; background: none; }
.range__input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 5px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); cursor: grab;
}
.range__input::-webkit-slider-thumb:active { cursor: grabbing; }
.range__input::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); cursor: grab;
}
.range__input#priceMin { z-index: 3; }
.range__input#priceMax { z-index: 4; }

.alt-row {
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; flex: 1 1 auto; min-height: 0; padding-right: 3px; margin-right: -3px;
}
.alt-row--empty { display: block; color: var(--ink-mute); font-size: 14px; padding: 28px 4px; text-align: center; }
/* Compact horizontal cards: smaller image on the left, details on the right */
.alt {
  flex: none; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden; display: flex; flex-direction: row; align-items: stretch;
  cursor: pointer; transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), transform .18s var(--ease-out);
}
.alt:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
/* "+ Add" cue — reveals on hover so it's clear the whole card adds to the outfit */
.alt__add-cue {
  position: absolute; left: 7px; bottom: 7px; z-index: 3;
  background: var(--ink); color: var(--on-dark); border-radius: var(--r-pill);
  padding: 3px 9px; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out);
}
.alt:hover .alt__add-cue { opacity: 1; transform: none; }
.alt__img { position: relative; flex: none; width: 112px; align-self: stretch; background: var(--surface-2); }
/* cover + per-image focal point (inline object-position) centres the GARMENT, not the model's head */
.alt__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.alt__match { position: absolute; top: 7px; left: 7px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(3px); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 7px; font-size: 10px; font-weight: 700; color: var(--sage); }
.alt__best { display: none; } /* the top card is already the best match — keep the panel clean */
.alt__body { flex: 1; min-width: 0; padding: 11px 13px; display: flex; flex-direction: column; gap: 2px; }
.alt__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.alt__retailer { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.alt__stock { font-size: 10.5px; color: var(--sage); font-weight: 600; flex: none; }
.alt__name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alt__price { font-size: 14.5px; font-weight: 700; margin-top: 1px; }
.alt__save { font-size: 11.5px; color: var(--sage); font-weight: 600; margin-left: 7px; }
.alt__actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 9px; }
.alt__actions .btn { flex: 1; height: 34px; font-size: 11px; }
.alt__heart {
  flex: none; width: 34px; height: 34px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: border-color .2s, color .2s;
}
.alt__heart:hover, .alt__heart.is-saved { border-color: var(--ink); color: var(--champagne); }
.try-alts__more { display: flex; justify-content: center; margin-top: 14px; flex: none; }

/* ---------- Scrim (shared) ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(20,17,13,.42);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 200;
}
.scrim.is-open { opacity: 1; visibility: visible; }

/* ---------- Add item drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .35s var(--ease-out);
  z-index: 210; display: flex; flex-direction: column;
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; }
.drawer__close { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.drawer__close:hover { border-color: var(--ink); }
.drawer__body { padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.drawer__label { font-size: 13px; font-weight: 600; }
.drawer__row { display: flex; gap: 10px; }
.drawer__row .field { flex: 1; }
.drawer__row .btn { flex: none; }
.drawer__or { display: flex; align-items: center; gap: 12px; color: var(--ink-mute); font-size: 12px; }
.drawer__or::before, .drawer__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  padding: 26px 18px; text-align: center; color: var(--ink-soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--ink); background: var(--surface-2); }
.dropzone p { font-size: 13px; line-height: 1.4; }
.drawer__manual { background: none; border: none; color: var(--ink-soft); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.drawer__manual:hover { color: var(--ink); }
.drawer__status { font-size: 13px; color: var(--ink-soft); min-height: 20px; }
.drawer__status.is-loading { color: var(--ink); }

/* ---------- Waitlist modal ---------- */
.modal {
  position: fixed; z-index: 211; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(440px, 92vw); background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 30px 30px 26px;
  opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s;
}
.modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.modal h2 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 10px 0 12px; }
.modal p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 20px; }
.modal-form { display: flex; gap: 10px; }
.modal-form .field { flex: 1; }
.modal-form .btn { flex: none; }
.modal-msg { font-size: 13px; color: var(--ink-soft); min-height: 18px; margin-top: 12px; }
.modal-later { display: block; margin: 14px auto 0; background: none; border: none; color: var(--ink-mute); font-size: 13px; }
.modal-later:hover { color: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--dark); color: var(--on-dark); padding: 12px 22px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s, visibility .3s;
  z-index: 220; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .try-stage { flex-direction: column; height: auto; }
  .try-preview { order: 1; }
  .try-slots { order: 2; width: auto; }
  .try-alts { order: 3; width: auto; }                /* recreate panel stacks full-width below on mobile */
  .slot-list { overflow-y: visible; flex: none; }   /* moodboard grid grows naturally on mobile */
  .try-preview { align-items: stretch; height: auto; }
  .preview-frame { flex: none; width: 100%; height: auto; max-width: none; aspect-ratio: 4 / 5; }
  .generate-btn { width: 100%; }
  .try-alts__head { flex-direction: column; align-items: stretch; }
  .alt-row { flex-direction: row; overflow-x: auto; overflow-y: visible; flex: none; padding-right: 0; margin-right: 0; padding-bottom: 6px; }
  .alt { flex: none; width: 220px; }
}
@media (max-width: 600px) {
  .try-breadcrumb { display: none; }
  .try-header__right .try-back { display: none; }
  .preview-frame { aspect-ratio: 4 / 5; }
  .preview-actions { left: 12px; right: 12px; bottom: 12px; }
  .try-alts { padding: 18px 16px; }
  .drawer {
    top: auto; bottom: 0; right: 0; left: 0; width: auto; height: auto; max-height: 86vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0; transform: translateY(100%);
  }
  .drawer.is-open { transform: none; }
}

/* ---------- In-preview model chooser ---------- */
.model-bar {
  flex: none; align-self: center; max-width: 100%;
  display: flex; align-items: center; gap: 8px; overflow-x: auto;
  padding: 7px 9px; border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}
.model-bar::-webkit-scrollbar { display: none; }
.model-bar__label {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mute); padding: 0 6px 0 4px; white-space: nowrap;
}
.model-pick {
  flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2); cursor: pointer; padding: 0;
  transition: border-color .2s, transform .2s;
}
.model-pick img { width: 100%; height: 100%; object-fit: cover; }
.model-pick:hover { transform: translateY(-1px); }
.model-pick.is-active { border-color: var(--ink); }
.model-pick--upload { display: grid; place-items: center; color: var(--ink-mute); border: 2px dashed var(--line-strong); background: var(--surface); }

/* preview/look badge — top-left of the wardrobe window */
.preview-badge { top: 16px; bottom: auto; left: 16px; }

/* alternatives bar reveals when the look is generated */
.try-alts.is-hidden { display: none; }
.try-alts.reveal-in { animation: altReveal .5s var(--ease-out) both; }
@keyframes altReveal {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Slot hide / restore ---------- */
.slot-wrap { position: relative; }
.slot-hide {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-mute); display: grid; place-items: center; cursor: pointer;
  opacity: .5; transition: opacity .15s, color .2s, border-color .2s;
}
.slot-wrap:hover .slot-hide, .slot-hide:focus-visible { opacity: 1; }
.slot-hide:hover { color: var(--ink); border-color: var(--line-strong); }

.slot-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slot-hidden:not(:empty) { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.slot-hidden__label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); width: 100%; margin-bottom: 2px; }
.add-chip {
  height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1.5px dashed var(--line-strong); background: transparent;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.add-chip:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Preview angle toggle (Front / Side) ---------- */
.angle-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.angle-toggle:empty { display: none; }
.angle-btn {
  height: 28px; padding: 0 14px; border-radius: var(--r-pill); border: none; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: background .2s, color .2s;
}
.angle-btn.is-active { background: var(--ink); color: var(--on-dark); }

/* ---------- Drawer product suggestions ---------- */
.drawer__suggest { display: flex; flex-direction: column; gap: 14px; }
.suggest-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suggest-loading { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); padding: 10px 0; text-align: center; }
.suggest {
  display: flex; flex-direction: column; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0; overflow: hidden; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.suggest:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.suggest__img { position: relative; width: 100%; aspect-ratio: 3 / 4; background: var(--surface-2); }
.suggest__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.suggest__add {
  position: absolute; bottom: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--on-dark); display: grid; place-items: center; font-size: 19px; line-height: 1;
  box-shadow: var(--shadow-sm);
}
.suggest__info { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 3px; }
.suggest__name { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggest__meta { font-size: 12px; color: var(--ink-soft); }
.suggest-more {
  width: 100%; height: 44px; border-radius: var(--r-pill); border: 1.5px dashed var(--line-strong);
  background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .2s, color .2s;
}
.suggest-more:hover { border-color: var(--ink); color: var(--ink); }
.suggest-more.is-loading { opacity: .55; pointer-events: none; }

/* ---------- AI "Generate Look" result card ---------- */
/* Stylist note: a compact caption by default (so the generated image stays visible),
   tap the bar to expand the full note. */
.look-result {
  position: absolute; left: 14px; right: 14px; bottom: 72px; z-index: 4;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 0; opacity: 0; transform: translateY(10px); overflow: hidden;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.look-result.in { opacity: 1; transform: none; }
.look-result__bar {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 11px 38px 11px 15px; color: inherit; font: inherit;
}
.look-result__chev { flex: none; margin-left: auto; color: var(--ink-mute); transition: transform .25s var(--ease-out); }
.look-result.is-open .look-result__chev { transform: rotate(180deg); }
.look-result__x { position: absolute; top: 9px; right: 11px; background: none; border: 0; font-size: 20px; line-height: 1; color: var(--ink-mute); cursor: pointer; padding: 2px; z-index: 1; }
.look-result__x:hover { color: var(--ink); }
.look-result__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.look-result__name { font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-result__vibe { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 3px 9px; }
.look-result__body { max-height: 0; overflow-y: auto; transition: max-height .3s var(--ease-out); padding: 0 15px; }
.look-result.is-open .look-result__body { max-height: 40vh; padding: 0 15px 13px; }
.look-result__note { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.look-result__finish { font-size: 12px; color: var(--ink-mute); margin-top: 6px; }
.look-result__finish b { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .look-result { bottom: 64px; } }
