/* ==========================================================
   Deneme Kabini — atelier / fitting-room identity
   Palette: loden green, bone, chalk, stone, tape-measure yellow
   ========================================================== */
:root {
  --loden: #22332e;
  --loden-2: #2f463f;
  --loden-ink: #16211e;
  --bone: #f3f2ef;
  --chalk: #ffffff;
  --stone: #6e746f;
  --line: #d9d8d3;
  --tape: #e3b43c;
  --tape-ink: #3a2c05;
  --danger: #a3372b;
  --danger-bg: #f7e6e3;

  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 4px;
  --r-md: 10px;
  --r-pill: 999px;
  --shadow-lift: 0 18px 40px -24px rgba(22, 33, 30, 0.45);
  --shadow-float: 0 12px 32px -8px rgba(22, 33, 30, 0.35);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--loden-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.05; }
h3 { font-size: 1rem; font-weight: 600; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--stone); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--loden); color: var(--chalk); padding: 10px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--loden); color: var(--chalk); }
.btn-primary:hover { background: var(--loden-2); }
.btn-primary:disabled { background: #a9b0ac; cursor: not-allowed; }
.btn-ghost { border-color: var(--loden); color: var(--loden); background: transparent; }
.btn-ghost:hover { background: var(--loden); color: var(--chalk); }
.btn-accent { background: var(--tape); color: var(--tape-ink); }
.btn-accent:hover { background: #edc55a; }
.btn-link { padding: 0 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; font-weight: 500; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bone) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 32px; height: 78px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { display: block; height: 44px; width: auto; }
.logo .logo-img { height: 36px; max-width: 100%; }
.logo-text {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1; color: var(--loden-ink); white-space: nowrap;
}
.logo-text b { font-weight: 800; color: var(--loden); }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { text-decoration: none; font-weight: 500; color: var(--stone); }
.main-nav a:hover { color: var(--loden-ink); }
.header-cta { min-height: 42px; white-space: nowrap; }

/* ---------- Mirror (signature element) ---------- */
.mirror {
  position: relative;
  border-radius: 999px 999px var(--r-md) var(--r-md);
  background: var(--loden);
  padding: 10px;
  isolation: isolate;
}
.mirror::after {
  content: ''; position: absolute; inset: 10px; z-index: 3; pointer-events: none;
  border-radius: 999px 999px 4px 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.mirror > img { border-radius: 999px 999px 4px 4px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 12ch;
}
.hero-lead { font-size: 1.15rem; max-width: 46ch; margin: 28px 0 32px; color: #3c4541; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 36px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-facts div { display: grid; gap: 2px; }
.hero-facts dt { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.hero-facts dd { margin: 0; color: var(--stone); font-size: 0.9rem; max-width: 16ch; }

.hero-mirror { position: relative; margin: 0; justify-self: end; width: min(100%, 440px); }
.mirror-hero { aspect-ratio: 5 / 7; }
.mirror-hero img { width: 100%; height: 100%; object-fit: cover; background: #dfddd8; }

.garment-tag {
  position: absolute; left: -36px; bottom: 56px; z-index: 4;
  display: grid; gap: 2px;
  width: 200px; padding: 16px 16px 14px 34px;
  background: var(--chalk); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lift);
  transform: rotate(-4deg);
  font-size: 0.85rem;
}
.garment-tag strong { font-weight: 600; }
.garment-tag span:not(.tag-hole) { color: var(--stone); line-height: 1.3; }
.tag-hole {
  position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; border: 2px solid var(--tape); background: var(--bone);
}

/* ---------- Brand marquee ---------- */
.brands { padding: 34px 0; background: var(--chalk); border-top: 1px solid var(--line); overflow: hidden; }
.brands-marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; width: max-content;
  animation: marquee var(--marquee-duration, 45s) linear infinite;
}
.brands-marquee:hover .brands-track { animation-play-state: paused; }
.brands-track li {
  flex: none; white-space: nowrap; padding-right: clamp(40px, 6vw, 88px);
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1; letter-spacing: -0.02em;
  color: #9a9f9a; filter: grayscale(1); opacity: 0.85;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.brands-track li:hover { color: var(--loden-ink); opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; flex-wrap: wrap; justify-content: center; gap: 12px 0; width: auto; padding: 0 16px; }
  .brands-track li[aria-hidden='true'] { display: none; }
}

/* ---------- Collection ---------- */
.collection { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); background: var(--chalk); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { max-width: 52ch; margin: 12px 0 0; }

.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bone); }
.segmented button {
  min-height: 42px; min-width: 96px; padding: 0 18px; border: 0; border-radius: var(--r-pill);
  background: transparent; font-weight: 600; color: var(--stone); cursor: pointer;
}
.segmented button[aria-selected='true'] { background: var(--loden); color: var(--chalk); }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent; cursor: pointer; font-size: 0.9rem; color: #3c4541;
}
.chip[aria-pressed='true'] { border-color: var(--loden); color: var(--loden-ink); background: var(--bone); font-weight: 600; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px 20px; }
.card { position: relative; }
.card-btn {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.card-media { position: relative; aspect-ratio: 5 / 7; overflow: hidden; border-radius: var(--r-sm); background: #ecebe7; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s var(--ease); }
.card-media .img-hover { opacity: 0; }
.card-media[data-fit='contain'] { background: var(--chalk); box-shadow: inset 0 0 0 1px var(--line); }
.card-media[data-fit='contain'] img { object-fit: contain; padding: 12%; }
.card-btn:hover .img-hover,
.card-btn:focus-visible .img-hover { opacity: 1; }
.card-pin {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: var(--loden);
  font-size: 1.2rem; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card[data-selected='true'] .card-pin { background: var(--tape); color: var(--tape-ink); transform: rotate(45deg); }
.card[data-selected='true'] .card-media { outline: 2px solid var(--loden); outline-offset: 3px; }
.card-slot {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 3px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem; font-weight: 500;
}
.card-body { padding-top: 12px; display: grid; gap: 2px; }
.card-brand { font-weight: 600; font-size: 0.92rem; }
.card-name { color: #3c4541; font-size: 0.9rem; line-height: 1.35; }
.card-price { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-top: 4px; }
.card-link { display: inline-block; margin-top: 6px; font-size: 0.8rem; color: var(--stone); text-underline-offset: 3px; }
.card-link:hover { color: var(--loden-ink); }

.source-note { margin: 40px 0 0; font-size: 0.8rem; color: var(--stone); }

/* ---------- Studio ---------- */
.studio { padding: clamp(56px, 8vw, 110px) 0; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.studio-panel > p { margin: 12px 0 28px; }

.notice {
  margin-bottom: 24px; padding: 14px 16px; border-radius: var(--r-md);
  background: #fbf3dc; border: 1px solid #efd88f; color: var(--tape-ink); font-size: 0.92rem;
}

.step { padding: 24px 0; border-top: 1px solid var(--line); }
.step h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--loden); color: var(--chalk); font-size: 0.8rem; font-weight: 600;
}
.count { margin-left: auto; color: var(--stone); font-weight: 500; font-size: 0.9rem; }

.dropzone {
  display: block; cursor: pointer;
  border: 1.5px dashed #b9bcb6; border-radius: var(--r-md);
  background: var(--chalk);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.is-drag { border-color: var(--loden); background: #fafaf8; }
.dropzone:focus-within { outline: 2px solid var(--tape); outline-offset: 3px; }
.dz-empty { display: grid; justify-items: center; gap: 4px; padding: 32px 16px; text-align: center; color: #3c4541; }
.dz-empty svg { width: 28px; height: 28px; fill: none; stroke: var(--loden); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.dz-empty small { color: var(--stone); }
.dz-filled { display: flex; align-items: center; gap: 16px; padding: 12px; }
.dz-filled img { width: 64px; height: 84px; object-fit: cover; border-radius: var(--r-sm); }
.dz-meta { display: grid; gap: 2px; min-width: 0; }
.dz-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dz-meta small { color: var(--stone); }
.dz-change { font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }

.field-error { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-bg); color: var(--danger); font-size: 0.9rem; }

.selection { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sel-item { display: flex; align-items: center; gap: 14px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--chalk); }
.sel-item img { width: 48px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.sel-text { display: grid; min-width: 0; line-height: 1.3; }
.sel-text strong { font-size: 0.9rem; }
.sel-text span { font-size: 0.85rem; color: var(--stone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-remove {
  margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; font-size: 1.3rem; color: var(--stone);
}
.sel-remove:hover { background: var(--bone); color: var(--loden-ink); }
.empty-selection { margin: 0; color: var(--stone); font-size: 0.92rem; }

.step-go { display: grid; gap: 10px; }
.fine { margin: 0; font-size: 0.8rem; color: var(--stone); }

.studio-stage { position: sticky; top: 92px; }
.mirror-stage { aspect-ratio: 3 / 4; max-height: calc(100vh - 260px); margin-inline: auto; }
/* All stage layers live inside one arch-shaped viewport that clips them
   (overflow + clip-path so animated/composited children are clipped too). */
.stage-view {
  position: absolute; inset: 10px; overflow: hidden;
  border-radius: 999px 999px 4px 4px;
  clip-path: inset(0 round 999px 999px 4px 4px);
  isolation: isolate;
  touch-action: pan-y;
}
.mirror-stage[data-state='done'] .stage-view { cursor: ew-resize; }
.stage-idle {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 48px 40px 24px; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #34493f, #22332e);
  color: rgba(255, 255, 255, 0.78);
}
.stage-idle p { max-width: 22ch; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.4; margin: 0; }
.stage-before,
.stage-after-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-before { object-fit: cover; }
.stage-after-wrap { z-index: 1; overflow: hidden; }
.stage-after { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.stage-before { user-select: none; -webkit-user-drag: none; pointer-events: none; }

.stage-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 4; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--tape) 20%, var(--tape) 80%, transparent);
  box-shadow: 0 0 18px 2px rgba(227, 180, 60, 0.6);
}
.mirror-stage[data-state='loading'] .stage-scan { opacity: 1; animation: scan 2.4s var(--ease) infinite alternate; }
.mirror-stage[data-state='loading'] .stage-before { filter: saturate(0.6) brightness(0.85); }
@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(calc(var(--stage-h, 600px) - 26px)); }
}
.mirror-stage[data-state='done'] .stage-after-wrap { animation: reveal 1.1s var(--ease) backwards; }
@keyframes reveal {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* Keyboard-accessible range, visually hidden; dragging is handled on .stage-view */
.compare {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0;
}
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 4; width: 2px; margin-left: -1px;
  background: var(--chalk); pointer-events: none; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}
.compare-handle::after {
  content: '⟷'; position: absolute; top: 50%; left: calc(50% + var(--knob-shift, 0px)); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--chalk); color: var(--loden); font-size: 1.1rem; box-shadow: var(--shadow-float);
}
.stage-view.is-dragging .compare-handle::after { transform: translate(-50%, -50%) scale(1.08); }
.mirror-stage:focus-within .compare-handle::after { outline: 2px solid var(--tape); outline-offset: 2px; }
/* Square magnifier centred on the pointer */
.stage-loupe {
  position: absolute; z-index: 6; width: 180px; height: 180px;
  border: 2px solid var(--chalk); border-radius: var(--r-sm);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.12);
  overflow: hidden; pointer-events: none; background: var(--loden-ink);
}
.loupe-layer { position: absolute; inset: 0; background-repeat: no-repeat; }
.loupe-after { z-index: 1; }
.loupe-line { position: absolute; top: 0; bottom: 0; z-index: 2; width: 2px; margin-left: -1px; background: var(--chalk); }
.mirror-stage.has-loupe .stage-view { cursor: none; }
.mirror-stage.has-loupe .compare-handle::after { opacity: 0; }
@media (hover: none) { .stage-loupe { width: 140px; height: 140px; } }

.compare-label {
  position: absolute; bottom: 16px; z-index: 4; padding: 4px 12px; border-radius: var(--r-pill);
  background: rgba(22, 33, 30, 0.72); color: var(--chalk); font-size: 0.78rem; font-weight: 600; pointer-events: none;
}
.compare-label-after { left: 16px; }
.compare-label-before { right: 16px; }

.stage-status { min-height: 28px; margin-top: 18px; text-align: center; color: #3c4541; }
.stage-status.is-error { color: var(--danger); }
.stage-status small { display: block; color: var(--stone); }
.stage-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.engine-note { margin: 12px 0 0; text-align: center; font-size: 0.8rem; color: var(--stone); }

/* ---------- How ---------- */
.how { padding: clamp(56px, 8vw, 100px) 0; background: var(--loden); color: var(--bone); }
.how h2 { color: var(--chalk); }
.how-steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.how-steps li { counter-increment: step; padding-top: 24px; border-top: 1px solid rgba(243, 242, 239, 0.25); }
.how-steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--tape); margin-bottom: 16px; }
.how-steps h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--chalk); }
.how-steps p { margin: 0; color: rgba(243, 242, 239, 0.75); max-width: 36ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--loden-ink); color: rgba(243, 242, 239, 0.72); font-size: 0.92rem; }
.footer-main {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 5vw, 56px);
  border-top: 1px solid rgba(243, 242, 239, 0.12);
}
.footer-brand p { max-width: 34ch; margin: 16px 0 24px; line-height: 1.6; }
.logo-light img { height: 52px; }
.logo-light .logo-text { color: var(--chalk); font-size: 1.6rem; }
.logo-light .logo-text b { color: #8fb8a2; }
.footer-cta { min-height: 44px; }
.footer-col h2 {
  margin: 0 0 16px; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--chalk);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; color: rgba(243, 242, 239, 0.72); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--tape); }
.footer-facts li { position: relative; padding-left: 18px; line-height: 1.5; }
.footer-facts li::before {
  content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--tape);
}
.footer-bottom { border-top: 1px solid rgba(243, 242, 239, 0.12); }
.footer-bottom-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px;
  padding: 20px 0; font-size: 0.82rem; color: rgba(243, 242, 239, 0.55);
}
.footer-bottom-row p { margin: 0; }
/* Leave room for the selection tray only while it is visible */
body.has-tray .footer-bottom-row { padding-bottom: 92px; }

/* ---------- Tray ---------- */
.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px 0; background: var(--loden); color: var(--chalk);
  box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35);
  transform: translateY(0); transition: transform 0.3s var(--ease);
}
.tray.is-hidden { transform: translateY(110%); }
.tray-row { display: flex; align-items: center; gap: 16px; }
.tray-items { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.tray-items img { width: 40px; height: 54px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, 0.3); }
.tray-text { font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); }
.tray .btn { margin-left: auto; min-height: 44px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translateX(-50%);
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: var(--r-md);
  background: var(--loden-ink); color: var(--chalk); font-size: 0.92rem; box-shadow: var(--shadow-float);
}


/* ---------- v2: account, link try, sizing, share, video, pricing, gate ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.account-chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.quota { margin: 0; font-size: 0.88rem; color: #3c4541; }
.quota a { color: var(--loden); font-weight: 600; text-underline-offset: 3px; }

.fold { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--chalk); }
.step > .fold:first-child { margin-top: 0; }
.fold > summary {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 14px 44px 14px 16px; position: relative; font-weight: 600;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400; color: var(--stone); transition: transform 0.2s var(--ease);
}
.fold[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.fold > summary small { font-weight: 400; color: var(--stone); font-size: 0.85rem; }
.fold-body { padding: 0 16px 16px; display: grid; gap: 12px; }

.link-form { display: flex; gap: 8px; }
.link-form input, .link-fields input, .link-fields select, .size-form input, .size-form select {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--chalk); font: inherit; color: inherit;
}
.link-form input:focus, .link-fields input:focus, .link-fields select:focus, .size-form input:focus, .size-form select:focus { outline: 2px solid var(--tape); outline-offset: 1px; border-color: var(--loden); }
.link-form .btn { min-height: 44px; flex: none; }
.link-meta { margin: 0; font-size: 0.92rem; }
.link-price { font-family: var(--font-display); font-weight: 600; margin-left: 6px; }
.link-images { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.link-img { display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: #f7f6f3; overflow: hidden; cursor: pointer; }
.link-img img { width: 100%; height: 100%; object-fit: contain; }
.link-img[aria-pressed='true'] { outline: 2px solid var(--loden); outline-offset: 2px; }
.link-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; align-items: end; }
.link-fields label, .size-form label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--stone); }
.link-fields .btn { grid-column: 1 / -1; }
.link-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.link-upload span { text-decoration: underline; text-underline-offset: 3px; color: var(--loden); font-weight: 600; cursor: pointer; }
.link-upload:focus-within span { outline: 2px solid var(--tape); outline-offset: 2px; }
.sel-item.is-custom img { object-fit: contain; background: #f7f6f3; }

.size-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.size-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.size-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bone); }
.size-item { font-size: 0.88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.size-badge { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: var(--r-pill); background: var(--loden); color: var(--chalk); font-family: var(--font-display); font-weight: 700; }
.size-list small { color: var(--stone); font-size: 0.8rem; }
.size-hint { grid-column: 1 / -1; }

.result-extras { margin-top: 20px; display: grid; gap: 14px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.extras-label { font-size: 0.85rem; color: var(--stone); margin-right: 4px; }
.video-box { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--chalk); padding: 14px 16px; display: grid; gap: 10px; }
.video-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.video-head > div { display: grid; gap: 2px; }
.video-head .btn { min-height: 42px; flex: none; }
.video-status { margin: 0; font-size: 0.88rem; color: #3c4541; }
.video-status.is-error { color: var(--danger); }
.video-player { width: min(100%, 320px); aspect-ratio: 9 / 16; justify-self: center; border-radius: var(--r-md); background: var(--loden-ink); }
.video-box .btn-link { justify-self: center; }

.pricing { padding: clamp(56px, 8vw, 100px) 0; background: var(--chalk); border-top: 1px solid var(--line); }
.plans { list-style: none; margin: 32px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { position: relative; display: grid; gap: 6px; align-content: start; padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bone); }
.plan.is-best { border-color: var(--loden); box-shadow: var(--shadow-lift); background: var(--chalk); }
.plan h3 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin: 0; }
.plan-tries { margin: 0; color: var(--stone); }
.plan-price { margin: 10px 0 0; font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.plan .btn { margin-top: 14px; }
.plan-badge { position: absolute; top: -12px; left: 24px; padding: 3px 12px; border-radius: var(--r-pill); background: var(--tape); color: var(--tape-ink); font-size: 0.75rem; font-weight: 700; }

.gate { border: 0; padding: 0; border-radius: var(--r-md); width: min(92vw, 440px); box-shadow: var(--shadow-float); background: var(--chalk); color: inherit; }
.gate::backdrop { background: rgba(22, 33, 30, 0.55); backdrop-filter: blur(3px); }
.gate-inner { position: relative; padding: 32px 28px 24px; display: grid; gap: 12px; }
.gate-inner h2 { margin: 0; font-size: 1.5rem; }
.gate-inner p { margin: 0; color: #3c4541; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gate-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 1.4rem; color: var(--stone); cursor: pointer; }
.gate-close:hover { background: var(--bone); }

@media (max-width: 1100px) {
  .main-nav { gap: 18px; }
  .main-nav a[href="#how"] { display: none; }
}
@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; max-width: 440px; }
}
@media (max-width: 560px) {
  .size-form { grid-template-columns: 1fr 1fr; }
  .link-fields { grid-template-columns: 1fr; }
  .video-head { flex-direction: column; align-items: stretch; }
  .account-chip { max-width: 150px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-cta { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mirror { justify-self: center; width: min(78%, 380px); }
  .garment-tag { left: -18px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-stage { position: static; }
  .mirror-stage { width: min(100%, 460px); max-height: none; }
  .brands-track li { font-size: 1.3rem; }
  .how-steps { grid-template-columns: 1fr; gap: 28px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .header-cta { padding: 0 16px; font-size: 0.85rem; }
  .logo img { height: 32px; }
  .logo .logo-img { height: 28px; }
  .logo-text { font-size: 1.05rem; }
  .logo { gap: 8px; }
  .header-cta { padding: 0 14px; font-size: 0.8rem; min-height: 40px; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.1rem); }
  .hero-facts { gap: 20px 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .tray-text { display: none; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
