/* Manrope (variable 400–800), self-hosted: no request to Google Fonts. */
@font-face {
  font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0b0b12;
  --bg-glow: radial-gradient(1200px 600px at 80% -10%, rgba(167,139,250,.14), transparent 60%),
             radial-gradient(900px 500px at -10% 10%, rgba(244,114,182,.10), transparent 60%);
  --surface: #13131d;
  --surface-2: #1b1b28;
  --surface-3: #242434;
  --line: rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.14);
  --fg: #eeeef5;
  --muted: #9b9bb2;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --grad: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
  --tg: #2aabee;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --canon: #34d399;
  --mixed: #fbbf24;
  --filler: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --cover-l1: 26%;
  --cover-l2: 14%;
  --studio-l: 72%;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5fb;
    --bg-glow: radial-gradient(1200px 600px at 80% -10%, rgba(167,139,250,.18), transparent 60%),
               radial-gradient(900px 500px at -10% 10%, rgba(244,114,182,.12), transparent 60%);
    --surface: #ffffff;
    --surface-2: #f1f0f8;
    --surface-3: #e7e5f2;
    --line: rgba(20,20,40,.08);
    --line-strong: rgba(20,20,40,.16);
    --fg: #16161f;
    --muted: #6a6a80;
    --accent: #7c3aed;
    --accent-2: #db2777;
    --shadow: 0 10px 30px -14px rgba(40,30,80,.25);
    --studio-l: 38%;
    --cover-l1: 88%;
    --cover-l2: 78%;
    color-scheme: light;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 16px/1.6 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-bottom: 48px; }
main > section, main > .stackbar, main > .week, main > .link-cards, main > .steps { margin-top: 40px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.dot { opacity: .5; margin: 0 6px; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 4px; }
.nav a { white-space: nowrap; color: var(--muted); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.nav a.on { color: var(--fg); background: var(--surface-2); }
.search { position: relative; margin-left: auto; flex: 0 1 300px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 14.5px; outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(560px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; max-height: min(640px, calc(100vh - 100px)); overflow: auto;
}
.search-results a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--fg); }
.search-results a:hover, .search-results a.active { background: var(--surface-2); text-decoration: none; }
.search-results .sr-empty { padding: 10px; color: var(--muted); font-size: 14px; }
.search-results .cover-sr { width: 36px; height: 50px; border-radius: 6px; }
.search-results .sr-head {
  display: flex; justify-content: space-between; padding: 12px 8px 6px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.search-results .sr-head:first-child { padding-top: 6px; }
.search-results .sr-head span { font-weight: 600; letter-spacing: 0; }
.search-results .sr-head:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; }
.search-results .sr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-results .sr-text b { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-tg { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(236,72,153,.7); }
.btn-ghost { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); }

/* ---------- chips & badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.chip-ongoing, .chip-announced { color: var(--fg); gap: 6px; }
.chip-ongoing::before, .chip-announced::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.chip-ongoing::before { background: var(--ok); }
.chip-announced::before { background: var(--accent); }
.chip-finished { color: var(--muted); }
.chip-muted { opacity: .8; }
.studio {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--fg); background: var(--surface-2); border: 1px solid var(--line);
}
.studio::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--h) 55% 62%); }
.studio-more { color: var(--muted); }
.studio-more::before { display: none; }
.countdown { font-size: 12.5px; font-weight: 700; color: var(--accent-2); }

/* ---------- covers ---------- */
.cover {
  position: relative; overflow: hidden; flex: none;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 10%, hsl(var(--h) 30% 60% / .22), transparent 55%),
    linear-gradient(160deg, hsl(var(--h) 14% var(--cover-l1)), hsl(var(--h) 10% var(--cover-l2)));
  color: hsl(var(--h) 25% 88% / .9); font-weight: 800; letter-spacing: -.04em;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 10px 10px; mask-image: linear-gradient(160deg, transparent 30%, #000 100%);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; z-index: 1; }
.cover.has-img::after { display: none; }
.cover span { position: relative; z-index: 1; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.cover-card { width: 100%; aspect-ratio: 3 / 4; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: 44px; }
.cover-thumb { width: 44px; height: 58px; border-radius: 8px; font-size: 16px; }
.cover-mini { width: 36px; height: 48px; border-radius: 7px; font-size: 13px; }
.cover-work { width: 60px; height: 84px; border-radius: 8px; font-size: 18px; }
.cover-hero { width: 220px; aspect-ratio: 3 / 4; border-radius: var(--radius); font-size: 72px; box-shadow: var(--shadow); }

/* ---------- hero (home) ---------- */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  padding: 56px 0 8px;
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 14px;
}
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; gap: 32px; margin-top: 34px; }
.hero-stats b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { color: var(--muted); font-size: 13.5px; }
.hero-art { display: grid; gap: 12px; }
.notif {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.notif:nth-child(2) { margin-left: 28px; }
.notif:nth-child(3) { margin-left: 8px; opacity: .85; }
.notif:nth-child(4) { margin-left: 40px; opacity: .6; }
.notif-dot { width: 36px; height: 36px; border-radius: 10px; flex: none; background: linear-gradient(160deg, hsl(var(--h) 14% 30%), hsl(var(--h) 10% 16%)); border: 1px solid var(--line); }
.notif-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.notif-text { color: var(--muted); font-size: 13px; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.more { font-weight: 700; font-size: 14.5px; }
.page-head { padding-top: 36px; }
.page-head .chips { margin-top: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.crumbs { display: flex; gap: 8px; align-items: center; padding-top: 22px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs span:last-child { color: var(--fg); }

/* ---------- title cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tcard {
  display: flex; flex-direction: column; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tcard:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.tcard-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.tcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard h3 { font-size: 15.5px; }
.studios { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 6px; }

/* ---------- release list ---------- */
.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 10px; }
.rel {
  display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s ease, background .2s ease;
}
.rel:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.rel { min-width: 0; }
.rel-body { min-width: 0; flex: 1; }
.rel-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.ep { font-weight: 800; font-size: 13.5px; }
.rel-time { white-space: nowrap; align-self: flex-start; padding-top: 2px; }

/* ---------- link cards ---------- */
.link-cards { display: grid; gap: 10px; }
.link-cards-lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lcard {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s ease, transform .2s ease;
}
.lcard:hover { text-decoration: none; border-color: var(--accent); transform: translateX(3px); }
.lcard-title { font-weight: 700; }

/* ---------- banner ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(244,114,182,.22), transparent 70%),
    radial-gradient(500px 200px at 0% 100%, rgba(167,139,250,.22), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.banner p { color: var(--muted); margin-top: 6px; max-width: 520px; }

/* ---------- title hero ---------- */
.thero {
  display: flex; gap: 32px; align-items: flex-start; margin-top: 18px; padding: 28px;
  border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 0% 0%, hsl(var(--h) 30% 60% / .08), transparent 70%),
    var(--surface);
}
.thero-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.thero h1 { font-size: clamp(26px, 3.4vw, 38px); }
.alt-names { color: var(--muted); font-size: 14.5px; }
.desc { font-size: 16px; max-width: 720px; }
.premiere { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius-sm); width: fit-content; }
.premiere b { font-size: 18px; }
.thero .btn { align-self: flex-start; }

/* ---------- dubs ---------- */
.dubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dub {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.dub-name { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dub-name::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 55% 62%); }
.dub-link { white-space: nowrap; }
.dub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dub-name { font-weight: 800; }
.dub-link { font-size: 13px; font-weight: 600; }
.dub-ep { display: flex; align-items: baseline; gap: 6px; }
.dub-ep b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* ---------- franchise path ---------- */
.franchise { display: flex; flex-direction: column; gap: 16px; }
.franchise .section-head { margin-bottom: 0; }
.fmap { padding: 18px 20px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fmap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.fmap-track { position: relative; height: 34px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 2px, var(--surface-2) 2px 10px); }
.seg {
  position: absolute; top: 0; bottom: 0; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 55%, var(--surface-2));
  border-right: 2px solid var(--surface); font-size: 12px; font-weight: 800; color: #fff;
}
.seg:first-child { border-radius: 8px 0 0 8px; }
.seg-ongoing { background: color-mix(in srgb, var(--ok) 55%, var(--surface-2)); }
/* light theme: white segment labels need darker fills for 4.5:1 contrast */
@media (prefers-color-scheme: light) {
  .seg { background: color-mix(in srgb, var(--accent) 90%, var(--surface-2)); }
  .seg-ongoing { background: #047857; }
}
.seg-announced { background: transparent; border: 2px dashed var(--accent); color: var(--accent); }
.seg span { padding: 0 4px; white-space: nowrap; }
/* the marker points down at the bar instead of crossing it, so it never covers segment labels */
.fmap-mark { position: absolute; z-index: 1; top: -8px; height: 8px; width: 0; border-left: 2px solid var(--accent-2); }
.fmap-mark::after {
  content: ""; position: absolute; top: 6px; left: -6px; border: 5px solid transparent; border-top: 6px solid var(--accent-2);
}
.fmap-mark span {
  position: absolute; bottom: calc(100% + 4px); left: -1px; transform: translateX(-50%);
  white-space: nowrap; font-size: 11.5px; font-weight: 800; color: #fff;
  background: var(--accent-2); padding: 2px 8px; border-radius: 999px;
}
.fmap-mark.mark-l span { transform: none; left: -2px; }
.fmap-mark.mark-r span { transform: translateX(-100%); left: 0; }
.fmap-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }

.path { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 8px; }
.path::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line-strong); }
.pstep { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px 12px 0; }
.pstep-ico {
  position: relative; z-index: 1; flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--fg);
}
.pstep-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.pstep-top { display: flex; gap: 8px; align-items: center; }
.pstep-verb { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pstep-name { font-weight: 800; font-size: 16.5px; }
.pstep-name a { color: var(--fg); }
.pstep-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.pstep-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pstep.cur .pstep-ico { background: var(--grad); border-color: transparent; color: #fff; }
.pstep.cur { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.here { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.live { color: var(--ok); font-weight: 700; }
.pstep-read .pstep-ico { background: color-mix(in srgb, var(--accent-2) 18%, var(--surface)); border-color: var(--accent-2); }
.pstep-read .pstep-name { color: var(--accent-2); }
.pstep-read .pstep-name a { color: var(--accent-2); }
.pstep-wait { opacity: .85; }
.pstep-wait .pstep-ico { border-style: dashed; }

/* ---------- read (source work) ---------- */
.reads { display: grid; gap: 12px; }
.read { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.read-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.read-name { font-weight: 800; font-size: 17px; color: var(--fg); }
.read-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.read-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.read-grid b { font-size: 17px; }
.read-next { box-shadow: inset 3px 0 0 var(--accent); }
.lcard-row { flex-direction: row; align-items: center; gap: 12px; }
.lcard-row > div { display: flex; flex-direction: column; min-width: 0; }
.lcard-title .chip { height: 20px; font-size: 11px; margin-left: 6px; vertical-align: middle; }
.steps li.is-read .step-n { background: var(--surface-3); color: var(--fg); box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- callouts ---------- */
.callout {
  padding: 20px 22px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--muted);
  display: flex; flex-direction: column; gap: 8px;
}
.callout-title { font-weight: 800; font-size: 17px; }
.callout-announced { border-left-color: var(--ok); background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 9%, var(--surface)), var(--surface) 60%); }
.callout-rumor { border-left-color: var(--warn); }
.callout-none, .callout-unknown { border-left-color: var(--muted); }
.callout-info { border-left-color: var(--accent); }
.callout-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.timeline li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 10px 30px; }
.tl-dot { position: absolute; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline li:first-child .tl-dot { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-body { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; min-width: 0; flex: 1; }

/* ---------- fillers ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13.5px; }
.stat-canon b { color: var(--canon); } .stat-mixed b { color: var(--mixed); } .stat-filler b { color: var(--filler); }
main > .stackbar { margin-top: 16px; }
.stackbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.sb-canon { background: var(--canon); } .sb-mixed { background: var(--mixed); } .sb-filler { background: var(--filler); }
.legend { display: flex; gap: 14px; font-size: 13.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-canon { background: var(--canon); } .lg-mixed { background: var(--mixed); } .lg-filler { background: var(--filler); }
.epgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; }
.epgrid span {
  height: 30px; display: grid; place-items: center; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ep-canon { background: color-mix(in srgb, var(--canon) 16%, transparent); color: color-mix(in srgb, var(--canon) 85%, var(--fg)); }
.ep-mixed { background: color-mix(in srgb, var(--mixed) 28%, transparent); color: color-mix(in srgb, var(--mixed) 80%, var(--fg)); }
.ep-filler { background: var(--filler); color: #1a0710; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.range { padding: 4px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.range-filler { background: color-mix(in srgb, var(--filler) 18%, transparent); color: var(--filler); }
.range-mixed { background: color-mix(in srgb, var(--mixed) 18%, transparent); color: var(--mixed); }

/* ---------- watch order ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.steps li.opt { background: transparent; border-style: dashed; }
.steps li.opt .step-title { color: var(--muted); }
.step-n {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; background: var(--grad); color: #fff;
}
.steps li.opt .step-n { background: var(--surface-3); color: var(--muted); }
.step-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.step-title { font-weight: 800; font-size: 16.5px; }
.step-title a { color: inherit; }
.step-meta { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- schedule ---------- */
.week { display: grid; gap: 10px; }
.day {
  display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
}
.day-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.day h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 4px; }
.today-badge { display: none; font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--grad); color: #fff; letter-spacing: .02em; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.day.today h2 { color: var(--fg); }
.day.today .today-badge { display: inline-block; }
.day > .muted { padding: 0 4px; }
.mini { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; color: var(--fg); }
.mini:hover { background: var(--surface-2); text-decoration: none; }
.mini-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .small { font-size: 12px; }

/* ---------- sources & footer ---------- */
.sources { margin-top: 32px; color: var(--muted); font-size: 13px; }
.footer { border-top: 1px solid var(--line); margin-top: 24px; }
.footer-in { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 32px; padding-top: 32px; padding-bottom: 40px; align-items: start; }
.footer .brand { font-size: 16px; margin-bottom: 8px; }
.footer .logo { width: 26px; height: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-art { display: none; }
  /* nav becomes the second row of the top bar; items wrap onto more lines */
  .topbar-in { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 10px; row-gap: 0; }
  .nav { order: 10; width: 100%; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-bottom: 10px; }
  .nav a { padding: 6px 12px; font-size: 14px; background: var(--surface); border: 1px solid var(--line); }
  .nav a.on { border-color: var(--accent); }
  .two-col { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; gap: 12px; }
  .day { grid-template-columns: 1fr; }
  .day h2 { flex-direction: row; padding: 0 4px; }
}
@media (max-width: 640px) {
  .topbar-in { gap: 10px; }
  .brand span { display: none; }
  .btn-tg.btn-sm span { display: none; }
  .search { flex: 1; }
  .search-results { position: fixed; top: 112px; left: 16px; right: 16px; width: auto; max-height: calc(100vh - 130px); }
  /* title/work header: poster left, chips + name + alt names right, the rest full width */
  .thero { display: grid; grid-template-columns: 108px 1fr; gap: 12px 16px; padding: 18px; align-items: start; }
  .thero > .cover-hero { width: 108px; font-size: 36px; grid-column: 1; grid-row: 1; }
  .thero-body { display: contents; }
  .thero-body > * { grid-column: 1 / -1; min-width: 0; }
  .thero-body > .chips { grid-column: 2; grid-row: 1; align-self: start; }
  .thero h1 { font-size: 24px; }
  .thero .chips { gap: 6px; }
  .thero .desc { font-size: 15px; }
  .rel-list { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .banner { padding: 22px; }
  .banner .btn { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .cover-card { font-size: 34px; }
  main > .hero { margin-top: 0; padding-top: 16px; gap: 20px; }
  .hero-cta { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-cta .btn { justify-content: center; }
  .page-head { padding-top: 16px; }
  .crumbs { padding-top: 14px; }
  main > section { margin-top: 32px; }
}

/* ---------- unified watch-order list ---------- */
.ocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ocard {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s ease, transform .2s ease;
}
.ocard:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.mini-track { position: relative; height: 8px; margin-top: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.mini-track .seg { border-right-width: 1px; }
.mini-track .seg span { display: none; }
.mini-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent-2); }
.pstep.opt .pstep-name { color: var(--muted); }
.pstep.opt .pstep-name a { color: var(--muted); }
.pstep.opt .pstep-ico { opacity: .6; }

main > .ocards { margin-top: 28px; }

.seg span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 11.5px; font-weight: 700; }

/* ---------- language ---------- */
.lang-switch {
  display: inline-grid; place-items: center; height: 36px; min-width: 40px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); font-weight: 800; font-size: 13px; letter-spacing: .04em;
}
.lang-switch:hover { text-decoration: none; border-color: var(--accent); }

/* ---------- pagination ---------- */
.more-row { display: flex; justify-content: center; margin-top: 20px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 32px 0 8px; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--fg);
}
.pager a { background: var(--surface); border: 1px solid var(--line); }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.pager .on { background: var(--accent); color: #fff; }
.pager .pager-gap { color: var(--muted); min-width: 20px; padding: 0; }
