:root {
  --bg: #110e0c;
  --bg-2: #1b1613;
  --card: #241c18;
  --card-2: #2c221c;
  --line: rgba(240, 194, 140, 0.2);
  --text: #f8f3ee;
  --muted: #d2c0b2;
  --pink: #ff4d78;
  --orange: #ff8a3d;
  --gold: #f0c27b;
  --green: #1c4634;
  --green-2: #2f6b4f;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --header-h: 64px;
  --radius: 16px;
  --max: 1120px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; }
html.has-site-ads { scroll-padding-top: 12.5rem; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 120, 70, 0.16), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(180, 70, 255, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.85;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #ffd0a8; }
a:hover { color: #fff; }
p { margin: 0 0 0.9rem; }
h1, h2, h3 { line-height: 1.35; font-weight: 750; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.7rem, 2.4vw, 2.35rem); margin: 0 0 0.7rem; }
h2 { font-size: clamp(1.28rem, 1.7vw, 1.65rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.08rem; margin: 0 0 0.45rem; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: #111;
  padding: 6px 10px;
  z-index: 80;
}
.skip:focus { top: 8px; }

.top-stack {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 28, 24, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(240, 194, 123, 0.16);
}
.header {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}
.brand img { width: 42px; height: 42px; object-fit: contain; background: #234c38; border-radius: 10px; }
.brand strong { display: block; font-size: 1rem; letter-spacing: 0.04em; }
.brand small { display: block; color: var(--gold); font-size: 12px; line-height: 1.2; }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  font: inherit;
}
.menu { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; position: relative; z-index: 3; }
.menu a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
}
.menu a[aria-current="page"], .menu a:hover { background: rgba(255, 138, 61, 0.18); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 8px 16px 10px; }

.site-ads-host {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(12, 10, 9, 0.72);
  padding: 4px 10px 8px;
}
.site-ads-host[hidden] { display: none !important; }
.site-ads-host #applist { max-width: var(--max); margin: 0 auto; }
.site-ads-host .applist-title {
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 2px 0 0;
}
.site-ads-host #ads {
  margin: 6px 0 0;
  gap: 4px 2px;
}
.site-ads-host #ads .caption,
.site-ads-host #ads figcaption {
  color: #d7c4b4;
}
.site-ads-host figure { margin: 0; }

.hero { background: #1a120e; }
.hero img { width: 100%; max-height: 420px; object-fit: cover; object-position: center 28%; min-height: 180px; }
.hero-copy { padding: 18px 16px 6px; }
.hero-copy .inner { max-width: var(--max); margin: 0 auto; }
.eyebrow { color: var(--gold); font-size: 0.86rem; margin-bottom: 0.35rem; letter-spacing: 0.08em; }
.lead { font-size: 1.02rem; max-width: 68ch; color: #f3e7dc; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: #1a0d0a;
  background: linear-gradient(120deg, #ffb347, #ff4d6d 55%, #d06bff);
  font-weight: 750;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.wrap { padding-top: 22px; padding-bottom: 28px; }
.notice, .panel, .split, .faq, .toc {
  background: rgba(36, 28, 24, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 14px 16px; margin-bottom: 16px; }
.notice { padding: 12px 14px; color: var(--muted); margin-bottom: 16px; }
dt { font-weight: 750; color: var(--gold); margin-top: 0.55rem; }
dd { margin: 0 0 0.35rem; }

.toc { padding: 14px 16px; margin-bottom: 18px; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.toc a { text-decoration: none; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 14px;
  padding: 14px;
  margin: 0 0 16px;
  align-items: start;
}
.split figure { margin: 0; min-width: 0; }
.split figcaption, .caption { color: var(--gold); font-size: 12px; line-height: 1.45; margin-top: 6px; }
.split img { width: 100%; border-radius: 12px; background: #0c0c0c; object-fit: contain; }
.stack { display: grid; gap: 8px; }
.copy { min-width: 0; }
.copy a { overflow-wrap: anywhere; }
.copy ul, .copy ol { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.copy li { margin: 0.2rem 0; }

.table-wrap { overflow-x: auto; margin: 0.4rem 0 0.9rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: rgba(47, 107, 79, 0.35); color: #fff; }

.faq details { border-top: 1px solid var(--line); padding: 8px 0; }
.faq { padding: 14px 16px; margin-bottom: 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.crumb { font-size: 0.92rem; color: var(--muted); margin: 0 0 14px; }
.crumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #8d7768; }

.page-hero { padding: 8px 0 12px; }
.page-hero h1 { margin-bottom: 8px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #0d1a14;
  color: #e7d7c8;
  padding: 26px 16px 34px;
}
.site-footer .wrap { padding: 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.site-footer a { color: #ffd7b0; text-decoration: none; }
.foot-links { display: grid; gap: 4px; }
.legal { color: #c8b3a3; font-size: 0.92rem; margin-top: 16px; }

.error-code { font-size: 3rem; margin: 0; background: linear-gradient(120deg, #ffb347, #ff4d6d, #c44bff); -webkit-background-clip: text; background-clip: text; color: transparent; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .menu {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% - 4px);
    flex-direction: column;
    align-items: stretch;
    background: #1a2822;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .header { position: relative; }
  .menu.is-open { display: flex; }
  .menu a { padding: 10px 12px; }
  .toc ol, .foot-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.32rem; }
  .hero img { max-height: 220px; min-height: 140px; }
  .wrap { padding-left: 10px; padding-right: 10px; }
  .split { gap: 8px; padding: 10px; }
  .site-ads-host { padding-left: 4px; padding-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
