:root {
  --bg: #E6ECE8;
  --ink: #1A1A1A;
  --ink-2: #4B4F4C;
  --ink-3: #868B87;
  --surface: #F9F9F8;
  --surface-2: #EFF2EF;
  --line: #D7DDD9;
  --accent: #1A1A1A;
  --like: #2F6B4F;
  --nope: #A1463A;
  --warn: #B4533C;
  --ok: #2F6B4F;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(26, 26, 26, .04), 0 10px 30px -12px rgba(26, 26, 26, .18);
  --shadow-lg: 0 2px 6px rgba(26, 26, 26, .05), 0 24px 60px -20px rgba(26, 26, 26, .35);
  --font: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 13px; height: 13px; }

/* ---------- App shell ---------- */
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 18px 6px;
  flex: none;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: .06em; }
/* letter-spacing is fitted in app.js (fitBrandTag) so the tagline spans exactly the logo's width */
.brand-name, .brand-tag { align-self: flex-start; white-space: nowrap; }
.brand-tag { font-size: 9.5px; font-weight: 500; letter-spacing: .42em; margin-top: 5px; color: var(--ink-2); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.94); }

/* ---------- Discover ---------- */
.discover {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 6px 16px 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 4px);
}
.deck-controls { flex: none; display: flex; flex-direction: column; gap: 8px; align-items: center; }

.segmented {
  display: inline-flex; padding: 4px; gap: 2px;
  background: rgba(255, 255, 255, .55); border: 1px solid var(--line);
  border-radius: 999px; width: 100%; max-width: 420px;
}
.segmented button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.segmented button.on { background: var(--ink); color: var(--surface); }

.deck-sub { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; min-height: 30px; }
.summary-chip {
  align-self: center; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-2); padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .4); border: 1px dashed #BFC7C2;
  max-width: 100%; white-space: nowrap; overflow: hidden;
}
.summary-chip span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.taste-line { font-size: 12px; color: var(--ink-2); text-align: center; margin: 0; }
.taste-line b { font-weight: 600; color: var(--ink); }

.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px; margin: 0 -16px; padding-inline: 16px; }
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip .count { font-size: 11px; opacity: .6; }

.deck-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 10px 0 24px; }
@media (max-width: 380px) { .actions { gap: 10px; } .act-skip, .act-like { width: 54px; height: 54px; } }
.deck { position: relative; width: 100%; max-width: 420px; height: 100%; }

/* ---------- Cards ---------- */
.card {
  --depth: 0;
  position: absolute; inset: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(calc(var(--depth) * 9px)) scale(calc(1 - var(--depth) * .04));
  transform-origin: 50% 100%;
  transition: transform .32s var(--ease), opacity .32s;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.card:not(.top) { pointer-events: none; }
.card[style*="--depth: 2"], .card[style*="--depth:2"] { opacity: .7; }
.card.top { cursor: grab; }
.card.dragging { cursor: grabbing; transition: none; }

.card-media {
  position: relative; flex: 1; min-height: 0;
  background: radial-gradient(120% 80% at 50% 30%, #fff 0%, var(--tint, #EEF1EE) 75%);
  display: grid; place-items: center;
}
.card-media svg.garment { width: 72%; height: 88%; max-height: 360px; }
.store-badge {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(249, 249, 248, .92); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  backdrop-filter: blur(6px);
}
.why {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.why span {
  font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 999px;
  background: rgba(26, 26, 26, .82); color: #F9F9F8;
  display: inline-flex; gap: 4px; align-items: center;
}
.card-info { flex: none; padding: 14px 18px 4px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card-info .brandline { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.card-info h2 { margin: 3px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -.005em; line-height: 1.2; }
.price { margin: 0; font-weight: 700; font-size: 18px; white-space: nowrap; }
.price small { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-3); text-align: right; letter-spacing: .04em; }
.card-tags { flex: none; padding: 6px 18px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 5px;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

/* outfit collage */
.collage { flex: 1; min-height: 0; display: grid; gap: 3px; background: var(--line); }
.collage.n3 { grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n3 .cell:first-child { grid-row: span 2; }
.collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n2 { grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr; }
.cell {
  position: relative; min-height: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 35%, #fff 0%, var(--tint, #EEF1EE) 80%);
  display: grid; place-items: center;
}
.cell svg.garment { width: 82%; height: 78%; }
.cell-tag {
  position: absolute; left: 8px; bottom: 8px; right: 8px;
  font-size: 10.5px; line-height: 1.2; padding: 5px 8px; border-radius: 8px;
  background: rgba(249, 249, 248, .94); box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  display: flex; justify-content: space-between; gap: 6px;
}
.cell-tag b { font-weight: 600; white-space: nowrap; }
.cell-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.collage .store-badge { z-index: 2; }

/* ---------- Photo views (tap right / left to turn) ---------- */
.card-media .view {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s .18s;
}
.card-media .view.on { opacity: 1; visibility: visible; transition: opacity .18s; }
.card-media .view > .collage { position: absolute; inset: 0; }
.card-media .view.turn-f > * { animation: turnF .42s var(--ease); }
.card-media .view.turn-b > * { animation: turnB .42s var(--ease); }
@keyframes turnF { from { transform: perspective(900px) rotateY(-75deg) scale(.94); opacity: .2; } }
@keyframes turnB { from { transform: perspective(900px) rotateY(75deg) scale(.94); opacity: .2; } }
.card-media .view svg.garment.zoom { width: 100%; height: 100%; max-height: none; }
.card-media.nudge { animation: nudge .3s var(--ease); }
/* Real product photos (feed.js): white studio shots blend into the card tint */
img.garment.photo {
  display: block; width: 90%; height: 90%; object-fit: contain; mix-blend-mode: multiply;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
img.garment.photo.flip { scale: -1 1; }
img.garment.photo.zoom { scale: 1.9; }
/* Pin photos to their frame so tall portrait shots (dresses on a model) never spill out of the card */
.view > img.garment.photo, .cell > img.garment.photo, .viewer-slide > img.garment.photo {
  position: absolute; inset: 0; margin: auto; width: 92%; height: 92%;
}
.viewer-slide > img.garment.photo { width: 100%; height: 100%; }
.card-media { overflow: hidden; }
.thumb img.garment.photo { width: 92%; height: 92%; }
@keyframes nudge { 30% { transform: translateX(6px); } 60% { transform: translateX(-3px); } }

.view-bars {
  position: absolute; z-index: 3; top: 8px; left: 12px; right: 12px;
  display: flex; gap: 4px; pointer-events: none;
}
.view-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(26, 26, 26, .14); transition: background .2s; }
.view-bars i.on { background: rgba(26, 26, 26, .78); }
.card-media .store-badge { top: 18px; z-index: 3; }
.view-label {
  position: absolute; z-index: 3; top: 18px; right: 14px; pointer-events: none;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px; background: rgba(26, 26, 26, .78); color: #F9F9F8;
}
.view-label small { font-size: 10px; font-weight: 500; opacity: .7; letter-spacing: 0; }
.card-media .why { z-index: 3; }
.card.top .card-media .why { right: 54px; } /* leave room for the expand icon */
.tap-zone {
  position: absolute; z-index: 3; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; line-height: 1; padding-bottom: 3px;
  background: rgba(249, 249, 248, .9); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.tap-zone.prev { left: 12px; }
.tap-zone.next { right: 12px; }
@media (hover: hover) and (pointer: fine) {
  .card.top .card-media:hover .tap-zone { opacity: 1; }
  .card.top .card-media { cursor: pointer; }
  .mini-media.turnable:hover .tap-zone { opacity: 1; }
}

/* Expand hint on the top card (tap the middle of the photo = full screen) */
.expand-btn {
  position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(249, 249, 248, .92); color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .14); pointer-events: none;
}

/* ---------- Full-screen viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  padding: env(safe-area-inset-top) 0 calc(env(safe-area-inset-bottom) + 10px);
  opacity: 0; transform: scale(.98); transition: opacity .2s, transform .2s var(--ease);
}
.viewer.open { opacity: 1; transform: none; }
.viewer[hidden] { display: none; }
body.viewer-open { overflow: hidden; }
.viewer-top { flex: none; position: relative; padding: 14px 16px 8px; }
.viewer-top .view-bars { position: static; margin-bottom: 10px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer-head span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-stage {
  position: relative; flex: 1; min-height: 0; margin: 0 10px; border-radius: 22px; overflow: hidden;
  cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none;
}
.viewer-stage .stamp { opacity: 0; pointer-events: none; }
body.viewer-open .toast { z-index: 80; bottom: auto; top: calc(env(safe-area-inset-top) + 64px); }
.viewer-slide {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 35%, #fff 0%, var(--tint, #EEF1EE) 80%);
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s .18s;
}
.viewer-slide.on { opacity: 1; visibility: visible; transition: opacity .18s; }
.viewer-slide.turn-f > * { animation: turnF .42s var(--ease); }
.viewer-slide.turn-b > * { animation: turnB .42s var(--ease); }
.viewer-slide img.garment.photo { width: 100%; height: 100%; max-height: none; }
.viewer-slide svg.garment { width: 82%; height: 82%; }
.viewer-slide svg.garment.zoom { width: 100%; height: 100%; }
.viewer-stage .view-label { top: 14px; right: 14px; }
.viewer-stage .tap-zone { opacity: 1; width: 40px; height: 40px; margin-top: -20px; }
.viewer-info { flex: none; padding: 14px 20px 4px; }
.viewer-info h2 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.25; }
.viewer-info p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.viewer-actions { flex: none; display: flex; justify-content: center; align-items: center; gap: 14px; padding: 10px 0 4px; }
@media (min-width: 900px) {
  .viewer-stage, .viewer-top, .viewer-info { width: min(760px, 100%); align-self: center; }
}

/* Same photo views on Liked / Compare thumbnails */
.mini-media[data-views] { position: relative; overflow: hidden; }
.mini-media.turnable { cursor: pointer; }
.mini-media .view {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility 0s .18s;
}
.mini-media .view.on { opacity: 1; visibility: visible; transition: opacity .18s; }
.mini-media .view > .collage { position: absolute; inset: 0; }
.mini-media .view.turn-f > * { animation: turnF .42s var(--ease); }
.mini-media .view.turn-b > * { animation: turnB .42s var(--ease); }
.mini-media .view svg.garment.zoom { width: 100%; height: 100%; }
.mini-media.nudge { animation: nudge .3s var(--ease); }
.mini-media .view-bars { top: 6px; left: 8px; right: 8px; gap: 3px; }
.mini-media .view-label { top: auto; bottom: 8px; left: 8px; right: auto; font-size: 9.5px; padding: 4px 7px; }
.mini .mini-x, .mini .mini-check { top: 14px; z-index: 4; }
.mini-media .view-label small { font-size: 9px; }
.mini-media .tap-zone { width: 26px; height: 26px; margin-top: -13px; font-size: 17px; }
.mini-media .tap-zone.prev { left: 6px; }
.mini-media .tap-zone.next { right: 6px; }

.stamp {
  position: absolute; top: 28px; z-index: 5;
  font-weight: 800; font-size: 26px; letter-spacing: .12em;
  padding: 4px 14px; border: 3px solid; border-radius: 10px;
  opacity: 0; pointer-events: none; background: rgba(249, 249, 248, .85);
}
.stamp.like { left: 22px; color: var(--like); transform: rotate(-12deg); }
.stamp.nope { right: 22px; color: var(--nope); transform: rotate(12deg); }
.stamp.cart { left: 50%; top: 40%; color: var(--ink); transform: translateX(-50%); font-size: 20px; }

/* empty deck */
.empty {
  position: absolute; inset: 0; border-radius: var(--radius);
  border: 1.5px dashed #BAC3BE; background: rgba(249, 249, 248, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px; gap: 10px;
}
.empty h3 { margin: 0; font-size: 20px; font-weight: 600; }
.empty p { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 300px; }
.empty .btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }

/* ---------- Action buttons ---------- */
.actions { flex: none; display: flex; justify-content: center; align-items: center; gap: 14px; padding: 4px 0 8px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); box-shadow: var(--shadow); border-radius: 50%;
  transition: transform .15s var(--ease), box-shadow .15s, opacity .2s;
}
.act:active { transform: scale(.92); }
.act:disabled { opacity: .35; pointer-events: none; }
.act-undo { width: 40px; height: 40px; color: var(--ink-3); }
.act-skip, .act-like { width: 58px; height: 58px; }
.act-skip { color: var(--nope); }
.act-like { color: var(--like); }
.act-like .ic, .act-skip .ic { width: 26px; height: 26px; stroke-width: 2.1; }
.act-cart {
  height: 52px; padding: 0 18px; border-radius: 999px; white-space: nowrap; gap: 6px;
  background: var(--ink); color: var(--surface); font-weight: 600; font-size: 14px; letter-spacing: .01em;
}
.kbd-hint { display: none; }

/* ---------- Options goal: tracker + sheet ---------- */
.goal-row {
  display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 1px 16px;
}
.goal-row::-webkit-scrollbar { display: none; }
.goal-lead { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.gpill {
  flex: none; position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; color: var(--ink-2);
  background: rgba(255, 255, 255, .6); border: 1px solid var(--line);
}
.gpill b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gpill i { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p) * 100%); background: var(--ink); transition: width .3s var(--ease); }
.gpill.cur { border-color: var(--ink); }
.gpill.done { background: var(--like); border-color: var(--like); color: #EAF2EC; }
.gpill.done b { color: #fff; }

.goal-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--like); color: #fff;
}
.sheet-goal .goal-badge + h2 { margin-top: 8px; }
.goal-meter { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 14px; }
.goal-meter .bar { display: flex; gap: 4px; }
.goal-meter .bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.goal-meter .bar i.on { background: var(--like); border-color: var(--like); }
.goal-meter .bar i.on.extra { background: #7FA48F; border-color: #7FA48F; }
.goal-meter span { font-size: 12.5px; color: var(--ink-2); }
.goal-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px 16px; padding: 2px 20px 6px; scrollbar-width: thin; }
.goal-opt { flex: none; width: 118px; display: flex; flex-direction: column; gap: 2px; }
.goal-opt .mini-media { position: relative; border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.goal-opt .t { font-size: 12px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-opt .p { font-size: 12.5px; font-weight: 700; }
.goal-opt .best { position: absolute; left: 6px; top: 6px; margin: 0; }
.goal-opt .src {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(249, 249, 248, .92); color: var(--like);
}
.goal-opt .src.cart { color: var(--ink); }
.goal-actions { display: flex; flex-direction: column; gap: 8px; }
.goal-actions .btn { white-space: normal; text-align: center; }
.goal-actions .btn small { font-weight: 500; opacity: .65; margin-left: 2px; }
.goal-foot { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.linkbtn.inline { padding: 0; font-size: inherit; }

/* ---------- Footer & legal ---------- */
.site-foot {
  flex: none; text-align: center; padding: 8px 8px 2px; margin-top: 2px;
  font-size: 10.5px; line-height: 1.35; color: var(--ink-3);
}
.site-foot p { margin: 0 auto; max-width: 440px; }
.site-foot nav, .legal-links { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.site-foot nav button, .legal-links button {
  font-size: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 3px; padding: 2px 0;
}
.site-foot nav button:hover, .legal-links button:hover { color: var(--ink); text-decoration-color: currentColor; }

.legal-note {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink-2); font-size: 12px; line-height: 1.5;
}
.legal-note h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.legal-note p { margin: 0; }
.legal-note .legal-links { justify-content: flex-start; margin-top: 8px; font-size: 12px; }

.sheet.sheet-legal { background: var(--bg); color: var(--ink); }
.sheet-legal .sheet-head .icon-btn { background: rgba(255, 255, 255, .6); }
.sheet-legal .sheet-head::before { background: rgba(26, 26, 26, .15); }
.sheet-legal .sheet-foot { background: var(--bg); border-top-color: rgba(26, 26, 26, .1); }
.sheet-legal .btn.primary { flex: 1; }
.legal-body { font-size: 14px; line-height: 1.6; outline: none; }
.legal-body h3 { margin: 22px 0 6px; font-size: 15px; font-weight: 600; }
.legal-body p { margin: 0; color: #2E312F; }
.legal-body a { text-underline-offset: 3px; }
.legal-updated { font-size: 12px; letter-spacing: .04em; color: var(--ink-2) !important; text-transform: uppercase; }
.legal-disclosure {
  margin-top: 26px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(26, 26, 26, .08); font-size: 13px;
}
.legal-disclosure h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; }

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(249, 249, 248, .9); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav-btn {
  flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--ink-3);
}
.nav-btn.active { color: var(--ink); }
.nav-ic { position: relative; display: inline-flex; }
.badge {
  position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.badge.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Sheets ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 30; background: rgba(26, 26, 26, .35);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .3);
  transform: translateY(105%); transition: transform .34s var(--ease), visibility 0s .34s;
  visibility: hidden;
}
.sheet.open { transform: none; visibility: visible; transition: transform .34s var(--ease); }
.sheet.stack { z-index: 50; }
.sheet-head {
  flex: none; padding: 10px 20px 12px; position: relative;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.sheet-head::before {
  content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
  border-radius: 2px; background: var(--line);
}
.sheet-head h2 { margin: 16px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sheet-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.sheet-head .icon-btn { margin-top: 12px; box-shadow: none; background: var(--surface-2); width: 38px; height: 38px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; }
.sheet-foot {
  flex: none; padding: 12px 20px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center;
  background: var(--surface);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px;
  font-weight: 600; font-size: 14.5px; text-decoration: none;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  transition: transform .12s var(--ease), background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.block { flex: 1; width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn:disabled { opacity: .4; pointer-events: none; }

/* filters */
.f-group { padding: 14px 0; border-bottom: 1px solid var(--surface-2); }
.f-group:last-child { border-bottom: 0; }
.f-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.f-label em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.f-hint { font-size: 12px; color: var(--ink-3); margin: -4px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips .chip { padding: 8px 14px; }
.chips.sizes .chip { min-width: 48px; justify-content: center; }
.range { width: 100%; margin: 14px 0 2px; accent-color: var(--ink); }
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card {
  text-align: left; padding: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: 4px;
}
.mode-card b { font-size: 15px; font-weight: 600; }
.mode-card span { font-size: 12px; color: var(--ink-2); }
.mode-card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatches { display: inline-flex; }
.swatches i { width: 12px; height: 12px; border-radius: 50%; margin-left: -4px; border: 1.5px solid var(--surface); }
.swatches i:first-child { margin-left: 0; }
.chip.on .swatches i { border-color: var(--ink); }

.tip-wrap { position: relative; display: inline-flex; }
.tip-btn { display: inline-flex; color: var(--ink-3); padding: 2px; }
.tip {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; z-index: 5;
  background: var(--ink); color: var(--surface); padding: 10px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.4;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.tip::before { content: ''; position: absolute; right: 8px; top: -5px; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); }
.tip-wrap:hover .tip, .tip-wrap.show .tip, .tip-btn:focus-visible + .tip { opacity: 1; transform: none; }
.store-tip-inline { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 9px 12px; border-radius: 10px; }

.onboard-hero { padding: 6px 0 10px; }
.onboard-hero .step { font-size: 11px; letter-spacing: .3em; color: var(--ink-3); font-weight: 600; }

/* liked grid */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini {
  position: relative; background: var(--surface); border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.mini.sel { box-shadow: 0 0 0 2px var(--ink); }
.mini-media { aspect-ratio: 4 / 4.4; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 35%, #fff 0%, var(--tint, #EEF1EE) 80%); }
.mini-media svg.garment { width: 78%; height: 84%; }
.mini-media .collage { width: 100%; height: 100%; }
.mini-media .collage .cell svg.garment { width: 86%; height: 86%; }
.mini-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mini-body .brandline { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.mini-body .t { font-size: 13.5px; font-weight: 500; line-height: 1.25; }
.mini-body .p { font-size: 14px; font-weight: 700; margin-top: 2px; }
.mini-body .s { font-size: 11px; color: var(--ink-3); }
.mini-body .btn { margin-top: 8px; }
.mini-x {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(249, 249, 248, .92); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
.mini-check {
  position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(249, 249, 248, .92); border: 1.5px solid var(--ink-3); display: grid; place-items: center; color: transparent;
}
.mini.sel .mini-check { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty-state h3 { color: var(--ink); margin: 12px 0 6px; font-weight: 600; }
.empty-state .ic { width: 36px; height: 36px; stroke-width: 1.3; color: var(--ink-3); }

/* compare */
.compare-grid { display: grid; gap: 10px; }
.compare-col { background: var(--surface-2); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.compare-col .mini-media { aspect-ratio: 1; }
.compare-rows { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; flex: 1; }
.compare-rows .k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.compare-rows .v { font-weight: 500; }
.best { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: var(--ink); color: var(--surface); margin-left: 4px; vertical-align: 2px; }
.size-ok { color: var(--ok); font-weight: 600; }
.size-no { color: var(--warn); font-weight: 600; }

/* cart */
.budget {
  background: var(--surface-2); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px;
}
.budget-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.budget-top b { font-size: 22px; font-weight: 700; }
.budget-top span { font-size: 13px; color: var(--ink-2); }
.bar { height: 8px; border-radius: 4px; background: #DCE2DE; margin: 10px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width .4s var(--ease); }
.bar.over i { background: var(--warn); }
.budget-note { font-size: 12.5px; color: var(--ink-2); }
.budget-note.over { color: var(--warn); font-weight: 600; }

.group { border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); margin-bottom: 14px; overflow: hidden; }
.group-head { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--surface-2); }
.group-head .btn { flex: none; }
.group-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.group-head h3 small { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.line { display: flex; gap: 12px; align-items: center; padding: 10px 16px; }
.line + .line { border-top: 1px solid var(--surface-2); }
.thumb { width: 54px; height: 62px; border-radius: 10px; flex: none; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 35%, #fff 0%, var(--tint, #EEF1EE) 80%); }
.thumb svg.garment { width: 86%; height: 86%; }
.line-info { flex: 1; min-width: 0; }
.line-info .t { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-info .s { font-size: 12px; color: var(--ink-3); }
.line .p { font-weight: 700; font-size: 14px; white-space: nowrap; }
.line .rm { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.line .rm:hover { background: var(--surface-2); color: var(--ink); }
.grand { display: flex; flex-direction: column; flex: 1; }
.grand span { font-size: 12px; color: var(--ink-3); }
.grand b { font-size: 18px; }

/* express */
.express-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.express-progress .bar { flex: 1; margin: 0; }
.ex-list { display: flex; flex-direction: column; gap: 10px; }
.ex-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; text-decoration: none;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .25s, background .25s, transform .25s var(--ease), opacity .25s;
}
.ex-num { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); }
.ex-item.current { box-shadow: 0 0 0 2px var(--ink), var(--shadow); transform: scale(1.01); }
.ex-item.current .ex-num { background: var(--ink); color: var(--surface); }
.ex-item.done { opacity: .62; background: var(--surface-2); box-shadow: none; }
.ex-item.done .ex-num { background: var(--ok); color: #fff; }
.ex-status { font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.ex-item.current .ex-status { color: var(--ink); }
.ex-item.done .ex-status { color: var(--ok); }
.ex-item:not(.current):not(.done) .ex-status { color: var(--ink-3); font-weight: 500; }
.ex-done {
  margin-top: 14px; padding: 16px; border-radius: 16px; background: #E3EEE7; color: #1F4A35; font-size: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ex-note { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 92px); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  transition: opacity .2s, transform .25s var(--ease);
  display: flex; align-items: center; gap: 12px; white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: #BFD4C6; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Small phones ---------- */
@media (max-height: 700px) {
  .card-info h2 { font-size: 17px; }
  .card-tags { padding-bottom: 12px; }
  .act-skip, .act-like { width: 52px; height: 52px; }
  .act-cart { height: 48px; }
}

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  .topbar { padding: 22px 32px 10px; }
  .brand-name { font-size: 28px; }
  .bottomnav {
    position: fixed; top: 22px; bottom: auto; left: auto; right: 96px; height: 48px;
    padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(249, 249, 248, .85); box-shadow: var(--shadow);
  }
  .nav-btn { flex-direction: row; gap: 10px; padding: 0 18px; font-size: 13.5px; border-radius: 999px; white-space: nowrap; }
  .nav-btn.active { background: var(--ink); color: var(--surface); }
  .nav-btn.active .badge { border-color: var(--ink); background: var(--surface); color: var(--ink); }
  .discover { padding: 6px 32px 18px; }
  .deck { max-width: 440px; max-height: 640px; }
  .deck-wrap { align-items: center; }
  .kbd-hint { display: block; text-align: center; font-size: 12px; color: var(--ink-3); margin: 2px 0 0; letter-spacing: .04em; }
  .toast { bottom: 40px; }

  .sheet { left: 50%; right: auto; bottom: 50%; width: 560px; max-height: 86vh; border-radius: 26px;
    transform: translate(-50%, 54%) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .2s, visibility 0s .3s; }
  .sheet.open { transform: translate(-50%, 50%); opacity: 1; transition: transform .3s var(--ease), opacity .2s; }
  .sheet-head::before { display: none; }
  .sheet-head h2 { margin-top: 10px; }
  .sheet-head .icon-btn { margin-top: 6px; }
  .sheet-foot { border-radius: 0 0 26px 26px; padding-bottom: 14px; }

  .sheet.drawer { left: auto; right: 0; top: 0; bottom: 0; width: 480px; max-height: none; border-radius: 26px 0 0 26px;
    transform: translateX(105%); opacity: 1; }
  .sheet.drawer.open { transform: none; }
  .sheet.drawer .sheet-foot { border-radius: 0 0 0 26px; }
  .sheet-compare { width: 860px; }
  .grid2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) and (max-height: 760px) {
  .deck { max-height: 560px; }
}

/* ---------- Top bar: menu pill ---------- */
.top-actions { display: flex; gap: 8px; align-items: center; }
.install-btn {
  height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--ink); color: var(--surface);
  display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; letter-spacing: .02em;
}
.install-btn[hidden] { display: none; }
.install-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { counter-increment: s; display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.35; }
.install-steps li::before {
  content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--surface); font-weight: 700; font-size: 13px;
}
.install-steps .ic { vertical-align: -3px; }
.menu-pill {
  height: 44px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; max-width: 160px;
}
.menu-pill .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none;
}
.avatar.lg { width: 40px; height: 40px; font-size: 16px; }
.icon-btn.sm { width: 36px; height: 36px; box-shadow: none; background: var(--surface-2); flex: none; }

/* ---------- Form bits ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.field > span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.field input {
  height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--ink); }
.linkbtn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px; padding: 8px 2px; align-self: center;
}
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0 4px; }
.switch-row b { display: block; font-size: 14.5px; font-weight: 600; }
.switch-row span { font-size: 12.5px; color: var(--ink-2); }
.switch { width: 48px; height: 28px; border-radius: 14px; background: #C6CDC9; position: relative; flex: none; transition: background .2s; }
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s var(--ease);
}
.switch.on { background: var(--ink); }
.switch.on::after { transform: translateX(20px); }
.cat-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.cat-row { display: grid; grid-template-columns: 92px 1fr 68px; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
.cat-row small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 400; line-height: 1.2; }
.cat-row input { width: 100%; accent-color: var(--ink); }
.cat-row output { font-weight: 700; text-align: right; font-size: 13px; }
.alloc { display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); padding-top: 6px; border-top: 1px solid var(--line); }
.alloc small { color: var(--ink-3); }
.alloc.over { color: var(--warn); }
.sub-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 14px 0 8px; }
.memo {
  display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: #F4EFDF; color: #5A4A1E; font-size: 12.5px; line-height: 1.5; border-left: 3px solid #C9A649;
}

/* wiggle on cards */
.why span.wig { background: #E3C766; color: #1A1A1A; }

/* ---------- Budget bars (cart) ---------- */
.budget h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.bbar { position: relative; height: 10px; border-radius: 5px; background: #DCE2DE; margin: 10px 0 8px; overflow: hidden; }
.bbar .zone { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, rgba(201, 166, 73, .5) 0 4px, rgba(201, 166, 73, .18) 4px 8px); }
.bbar .fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ink); border-radius: 5px; transition: width .4s var(--ease); }
.bbar .fill.wig { background: #C9A649; }
.bbar .fill.over { background: var(--warn); }
.bbar .mark { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.budget-note.wig { color: #8A6D1E; font-weight: 600; }
.catspend { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #DCE2DE; font-size: 12px; color: var(--ink-2); }
.catspend div { display: flex; justify-content: space-between; }
.catspend .wig { color: #8A6D1E; font-weight: 600; }
.catspend .over { color: var(--warn); font-weight: 600; }

/* ---------- Wizard ---------- */
.sheet-wizard { height: 96dvh; max-height: 96dvh; }
.wiz-top { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 20px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 26px; height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.dots i.on { background: var(--ink); }
.step { display: block; font-size: 11px; letter-spacing: .3em; color: var(--ink-3); font-weight: 600; margin-top: 8px; }
.wiz-body h2 { font-size: 25px; margin: 6px 0 6px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; }
.wiz-body .lead { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.wiz-preview { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.quiz-collage { display: grid; gap: 8px; height: min(46dvh, 440px); }
.quiz-collage.n3 { grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; }
.quiz-collage.n3 .qcell:first-child { grid-row: span 2; }
.quiz-collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.qcell {
  position: relative; min-height: 0; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 35%, #fff 0%, var(--tint, #EEF1EE) 80%);
  display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .15s, transform .15s var(--ease);
}
.qcell:active { transform: scale(.98); }
.qcell svg.garment { width: 78%; height: 74%; margin-bottom: 14px; }
.qcell.sel { box-shadow: 0 0 0 3px var(--ink); }
.qcheck {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--ink-3); background: rgba(249, 249, 248, .92); display: grid; place-items: center; color: transparent;
}
.qcell.sel .qcheck { background: var(--ink); border-color: var(--ink); color: #fff; }
.qcell .cell-tag { text-align: left; }
.quiz-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 12px 2px 0; font-size: 13px; }
.quiz-meta b { display: block; font-size: 15px; }
.quiz-meta span { color: var(--ink-2); }
.wiz-foot { flex-direction: column; align-items: stretch; gap: 4px; }
.wiz-foot .row { display: flex; gap: 10px; }
.wiz-foot .btn { white-space: nowrap; padding: 0 16px; }
.wiz-foot .linkbtn { padding: 4px; }

/* ---------- Menu ---------- */
.prof-list { display: flex; flex-direction: column; gap: 8px; }
.prof { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); background: var(--surface); }
.prof.on { box-shadow: 0 0 0 2px var(--ink); }
.prof-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 6px 0; }
.prof-txt { flex: 1; min-width: 0; }
.prof-txt b { display: block; font-size: 15.5px; font-weight: 600; }
.prof-txt small { display: block; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-check { color: var(--ink); display: inline-flex; }
.menu-rows { display: flex; flex-direction: column; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--surface-2); text-align: left; font-weight: 500; font-size: 15px; }
.menu-row:last-child { border-bottom: 0; }
.menu-row small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }

@media (max-width: 380px) {
  .menu-pill { max-width: 120px; padding: 0 12px 0 10px; }
  .menu-pill > .ic { display: none; }
}
@media (min-width: 900px) {
  .bottomnav { right: auto; left: 50%; transform: translateX(-50%); }
  .sheet-wizard { width: 620px; height: min(860px, 92vh); max-height: 92vh; }
  .quiz-collage { height: min(40vh, 400px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
