:root {
  color-scheme: dark;
  --gold: #efae35;
  --gold-light: #ffd36a;
  --text: #e8c48b;
  --muted: #b39367;
  --border: #8c4925;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(ellipse at 50% 0, rgba(117, 49, 24, .44), transparent 33rem),
    repeating-linear-gradient(45deg, transparent 0 2px, rgba(255, 180, 79, .022) 2px 3px, transparent 3px 8px),
    linear-gradient(180deg, #241409 0%, #120b07 51%, #1a0f08 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .27;
  background-image: radial-gradient(#9e6334 0.55px, transparent 0.8px);
  background-size: 5px 5px;
}

.hero {
  position: relative;
  min-height: 241px;
  border-bottom: 1px solid rgba(214, 129, 55, .18);
  background: linear-gradient(90deg, rgba(144, 52, 24, .16), transparent 34%, transparent 66%, rgba(144, 52, 24, .16));
}

.hero-inner {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 1180px);
  margin: auto;
  padding-top: 42px;
  overflow: hidden;
}

.mountains {
  position: absolute;
  top: -8px;
  width: min(740px, 90%);
  height: 190px;
  filter: drop-shadow(0 2px 0 #071833) drop-shadow(0 0 5px rgba(54, 113, 245, .55));
}

h1 {
  position: relative;
  z-index: 1;
  margin: 29px 0 0;
  color: #ffce61;
  font-family: Georgia, "Microsoft YaHei", serif;
  font-size: clamp(3.35rem, 8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.24;
  -webkit-text-stroke: 1px #60300e;
  text-shadow: 0 3px 0 #f29013, 0 6px 0 #994409, 2px 9px 0 #3a1809, 0 0 18px rgba(255, 179, 33, .35);
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  margin: 32px 0 0;
  color: #c69b61;
  font-size: .86rem;
  letter-spacing: .38em;
  text-align: center;
}

.hero-subtitle span { margin: 0 .9em; color: #805634; }

.content { width: min(1125px, calc(100% - 38px)); margin: 0 auto; }

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  height: 80px;
  font-size: .94rem;
}

.main-nav a, .main-nav span { position: relative; padding: 14px 0; color: #b49871; text-decoration: none; }
.main-nav a { color: var(--gold); font-weight: 700; }
.main-nav a::after { content: ""; position: absolute; bottom: 6px; left: 0; right: 0; height: 2px; background: #ac512c; }
.main-nav span { cursor: not-allowed; opacity: .72; }

.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.platform-card {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  padding: 24px 25px 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 177, 69, .09), 0 12px 28px rgba(0, 0, 0, .2);
  background: linear-gradient(150deg, rgba(84, 39, 21, .64), rgba(34, 22, 14, .94) 39%, rgba(33, 21, 13, .96));
}

.platform-card-featured { background: linear-gradient(150deg, rgba(101, 50, 24, .74), rgba(39, 24, 13, .95) 39%, rgba(33, 21, 13, .96)); }

.card-heading { display: flex; align-items: center; gap: 14px; min-height: 39px; }
.card-heading svg { width: 28px; height: 28px; flex: 0 0 28px; fill: none; stroke: #ac804a; stroke-width: 2.1; }
.card-heading h2 { white-space: nowrap; margin: 0; color: var(--gold); font-size: 1.27rem; font-weight: 750; letter-spacing: .05em; }
.card-heading small { font-size: .73em; font-weight: 600; }
.heading-rule { height: 1px; flex: 1; margin-left: 10px; background: linear-gradient(90deg, #8d4728, transparent); }

.platform-card > p { margin: 16px 0 0; color: #e0bf8a; font-size: .87rem; line-height: 1.8; }
.card-bottom { margin-top: auto; }
.version { min-height: 25px; margin: 0 0 15px; color: #c89951; font-size: .85rem; white-space: nowrap; }
.version strong { color: var(--gold); font-weight: 700; }
.version-divider { padding: 0 .45em; color: #775035; }
.package-updated { margin: -4px 0 12px; color: var(--text); font-size: .85rem; line-height: 1.5; }
.pc32-option { margin-top: 14px; padding-top: 18px; border-top: 1px solid rgba(214, 129, 55, .3); }
.pc32-option .version { white-space: normal; }
.pc32-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.7; }

.action {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border-radius: 7px;
  color: #2b1a0e;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
  transition: background-color .16s ease, transform .16s ease;
}

.action-gold { border: 1px solid #ffce67; background: linear-gradient(#f3b83c, #d99016); box-shadow: inset 0 1px rgba(255, 244, 186, .55), 0 4px 0 #79480f; }
.action-gold:hover { background: linear-gradient(#ffd064, #e7a126); transform: translateY(-1px); }
.action-gold:focus-visible, .main-nav a:focus-visible { outline: 3px solid #fff1a9; outline-offset: 3px; }
.action-muted { cursor: not-allowed; border: 1px solid #8e4b34; color: #d9ad93; background: linear-gradient(#9a4930, #71301f); }

.qr-row { display: flex; align-items: center; gap: 15px; margin-top: 16px; }
.qr-placeholder { display: grid; place-items: center; width: 136px; height: 136px; flex: 0 0 136px; padding: 4px; border: 6px solid #fff; border-radius: 5px; background: #fff; color: #4a3520; text-align: center; line-height: 1.45; font-size: .89rem; font-weight: 700; }
.qr-placeholder svg { display: block; width: 100%; height: 100%; }
.qr-row p { margin: 0; color: #d8b87c; font-size: .82rem; line-height: 1.6; }
.qr-row small { color: #b79a6d; }
.download-message { min-height: 1.1rem; margin: 10px 0 0; color: var(--gold-light); font-size: .78rem; }

.download-notes { margin: 26px 0 36px; border-left: 3px solid #a9472c; padding: 2px 0 2px 18px; color: #d1ad7c; font-size: .83rem; line-height: 1.6; }
.download-notes p { margin: 4px 0; }
.download-notes strong { color: var(--gold); }

@media (max-width: 930px) {
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-card:last-child { grid-column: 1 / -1; min-height: 275px; }
  .platform-card { min-height: 390px; }
}

@media (max-width: 620px) {
  .hero { min-height: 195px; }
  .hero-inner { padding-top: 28px; }
  .mountains { top: 0; height: 125px; }
  h1 { margin-top: 28px; font-size: clamp(2.7rem, 11vw, 4rem); letter-spacing: .08em; }
  .hero-subtitle { margin-top: 25px; font-size: .7rem; letter-spacing: .18em; }
  .main-nav { height: 66px; gap: 20px; }
  .platforms { grid-template-columns: 1fr; gap: 15px; }
  .platform-card, .platform-card:last-child { grid-column: auto; min-height: 305px; padding: 20px; }
  .platform-card-featured { min-height: 390px; }
  .version { white-space: normal; }
  .download-notes { font-size: .78rem; }
}

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