/* 纯手写 CSS，不依赖 Tailwind/Bootstrap。
   文件放在 public/ 下，Astro 原样复制，路径稳定、CSP 只需 style-src 'self'。 */

/* 明色系配色（参考 Mottle Game 推荐布局图）：白底 + 浅米白 + 墨绿 + 萤火黄绿 */
:root {
  --bg: #FCFCFC;
  --surface: #F2F3E9;
  --panel: #E8EBDD;
  --ink: #1B3B30;
  --muted: #4E6459;
  --faint: #6B7F73;
  --line: rgba(27, 59, 48, .12);
  --mint: #1B3B30;
  --warm: #C5E96C;
  --coral: #C5E96C;
  /* 导航栏专用：新品牌配色，与内容区变量隔离 */
  --nav-bg: #F5F6E9;
  --nav-dark: #173D30;
  --nav-secondary: #38634A;
  --lime: #C4ED65;
  --nav-decor: #E8F2D2;
  --nav-divider: #E1E8D8;
  /* 游戏卡片专用（深底浅字，独立于站点明色外壳） */
  --game-top: #10291F;
  --game-bg: #1B4433;
  --game-icon: #284B3B;
  --accent: #C5E96C;
  --game-ink: #EDF4E5;
  --game-muted: #C7D9C8;
  --radius: 16px;
  --space-4: 16px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 8px 14px; border-radius: 8px;
  background: var(--mint); color: var(--bg); font-size: 14px;
}
.skip-link:focus { top: 12px; }

.section-wrap, .footer-inner, .header-inner {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}
.section-wrap { padding-block: 72px; }

/* 首页顶部区：整屏深墨绿通栏（参照效果图），卡片居中落在绿底上，不再露出白色左右留白 */
.home-top {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 89px); min-height: calc(100svh - 89px);
  background: var(--game-top);
}
.home-top::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 52% 62% at 68% 60%, rgba(78, 140, 96, .17), transparent 72%),
    radial-gradient(ellipse 42% 56% at 14% 30%, rgba(45, 95, 68, .22), transparent 70%);
}
.home-top > .play-section {
  grid-row: 1;
  /* 导航与卡片间距 12px（比原 20px 更紧凑）；宽度按 89px sticky 导航栏反推，
     常量 215→230 让卡片略缩，底部完整露出并留出约 10px 呼吸位。
     宽度交由 .play-section 基础规则统一控制：calc(100% - 48px) + max-width min(1450px, 高度反推)，
     横向贴近红框宽度且首屏完整；真实截图按比例等比缩放，棋盘/HUD 不变形。 */
  padding-top: 12px;
  padding-bottom: 10px;
}
/* 首页 H1 文本 Mottle Game 保留在 DOM（组件内 .sr-only），视觉主体改为 5×5 斑驳棋盘 */
.eyebrow {
  margin: 0 0 14px;
  color: var(--mint);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-head { margin-bottom: 32px; }
.section-head h1, .section-head h2, .closing h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.section-lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
/* 视觉隐藏但保留给屏幕阅读器与搜索引擎：首页唯一 H1 主词仍可被索引 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 48px; padding: 0 24px; border: 1px solid transparent;
  border-radius: 12px; background: var(--accent); color: #1B3B30;
  font-size: 15px; font-weight: 700; line-height: 1;
  transition: transform .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); background: #B4DC57; }
.button:disabled { opacity: .55; cursor: progress; transform: none; }
.button-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.button-ghost:hover { background: var(--panel); }
.button-small { height: 40px; padding: 0 16px; font-size: 13px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  /* 淡奶油绿底 + 两侧极淡有机形状；用背景绘制，不拦截点击、不额外产生 DOM */
  background:
    radial-gradient(circle at 1% 135%, var(--nav-decor) 0 78px, transparent 80px),
    radial-gradient(circle at 99% -45%, var(--nav-decor) 0 96px, transparent 98px),
    var(--nav-bg);
  border-bottom: 1px solid var(--nav-divider);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 88px;
  /* 宽度继续走共享规则，与游戏窗口/介绍区严格齐平；两侧等分让中间导航真正居中 */
}
.brand { display: inline-flex; align-items: center; flex: 1 1 0; min-width: 0; }
.brand-logo { display: block; width: auto; height: 64px; }
/* 居中导航：两侧 flex 等分，中列不伸缩 */
.site-nav {
  display: flex; flex: 0 0 auto; align-items: center; gap: 40px;
}
.site-nav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 4px; color: var(--nav-dark);
  font-size: 18px; font-weight: 700; transition: color .2s ease;
}
.site-nav a::after {
  content: ''; position: absolute; left: 4px; right: 4px; bottom: -6px;
  height: 5px; border-radius: 999px; background: var(--lime);
  opacity: 0; transform: scaleX(.6);
  transition: opacity .2s ease, transform .2s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--nav-secondary); }
.site-nav a:hover::after, .site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }
.header-actions {
  display: flex; flex: 1 1 0; justify-content: flex-end; align-items: center;
  gap: 12px; min-width: 0;
}
/* 主 CTA：柠檬绿胶囊 + 深墨绿字，保留原有 data-start-game 行为 */
.header-cta {
  height: 68px; padding-inline: 32px;
  background: var(--lime); color: var(--nav-dark); border-color: var(--lime);
  border-radius: 999px; font-size: 20px; font-weight: 800; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease;
}
.header-cta:hover {
  background: #B4DC57; color: var(--nav-dark); border-color: #B4DC57;
  transform: none;
}
.menu-button {
  display: none; width: 38px; height: 38px; padding: 9px;
  border: 1px solid var(--nav-divider); border-radius: 10px;
  background: transparent; color: var(--nav-dark);
}
.menu-button span { display: block; height: 2px; background: currentColor; margin: 4px 0; border-radius: 2px; }

/* ---------- 共享外框宽度：游戏窗口 / 导航栏 / 介绍区严格齐平 ----------
   三者共用同一组 width + max-width，杜绝各算一套导致的左右错位。
   宽度 = 视口宽 - 48px；上限 1450px；并受视口高度反推约束，保证游戏卡片底不超出首屏。 */
.play-section, .header-inner, .intro-frame {
  width: calc(100% - 48px);
  max-width: min(1450px, calc((100vh - 230px) * 1920 / 1125));
  max-width: min(1450px, calc((100svh - 230px) * 1920 / 1125));
  margin-inline: auto;
}

/* ---------- game player ---------- */
.play-section {
  padding-block: 32px 20px;
  /* sticky header 高 88px：锚点跳转时预留该高度，落点回到 scrollY=0，与进主页时窗口位置一致 */
  scroll-margin-top: 88px;
}
/* shell 只做状态/全屏容器，不再自带卡片边框；卡片视觉边界下移到 .game-card（只包游戏区） */
/* ---------- game player：单栏居中大卡片（参考图） ---------- */
.game-shell { position: relative; }
/* 独立播放器卡片：2px 实色边框 + 20px 圆角 + 低强度柔和阴影，圆角由 overflow 统一裁切 */
.game-card {
  border-radius: 20px; overflow: hidden; min-width: 0;
  background: #102B21; border: 2px solid #52735F;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .38), 0 3px 10px rgba(0, 0, 0, .22);
}
/* 导航栏 Play 点击反馈：边框柠檬绿脉冲 + 淡光晕，1s 后自动复原。
   游戏已加载时点击也必须给回应，否则用户会误以为按钮失灵。 */
@keyframes card-spotlight {
  0%, 100% {
    border-color: #52735F;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .38), 0 3px 10px rgba(0, 0, 0, .22);
  }
  35%, 65% {
    border-color: var(--warm);
    box-shadow: 0 0 0 5px rgba(197, 233, 108, .38),
                0 12px 30px rgba(0, 0, 0, .38), 0 3px 10px rgba(0, 0, 0, .22);
  }
}
.game-card.is-spotlight { animation: card-spotlight 1s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .game-card.is-spotlight {
    animation: none;
    border-color: var(--warm);
    box-shadow: 0 0 0 4px rgba(197, 233, 108, .38), 0 12px 30px rgba(0, 0, 0, .38);
  }
}
/* 顶部控制区：独立深绿条 66px，圆点 + 游戏名，右侧胶囊全屏按钮 */
.card-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 66px; padding: 0 24px;
  background: #193A2C; color: #F0F5EC;
  border-bottom: 1px solid #52735F;
}
.card-topbar-title { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: #F0F5EC; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #75DCA5; }
.card-topbar-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 6px 14px;
  border: 1px solid #52735F; border-radius: 10px;
  background: #244A39; color: #F0F5EC; font-size: 13px;
  transition: background .18s ease;
}
.card-topbar-action:hover { background: #2E5A46; }
/* 主舞台：按真实截图比例（1920×1125）铺满，截图 contain 完整展示棋盘不被底栏遮挡 */
.game-window {
  position: relative; aspect-ratio: 1920 / 1125;
  background: #071B13; overflow: hidden;
  --ink: #EDF4E5; --muted: #C7D9C8; --faint: #C7D9C8; --mint: #C5E96C;
  color: var(--game-ink);
}
.game-iframe {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; border: 0; background: #071B13;
}
.game-stage { position: absolute; inset: 0; overflow: hidden; }
.poster-still { position: absolute; inset: 0; overflow: hidden; background: #071B13; }
/* 真实游戏截图：contain 保证棋盘、HUD、萤火虫与视野锥完整可见，不裁切 */
.game-cover {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: contain;
}
.poster-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 76% 76% at 50% 52%, rgba(6, 20, 14, .06) 0%, rgba(6, 20, 14, .20) 100%);
}
/* 中央悬浮内容：黄绿胶囊按钮 + 一句说明，垂直居中于棋盘之上；父层不吃指针，按钮自身可点 */
.stage-center {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; text-align: center; pointer-events: none;
}
.stage-center .button { pointer-events: auto; height: 58px; padding: 0 36px; border-radius: 999px; font-size: 22px; }
/* 点击后封面与悬浮按钮整层让位给 iframe，避免按钮压在游戏画面上 */
.game-shell.is-playing .stage-center { display: none; }
.play-tri { font-size: 15px; }
.board-note {
  margin: 0; color: #EDF4E5; font-size: 18px; line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

/* 底部控制区：独立深绿条 46px，与顶栏同色，顶部 1px 分隔线 */
.card-bottombar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 46px; padding: 0 24px;
  background: #193A2C; color: #C7D9C8; font-size: 15px;
  border-top: 1px solid #52735F;
}
.card-bottombar a { color: #C7D9C8; }
.card-bottombar a:hover { color: #F0F5EC; text-decoration: underline; text-underline-offset: 3px; }
/* 隐藏的工具按钮容器：不占空间，仅承载 player.js 的逻辑钩子 */
.game-tools { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.game-feedback {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: rgba(16, 41, 31, .94); color: var(--game-muted); font-size: 14px;
  text-align: center; padding: 20px;
}
.game-spinner {
  width: 26px; height: 26px; border: 2px solid rgba(255, 255, 255, .15);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 手机展开播放：卡片全屏，舞台占满，中央静止内容隐藏 */
.game-shell.is-expanded {
  position: fixed; inset: 0; z-index: 120; border: 0; border-radius: 0;
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
}
.game-shell.is-expanded .game-card { flex: 1; display: flex; flex-direction: column; min-height: 0; border: 0; border-radius: 0; }
.game-shell.is-expanded .game-window { flex: 1; aspect-ratio: auto; height: 100%; }
.game-shell.is-expanded .stage-center { display: none; }
body.game-expanded { overflow: hidden; }
/* ---------- intro（游戏窗口下方的 H1 介绍区：55/45 双栏 + 竖线分隔） ----------
   宽度走「共享外框宽度」规则（.intro-frame），与游戏窗口 / 导航栏严格齐平。 */
.intro-section {
  background: #FFFFFF;              /* 纯白，不染绿/米黄 */
  border-top: 1px solid var(--line);
  padding-block: 72px 80px;
}
.intro-frame {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 0;
  align-items: center;                  /* 左右两栏整块垂直居中，左栏位于行高中间 */
}
/* 左栏：H1 + 副标题 + 正文，整体左对齐 */
.intro-copy { padding-right: 56px; }
.intro-title {
  margin: 0 0 18px;
  color: #173F2E;                   /* 深森林绿 */
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.025em;
  max-width: 12ch;                  /* 自然换成两行 */
}
.intro-subtitle {
  margin: 0 0 20px;
  color: #2E7D4F;                   /* 绿色，明显小于 H1 但仍有层次 */
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  line-height: 1.45;
}
.intro-body {
  margin: 0;
  color: #4E6459;                   /* 深灰绿 */
  font-size: 16px;
  line-height: 1.75;
  max-width: 46ch;                  /* 避免一行过长 */
}
/* 右栏：How to Play 小标题 + 三步纵向列表，整体左侧细浅灰绿竖线分隔 */
.intro-aside {
  padding-left: 56px;
  border-left: 1px solid #D9E4DA;   /* 细浅灰绿分隔线，标题与三步同在右侧 */
}
.steps-heading {
  margin: 0 0 16px;
  color: #173F2E;                   /* 深森林绿 */
  font-size: 20px; font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.steps-guide-link {
  display: inline-block;
  margin-top: 20px;
  color: #2E7D4F;                   /* 与副标题同绿，纯文字链接无外框 */
  font-size: 14px; font-weight: 700; line-height: 1.5;
  text-decoration: none;
}
.steps-guide-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.intro-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.intro-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 0;
}
.intro-step:first-child { padding-top: 0; }
.intro-step:last-child { padding-bottom: 0; }
.intro-step + .intro-step { border-top: 1px solid #E4EBE3; } /* 步骤间细线，无厚重卡片 */
.step-number {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #DFF0C8;              /* 浅绿圆形编号 */
  color: #1B5E3A;                   /* 深绿数字 */
  font-size: 14px; font-weight: 700;
  letter-spacing: .02em;
}
.step-text { min-width: 0; }
.step-title {
  margin: 1px 0 4px;
  color: #173F2E;                   /* 深森林绿 */
  font-size: 18px; font-weight: 700;
  line-height: 1.3;
}
.step-desc {
  margin: 0;
  color: #4E6459;                   /* 灰绿 */
  font-size: 14px;
  line-height: 1.6;
}

.questions { border-top: 1px solid var(--line); }
.question-block { padding: 28px 0; border-bottom: 1px solid var(--line); }
.question-block h2 { margin: 0 0 10px; font-size: clamp(20px, 2.4vw, 27px); font-weight: 600; }
.question-block p { margin: 0 0 12px; color: var(--muted); max-width: 780px; }
.inline-link { color: var(--mint); font-size: 14px; }
.inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.article-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.article-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); transition: border-color .2s ease, transform .2s ease;
}
/* 只有整卡是链接（<a class="article-card">）时才对整卡 hover 作出反应；
   拆分卡（<article>，如 What is Mottle?）本身不可点，鼠标移入不变化，仅标题链接自身有下划线反馈。 */
a.article-card:hover { border-color: var(--mint); transform: translateY(-3px); }
.article-card h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.45; }
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.card-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; flex: 1; align-content: start; }
.card-points li { position: relative; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.card-points li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
}
.card-link { color: var(--mint); font-size: 13px; font-weight: 700; text-decoration: none; }
a.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.faq-list { display: grid; gap: 10px; margin-bottom: 20px; }
.faq-item {
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); transition: border-color .2s ease;
}
.faq-item:hover { border-color: var(--mint); }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq-item p { margin: 12px 0 2px; color: var(--muted); font-size: 14px; }
.faq-more { margin: 18px 0 0; }
.faq-more a { color: var(--mint); font-size: 14px; font-weight: 600; }
.faq-more a:hover { text-decoration: underline; }

/* 收尾 CTA：单列居中，顺序为 eyebrow → 标题 → 一行正文 → 主按钮 */
.closing {
  display: flex;
  justify-content: center;
  text-align: center;
  border-top: 1px solid var(--line);
}
.closing-lead {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closing-lead .eyebrow { margin: 0 0 12px; }
.closing h2 { font-size: clamp(28px, 3vw, 32px); line-height: 1.25; }
.closing-copy {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.closing-lead .button {
  margin-top: 28px; height: 52px; padding: 0 46px;
  border-radius: 10px; font-size: 16px;
}

/* ---------- article page ---------- */
.article-page { padding-top: 40px; }
/* sticky header 88px / 窄屏约 72px：锚点落点预留 header + 20px 呼吸位，
   点击 On this page 后章节标题不会被导航栏压住 */
.article-page [id] { scroll-margin-top: 108px; }
.breadcrumb { display: flex; gap: 8px; color: var(--faint); font-size: 13px; }
.breadcrumb a { color: var(--mint); }
.article-head { max-width: 800px; padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.article-head h1 { margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; line-height: 1.25; }
.article-lead { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.article-meta { margin: 0; color: var(--faint); font-size: 12px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-top: 36px; }
.answer-box {
  margin: 0 0 36px; padding: 22px 24px;
  border: 1px solid var(--line); border-left: 3px solid var(--mint);
  border-radius: var(--radius); background: var(--surface);
}
.answer-box-label { display: block; margin-bottom: 10px; color: var(--mint); font-size: 12px; letter-spacing: .08em; }
.answer-box p { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.7; }
.answer-box strong { font-weight: 600; }
.article-section { margin-bottom: 40px; }
.article-section h2 { margin: 0 0 14px; font-size: 24px; font-weight: 600; }
.article-section p { margin: 0 0 14px; color: var(--muted); }
.article-section ul { margin: 0; padding-left: 20px; color: var(--muted); }
.article-section li { margin-bottom: 8px; }
/* 逐字稿页面（About / Privacy）：富文本导语与正文里的链接、斜体日期行 */
.article-lead-rich p { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.article-lead-rich p:last-child { margin-bottom: 0; }
.article-lead-rich em { color: var(--faint); font-size: 13px; }
.rich-body a, .article-lead-rich a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.rich-body a:hover, .article-lead-rich a:hover { color: var(--ink); }
.article-aside {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  position: sticky; top: 24px; align-self: start;
}
.toc {
  width: 280px; max-width: 100%; padding: 18px 16px;
  border: 1px solid rgba(27, 59, 48, .08);
  border-radius: 14px; background: var(--panel);
}
.toc-title { margin: 0 0 12px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.4; }
.toc a {
  display: block; padding: 10px 12px; color: var(--muted); font-size: 15px;
  line-height: 1.45; border-radius: 7px;
  transition: color .18s ease, background-color .18s ease;
}
.toc a:not(:last-child) { border-bottom: 1px solid var(--line); }
.toc a:hover { color: var(--ink); background: rgba(197, 233, 108, .16); }
.toc a[aria-current="location"] {
  color: var(--ink); font-weight: 600;
  background: rgba(197, 233, 108, .32);
}
/* ---------- article rich blocks (table / steps / H3 / inline links) ---------- */
.sub-block { margin-top: 24px; padding-left: 16px; border-left: 2px solid var(--line); }
.article-section h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.sub-block + .sub-block { margin-top: 20px; }
.explain-table { margin: 20px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.explain-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.explain-table th, .explain-table td {
  padding: 11px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.explain-table thead th {
  background: rgba(126, 224, 176, .07); color: var(--mint);
  font-size: 12px; letter-spacing: .06em;
}
.explain-table tbody tr:last-child th, .explain-table tbody tr:last-child td { border-bottom: 0; }
.explain-table tbody td:first-child { font-weight: 600; white-space: nowrap; }
.step-list { margin: 20px 0 0; padding-left: 22px; color: var(--muted); line-height: 1.85; }
.step-list li { margin-bottom: 12px; padding-left: 6px; }
.article-section p.inline-links {
  display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 20px 0 0;
}
.inline-links a { color: var(--mint); font-size: 14px; border-bottom: 1px solid transparent; }
.inline-links a:hover { border-bottom-color: var(--mint); }
.article-section p.link-sentence { display: block; }
.article-section p.link-sentence + p.link-sentence { margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { padding-block: 48px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-logo { height: 58px; }
/* 列标题用 <p> 而非 <h2>：页脚全站出现，不往标题大纲里塞无关 H2 */
.footer-label {
  display: block; margin: 0 0 14px; color: var(--muted);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.footer-slogan { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 420px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-col a { display: block; padding: 6px 0; color: var(--muted); font-size: 15px; }
.footer-col a:hover { color: var(--ink); }
/* 第二行：桌面严格单行不换行；窄屏（≤1000px）自动折行避免横向溢出 */
.footer-legal {
  margin: 36px 0 0; color: var(--faint); font-size: 12px; line-height: 1.6;
  white-space: nowrap;
}
.ai-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 24px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.ai-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.ai-copy .footer-label { margin-bottom: 6px; }
.ai-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.ai-links a { color: var(--mint); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.footer-source {
  margin-top: 8px;
  color: var(--nav-dark); font-size: 14px; font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
}
.footer-source:hover { color: var(--ink); }
@media (max-width: 1000px) {
  .footer-legal { white-space: normal; }
}

.article-body { min-width: 0; }
.faq-section, .guides-section { border-top: 1px solid var(--line); }
.game-shell.is-loading .game-window { cursor: progress; }

/* ---------- reveal ---------- */
.will-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.will-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
/* 首屏卡片为单栏全宽；桌面放大标题，窄屏收紧以适配 16:9 舞台 */
@media (min-width: 1024px) {
  .play-section { padding-block: 48px 24px; }
}

/* 平板：导航仍一行，收紧品牌字号、链接间距与 CTA 尺寸 */
@media (min-width: 761px) and (max-width: 1199px) {
  .brand-logo { height: 56px; }
  .site-nav { gap: 28px; }
  .site-nav a { font-size: 17px; }
  .header-cta { height: 64px; padding-inline: 26px; font-size: 18px; }
}

@media (max-width: 1000px) {
  .article-cards { grid-template-columns: repeat(2, 1fr); }
  /* 平板：介绍区保持双栏，收紧字号与栏间距，防止文字相互挤压 */
  .intro-section { padding-block: 52px 56px; }
  .intro-copy { padding-right: 32px; }
  .intro-aside { padding-left: 32px; }
  .intro-title { font-size: clamp(28px, 4vw, 38px); }
  .intro-body { font-size: 15px; }
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .article-aside { order: -1; position: static; }
  .toc { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: none; padding: 16px; }
  .toc-title { width: 100%; margin: 0 0 4px; }
  .toc a {
    width: auto; padding: 6px 12px; font-size: 13px; line-height: 1.3;
    border: 1px solid var(--line); border-radius: 999px;
  }
  .answer-box { margin-bottom: 28px; padding: 18px 18px; }
  .answer-box p { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .section-wrap { padding-block: 52px; }
  /* 手机端卡片较矮：绿底收到卡片下方，避免屏幕下半部留出大片空白 */
  .home-top { min-height: 0; padding-bottom: 20px; }
  .header-inner { min-height: 72px; gap: 12px; }
  .brand, .header-actions { flex: 0 0 auto; }
  .brand-logo { height: 48px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 18px; background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-divider);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 12px 0; border-bottom: 1px solid var(--nav-divider);
    font-size: 16px; color: var(--nav-dark);
  }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { color: var(--nav-secondary); }
  .menu-button { display: block; width: 36px; height: 36px; }
  .header-cta {
    display: inline-flex; height: 46px; padding-inline: 14px;
    font-size: 14px; font-weight: 800;
  }
  .article-cards { grid-template-columns: 1fr; }
  /* 收尾 CTA 窄屏沿用单列居中，仅收紧按钮间距 */
  .closing-lead .button { margin-top: 20px; }
  /* 手机：介绍文案在上、三步在下；三步仍纵向排列 */
  .intro-section { padding-block: 44px 48px; }
  .intro-frame { grid-template-columns: 1fr; gap: 36px; }
  .intro-copy { padding-right: 0; }
  .intro-title { font-size: clamp(30px, 7vw, 40px); max-width: none; }
  .intro-body { max-width: none; }
  .intro-aside { padding-left: 0; border-left: 0; border-top: 1px solid #D9E4DA; margin-top: 0; padding-top: 20px; }
  .steps-heading { margin-bottom: 16px; }
  .intro-step:first-child { padding-top: 18px; }
  .explain-table table { font-size: 13px; }
  .explain-table tbody td:first-child { white-space: normal; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  /* 手机端：真实截图按比例完整显示，仅收紧按钮与说明文字 */
  .stage-center { gap: 10px; }
  .stage-center .button { margin-top: 0; height: 40px; padding: 0 18px; font-size: 13px; }
  .board-note { font-size: 10px; }
  /* 手机端播放器：边框/圆角略收，控制条压到 56/42px，画面不变拥挤 */
  .game-card { border-width: 1.5px; border-radius: 16px; }
  .card-topbar { min-height: 56px; padding: 0 16px; }
  .card-topbar-title { font-size: 15px; }
  .status-dot { width: 9px; height: 9px; }
  .card-bottombar { min-height: 42px; padding: 0 16px; font-size: 14px; }
  .card-bottombar a { font-size: 14px; }
}

@media (max-width: 390px) {
  .section-wrap, .play-section, .footer-inner, .header-inner, .intro-frame { width: min(100% - 32px, var(--wrap)); }
  .brand-logo { height: 44px; }
  .header-cta { padding-inline: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .will-reveal { opacity: 1; transform: none; }
}
