:root {
  --paper: #f7f2e8;
  --paper-deep: #eee4d1;
  --ink: #44352d;
  --ink-soft: #725f52;
  --night: #173d5b;
  --night-deep: #0c263b;
  --night-soft: #2f6584;
  --gold: #c69b3a;
  --gold-light: #ecd084;
  --line: rgba(68, 53, 45, .2);
  --white: #fffdf8;
  --shadow: 0 18px 50px rgba(49, 37, 28, .12);
  --wrap: 1180px;
  --header-height: 76px;
  --radius-module: 16px;
  --radius-image: 12px;
  --radius-tag: 4px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .22;
  background-image: repeating-linear-gradient(0deg, rgba(91, 70, 49, .035) 0, rgba(91, 70, 49, .035) 1px, transparent 1px, transparent 4px);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.28; font-weight: 700; letter-spacing: 0; }
h2 { margin-bottom: 24px; font-size: 36px; }
h3 { margin-bottom: 10px; font-size: 21px; }
p { margin-bottom: 18px; }
.wrap { width: min(calc(100% - 48px), var(--wrap)); margin-inline: auto; }
.section { padding: 112px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 10px 16px; color: var(--white); background: var(--night); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-height); color: var(--ink); background: rgba(247, 242, 232, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav-shell { width: min(calc(100% - 40px), 1320px); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1.2; flex: none; }
.brand img { width: 46px; height: 46px; object-fit: cover; border: 1px solid rgba(198,155,58,.7); border-radius: 50%; }
.brand span { display: grid; }
.brand b { font-size: 17px; }
.brand small { margin-top: 4px; color: var(--ink-soft); font-size: 11px; }
.primary-nav { display: flex; align-items: center; gap: 25px; font-family: "Microsoft YaHei", sans-serif; font-size: 14px; }
.primary-nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.primary-nav > a:not(.nav-cta)::after { position: absolute; right: 0; bottom: -9px; left: 0; height: 1px; content: ""; background: var(--gold); transform: scaleX(0); transition: transform .25s ease; }
.primary-nav > a:hover::after, .primary-nav > a[aria-current="true"]::after { transform: scaleX(1); }
.nav-cta { padding: 10px 18px; color: var(--white); background: var(--night); border: 1px solid var(--night); border-radius: 4px; }
.nav-cta:hover { color: var(--night-deep); background: var(--gold-light); border-color: var(--gold); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 4px; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; margin: auto; content: ""; background: var(--ink); transition: transform .2s ease; }
.menu-icon::before { transform: translateY(-7px); }
.menu-icon::after { transform: translateY(5px); }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(1px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-1px) rotate(-45deg); }

.hero { position: relative; min-height: calc(100svh - 108px); max-height: 880px; overflow: hidden; color: var(--white); background: var(--night-deep); isolation: isolate; }
.hero-media, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -3; object-fit: cover; object-position: 68% center; }
.hero-shade { z-index: -2; background: linear-gradient(90deg, rgba(9,25,38,.92) 0%, rgba(14,38,57,.78) 36%, rgba(12,31,46,.18) 70%, rgba(9,22,33,.08) 100%), linear-gradient(0deg, rgba(9,24,36,.66) 0%, transparent 45%); }
.hero::after { position: absolute; inset: 22px; z-index: -1; content: ""; border: 1px solid rgba(236,208,132,.35); pointer-events: none; }
.hero-content { min-height: inherit; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 48px; padding-bottom: 94px; }
.eyebrow, .section-kicker { margin-bottom: 16px; color: var(--gold); font-family: "Microsoft YaHei", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { max-width: 700px; margin-bottom: 18px; font-size: 66px; text-shadow: 0 3px 20px rgba(0,0,0,.2); }
.hero-lead { max-width: 590px; margin-bottom: 34px; font-size: 21px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button { min-height: 50px; padding: 11px 24px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid transparent; border-radius: 4px; font-family: "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 700; text-decoration: none; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #211a12; background: var(--gold-light); border-color: var(--gold); box-shadow: 0 10px 30px rgba(198,155,58,.2); }
.button-primary:hover { background: #f4dc9b; }
.button-ghost { color: var(--white); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.55); }
.button-ghost:hover { background: rgba(255,255,255,.14); }
.hero-facts { margin: 42px 0 0; display: flex; gap: 0; font-family: "Microsoft YaHei", sans-serif; }
.hero-facts div { min-width: 150px; padding: 0 26px; border-left: 1px solid rgba(255,255,255,.3); }
.hero-facts div:first-child { padding-left: 0; border-left: 0; }
.hero-facts dt { color: rgba(255,255,255,.65); font-size: 12px; }
.hero-facts dd { margin: 4px 0 0; font-size: 14px; }
.hero-scroll { position: absolute; right: 42px; bottom: 32px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.76); font-family: "Microsoft YaHei", sans-serif; font-size: 12px; text-decoration: none; writing-mode: vertical-rl; }
.hero-scroll span { width: 1px; height: 42px; background: var(--gold-light); }

.section-heading { max-width: 790px; margin-bottom: 54px; }
.section-heading > p:last-child { color: var(--ink-soft); font-size: 18px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); gap: 74px; align-items: center; }
.standfirst { font-size: 20px; line-height: 1.9; }
.section-copy > p:not(.section-kicker) { color: var(--ink-soft); }
.metadata { margin-top: 32px; display: grid; border-top: 1px solid var(--line); }
.metadata span { padding: 12px 0; display: grid; grid-template-columns: 90px 1fr; border-bottom: 1px solid var(--line); font-family: "Microsoft YaHei", sans-serif; font-size: 14px; }
.metadata b { color: var(--night); }
.framed-figure { position: relative; margin: 0; padding: 12px; background: var(--white); border: 1px solid rgba(68,53,45,.18); box-shadow: var(--shadow); }
.framed-figure::before, .framed-figure::after { position: absolute; width: 28px; height: 28px; content: ""; border-color: var(--gold); }
.framed-figure::before { top: -7px; left: -7px; border-top: 1px solid; border-left: 1px solid; }
.framed-figure::after { right: -7px; bottom: -7px; border-right: 1px solid; border-bottom: 1px solid; }
.framed-figure img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
figcaption { padding-top: 12px; color: var(--ink-soft); font-family: "Microsoft YaHei", sans-serif; font-size: 13px; line-height: 1.65; }

.content-section { color: #eaf2f3; background: var(--night-deep); }
.content-section .section-kicker, .gallery-section .section-kicker { color: var(--gold-light); }
.light-heading > p:last-child { color: #bbced8; }
.content-layout { display: grid; grid-template-columns: minmax(390px, .9fr) minmax(0, 1.1fr); gap: 68px; align-items: start; }
.story-visual { position: sticky; top: 110px; margin: 0; }
.story-visual img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 54% center; border: 1px solid rgba(236,208,132,.4); }
.story-visual figcaption { color: #aebfc9; }
.chapter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.16); }
.chapter-list li { padding: 24px 0; display: grid; grid-template-columns: 58px 1fr; gap: 20px; border-bottom: 1px solid rgba(255,255,255,.16); }
.chapter-list li > span { color: var(--gold-light); font-family: Georgia, serif; font-size: 18px; }
.chapter-list h3 { margin-bottom: 6px; color: #fff; }
.chapter-list p { margin-bottom: 0; color: #bbced8; }

.characters-section { padding-block: 90px; background: var(--paper-deep); border-block: 1px solid var(--line); }
.character-layout { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr); gap: 72px; align-items: center; }
.character-poster { margin: 0; padding: 20px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.character-poster img { width: 100%; aspect-ratio: 460/260; object-fit: cover; object-position: center; image-rendering: auto; }
.name-index { margin: 26px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.name-index a { padding: 7px 12px; color: var(--night); background: rgba(23,61,91,.07); border: 1px solid rgba(23,61,91,.2); border-radius: 4px; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; text-decoration: none; cursor: pointer; transition: color .3s ease, background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.editor-note { margin: 28px 0 0; padding: 18px 20px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.48); }

.guide-grid { display: grid; grid-template-columns: 1fr .86fr; gap: 70px; align-items: center; }
.route-steps { border-top: 1px solid var(--line); }
.route-steps article { padding: 24px 0; display: grid; grid-template-columns: 50px 1fr; gap: 20px; border-bottom: 1px solid var(--line); }
.route-steps h3, .route-steps p { margin-bottom: 5px; }
.route-steps p { color: var(--ink-soft); }
.step-number { color: var(--gold); font-family: Georgia, serif; font-size: 20px; }
.choice-figure { margin: 0; }
.choice-figure img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% center; box-shadow: var(--shadow); }
.choice-figure figcaption { padding: 18px; color: #d4e0e6; background: var(--night); }
.choice-figure figcaption b { color: var(--gold-light); }
.guide-notes { margin-top: 50px; padding: 28px 32px; display: grid; grid-template-columns: 250px 1fr; gap: 36px; border: 1px solid var(--line); background: rgba(255,255,255,.5); }
.guide-notes h3, .guide-notes p { margin: 0; }
.guide-notes p { color: var(--ink-soft); }

.features-section { background: var(--white); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature-grid article { min-height: 270px; padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid article > span { display: block; margin-bottom: 36px; color: var(--gold); font-size: 18px; }
.feature-grid h3 { color: var(--night); }
.feature-grid p { margin-bottom: 0; color: var(--ink-soft); font-size: 15px; }

.gallery-section { padding: 90px 0 110px; overflow: hidden; color: var(--white); background: var(--night); }
.gallery-head { margin-bottom: 36px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.gallery-head h2 { margin-bottom: 0; }
.gallery-selector { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.gallery-main { min-width: 0; margin: 0; }
.gallery-main-frame { aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; background: var(--night-deep); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 20px 55px rgba(0,0,0,.24); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.gallery-main figcaption { min-height: 42px; padding: 14px 2px 0; color: #c8d7df; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery-thumb { position: relative; min-width: 0; padding: 0; overflow: hidden; background: var(--night-deep); border: 1px solid rgba(255,255,255,.2); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.gallery-thumb::after { position: absolute; inset: 0; content: ""; border: 3px solid transparent; pointer-events: none; transition: border-color .2s ease; }
.gallery-thumb img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; object-position: center; }
.thumb-icon { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; padding: 6px; color: var(--night-deep); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: rgba(236,208,132,.92); border: 1px solid rgba(255,255,255,.65); border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,.2); pointer-events: none; }
.gallery-thumb:hover { border-color: var(--gold-light); transform: translateY(-2px); }
.gallery-thumb.is-active { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(236,208,132,.2); }
.gallery-thumb.is-active::after { border-color: var(--gold-light); }

/* Content artwork keeps its original proportions so dialogue, characters and UI text remain visible. */
.framed-figure img,
.story-visual img,
.character-poster img,
.choice-figure img,
.gallery-main img,
.gallery-thumb img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}
.framed-figure img { background: var(--paper-deep); }
.story-visual img,
.choice-figure img,
.gallery-main img,
.gallery-thumb img { background: var(--night); }
.character-poster img { background: var(--paper); }

.updates-section { background: var(--paper-deep); }
.updates-layout { display: block; }
.updates-intro { max-width: 790px; margin-bottom: 42px; }
.updates-intro p { color: var(--ink-soft); }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--night); font-family: "Microsoft YaHei", sans-serif; font-weight: 700; text-decoration-color: var(--gold); }
.update-list { margin: 0; padding: 0; list-style: none; counter-reset: updates; border-top: 1px solid var(--line); }
.update-list li { padding: 20px 0; display: grid; grid-template-columns: 38px 120px 1fr; gap: 18px; align-items: baseline; counter-increment: updates; border-bottom: 1px solid var(--line); }
.update-list li::before { content: counter(updates, decimal-leading-zero); color: var(--gold); font-family: Georgia, serif; }
.update-list b { color: var(--night); font-size: 15px; }
.update-list span { color: var(--ink-soft); }

.faq-layout { display: block; }
.faq-intro { max-width: 790px; margin-bottom: 42px; }
.faq-intro p { color: var(--ink-soft); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 23px 52px 23px 0; color: var(--night); font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 21px; right: 8px; width: 28px; height: 28px; content: "+"; color: var(--gold); font-family: Arial, sans-serif; font-size: 24px; font-weight: 400; line-height: 28px; text-align: center; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 48px 24px 0; color: var(--ink-soft); }

.floating-detail { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 90; min-height: 52px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #211a12; background: var(--gold-light); border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 14px 38px rgba(7,28,42,.28); font-family: "Microsoft YaHei", sans-serif; font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.floating-detail:hover { background: #f4dc9b; box-shadow: 0 18px 42px rgba(7,28,42,.34); transform: translateY(-3px); }

.friend-links { padding: 50px 0 54px; color: var(--ink); background: var(--paper-deep); border-top: 1px solid var(--line); }
.friend-links-inner { text-align: center; }
.friend-links h2 { margin-bottom: 22px; font-size: 28px; }
.friend-links-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.friend-links-list a { min-height: 44px; padding: 9px 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: var(--white); border: 1px solid rgba(68,53,45,.1); border-radius: 999px; box-shadow: 0 8px 22px rgba(49,37,28,.08); font-family: "Microsoft YaHei", sans-serif; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; transition: color .3s ease, background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease; }

.site-footer { padding: 44px 0; color: #b8c9d2; background: #071c2a; font-family: "Microsoft YaHei", sans-serif; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: center; }
.footer-brand { display: grid; color: var(--white); }
.footer-brand span { color: #91a7b3; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer p { margin: 0; text-align: right; }

/* Unified corner radius system. */
.framed-figure,
.story-visual,
.character-poster,
.editor-note,
.guide-notes,
.feature-grid,
.feature-grid article,
.gallery-main,
.gallery-main-frame,
.gallery-thumb,
.update-list,
.update-list li,
.faq-list,
.faq-list details {
  border-radius: var(--radius-module);
}

.hero-media,
.framed-figure img,
.story-visual img,
.character-poster img,
.choice-figure img,
.gallery-main img,
.gallery-thumb img {
  border-radius: var(--radius-image);
}

.button,
.nav-cta,
.menu-toggle,
.floating-detail,
.friend-links-list a {
  border-radius: var(--radius-pill);
}

.name-index a {
  border-radius: var(--radius-tag);
}

/* Pure CSS hover interactions — unified 0.3s transitions. */
.primary-nav > a:not(.nav-cta)::after {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s ease;
}
.primary-nav > a:not(.nav-cta):hover::after,
.primary-nav > a:not(.nav-cta)[aria-current="true"]::after {
  transform: scaleX(1);
}

.button,
.nav-cta,
.floating-detail,
.text-link,
.menu-toggle {
  transition: color .3s ease, background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease, filter .3s ease;
}

.framed-figure,
.character-poster,
.guide-notes,
.chapter-list li,
.route-steps article,
.feature-grid article,
.gallery-main-frame,
.gallery-thumb,
.update-list li,
.faq-list details {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}

.framed-figure,
.story-visual,
.character-poster,
.choice-figure,
.gallery-main-frame,
.gallery-thumb {
  overflow: hidden;
}

.framed-figure img,
.story-visual img,
.character-poster img,
.choice-figure img,
.gallery-main img,
.gallery-thumb img {
  transition: transform .3s ease, filter .3s ease;
  transform-origin: center;
}

@media (hover: hover) and (pointer: fine) {
  .framed-figure:hover,
  .character-poster:hover,
  .guide-notes:hover,
  .chapter-list li:hover,
  .route-steps article:hover,
  .feature-grid article:hover,
  .gallery-main-frame:hover,
  .gallery-thumb:hover,
  .update-list li:hover,
  .faq-list details:hover {
    z-index: 2;
    transform: translateY(-6px);
    border-color: rgba(236,208,132,.78);
    box-shadow: 0 18px 42px rgba(198,155,58,.24), 0 0 24px rgba(236,208,132,.18);
  }

  .chapter-list li:hover {
    background: rgba(255,255,255,.06);
  }

  .route-steps article:hover {
    background: rgba(236,208,132,.1);
  }

  .content-section .story-visual:hover,
  .gallery-main-frame:hover,
  .gallery-thumb:hover {
    box-shadow: 0 18px 44px rgba(0,0,0,.32), 0 0 26px rgba(236,208,132,.24);
  }

  .button:hover,
  .nav-cta:hover,
  .floating-detail:hover,
  .menu-toggle:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 14px 32px rgba(198,155,58,.28);
  }

  .text-link:hover {
    filter: brightness(1.18);
    transform: scale(1.04);
  }

  .name-index a:hover {
    color: var(--night-deep);
    background: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 10px 24px rgba(198,155,58,.2);
    transform: translateY(-3px);
  }

  .friend-links-list a:hover {
    color: var(--night-deep);
    background: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 12px 28px rgba(198,155,58,.22);
    transform: translateY(-3px);
  }

  .framed-figure:hover img,
  .story-visual:hover img,
  .character-poster:hover img,
  .choice-figure:hover img,
  .gallery-main-frame:hover img,
  .gallery-thumb:hover img {
    transform: scale(1.045);
    filter: brightness(1.04);
  }
}

@media (max-width: 1050px) {
  h2 { font-size: 32px; }
  .primary-nav { gap: 10px; font-size: 12px; }
  .intro-grid, .content-layout, .character-layout, .guide-grid { gap: 45px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --header-height: 66px; }
  body { font-size: 16px; }
  .wrap { width: min(calc(100% - 36px), var(--wrap)); }
  .section { padding: 78px 0; }
  h2 { font-size: 29px; }
  .menu-toggle { display: block; }
  .primary-nav { position: absolute; top: 66px; right: 0; left: 0; padding: 18px; display: none; align-items: stretch; flex-direction: column; gap: 0; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 35px rgba(20,30,40,.15); }
  .primary-nav[data-open="true"] { display: flex; }
  .primary-nav a, .primary-nav a:nth-child(5) { padding: 11px 8px; display: flex; }
  .primary-nav .nav-cta { margin-top: 8px; text-align: center; }
  .hero { min-height: calc(100svh - 90px); max-height: none; }
  .hero::after { inset: 12px; }
  .hero-media { object-position: 60% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(9,25,38,.93), rgba(14,38,57,.66) 72%, rgba(9,22,33,.35)), linear-gradient(0deg, rgba(9,24,36,.74), transparent); }
  .hero h1 { font-size: 48px; }
  .hero-lead { max-width: 520px; font-size: 18px; }
  .hero-facts div { min-width: 0; padding-inline: 18px; }
  .hero-scroll { display: none; }
  .intro-grid, .content-layout, .character-layout, .guide-grid { grid-template-columns: 1fr; }
  .intro-figure { max-width: 680px; }
  .story-visual { position: static; }
  .story-visual img, .choice-figure img { aspect-ratio: 16/10; }
  .content-layout { gap: 42px; }
  .character-poster { max-width: 600px; }
  .guide-notes { grid-template-columns: 1fr; gap: 10px; }
  .gallery-selector { grid-template-columns: 1fr; }
  .gallery-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; flex-wrap: wrap; }
  .site-footer p { text-align: center; }
}

@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .nav-shell { width: calc(100% - 24px); }
  .brand img { width: 40px; height: 40px; }
  .brand b { font-size: 15px; }
  .section { padding: 64px 0; }
  h2 { font-size: 26px; }
  h3 { font-size: 19px; }
  .hero { min-height: calc(100svh - 82px); }
  .hero-content { padding-top: 40px; padding-bottom: 54px; }
  .eyebrow { margin-bottom: 10px; }
  .hero h1 { margin-bottom: 12px; font-size: 38px; }
  .hero-lead { margin-bottom: 25px; font-size: 16px; line-height: 1.7; }
  .hero-actions { width: 100%; }
  .hero-actions .button { flex: 1 1 150px; padding-inline: 16px; }
  .hero-facts { width: 100%; margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-facts div { padding-inline: 10px; }
  .hero-facts dt { font-size: 10px; }
  .hero-facts dd { font-size: 12px; line-height: 1.45; }
  .standfirst { font-size: 18px; }
  .intro-grid, .character-layout { gap: 42px; }
  .framed-figure { padding: 7px; }
  .metadata span { grid-template-columns: 72px 1fr; }
  .chapter-list li { grid-template-columns: 42px 1fr; gap: 12px; }
  .character-poster { padding: 10px; }
  .name-index a { flex: 1 1 42%; text-align: center; }
  .route-steps article { grid-template-columns: 38px 1fr; gap: 12px; }
  .guide-notes { padding: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 0; padding: 25px 22px; }
  .feature-grid article > span { margin-bottom: 18px; }
  .gallery-section { padding: 64px 0 80px; }
  .gallery-head { align-items: flex-start; flex-direction: column; }
  .gallery-selector { gap: 18px; }
  .gallery-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .update-list li { grid-template-columns: 30px 1fr; gap: 12px; }
  .update-list li span { grid-column: 2; }
  .faq-list summary { font-size: 16px; }
  .updates-intro, .faq-intro { margin-bottom: 30px; }
  .friend-links { padding: 42px 0 46px; }
  .friend-links h2 { margin-bottom: 18px; font-size: 24px; }
  .friend-links-list { gap: 10px; }
  .friend-links-list a { width: 100%; min-height: 46px; padding-inline: 18px; }
  .floating-detail { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); min-width: 48px; min-height: 48px; padding: 11px 14px; }
  .floating-detail span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .site-header, .hero-actions, .hero-scroll, .floating-detail, .friend-links, .site-footer { display: none; }
  body { color: #000; background: #fff; }
  .hero { min-height: auto; padding: 60px 0; color: #000; background: #fff; }
  .hero-media, .hero-shade, .hero::after { display: none; }
  .content-section, .gallery-section { color: #000; background: #fff; }
  .content-section *, .gallery-section * { color: #000 !important; }
  .section { padding: 40px 0; break-inside: avoid; }
}
