:root {
  --pearl: #fff0f2;
  --pearl-deep: #ffe4e8;
  --paper: #fffafb;
  --rose: #7c444f;
  --rose-soft: #9e5d6a;
  --magenta: #e60067;
  --magenta-dark: #b90052;
  --ink: #251f29;
  --muted: #6f6269;
  --line: #e3cbd0;
  --teal: #226b69;
  --teal-soft: #dcebea;
  --gold: #b97822;
  --white: #ffffff;
  --header-height: 72px;
  --container: 1180px;
  --shadow-sm: 0 8px 24px rgba(83, 44, 55, 0.08);
  --shadow-md: 0 18px 52px rgba(55, 29, 38, 0.15);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Georgia, "Noto Serif SC", "Songti SC", STSong, serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: 68px;
}

h2 {
  margin-bottom: 22px;
  font-size: 42px;
}

h3 {
  margin-bottom: 12px;
  font-size: 23px;
}

p {
  margin-bottom: 1.25em;
}

strong {
  font-weight: 750;
}

::selection {
  color: var(--white);
  background: var(--magenta);
}

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 4px;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

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

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 112px 0;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--magenta);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 54px;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.section-heading-centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading-compact {
  margin-bottom: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--white);
  background: var(--magenta);
  box-shadow: 0 12px 30px rgba(230, 0, 103, 0.28);
}

.button-primary:hover {
  background: var(--magenta-dark);
  box-shadow: 0 14px 34px rgba(185, 0, 82, 0.32);
}

.button-quiet {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(37, 31, 41, 0.28);
}

.button-quiet:hover {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header.menu-active {
  color: var(--ink);
  background: rgba(255, 250, 251, 0.97);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px rgba(62, 36, 44, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  width: min(calc(100% - 40px), 1320px);
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  object-fit: cover;
}

.is-scrolled .brand img,
.menu-active .brand img {
  border-color: var(--pearl-deep);
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 19px;
  font-size: 14px;
  font-weight: 700;
}

.primary-nav a:not(.nav-cta) {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 24px 0;
}

.primary-nav .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.primary-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--magenta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  color: var(--white);
  background: var(--magenta);
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--magenta-dark);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.menu-toggle .icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.menu-icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon-close {
  display: block;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  min-height: min(78svh, 820px);
  overflow: hidden;
  align-items: center;
  color: var(--white);
  background: var(--ink);
}

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  overflow: hidden;
}

.hero-media img {
  object-fit: cover;
  object-position: center 36%;
  border-radius: 12px;
}

.hero-shade {
  background: rgba(30, 22, 30, 0.58);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), var(--container));
  margin: calc(var(--header-height) + 20px) auto 76px;
}

.hero-content .eyebrow {
  color: #ffd3e5;
}

.hero h1 {
  max-width: 760px;
  color: var(--white);
  text-shadow: 0 3px 22px rgba(20, 10, 17, 0.48);
}

.hero-lead {
  max-width: 670px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  line-height: 1.75;
  text-shadow: 0 2px 16px rgba(20, 10, 17, 0.58);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 34px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  list-style: none;
}

.hero-meta li {
  position: relative;
}

.hero-meta li:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -15px;
  width: 4px;
  height: 4px;
  content: "";
  background: #ffd3e5;
  border-radius: 50%;
  transform: translateY(-50%);
}

.hero-scroll {
  position: absolute;
  right: max(24px, calc((100% - var(--container)) / 2));
  bottom: 28px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 34px;
  background: var(--white);
}

/* Introduction */
.section-intro {
  background: var(--paper);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 80px;
  align-items: start;
}

.prose-large {
  color: #4d4349;
  font-size: 18px;
}

.game-facts {
  margin-bottom: 0;
  border-top: 2px solid var(--rose);
}

.game-facts > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.game-facts dt {
  color: var(--rose-soft);
  font-size: 13px;
  font-weight: 800;
}

.game-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.media-wide {
  margin: 68px 0 0;
}

.media-ui {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr);
  background: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.media-ui img {
  width: 100%;
  height: auto;
  align-self: center;
  object-fit: contain;
  border-radius: 12px;
}

.media-ui figcaption {
  display: flex;
  align-items: flex-end;
  padding: 34px;
  color: rgba(255, 255, 255, 0.82);
  border-left: 4px solid var(--magenta);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 20px;
}

/* Story */
.section-world {
  color: rgba(255, 255, 255, 0.78);
  background: var(--ink);
}

.section-heading-light h2,
.section-world h3 {
  color: var(--white);
}

.section-heading-light > p:last-child {
  color: rgba(255, 255, 255, 0.68);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 0;
  align-items: stretch;
  border-radius: 16px;
  overflow: hidden;
}

.story-image {
  display: flex;
  min-height: 0;
  align-items: center;
  margin: 0;
  overflow: hidden;
  background: #171419;
}

.story-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.story-copy {
  display: flex;
  min-height: 420px;
  justify-content: center;
  flex-direction: column;
  padding: 54px;
  background: #312a33;
  border-top: 4px solid var(--magenta);
}

.story-copy-secondary {
  background: #203e3e;
  border-top-color: #4ba5a0;
}

.chapter-number {
  display: inline-block;
  margin-bottom: 18px;
  color: #ff84b8;
  font-size: 13px;
  font-weight: 900;
}

.story-copy-secondary .chapter-number {
  color: #96d7d2;
}

.story-copy p:last-child {
  margin-bottom: 0;
}

/* Routes */
.section-routes {
  background: var(--pearl);
}

.routes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 80px;
  align-items: start;
}

.lead-copy {
  max-width: 760px;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 18px;
}

.route-path {
  border-top: 2px solid var(--rose);
}

.route-path > div {
  display: grid;
  grid-template-columns: 40px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.route-path span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--white);
  background: var(--rose);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.route-path strong {
  color: var(--ink);
}

.route-path small {
  color: var(--muted);
  font-size: 14px;
}

.character-focus {
  padding: 34px;
  color: rgba(255, 255, 255, 0.8);
  background: var(--rose);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.character-focus h3 {
  color: var(--white);
  font-size: 34px;
}

.character-label {
  margin-bottom: 8px;
  color: #ffd5df;
  font-size: 12px;
  font-weight: 900;
}

.character-focus ul {
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  list-style: none;
}

.character-focus li {
  padding: 7px 0;
}

/* Guide */
.section-guide {
  background: var(--paper);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 64px;
  align-items: start;
}

.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.guide-steps li:first-child {
  padding-top: 0;
}

.guide-steps h3 {
  margin-bottom: 6px;
  font-family: inherit;
  font-size: 18px;
}

.guide-steps p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.step-index {
  color: var(--magenta);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 800;
}

.guide-visual {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.guide-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.guide-visual figcaption {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 22px 26px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--teal);
}

.guide-visual figcaption strong {
  color: var(--white);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 60px;
}

.tips-grid article {
  min-height: 180px;
  padding: 26px;
  background: var(--pearl);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.tips-grid h3 {
  font-family: inherit;
  font-size: 18px;
}

.tips-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Features */
.section-features {
  background: var(--pearl-deep);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-grid article {
  min-height: 220px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(124, 68, 79, 0.18);
  border-radius: 16px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-grid article:hover {
  transform: translateY(-4px);
  border-color: var(--rose-soft);
  box-shadow: var(--shadow-sm);
}

.feature-grid article > span {
  display: block;
  margin-bottom: 30px;
  color: var(--magenta);
  font-size: 12px;
  font-weight: 900;
}

.feature-grid h3 {
  font-family: inherit;
  font-size: 19px;
}

.feature-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.screenshot-gallery {
  margin-top: 68px;
}

.screenshot-gallery h2 {
  margin-bottom: 30px;
  font-size: 36px;
}

.screenshot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.screenshot-stage {
  display: flex;
  min-width: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.screenshot-stage img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.screenshot-stage:hover img {
  transform: scale(1.04);
}

.screenshot-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: center;
}

.screenshot-thumb {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
  border: 3px solid transparent;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 9px;
  transition: transform 0.3s ease;
}

.screenshot-thumb:hover {
  filter: brightness(1.08);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px rgba(55, 29, 38, 0.2);
}

.screenshot-thumb:hover img {
  transform: scale(1.04);
}

.screenshot-thumb.is-active {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(230, 0, 103, 0.14), var(--shadow-sm);
}

.specs {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 0.65fr);
  gap: 60px;
  margin-top: 56px;
  padding: 38px;
  background: var(--white);
  border-radius: 16px;
  border-top: 4px solid var(--teal);
}

.specs h3 {
  margin-bottom: 0;
  font-size: 27px;
}

.specs dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 34px;
  margin-bottom: 0;
}

.specs dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.specs dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.specs dd {
  margin: 0;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
}

/* Updates */
.section-updates {
  background: var(--paper);
}

.updates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.section-heading-sticky {
  position: static;
  margin-bottom: 0;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--teal);
  border-radius: 4px;
}

.release-badge span {
  color: #bfe8e5;
  font-size: 12px;
  font-weight: 800;
}

.release-badge strong {
  font-size: 14px;
}

.update-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--rose);
  list-style: none;
}

.update-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.update-list span {
  color: var(--rose-soft);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
}

.update-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.update-list strong {
  color: var(--ink);
}

/* FAQ */
.section-faq {
  background: var(--pearl);
}

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.faq-list {
  border-top: 2px solid var(--rose);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 23px 54px 23px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before,
.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 18px;
  height: 2px;
  content: "";
  background: var(--magenta);
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.faq-list summary::after {
  transform: translateY(-50%) rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: translateY(-50%) rotate(0deg);
}

.faq-list details p {
  max-width: 720px;
  margin: 0;
  padding: 0 54px 24px 0;
  color: var(--muted);
}

/* Floating action and footer */
.floating-cta {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  color: var(--white);
  background: var(--magenta);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(126, 0, 56, 0.34);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.floating-cta:hover {
  background: var(--magenta-dark);
  box-shadow: 0 18px 42px rgba(98, 0, 44, 0.4);
  transform: translateY(-3px);
}

/* Hover motion */
.media-ui,
.story-grid,
.character-focus,
.guide-visual,
.tips-grid article,
.feature-grid article,
.specs,
.update-list li,
.faq-list details {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-ui:hover,
.story-grid:hover,
.character-focus:hover,
.guide-visual:hover,
.tips-grid article:hover,
.feature-grid article:hover,
.specs:hover,
.update-list li:hover,
.faq-list details:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(55, 29, 38, 0.2);
}

.hero-media img,
.media-ui img,
.story-image img,
.guide-visual img {
  transition: transform 0.3s ease;
}

.hero-media:hover img,
.media-ui:hover img,
.story-image:hover img,
.guide-visual:hover img {
  transform: scale(1.04);
}

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

.button:hover,
.nav-cta:hover,
.floating-cta:hover,
.menu-toggle:hover {
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.04);
}

.site-footer {
  padding-bottom: 72px;
  color: rgba(255, 255, 255, 0.68);
  background: #1d1920;
}

.friend-links {
  padding: 52px 0 46px;
  background: var(--rose);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.friend-links h2 {
  margin-bottom: 26px;
  color: #f4c97a;
  font-size: 36px;
  text-align: center;
}

.friend-link-list {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px !important;
  font-size: 14px !important;
}

.friend-link-list a {
  display: inline-flex;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  color: #fff8ef;
  border: 1px solid rgba(244, 201, 122, 0.52);
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.friend-link-list a:hover {
  color: var(--ink);
  background: #f4c97a;
  border-color: #f4c97a;
  transform: translateY(-2px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 58px;
  padding-top: 62px;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.footer-brand strong,
.footer-brand span {
  display: block;
}

.footer-brand strong {
  color: var(--white);
}

.footer-brand span {
  margin-top: 3px;
  font-size: 12px;
}

.site-footer nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  font-size: 13px;
}

.site-footer nav a:hover,
.footer-bottom a:hover {
  color: var(--white);
}

.site-footer .friend-link-list a:hover {
  color: var(--ink);
}

.footer-note {
  margin-bottom: 0;
  font-size: 12px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .primary-nav {
    gap: 16px;
  }

  .primary-nav a:not(.nav-cta) {
    font-size: 13px;
  }

  .overview-layout,
  .routes-layout,
  .guide-layout,
  .updates-layout,
  .faq-layout {
    gap: 50px;
  }

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

  .story-copy {
    padding: 40px;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 64px;
  }

  h1 {
    font-size: 54px;
  }

  h2 {
    font-size: 36px;
  }

  .menu-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    max-height: calc(100svh - var(--header-height));
    gap: 0;
    padding: 18px 24px 26px;
    overflow-y: auto;
    color: var(--ink);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-nav a:not(.nav-cta) {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .primary-nav a:not(.nav-cta)::after {
    display: none;
  }

  .nav-cta {
    margin-top: 16px;
    justify-content: center;
  }

  .overview-layout,
  .routes-layout,
  .guide-layout,
  .updates-layout,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-image-primary {
    order: 1;
  }

  .story-copy:not(.story-copy-secondary) {
    order: 2;
  }

  .story-copy-secondary {
    order: 4;
  }

  .story-image-secondary {
    order: 3;
  }

  .guide-visual,
  .section-heading-sticky {
    position: static;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .tips-grid article {
    min-height: auto;
  }

  .screenshot-layout {
    grid-template-columns: 1fr;
  }

  .screenshot-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .specs {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .container,
  .hero-content {
    width: min(calc(100% - 32px), var(--container));
  }

  .header-inner {
    width: calc(100% - 28px);
  }

  .section {
    padding: 78px 0;
  }

  h1 {
    font-size: 44px;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 32px;
    overflow-wrap: anywhere;
  }

  h3 {
    font-size: 21px;
  }

  .brand span {
    max-width: 190px;
  }

  .hero {
    min-height: 72svh;
  }

  .hero-media img {
    object-position: 55% center;
  }

  .hero-content {
    margin-top: calc(var(--header-height) + 44px);
    margin-bottom: 72px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-actions .button {
    flex: 1 1 150px;
  }

  .hero-meta {
    gap: 8px 20px;
    font-size: 12px;
  }

  .hero-scroll {
    right: 16px;
    bottom: 16px;
  }

  .hero-scroll span {
    height: 24px;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading > p:last-child,
  .prose-large,
  .lead-copy {
    font-size: 16px;
  }

  .overview-layout,
  .routes-layout,
  .guide-layout,
  .updates-layout,
  .faq-layout {
    gap: 38px;
  }

  .media-ui {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .media-ui img {
    height: auto;
  }

  .media-ui figcaption {
    min-height: 130px;
    padding: 24px;
    border-top: 4px solid var(--magenta);
    border-left: 0;
    font-size: 17px;
  }

  .story-image,
  .story-copy {
    min-height: 0;
  }

  .story-copy {
    padding: 34px 24px;
  }

  .route-path > div {
    grid-template-columns: 38px 1fr;
    gap: 14px;
  }

  .route-path small {
    grid-column: 2;
  }

  .character-focus {
    padding: 28px 24px;
  }

  .guide-visual figcaption {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    min-height: auto;
  }

  .feature-grid article > span {
    margin-bottom: 18px;
  }

  .screenshot-gallery {
    margin-top: 54px;
  }

  .screenshot-gallery h2 {
    margin-bottom: 24px;
    font-size: 30px;
  }

  .screenshot-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specs {
    padding: 28px 22px;
  }

  .specs dl {
    grid-template-columns: 1fr;
  }

  .faq-list summary {
    padding-right: 44px;
    font-size: 16px;
  }

  .faq-list details p {
    padding-right: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .friend-links {
    padding: 42px 0 38px;
  }

  .friend-links h2 {
    margin-bottom: 22px;
    font-size: 30px;
  }

  .friend-link-list {
    align-items: stretch;
    flex-direction: column;
  }

  .friend-link-list a {
    width: 100%;
    padding-inline: 16px;
  }

  .footer-note {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .floating-cta {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    min-height: 48px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

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

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

@media print {
  .site-header,
  .hero-scroll,
  .hero-actions,
  .floating-cta,
  .site-footer {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 60px 0;
  }

  .hero-media,
  .hero-shade {
    display: none;
  }

  .hero,
  .section-world {
    color: #000;
    background: #fff;
  }

  .hero h1,
  .section-world h2,
  .section-world h3 {
    color: #000;
  }

  .section {
    padding: 40px 0;
    break-inside: avoid;
  }
}

.error-page {
  display: flex;
  width: min(calc(100% - 32px), 720px);
  min-height: 100svh;
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px 0;
  text-align: center;
}

.error-page img {
  width: 112px;
  height: 112px;
  margin-bottom: 28px;
  object-fit: cover;
  border: 4px solid var(--pearl-deep);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.error-page h1 {
  margin-bottom: 14px;
  color: var(--rose);
  font-size: 46px;
}

.error-page > p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 28px;
  color: var(--muted);
}
