/* Hallmark · theme: Ribbon (by request, owner 11-02: "i like the ribbon theme") · ribbon: two-in-the-morning · built: the project · redesign: full · scope: app · deal: manual
 * the archive at dusk, lifted from Ribbon's blue-black (owner 11-02: "make the bg a little bit lighter, the colour is kinda depressing"):
 * an indigo ground under slow colour clouds and floating lights, the showcase art in true colour, amber the one lit thing
 * waive 27: the cover clips keep playing under reduced motion (owner 11-02: "the clip doesn't move tho"); every other motion stops
 * Tokens and controls adapted from Hallmark's Ribbon theme (MIT, github.com/nutlope/hallmark). */
:root {
  color-scheme: dark;
  /* dusk */
  --color-paper: oklch(20% 0.045 268); --color-paper-2: oklch(23.5% 0.046 268); --color-paper-3: oklch(27.5% 0.046 268);
  --color-well: oklch(16% 0.04 268); --color-bar: oklch(20% 0.045 268 / 0.84);
  /* the sky's colour clouds and floating lights (app.js, night) */
  --color-cloud-1: oklch(64% 0.13 232 / 0.26); --color-cloud-2: oklch(64% 0.15 335 / 0.17); --color-cloud-3: oklch(60% 0.14 290 / 0.2);
  --color-glow: oklch(78% 0.11 62 / 0.14);
  --color-mote-1: oklch(86% 0.11 72); --color-mote-2: oklch(86% 0.07 235); --color-mote-3: oklch(84% 0.09 345);
  --color-ink: oklch(95% 0.012 85); --color-ink-2: oklch(88% 0.014 85); --color-muted: oklch(78% 0.028 262); --color-faint: oklch(67% 0.03 262);
  --color-rule: oklch(33% 0.04 268); --color-rule-2: oklch(28% 0.04 268); --color-rule-3: oklch(37% 0.036 268); --color-rule-hover: oklch(46% 0.036 268);
  /* one lit window */
  --color-accent: oklch(82% 0.095 68); --color-accent-deep: oklch(68% 0.1 62); --color-accent-soft: oklch(82% 0.095 68 / 0.16);
  --color-accent-line: oklch(82% 0.095 68 / 0.45); --color-accent-ink: oklch(20% 0.03 62); --color-accent-glow: oklch(78% 0.12 62 / 0.4);
  --color-focus: oklch(86% 0.08 68);
  /* states the owner sees, and the two brands on the login */
  --color-draft: oklch(80% 0.07 235); --color-draft-soft: oklch(80% 0.07 235 / 0.14);
  --color-error: oklch(72% 0.15 27); --color-error-soft: oklch(72% 0.15 27 / 0.14);
  --color-discord: oklch(58% 0.2 274); --color-patreon: oklch(65% 0.21 25); --color-brand-ink: oklch(99% 0 0);
  /* machined parts, one light from above */
  --part-top: oklch(30% 0.045 268); --part-bottom: oklch(25.5% 0.045 268);
  --panel-top: oklch(25.5% 0.046 268 / 0.94); --panel-bottom: oklch(22% 0.046 268 / 0.94);
  --metal-hi: oklch(58% 0.02 262); --metal-lo: oklch(36% 0.024 262);
  --glass: oklch(14% 0.035 268 / 0.74); --scrim: oklch(10% 0.03 268 / 0.95); --shade: oklch(10% 0.03 268 / 0.55);
  --hi: oklch(100% 0 0 / 0.07); --hi-2: oklch(100% 0 0 / 0.2); --hi-3: oklch(100% 0 0 / 0.5); --lo: oklch(0% 0 0 / 0.5);
  --edge-light: inset 0 1px 0 var(--hi);
  --shadow-part: 0 1px 0 oklch(0% 0 0 / 0.55), 0 10px 18px -6px oklch(0% 0 0 / 0.6);
  --shadow-panel: 0 1px 0 oklch(0% 0 0 / 0.45), 0 24px 48px -16px oklch(8% 0.04 268 / 0.75);
  --shadow-lift: 0 18px 36px -14px oklch(0% 0 0 / 0.8);
  --font-display: "Instrument Sans", "Noto Sans JP", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", "Noto Sans JP", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.125rem; --text-title: 1.375rem;
  --text-section: clamp(1.625rem, 1.2vw + 1.1rem, 2.125rem); --text-display: clamp(2.25rem, 3.4vw + 1rem, 3.75rem);
  --tracking-display: -0.035em;
  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;
  --radius-card: 20px; --radius-part: 12px; --radius-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --container: 1400px; --gutter: 32px; --bar-h: 68px; --tabs-h: 64px;
}

/* ── base ───────────────────────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { background: var(--color-paper); scrollbar-color: var(--color-rule-3) var(--color-paper); }
body { margin: 0; min-height: 100vh; color: var(--color-muted); font: 400 var(--text-md)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; font-feature-settings: "kern" 1; background: none; }
/* the sky behind every page (owner 11-02: "maybe a little bit of a moving bg?", then "add something else moving in the bg
   instead of the rain"): two layers of soft colour clouds that drift on the compositor, and a canvas of floating lights
   over them (app.js, night). Both hold still with Autoplay off or reduced motion on. */
body::before, body::after { content: ""; position: fixed; inset: -25%; z-index: -2; pointer-events: none; will-change: transform; }
body::before { background: radial-gradient(32% 28% at 28% 34%, var(--color-cloud-1), transparent 72%),
    radial-gradient(28% 24% at 76% 62%, var(--color-cloud-2), transparent 72%);
  animation: drift-a 38s ease-in-out infinite alternate; }
body::after { background: radial-gradient(36% 24% at 62% 26%, var(--color-cloud-3), transparent 72%),
    radial-gradient(50% 26% at 46% 78%, var(--color-glow), transparent 72%);
  animation: drift-b 47s ease-in-out infinite alternate; }
html.still body::before, html.still body::after { animation-play-state: paused; }
@keyframes drift-a { from { transform: translate3d(-5%, -3%, 0) scale(1); } to { transform: translate3d(6%, 4%, 0) scale(1.1); } }
@keyframes drift-b { from { transform: translate3d(4%, 3%, 0) rotate(0deg); } to { transform: translate3d(-6%, -4%, 0) rotate(7deg); } }
.night { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
h1, h2, h3 { margin: 0; color: var(--color-ink); font-family: var(--font-display); font-weight: 400; font-synthesis: none;
  letter-spacing: var(--tracking-display); line-height: 1.06; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--color-accent-soft); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ── controls: machined pills, lit from above ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 46px; padding: 0 20px;
  border: 1px solid var(--color-rule-3); border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap;
  background: linear-gradient(var(--part-top), var(--part-bottom)); box-shadow: var(--edge-light), var(--shadow-part);
  color: var(--color-ink); font: 500 var(--text-md)/1 var(--font-body);
  transition: border-color var(--dur-short) var(--ease-out), filter var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { border-color: var(--color-rule-hover); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn.primary { border-color: var(--color-accent-deep); color: var(--color-accent-ink);
  background: linear-gradient(var(--hi-2), transparent 60%) var(--color-accent);
  box-shadow: inset 0 1px 0 var(--hi-3), 0 1px 0 var(--lo), 0 10px 24px -14px var(--color-accent-glow); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.quiet { background: transparent; box-shadow: none; color: var(--color-ink-2); }
.btn.quiet:hover { background: var(--hi); color: var(--color-ink); filter: none; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: var(--text-sm); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--color-rule-3); background: linear-gradient(var(--part-top), var(--part-bottom));
  box-shadow: var(--edge-light), var(--shadow-part); color: var(--color-ink); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.link-btn { border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--color-ink-2); font-weight: 500;
  font-size: var(--text-sm); text-decoration: underline; text-decoration-color: var(--color-rule-hover); text-underline-offset: 0.3em; }
.link-btn:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.link-btn.danger { color: var(--color-error); text-decoration-color: var(--color-error-soft); }

/* the switch: a recessed track, a knurled metal knob, the track lights when on */
.switch { position: relative; flex: none; width: 42px; height: 24px; border-radius: var(--radius-pill); background: var(--color-well);
  box-shadow: inset 0 1px 3px oklch(0% 0 0 / 0.9), 0 1px 0 var(--hi); }
.switch::before { content: ""; position: absolute; inset: 3px; border-radius: inherit; background: var(--color-accent); opacity: 0;
  box-shadow: 0 0 10px var(--color-accent-glow); transition: opacity var(--dur-long) var(--ease-out); }
.knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(var(--metal-hi), var(--metal-lo)); box-shadow: inset 0 1px 0 var(--hi-2), 0 1px 0 var(--lo), 0 3px 6px -1px var(--lo);
  transition: transform 360ms var(--ease-settle); }
[aria-checked="true"] .switch::before { opacity: 0.9; }
[aria-checked="true"] .knob { transform: translateX(18px); }
.autoplay-toggle { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 6px 4px;
  color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; }
.autoplay-toggle:hover { color: var(--color-ink); }

/* chips: small labels in the body face, sentence case */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap;
  font: 500 var(--text-xs)/1.4 var(--font-body); color: var(--color-ink-2); background: var(--hi); box-shadow: inset 0 0 0 1px var(--color-rule-3); }
.chip.glass { background: var(--glass); box-shadow: none; color: var(--color-ink); }   /* no backdrop blur: hundreds of them lag (11-02) */
.chip.ea { background: var(--color-accent); color: var(--color-accent-ink); box-shadow: 0 6px 16px -8px var(--color-accent-glow); }
.chip.draft { background: var(--color-draft-soft); color: var(--color-draft); box-shadow: none; }
.chip.glass.draft { background: var(--glass); }
.chip.hidden { background: var(--color-error-soft); color: var(--color-error); box-shadow: none; }

/* ── header ─────────────────────────────────────────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-lg); height: var(--bar-h);
  padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  background: var(--color-bar); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--color-rule-2); }
.wordmark { flex: none; font: 500 1.3rem/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink);
  transition: color var(--dur-short) var(--ease-out); }
.wordmark span { color: var(--color-muted); }
.wordmark:hover { color: var(--color-accent); }
.nav { display: flex; gap: var(--space-2xs); }
.nav a { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: var(--radius-pill); font-weight: 500;
  font-size: var(--text-sm); color: var(--color-ink-2); transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.nav a svg { display: none; }
.nav a:hover { color: var(--color-ink); background: var(--hi); }
.nav a[hidden] { display: none; }
.nav a.on { color: var(--color-ink); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent-line); }
.tools { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-md); min-width: 0; }
.search { position: relative; display: block; flex: 0 1 420px; min-width: 0; }
.search svg { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: var(--color-faint); pointer-events: none; }
.search input { width: 100%; height: 42px; padding: 0 16px 0 42px; border-radius: var(--radius-pill); border: 1px solid var(--color-rule);
  background: var(--color-well); color: var(--color-ink); outline: none; box-shadow: inset 0 1px 2px oklch(0% 0 0 / 0.6);
  transition: border-color var(--dur-short) var(--ease-out); }
.search input:focus { border-color: var(--color-accent-line); }
.search input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.search input::placeholder { color: var(--color-faint); }
.search-open { display: none; }
.account { position: relative; flex: none; }
.avatar { width: 40px; height: 40px; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer; display: grid; place-items: center;
  border: 1px solid var(--color-rule-3); background: linear-gradient(var(--part-top), var(--part-bottom)); color: var(--color-ink); font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.owner { box-shadow: 0 0 0 2px var(--color-accent); border-color: transparent; }
.avatar.guest { width: auto; padding: 0 18px; border-radius: var(--radius-pill); font-weight: 500; color: var(--color-ink);
  background: linear-gradient(var(--part-top), var(--part-bottom)); }
/* what a visitor or a free login sees where a patron's form would be (owner 11-03: open to everyone) */
.gate { padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-well); box-shadow: inset 0 0 0 1px var(--color-rule-2); }
.gate h2 { font-size: var(--text-section); margin-bottom: var(--space-xs); }
.gate p { max-width: 52ch; }
.gate-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }
.dl-note { margin-top: var(--space-sm); }
.dl-note a, .c-gate a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.25em; }
.c-gate { margin-top: var(--space-md); }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-md); }
.back-link svg { width: 16px; height: 16px; fill: currentColor; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; display: grid; gap: var(--space-sm); min-width: 230px; padding: var(--space-md);
  border-radius: var(--radius-card); border: 1px solid var(--color-rule); background: linear-gradient(var(--panel-top), var(--panel-bottom));
  box-shadow: var(--edge-light), var(--shadow-panel); }
.menu-name { color: var(--color-ink); font-weight: 600; }
.menu-role { margin-top: -10px; font-size: var(--text-sm); }
.menu-linked { display: flex; align-items: center; gap: 6px; margin-top: -6px; color: var(--color-faint); font-size: var(--text-xs); }
.menu-linked svg { width: 13px; height: 13px; fill: currentColor; }
.menu .autoplay-toggle { display: none; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--color-rule-2); color: var(--color-ink-2); }

main { max-width: var(--container); margin: 0 auto; padding: var(--space-lg) var(--gutter) var(--space-2xl); }

/* ── login ──────────────────────────────────────────────────────────────────────────────────────────────── */
.login { min-height: calc(100vh - 96px); display: grid; place-items: center; }
.login-card { width: min(440px, 100%); padding: 40px 32px 28px; border-radius: var(--radius-card); border: 1px solid var(--color-rule);
  background: linear-gradient(var(--panel-top), var(--panel-bottom)); box-shadow: var(--edge-light), var(--shadow-panel); }
.login-card h1 { font-size: clamp(2.25rem, 5vw, 2.75rem); }
.login-card .sub { margin: var(--space-sm) 0 var(--space-xl); font-size: var(--text-lg); }
.login-card .btn { width: 100%; min-height: 52px; color: var(--color-brand-ink); border-color: transparent; }
.login-card .btn + .btn { margin-top: var(--space-sm); }
.btn.discord { background: linear-gradient(var(--hi-2), transparent 70%) var(--color-discord); }
.btn.patreon { background: linear-gradient(var(--hi-2), transparent 70%) var(--color-patreon); }
.login .help { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-rule-2); display: grid; gap: 6px; font-size: var(--text-sm); }
.login .help b { color: var(--color-ink-2); font-weight: 500; }
.login .help a, .error a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.25em; }
.error { margin: 0 0 var(--space-lg); padding: 12px 14px; border-radius: var(--radius-part); background: var(--color-error-soft); color: var(--color-error); font-size: var(--text-sm); }

/* ── grid page ──────────────────────────────────────────────────────────────────────────────────────────── */
.intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0 var(--space-lg); }
.intro h1 { font-size: var(--text-display); }
.intro .count { margin-top: var(--space-xs); font-size: var(--text-lg); }
.intro-sub { margin-top: var(--space-xs); font-size: var(--text-lg); max-width: 60ch; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--radius-pill); background: var(--color-well);
  box-shadow: inset 0 1px 3px oklch(0% 0 0 / 0.8), 0 1px 0 var(--hi); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap;
  font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); transition: color var(--dur-short) var(--ease-out); }
.seg button:hover { color: var(--color-ink); }
.seg button.on { color: var(--color-ink); background: linear-gradient(var(--part-top), var(--part-bottom));
  box-shadow: var(--edge-light), 0 1px 0 var(--lo), 0 4px 10px -4px var(--lo), inset 0 -2px 0 var(--color-accent); }
/* dropdowns: a machined pill, and a lit panel of choices with a search box on top of a long list */
.dd { position: relative; min-width: 0; }
.filters .dd[data-filter="franchise"] { width: 260px; }
.dd-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 42px; padding: 0 12px 0 16px;
  border-radius: var(--radius-pill); border: 1px solid var(--color-rule-3); cursor: pointer; white-space: nowrap;
  background: linear-gradient(var(--part-top), var(--part-bottom)); box-shadow: var(--edge-light), var(--shadow-part);
  color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; transition: border-color var(--dur-short) var(--ease-out); }
.dd-btn:hover { border-color: var(--color-rule-hover); }
.dd.open .dd-btn { border-color: var(--color-accent-line); }
.dd-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dd-chev { flex: none; width: 20px; height: 20px; fill: var(--color-muted); transition: transform var(--dur-short) var(--ease-out); }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: max(100%, 300px); max-width: calc(100vw - 32px); padding: 6px;
  border-radius: 16px; border: 1px solid var(--color-rule); background: linear-gradient(var(--panel-top), var(--panel-bottom));
  box-shadow: var(--edge-light), var(--shadow-panel); }
.dd-panel.flip { left: auto; right: 0; }
.dd-search { width: 100%; height: 40px; margin-bottom: 6px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--color-rule); outline: none;
  background: var(--color-well); color: var(--color-ink); font-size: var(--text-sm); box-shadow: inset 0 1px 2px oklch(0% 0 0 / 0.6); }
.dd-search:focus { border-color: var(--color-accent-line); }
.dd-search:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.dd-search::placeholder { color: var(--color-faint); }
.dd-list { list-style: none; margin: 0; padding: 0; max-height: min(360px, 52vh); overflow-y: auto; overscroll-behavior: contain; outline: none;
  scrollbar-width: thin; scrollbar-color: var(--color-rule-3) transparent; }
.dd-list [role="option"] { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: 8px 10px;
  border-radius: 10px; cursor: pointer; color: var(--color-ink-2); font-size: var(--text-sm); }
.dd-list [role="option"].active { background: var(--hi); color: var(--color-ink); }
.dd-list [role="option"][aria-selected="true"] { color: var(--color-accent); }
.dd-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-sub { margin-left: 8px; color: var(--color-faint); font-size: var(--text-xs); }
.dd-count { flex: none; color: var(--color-faint); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.dd-none { padding: 10px; color: var(--color-faint); font-size: var(--text-sm); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--space-xl) var(--space-lg); }
.card { display: block; min-width: 0; content-visibility: auto; contain-intrinsic-block-size: auto 380px; }   /* off-screen cards are not drawn (11-02 lag) */
.media { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-card); overflow: hidden; background: var(--color-paper-2);
  box-shadow: 0 0 0 1px var(--color-rule-2); transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.card:hover .media { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--color-rule-hover), var(--shadow-lift); }
.card:focus-visible { outline: none; }
.card:focus-visible .media { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.media .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media video.clip { opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
.media video.clip.on { opacity: 1; }
.media .chips { position: absolute; left: 10px; top: 10px; right: 52px; display: flex; flex-wrap: wrap; gap: 5px; }
.media .status { position: absolute; left: 10px; bottom: 10px; }
.media .fav { position: absolute; right: 10px; top: 10px; z-index: 2; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--glass); cursor: pointer; opacity: 0;
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.card:hover .media .fav, .media .fav.on, .media .fav:focus-visible { opacity: 1; }
@media (hover: none) { .media .fav { opacity: 1; } }
.media .fav svg { width: 17px; height: 17px; fill: none; stroke: var(--color-ink); stroke-width: 2; }
.media .fav.on svg { fill: var(--color-accent); stroke: var(--color-accent); }
.media .fav:active { transform: scale(0.9); }
.caption { padding: var(--space-sm) 4px 0; min-width: 0; }
.caption .name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.caption .en { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--color-ink); font: 500 var(--text-md)/1.3 var(--font-display); letter-spacing: -0.01em; }
.caption .jp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); color: var(--color-faint); }
.caption .sub { display: flex; justify-content: space-between; gap: var(--space-xs); margin-top: 2px; font-size: var(--text-sm); }
.caption .series { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caption .outfits { flex: none; color: var(--color-faint); }
.empty { padding: var(--space-2xl) 0; text-align: center; font-size: var(--text-lg); }
.empty.small { padding: var(--space-md) 0; text-align: left; font-size: var(--text-md); }

/* ── character page ─────────────────────────────────────────────────────────────────────────────────────── */
.back { display: inline-flex; align-items: center; gap: 6px; margin: var(--space-xs) 0 var(--space-lg); color: var(--color-ink-2);
  font-size: var(--text-sm); font-weight: 500; }
.back svg { width: 18px; height: 18px; fill: currentColor; }
.back:hover { color: var(--color-ink); }
.hero { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.hero-side { position: sticky; top: calc(var(--bar-h) + var(--space-lg)); }   /* the picture stays while the right side scrolls */
.hero-media { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: var(--radius-card);
  overflow: hidden; cursor: zoom-in; background: var(--color-paper-2); box-shadow: 0 0 0 1px var(--color-rule-2), var(--shadow-panel); }
.hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-info { display: grid; gap: var(--space-xl); min-width: 0; }
.title h1 { font-size: var(--text-display); }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: var(--space-sm); font-size: var(--text-lg); }
.hero-sub .jp { color: var(--color-ink-2); }
.series-link { color: var(--color-muted); text-decoration: underline; text-decoration-color: var(--color-rule-hover); text-underline-offset: 0.3em;
  transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out); }
.series-link:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.fav-big svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-big.on { border-color: var(--color-accent-line); background: var(--color-accent-soft); }
.fav-big.on svg { fill: var(--color-accent); stroke: var(--color-accent); }
.fav-big .n { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.ext { width: 15px !important; height: 15px !important; }

.block > h2 { font: 500 var(--text-title)/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: var(--space-sm); }
.block > .hint { margin: -4px 0 var(--space-sm); font-size: var(--text-sm); }
.versions { display: grid; gap: var(--space-sm); }
.vrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.vbase { min-width: 92px; color: var(--color-ink-2); font-weight: 500; }
.vpills { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: var(--radius-pill); background: var(--color-well);
  box-shadow: inset 0 1px 3px oklch(0% 0 0 / 0.8), 0 1px 0 var(--hi); }
.vpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-pill); color: var(--color-muted);
  font-weight: 500; font-size: var(--text-sm); font-variant-numeric: tabular-nums; transition: color var(--dur-short) var(--ease-out); }
.vpill:hover { color: var(--color-ink); }
.vpill.on { color: var(--color-ink); background: linear-gradient(var(--part-top), var(--part-bottom));
  box-shadow: var(--edge-light), 0 1px 0 var(--lo), 0 4px 10px -4px var(--lo), inset 0 -2px 0 var(--color-accent); }
.vpill .draft-tag { color: var(--color-draft); font-size: var(--text-xs); }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); margin-top: var(--space-md); }

.downloads { display: grid; border-radius: var(--radius-card); border: 1px solid var(--color-rule);
  background: linear-gradient(var(--panel-top), var(--panel-bottom)); box-shadow: var(--edge-light), var(--shadow-panel); }
.dl-row { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-md) var(--space-md) 20px; }
.dl-row + .dl-row { border-top: 1px solid var(--color-rule-2); }
.dl-row .what { flex: 1; min-width: 0; }
.dl-row .kind { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--color-ink); font-weight: 500; }
.dl-row .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 var(--text-xs)/1.5 var(--font-mono); color: var(--color-faint); }
.dl-row .size { color: var(--color-faint); font-size: var(--text-sm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.no-file { padding: var(--space-md) 20px; }

/* prompt lines: the kit line already starts with its trigger, so one block per outfit with both copies */
.prompts { display: grid; gap: var(--space-sm); }
.prompt { border-radius: var(--radius-part); border: 1px solid var(--color-rule); background: var(--color-well); overflow: hidden; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: 8px 8px 0 14px; }
.prompt-label { min-width: 0; color: var(--color-ink-2); font-weight: 500; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-head .link-btn { flex: none; font-size: var(--text-xs); }
.prompt-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm); align-items: start; width: 100%;
  padding: 8px 14px 12px; border: 0; background: none; cursor: copy; text-align: left; color: var(--color-ink);
  transition: background-color var(--dur-short) var(--ease-out); }
.prompt-line:hover { background: var(--hi); }
.prompt-line code { font: 400 var(--text-sm)/1.6 var(--font-mono); overflow-wrap: anywhere; }
.prompt-line svg { width: 16px; height: 16px; margin-top: 3px; fill: var(--color-faint); }
.prompt-line:hover svg { fill: var(--color-accent); }
.words { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.word { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-part); cursor: copy; text-align: left;
  border: 1px solid var(--color-rule); background: var(--color-well); color: var(--color-ink); font: 400 var(--text-sm)/1.35 var(--font-mono);
  transition: border-color var(--dur-short) var(--ease-out); }
.word:hover { border-color: var(--color-accent-line); }
.word svg { width: 14px; height: 14px; fill: var(--color-faint); flex: none; }

/* the card's tips for this version only; the full card stays on Civitai (owner 11-02: "we don't need all this") */
.tips { margin: 0; padding: 0; list-style: none; }
.tips li { padding: var(--space-sm) 0; border-top: 1px solid var(--color-rule-2); color: var(--color-muted); line-height: 1.6; }
.tips li:last-child { border-bottom: 1px solid var(--color-rule-2); }
.tips strong, .tips b { color: var(--color-ink); font-weight: 500; }
.tips p { margin: 0; }   /* Civitai wraps each tip in its own paragraph */
.tips code { font: 400 0.92em var(--font-mono); color: var(--color-ink-2); background: var(--color-well); padding: 1px 6px; border-radius: 6px; }
.tips a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }

.section { margin-top: var(--space-2xl); }
.section-head { display: flex; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-md); }
.section-head h2 { font-size: var(--text-section); }
.section-head .count { color: var(--color-faint); font-size: var(--text-lg); font-variant-numeric: tabular-nums; }

/* gallery: one row that scrolls sideways (owner 11-02) */
.carousel { position: relative; }
.track { display: flex; gap: var(--space-sm); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding-bottom: var(--space-sm); scrollbar-width: thin; scrollbar-color: var(--color-rule-3) transparent; }
.track .item { position: relative; flex: 0 0 auto; height: clamp(280px, 56vh, 500px); scroll-snap-align: start; padding: 0; border: 0;
  border-radius: var(--radius-card); overflow: hidden; background: var(--color-paper-2); cursor: zoom-in; box-shadow: 0 0 0 1px var(--color-rule-2); }
.track .item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-long) var(--ease-out); }
.track .item:hover img { transform: scale(1.02); }
.track .item .hidden { position: absolute; left: 10px; top: 10px; }
.play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass); box-shadow: inset 0 1px 0 var(--hi-2), 0 0 0 1px var(--hi); }
.play svg { width: 24px; height: 24px; margin-left: 3px; fill: var(--color-ink); }
.car-nav { position: absolute; top: calc(50% - 6px); z-index: 2; transform: translateY(-50%); transition: opacity var(--dur-short) var(--ease-out); }
.car-nav.prev { left: 14px; }
.car-nav.next { right: 14px; }
.car-nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .car-nav { display: none; } }

/* comments: rules, not boxes, in a centred column (owner 11-02: "center this") */
.comments { max-width: 820px; margin-left: auto; margin-right: auto; }
.c-foot { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-xs); }
.like { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--color-rule); background: none; color: var(--color-muted); font-size: var(--text-sm); font-weight: 500;
  font-variant-numeric: tabular-nums; transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.like svg { width: 15px; height: 15px; fill: currentColor; }
.like:hover:not(:disabled) { color: var(--color-ink); border-color: var(--color-rule-hover); }
.like:active:not(:disabled) { transform: scale(0.94); }
.like.on { color: var(--color-accent); border-color: var(--color-accent-line); background: var(--color-accent-soft); }
.like:disabled { cursor: default; opacity: 0.6; }
.like .n:empty { display: none; }
.comment { display: flex; gap: var(--space-sm); padding: var(--space-md) 0; border-top: 1px solid var(--color-rule-2); }
.comment:last-child { border-bottom: 1px solid var(--color-rule-2); }
.c-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--color-paper-3); color: var(--color-muted); font-weight: 600; }
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-main { flex: 1; min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--text-sm); }
.c-head b { color: var(--color-ink); font-weight: 500; }
.c-when { color: var(--color-faint); font-size: var(--text-xs); }
.c-head .c-del { margin-left: auto; }
.owner-chip { background: var(--color-accent-soft); color: var(--color-accent); box-shadow: none; }
.c-body { margin-top: 4px; color: var(--color-ink-2); overflow-wrap: anywhere; line-height: 1.6; }
.cform { display: grid; gap: var(--space-sm); margin-top: var(--space-lg); }
.field, .cform textarea { width: 100%; padding: 12px 16px; border-radius: var(--radius-part); border: 1px solid var(--color-rule); outline: none;
  background: var(--color-well); color: var(--color-ink); box-shadow: inset 0 1px 2px oklch(0% 0 0 / 0.6); resize: vertical;
  transition: border-color var(--dur-short) var(--ease-out); }
.field:focus, .cform textarea:focus { border-color: var(--color-accent-line); }
.field:focus-visible, .cform textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.field::placeholder, .cform textarea::placeholder { color: var(--color-faint); }
.cform-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.hint { color: var(--color-faint); font-size: var(--text-sm); }

/* ── vote ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.vote-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.panel { padding: var(--space-lg); border-radius: var(--radius-card); border: 1px solid var(--color-rule);
  background: linear-gradient(var(--panel-top), var(--panel-bottom)); box-shadow: var(--edge-light), var(--shadow-panel); }
.panel h2 { font: 500 var(--text-title)/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: var(--space-md); }
@media (min-height: 1000px) { .propose { position: sticky; top: calc(var(--bar-h) + var(--space-lg)); } }   /* pinned only when the whole form fits */
.propose form { display: grid; gap: var(--space-md); }
.propose label, .field-label { display: grid; gap: 6px; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; }
.propose .opt { color: var(--color-faint); font-weight: 400; }
.propose .btn { width: 100%; }
.propose .hint { text-align: center; }
.drop { position: relative; display: grid; place-items: center; gap: var(--space-xs); min-height: 120px; padding: var(--space-md); cursor: pointer;
  border-radius: var(--radius-part); border: 1.5px dashed var(--color-rule-3); background: var(--color-well); text-align: center;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.drop:hover, .drop.over { border-color: var(--color-accent-line); background: var(--color-accent-soft); }
.drop:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.drop svg { width: 26px; height: 26px; fill: var(--color-faint); }
.drop-text { display: grid; gap: 2px; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.drop-text b { color: var(--color-ink); font-weight: 500; }
.drop.has-file svg, .drop.has-file .drop-text { display: none; }
.pimg-preview { max-width: 100%; max-height: 200px; border-radius: 8px; }
.drop-clear { justify-self: start; margin-top: -6px; }
.form-error { padding: 10px 12px; border-radius: var(--radius-part); background: var(--color-error-soft); color: var(--color-error); font-size: var(--text-sm); }
.dupe { padding: 9px 12px; border-radius: var(--radius-part); background: var(--color-accent-soft); color: var(--color-ink-2); font-size: var(--text-sm); }
.dupe + .dupe { margin-top: 6px; }
.dupe a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }
.board .seg { margin-bottom: var(--space-md); }
.plist { list-style: none; margin: 0; padding: 0; }
.prow { display: flex; gap: var(--space-md); align-items: flex-start; padding: var(--space-md) 0; border-top: 1px solid var(--color-rule-2); }
.prow:last-child { border-bottom: 1px solid var(--color-rule-2); }
.vote-btn { flex: none; width: 60px; display: grid; justify-items: center; gap: 2px; padding: 9px 0; cursor: pointer; border-radius: var(--radius-part);
  border: 1px solid var(--color-rule-3); background: linear-gradient(var(--part-top), var(--part-bottom)); box-shadow: var(--edge-light), var(--shadow-part);
  color: var(--color-ink); font-weight: 600; font-size: var(--text-md); font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.vote-btn svg { width: 18px; height: 18px; fill: var(--color-faint); }
.vote-btn:hover:not(:disabled) { border-color: var(--color-rule-hover); }
.vote-btn:active:not(:disabled) { transform: translateY(1px); }
.vote-btn.on { border-color: var(--color-accent-deep); color: var(--color-accent-ink); background: linear-gradient(var(--hi-2), transparent 60%) var(--color-accent);
  box-shadow: inset 0 1px 0 var(--hi-3), 0 1px 0 var(--lo), 0 10px 24px -14px var(--color-accent-glow); }
.vote-btn.on svg { fill: var(--color-accent-ink); }
.vote-btn:disabled { opacity: 0.55; cursor: default; }
.vote-btn.on:disabled { opacity: 1; }
.pinfo { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.pinfo > .powner { justify-self: stretch; }
.pname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--color-ink); font: 500 var(--text-lg)/1.3 var(--font-display); letter-spacing: -0.01em; }
.prank { min-width: 18px; color: var(--color-faint); font: 500 var(--text-sm) var(--font-body); font-variant-numeric: tabular-nums; }
.pseries { color: var(--color-muted); font: 400 var(--text-sm) var(--font-body); letter-spacing: 0; }
.pnote { overflow-wrap: anywhere; font-size: var(--text-sm); }
.pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--color-faint); font-size: var(--text-sm); }
.pmeta a { color: var(--color-ink-2); text-decoration: underline; text-decoration-color: var(--color-rule-hover); text-underline-offset: 0.3em; }
.pmeta a:hover { text-decoration-color: var(--color-accent); }
.pstatus-note { color: var(--color-muted); }
.powner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: 6px; }
.powner .dd { width: 150px; }
.powner .dd-btn { height: 38px; }
.pnote-in { flex: 1 1 200px; height: 38px; padding: 0 12px; font-size: var(--text-sm); }
.pthumb { flex: none; width: 76px; height: 100px; padding: 0; border: 0; border-radius: var(--radius-part); overflow: hidden; cursor: zoom-in;
  background: var(--color-paper-3); box-shadow: 0 0 0 1px var(--color-rule); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── viewer ─────────────────────────────────────────────────────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--scrim); }
.lightbox .lb-body { display: grid; place-items: center; max-width: 94vw; max-height: 88vh; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 88vh; border-radius: 10px; }
.lb-msg { padding: var(--space-lg); color: var(--color-ink-2); text-align: center; }
.lb-close, .lb-nav { position: absolute; z-index: 2; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--color-rule-3); background: linear-gradient(var(--part-top), var(--part-bottom)); box-shadow: var(--edge-light), var(--shadow-part); color: var(--color-ink); }
.lb-close { top: 16px; right: 16px; width: 44px; height: 44px; }
.lb-nav { top: 50%; width: 52px; height: 52px; transform: translateY(-50%); }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; fill: currentColor; }
.lb-nav:hover, .lb-close:hover { border-color: var(--color-rule-hover); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-count { position: absolute; top: 26px; left: 24px; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.lb-full { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); }
@media (hover: none) { .lb-nav { display: none; } }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translateX(-50%); padding: 11px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-rule-3); background: linear-gradient(var(--part-top), var(--part-bottom)); box-shadow: var(--edge-light), var(--shadow-panel);
  color: var(--color-ink); font-weight: 500; font-size: var(--text-sm); white-space: nowrap; }

/* ── mid screens ────────────────────────────────────────────────────────────────────────────────────────── */
/* activity (owner only, 11-03): one row per person, their downloads and favourites under it */
.act-sum { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.act-sum div { flex: 1 1 140px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-part); background: var(--color-well);
  box-shadow: inset 0 0 0 1px var(--color-rule-2); display: grid; gap: 2px; }
.act-sum b { font-size: var(--text-section); font-weight: 600; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.act-sum span { color: var(--color-muted); font-size: var(--text-sm); }
.act-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: var(--space-lg) 0 var(--space-sm); }
.act-tools .field { flex: 1 1 220px; max-width: 360px; }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-row { border-top: 1px solid var(--color-rule-2); }
.act-row:last-child { border-bottom: 1px solid var(--color-rule-2); }
.act-head { width: 100%; display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-2xs); border: 0;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-part); }
.act-head:hover { background: var(--hi); }
.act-head:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.act-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.act-who b { color: var(--color-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--color-faint); font-size: var(--text-xs); }
.act-via { display: inline-flex; align-items: center; gap: 4px; color: var(--color-muted); }
.act-via svg { width: 13px; height: 13px; fill: currentColor; }
.act-n { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 52px; color: var(--color-ink-2);
  font-variant-numeric: tabular-nums; }
.act-n svg { width: 16px; height: 16px; fill: var(--color-muted); }
.act-head .dd-chev { width: 18px; height: 18px; fill: var(--color-muted); transition: transform 0.2s; }
.act-row.open .dd-chev { transform: rotate(180deg); }
.act-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); padding: var(--space-xs) var(--space-2xs) var(--space-lg) 54px; }
.act-detail h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: var(--space-xs); }
.act-detail h3 .count { color: var(--color-faint); font-weight: 400; margin-left: 4px; }
.act-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.act-detail li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: var(--text-sm); }
.act-detail li a { color: var(--color-ink); font-weight: 500; }
.act-file { color: var(--color-muted); display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.act-detail .c-when { margin-left: auto; }
.act-thumb { flex: none; width: 38px; height: 50px; border-radius: 8px; overflow: hidden; background: var(--color-well); }
.act-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* the vote page's gate sits inside the propose panel: one box, not two */
.propose .gate { padding: 0; background: none; box-shadow: none; }

/* ── commissions: the price strip, the request form, the list, a request's page with its chat ───────────────── */
.nav a { position: relative; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--color-accent); color: var(--color-accent-ink); font: 600 11px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.nav-badge[hidden] { display: none; }
.prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); margin-bottom: var(--space-xl); }
.prices > div { display: grid; gap: 2px; padding: var(--space-md); border-radius: var(--radius-part); background: var(--color-well);
  box-shadow: inset 0 0 0 1px var(--color-rule-2); }
.prices b { color: var(--color-ink); font: 500 var(--text-title)/1.2 var(--font-display); letter-spacing: -0.02em; }
.prices span { color: var(--color-muted); font-size: var(--text-sm); }
.comm-layout { grid-template-columns: minmax(300px, 460px) minmax(0, 1fr); }
.comm-layout.owner { grid-template-columns: minmax(0, 1fr); }   /* the owner answers requests, he doesn't send them */
.cpanel form > .link-btn, .cpanel .field-label .seg { justify-self: start; }
.tier-note { margin: -6px 0 var(--space-md); padding: 10px 12px; border-radius: var(--radius-part); background: var(--color-accent-soft);
  color: var(--color-ink); font-size: var(--text-sm); }
.tier-note a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.25em; }
.tier-note.used { background: var(--color-well); color: var(--color-ink-2); }
.tier-board { margin-bottom: var(--space-xl); }
.tier-board ul { list-style: none; margin: 0; padding: 0; }
.tier-board li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm) var(--space-xs);
  border-top: 1px solid var(--color-rule-2); }
.tier-board li:last-child { border-bottom: 1px solid var(--color-rule-2); }
.tier-board b { color: var(--color-ink); font-weight: 500; }
.tier-board a.chip { text-decoration: none; }
.cchar { display: grid; gap: var(--space-sm); margin: 0; padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-part); }
.cchar + .cchar { margin-top: var(--space-sm); }
.cchar legend { display: flex; align-items: center; gap: var(--space-sm); padding: 0 6px; color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.propose label.check { display: flex; align-items: flex-start; gap: var(--space-sm); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-accent); }
.check > span { display: grid; gap: 2px; }
.check b { color: var(--color-ink); font-weight: 500; }
.picked { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.picked:empty { display: none; }
.picked li { display: grid; gap: 2px; justify-items: center; }
.picked img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-part); }
.quote { display: grid; gap: 6px; padding: var(--space-md); border-radius: var(--radius-part); background: var(--color-well); font-size: var(--text-sm); }
.quote > div { display: flex; justify-content: space-between; gap: var(--space-sm); }
.quote > div > span:last-child { color: var(--color-ink); font-variant-numeric: tabular-nums; }
.quote .total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--color-rule-2); color: var(--color-ink); font-weight: 600; font-size: var(--text-md); }
.board-title { font: 500 var(--text-title)/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: var(--space-md); }
.clist { list-style: none; margin: 0; padding: 0; }
.crow { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-xs); border-top: 1px solid var(--color-rule-2); color: inherit;
  text-decoration: none; border-radius: var(--radius-part); }
.clist li:last-child .crow { border-bottom: 1px solid var(--color-rule-2); }
.crow:hover { background: var(--hi); }
.cid { flex: none; min-width: 40px; color: var(--color-faint); font-variant-numeric: tabular-nums; }
.cmain { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cmain b { color: var(--color-ink); font-weight: 500; }
.crow.unread .cmain b { font-weight: 600; }
.cmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--color-faint); font-size: var(--text-sm); }
.cdot { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-xs); }
.cstatus { flex: none; }
.cstatus.s-new, .cstatus.s-quoted { background: var(--color-accent-soft); color: var(--color-accent); box-shadow: none; }
.cstatus.s-declined, .cstatus.s-cancelled { background: var(--color-error-soft); color: var(--color-error); box-shadow: none; }
.chead { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.comm-page { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.cside { display: grid; gap: var(--space-lg); }
.cside .panel { display: grid; gap: var(--space-sm); justify-items: start; }
.cside .panel h2 { margin-bottom: 0; }
.cside .quote { justify-self: stretch; }
.cdetail { display: grid; gap: 6px; justify-items: start; }
.cdetail + .cdetail { padding-top: var(--space-sm); border-top: 1px solid var(--color-rule-2); justify-self: stretch; }
.outfits { margin: 0; padding-left: 18px; color: var(--color-ink-2); font-size: var(--text-sm); }
.outfits .opt { color: var(--color-faint); }
.cnotes { white-space: pre-wrap; }
.cowner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: var(--space-xs); align-items: end; justify-self: stretch; }
.cowner label, .cowner .field-label { display: grid; gap: 6px; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; }
.cowner .field { height: 42px; padding: 0 12px; }
.cowner .dd-btn { height: 42px; }
.cfiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); justify-self: stretch; }
.cfiles li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.cfiles .btn { max-width: 100%; }
.cfiles .btn span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfiles .opt { color: var(--color-faint); font-weight: 400; }
#cdeliver { cursor: pointer; }
.cprogress { justify-self: stretch; height: 6px; border-radius: var(--radius-pill); background: var(--color-well); overflow: hidden; }
.cprogress div { width: 0; height: 100%; background: var(--color-accent); transition: width 0.3s; }
.crefs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.crefs li { display: grid; gap: 2px; justify-items: center; }
.cref { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-part); overflow: hidden; }
.cref img { display: block; width: 96px; height: 96px; object-fit: cover; }
.drop.small { min-height: 0; padding: var(--space-sm); justify-self: stretch; }
.drop.small svg { width: 20px; height: 20px; }
.chat { position: sticky; top: calc(var(--bar-h) + var(--space-lg)); display: flex; flex-direction: column; height: calc(100vh - var(--bar-h) - var(--space-2xl));
  min-height: 420px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(560px, 85%); padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--color-well);
  box-shadow: inset 0 0 0 1px var(--color-rule-2); }
.msg.mine .bubble { border-radius: 16px 16px 4px 16px; background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px var(--color-accent-line); }
.msg-head { display: flex; align-items: baseline; gap: var(--space-xs); font-size: var(--text-sm); }
.msg-head b { color: var(--color-ink); font-weight: 500; }
.msg-body { margin-top: 2px; color: var(--color-ink-2); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.cevent { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: var(--space-xs); color: var(--color-faint);
  font-size: var(--text-sm); text-align: center; }
.chat-form { display: flex; gap: var(--space-xs); align-items: flex-end; margin-top: var(--space-md); }
.chat-form textarea { flex: 1; resize: vertical; min-height: 46px; max-height: 200px; }

@media (max-width: 1100px) {
  .search { flex-basis: 260px; }
  .autoplay-toggle.in-bar > span:last-child { display: none; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .vote-layout { grid-template-columns: minmax(0, 1fr); }
  .propose { position: static; }
  .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comm-page { grid-template-columns: minmax(0, 1fr); }
  .chat { position: static; height: auto; min-height: 0; }
  .chat-log { max-height: 60vh; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .hero-side { position: static; justify-self: center; width: min(420px, 100%, calc(62vh * 2 / 3)); }   /* the name stays in the first screen */
}

/* ── phones: the sections move to a tab bar at the bottom, search opens from an icon, autoplay lives in the menu ── */
@media (max-width: 720px) {
  :root { --gutter: 16px; --bar-h: 58px; }
  .act-detail { grid-template-columns: 1fr; padding-left: var(--space-2xs); }
  .act-n { min-width: 40px; }
  .act-n.empty-n { display: none; }
  .top { gap: var(--space-sm); backdrop-filter: none; background: var(--color-paper); }   /* a blurred bar would trap the fixed tab bar */
  .top.searching { flex-wrap: wrap; height: auto; padding-top: 9px; padding-bottom: 10px; row-gap: 10px; }
  .wordmark { font-size: 1.15rem; }
  .tools { gap: var(--space-xs); }
  .search { display: none; }
  .top.searching .search { display: block; order: 3; flex: 1 0 100%; }
  .top.searching .tools { display: contents; }
  .top.searching .search-open, .top.searching .account { margin-left: auto; }
  .top.searching .account { margin-left: 0; }
  .search-open { display: grid; }
  .autoplay-toggle.in-bar { display: none; }
  .menu .autoplay-toggle { display: flex; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0;
    height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
    background: var(--color-paper-2); border-top: 1px solid var(--color-rule); box-shadow: 0 -12px 28px -16px oklch(0% 0 0 / 0.8); }
  .nav a { flex-direction: column; justify-content: center; gap: 3px; padding: 4px 2px; border-radius: var(--radius-part); font-size: 11.5px;
    color: var(--color-muted); text-align: center; white-space: nowrap; }
  .nav a svg { display: block; width: 22px; height: 22px; fill: currentColor; }
  .nav a:hover { background: none; }
  .nav a.on { color: var(--color-accent); background: none; box-shadow: none; }
  .nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  .row2, .cowner { grid-template-columns: minmax(0, 1fr); }
  .crow { flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); }
  .cmain { flex-basis: calc(100% - 60px); }
  .crow .cstatus { margin-left: 52px; }
  main { padding: var(--space-md) var(--gutter) calc(var(--tabs-h) + env(safe-area-inset-bottom) + var(--space-xl)); }
  .toast { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); }
  .intro { margin-top: var(--space-xs); }
  .intro .count, .intro-sub { font-size: var(--text-md); }
  .filters { width: 100%; }
  .filters .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filters .dd, .filters .dd[data-filter="franchise"] { flex: 1 1 calc(50% - 6px); width: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--space-sm); }
  .media { border-radius: 16px; }
  .media .chips { left: 8px; top: 8px; right: 46px; }
  .media .status { left: 8px; bottom: 8px; }
  .media .fav { right: 8px; top: 8px; }
  .caption .jp { display: none; }
  .hero-info { gap: var(--space-lg); }
  .dl-row { flex-wrap: wrap; }
  .dl-row .btn { width: 100%; }
  .vbase { min-width: 0; flex: 1 0 100%; font-size: var(--text-sm); }
  .lb-full { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .panel { padding: var(--space-md); }
}

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