/*
Theme Name: CSNSFW
Theme URI: https://candyshortsnsfw.com/
Author: Candyshortsnsfw Team
Description: Lightweight editorial theme for candyshortsnsfw.com. No builder, no jQuery, SEO in the theme.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: csnsfw
*/

/* Tokens. Contrast ratios measured against --bg (see factsheet section 11). */
:root {
  --bg: #fbf8f6;
  --panel: #ffffff;
  --tint: #fff3f1;
  --line: #ece4df;
  --line-2: #d9cdc6;
  --ink: #1c1a21;
  --ink-2: #4d4852;
  --muted: #6b6570;
  --link: #4a44d8;
  --link-hover: #332eb3;
  --flame: #fa7f7c;
  --flame-hover: #ff8e89;
  --flame-ink: #b5484a;
  --on-flame: #2a1216;
  --night: #151319;
  --shadow: 0 1px 2px rgba(28, 26, 33, .05), 0 10px 30px rgba(28, 26, 33, .07);
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rail: 256px;
  --top: 64px;
  --measure: 740px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #151319; --panel: #1e1b23; --tint: #2b1e23; --line: #2e2a35; --line-2: #413b49;
  --ink: #f3f0f5; --ink-2: #bfb9c6; --muted: #9c96a3; --link: #a8a3ff; --link-hover: #c9c6ff;
  --flame-ink: #ff9590; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151319; --panel: #1e1b23; --tint: #2b1e23; --line: #2e2a35; --line-2: #413b49;
    --ink: #f3f0f5; --ink-2: #bfb9c6; --muted: #9c96a3; --link: #a8a3ff; --link-hover: #c9c6ff;
    --flame-ink: #ff9590; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(assets/fonts/plus-jakarta-sans-latin-normal.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;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: italic; font-weight: 400 800; font-display: swap;
  src: url(assets/fonts/plus-jakarta-sans-latin-italic.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;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
/* "calt" off: Plus Jakarta Sans draws a hyphen between digits as a long dash (12-month, 45-118). */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--font); font-feature-settings: "calt" 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font-feature-settings: "calt" 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.018em; margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 2.65rem); font-weight: 800; }
p, ul, ol, dl, table, figure { margin: 0 0 1.1em; }
button { font: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.jump { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--panel); color: var(--ink); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; }
.jump:focus { top: 12px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--flame); color: var(--on-flame); display: grid; place-items: center; }
.logo b { color: var(--flame-ink); font-weight: 800; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: border-color .15s, color .15s; }
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-dark-icon { display: none; }
:root[data-theme="dark"] .theme-light-icon { display: none; }
:root[data-theme="dark"] .theme-dark-icon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-icon { display: none; }
  :root:not([data-theme="light"]) .theme-dark-icon { display: block; }
}
.menu-btn { margin-right: 2px; }
/* The visit button stays in the sticky bar at every width. Narrow phones: text-only logo and the short label
   "Watch free" (measured: hamburger + full logo + "Watch on Candy.ai" need 485px; below 360px the icon goes). */
.cta-short { display: none; }
@media (max-width: 519px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .logo { font-size: clamp(.8rem, 4vw, 1.08rem); }
  .logo-mark { display: none; }
  .topbar .cta { padding: 0 14px; }
  .topbar .cta-long { display: none; }
  .topbar .cta-short { display: inline; }
}
@media (max-width: 359px) { .topbar .cta svg { display: none; } }

/* Shell: rail (sidebar) + stage */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.rail { position: fixed; z-index: 50; top: var(--top); bottom: 0; left: 0; width: min(86vw, 320px); overflow-y: auto; padding: 8px 12px 28px; background: var(--panel); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .22s ease; }
.rail-open .rail { transform: none; }
.scrim { position: fixed; inset: var(--top) 0 0 0; z-index: 45; background: rgba(21, 19, 25, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.rail-open .scrim { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { position: sticky; top: var(--top); height: calc(100vh - var(--top)); width: auto; transform: none; transition: none; z-index: 1; }
  .scrim, .menu-btn { display: none; }
}
.rail-label { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 12px 8px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 600; line-height: 1.35; }
.rail li > a:hover { background: var(--tint); color: var(--ink); }
.rail li > a[aria-current="page"] { background: var(--tint); color: var(--ink); font-weight: 800; }
.rail li > a[aria-current="page"]::after { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--flame); }
.rail li > .all-link { color: var(--link); font-weight: 800; }
.count { flex: none; min-width: 26px; text-align: center; background: var(--flame); color: var(--on-flame); font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.rail-foot { margin: 26px 4px 0; padding: 16px; border-radius: var(--radius); background: var(--tint); font-size: .85rem; color: var(--ink-2); line-height: 1.5; }
.rail-foot .cta { width: 100%; margin-top: 12px; }
.rail-theme { display: flex; align-items: center; gap: 10px; width: 100%; margin: 18px 0 0; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font: inherit; font-size: .92rem; font-weight: 600; line-height: 1.35; text-align: left; cursor: pointer; }
.rail-theme:hover { background: var(--tint); color: var(--ink); }
.rail-theme svg { width: 18px; height: 18px; flex: none; }
.rail-theme .switch { position: relative; flex: none; width: 36px; height: 20px; margin-left: auto; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.rail-theme .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.rail-theme[aria-pressed="true"] .switch { background: var(--flame); }
.rail-theme[aria-pressed="true"] .switch::after { transform: translateX(16px); }

.stage { min-width: 0; padding: 24px 16px 72px; }
@media (min-width: 768px) { .stage { padding: 36px 40px 88px; } }
.sheet { max-width: var(--measure); margin: 0 auto; }
.sheet-wide { max-width: 1120px; margin: 0 auto; }

/* Page head */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: .95rem; font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--muted); }
.trail a { color: inherit; text-decoration: none; }
.trail a:hover { color: var(--link); }
.trail li + li::before { content: "\203A"; margin-right: 8px; color: var(--line-2); font-variant-caps: normal; }
.eyebrow { display: block; margin: 0 0 10px; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--flame-ink); }
.lede { max-width: 62ch; margin: 14px 0 16px; font-size: 1.17rem; line-height: 1.6; color: var(--ink-2); }
.byline { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 26px; font-size: .86rem; color: var(--muted); }
.byline-top { margin: 12px 0 0; }
.byline span + span::before { content: "\00B7"; margin-right: 10px; }
/* Phones: the byline takes two lines anyway, so the date gets the first one and no line starts with a dot. */
@media (max-width: 519px) {
  .byline span:first-child { flex-basis: 100%; }
  .byline span:nth-child(2)::before { content: none; margin: 0; }
}

/* Quick answer */
.snap { margin: 0 0 34px; padding: 18px 20px 18px; background: var(--tint); border: 1.5px solid var(--flame); border-radius: var(--radius); }
.snap-label { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--flame-ink); }
.snap-label svg { width: 16px; height: 16px; }
.snap p:not(.snap-label) { margin: 0; font-size: 1.03rem; line-height: 1.68; color: var(--ink); }
.snap-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 30px; }
.snap-cta p { margin: 0; max-width: 42ch; font-size: .84rem; line-height: 1.45; color: var(--muted); }

/* Article copy */
.copy > :first-child { margin-top: 0; }
.copy h2 { font-size: clamp(1.38rem, 1.18rem + .8vw, 1.72rem); font-weight: 800; margin: 2.3em 0 .65em; }
.copy h3 { font-size: 1.14rem; font-weight: 800; margin: 1.8em 0 .45em; }
.copy ul, .copy ol { padding-left: 1.25em; }
.copy li { margin: 0 0 .45em; }
.copy li::marker { color: var(--flame-ink); }
.copy strong { font-weight: 700; }
.copy blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--flame); color: var(--ink-2); }
.copy figure { margin: 30px 0; }
.copy figure img { border-radius: var(--radius); background: var(--line); }
.copy figure:not(.shot) img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* App screenshots: whole image in its own shape (ratio from the width and height attributes), phone size, centered. */
.copy figure.shot { text-align: center; }
.copy figure.shot img { width: auto; height: auto; max-width: min(100%, 300px); max-height: min(540px, 72vh); object-fit: contain; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.copy figure.shot figcaption { max-width: 46ch; margin-inline: auto; }
.count.new { min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.copy figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.scroll-x { overflow-x: auto; margin: 0 0 1.3em; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.scroll-x table { margin: 0; }
.copy table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.copy th { text-align: left; font-weight: 800; background: var(--tint); white-space: nowrap; }
.copy th, .copy td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.copy tr:last-child td { border-bottom: 0; }

/* Buttons */
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1.5px solid transparent; border-radius: 999px; font-weight: 800; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.cta:active { transform: translateY(1px); }
.cta svg { width: 16px; height: 16px; flex: none; }
.cta-main { background: var(--flame); color: var(--on-flame); }
.cta-main:hover { background: var(--flame-hover); color: var(--on-flame); }
.cta-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
.cta-line:hover { border-color: var(--ink-2); color: var(--ink); }
.cta-light { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .55); color: #fff; }
.cta-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.cta-sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.go { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 38px 0; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.go p { margin: 0; max-width: 46ch; font-weight: 700; line-height: 1.5; }
.go small { display: block; margin-top: 2px; font-weight: 500; font-size: .84rem; color: var(--muted); }

/* FAQ */
.qa-list { margin: 44px 0 0; }
.qa-list h2, .band h2 { font-size: clamp(1.38rem, 1.18rem + .8vw, 1.72rem); font-weight: 800; margin: 0 0 16px; }
.qa { margin: 0 0 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qa summary { position: relative; list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; line-height: 1.45; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--flame-ink); border-bottom: 2px solid var(--flame-ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.qa[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.qa summary:hover { color: var(--flame-ink); }
.qa-a { padding: 0 20px 18px; color: var(--ink-2); }
.qa-a p:last-child { margin: 0; }

/* Related reads */
.band { margin: 48px 0 0; }
.band-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 0 0 16px; }
.band-head h2 { margin: 0; }
.band-head a { font-weight: 800; font-size: .93rem; text-decoration: none; }
.band-head a:hover { text-decoration: underline; }
.reads { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.read { display: block; height: 100%; padding: 16px 18px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.read:hover { border-color: var(--flame); color: var(--ink); transform: translateY(-2px); }
.read strong { display: block; margin: 0 0 4px; font-size: 1rem; line-height: 1.35; }
.read span { display: block; font-size: .88rem; line-height: 1.5; color: var(--muted); }

/* Poster shelf */
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; } }
@media (min-width: 1180px) { .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { display: block; color: var(--ink); text-decoration: none; }
.tile:hover { color: var(--ink); }
.tile-art { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.tile-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-art img { transform: scale(1.04); }
.tile-name { margin: 10px 0 2px; font-size: .98rem; font-weight: 800; line-height: 1.3; }
.tile-meta { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.flag { position: absolute; left: 10px; top: 10px; background: var(--flame); color: var(--on-flame); font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.flag-spicy { background: var(--night); color: #fff; box-shadow: inset 0 0 0 1px rgba(250, 127, 124, .7); }
.heat { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; line-height: 1; }
.tile-art .heat { position: absolute; left: 10px; bottom: 10px; padding: 6px 10px 6px 8px; border-radius: 999px; background: rgba(21, 19, 25, .8); color: #fff; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.tile-art .pips i { background: rgba(255, 255, 255, .32); }
.pips i.on, .tile-art .pips i.on { background: var(--flame); }

/* Home question box */
.ask { margin: 0 0 36px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ask h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 14px; }
.ask ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .ask ul { grid-template-columns: 1fr 1fr; } }
.ask a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.35; }
.ask a:hover { background: var(--tint); color: var(--ink); }
.ask a::before { content: "?"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--flame); color: var(--on-flame); font-weight: 800; font-size: .85rem; }

/* Facts list (series and creator heroes) */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 20px; margin: 18px 0 22px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: .94rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; }
.facts a { font-weight: 800; }

/* Footer */
.base { border-top: 1px solid var(--line); background: var(--panel); padding: 30px 16px 34px; font-size: .88rem; color: var(--muted); }
@media (min-width: 1024px) { .base { padding-left: calc(var(--rail) + 40px); padding-right: 40px; } }
.base-in { max-width: 1120px; display: grid; gap: 14px; }
.base nav ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.base nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.base nav a:hover { color: var(--link); }
.base p { margin: 0; max-width: 88ch; line-height: 1.6; }

/* Age gate and consent (rendered at the end of the DOM, opened by site.js) */
.gate { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(21, 19, 25, .74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.gate.is-open { display: grid; }
.gate-box { width: 100%; max-width: 440px; padding: 28px 26px 24px; background: var(--panel); color: var(--ink); border-radius: 22px; box-shadow: var(--shadow); }
.gate-title { margin: 0 0 10px; font-size: 1.4rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.gate-box p { color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.gate-box .cta-row { margin-top: 18px; }
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: none; max-width: 560px; margin: 0 auto; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.consent.is-open { display: block; }
.consent p { margin: 0 0 12px; font-size: .9rem; line-height: 1.55; color: var(--ink-2); }

/* 404 */
.lost { padding: 40px 0; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Layout helpers for the templates */
.home-series { margin-top: 0; }
.home-copy { margin-top: 48px; }
.sheet .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .sheet .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.index-copy { margin-top: 44px; }
.band-head a svg { display: inline; width: 15px; height: 15px; vertical-align: -2px; }
.byline span { white-space: nowrap; }
/* Logged-in view: keep the top bar and the rail below the WordPress admin bar */
@media (min-width: 601px) {
  .admin-bar .topbar { top: 46px; }
  .admin-bar .rail, .admin-bar .scrim { top: calc(var(--top) + 46px); }
}
@media (min-width: 783px) {
  .admin-bar .topbar { top: 32px; }
  .admin-bar .rail, .admin-bar .scrim { top: calc(var(--top) + 32px); }
}
@media (min-width: 1024px) {
  .admin-bar .rail { height: calc(100vh - var(--top) - 32px); }
}

/* ===== Network layout (November 2026): hero with clip, video cards, rails, tab bar, CTA card, end banner ===== */
:root { --tabbar: 62px; }
.topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (max-width: 1023px) {
  body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .rail, .scrim { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .consent { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px); }
}

/* Clip: poster image (LCP) with the muted loop fading in on top once it plays. Fixed ratio, so no layout shift. */
.clip { position: relative; display: block; overflow: hidden; background: #1c1a21; color: #fff; text-decoration: none; }
.clip > img, .clip > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip > video { opacity: 0; transition: opacity .35s ease; }
.clip.is-playing > video { opacity: 1; }
.badge { position: absolute; z-index: 2; font-size: .7rem; font-weight: 800; line-height: 1; letter-spacing: .01em; padding: 6px 10px; border-radius: 999px; background: rgba(21, 19, 25, .78); color: #fff; pointer-events: none; }
.badge-tr { top: 10px; right: 10px; }
.badge-tl { top: 10px; left: 10px; }
.badge-br { bottom: 10px; right: 10px; }
.badge-bl { bottom: 10px; left: 10px; }
.badge-flame { background: var(--flame); color: var(--on-flame); }
.badge-dark { background: var(--night); box-shadow: inset 0 0 0 1px rgba(250, 127, 124, .7); }
.tile-art .clip { position: absolute; inset: 0; }
.tile-art .badge { font-size: .64rem; padding: 5px 8px; }
.tile-art .badge-tr { top: 8px; right: 8px; }
.tile-art .badge-bl { bottom: 10px; left: 10px; font-size: .68rem; padding: 6px 10px; }
.tile:hover .tile-art video { transform: scale(1.04); transition: transform .35s ease, opacity .35s ease; }

/* Hero. Phones: media full width under the top bar, then kicker, H1, short line and button (all in the first screen
   at 390x844). Wider screens: two columns. Nothing is written over the media. */
.hero { display: grid; margin: -24px -16px 18px; }
.clip-hero { aspect-ratio: 5 / 4; }
.clip-hero > img, .clip-hero > video { object-position: 50% 18%; }
.hero-body { min-width: 0; padding: 14px 16px 0; }
.hero .eyebrow { margin: 0 0 6px; }
.hero h1 { font-size: clamp(1.5rem, 1.12rem + 1.8vw, 2.45rem); }
.hero h1 em { font-style: normal; color: var(--flame-ink); }
.hero-text { margin: 8px 0 14px; font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); }
.hero-cta { gap: 10px; }
.hero-note { margin: 10px 0 0; max-width: 56ch; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.hero-more { margin-top: 12px; }
.hero-lede { margin: 16px 0 0; max-width: 56ch; color: var(--ink-2); line-height: 1.6; }
.hero .facts { margin: 18px 0 0; }
.page-hero .trail { margin-top: 8px; }
.page-hero .byline { margin: 0 0 10px; }
.page-hero .lede { margin-top: 6px; }
@media (min-width: 768px) {
  .hero { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; margin: 0 0 30px; }
  .clip-hero { aspect-ratio: 2 / 3; border-radius: var(--radius); box-shadow: var(--shadow); }
  .clip-hero > img, .clip-hero > video { object-position: 50% 50%; }
  .hero-body { padding: 6px 0 0; }
}
@media (min-width: 1180px) { .home-hero .hero { grid-template-columns: 340px minmax(0, 1fr); } }

/* Rails: scroll inside their own box, so the page never scrolls sideways */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 42%); gap: 14px; margin: 0; padding: 0 0 10px; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip > li { min-width: 0; scroll-snap-align: start; }
@media (min-width: 640px) { .strip { grid-auto-columns: minmax(168px, 28%); } }
@media (min-width: 1024px) { .strip { grid-auto-columns: minmax(176px, 19%); } }
.strip-band { margin-top: 40px; }

/* Series page: episodes and tokens, episode 1 and cast, also searched, before-you-watch links */
.access { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 28px; }
.access p { margin: 0; padding: 14px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
.access strong { display: block; font-size: 1.32rem; font-weight: 800; line-height: 1.15; color: var(--flame-ink); }
.access span { display: block; margin-top: 4px; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.access .access-note { grid-column: 1 / -1; padding: 0; border: 0; background: none; text-align: left; font-size: .8rem; color: var(--muted); }
.episodes { margin: 0 0 34px; }
.episodes h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); font-weight: 800; margin: 0 0 10px; }
.episodes > p { margin: 0; color: var(--ink-2); }
.cast { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.cast li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cast strong { font-weight: 800; }
.cast span { font-size: .92rem; color: var(--muted); }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 26px 0 0; font-size: .85rem; color: var(--muted); }
.also span { margin-right: 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.also em { font-style: normal; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); }
.before-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 36px 0 0; padding: 14px 16px; background: var(--tint); border-radius: var(--radius); font-size: .92rem; }
.before-watch span { font-weight: 800; }
.before-watch a { font-weight: 700; }

/* CTA card between sections and the end banner before the footer */
.cta-card { display: flex; align-items: center; gap: 14px; margin: 32px 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cta-card-art { flex: none; width: 72px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; background: var(--line); }
.cta-card-art img { width: 100%; height: 100%; object-fit: cover; }
.cta-card-body { min-width: 0; }
.copy .cta-card p, .cta-card p { margin: 0; }
.cta-card-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--flame-ink); }
.cta-card-title { margin: 2px 0 10px !important; font-weight: 800; line-height: 1.3; }
.endcap { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 16px; align-items: center; max-width: 1120px; margin: 56px auto 0; padding: 16px; background: var(--night); color: #fff; border-radius: 20px; }
.endcap-art { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 12px; }
.endcap-art img { width: 100%; height: 100%; object-fit: cover; }
.endcap-body { min-width: 0; }
.endcap-kicker { margin: 0 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ff9590; }
.endcap-title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.endcap-text { margin: 0 0 14px; font-size: .9rem; line-height: 1.5; color: #d9d3de; }
@media (min-width: 768px) { .endcap { grid-template-columns: 160px minmax(0, 1fr); gap: 26px; padding: 22px; } }

/* Rail: CTA, categories with counts, creators and series with mini images */
.rail-cta { margin: 12px 4px 0; padding: 14px; border-radius: var(--radius); background: var(--tint); }
.rail-cta p { margin: 0 0 10px; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.rail-cta strong { display: block; font-size: .98rem; color: var(--ink); }
.rail-cta .cta { width: 100%; }
.rail-cta small { display: block; margin-top: 6px; font-size: .72rem; text-align: center; color: var(--muted); }
.count-soft { background: var(--line); color: var(--ink-2); }
.rail .mini li > a { justify-content: flex-start; gap: 10px; padding: 6px 12px; }
.mini-art { flex: none; width: 30px; height: 44px; overflow: hidden; border-radius: 7px; background: var(--line); }
.mini-art.mini-creator { width: 34px; height: 34px; border-radius: 50%; }
.mini-art img { width: 100%; height: 100%; object-fit: cover; }
.mini-name { min-width: 0; }

/* Series index filter */
.chips { display: flex; gap: 8px; margin: 0 0 14px; padding: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
.chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: .88rem; font-weight: 700; text-decoration: none; }
.chips a[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips span { font-size: .75rem; opacity: .7; }
.shelf > li[hidden] { display: none; }

/* Mobile tab bar (webapp style), safe areas respected */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(28, 26, 33, .06); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: var(--tabbar); padding: 0 0 9px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .68rem; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--flame-ink); }
.tab-dot { display: grid; place-items: center; width: 50px; height: 50px; margin: -26px 0 -2px; border-radius: 50%; background: var(--flame); color: var(--on-flame); box-shadow: 0 6px 16px rgba(250, 127, 124, .45); }
.tab-dot svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .tabbar { display: none; } }
