/* ===========================================================================
 * Anna Movies — Prototype Design System v0
 * 設計理念:
 *   1. 行間 1.85 / 行長 max 680px で「文字を呼吸させる」
 *   2. 全節に画像・トレーラー・引用・カード等の視覚的休符を必ず挟む
 *   3. sticky TOC で長文ページの導線を確保
 *   4. cinematic dark theme でフィルムコンテキストに馴染ませる
 *   5. franchise ごとにアクセントカラーだけ差し替え（同じレイアウト）
 * ========================================================================= */

/* ----- Design Tokens ----- */
:root {
  /* Color */
  /* Warm gold-on-black palette — matches the Star Wars chronology pages */
  --bg: #05080a;
  --surface: #0c1014;
  --surface-2: #12171d;
  --surface-3: #1b2129;
  --text: #f3e7c8;
  --text-muted: #c4b078;
  --text-dim: #8a7c54;
  --border: rgba(240,199,115,0.16);
  --border-strong: rgba(240,199,115,0.34);
  --accent: #f0c773;
  --accent-soft: rgba(240,199,115,0.14);
  --link: #6ebfe4;
  --link-hover: #a6dbf2;
  --danger: #e66d3f;
  --success: #76d39a;
  --warning: #f0bb45;

  /* Typography — Mincho serif headings, like the chronology pages */
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-display: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "Yu Mincho Light", serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-hero: clamp(2rem, 6vw, 4rem);
  --lh-tight: 1.3;
  --lh-base: 1.85;
  --lh-loose: 2;

  /* Spacing (8px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Layout */
  --content-width: 680px;
  --max-width: 1280px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55);
}

/* Per-franchise accent override */
.theme-starwars     { --accent: #f0c773; --accent-soft: rgba(240,199,115,0.14); }
.theme-evangelion   { --accent: #ff5252; --accent-soft: rgba(255,82,82,0.12); }
.theme-madoka       { --accent: #ff7ab2; --accent-soft: rgba(255,122,178,0.14); }
.theme-marvel       { --accent: #ed1d24; --accent-soft: rgba(237,29,36,0.13); }
.theme-harrypotter  { --accent: #d3a625; --accent-soft: rgba(211,166,37,0.14); }
.theme-conan        { --accent: #e23a3a; --accent-soft: rgba(226,58,58,0.13); }

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Starfield — fixed behind everything, like the SW chronology pages */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(243,231,200,0.7), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(243,231,200,0.5), transparent),
    radial-gradient(1.6px 1.6px at 80% 18%, rgba(240,199,115,0.7), transparent),
    radial-gradient(1px 1px at 42% 82%, rgba(243,231,200,0.45), transparent),
    radial-gradient(1px 1px at 90% 52%, rgba(243,231,200,0.55), transparent),
    radial-gradient(1px 1px at 12% 62%, rgba(243,231,200,0.45), transparent),
    radial-gradient(1.6px 1.6px at 33% 12%, rgba(240,199,115,0.55), transparent),
    radial-gradient(1px 1px at 73% 88%, rgba(243,231,200,0.5), transparent),
    radial-gradient(1px 1px at 5% 12%, rgba(243,231,200,0.4), transparent),
    radial-gradient(1px 1px at 52% 42%, rgba(243,231,200,0.4), transparent);
  background-repeat: repeat;
  background-size: 420px 420px;
  opacity: 0.55;
}
/* Warm cinematic vignette/glow at the top */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(240,199,115,0.06), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(5,8,10,0.6), transparent 60%);
}
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ----- Top Nav (sticky, blur) ----- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s-3) var(--s-5);
  display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
}
.brand {
  font-weight: 800; font-size: var(--fs-md); color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.topnav nav { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-sm); margin-left: auto; }
.topnav nav a { color: var(--text-muted); }
.topnav nav a:hover { color: var(--text); text-decoration: none; }
.topnav nav a.active { color: var(--accent); }

.breadcrumb {
  max-width: var(--max-width); margin: 0 auto;
  padding: var(--s-3) var(--s-5);
  font-size: var(--fs-xs); color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 var(--s-2); opacity: 0.5; }

/* ----- Hero (full-bleed backdrop) ----- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex; align-items: flex-end;
  background: var(--surface);
  overflow: hidden;
}
.hero-backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.55;
  filter: saturate(1.15) brightness(0.7) blur(2px);
  transform: scale(1.08);
}
.hero-backdrop.portrait-source {
  /* When the only available image is portrait (poster), blur strongly so it
   * reads as atmospheric color/light rather than a stretched poster. */
  filter: saturate(1.2) brightness(0.55) blur(28px);
  transform: scale(1.35);
  opacity: 0.7;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,13,16,0.2) 0%, rgba(11,13,16,0.55) 55%, rgba(11,13,16,0.96) 100%),
    linear-gradient(90deg, rgba(11,13,16,0.6) 0%, transparent 60%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto; width: 100%;
  padding: var(--s-9) var(--s-5) var(--s-7);
}
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: var(--s-3);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.hero .tagline {
  font-size: var(--fs-md);
  color: var(--text-muted);
  margin: 0 0 var(--s-5);
  max-width: 640px;
  line-height: 1.65;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--text);
  opacity: 0.9;
}
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta span + span::before { content: "•"; color: var(--text-dim); margin-right: var(--s-2); }

/* ----- Rating Strip ----- */
.rating-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s-5);
}
.rating-strip-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: var(--s-4);
}
.rating-badge {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 150px;
}
.rating-badge-num {
  font-size: var(--fs-xl);
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
}
.rating-badge-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex; flex-direction: column;
  line-height: 1.35;
}
.rating-badge-meta strong { color: var(--text); display: block; font-size: var(--fs-sm); }
.rating-badge.high .rating-badge-num { color: var(--success); }
.rating-badge.mid  .rating-badge-num { color: var(--warning); }
.rating-badge.low  .rating-badge-num { color: var(--danger);  }

/* ----- Info Grid (poster / facts / trailer) ----- */
.info-section {
  background: var(--surface);
  padding: var(--s-8) var(--s-5);
}
.info-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 768px) {
  .info-grid { grid-template-columns: 240px 1fr; }
}
@media (min-width: 1100px) {
  .info-grid { grid-template-columns: 260px 1fr 1.3fr; }
}
.poster-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2/3;
  background: var(--surface-2);
  max-width: 260px;
  margin: 0 auto;
  width: 100%;
}
.poster-card img { width: 100%; height: 100%; object-fit: cover; }
.facts {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.facts h3 { margin: 0 0 var(--s-4); font-size: var(--fs-md); font-family: var(--font-display); }
.facts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: var(--s-4); row-gap: var(--s-3); font-size: var(--fs-sm); }
.facts dt { color: var(--text-muted); font-weight: 500; }
.facts dd { margin: 0; color: var(--text); }
.trailer-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: var(--shadow);
}
.trailer-card iframe { width: 100%; height: 100%; border: 0; }
.trailer-card .placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1f26, #0b0d10);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: var(--fs-sm); text-align: center;
  padding: var(--s-5);
}

/* ----- CTA Bar ----- */
.cta-bar {
  background: var(--surface);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.cta-bar-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; gap: var(--s-3); flex-wrap: wrap;
}
.cta {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-sm);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: all 150ms;
  text-decoration: none;
}
.cta:hover {
  background: var(--accent); color: #1a1300;
  border-color: var(--accent); text-decoration: none;
  transform: translateY(-1px);
}
.cta.primary { background: var(--accent); color: #1a1300; border-color: var(--accent); }
.cta.primary:hover { filter: brightness(1.1); }
.cta-icon { font-size: 1.1em; }

/* ----- Main Article Layout (with TOC) ----- */
.article-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s-8) var(--s-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 1100px) {
  .article-wrap { grid-template-columns: 240px 1fr; }
}

.article {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  min-width: 0;
}
.article > section { margin-bottom: var(--s-9); scroll-margin-top: 100px; }
.article > section:last-child { margin-bottom: 0; }
.article h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-5);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  letter-spacing: -0.01em;
}
.article h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  margin: var(--s-7) 0 var(--s-4);
  color: var(--text);
}
.article p { margin: 0 0 var(--s-5); }
.article p + p { margin-top: var(--s-4); }
.article a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article a:hover { color: var(--text); text-decoration-thickness: 2px; }
.article ul, .article ol { margin: 0 0 var(--s-5); padding-left: var(--s-5); }
.article li { margin-bottom: var(--s-2); line-height: 1.7; }
.article strong { color: var(--text); font-weight: 700; }
.article em { color: var(--text); font-style: italic; }
.section-num {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--accent);
  opacity: 0.45;
  margin-right: var(--s-3);
  font-size: 0.6em;
  vertical-align: 0.2em;
  letter-spacing: 0.05em;
}

/* ----- Figures (inline + full-bleed) ----- */
figure.inline { margin: var(--s-6) 0; }
figure.inline img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: center;
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
figure.inline.portrait img {
  max-width: 320px;
  max-height: 480px;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
figure.inline figcaption {
  font-size: var(--fs-xs); color: var(--text-muted);
  margin-top: var(--s-3); text-align: center; line-height: 1.5;
}
figure.full-bleed {
  margin: var(--s-7) 0;
}
@media (min-width: 1100px) {
  figure.full-bleed {
    margin: var(--s-7) -80px;
  }
}
figure.full-bleed img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: center;
  background: var(--surface-2);
}
figure.full-bleed figcaption {
  font-size: var(--fs-xs); color: var(--text-muted);
  margin-top: var(--s-3); text-align: center;
}

/* ----- Callout ----- */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: var(--s-4) var(--s-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: var(--s-5) 0;
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--text);
}
.callout strong { color: var(--accent); }
.callout > *:first-child { margin-top: 0; }
.callout > *:last-child { margin-bottom: 0; }

/* ----- Pull Quote ----- */
.pull-quote {
  border: none;
  margin: var(--s-7) 0;
  padding: var(--s-5) 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.55;
  font-style: italic;
  color: var(--accent);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pull-quote::before {
  content: """;
  font-size: var(--fs-3xl);
  line-height: 0.5;
  display: block;
  opacity: 0.4;
  margin-bottom: var(--s-2);
}
.pull-quote cite {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: normal;
  margin-top: var(--s-4);
  letter-spacing: 0.05em;
}
.pull-quote cite::before { content: "— "; }

/* ----- Fact Box (mini-infobox inline) ----- */
.fact-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  margin: var(--s-5) 0;
}
.fact-box h4 {
  margin: 0 0 var(--s-3); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted);
}
.fact-box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: var(--s-4); row-gap: var(--s-2); font-size: var(--fs-sm); }
.fact-box dt { color: var(--text-muted); }
.fact-box dd { margin: 0; }

/* ----- TOC sidebar ----- */
.toc {
  position: sticky; top: 80px;
  align-self: start;
  font-size: var(--fs-sm);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: var(--s-3);
}
.toc-title {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-muted); margin-bottom: var(--s-3); font-weight: 700;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: var(--s-1); counter-increment: toc; }
.toc a {
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  padding: var(--s-2) var(--s-3);
  display: block;
  font-size: var(--fs-xs);
  line-height: 1.4;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--text-dim);
  margin-right: var(--s-2);
  font-family: var(--font-display);
}
.toc a:hover, .toc a.active {
  color: var(--accent); border-left-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
@media (max-width: 1099px) { .toc { display: none; } }

/* ----- Cast Grid ----- */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-4);
  margin: var(--s-5) 0;
}
.cast-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms, border-color 200ms;
}
.cast-card:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.cast-card-img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  object-position: center top;
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  display: block;
}
.cast-card-body { padding: var(--s-3); }
.cast-card-name { font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--s-1); color: var(--text); }
.cast-card-role { font-size: var(--fs-xs); color: var(--text-muted); }

/* ----- Scene Gallery ----- */
.scene-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-3);
  margin: var(--s-5) 0;
}
.scene-gallery figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
}
.scene-gallery img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: var(--surface-3);
}
.scene-gallery figcaption {
  padding: var(--s-3) var(--s-4); font-size: var(--fs-xs);
  color: var(--text-muted); line-height: 1.5;
}

/* ----- Related Works Row ----- */
.related-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
  margin: var(--s-5) 0;
}
.related-card { display: block; text-align: center; color: var(--text); }
.related-card-img {
  border-radius: var(--radius);
  aspect-ratio: 2/3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  margin-bottom: var(--s-2);
  transition: transform 200ms, box-shadow 200ms;
  width: 100%;
}
.related-card:hover .related-card-img { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.related-card:hover { text-decoration: none; }
.related-card-title { font-size: var(--fs-sm); font-weight: 600; }
.related-card-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--s-1); }

/* ----- Tags / Pills ----- */
.tag-row { display: flex; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-4) 0; }
.tag {
  display: inline-flex; align-items: center;
  padding: var(--s-1) var(--s-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.tag:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ----- Footer ----- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--s-8) var(--s-5);
  margin-top: var(--s-10);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-6); }
.footer h4 {
  font-size: var(--fs-sm); margin: 0 0 var(--s-3); color: var(--text);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: var(--s-2); }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
}

/* ----- References (numbered footnotes) ----- */
.references {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  counter-reset: ref;
}
.references ol { list-style: none; padding: 0; }
.references li {
  counter-increment: ref;
  margin-bottom: var(--s-3);
  padding-left: var(--s-7);
  position: relative;
  line-height: 1.6;
}
.references li::before {
  content: "[" counter(ref) "]";
  position: absolute; left: 0;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: var(--fs-xs);
}

/* ----- Reading time / metadata ----- */
.meta-strip {
  display: flex; gap: var(--s-4); flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-6);
}
.meta-strip span { display: inline-flex; align-items: center; gap: var(--s-2); }

/* ----- Mobile refinements ----- */
@media (max-width: 768px) {
  :root { --fs-base: 1rem; }
  .hero { min-height: 380px; }
  .hero-content { padding: var(--s-7) var(--s-4) var(--s-5); }
  .info-section { padding: var(--s-6) var(--s-4); }
  .article-wrap { padding: var(--s-6) var(--s-4); }
  .rating-strip { padding: var(--s-4); }
  .rating-badge { min-width: 130px; padding: var(--s-2) var(--s-4); }
  .topnav-inner { padding: var(--s-3) var(--s-4); }
  .breadcrumb { padding: var(--s-3) var(--s-4); }
  .cta-bar { padding: var(--s-3) var(--s-4); }
  .site-footer { padding: var(--s-7) var(--s-4); }
  figure.full-bleed { margin: var(--s-5) calc(-1 * var(--s-4)); width: calc(100% + var(--s-4) * 2); }
}

/* ===== Landing / Hub / Index pages ===== */

/* Big landing hero (homepage) */
.landing-hero {
  position: relative;
  min-height: 420px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #1a2030 0%, var(--bg) 70%);
  overflow: hidden;
  padding: var(--s-9) var(--s-5);
}
.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.landing-hero p {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 640px; margin: 0 auto;
  line-height: 1.7;
}
.landing-hero .accent-bar {
  width: 64px; height: 4px; border-radius: 2px;
  background: var(--accent); margin: 0 auto var(--s-5);
}

/* Section wrapper for landing pages */
.landing-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--s-8) var(--s-5);
}
.landing-section > h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  margin: 0 0 var(--s-2);
  display: inline-block;
  padding-bottom: var(--s-2);
  border-bottom: 3px solid var(--accent);
}
.landing-section > .sub {
  color: var(--text-muted);
  margin: 0 0 var(--s-6);
  font-size: var(--fs-sm);
}

/* Franchise cards grid (homepage) */
.franchise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-5);
}
.franchise-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  transition: transform 200ms, border-color 200ms;
}
.franchise-card:hover { transform: translateY(-4px); border-color: var(--accent); text-decoration: none; }
.franchise-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.4; filter: saturate(1.1);
  transition: opacity 200ms, transform 200ms;
}
.franchise-card:hover .franchise-card-bg { opacity: 0.55; transform: scale(1.05); }
.franchise-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,16,0.1) 0%, rgba(11,13,16,0.85) 100%);
}
.franchise-card-body { position: relative; z-index: 1; padding: var(--s-5); }
.franchise-card-name {
  font-family: var(--font-display);
  font-size: var(--fs-xl); font-weight: 700;
  margin-bottom: var(--s-1);
}
.franchise-card-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.franchise-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
}

/* Work poster grid (works index / hub) */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s-5) var(--s-4);
}
.work-card { display: block; text-decoration: none; color: var(--text); }
.work-card-poster {
  width: 100%; aspect-ratio: 2/3;
  border-radius: var(--radius);
  object-fit: cover;
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  box-shadow: var(--shadow);
  transition: transform 200ms, box-shadow 200ms;
}
.work-card:hover { text-decoration: none; }
.work-card:hover .work-card-poster { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.work-card-title {
  margin-top: var(--s-3); font-size: var(--fs-sm); font-weight: 600;
  line-height: 1.4;
}
.work-card-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* Quick-link chips (hub navigation) */
.quicklinks {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  margin: var(--s-5) 0;
}
.quicklink {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--text); text-decoration: none;
  transition: all 150ms;
}
.quicklink:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-2px); }

@media (max-width: 768px) {
  .landing-hero { min-height: 320px; padding: var(--s-7) var(--s-4); }
  .landing-section { padding: var(--s-6) var(--s-4); }
  .work-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--s-4) var(--s-3); }
}

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

/* ----- Print ----- */
@media print {
  .topnav, .toc, .cta-bar, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .hero-overlay, .hero-backdrop { display: none; }
}

/* ---- character profile: long values stacked full-width (fixes narrow-dd overflow) ---- */
.char-profile{ max-width: 760px; margin: 30px auto 48px; padding: 0 22px; }
.char-profile > h3{ font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 12px; color: var(--text); }
.char-facts{ margin: 0; display: block; }
.char-fact{ display: block; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.char-fact:last-child{ border-bottom: none; }
.char-fact dt{ font-weight: 700; color: var(--accent); font-size: .8rem; letter-spacing: .04em; margin: 0 0 5px; }
.char-fact dd{ margin: 0; line-height: 1.95; color: var(--text); }

/* ---- character sections: full-width flowing lists (long text safe) ---- */
.char-rel-list{ margin: 0; }
.char-rel{ padding: 14px 0; border-bottom: 1px solid var(--border); }
.char-rel:last-child{ border-bottom: none; }
.char-rel-name{ font-weight: 700; color: var(--accent); margin-bottom: 5px; }
.char-rel-desc{ line-height: 1.95; color: var(--text); }
.char-list{ margin: 0; padding-left: 1.3em; }
.char-list li{ line-height: 1.95; margin: 12px 0; color: var(--text); }

.char-section + .char-section{ margin-top: var(--s-8, 48px); }

/* ---- character section images (in-universe stills) ---- */
.char-figure{ margin: 0 0 22px; }
.char-figure img{ width: 100%; max-height: 440px; object-fit: cover; border-radius: 14px;
  display: block; border: 1px solid var(--border); background: rgba(255,255,255,.02); }
