/* Costume Finders — "Trick-or-Treat" design system (F6q): chunky cream outlines, Bricolage Grotesque
 * with DM Mono labels, vibrant accents and the ghost-peeking wordmark. Midnight by default when the
 * phone is in dark mode, a warm cream version when it's in light mode. */
/* fonts:start — self-hosted copies of the three typefaces (public/fonts, SIL OFL), so the page needs no
 * third-party stylesheet before it can paint. scripts/build-static.js strips this block and links Google
 * Fonts instead, because its one-file build has nowhere to put font files. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("/fonts/bricolage-grotesque-v9-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Unbounded sets only the wordmark ("costumefinders"), so this is just those twelve letters: 2 KB instead of 23. */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/unbounded-v12-800-logo.woff2") format("woff2"); unicode-range: U+0063-0066, U+0069, U+006D-006F, U+0072-0075; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/dm-mono-v16-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Arial sized to Bricolage Grotesque's metrics (average advance 0.535 em vs Arial's 0.441 em; ascent 930,
 * descent 270 per 1000), so if the real font arrives after the first paint, lines wrap the same way and
 * nothing moves when it swaps in. */
@font-face { font-family: "Bricolage Grotesque Fallback"; src: local("Arial"); size-adjust: 121.2%; ascent-override: 76.73%; descent-override: 22.28%; line-gap-override: 0%; }
/* fonts:end */
:root {
  /* light (warm cream) */
  --bg: #FFF8EE;
  --card: #FFFFFF;
  --sunk: #F5EDE0;
  --ink: #1C1633;
  --ink-2: #5A5272;
  --ink-3: #6E6685;
  --line: #E2D7C6;
  --edge: #1C1633;
  --chip: #FFFFFF;
  --brand: #D4560A;
  --orange: #FF7A1A;
  --blue: #4DA6FF;
  --green: #6EE07A;
  --pink: #FF6BB0;
  --violet: #B08CFF;
  --cyan: #3FD0E8;
  --amber: #FFB23F;
  --on-accent: #120F22;
  --lead: rgba(176, 140, 255, 0.4);
  --canvas: #F4EFE6;
  --ghost: #FFFFFF;
  --ghost-line: #1C1633;
  --ghost-eye: #1C1633;
  --ghost-edge: #1C1633;
  --scrim: rgba(18, 15, 34, 0.45);
  --shadow: 0 24px 60px rgba(28, 22, 51, 0.18);
  --font-ui: "Bricolage Grotesque", "Bricolage Grotesque Fallback", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-logo: "Unbounded", "Bricolage Grotesque", system-ui, sans-serif;
  --font-display: var(--font-ui); /* older pages (admin) */
  --save: #C2185B;
  --gutter: 16px;
  --gap: 12px;
  --nav-h: 66px;
  --top-h: 60px;
  --r: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120F22;
    --card: #1E1934;
    --sunk: #171329;
    --ink: #F3EEFF;
    --ink-2: #B8AFD6;
    --ink-3: #8F87AD;
    --line: #4B4370;
    --edge: #F3EEFF;
    --chip: #120F22;
    --brand: #FF7A1A;
    --canvas: #ECE6F7;
    --ghost: #F3EEFF;
    --ghost-line: transparent;
    --ghost-eye: #120F22;
    --ghost-edge: #120F22;
    --scrim: rgba(5, 3, 14, 0.66);
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120F22;
  --card: #1E1934;
  --sunk: #171329;
  --ink: #F3EEFF;
  --ink-2: #B8AFD6;
  --ink-3: #8F87AD;
  --line: #4B4370;
  --edge: #F3EEFF;
  --chip: #120F22;
  --brand: #FF7A1A;
  --canvas: #ECE6F7;
  --ghost: #F3EEFF;
  --ghost-line: transparent;
  --ghost-eye: #120F22;
  --ghost-edge: #120F22;
  --scrim: rgba(5, 3, 14, 0.66);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.mono, .caps { font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.no-squads .squad-only { display: none !important; }
.no-squads .nav { grid-template-columns: repeat(4, 1fr); }

.app { max-width: 1480px; margin: 0 auto; padding-inline: var(--gutter); padding-block: 0 calc(var(--nav-h) + 36px); }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  margin-inline: calc(var(--gutter) * -1);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
}
.top-row { display: flex; align-items: center; gap: 14px; height: var(--top-h); }
.top-spacer { flex: 1; }
/* Join-by-code in the header, desktop only: the same 44px height as the account button next to it. */
.top-join { display: none; align-items: center; flex: none; height: 44px; padding: 0 4px 0 12px; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); }
.top-join:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.top-join input { width: 162px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: 500 13.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.top-join input::placeholder { text-transform: none; letter-spacing: 0; font: 600 14px var(--font-ui); color: var(--ink-3); }
.top-join input:focus-visible { outline: none; }
.top-join .btn.small { min-height: 32px; padding: 0 12px; border-radius: 8px; border-width: 0; }
.brand { text-decoration: none; display: flex; align-items: center; min-height: 44px; padding-top: 6px; flex: none; }

/* The wordmark: "costumefinders" in Unbounded with a ghost peeking over the f, hands on the letters.
 * The ghost's box is anchored to the text baseline (an empty inline-block sits on it), so it tracks the font size. */
.logo { position: relative; isolation: isolate; display: inline-block; font-family: var(--font-logo); font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; color: var(--brand); }
.logo-anchor { position: relative; display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.logo-anchor svg { position: absolute; left: -0.517em; bottom: 0.514em; width: 0.736em; height: 0.529em; overflow: visible; }
.logo-back { z-index: -1; }
.logo-front { z-index: 1; }
.g-body { fill: var(--ghost); stroke: var(--ghost-line); stroke-width: 3; }
.g-eye { fill: var(--ghost-eye); }
.g-hand { fill: var(--ghost); stroke: var(--ghost-edge); stroke-width: 2.5; }

.desk-nav { display: none; gap: 2px; align-items: center; margin-left: 10px; }
.desk-nav button { height: 44px; padding: 0 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; white-space: nowrap; }
.desk-nav button:hover { color: var(--ink); }
.desk-nav button[aria-current="page"] { color: var(--ink); font-weight: 800; }
/* The active underline sits under the word only — never under the Saved count badge. */
.desk-nav button[aria-current="page"] > span:first-child { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; text-decoration-color: var(--orange); }
.nav-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--orange); color: var(--on-accent); font: 500 11.5px/22px var(--font-mono); text-align: center; text-decoration: none; display: inline-block; }
/* Header top-right "Sign in" / account button: an outlined ghost button at nav height, so it reads
   as part of the quiet header (ink text) instead of a filled block competing with page CTAs. On
   phones a signed-in person sees just their initial. The static build (no API) hides it. */
.btn.cta { display: inline-flex; min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 12px; gap: 6px; background: transparent; color: var(--ink); border-color: var(--edge); }
.btn.cta:hover { background: var(--sunk); }
.btn.cta svg { width: 16px; height: 16px; }
.btn.cta.account.signed-in { padding-left: 8px; }
.acct-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; overflow: hidden; }
.acct-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
/* The icon picker: the ten icons as radios; the chosen one gets a ring. */
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.avatar-pick label { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.avatar-pick .acct-avatar { width: 40px; height: 40px; border: 2px solid var(--edge); transition: transform 0.12s; }
.avatar-pick input:checked + .acct-avatar { box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--ink); transform: scale(1.08); }
.avatar-pick input:focus-visible + .acct-avatar { outline: 3px solid var(--blue); outline-offset: 3px; }
.field-label { display: block; font-weight: 700; margin-bottom: 6px; }
.acct-email { margin: 0 0 14px; }
.no-squads .api-only { display: none !important; }
@media (max-width: 639px) {
  .btn.cta { min-height: 40px; padding: 0 12px; font-size: 14px; }
  .btn.cta.account.signed-in { padding: 0 6px; }
  .btn.cta.account.signed-in .acct-label { display: none; }
}

/* Slim filter bar: slides out from under the header once the filter panel has scrolled away. */
.fbar {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px var(--gutter) 10px;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
}
.top.compact .fbar { visibility: visible; opacity: 1; transform: none; transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
.fbar-toggle {
  flex: none; height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 14px;
  border: 2px solid var(--edge); border-radius: 14px; background: var(--card); color: var(--ink);
  font-weight: 800; font-size: 15.5px;
}
.fbar-toggle > svg { width: 18px; height: 18px; }
.fbar-toggle.active { background: var(--orange); color: var(--on-accent); }
.top.dropped .fbar-toggle { background: var(--ink); color: var(--bg); }
.fbar-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--on-accent); color: #F3EEFF; font: 500 11.5px/22px var(--font-mono); text-align: center; }
.top.dropped .fbar-badge { background: var(--orange); color: var(--on-accent); }
.fbar-arrow { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--ink); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fbar-toggle.active .fbar-arrow { background: rgba(18, 15, 34, 0.14); color: var(--on-accent); }
.top.dropped .fbar-arrow { transform: rotate(180deg); background: rgba(127, 116, 170, 0.25); color: inherit; }
.fbar-arrow svg { width: 16px; height: 16px; }
.fbar-toggle.nudge .fbar-arrow { animation: nudge 0.7s ease-in-out 2; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(4px); } 70% { transform: translateY(-1px); } }
/* The one search box physically moves into #fbar once the slim bar takes over mid-scroll (see
 * setCompact() in app.js), instead of a second input kept in sync — same element, same value,
 * same focus/cursor, just reparented. These rules just resize it to fit the slim bar when it's
 * there; .search's own rules (below, under "Explore head") cover it in its normal spot. */
.fbar .search { flex: 0 1 240px; min-width: 120px; max-width: none; }
.fbar .search input { height: 36px; border-radius: 12px; padding: 0 34px; font-size: 14px; }
.fbar .search > svg { width: 16px; height: 16px; left: 10px; }
.fbar .search .clear { width: 32px; height: 32px; right: 2px; }
.fbar-chips { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.fbar-chips::-webkit-scrollbar { display: none; }
.fbar-hint { font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.fbar-hint .touch { display: none; }
@media (hover: none), (pointer: coarse) { .fbar-hint .mouse { display: none; } .fbar-hint .touch { display: inline; } }
.fbar-count { flex: none; font: 500 12.5px var(--font-mono); letter-spacing: 0.04em; color: var(--ink-2); text-transform: uppercase; white-space: nowrap; }

/* The dropdown version of the filter panel, opened by hovering (or clicking) Filters mid-scroll. */
.fdrop {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
  max-height: calc(100vh - var(--top-h) - 90px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border: 2px solid var(--edge); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.24s;
}
.top.dropped .fdrop { visibility: visible; opacity: 1; transform: none; transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }

/* ---------- Explore head + filter panel ---------- */
.explore-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; padding-top: 14px; }
.add-costume { flex: none; min-height: 48px; gap: 6px; }
.add-costume svg { flex: none; }
.eh-title { flex: 1 1 320px; min-width: 0; }
.eh-title h2, .section-head h2 { margin: 0; font-weight: 800; font-size: 38px; line-height: 0.95; letter-spacing: -0.04em; text-wrap: balance; }
.eh-title p { margin: 8px 0 0; color: var(--ink-2); }
.search { position: relative; flex: 1 1 340px; max-width: 560px; }
.search input {
  width: 100%; height: 52px; border: 2px solid var(--edge); border-radius: 16px; background: var(--card);
  padding: 0 46px 0 48px; font-size: 16px; font-weight: 500; outline: none; -webkit-appearance: none; appearance: none;
}
.search input:focus-visible { box-shadow: 0 0 0 3px var(--blue); }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; pointer-events: none; }
.search .clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }

.fpanel {
  --fp: 0;
  margin-top: 16px;
  background: var(--card); border: 2px solid var(--edge); border-radius: var(--r);
  padding: 14px;
  opacity: calc(1 - var(--fp) * 0.9);
  transform: translateY(calc(var(--fp) * 14px)) scale(calc(1 - var(--fp) * 0.035));
  transform-origin: 50% 0;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.fp-grid { display: block; }
.fp-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.fp-group legend, .fp-label { padding: 0; margin-bottom: 10px; font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.fp-desk { display: none; }
.fpanel[aria-busy="true"] { cursor: progress; } /* the placeholder, until the whole catalog is in */
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-chips.sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fp-chips.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fp-chips.stack { flex-direction: column; flex-wrap: nowrap; }
.fp-quick { margin: 12px -14px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fp-quick::-webkit-scrollbar { display: none; }
.fp-quick .chips { display: flex; gap: 8px; padding: 0 14px 2px; width: max-content; }
.fp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--line); }
.fp-foot .spacer { flex: 1; }
.fp-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.fp-live { font: 500 12.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }

.fchip {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px;
  border: 2px solid var(--edge); border-radius: 12px; background: var(--chip); color: var(--ink);
  font-weight: 700; font-size: 14.5px; line-height: 1.1; white-space: nowrap; text-align: left;
}
.fchip.round { border-radius: 999px; padding: 0 14px; }
.fchip.wide { justify-content: flex-start; }
.fchip:hover { background: var(--sunk); }
.fchip[aria-pressed="true"] { background: var(--c, var(--orange)); color: var(--on-accent); }
.fchip .ck { display: none; width: 14px; height: 14px; flex: none; }
.fchip[aria-pressed="true"] .ck { display: block; }
.fchip small { font: 500 11px var(--font-mono); opacity: 0.8; margin-left: auto; padding-left: 4px; }
.fchip.sz { flex-direction: column; gap: 1px; min-height: 48px; padding: 4px 4px; }
.fchip.sz small { margin: 0; padding: 0; }
.fchip.sz .ck { display: none !important; }
.chip { /* phone quick picks */
  min-height: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 15px;
  border: 2px solid var(--edge); border-radius: 999px; background: var(--chip); color: var(--ink);
  font-weight: 700; font-size: 14.5px; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--c, var(--orange)); color: var(--on-accent); }
.chip svg { width: 16px; height: 16px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 1.5px solid var(--edge); }

.achip {
  height: 36px; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 12px;
  border: 2px solid var(--edge); border-radius: 999px; background: var(--c, var(--orange)); color: var(--on-accent);
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.achip svg { width: 12px; height: 12px; }

/* ---------- Results bar ---------- */
.bar { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; flex-wrap: wrap; }
.bar-promo { display: none; }
.bar .count, .count { font: 500 13px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar .spacer, .spacer { flex: 1; }
.sort-label { font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.select {
  appearance: none; -webkit-appearance: none;
  height: 44px; border: 2px solid var(--edge); border-radius: 12px; background-color: var(--card); color: var(--ink);
  font-weight: 700; font-size: 14.5px; padding: 0 34px 0 12px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.select option { color: #1C1633; background: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid var(--edge); border-radius: 14px; background: var(--card); color: var(--ink);
  font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--orange); color: var(--on-accent); }
.btn.save { background: var(--blue); color: var(--on-accent); }
.btn.go { background: var(--green); color: var(--on-accent); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.block { width: 100%; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn[aria-pressed="true"] svg { fill: currentColor; }
.textbtn { font-weight: 700; font-size: 14.5px; padding: 10px 2px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; color: var(--ink); min-height: 44px; }
.textbtn.u { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.textbtn .badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: var(--on-accent); font: 500 11.5px/22px var(--font-mono); text-align: center; text-decoration: none; }
.linkish { font-weight: 700; font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; min-height: 36px; padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; }
.linkish.dark { color: var(--ink); }
.linkish svg { width: 16px; height: 16px; }

/* ---------- Masonry of cards ---------- */
.masonry { display: flex; gap: var(--gap); align-items: flex-start; }
/* While the catalog is still downloading the grid holds a screen's worth of space, so the footer starts
 * below the fold instead of being pushed there when the cards arrive. */
.masonry[aria-busy="true"] { min-height: 100vh; }
.mcol { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pin { position: relative; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.pin-media { position: relative; border: 2px solid var(--edge); border-radius: 13px; overflow: hidden; background: var(--canvas); }
.pin-media .collage { display: block; width: 100%; height: auto; }
.pin-open { position: absolute; inset: 0; z-index: 1; border-radius: 11px; }
.pin-open:focus-visible { outline-offset: -4px; }
.pin-media::after { content: ""; position: absolute; inset: 0; background: rgba(18, 15, 34, 0); transition: background 0.15s; pointer-events: none; }
.pin-flag {
  position: absolute; left: 8px; top: 8px; z-index: 2; pointer-events: none;
  background: var(--c, var(--orange)); color: var(--on-accent); border: 2px solid #120F22; border-radius: 9px; padding: 2px 8px;
  font-weight: 700; font-size: 12.5px;
}
.pin-meta { padding: 0 4px; }
.pin-title { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.15; letter-spacing: -0.01em; }
.pin-by { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-sub { margin: 5px 0 0; color: var(--ink-2); font: 500 11px var(--font-mono); letter-spacing: 0.02em; text-transform: uppercase; display: flex; flex-wrap: wrap; gap: 2px 6px; }
.pin-sub span + span::before { content: "·"; margin-right: 6px; }
.pin-sub .have { color: var(--ink); }
.pin-sub .have::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: var(--green); border: 1.5px solid var(--edge); vertical-align: 0; }
.pin-actions { display: flex; gap: 6px; }
.pin-squad {
  flex: 1; min-width: 0; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 2px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden;
}
.pin-squad svg { width: 15px; height: 15px; flex: none; }
.pin-squad[aria-pressed="true"] { background: var(--green); color: var(--on-accent); }
.pin-save {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--ink);
}
.pin-save svg { width: 19px; height: 19px; }
.pin-save span { display: none; }
.pin-save[aria-pressed="true"] { background: var(--blue); color: var(--on-accent); }
.pin-save[aria-pressed="true"] svg { fill: currentColor; }
.pin-squad:hover, .pin-save:hover { background: var(--sunk); }
.pin-squad[aria-pressed="true"]:hover { background: var(--green); }
.pin-save[aria-pressed="true"]:hover { background: var(--blue); }
@media (hover: hover) and (pointer: fine) {
  .pin:hover .pin-media::after { background: rgba(18, 15, 34, 0.12); }
}

.empty { text-align: center; margin: 20px auto; max-width: 480px; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 28px 22px; }
.empty h3 { font-weight: 800; font-size: 26px; letter-spacing: -0.02em; margin: 0 0 8px; }
.empty p { color: var(--ink-2); margin: 0 0 18px; }
.sentinel { height: 1px; }
.loading-more { text-align: center; color: var(--ink-2); padding: 22px 0; font: 500 12.5px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }

/* Banners (closet promo, Halloweekend, shared lists) */
.promo, .shared-banner {
  display: flex; gap: 14px 22px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 2px dashed var(--line); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px;
}
.promo > div { flex: 1 1 260px; }
.promo h3 { margin: 0; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.promo p { margin: 6px 0 0; color: var(--ink-2); max-width: 56ch; }
.shared-banner { border-style: solid; border-color: var(--edge); margin: 18px 0; }
.shared-banner p { margin: 0; flex: 1 1 240px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

/* ---------- Bottom nav (phones) ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: var(--card); border-top: 2px solid var(--edge);
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav button {
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-weight: 600; font-size: 11.5px; color: var(--ink-2); position: relative; border-radius: 12px;
}
.nav button svg { width: 23px; height: 23px; }
.nav button[aria-current="page"] { color: var(--ink); font-weight: 800; }
.nav button[aria-current="page"] svg { color: var(--brand); }
.nav .count-badge { position: absolute; top: 4px; left: calc(50% + 7px); background: var(--orange); color: var(--on-accent); border: 2px solid var(--card); border-radius: 999px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; font: 500 10px var(--font-mono); }

/* ---------- Section pages (closet, saved, squads, DIY, styles) ---------- */
.section-head { margin: 22px 0 18px; }
.section-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 60ch; }
.panel { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 12px; font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.panel > h3:not(:first-child) { margin-top: 18px; }
.toggle-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--edge); border-radius: 999px; background: var(--chip); color: var(--ink);
  font-weight: 700; font-size: 14px;
}
.toggle:hover { background: var(--sunk); }
.toggle[aria-pressed="true"] { background: var(--c, var(--green)); color: var(--on-accent); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--sunk); border-radius: 14px; padding: 12px 14px; }
.stat strong { display: block; font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font: 500 11.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.stat.good strong { color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.muted { color: var(--ink-2); margin: 0; max-width: 62ch; }

/* Halloweekend planner */
.planner { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 18px; margin-bottom: 18px; }
.planner-head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-end; justify-content: space-between; }
.planner-head h3 { margin: 0; font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.planner-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 52ch; }
.nights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; max-width: 760px; }
.night { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.night .mini { border: 2px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--canvas); aspect-ratio: 3 / 4; width: 100%; }
.night .mini svg { width: 100%; height: 100%; display: block; }
.night .label { font: 500 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.night button.name { text-align: left; font-weight: 800; font-size: 15px; line-height: 1.2; }
.night .swap { align-self: flex-start; min-height: 36px; padding: 4px 0; }

/* My photos */
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.mine-item { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mine-img { background: var(--canvas); border: 2px solid var(--edge); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.mine-img img { max-width: 86%; max-height: 86%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18)); }
.mine-item figcaption { font-size: 13px; font-weight: 700; }
.mine-item .linkish { align-self: flex-start; padding-top: 0; }

/* ---------- Squads ---------- */
.sq-layout { display: grid; gap: 18px; }
.sq-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sq-col-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sq-col-head h2 { margin: 0; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.squad-card { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.squad-card.active { box-shadow: 0 0 0 4px var(--orange); }
.sq-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.sq-tag { background: var(--amber); color: var(--on-accent); border: 2px solid #120F22; border-radius: 8px; padding: 2px 8px; }
.sq-code { border: 2px dashed var(--line); border-radius: 8px; padding: 2px 8px; color: var(--ink); letter-spacing: 0.1em; white-space: nowrap; }
.friend-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.friend-code { font: 500 15px var(--font-mono); letter-spacing: 0.1em; border: 2px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.friend-email { margin-top: 10px; }
#friend-code-form input { text-transform: uppercase; }
#friend-code-form input::placeholder { text-transform: none; }
.sq-join { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.sq-join label { font-weight: 700; flex: 1 0 100%; }
.sq-join input { flex: 1 1 160px; min-width: 0; min-height: 44px; padding: 0 12px; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--ink); font: 500 15px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.sq-join input::placeholder { text-transform: none; letter-spacing: 0.04em; color: var(--ink-3); }
.sq-name { margin: 0; font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -0.03em; text-align: left; }
.sq-name button { text-align: left; font: inherit; }
.sq-name button:hover { text-decoration: underline; text-underline-offset: 4px; }
.sq-people { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sq-avatars { display: flex; flex: none; }
.sq-avatars .acct-avatar { width: 30px; height: 30px; border: 2px solid var(--edge); }
.sq-avatars .acct-avatar + .acct-avatar { margin-left: -8px; }
.sq-avatars.voters { margin-top: 6px; }
.admin-trend { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.admin-trend select { min-height: 32px; border: 2px solid var(--edge); border-radius: 8px; background: var(--card); color: var(--ink); padding: 0 6px; font: inherit; font-weight: 600; }
.sq-avatars.voters .acct-avatar { width: 24px; height: 24px; }
.poll-card-head .acct-avatar.poll-owner { width: 36px; height: 36px; margin-right: 2px; }
.poll-card-head > div { flex: 1; min-width: 0; }
.icon-as { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; }
.icon-as .acct-avatar.big { width: 44px; height: 44px; }
.sq-names { font-size: 14px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-poll-head b { display: block; font-weight: 800; font-size: 16px; }
.sq-poll-head span { font-size: 13.5px; color: var(--ink-2); }
.sq-poll { display: flex; flex-direction: column; gap: 8px; }
.sq-opt { display: flex; gap: 6px; align-items: stretch; }
.sq-vote {
  position: relative; flex: 1; min-width: 0; min-height: 48px; overflow: hidden; text-align: left;
  border: 2px solid var(--edge); border-radius: 14px; background: var(--sunk); color: var(--ink);
}
.sq-vote[disabled] { cursor: default; }
.sq-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--line); transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sq-opt.lead .sq-bar { background: var(--lead); }
.sq-vote[aria-pressed="true"] { background: var(--green); color: var(--on-accent); }
.sq-vote[aria-pressed="true"] .sq-bar { background: rgba(18, 15, 34, 0.12); }
.sq-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; }
.sq-row svg { width: 16px; height: 16px; flex: none; }
.sq-row .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.sq-row .vt { font: 500 12px var(--font-mono); white-space: nowrap; }
.sq-side { width: 44px; flex: none; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); display: grid; place-items: center; color: var(--ink); }
.sq-side svg { width: 16px; height: 16px; }
.sq-locked { display: flex; align-items: center; gap: 8px; background: var(--green); color: var(--on-accent); border: 2px solid var(--edge); border-radius: 14px; padding: 10px 12px; font-weight: 800; }
.sq-locked svg { width: 18px; height: 18px; flex: none; }
.sq-locked button { text-decoration: underline; text-underline-offset: 3px; font-weight: 800; text-align: left; }
.sq-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; border-top: 2px dashed var(--line); }
.sq-closes { font: 500 12px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.sq-empty-poll { font-size: 14px; color: var(--ink-2); background: var(--sunk); border-radius: 14px; padding: 12px; margin: 0; }
.sq-hero { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sq-hero h3 { margin: 0; font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.sq-hero p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.sq-steps { margin: 4px 0 6px; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: s; }
.sq-steps li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.sq-steps li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--edge); background: var(--amber); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.sq-feed-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.sq-feed-head h2 { margin: 0; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.sq-feed-head p { margin: 4px 0 0; color: var(--ink-2); }
.sq-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sq-filters::-webkit-scrollbar { display: none; }
.sq-pick { display: flex; flex-direction: column; gap: 8px; }
.sq-pick .toggle { justify-content: space-between; border-radius: 14px; min-height: 52px; width: 100%; }
.sq-pick .toggle small { font: 500 11.5px var(--font-mono); text-transform: uppercase; opacity: 0.8; }

/* ---------- Sheets (detail, filters, share, sign in, squads, menu) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; transition: opacity 0.2s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--edge); border-bottom: 0; border-radius: 22px 22px 0 0;
  max-height: calc(100% - 20px - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.show { transform: translateY(0); }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 4px; flex: none; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 var(--gutter) 20px; flex: 1; }
.sheet-foot { flex: none; display: flex; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 2px dashed var(--line); background: var(--card); }
.sheet-foot .btn { flex: 1; }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--ink); border: 2px solid var(--edge); display: grid; place-items: center; z-index: 3; }
.sheet-close svg { width: 18px; height: 18px; }
.sheet-title { font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -0.03em; margin: 16px 56px 6px 0; }
.sheet-lead { margin: 0 0 16px; color: var(--ink-2); }

.detail { display: grid; gap: 18px; }
.detail-media { border: 2px solid var(--edge); border-radius: 16px; overflow: hidden; background: var(--canvas); margin-top: 6px; }
.detail-media .collage { display: block; width: 100%; height: auto; max-height: 62vh; }
.detail .eyebrow { font: 500 12px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.detail h2 { font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.03em; margin: 8px 0 10px; text-wrap: balance; }
.detail .price { font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); }
.detail .price b { font-weight: 800; color: var(--ink); }
.detail .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border: 2px solid var(--edge); border-radius: 999px; font-weight: 700; font-size: 12.5px; }
.tag.dark { background: var(--c, var(--orange)); color: var(--on-accent); }
.detail h4 { margin: 22px 0 10px; font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.detail p.how { font-size: 16px; margin: 0; max-width: 62ch; }
.roles { display: grid; }
.role { padding: 10px 0; border-bottom: 2px dashed var(--line); display: grid; grid-template-columns: minmax(90px, 34%) 1fr; gap: 12px; }
.role b { font-weight: 800; font-size: 14px; }
.role span { color: var(--ink-2); font-size: 14px; }
.itemlist { display: grid; }
.item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.item .thumb { width: 64px; height: 64px; border-radius: 12px; border: 2px solid var(--edge); display: block; }
.item-row { display: flex; align-items: flex-start; gap: 10px; }
.item-row .nm { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 800; }
.item-row .nm small { display: block; font-weight: 500; color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.item-row .nm small.credit { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
button.have { border: 2px solid var(--edge); border-radius: 999px; min-height: 36px; padding: 0 12px; font-weight: 700; font-size: 13px; white-space: nowrap; background: var(--chip); }
button.have[aria-pressed="true"] { background: var(--green); color: var(--on-accent); }
.shops { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.shops a { font: 500 12px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.shops a.partner { color: var(--brand); }
.shops a .sub { color: var(--ink-2); margin-left: 4px; }
.disclosure { color: var(--ink-2); font-size: 12.5px; margin-top: 12px; }
.pick { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 14px; min-height: 44px; background: var(--orange); color: var(--on-accent); border: 2px solid var(--edge); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 800; }
.pick svg { width: 17px; height: 17px; flex: none; }
.pick .sub { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }
.expand { margin-top: 2px; }
.photo-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 2px 16px; align-items: center; margin-top: 2px; }
.detail-media-wrap { display: grid; gap: 8px; align-self: start; }
.media-hint { margin: 0; display: flex; gap: 6px; align-items: center; color: var(--ink-2); font: 500 11.5px var(--font-mono); letter-spacing: 0.02em; text-transform: uppercase; }
.media-hint svg { width: 15px; height: 15px; flex: none; }

/* Filters sheet + 18+ switch */
.fgroup { border-top: 2px dashed var(--line); padding: 14px 0 8px; }
.fgroup:first-of-type { border-top: 0; }
.fgroup h4 { margin: 0 0 10px; font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.fgroup .toggle-grid { margin-bottom: 8px; }
.fnote { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.fask { align-self: center; font-size: 14px; font-weight: 800; margin-right: 4px; }
.gate { padding: 8px 0 16px; }
.gate p { margin: 0 0 16px; color: var(--ink-2); }

/* Menu sheet (phone "More") */
.menu-list { display: grid; gap: 10px; padding-bottom: 8px; }
.menu-list button { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 16px; background: var(--chip); text-align: left; }
.menu-list button[aria-current="page"] { background: var(--orange); color: var(--on-accent); }
.menu-list a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; text-align: left; }
.menu-list a svg { width: 22px; height: 22px; flex: none; }
.menu-head { margin: 18px 0 8px; font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.desk-nav .admin-tab { color: var(--orange); }
.desk-nav .admin-tab > span { border: 2px solid var(--orange); border-radius: 999px; padding: 4px 10px; }
.menu-list b { display: block; font-weight: 800; font-size: 17px; }
.menu-list small { display: block; font-size: 13px; opacity: 0.8; }
.menu-list svg { width: 26px; height: 26px; flex: none; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px;
  font-weight: 700; font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.copybox { display: flex; gap: 8px; margin-top: 12px; }
.copybox input { flex: 1; min-width: 0; height: 48px; border: 2px solid var(--edge); border-radius: 12px; padding: 0 12px; background: var(--bg); font-size: 14px; }

/* ---------- Forms (sign in, styles, squads) ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; align-content: start; }
.field label, .field .lbl { font-weight: 800; font-size: 14.5px; }
.field .hint { font-size: 13px; color: var(--ink-2); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field select, .field textarea {
  width: 100%; min-height: 48px; border: 2px solid var(--edge); border-radius: 12px; background: var(--bg); padding: 10px 12px; font: inherit; color: var(--ink);
}
.field select {
  appearance: none; -webkit-appearance: none; height: 48px; padding-right: 38px; font-weight: 700;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option { color: #1C1633; background: #fff; }
.field input[type=date] { height: 48px; }
.field input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; }
.field-row2 { align-items: start; }
.panel > p + .field, .panel > p + form > .field:first-child { margin-top: 14px; }
.field textarea { min-height: 90px; resize: vertical; }
.field-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.google-btn-wrap { display: flex; justify-content: center; margin: 4px 0 16px; min-height: 40px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--ink-2); font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.auth-lead { margin: 0 0 14px; }
.panel.nudge { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 16px; }
.panel.nudge p { margin: 0; flex: 1 1 220px; }
.form-msg { padding: 12px 14px; margin-top: 10px; border-radius: 12px; border: 2px solid var(--edge); font-weight: 600; }
.form-msg.ok { background: var(--green); color: var(--on-accent); }
.form-msg.err { background: var(--pink); color: var(--on-accent); }
.status-badge { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; border: 2px solid var(--edge); }
.status-badge.pending { background: var(--amber); color: var(--on-accent); }
.status-badge.published { background: var(--green); color: var(--on-accent); }
.status-badge.rejected { background: var(--pink); color: var(--on-accent); }
.style-photo-preview { max-width: 220px; display: block; margin: 8px 0; border: 2px solid var(--edge); border-radius: 12px; }
.my-style-row { border-top: 2px dashed var(--line); padding: 14px 0; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Rankings header, layout switch, list rows (also used by the detail media switch): an alternate browsing view (numbered portrait cards or a directory) ---------- */
.fg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin: 22px 0 20px; border-bottom: 2px dashed var(--line); }
.fg-kicker { display: block; font: 500 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.fg-head h2 { margin: 0; font-weight: 800; font-size: 42px; line-height: 0.92; letter-spacing: -0.04em; }
.fg-count { font: 500 12.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.fg-head-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fg-mode { display: inline-flex; border: 2px solid var(--edge); border-radius: 12px; overflow: hidden; }
.fg-mode-btn { border: 0; background: var(--card); padding: 0 14px; min-height: 42px; font-weight: 700; font-size: 14px; color: var(--ink); }
.fg-mode-btn + .fg-mode-btn { border-left: 2px solid var(--edge); }
.fg-mode-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.fgl-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 2px dashed var(--line); }
.fgl-thumb { width: 48px; height: 48px; flex: none; overflow: hidden; border: 2px solid var(--edge); border-radius: 10px; background: var(--canvas); }
.fgl-thumb .collage, .fgl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fgl-info { flex-grow: 1; min-width: 0; }
.fgl-toprow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fgl-name { font-weight: 800; font-size: 15.5px; }
.fgl-flag { font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--brand); }
.fgl-meta { font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--ink-2); }
.fgl-save { position: relative; z-index: 2; flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); border-radius: 12px; }
.fgl-save svg { width: 17px; height: 17px; }
.fgl-save[aria-pressed="true"] { color: var(--blue); }
.fgl-save[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- DIY ---------- */
.diy-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.diy-badge { font: 500 10.5px var(--font-mono); text-transform: uppercase; background: var(--sunk); color: var(--ink); border: 1.5px solid var(--line); padding: 3px 8px; border-radius: 999px; }
.page-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
.page-chips::-webkit-scrollbar { display: none; }

.foot { color: var(--ink-2); font-size: 12.5px; text-align: center; margin: 40px auto 0; max-width: 62ch; }
.to-top {
  position: fixed; right: 14px; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 25;
  width: 48px; height: 48px; border-radius: 16px; background: var(--orange); color: var(--on-accent); border: 2px solid var(--edge);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 15px;
}
.to-top svg { width: 18px; height: 18px; flex: none; }
.to-top span { display: none; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; --gap: 14px; }
  .logo { font-size: 22px; }
  .eh-title h2, .section-head h2 { font-size: 48px; }
  .fpanel { padding: 16px 18px; }
  .fp-quick { margin-inline: -18px; }
  .fp-quick .chips { padding-inline: 18px; }
}
@media (min-width: 960px) {
  :root { --gutter: 36px; --gap: 18px; --top-h: 72px; }
  .logo { font-size: 24px; }
  .desk-nav { display: flex; }
  .nav { display: none; }
  .app { padding-bottom: 56px; }
  .eh-title h2, .section-head h2 { font-size: 58px; }
  .explore-head { padding-top: 14px; }
  /* On a wide screen everything above the cards is a slim strip: the panel is two chip rows tall
   * (sizes three-up, effort side by side), and the two banners around it are one line each, so the
   * first row of costumes is on screen at the usual laptop height. */
  .fpanel { margin-top: 12px; padding: 12px 16px 10px; }
  .fp-grid { display: grid; grid-template-columns: 1fr 0.9fr 1.15fr 1.15fr 1.8fr; gap: 18px; align-items: start; }
  .fp-group legend, .fp-label { margin-bottom: 6px; }
  .fp-chips { gap: 6px; }
  .fpanel .fchip { min-height: 34px; padding: 0 10px; font-size: 13.5px; }
  .fpanel .fchip.round { padding: 0 10px; }
  /* Sizes and budgets wrap like the other groups (chips sized to their words), so nothing overflows a cell. */
  .fp-chips.sizes, .fp-chips.two { display: flex; flex-wrap: wrap; gap: 6px; }
  .fchip.sz { flex-direction: row; min-height: 34px; padding: 0 10px; }
  .fchip.sz small { margin-left: 6px; }
  .fchip.sz[aria-pressed="true"] .ck { display: block !important; }
  .fp-chips.stack { flex-direction: row; flex-wrap: wrap; }
  .fp-foot { margin-top: 10px; padding-top: 8px; }
  .fp-foot .btn, .fp-foot .textbtn { min-height: 36px; }
  .fp-foot .btn.small { padding: 0 12px; font-size: 13.5px; }
  .bar { margin: 14px 0 10px; flex-wrap: nowrap; }
  .bar .count, .bar .card-mode, .bar .sort-label, .bar .cfsel, .bar .select { flex: none; }
  /* The promo as a 44px pill in the results bar, level with the Inspo/Pieces switch and the sort. */
  .bar-promo { display: block; flex: 1 1 auto; min-width: 0; margin-left: 4px; }
  .bar-promo .promo { margin: 0; padding: 0 5px 0 14px; min-height: 44px; flex-wrap: nowrap; gap: 10px 14px; border-radius: 12px; }
  .bar-promo .promo > div { display: flex; align-items: baseline; gap: 8px; flex: 1 1 auto; min-width: 0; }
  .bar-promo .promo h3 { font-size: 14.5px; white-space: nowrap; }
  .bar-promo .promo p { margin: 0; font-size: 13px; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bar-promo .promo .btn { flex: none; min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
  .fp-desk { display: block; }
  .fp-quick { display: none; }
  .toast { bottom: 28px; }
  .to-top { bottom: 28px; right: 32px; width: auto; height: 52px; padding: 0 20px 0 16px; }
  .to-top span { display: inline; }
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; width: min(1040px, calc(100% - 64px));
    border-radius: 24px; border-bottom: 2px solid var(--edge); max-height: min(88vh, 920px);
    transform: translate(-50%, -48%); opacity: 0; transition: transform 0.22s, opacity 0.22s; pointer-events: none; box-shadow: var(--shadow);
  }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  #filters.sheet, #share.sheet, .sheet.small, #auth.sheet { width: min(620px, calc(100% - 64px)); }
  .sheet-grab { display: none; }
  .sheet-scroll { padding: 0 28px 24px; }
  .sheet-foot { padding: 12px 28px; border-radius: 0 0 22px 22px; }
  .detail { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 22px; }
  .detail-media-wrap { position: sticky; top: 0; }
  .detail-media { margin-top: 0; }
  .detail-media .collage { max-height: none; }
  .detail h2 { font-size: 44px; }
  .sheet-close { top: 16px; right: 16px; }
  .sq-layout { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .sq-layout > .sq-col:first-child { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; padding: 4px 6px 4px 4px; margin: -4px -6px -4px -4px; scrollbar-width: thin; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .bar-promo .promo p { display: none; } /* the title and button carry it until there's room for the sentence */
}
@media (min-width: 1300px) {
  /* Wide enough for the join box in the header beside the account button (with room for an Admin tab). */
  .top-join { display: flex; }
  .sq-join { display: none; } /* the header has the box here */
}
@media (min-width: 1200px) {
  .logo { font-size: 26px; }
  /* Room for two rows everywhere: sizes three-up, effort and vibe two or three to a row, occasions four. */
  .fp-grid { grid-template-columns: 1fr 0.8fr 1.15fr 1.05fr 2fr; }
  .desk-nav { margin-left: 18px; gap: 4px; }
  .desk-nav button { padding: 0 12px; font-size: 16px; }
}
@media (max-width: 959px) {
  .fbar-chips { display: none; }
  .fbar { justify-content: space-between; }
  .fbar .search { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .fpanel { transform: none !important; }
}

/* Generic chip rows on section pages */
.chips-wrap { overflow-x: auto; scrollbar-width: none; }
.chips-wrap::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 8px; width: max-content; }

/* ---------- Admin: inline item editor on a costume's detail sheet ---------- */
.admin-picker { border: 1px dashed var(--edge); border-radius: var(--r); padding: 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.admin-pick-q { width: 100%; height: 44px; border: 2px solid var(--edge); border-radius: 12px; background: var(--card); padding: 0 14px; font-size: 15px; }
.admin-pick-results { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; }
.admin-new-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.admin-new-item input[type=text], .admin-new-item select { height: 40px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); padding: 0 10px; font-size: 14px; }
.admin-new-item input[type=number] { width: 84px; height: 40px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); padding: 0 10px; font-size: 14px; }
.admin-remove { color: var(--save, #e0304a); }

/* ---------- Admin: costume-level tools on /admin/explore ---------- */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.admin-explore-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.admin-review-filter { display: flex; gap: 6px; }
.admin-review-filter button { border: 1.5px solid var(--edge); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; }
.admin-review-filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.admin-review-filter button .nav-count { margin-left: 6px; }
.my-style-row .actions-inline { display: flex; gap: 10px; align-items: center; }
/* Your own pieces (items a person makes) and design looks. */
.toggle.own { border-style: dashed; }
.toggle.own small { font-weight: 500; opacity: 0.8; margin-left: 4px; }
.piece-form { margin-top: 8px; }
.piece-form summary { list-style: none; cursor: pointer; }
.piece-form summary::-webkit-details-marker { display: none; }
.piece-form .admin-new-item { margin-top: 8px; }
.piece-photo-label { cursor: pointer; }
.pieces-list { display: grid; gap: 8px; }
.piece-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px 12px; align-items: center; padding: 8px 0; border-bottom: 2px dashed var(--line); }
.piece-thumb { width: 56px; height: 56px; object-fit: contain; background: var(--canvas); border: 2px solid var(--edge); border-radius: 12px; }
.piece-thumb.none { display: grid; place-items: center; font-size: 10px; color: var(--ink-2); text-align: center; }
.piece-main { display: grid; gap: 2px; }
.piece-main b { font-weight: 800; }
.piece-main small { color: var(--ink-2); font-size: 12.5px; }
.piece-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.piece-editor { grid-column: 1 / -1; }
.cover-credit { display: grid; gap: 6px; margin-top: 8px; }
.cover-credit input { width: 100%; height: 42px; border: 2px solid var(--edge); border-radius: 10px; background: var(--bg); padding: 0 12px; font-size: 14px; color: var(--ink); }
.rend-media.design .collage { display: block; width: 100%; height: auto; background: var(--canvas); }
@media (min-width: 640px) { .piece-row { grid-template-columns: 56px 1fr auto; } .piece-actions { grid-column: auto; } .cover-credit { grid-template-columns: 1fr 1fr; } }
/* Plan: the switch between group voting and personal polls, and the poll cards. */
.plan-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 18px; }
.plan-switch button { display: grid; gap: 2px; text-align: left; padding: 10px 14px; border: 2px solid var(--edge); border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 800; font-size: 15px; }
.plan-switch button small { font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
.plan-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan-switch button[aria-pressed="true"] small { color: inherit; opacity: 0.8; }
.poll-card { border: 2px solid var(--edge); border-radius: var(--r); background: var(--card); padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.poll-card.pending { border-color: var(--orange); }
.poll-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.poll-card-head b { font-weight: 800; font-size: 16px; }
.poll-card-head small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.poll-decided, .poll-pending, .poll-voted, .poll-leading { flex: none; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.poll-decided { background: var(--green); color: var(--on-accent); }
.poll-pending { background: var(--orange); color: var(--on-accent); }
.poll-voted { background: var(--sunk); color: var(--ink); }
.poll-leading { background: var(--chip); color: var(--ink); }
.poll-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.poll-mini { position: relative; flex: none; width: 64px; border: 2px solid var(--edge); border-radius: 12px; overflow: hidden; background: var(--canvas); }
.poll-mini .collage { display: block; width: 100%; height: auto; }
.poll-mini b { position: absolute; right: 4px; bottom: 4px; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 1px 6px; font-size: 11px; }
.poll-mini.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.poll-note { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.poll-note.clash { color: var(--ink); font-weight: 700; }
.poll-opts { display: grid; gap: 10px; }
.poll-opt { display: grid; grid-template-columns: 92px 1fr; gap: 12px; border: 2px solid var(--edge); border-radius: var(--r); padding: 10px; background: var(--card); }
.poll-opt.decided { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.poll-opt.yours { border-color: var(--orange); }
.poll-opt-media { padding: 0; border: 2px solid var(--edge); border-radius: 12px; overflow: hidden; background: var(--canvas); cursor: pointer; }
.poll-opt-media .collage { display: block; width: 100%; height: auto; }
.poll-thumb-none { display: block; aspect-ratio: 1; background: var(--sunk); }
.poll-opt-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.poll-opt-body b { font-weight: 800; font-size: 16px; line-height: 1.15; }
.poll-opt-body small { color: var(--ink-2); font-size: 12.5px; }
.poll-bar { height: 8px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--orange); border-radius: 999px; transition: width 0.3s; }
.poll-opt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.poll-owner-tools { margin-top: 14px; }
.friend-add { display: flex; gap: 8px; margin: 10px 0; }
.friend-add input { flex: 1; min-width: 0; height: 44px; border: 2px solid var(--edge); border-radius: 12px; background: var(--bg); padding: 0 12px; font-size: 15px; color: var(--ink); }
.friend-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px dashed var(--line); }
.friend-row b { font-weight: 800; }
.friend-row small { color: var(--ink-2); font-size: 12.5px; }
.friend-row .spacer { flex: 1; }
.panel h4 { margin: 16px 0 4px; font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
/* Photo credit: an inspo photo is usually someone else's picture, so its source shows with it. */
.photo-credit { margin: 6px 2px 0; font: 500 11.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); overflow-wrap: anywhere; }
.photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pin-credit { position: absolute; left: 8px; bottom: 8px; z-index: 2; pointer-events: none; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(18, 15, 34, 0.72); color: #fff; border-radius: 8px; padding: 2px 7px; font: 500 10.5px var(--font-mono); letter-spacing: 0.03em; text-transform: uppercase; }
.admin-credit { display: grid; gap: 6px; margin-top: 6px; }
.admin-inline-credit { font-size: 14px; padding: 8px 10px; }
/* Related costumes: a group's parts under Who's who, and the groups a look is part of. */
.detail .role-text { display: contents; } /* name and look keep their two columns */
.detail .role .related, .detail .role .role-admin { grid-column: 1 / -1; }
.detail .role .related > span { color: var(--ink); }
.related { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 2px solid var(--edge); border-radius: 14px; background: var(--card); padding: 8px 12px 8px 8px; cursor: pointer; }
.related:hover { background: var(--sunk); }
.related .collage { width: 64px; height: auto; flex: none; border-radius: 10px; background: var(--canvas); border: 1.5px solid var(--edge); }
.related > span { display: grid; gap: 2px; min-width: 0; }
.related b { font-weight: 800; font-size: 15px; line-height: 1.15; }
.related small { color: var(--ink-2); font: 500 11px var(--font-mono); letter-spacing: 0.02em; text-transform: uppercase; }
.related-list { display: grid; gap: 8px; }
.related-hint { margin: 0 0 10px; font-size: 14px; }
.h4-note { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.pin-sub .made-of { color: var(--ink); }
.role-admin { margin-top: 2px; }
.admin-role-q { width: 100%; height: 40px; border: 2px solid var(--edge); border-radius: 10px; background: var(--card); padding: 0 12px; font-size: 14px; }
.admin-pick-results .chip small { margin-left: 6px; opacity: 0.7; font-size: 11px; }
@media (min-width: 640px) { .related-list { grid-template-columns: 1fr 1fr; } }
/* /admin/explore editing: everything on an open costume is editable in place; a save bar holds the
   changes until "Save changes", and a status line reports what happened. */
.admin-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 10px 12px; border: 2px dashed var(--line); border-radius: 12px; font-size: 14px; color: var(--ink-2); }
.admin-savebar.dirty { border-style: solid; border-color: var(--orange); color: var(--ink); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.admin-savebar-text { flex: 1 1 200px; font-weight: 700; }
.admin-inline { display: block; width: 100%; font: inherit; color: inherit; background: var(--sunk); border: 2px dashed var(--edge); border-radius: 10px; padding: 4px 8px; box-sizing: border-box; }
.admin-inline:focus { outline: none; border-style: solid; border-color: var(--orange); }
.admin-inline-name { font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.03em; }
.admin-inline-how { font-size: 16px; min-height: 84px; resize: vertical; }
.admin-explore-status .form-msg { margin-top: 10px; }
#admin-status .form-msg { margin: 8px 0 0; }
/* Add/edit costume form: a live card preview beside the fields. */
.cf-layout { display: grid; gap: 18px; margin-top: 8px; }
.cf-preview .lbl { font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.cf-preview-card { pointer-events: none; }
.cf-preview-card .pin { max-width: 300px; }
.cf-preview-how h4 { margin: 14px 0 6px; font: 500 12.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.cf-preview-how p { margin: 0; font-size: 15px; max-width: 300px; }
.cf-preview-note { font-size: 13px; max-width: 300px; }
@media (min-width: 900px) {
  .cf-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
  .cf-preview { position: sticky; top: 0; }
}
.pin-review {
  position: absolute; right: 8px; top: 8px; z-index: 3; width: 28px; height: 28px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--edge); color: var(--ink-2); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pin-review.on { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.toggle-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; cursor: pointer; }

/* ---------- Renditions: other visitors' own photos of a costume ---------- */
.rend-section { margin-top: 22px; }
.rend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; }
.rend-card { margin: 0; display: grid; gap: 6px; }
.rend-media { position: relative; border: 2px solid var(--edge); border-radius: 13px; overflow: hidden; background: var(--canvas); aspect-ratio: 1; }
.rend-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rend-open { padding: 0; border: 0; background: none; display: block; width: 100%; }
.rend-save {
  position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--edge); color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.rend-save svg { width: 16px; height: 16px; }
.rend-save.on { background: var(--save, #e0304a); color: #fff; border-color: var(--save, #e0304a); }
.rend-badge {
  position: absolute; left: 6px; bottom: 6px; background: var(--ink); color: var(--bg); border-radius: 8px;
  padding: 2px 8px; font-size: 11px; font-weight: 700;
}
.rend-card figcaption { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Partner with us ---------- */
.partner-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.partner-list li { line-height: 1.45; }

/* ---------- "Pick together" strip (Explore) ---------- */
.together { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 10px 0 8px; padding: 12px 14px 12px 18px; border: 2px solid var(--edge); border-radius: 16px; background: var(--card); }
.together > div { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; }
.together b { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.together span { color: var(--ink-2); font-size: 14px; }
.wore { color: var(--brand); font-weight: 700; }

/* ---------- Rankings ---------- */
.rank-how { margin: 0 0 12px; font: 500 11.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.rank-list { border-top: 2px solid var(--edge); }
.rank-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.rank-no { flex: none; width: 34px; text-align: center; font: 500 15px var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-row.top { padding: 14px 0; }
.rank-row.top .rank-no { font-weight: 800; font-family: inherit; font-size: 28px; color: var(--orange); }
.rank-row.top .fgl-thumb { width: 68px; height: 68px; border-radius: 14px; }
.rank-row.top .fgl-name { font-size: 18px; }
.rank-stats { margin-top: 3px; font: 500 11px var(--font-mono); text-transform: uppercase; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0 6px; }
.rank-stats span + span::before { content: "·"; margin-right: 6px; }
.rank-stats span:first-child { color: var(--ink); }
@media (min-width: 960px) {
  .rank-list { max-width: 820px; }
  /* The "pick together" strip as one line on a wide screen (its base rules are just above). */
  .together { margin: 8px 0 0; padding: 8px 10px 8px 16px; gap: 10px 16px; flex-wrap: nowrap; }
  .together > div { flex-direction: row; align-items: baseline; gap: 10px; min-width: 0; }
  .together b { font-size: 15px; white-space: nowrap; }
  .together span { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .together .btn { min-height: 38px; padding: 0 14px; font-size: 14px; flex: none; }
}

/* Detail sheet: a published rendition photo leads, with a switch back to the pieces */
.media-photo { margin: 0; }
.media-photo img { display: block; width: 100%; max-height: 560px; object-fit: contain; border: 2px solid var(--edge); border-radius: 16px; background: var(--canvas); }
.media-photo figcaption { margin: 8px 0 0; font: 500 11.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.media-switch { margin-top: 12px; }
.desk-nav button[data-action="menu"] svg { width: 14px; height: 14px; }

/* The figure view (collage.js layout: "figure"; no UI uses it right now) */
.collage.figure .cf-body { --cf-body: #cdc6ba; }
@media (prefers-color-scheme: dark) { .collage.figure .cf-body { --cf-body: #4a4560; } }

/* Inspo / Pieces switch in the results bar; a card showing its inspo photo (cropped to a portrait frame) */
.card-mode { margin-left: 12px; }
.card-mode .fg-mode-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
@media (max-width: 480px) {
  /* One line: count · Inspo/Pieces · sort */
  .bar { gap: 8px; flex-wrap: nowrap; }
  .bar .count { flex: 1 1 0; min-width: 0; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
  .bar .spacer { display: none; }
  .card-mode { margin-left: 0; flex: none; }
  .card-mode .fg-mode-btn { min-height: 34px; padding: 0 10px; font-size: 12.5px; }
  /* Visually hidden, still the select's label (display: none would take the label away from assistive tech too). */
  .bar .sort-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
  .bar .cfsel, .bar .select { flex: none; }
  .bar .cfsel-bar .cfsel-btn, .bar .select { height: 36px; min-height: 36px; font-size: 13px; padding-left: 10px; }
}
.pin-picture { display: block; width: 100%; aspect-ratio: 10 / 11; object-fit: cover; background: var(--canvas); }
.detail-pieces { margin-top: 10px; border: 2px solid var(--edge); border-radius: 14px; overflow: hidden; background: var(--canvas); }
.detail-pieces .collage { display: block; width: 100%; height: auto; max-height: 260px; }
.detail-pieces-cap { margin: 8px 0 0; font: 500 11.5px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }

/* Honeypot field on the partner form: real people never see it, bots fill it */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Styled dropdowns (desktop): a button + listbox over the hidden native <select> */
.cfsel { position: relative; }
.cfsel select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.cfsel-btn {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid var(--edge); border-radius: 12px; background: var(--bg); color: var(--ink); padding: 0 12px; font-weight: 700; font-size: 15px; text-align: left;
}
.cfsel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfsel-btn svg { width: 16px; height: 16px; flex: none; color: var(--ink-2); transition: transform 0.15s; }
.cfsel-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.cfsel-btn:hover { background: var(--sunk); }
.cfsel-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue); }
.cfsel-bar .cfsel-btn { min-height: 44px; height: 44px; background: var(--card); font-size: 14.5px; }
.cfsel-list {
  position: fixed; z-index: 120; margin: 0; padding: 6px; list-style: none; overflow-y: auto;
  background: var(--card); border: 2px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow);
}
.cfsel-list li { padding: 10px 12px; border-radius: 9px; font-weight: 700; font-size: 14.5px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; white-space: nowrap; }
.cfsel-list li:hover { background: var(--sunk); }
.cfsel-list li[aria-selected="true"] { background: var(--orange); color: var(--on-accent); }
.cfsel-list li[aria-selected="true"]::after { content: "✓"; font-weight: 800; }
.cfsel-list li[aria-disabled="true"] { opacity: 0.45; cursor: default; }
/* Date fields: the native picker is replaced by this calendar (same popover mechanics as the dropdowns). */
.cfdate { position: relative; }
.cfdate input[type=date] { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.cfdate-btn .cfdate-ph { color: var(--ink-2); font-weight: 500; }
.cfcal {
  position: fixed; z-index: 120; padding: 12px; background: var(--card); color: var(--ink);
  border: 2px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow);
}
.cfcal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cfcal-head b { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.cfcal-nav { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--edge); background: var(--bg); color: var(--ink); display: grid; place-items: center; }
.cfcal-nav svg { width: 16px; height: 16px; }
.cfcal-nav[data-cal-nav="-1"] svg { transform: rotate(90deg); }
.cfcal-nav[data-cal-nav="1"] svg { transform: rotate(-90deg); }
.cfcal-nav:hover { background: var(--sunk); }
.cfcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cfcal-dow span { text-align: center; font: 500 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); padding: 4px 0 6px; }
.cfcal-day { aspect-ratio: 1; min-height: 36px; border-radius: 10px; border: 2px solid transparent; background: transparent; color: var(--ink); font-weight: 700; font-size: 14.5px; display: grid; place-items: center; }
.cfcal-day:hover:not(:disabled) { background: var(--sunk); }
.cfcal-day.other { color: var(--ink-2); font-weight: 500; opacity: 0.6; }
.cfcal-day.is-today { border-color: var(--edge); border-style: dashed; }
.cfcal-day[aria-pressed="true"] { background: var(--orange); color: var(--on-accent); border-color: var(--orange); border-style: solid; opacity: 1; }
.cfcal-day:disabled { opacity: 0.25; cursor: default; }
.cfcal-day:focus-visible, .cfcal-nav:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue); }
.cfcal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--line); }


/* ---------- Phones: get the first costume on screen (per the F6q wireframe) ---------- */
.phone-only { display: none; }
@media (max-width: 639px) {
  .desk-only { display: none; }
  .phone-only { display: inline; }
  .explore-head { padding-top: 6px; gap: 10px; }
  .eh-title h2 { font-size: 32px; }
  .eh-title p { display: none; }
  /* The "pick together" strip becomes one line */
  .together { flex-wrap: nowrap; gap: 10px; margin: 10px 0 6px; padding: 8px 8px 8px 14px; align-items: center; }
  .together > div { flex: 1 1 auto; min-width: 0; }
  .together b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .together span { display: none; }
  .together .btn { min-height: 40px; padding: 0 14px; font-size: 14px; flex: none; }
  /* The filter panel: sizes row + chip row + one compact action row, no status line */
  .fpanel { padding: 12px 14px 10px; }
  .fp-group legend, .fp-label { margin-bottom: 8px; }
  .fchip.sz { min-height: 44px; }
  .fp-quick { margin-top: 10px; }
  .fp-foot { margin-top: 10px; padding-top: 10px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
  .fp-foot::-webkit-scrollbar { display: none; }
  .fp-foot > * { flex: none; white-space: nowrap; }
  .fp-foot .fp-live { display: none; }
  .fp-foot .spacer { display: none; }
  .fp-foot .btn, .fp-foot button { min-height: 40px; padding: 0 12px; font-size: 13.5px; }
  .add-costume { width: 100%; justify-content: center; min-height: 44px; }
  .bar { margin: 14px 0 10px; }
}

/* ---------- "Your own pieces" tray in the costume and look builders ---------- */
.my-tray .tray-help { display: block; margin: 2px 0 10px; }
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.tray-add, .tray-piece { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.tray-add { justify-content: center; aspect-ratio: 1; border: 2px dashed var(--edge); border-radius: 14px; background: var(--sunk); font-weight: 700; font-size: 13px; padding: 8px; }
.tray-add svg { width: 26px; height: 26px; }
.tray-add:hover, .tray-add:focus-within { border-color: var(--orange); color: var(--orange); }
.tray-img { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 2px solid var(--edge); border-radius: 14px; background: var(--canvas, #f3f2ef); overflow: hidden; }
.tray-img img { width: 86%; height: 86%; object-fit: contain; }
.tray-none { font-size: 12px; color: #6c6c6d; }
.tray-name { width: 100%; font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tray-piece[aria-pressed="true"] .tray-img { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange); }
.tray-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: var(--on-accent); display: grid; place-items: center; }
.tray-check svg { width: 15px; height: 15px; }
.tray-piece.busy { cursor: default; opacity: 0.8; }
.tray-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: tray-spin 0.8s linear infinite; }
@keyframes tray-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tray-spin { animation: none; } }
.tray-names { margin-top: 14px; padding: 12px; border: 2px solid var(--edge); border-radius: 14px; background: var(--card); }
.tray-names .lbl { margin: 0 0 8px; }
.tray-name-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 130px; gap: 8px; align-items: center; margin-bottom: 8px; }
.tray-name-row input, .tray-name-row select { min-height: 40px; }
.tray-name-row .piece-thumb { width: 40px; height: 40px; }
.my-tray .piece-form { margin-top: 12px; }
@media (max-width: 520px) {
  .tray { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tray-name-row { grid-template-columns: 36px minmax(0, 1fr); }
  .tray-name-row select { grid-column: 2; }
}

/* ---------- closet sharing ---------- */
.borrow-panel .switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 2px dashed var(--line); cursor: pointer; }
.borrow-panel .switch-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.borrow-panel .switch-row small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.lenders { display: grid; gap: 12px; margin-top: 12px; }
.lender { display: flex; gap: 12px; align-items: flex-start; }
.lender .acct-avatar { width: 40px; height: 40px; }
.lender-main { min-width: 0; flex: 1; }
.lender-main small { display: block; color: var(--ink-2); font-size: 12.5px; }
.lender-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 2px solid var(--edge); border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip-tag.photo { padding-left: 4px; }
.chip-tag img { width: 24px; height: 24px; object-fit: contain; border-radius: 50%; background: var(--canvas, #f3f2ef); }
.item .borrow { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; }
.item .borrow svg { width: 13px; height: 13px; }
.legal-links { margin: 12px 0 4px; font-size: 13px; }
.legal-links a { color: var(--ink-2); }
.delete-account { margin-top: 8px; }
.delete-account summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.delete-account .btn.danger { border-color: #e5484d; color: #ff8a8f; }

/* ---------- /privacy and /terms ---------- */
.legal-page { background: var(--bg); color: var(--ink); }
.legal { max-width: 720px; margin: 0 auto; padding: 28px 20px 64px; line-height: 1.6; font-size: 16px; }
.legal h1 { font-size: 34px; letter-spacing: -0.02em; margin: 8px 0 4px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--orange); }
.legal-date, .legal-foot { color: var(--ink-2); font-size: 14px; }
.legal-home { font-weight: 700; text-decoration: none; }
.foot.terms a { color: inherit; }
