:root {
  --bg: #0b0d12;
  --bg-2: #0e1118;
  --card: #141821;
  --card-2: #1c212c;
  --line: #1c212c;
  --line-2: #2a3140;
  --text: #e6e9ef;
  --text-2: #a9b1c2;
  --text-3: #6f788a;
  --white: #ffffff;
  --amber: #f2b263;
  --lavender: #b7a3e6;
  --blue: #7cc4ff;
  --rose: #e6a1a1;
  --green: #8ee6b2;
  --amber-bg: #3a2a12;
  --lavender-bg: #2a1f3f;
  --blue-bg: #12243a;
  --rose-bg: #3a1a1f;
  --green-bg: #143126;
  --display: 'Antonio', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: var(--blue); }
a:hover { color: #b5dcff; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--white); margin: 0; line-height: 1.05; }
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: 24px; letter-spacing: 0.08em; }
h3 { font-size: 20px; letter-spacing: 0.05em; }
p { margin: 0 0 1em; }
.wrap { width: min(1216px, 100% - 32px); margin-inline: auto; }
.visually-hidden, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--amber); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* header */
.site-header { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.04em; color: var(--white); text-decoration: none; text-transform: uppercase; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--amber) 0 50%, var(--lavender) 50% 100%); }
.brand-tld { color: var(--amber); }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { color: var(--white); background: var(--card); }
.site-nav a[aria-current="page"] { color: var(--white); background: var(--card-2); }
.header-search { margin-left: auto; display: flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.header-search input { background: transparent; border: 0; color: var(--text); font: inherit; font-size: 14px; padding: 8px 12px; width: 180px; outline: none; }
.header-search button { background: transparent; border: 0; color: var(--text-2); padding: 0 10px; cursor: pointer; display: grid; place-items: center; }
.header-search button:hover { color: var(--white); }

/* buttons & badges */
.btn { display: inline-block; text-decoration: none; font-family: var(--display); font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--amber); color: var(--bg); }
.btn-primary:hover { background: #ffd199; color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text-3); color: var(--white); }
.badge { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge-blue { color: var(--blue); background: var(--blue-bg); }
.badge-amber { color: var(--amber); background: var(--amber-bg); }
.badge-lavender { color: var(--lavender); background: var(--lavender-bg); }
.badge-rose { color: var(--rose); background: var(--rose-bg); }
.badge-green { color: var(--green); background: var(--green-bg); }
.mono { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.muted { color: var(--text-2); }
.flash { background: var(--green-bg); color: var(--green); padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; }

/* hero */
.hero { padding: 64px 0 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hero h1 span { display: block; color: var(--text-2); font-weight: 400; font-size: 0.42em; letter-spacing: 0.12em; margin-top: 10px; }
.nav-random { color: var(--amber) !important; }
.hero-bars { display: flex; gap: 6px; align-items: center; }
.hero-bars span { height: 8px; border-radius: 999px; display: block; }
.hero form { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.search-box { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 6px 6px 18px; }
.search-box input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; font-size: 18px; padding: 12px 0; outline: none; }
.search-box input::placeholder { color: var(--text-3); }
.search-box .btn { border-radius: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 13px; }
.chips span { color: var(--text-3); padding: 6px 0; }
.chip { text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px; }
.chip:hover { border-color: var(--text-3); color: var(--white); }
.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: center; font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.stats b { color: var(--amber); font-weight: 500; }

/* sections */
.section { padding: 24px 0 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head .rule { flex: 1; height: 4px; border-radius: 999px; background: var(--lavender); min-width: 40px; opacity: .6; }
.seg { display: flex; gap: 4px; font-size: 13px; }
.seg a { text-decoration: none; color: var(--text-2); padding: 6px 12px; border-radius: 8px; }
.seg a[aria-current="true"] { color: var(--bg); background: var(--text); font-weight: 500; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; position: relative; }
.card:hover { border-color: var(--line-2); color: inherit; }
.card .thumb { aspect-ratio: 16 / 9; background: var(--card-2); border-radius: 8px; display: grid; place-items: center; color: #4a5366; font-size: 12px; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .card-title { color: var(--white); font-weight: 600; font-size: 15px; }
.card .card-meta { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.card .accent-bar { position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; }
.accent-amber { background: var(--amber); } .accent-lavender { background: var(--lavender); } .accent-blue { background: var(--blue); } .accent-rose { background: var(--rose); } .accent-green { background: var(--green); }
.text-amber { color: var(--amber); } .text-lavender { color: var(--lavender); } .text-blue { color: var(--blue); } .text-rose { color: var(--rose); } .text-green { color: var(--green); }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.list-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--card-2); color: inherit; }
.list-row .row-title { flex: 1; font-weight: 500; min-width: 0; }
.list-row .row-sub { display: block; font-size: 13px; color: var(--text-2); font-weight: 400; }
.list-row .row-meta { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; }
.two-col > .main { flex: 2 1 520px; min-width: 0; }
.two-col > .side { flex: 1 1 300px; min-width: 0; }
.empty { padding: 32px 16px; text-align: center; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* entry page */
.entry-head { padding: 40px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.entry-head .kicker { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.entry-head .subtitle { font-size: 20px; color: var(--text-2); }
.entry-body { font-size: 17px; line-height: 1.7; color: var(--text); max-width: 72ch; }
.entry-body p { margin: 0 0 1.1em; }
.facts { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.facts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0 16px; }
.facts dt { color: var(--text-3); font-size: 13px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.entry-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card-2); }
.prev-next { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0; flex-wrap: wrap; }
.prev-next a { flex: 1 1 240px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.season-block { margin-bottom: 28px; }
.season-block h3 { margin-bottom: 10px; }
.ep-no { font-family: var(--mono); font-size: 12px; color: var(--amber); width: 48px; flex: none; }

/* timeline */
.tl-century { margin: 32px 0; }
.tl-century h2 { color: var(--amber); margin-bottom: 12px; }
.tl { border-left: 2px solid var(--line-2); margin-left: 8px; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.tl-item { position: relative; display: flex; gap: 14px; align-items: baseline; text-decoration: none; color: inherit; }
.tl-item::before { content: ""; position: absolute; left: -31px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid var(--bg); }
.tl-item .yr { font-family: var(--display); font-size: 20px; color: var(--amber); width: 64px; flex: none; }
.tl-item:hover .tl-title { color: var(--white); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0; font-size: 13px; color: var(--text-3); }
.footer-links { margin-left: auto; white-space: nowrap; }
.footer-links a { color: var(--text-2); text-decoration: none; }

/* forms / admin */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.form input, .form select, .form textarea { font: inherit; font-size: 15px; color: var(--text); background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.form .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.admin-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; font-size: 14px; }
.admin-bar a { color: var(--text-2); text-decoration: none; }
.admin-bar a:hover, .admin-bar a[aria-current="page"] { color: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--text-3); font-weight: 500; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }
.danger { color: var(--rose); }
.notice { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; color: var(--text-2); font-size: 14px; }

@media (max-width: 720px) {
  .header-search { margin-left: 0; width: 100%; }
  .header-search input { width: 100%; }
  .hero { padding: 40px 0 24px; }
  .facts dl { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}

/* Entry images (TMDB import, Nov 2 2026) */
.entry-hero { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card-2); }
.entry-hero img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #000; }
.entry-img { margin: 0; }
.entry-img img { display: block; width: 100%; height: auto; }
.entry-hero figcaption, .entry-img figcaption { font-size: 12px; color: var(--text-2); padding: 6px 12px; }

/* Footer layout (Nov 3 2026): notices left on one edge, links and TMDB logo right */
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 48px; align-items: start; padding: 22px 0 26px; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.foot-note { margin: 0; }
.foot-note a { color: var(--text-2); white-space: nowrap; }
.footer-grid .footer-links { justify-self: end; white-space: nowrap; margin: 0; }
.footer-grid .tmdb-logo { justify-self: end; line-height: 0; margin-top: 6px; opacity: .85; }
.footer-grid .tmdb-logo:hover { opacity: 1; }
.footer-grid .tmdb-logo img { display: block; height: 10px; width: auto; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 10px; }
  .footer-grid .footer-links { justify-self: start; order: 5; }
  .footer-grid .tmdb-logo { justify-self: start; margin-top: 0; }
}
