/* Self-hosted fonts (SIL Open Font License), from Fontsource. */
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("/fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

/* FanMarquee. Dark theater by default, light lobby when the device prefers it. */
:root {
  --velvet: #4a1236;
  --backstage: #2a0a1f;
  --bulb: #f4b942;
  --signal: #1fb5a3;
  --ink: #15111a;
  --screen: #f6f4f8;

  --bg: #120e16;
  --surface: #1c1622;
  --surface-2: #261e2d;
  --fg: #f3eef5;
  --muted: #a99db2;
  --line: #35293d;
  --accent: #f4b942;
  --safe: #3fd1bf;
  --danger: #ff8a7a;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4f8;
    --surface: #ffffff;
    --surface-2: #efeaf2;
    --fg: #1a1320;
    --muted: #6b5e74;
    --line: #ddd4e2;
    --accent: #8f5f06;
    --safe: #0f7d70;
    --danger: #b3261e;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 1; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
p { margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 8px 72px; display: grid; gap: 48px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--bulb); color: var(--ink); padding: 8px 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; }
.label { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 62ch; color: var(--muted); }
.empty { color: var(--muted); padding: 24px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); }
.notice.ok { border-left-color: var(--safe); }
.notice.err { border-left-color: var(--danger); }
.inline { display: inline; }

/* Header */
.top { background: var(--backstage); color: var(--screen); position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top, 0px); }
.bulbs { display: flex; gap: 14px; height: 6px; overflow: hidden; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.bulbs i { flex: 0 0 6px; height: 6px; border-radius: 50%; background: var(--bulb); box-shadow: 0 0 8px var(--bulb); }
@media (prefers-reduced-motion: no-preference) {
  .bulbs i { animation: chase 1.8s infinite; }
  .bulbs i:nth-child(3n + 1) { animation-delay: 0.6s; }
  .bulbs i:nth-child(3n + 2) { animation-delay: 1.2s; }
}
@keyframes chase { 50% { opacity: 0.3; box-shadow: none; } }
.bar { max-width: 1040px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand span { font: 900 1.6rem/1 var(--display); text-transform: uppercase; }
.brand b { color: var(--bulb); font-weight: 900; }
.mark { width: 34px; height: 34px; flex: none; }
.search { flex: 1 1 220px; min-width: 0; }
.search input { width: 100%; background: rgb(255 255 255 / 0.08); color: var(--screen); border: 1px solid rgb(255 255 255 / 0.14); border-radius: 999px; padding: 8px 14px; font: inherit; }
.search input::placeholder { color: #c4b3c8; }
.nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-weight: 500; }
.nav-links a { text-decoration: none; }
.top .link { color: var(--screen); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bulb); color: var(--ink); border: 0; border-radius: 999px; padding: 10px 18px; font: 600 0.95rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.link { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.link:hover { color: var(--accent); }
.link.small { font-size: 0.82rem; }
.link:focus-visible { outline: 2px solid var(--accent); }

/* Hero and sections */
.hero { padding-top: 40px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(3rem, 11vw, 6.5rem); line-height: 0.92; }
.hero h1 span { color: var(--accent); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
section { display: grid; gap: 18px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.page-head { display: grid; gap: 12px; padding-top: 28px; }
.page-head.profile { grid-template-columns: auto 1fr; align-items: center; gap: 18px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.9rem; color: var(--muted); padding-top: 20px; margin-bottom: -36px; }
.crumbs a { text-decoration: none; }

.fgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fcard { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.fcard b { font: 900 1.5rem/1.05 var(--display); text-transform: uppercase; }
.fcard span { color: var(--muted); font-size: 0.92rem; }
.fcard:hover { border-color: var(--accent); color: inherit; }
.tgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tcard { display: grid; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.tcard b { font-weight: 600; line-height: 1.3; }
.tcard .kind { font: 600 0.68rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tcard:hover { border-color: var(--accent); color: inherit; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 0.9rem; background: var(--surface); }
.chip:hover { border-color: var(--accent); }

.how { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li { counter-increment: s; display: grid; gap: 4px; color: var(--muted); }
.steps li::before { content: counter(s); font: 900 2rem/1 var(--display); color: var(--safe); }
.steps b { color: var(--fg); }

/* Watch order, episodes, progress */
.order { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.order li { display: grid; grid-template-columns: 2.5em minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); align-items: baseline; }
.order li:last-child { border-bottom: 0; }
.order li .muted:not(.mono) { grid-column: 2; font-size: 0.88rem; }
.order .prog { grid-column: 3; grid-row: 1; font: 500 0.78rem var(--mono); color: var(--safe); }
.season { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.season summary { padding: 14px 16px; cursor: pointer; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.eps { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; }
.eps li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.eps li:hover { background: var(--surface-2); }
.eps li a { text-decoration: none; min-width: 0; }
.eps li.seen a { color: var(--muted); }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; font-weight: 700; padding: 0; }
.tick:hover { border-color: var(--safe); }
.tick.on { background: var(--safe); border-color: var(--safe); }
.seen-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.gate { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--velvet); color: var(--screen); border-radius: 12px; padding: 20px; }
.gate p { color: #e6d9e9; }
.ep-nav { display: flex; justify-content: space-between; font: 500 0.85rem var(--mono); }
.ep-nav a { text-decoration: none; }
.mylist { display: grid; gap: 10px; }
.myrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.myrow .mono { color: var(--safe); }
.myrow progress { grid-column: 1 / -1; width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.myrow progress::-webkit-progress-bar { background: var(--surface-2); }
.myrow progress::-webkit-progress-value { background: var(--safe); }
.myrow progress::-moz-progress-bar { background: var(--safe); }

/* Posts and Spoiler Shield */
.thread { display: grid; gap: 12px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: grid; gap: 10px; min-width: 0; scroll-margin-top: 120px; }
.post.removed { opacity: 0.7; }
.who { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.who a { text-decoration: none; }
.who .where { color: var(--muted); }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--velvet); color: var(--bulb); display: grid; place-items: center; font: 900 0.9rem var(--display); flex: none; }
.av.big { width: 64px; height: 64px; font-size: 1.8rem; }
.txt { display: grid; gap: 10px; overflow-wrap: anywhere; }
.post-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ep { font: 600 0.72rem var(--mono); padding: 4px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.ep.safe { color: var(--safe); }
.post.locked { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.shield { display: grid; justify-items: start; gap: 6px; }
.shield b { font: 900 1.15rem var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.shield span { color: var(--muted); font-size: 0.9rem; }
.composer, .cta-card { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.cta-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.composer-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.composer-row .btn { margin-left: auto; }
.hint { font-size: 0.82rem; color: var(--muted); }
textarea, input, select { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; max-width: 100%; }
select { width: auto; }
textarea { resize: vertical; }

/* Forms and prose */
.auth { max-width: 440px; width: 100%; margin: 0 auto; padding-top: 32px; display: grid; gap: 14px; }
.form { display: grid; gap: 8px; }
.form label { font-weight: 600; margin-top: 8px; }
.form .btn { margin-top: 12px; justify-self: start; }
.form label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.form label.check input { width: auto; }
.prose { max-width: 68ch; display: grid; gap: 16px; padding-top: 28px; }
.rules { display: grid; gap: 10px; padding-left: 1.2em; }
.plain { display: grid; gap: 10px; padding-left: 1.1em; }
.mod { display: grid; gap: 8px; }
.mod-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { padding-block: 32px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-in > div { display: grid; gap: 10px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: start; }
.foot .brand span { font-size: 1.3rem; }

@media (max-width: 640px) {
  .nav-links { width: 100%; justify-content: space-between; }
  .order li { grid-template-columns: 2em minmax(0, 1fr); }
  .order .prog { grid-column: 2; grid-row: auto; }
}
