:root {
  color-scheme: dark;
  --ink: #1b1213;
  --panel: #241716;
  --text: #fff0d4;
  --muted: #d6bb9d;
  --brass: #ffd081;
  --line: #684838;
  --paper: #f1e3c7;
  --paper-text: #362319;
  --paper-muted: #644632;
  --display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --body: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.75rem; }
body { margin: 0; background: var(--ink); color: var(--text); font: 1rem/1.72 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid #f29849; outline-offset: 4px; }
::selection { color: var(--ink); background: var(--brass); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.22; }
h1, h2 { font-family: var(--display); font-weight: 900; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 3.5rem, 74rem); margin-inline: auto; }
.skip {
  z-index: 10; position: fixed; inset: .5rem auto auto .5rem;
  transform: translateY(-150%); padding: .65rem 1rem;
  background: var(--brass); color: var(--ink); font-weight: 800;
}
.skip:focus { transform: translateY(0); }

.masthead {
  position: sticky; top: 0; z-index: 5; background: #211719;
  border-bottom: 1px solid #50332b;
}
.masthead-inner { min-height: 4.55rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-weight: 850; white-space: nowrap; }
.brand img { border: 1px solid #997047; border-radius: .34rem; }
.brand span { font-size: 1.13rem; letter-spacing: .06em; }
.nav { display: flex; gap: clamp(1.25rem, 2.85vw, 2.9rem); margin-inline: auto; }
.nav a { color: var(--muted); font-size: .93rem; padding-block: .75rem; white-space: nowrap; }
.nav a:hover, .footer a:hover { color: var(--brass); }

.button {
  --button-color: var(--text);
  --button-border: #9b6a47;
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 3rem; padding: .58rem 1.14rem; border: 1px solid var(--button-border);
  border-radius: .25rem; color: var(--button-color); background: transparent;
  font-weight: 720; line-height: 1.35; text-align: center; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms, box-shadow 160ms, transform 160ms, color 160ms;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-outline:hover { background: #513327; color: #fff3d6; }
.button-primary {
  --button-color: #271716; --button-border: #ffe0a2;
  min-height: 3.6rem; padding-inline: 1.6rem;
  background: linear-gradient(180deg, #ffdc9a, #f2b862);
  box-shadow: 0 4px 0 #8d4929, 0 10px 24px #180a0b55;
  font-size: 1.02rem;
}
.button-primary:hover { background: #ffe2a9; box-shadow: 0 6px 0 #8d4929, 0 13px 26px #180a0b77; }
.button-primary:active { box-shadow: 0 2px 0 #8d4929; }

.hero {
  position: relative; isolation: isolate; display: grid; align-items: center; overflow: hidden;
  min-height: clamp(35rem, calc(83svh - 4.5rem), 48rem);
  background: #29181b;
  border-bottom: 1px solid #a86f4a;
}
.hero-art { position: absolute; inset: 0 0 0 34%; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 57%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg,#27181b 0%,#27181b 32%,#27181bf2 40%,#27181b7d 54%,#27181b0d 70%),
    linear-gradient(0deg,#25171a 0%,#25171a00 31%);
}
.hero-content { padding-block: 5.5rem; }
.hero-genre {
  margin-bottom: 1.1rem; color: #f3c68c; font-size: .91rem;
  font-weight: 620; letter-spacing: .12em;
}
.hero h1 {
  font-size: clamp(4rem, 7.6vw, 7.55rem); letter-spacing: .015em; line-height: 1.02;
  text-shadow: 0 3px 0 #9e502e, 0 9px 25px #180a0c;
}
.hero-subtitle {
  margin-top: .84rem; color: #f4c488; font-family: var(--display);
  font-size: clamp(1.36rem,2.7vw,2rem); font-weight: 700; letter-spacing: .21em;
}
.hero-copy {
  max-width: 25rem; margin-top: 1.3rem; color: #f1dac2;
  font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.86;
}
.hero-actions { display: flex; align-items: center; gap: 1.35rem; margin-top: 1.7rem; flex-wrap: wrap; }
.text-link { padding-block: .58rem; border-bottom: 1px solid #dfa86a; color: #ffe1b0; font-weight: 640; }
.text-link:hover { color: white; }
.platform { margin-top: .94rem; color: #dcc2a7; font-size: .875rem; }

.section { padding-block: clamp(3.2rem, 7.6vw, 6.5rem); }
.paper {
  color-scheme: light; color: var(--paper-text); background:
    radial-gradient(ellipse at 80% 12%, #fff4df80, transparent 58%), var(--paper);
}
.section-heading { margin-bottom: 1.85rem; }
.section-heading h2, .download h2 { font-size: clamp(1.85rem,4vw,3.18rem); letter-spacing: .015em; }
.section-heading p { margin-top: .65rem; max-width: 44rem; color: var(--muted); }
.paper .section-heading p { color: var(--paper-muted); }

.mechanics { display: grid; grid-template-columns: repeat(3,1fr); border-block: 1px solid #c0a17a; }
.mechanics article { padding: 1.6rem 1.55rem 1.7rem; }
.mechanics article:first-child { padding-left: 0; }
.mechanics article + article { border-left: 1px solid #c0a17a; }
.mechanics h3 { margin-bottom: .68rem; color: #814126; font-size: 1.28rem; font-weight: 850; }
.mechanics p { color: #59402e; max-width: 22rem; }

.frontier {
  background: radial-gradient(ellipse at 90% 30%, #482620, transparent 65%), #261919;
  border-block: 1px solid #704831;
}
.terrain { border: 1px solid #825339; border-radius: .38rem; background: #211517; overflow: hidden; }
.terrain-tabs {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .48rem;
  padding: .6rem; border-bottom: 1px solid #825339;
}
.terrain-tab {
  min-height: 3rem; padding: .45rem .35rem; color: #ead4b1; background: #392722;
  border: 1px solid #6d4b3a; font-weight: 680; cursor: pointer; border-radius: .2rem;
}
.terrain-tab:hover { background: #594033; }
.terrain-tab[aria-selected="true"] { color: #2b1715; background: #f3c17a; border-color: #ffdd9a; }
.terrain-tab:focus-visible, .terrain-panel:focus-visible { outline-offset: -4px; }
.terrain-panel {
  display: grid; grid-template-columns: minmax(0,2.27fr) minmax(0,1fr);
  align-items: stretch;
}
.terrain-panel img { width: 100%; height: 100%; aspect-ratio: 16/9; object-fit: cover; }
.terrain-caption {
  align-self: center; padding: clamp(1.3rem,4.1vw,3.15rem);
  background: radial-gradient(ellipse at 0% 56%,#5130263d,transparent 75%);
}
.terrain-caption h3 { font-family: var(--display); color: #ffd695; font-size: clamp(1.65rem,3.2vw,2.65rem); }
.terrain-caption p { color: #e7c9aa; margin-top: .95rem; }
.noscript { margin-top: 1rem; color: var(--muted); }

.screens { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(.75rem,2.25vw,1.6rem); }
.screen-open {
  display: block; width: 100%; padding: .35rem; border: 1px solid #99724e;
  background: #33221d; border-radius: .46rem; cursor: zoom-in;
  box-shadow: 0 7px 17px #58391b35; transition: transform 180ms, box-shadow 180ms;
}
.screen-open:hover { transform: translateY(-4px); box-shadow: 0 12px 22px #58391b57; }
.screen-open img { width: 100%; aspect-ratio: 7/12; object-fit: contain; border-radius: .25rem; }
.screens figcaption { margin-top: .8rem; color: #492c22; font-weight: 750; text-align: center; }

.download {
  background: radial-gradient(ellipse at 96% 0%,#66392c,transparent 67%), #33201f;
  border-top: 1px solid #a3724f; padding-block: clamp(2.8rem,5vw,4.5rem);
}
.download-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.65rem; }
.download p { margin-top: .62rem; color: #e5c9ac; }
.footer { border-top: 1px solid #604333; color: #d4b89c; }
.footer-inner {
  display: flex; min-height: 5rem; align-items: center; justify-content: space-between;
  gap: .85rem; font-size: .91rem; padding-block: 1.15rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; }

.screen-dialog {
  width: min(calc(100% - 1.5rem), 36rem); max-height: calc(100dvh - 1.5rem);
  color: var(--text); background: #241719; border: 1px solid #a4714d; padding: .85rem 1rem;
  border-radius: .5rem;
}
.screen-dialog::backdrop { background: #10090de8; }
.dialog-head, .dialog-nav { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.dialog-head h2 { font-size: 1.26rem; }
.dialog-head button, .dialog-nav button { min-height: 2.75rem; padding: .46rem .9rem; }
.dialog-image { max-width: 100%; max-height: min(67dvh, 74rem); width: auto; object-fit: contain; margin: .65rem auto; }
body:has(dialog[open]) { overflow: hidden; }

@media (max-width: 850px) {
  .masthead-inner { gap: 1rem; }
  .hero h1 { font-size: clamp(3.55rem, 9.2vw, 5.15rem); }
  .hero-content { padding-block: 4.4rem; }
  .hero-art { left: 30%; }
  .terrain-panel { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); }
  .mechanics article { padding-inline: 1rem; }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 4.7rem; }
  .wrap { width: min(100% - 2rem, 74rem); }
  .masthead-inner { min-height: 4rem; justify-content: space-between; gap: .65rem; }
  .brand { gap: .56rem; }
  .brand img { width: 37px; height: 37px; }
  .brand span { font-size: 1rem; }
  .nav { display: none; }
  .masthead .button { min-height: 2.75rem; padding: .43rem .78rem; font-size: .875rem; }
  .hero { min-height: auto; align-items: end; }
  .hero-art { inset: 0 0 auto; height: clamp(17rem, 81vw, 28rem); }
  .hero-art img { object-position: 50% 52%; }
  .hero::after {
    background: linear-gradient(0deg,#27181b 0%,#27181b 36%,#27181b95 55%,#27181b00 79%);
  }
  .hero-content { padding-block: clamp(12.25rem, 61vw, 21.1rem) 2.55rem; }
  .hero-genre { margin-bottom: .55rem; font-size: .875rem; }
  .hero h1 { font-size: clamp(3rem, 13vw, 5rem); }
  .hero-subtitle { margin-top: .56rem; font-size: 1.3rem; }
  .hero-copy { margin-top: .88rem; line-height: 1.72; }
  .hero-actions { gap: .94rem; margin-top: 1.22rem; }
  .button-primary { min-height: 3.25rem; padding-inline: 1rem; }
  .text-link { font-size: .875rem; }
  .platform { margin-top: .9rem; }
  .section-heading { margin-bottom: 1.35rem; }
  .mechanics { grid-template-columns: 1fr; }
  .mechanics article { padding: 1.15rem 0; }
  .mechanics article + article { border-left: 0; border-top: 1px solid #c0a17a; }
  .mechanics p { max-width: none; }
  .terrain-panel { display: block; }
  .terrain-panel img { height: auto; }
  .terrain-caption { padding: 1.2rem; }
  .terrain-caption p { margin-top: .55rem; }
  .terrain-tab { font-size: .89rem; }
  .screens { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 1.4rem; }
  .download-inner { flex-direction: column; align-items: flex-start; }
  .footer { padding-bottom: env(safe-area-inset-bottom,0px); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
