:root {
  --paper: #f4efe3;
  --paper-deep: #e7ddca;
  --ink: #1b1f24;
  --muted: #63645f;
  --line: rgba(27, 31, 36, 0.16);
  --rail: #15191d;
  --rail-soft: #242a2f;
  --red: #b3263b;
  --red-dark: #7e1f2f;
  --green: #2f6f58;
  --blue: #2b5d86;
  --yellow: #e0b341;
  --white: #fffdf8;
  --shadow: 0 28px 70px rgba(27, 31, 36, 0.16);
  --content: min(1120px, calc(100vw - 304px));
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(27, 31, 36, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(27, 31, 36, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  font-family: "Noto Sans SC", "Microsoft YaHei", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 9vw, 7.8rem);
  font-weight: 950;
}

h2 {
  font-size: clamp(1.72rem, 3vw, 3rem);
  font-weight: 900;
}

h3 {
  font-size: 1.16rem;
  font-weight: 850;
}

strong {
  font-weight: 850;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.62rem;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  padding: 10px 14px;
  color: var(--white);
  background: var(--red-dark);
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  width: 248px;
  padding: 22px 18px;
  color: var(--white);
  background: linear-gradient(180deg, var(--rail), #0d1013);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand-block {
  display: grid;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 950;
}

.brand-block img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.rail-nav {
  display: grid;
  gap: 7px;
}

.rail-nav a {
  position: relative;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.78);
  border-left: 3px solid transparent;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 750;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible,
.rail-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--yellow);
}

.rail-download {
  margin-top: auto;
  padding: 13px 16px;
  color: #15191d;
  background: var(--yellow);
  border-radius: 8px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 14px 32px rgba(224, 179, 65, 0.18);
}

.menu-button {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 250;
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--rail);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  cursor: pointer;
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 99px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.page-shell {
  margin-left: 248px;
}

.opening,
.chapter,
.download-panel,
.site-footer {
  width: var(--content);
  margin: 0 auto;
}

.opening {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  grid-template-rows: 1fr auto;
  gap: 28px;
  align-items: end;
  padding: 72px 0 44px;
}

.opening-copy {
  align-self: center;
  max-width: 760px;
  padding: 0 0 34px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lead {
  max-width: 700px;
  margin-top: 20px;
  color: #383d40;
  font-size: clamp(1.08rem, 1.5vw, 1.32rem);
}

.opening-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 18px 38px rgba(179, 38, 59, 0.2);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-dark);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.74);
  border-color: var(--line);
}

.opening-poster {
  margin: 0;
  align-self: stretch;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  background: var(--rail);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.opening-poster img {
  height: 100%;
  object-fit: cover;
}

.opening-poster figcaption,
.wide-shot figcaption,
.ledger-main figcaption,
.ledger-side figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(13, 16, 19, 0.76);
  border-radius: 6px;
  font-size: 0.82rem;
}

.quick-spec {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
}

.quick-spec div {
  padding: 18px 20px;
}

.quick-spec div + div {
  border-left: 1px solid var(--line);
}

.quick-spec dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.quick-spec dd {
  margin: 4px 0 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 28px;
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.chapter-marker {
  position: sticky;
  top: 24px;
  align-self: start;
  color: var(--red-dark);
  font-size: clamp(2.4rem, 4vw, 4rem);
  font-weight: 950;
  line-height: 1;
}

.chapter-copy,
.section-head {
  max-width: 840px;
}

.chapter-copy p,
.section-head p,
.rule-card p,
.release p,
.spec-table p,
.faq-stack p,
.download-panel p,
.site-footer p {
  color: #454947;
}

.intro-notes {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}

.intro-notes p {
  min-height: 126px;
  padding: 20px;
  background: rgba(255, 253, 248, 0.78);
  font-weight: 780;
}

.wide-shot,
.ledger-main,
.ledger-side,
.promo-shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.wide-shot {
  grid-column: 2;
  margin-top: 34px;
}

.wide-shot img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.content-strips {
  grid-column: 2;
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.strip {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.strip > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 950;
}

.strip:nth-child(2) > span {
  background: var(--green);
}

.strip:nth-child(3) > span {
  background: var(--red);
}

.strip:nth-child(4) > span {
  color: var(--ink);
  background: var(--yellow);
}

.strip p {
  margin-top: 8px;
  color: #464a48;
}

.image-ledger {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  margin-top: 34px;
}

.ledger-main {
  grid-row: span 2;
}

.ledger-main img,
.ledger-side img {
  height: 100%;
  min-height: 268px;
  object-fit: cover;
}

.rules-board {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 34px;
}

.rule-card {
  padding: 24px;
  color: #f6f0e6;
  background: var(--rail);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rule-card:nth-child(2) {
  background: var(--red-dark);
}

.rule-card:nth-child(3) {
  background: var(--green);
}

.rule-card:nth-child(4) {
  background: var(--blue);
}

.rule-card h3 {
  margin-bottom: 16px;
}

.rule-card p,
.rule-card li {
  color: rgba(255, 255, 255, 0.84);
}

.upgrade-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.upgrade-list li {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--ink);
  background: #fff6d8;
  border-radius: 6px;
  font-weight: 900;
}

.route-line {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 22px;
  background: var(--line);
  border: 1px solid var(--line);
}

.route-line span {
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 14px;
  background: rgba(255, 253, 248, 0.82);
  font-weight: 850;
}

.combat-pair {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 34px;
  align-items: stretch;
}

.combat-pair .wide-shot {
  grid-column: auto;
  margin-top: 0;
}

.one-line-tip {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 8px;
}

.one-line-tip p {
  margin-top: 14px;
  color: #27251d;
  font-size: 1.04rem;
  font-weight: 780;
}

.release-track {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 34px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.release {
  min-height: 238px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.release time {
  display: block;
  margin-bottom: 14px;
  color: var(--red-dark);
  font-size: 0.84rem;
  font-weight: 900;
}

.release p {
  margin-top: 12px;
}

.promo-shot {
  grid-column: 2;
  width: min(560px, 100%);
  margin-top: 26px;
}

.spec-table {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
}

.spec-table div {
  padding: 24px;
}

.spec-table div + div {
  border-left: 1px solid var(--line);
}

.spec-table p {
  margin-top: 12px;
}

.faq-stack {
  grid-column: 2;
  display: grid;
  gap: 10px;
  max-width: 880px;
  margin-top: 34px;
}

.faq-stack details {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.faq-stack summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 900;
}

.faq-stack p {
  padding: 0 20px 20px;
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 72px;
  padding: 34px;
  color: #fff;
  background: var(--rail);
  border-radius: 8px;
}

.download-panel .section-kicker,
.download-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.download-panel h2 {
  color: #fff;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.site-footer a {
  color: var(--red-dark);
  font-weight: 850;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible,
.reveal:first-child {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .site-rail {
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.24);
  }

  .site-rail.is-open {
    transform: translateX(0);
  }

  .menu-button {
    display: block;
  }

  .page-shell {
    margin-left: 0;
  }

  .opening,
  .chapter,
  .download-panel,
  .site-footer {
    width: min(100vw - 36px, 1040px);
  }
}

@media (max-width: 900px) {
  .opening {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 84px;
  }

  .opening-copy {
    padding-bottom: 0;
  }

  .opening-poster {
    min-height: 0;
  }

  .opening-poster img {
    aspect-ratio: 16 / 9;
  }

  .quick-spec,
  .intro-notes,
  .image-ledger,
  .rules-board,
  .combat-pair,
  .spec-table,
  .download-panel {
    grid-template-columns: 1fr;
  }

  .quick-spec div + div,
  .spec-table div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 72px 0;
  }

  .chapter-marker,
  .chapter-copy,
  .section-head,
  .intro-notes,
  .wide-shot,
  .content-strips,
  .image-ledger,
  .rules-board,
  .route-line,
  .combat-pair,
  .release-track,
  .promo-shot,
  .spec-table,
  .faq-stack {
    grid-column: 1;
  }

  .chapter-marker {
    position: static;
    font-size: 2.4rem;
  }

  .route-line {
    grid-template-columns: 1fr;
  }

  .route-line span {
    min-height: 58px;
  }

  .download-panel {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-rail {
    width: min(84vw, 300px);
  }

  .opening,
  .chapter,
  .download-panel,
  .site-footer {
    width: min(100vw - 28px, 1040px);
  }

  .opening {
    padding-bottom: 32px;
  }

  .opening-actions {
    display: grid;
  }

  .quick-spec div {
    padding: 15px 16px;
  }

  .strip {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .strip > span {
    width: 48px;
    height: 48px;
  }

  .upgrade-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .release-track {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .download-panel {
    padding: 24px;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
