:root {
  color-scheme: dark;
  --background: #0c0d10;
  --section: #13151a;
  --surface: #1a1c22;
  --text: #f5f3ef;
  --muted: #b4b3b6;
  --line: #ffffff1f;
  --orange: #ff7846;
  --gold: #ffbc5a;
  --gutter: clamp(1.125rem, 4vw, 3rem);
  --header-height: 4.25rem;
  --section-space: clamp(3.625rem, 7.3vw, 6.25rem);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.75;
  line-break: strict;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); background: var(--background); }
body, h1, h2, h3, p, ol { margin: 0; }
body { color: var(--text); }
h1, h2, h3 { line-height: 1.22; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { color: #17100b; background: var(--gold); }
.container { width: min(100% - 2 * var(--gutter), 70rem); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: #0c0d10f2;
  backdrop-filter: blur(16px);
}
.header-row { display: flex; align-items: center; gap: clamp(1.25rem, 4vw, 3rem); min-height: var(--header-height); }
.brand { display: inline-flex; flex: none; align-items: center; gap: .625rem; font-size: 1.125rem; font-weight: 770; white-space: nowrap; }
.brand img { flex: none; width: 34px; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); margin-left: auto; font-size: .94rem; color: #d1d0d3; white-space: nowrap; }
.site-nav a, .footer-nav a { transition: color .18s; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 780;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s;
}
.button-compact {
  flex: none;
  min-height: 36px;
  border: 1px solid #a97650;
  border-radius: 5px;
  padding: .35rem .875rem;
  color: #ffd1a5;
  font-size: .875rem;
}
.button-primary {
  min-width: 15.5rem;
  min-height: 3.5rem;
  padding: .875rem 1.75rem;
  border-radius: 6px;
  background: var(--orange);
  color: #1a100b;
  font-size: 1.05rem;
}

.hero {
  display: grid;
  min-height: clamp(31rem, 48vw, 40rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid #d2955f42;
  background: #201711;
}
.hero-image { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: 62% 54%; z-index: -2; }
.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, #0c0d10 0%, #0c0d1000 47%),
    linear-gradient(90deg, #0c0d10f5 0%, #0c0d10df 30%, #1e151284 62%, #1e151225 100%);
  content: "";
}
.hero-inner { display: grid; align-items: center; padding-block: clamp(4rem, 8vw, 7rem); }
.hero-copy { max-width: 45rem; }
.hero h1 { font-size: clamp(3.5rem, 8vw, 7.15rem); font-weight: 850; line-height: .98; letter-spacing: -.055em; }
.hero-lead { margin-top: 1.25rem; color: var(--gold); font-size: clamp(1.7rem, 4.4vw, 3.35rem); line-height: 1.2; font-weight: 790; }
.hero-description { max-width: 26rem; margin-top: 1.25rem; color: #e5ddd5; font-size: 1.06rem; }
.hero .button { margin-top: 1.75rem; }

.section { padding-block: var(--section-space); }
.section h2, .download h2 { font-size: clamp(1.95rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.015em; }
.section h2 { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section h3 { font-size: clamp(1.15rem, 2.25vw, 1.45rem); font-weight: 760; }
.section p { color: var(--muted); }
.section-description { margin-top: -.85rem; margin-bottom: 1.75rem; }

.screenshots { padding-top: clamp(2.875rem, 5.45vw, 4.75rem); }
.screenshot-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(22rem, 37%, 29rem);
  gap: clamp(.75rem, 1.75vw, 1.3rem);
  overflow-x: auto;
  margin-block: -.375rem -.5rem;
  padding: .375rem 0 .85rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #be824d #242126;
}
.screenshot-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.screenshot-row a {
  display: block;
  overflow: hidden;
  border: 1px solid #ffffff29;
  border-radius: 8px;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.screenshot-row a:focus-visible { outline-offset: -3px; }
.screenshot-row img { aspect-ratio: 800 / 363; object-fit: contain; background: #17191e; }

.modes, .inventory { border-block: 1px solid var(--line); background: var(--section); }
.mode-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(.875rem, 2.3vw, 1.75rem); }
.mode-main {
  display: grid;
  align-content: center;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid #ce884a57;
  border-radius: 10px;
  background: linear-gradient(155deg, #39291d, #211b1a 70%);
}
.mode-main h3 { color: var(--gold); font-size: clamp(1.6rem, 3.25vw, 2.25rem); }
.mode-main p { max-width: 26rem; margin-top: .75rem; color: #e4d7ca; }
.mode-main .map-note { margin-top: 1.15rem; border-top: 1px solid #ffd1a42b; padding-top: .95rem; font-size: .94rem; }
.map-note span { white-space: nowrap; }
.mode-list { display: grid; gap: .85rem; }
.mode-list article, .inventory-grid article {
  padding: clamp(1.25rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.mode-list p, .inventory-grid p { margin-top: .6rem; }

.room-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3.6vw, 2.9rem);
  padding: 0;
  list-style: none;
  counter-reset: room-step;
}
.room-steps li { border-top: 1px solid #9b664d; padding-top: 1.25rem; counter-increment: room-step; }
.room-steps li::before { display: block; margin-bottom: .65rem; color: var(--gold); font-size: 1.1rem; font-weight: 750; content: counter(room-step, decimal-leading-zero); }
.room-steps p { margin-top: .75rem; }
.menu-label { white-space: nowrap; }
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.875rem, 2.3vw, 1.75rem); }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.5rem;
  gap: .65rem;
  align-items: center;
  padding: 1.125rem .35rem;
  font-weight: 730;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { justify-self: center; color: var(--gold); font-size: 1.3rem; line-height: 1; font-weight: 500; content: "+"; }
.faq-list details[open] summary { color: var(--gold); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { max-width: 56rem; padding: 0 1.8rem 1.35rem .35rem; }

.download { border-block: 1px solid #a86e424f; background: linear-gradient(110deg, #211713, #38271e 72%, #231916); }
.download-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2.2rem, 4.25vw, 3.25rem); }
.download-title { display: flex; align-items: center; gap: 1.15rem; }
.download-title img { flex: none; width: clamp(2.6rem, 6vw, 3.75rem); border-radius: 6px; }
.download-title h2 { font-size: clamp(1.45rem, 3.75vw, 2.6rem); }
.footer-inner { display: grid; justify-items: center; gap: 1rem; padding-block: 2.65rem; text-align: center; }
.footer-inner .brand img { width: 29px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem; color: #d0cbd0; font-size: .9rem; }
.site-footer p { color: var(--muted); font-size: .85rem; }

@media (hover: hover) {
  .site-nav a:hover, .footer-nav a:hover, .faq-list summary:hover { color: var(--gold); }
  .button-compact:hover { color: var(--text); background: #2b1d17; border-color: var(--orange); }
  .button-primary:hover { background: #ff9c71; }
  .screenshot-row a:hover { border-color: #ffb47b; }
}

@media (max-width: 48rem) {
  :root { --header-height: 5.875rem; }
  .header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .75rem; }
  .header-row .brand { min-height: 3rem; }
  .header-row .button { grid-area: 1 / 2; }
  .site-nav { grid-column: 1 / -1; justify-content: space-between; gap: .65rem; margin: 0; border-top: 1px solid var(--line); padding: .55rem 0 .65rem; font-size: .875rem; }
  .hero { min-height: 0; }
  .hero-image { position: relative; height: auto; aspect-ratio: 16 / 8; object-position: center; }
  .hero::after { inset: 0 0 auto; height: clamp(8rem, 50vw, 24rem); background: linear-gradient(0deg, #141317, #0c0d1000 42%); }
  .hero { background: linear-gradient(180deg, #141317 65%, #0e0e11); }
  .hero-inner { padding-block: 1.3rem 2.8rem; }
  .hero h1 { font-size: clamp(2.6rem, 10.1vw, 5rem); }
  .hero-lead { margin-top: .65rem; font-size: clamp(1.55rem, 5.7vw, 2.5rem); }
  .hero-description { margin-top: .95rem; font-size: 1rem; }
  .hero .button { margin-top: 1.25rem; }
  .button-primary { width: 100%; min-width: 0; }
  .screenshot-row { grid-auto-columns: clamp(14.75rem, 82%, 29rem); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scroll-snap-type: x mandatory; }
  .mode-layout, .room-steps { grid-template-columns: minmax(0, 1fr); }
  .room-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: baseline; column-gap: .4rem; }
  .room-steps li::before { margin: 0; }
  .room-steps p { grid-column: 2; margin-top: .5rem; }
  .download-inner { flex-direction: column; align-items: stretch; }
  .download-title { justify-content: center; gap: .75rem; }
}

@media (max-width: 31rem) {
  .inventory-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { font-size: .825rem; }
  .footer-nav { gap: .35rem .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
