/* ============================================================
   swish — editorial / luxury aesthetic (Net-a-Porter / Farfetch feel)
   Mobile-first. Renders as a centered phone on desktop.
   ============================================================ */

:root {
  --bg:       #e8e4dd;   /* greige page behind the phone */
  --app-bg:   #f7f2e9;   /* ivory — warmer/softer than pure white, matches the greige palette */
  --surface:  #fcf9f2;   /* cards / sheets / inputs — a hair lighter so they lift off the ivory bg */
  --btn:      #e9e0cc;   /* control buttons (pills/toggle/circles/chips) — a clear step darker so they read as buttons on the ivory bg */
  --btn-ink:  #4f4a42;   /* text on sand --btn buttons — darker than --ink-soft so it meets WCAG AA contrast on --btn */
  --ink:      #171513;   /* near-black */
  --ink-soft: #8d857a;
  --line:     #ece7e0;
  --placeholder: #efebe4;
  --buy:      #171513;
  --serif:    "Playfair Display", Georgia, "Times New Roman", serif;
  --radius:   12px;
  --shadow-card: 0 16px 40px -18px rgba(20,16,12,.42), 0 2px 8px -3px rgba(20,16,12,.12);
  --shadow-soft: 0 8px 24px -12px rgba(20,16,12,.20);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }   /* no long-press callout (image "Save", link preview) — a big "this is a webpage" tell */

html, body {
  margin: 0; padding: 0; height: 100%;
  color-scheme: light;   /* intentional light editorial design — keep form controls/caret/scrollbars light in dark-mode OS */
  background: var(--bg); color: var(--ink);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overscroll-behavior: none;
  touch-action: manipulation;   /* disable double-tap-to-zoom app-wide (iOS-reliable); pinch + scroll + card drag unaffected */
  -webkit-user-select: none; user-select: none;   /* native feel: no accidental text selection on a swipe app */
}
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }   /* but keep editing/selection in form fields */

/* ---------- app shell ---------- */
.app {
  display: flex; flex-direction: column;
  width: 100%; max-width: 440px; height: 100vh; height: 100dvh; margin: 0 auto;   /* vh first as the iOS 15.0–15.3 fallback; dvh (15.4+) overrides where supported */
  background: var(--app-bg); position: relative; overflow: hidden;
}
@media (min-width: 480px) {
  body { display: flex; align-items: center; justify-content: center; background: #e1dcd3; }
  .app {
    height: min(880px, 94vh); height: min(880px, 94dvh); border-radius: 34px;
    box-shadow: 0 40px 90px -32px rgba(20,16,12,.5), 0 0 0 9px #fff, 0 0 0 11px #d8d1c6;
  }
}

/* ---------- top bar ---------- */
.topbar { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 8px; flex: 0 0 auto; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: .3px; color: var(--ink); }
.brand .dot { color: var(--ink); }
.tabs { display: flex; gap: 2px; justify-content: space-between; }
.tab {
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-weight: 500; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); padding: 6px 3px; border-radius: 0; min-height: 44px;
  display: inline-flex; align-items: center; gap: 5px; transition: .18s; border-bottom: 1.5px solid transparent;
}
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.badge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.badge-drop { background: #9c5566; }
.badge:empty, .badge[data-zero="1"] { display: none; }

/* ---------- views ---------- */
.main { flex: 1 1 auto; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: none; flex-direction: column; }
.view.is-active { display: flex; }
.view-title { font-family: var(--serif); margin: 8px 20px 14px; font-size: 25px; font-weight: 600; }
.view-sub { margin: -4px 20px 16px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

/* ============================================================ FEED */
#view-feed { padding: 0 20px 14px; }
.feedbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 10px; flex: 0 0 auto; }
.fb-btn {
  border: 1px solid var(--line); cursor: pointer; font-family: inherit; font-weight: 500;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: var(--btn); border-radius: 999px; padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.fb-btn svg { width: 13px; height: 13px; fill: var(--ink); }
.fb-btn:active { transform: scale(.97); }
.fb-left { display: flex; gap: 8px; }
.fb-deals.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fb-deals.on svg { fill: #fff; }

/* department toggle (Women / Men) */
.deptbar { display: flex; justify-content: center; padding: 2px 0 12px; flex: 0 0 auto; }
.dept-btn { border: 1px solid var(--line); background: var(--btn); cursor: pointer; font-family: inherit; font-weight: 500;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--btn-ink); padding: 8px 26px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; transition: .14s; }
.dept-btn:first-child { border-radius: 999px 0 0 999px; }
.dept-btn:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.dept-btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.stack { position: relative; flex: 1 1 auto; margin-top: 2px; min-height: 0; touch-action: pan-y; }

.card {
  position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--placeholder); box-shadow: var(--shadow-card);
  will-change: transform; user-select: none; touch-action: none; transform-origin: 50% 130%; cursor: grab;
}
.card.dragging { cursor: grabbing; transition: none !important; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: var(--placeholder); }
.card .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink-soft); background: var(--placeholder); font-size: 58px; }
.card .ph span { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }

.card .top-scrim { position: absolute; top: 0; left: 0; right: 0; height: 72px; background: linear-gradient(to bottom, rgba(20,16,12,.34), transparent); pointer-events: none; z-index: 4; }
.card .dots { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 6; pointer-events: none; }
.card .dots .dot { flex: 1; height: 2px; background: rgba(255,255,255,.4); transition: background .2s; }
.card .dots .dot.on { background: var(--surface); }

.card .scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background: linear-gradient(to top, rgba(20,16,12,.85) 2%, rgba(20,16,12,.3) 44%, transparent 100%); pointer-events: none; }

.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px 24px; color: #fff; transition: opacity .25s ease; }
.card .c-brand { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; opacity: .92; margin-bottom: 7px; }
.card .c-name { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.2; margin-bottom: 11px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .c-meta { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.card .c-price { font-size: 16px; font-weight: 600; }
.card .c-saved { font-size: 10px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.card .c-sizes { font-size: 10px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; opacity: .78; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card .c-was { font-size: 13px; color: rgba(255,255,255,.6); text-decoration: line-through; }
.card .sale-badge { position: absolute; top: 22px; right: 14px; z-index: 6; background: #9c3f54; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .05em; padding: 5px 9px; }
/* like-count chip — hidden until SHOW_LIKE_COUNTS + a backend provide real totals */
.card .like-count { position: absolute; top: 20px; left: 14px; z-index: 6; display: inline-flex; align-items: center; background: rgba(20,16,12,.5); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 11px; font-weight: 500; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px; }
.card .like-count[hidden] { display: none; }
.card .c-shop {
  border: 1px solid rgba(255,255,255,.65); background: transparent; color: #fff; cursor: pointer;
  font-family: inherit; font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding: 12px 24px;
}
.card .c-shop:active { transform: scale(.97); }

.card[data-depth="0"] { z-index: 30; }
.card[data-depth="1"] { z-index: 20; transform: translateY(12px) scale(.96); filter: brightness(.99); }
.card[data-depth="2"] { z-index: 10; transform: translateY(24px) scale(.92); filter: brightness(.97); }
.card:not([data-depth="0"]) .info { opacity: 0; }   /* hide brand/title on back cards so the deck peek shows a clean edge, not stray letters */
.card.settle { transition: transform .35s cubic-bezier(.2,.8,.25,1), filter .35s; }
.card.fly-right { transition: transform .45s ease-out; transform: translate(140%, -40px) rotate(18deg) !important; }
.card.fly-left  { transition: transform .45s ease-out; transform: translate(-140%, -40px) rotate(-18deg) !important; }

.stamp { position: absolute; top: 28px; padding: 7px 16px; font-size: 14px; font-weight: 500; letter-spacing: .24em; border: 1.5px solid; opacity: 0; pointer-events: none; text-transform: uppercase; color: #fff; border-color: #fff; }
.stamp.like { left: 24px; transform: rotate(-9deg); }
.stamp.nope { right: 24px; transform: rotate(9deg); }

/* The deck's back cards translate down into this row, so the hint text was trapped behind them —
   only its left/right ends ("d…", "…o") ever peeked out as stray letters. Keep the row as a spacer
   (so the deck peek has somewhere to land and the layout doesn't shift) but hide the text. */
.hint { text-align: center; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding: 12px 0 8px; flex: 0 0 auto; visibility: hidden; }

.feed-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--ink-soft); text-align: center; }
.feed-empty[hidden] { display: none; }
.feed-empty .empty-emoji { font-size: 40px; opacity: .5; }
.link-btn { border: 0; background: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* action bar */
.actionbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 6px 0 calc(10px + var(--safe-b)); }
.act { cursor: pointer; background: var(--btn); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: transform .12s; }
.act:active { transform: scale(.9); }
.act svg { width: 42%; height: 42%; fill: currentColor; }
.act--rewind { width: 42px; height: 42px; color: var(--ink-soft); }
.act--nope   { width: 54px; height: 54px; color: var(--ink); }
.act--buy    { width: 60px; height: 60px; color: #fff; background: var(--ink); border-color: var(--ink); }
.act--like   { width: 48px; height: 48px; color: #fff; background: var(--ink); border-color: var(--ink); }
.act:disabled { opacity: .4; cursor: default; transform: none; }

/* ============================================================ LIKES */
#view-likes { overflow-y: auto; padding-bottom: calc(18px + var(--safe-b)); }
.likes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 20px; }
.like-card { border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.like-card .thumb { aspect-ratio: 3/4; background: var(--placeholder); position: relative; }
.like-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.like-card .thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--ink-soft); }
.like-card .meta { padding: 10px 12px 13px; }
.like-card .lc-brand { font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.like-card .lc-name { font-family: var(--serif); font-size: 15px; font-weight: 500; line-height: 1.3; margin: 4px 0 9px; min-height: 38px; }
.like-card .lc-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.like-card .lc-price { font-size: 14px; font-weight: 600; }
.like-card .lc-was { font-size: 11px; color: var(--ink-soft); text-decoration: line-through; font-weight: 400; }
.like-card .lc-buy { border: 1px solid var(--ink); cursor: pointer; font-family: inherit; font-weight: 500; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--surface); padding: 8px 13px; }
.empty { margin: auto; text-align: center; color: var(--ink-soft); display: none; }
.empty-emoji { font-size: 46px; margin-bottom: 10px; opacity: .55; }
.empty p { line-height: 1.6; font-size: 14px; }

/* ============================================================ DROPS */
#view-drops { overflow-y: auto; padding: 0 20px calc(18px + var(--safe-b)); }
.drop-banner { width: 100%; text-align: left; border: 1px solid var(--line); cursor: pointer; font-family: inherit; font-size: 12px; letter-spacing: .03em; font-weight: 500; color: var(--ink); background: #faf7f2; padding: 13px 15px; border-radius: 8px; margin-bottom: 14px; }
.drop-banner[hidden] { display: none; }
.drop-banner b { font-weight: 700; }
.drops-list { display: flex; flex-direction: column; gap: 12px; }
.drop-row { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px; box-shadow: var(--shadow-soft); }
.d-thumb { width: 84px; height: 106px; flex: 0 0 auto; border-radius: 5px; overflow: hidden; background: var(--placeholder); position: relative; }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--ink-soft); }
.d-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.alert { align-self: flex-start; font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; }
.alert.price { background: #f4e4e8; color: #9c3f54; }
.alert.stock { background: #e6efe8; color: #2f6b4f; }
.d-name { font-family: var(--serif); font-size: 15px; font-weight: 500; line-height: 1.25; margin: 7px 0 1px; }
.d-brand { font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.d-prices { display: inline-flex; align-items: baseline; gap: 7px; }
.d-old { font-size: 12px; color: var(--ink-soft); text-decoration: line-through; }
.d-new { font-size: 15px; font-weight: 600; color: var(--ink); }
.d-buy { border: 1px solid var(--ink); cursor: pointer; font-family: inherit; font-weight: 500; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--surface); padding: 8px 13px; }

/* ============================================================ STATS */
#view-stats { overflow-y: auto; padding: 0 20px calc(18px + var(--safe-b)); }
.funnel { display: flex; flex-direction: column; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; box-shadow: var(--shadow-soft); }
.stat-num { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1; }
.stat-label { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.stat .muted { color: var(--ink-soft); text-transform: none; letter-spacing: 0; font-weight: 400; }
.stat--hero { background: var(--ink); color: #fff; border: 0; }
.stat--hero .muted { color: rgba(255,255,255,.72); }
.stat-foot { font-size: 11px; margin-top: 7px; opacity: .82; text-transform: none; letter-spacing: 0; }
.sub { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 22px 0 10px; }
.taste { display: flex; flex-wrap: wrap; gap: 8px; }
.taste .chip { font-size: 11px; font-weight: 500; padding: 7px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; gap: 6px; }
.taste .chip b { color: var(--ink); font-weight: 700; }
.taste .muted { color: var(--ink-soft); font-size: 13px; }
.reset { margin-top: 24px; width: 100%; padding: 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--btn); color: var(--btn-ink); font-family: inherit; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.disclosure { font-size: 11px; color: var(--ink-soft); line-height: 1.6; margin-top: 14px; }

/* ---------- toast ---------- */
.toast { position: absolute; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; letter-spacing: .03em; font-weight: 500; padding: 11px 18px; border-radius: 999px; white-space: nowrap; transition: opacity .22s, transform .22s; z-index: 100; max-width: 90%; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- chips (filter sheet + onboarding) ---------- */
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { border: 1px solid var(--line); background: var(--btn); cursor: pointer; font-family: inherit; font-weight: 500; font-size: 12px; letter-spacing: .02em; color: var(--ink); padding: 10px 17px; border-radius: 999px; transition: .14s; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.fchip:active { transform: scale(.96); }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip[hidden] { display: none; }
/* brand search box (the brand list is long now) */
.brand-search { width: 100%; box-sizing: border-box; border: 1px solid var(--line); background: var(--surface); font-family: inherit; font-size: 13px; color: var(--ink); padding: 9px 12px; margin-bottom: 11px; }
.brand-search::placeholder { color: var(--ink-soft); }
.brand-search:focus { outline: none; border-color: var(--ink); }

/* ---------- onboarding overlay ---------- */
.overlay { position: absolute; inset: 0; z-index: 200; background: rgba(20,16,12,.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: flex-end; }
.overlay[hidden] { display: none; }
.ob-card { width: 100%; max-height: 94%; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 28px 24px calc(24px + var(--safe-b)); box-shadow: 0 -24px 60px -24px rgba(20,16,12,.45); animation: slideUp .32s cubic-bezier(.2,.8,.25,1); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ob-emoji { font-size: 32px; }
.ob-card h2 { font-family: var(--serif); font-size: 27px; font-weight: 600; margin: 8px 0 4px; }
.ob-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.ob-q { margin-bottom: 20px; }
.ob-q h3 { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.ob-start { width: 100%; border: 0; cursor: pointer; font-family: inherit; font-weight: 500; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 16px; border-radius: 8px; }
.ob-skip { display: block; margin: 14px auto 0; border: 0; background: none; cursor: pointer; font-family: inherit; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- filter & currency sheet ---------- */
.sheet-backdrop { position: absolute; inset: 0; z-index: 150; background: rgba(20,16,12,.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sheet-backdrop[hidden] { display: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 160; background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 22px calc(20px + var(--safe-b)); max-height: 88%; overflow-y: auto; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.25,1); box-shadow: 0 -24px 60px -24px rgba(20,16,12,.45); }
.sheet.up { transform: translateY(0); }
.sheet[hidden] { display: none; }
.sheet-grab { width: 36px; height: 4px; border-radius: 3px; background: #e2dcd3; margin: 6px auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.sheet-head #sheetDone { border: 0; cursor: pointer; font-family: inherit; font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 9px 18px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.sheet-body h3 { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.sheet-hint { font-size: 10px; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--ink-soft); }
.sheet-clear { margin-top: 18px; width: 100%; border: 1px solid var(--line); background: var(--btn); cursor: pointer; font-family: inherit; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--btn-ink); padding: 15px; border-radius: 999px; min-height: 44px; }

/* always-visible segments (Sort / Price / Currency) */
.fseg { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.fseg:first-child { border-top: 0; padding-top: 6px; }
/* focused currency picker (currency button) — show only the currency options, not the filters */
.sheet.cur-only .sheet-body > * { display: none; }
.sheet.cur-only #segCurrency { display: block; border-top: 0; padding-top: 4px; }
.sheet.cur-only #segCurrency .fseg-h { display: none; }   /* the sheet title already says "Currency" */
.fseg-h { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }

/* collapsible filter sections */
.fsec { border-top: 1px solid var(--line); }
.fsec-head { width: 100%; display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); padding: 16px 2px; }
.fsec-c { color: #fff; background: var(--ink); border-radius: 999px; font-size: 10px; font-weight: 600; letter-spacing: 0; padding: 1px 7px; min-width: 17px; text-align: center; }
.fsec-c:empty { display: none; }
.chev { margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid var(--ink-soft); border-bottom: 1.6px solid var(--ink-soft); transform: rotate(45deg); transition: transform .2s; }
.fsec.open .chev { transform: rotate(-135deg); }
.fsec-body { display: none; padding: 2px 0 16px; }
.fsec.open .fsec-body { display: block; }

/* colour swatch on colour chips */
.fchip .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.fchip.on .sw { box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }

/* price range slider (dual handle) */
.pslider { position: relative; height: 54px; padding: 0 2px; }
.ps-rail { position: absolute; top: 13px; left: 2px; right: 2px; height: 4px; background: var(--line); border-radius: 4px; }
.ps-fill { position: absolute; height: 100%; background: var(--ink); border-radius: 4px; }
.pslider input[type=range] { position: absolute; top: 4px; left: 0; width: 100%; height: 22px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.pslider input[type=range]::-webkit-slider-runnable-track { background: none; height: 22px; }
.pslider input[type=range]::-moz-range-track { background: none; }
.pslider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 0 1px 5px rgba(20,16,12,.3); cursor: grab; }
.pslider input[type=range]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 0 1px 5px rgba(20,16,12,.3); cursor: grab; }
.ps-vals { position: absolute; top: 30px; left: 2px; right: 2px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink); }
/* manual price entry */
.ps-inputs { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.ps-inputs input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-family: inherit; font-size: 13px; color: var(--ink); background: var(--surface); -webkit-appearance: none; appearance: none; }
.ps-inputs input:focus { outline: none; border-color: var(--ink); }
.ps-inputs input::-webkit-outer-spin-button, .ps-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-dash { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }

/* likes management: clear-all + per-item remove */
.likes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.likes-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.clear-likes { border: 1px solid var(--line); background: var(--btn); cursor: pointer; font-family: inherit; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--btn-ink); padding: 9px 14px; border-radius: 999px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.clear-likes[hidden] { display: none; }
.like-card .lc-x { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(20,16,12,.5); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.like-card .lc-x::before { content: ""; position: absolute; inset: -9px; }   /* 44px hit target */
.like-card .lc-x:active { transform: scale(.9); }

/* ============================================================ OUTFIT (collage builder) */
.act--outfit { width: 48px; height: 48px; color: #fff; background: #9c3f54; border-color: #9c3f54; }
.badge-outfit { background: #9c3f54; }
#view-outfit { overflow-y: auto; padding-bottom: calc(18px + var(--safe-b)); }
.outfit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 20px 4px; }
.outfit-head .view-title { margin: 0; }
.of-clear { border: 1px solid var(--line); background: var(--btn); cursor: pointer; font-family: inherit; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--btn-ink); padding: 9px 14px; border-radius: 999px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.of-clear[hidden] { display: none; }
.outfit-list { padding: 0 20px; }
.of-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.of-row:last-child { border-bottom: 0; }
.of-thumb { width: 46px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--placeholder); flex: 0 0 auto; position: relative; }
.of-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.of-thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--ink-soft); }
.of-info { flex: 1; min-width: 0; }
.of-slotlabel { font-size: 8px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.of-brandname { font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.25; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.of-addtext { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.of-price2 { font-size: 13px; font-weight: 600; white-space: nowrap; }
.of-rx { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-soft); font-size: 19px; line-height: 1; cursor: pointer; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 0; }
.of-rx::before { content: ""; position: absolute; inset: -8px; }   /* 44px hit target */
.of-rx:active { transform: scale(.88); }
.of-thumb--empty { background: transparent; border: 1.5px dashed rgba(20,16,12,.18); display: flex; align-items: center; justify-content: center; }
.of-thumb--empty .of-plus { font-size: 18px; color: #bcb3a6; }
.outfit-stylist { margin: 18px 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.outfit-stylist[hidden] { display: none; }
.os-head { display: flex; align-items: center; gap: 6px; margin-bottom: 11px; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.os-head .os-note { text-transform: none; letter-spacing: 0; }
.os-row { display: flex; gap: 10px; }
.os-card { flex: 0 0 auto; width: calc((100% - 20px) / 3); min-width: 0; cursor: pointer; }
.os-card .os-img { aspect-ratio: 3/4; background: var(--placeholder); position: relative; border-radius: 8px; overflow: hidden; }
.os-card .os-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-card .os-lbl { font-size: 10px; color: var(--ink-soft); padding: 6px 1px 0; display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outfit-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 20px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.outfit-foot[hidden] { display: none; }
.of-count { font-size: 11px; color: var(--ink-soft); }
.of-total { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.of-share { border: 1px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; font-family: inherit; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; }
.of-share:active { transform: scale(.97); }

/* a11y/perf polish: 44px tap targets, visible keyboard focus, GPU hint while dragging */
.act { min-width: 44px; min-height: 44px; }
.card.dragging { will-change: transform; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* polish: clamp long names, toast above sheet, notch safe-area */
.like-card .lc-name, .d-meta .d-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast { z-index: 200; }
.topbar { padding-top: calc(18px + env(safe-area-inset-top, 0px)); }

/* image fade-in — no greige pop / blank flash on first paint or carousel swap */
.card-img { opacity: 0; transition: opacity .28s ease; }
.card-img.ready { opacity: 1; }
/* swipe stamps fade out with the card on snap-back */
.stamp { transition: opacity .2s ease; }
/* price slider: base z-index (JS raises the grabbable handle); fill aligned to full rail */
.pslider input[type=range] { z-index: 3; }
.ps-rail { left: 0; right: 0; }
/* a11y: stronger muted-text contrast + respect reduced motion */
:root { --ink-soft: #6f6a61; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ============================================================ ACCOUNT */
#view-account { overflow-y: auto; padding: 0 20px calc(18px + var(--safe-b)); }
.acct-note { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 18px; }
.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-form input[type="email"], .acct-form input[type="password"], .acct-form input[type="date"], .acct-form input[type="text"] {
  font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; width: 100%; min-height: 44px;
}
.acct-form input:focus { outline: none; border-color: var(--ink); }
.acct-dob-l { display: flex; flex-direction: column; gap: 5px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.acct-err { font-size: 13px; color: #9c3f54; }
.acct-err.ok { color: #2f7d52; }   /* resend-confirmation success, not an error */
.acct-err[hidden] { display: none; }
.acct-submit { font-family: inherit; font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: 14px; cursor: pointer; margin-top: 4px; min-height: 44px; }
.acct-submit:active { transform: scale(.98); }
.acct-submit:disabled { opacity: .6; }
.acct-toggle { background: 0; border: 0; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--ink-soft); text-decoration: underline; margin: 16px auto 0; display: block; }
.acct-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.acct-email { font-family: var(--serif); font-size: 18px; font-weight: 600; word-break: break-all; }
.acct-card .acct-meta { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.acct-out { font-family: inherit; font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); border-radius: 999px; padding: 12px 20px; cursor: pointer; min-height: 44px; }
.acct-link { display: block; margin-top: 18px; font-size: 12px; color: var(--ink-soft); text-decoration: underline; }
.acct-delete { display: block; margin-top: 14px; background: none; border: 0; padding: 8px 0; min-height: 44px; font-family: inherit; font-size: 12px; letter-spacing: .04em; color: #9c3f54; cursor: pointer; }
.acct-delete:active { opacity: .6; }
