/* =========================================================
   儿童拼音闯关乐园 · 黑金高奢主题
   近黑底 + 细金线描边 + 微光泽渐变 + 衬线大字
   （按要求使用指定绿调色板作为「金」的替代强调）
   ========================================================= */

:root {
  --c-primary: #6dd161;
  --c-primary-2: #53c155;
  --c-accent: #66e1bf;
  --c-bg: #0f150e;
  --c-surface: #1b231a;
  --c-text: #eef2ee;
  --c-muted: #9bae98;
  --c-line: #324030;
  --c-warn: #e0b45a;
  --c-danger: #d97b6c;
  --r: 6px;
  --serif: 'Noto Serif SC', 'Songti SC', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --sheen: linear-gradient(180deg, rgba(102, 225, 191, .07), rgba(102, 225, 191, 0) 46%);
  --gold: rgba(102, 225, 191, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* 顶部细金线与氛围光 */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, #53c155 0%, #66e1bf 45%, #6dd161 100%);
  opacity: .85;
}
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; height: 54vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(56% 92% at 50% -12%, rgba(109, 209, 97, .12), transparent 70%),
    radial-gradient(40% 60% at 94% -4%, rgba(102, 225, 191, .07), transparent 70%);
}

.container { width: min(1080px, 92%); margin-inline: auto; position: relative; z-index: 2; }
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: .06em; }
button { font-family: inherit; }
a { color: var(--c-accent); }

/* ---------- 装饰框线（细金线四角） ---------- */
.page-frame { position: fixed; inset: 10px; z-index: 110; pointer-events: none; }
.pf { position: absolute; width: 26px; height: 26px; opacity: .7; }
.pf-tl { top: 0; left: 0; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.pf-tr { top: 0; right: 0; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.pf-bl { bottom: 0; left: 0; border-bottom: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.pf-br { bottom: 0; right: 0; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.5em;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: transparent; color: var(--c-text);
  font-weight: 600; font-size: .95rem; letter-spacing: .14em;
  cursor: pointer; text-decoration: none; line-height: 1;
  position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease, color .2s ease, background .2s ease;
}
.btn:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:focus-visible, .opt:focus-visible, .pick:focus-visible, .lvl-node:focus-visible, .step-chip:focus-visible {
  outline: 2px solid rgba(102, 225, 191, .6); outline-offset: 2px;
}
.btn-sm { padding: .5em 1em; font-size: .86rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary));
  border: none; color: #0f150e;
  box-shadow: 0 6px 18px rgba(109, 209, 97, .22);
}
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 46%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
}
.btn-primary:hover { color: #0f150e; border: none; box-shadow: 0 10px 26px rgba(109, 209, 97, .4); }
.btn-primary:hover::after { left: 130%; }
.btn-ghost { border-color: rgba(102, 225, 191, .5); color: var(--c-accent); }
.btn-ghost:hover { border-color: var(--c-accent); background: rgba(102, 225, 191, .06); color: var(--c-accent); }
.btn-danger { border-color: rgba(217, 123, 108, .5); color: var(--c-danger); }
.btn-danger:hover { border-color: var(--c-danger); background: rgba(217, 123, 108, .08); color: var(--c-danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ---------- 顶栏 ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 90;
  background: rgba(15, 21, 14, .85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.app-bar::after {
  content: ''; position: absolute; left: 0; bottom: -1px; width: 120px; height: 1px;
  background: linear-gradient(90deg, #6dd161, transparent);
}
.app-bar-inner {
  width: min(1080px, 92%); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: .65em;
  background: none; border: none; cursor: pointer; color: var(--c-text);
  font-family: var(--serif); font-weight: 700; font-size: 1.04rem;
  letter-spacing: .16em; text-align: left;
}
.brand-mark {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(102, 225, 191, .6); border-radius: var(--r);
  font-size: 15px; line-height: 1; color: var(--c-accent);
  background: linear-gradient(160deg, rgba(109, 209, 97, .2), rgba(109, 209, 97, .03));
  box-shadow: inset 0 0 12px rgba(109, 209, 97, .12);
}
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-style: normal; font-weight: 700; }
.brand-sub { font-family: var(--sans); font-size: .56rem; letter-spacing: .34em; color: var(--c-muted); }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: .52em 1.05em; border: 1px solid transparent; border-radius: var(--r);
  background: none; color: var(--c-muted); cursor: pointer;
  font-size: .92rem; letter-spacing: .12em; transition: .2s ease;
}
.nav-tab:hover { color: var(--c-text); }
.nav-tab.active {
  color: var(--c-primary); border-color: rgba(109, 209, 97, .45);
  background: rgba(109, 209, 97, .08);
}
.mascot-mini { width: 42px; height: 42px; display: grid; place-items: center; }
.mascot-mini svg { width: 42px; height: 42px; animation: floaty 4s ease-in-out infinite; }

/* ---------- 视图切换 ---------- */
.view { display: none; padding: 8px 0 60px; animation: fadeUp .35s ease; }
.view.active { display: block; }
.view[hidden] { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 7vw, 78px) 0 26px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .76rem; letter-spacing: .32em; color: var(--c-accent);
  border: 1px solid rgba(102, 225, 191, .35); padding: .42em .95em; border-radius: var(--r);
  background: rgba(102, 225, 191, .04);
}
.hero-title { font-size: clamp(2.1rem, 5.6vw, 3.5rem); line-height: 1.22; margin: 22px 0 14px; letter-spacing: .05em; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(115deg, #6dd161 10%, #66e1bf 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--c-muted); max-width: 36em; font-size: 1.03rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0 12px; max-width: 460px; }
.hstat { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.hstat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 44%; background: var(--sheen); }
.hstat b { font-family: var(--serif); font-size: 1.6rem; display: block; letter-spacing: .03em; }
.hstat b small { font-size: .5em; color: var(--c-muted); font-family: var(--sans); font-weight: 400; margin-left: 2px; }
.hstat span { color: var(--c-muted); font-size: .76rem; letter-spacing: .16em; }
.hero-bar { height: 8px; border-radius: var(--r); background: var(--c-line); overflow: hidden; max-width: 460px; }
.hero-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #53c155, #6dd161, #66e1bf); border-radius: var(--r); transition: width .9s ease; }

.hero-fig { position: relative; display: grid; place-items: center; min-height: 280px; }
.hero-fig .ring {
  position: absolute; width: min(300px, 74vw); height: min(300px, 74vw);
  border: 1px solid rgba(109, 209, 97, .35); border-radius: 50%;
  animation: spin 26s linear infinite;
}
.hero-fig .ring::before {
  content: ''; position: absolute; top: 12px; left: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-accent); box-shadow: 0 0 12px rgba(102, 225, 191, .9);
}
.hero-fig .ring::after { content: ''; position: absolute; inset: 15px; border-radius: 50%; border: 1px dashed rgba(109, 209, 97, .22); }
.hero-fig .face {
  width: min(226px, 58vw); aspect-ratio: 1;
  display: grid; place-items: center; font-size: 118px; line-height: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #263224, #161e13);
  border: 1px solid rgba(102, 225, 191, .42);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45), inset 0 0 44px rgba(109, 209, 97, .07);
  animation: floaty 5s ease-in-out infinite;
}
.hero-fig .halo {
  position: absolute; width: min(330px, 76vw); height: 110px; bottom: 8px;
  background: radial-gradient(50% 100% at 50% 100%, rgba(102, 225, 191, .2), transparent 72%);
  filter: blur(6px);
}
.fig-caption { margin-top: 10px; color: var(--c-muted); font-size: .84rem; letter-spacing: .24em; }

/* ---------- 地图头部 ---------- */
.map-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 0 6px; margin-top: 18px;
  border-top: 1px solid var(--c-line);
}
.section-title { font-size: clamp(1.35rem, 3.2vw, 1.85rem); letter-spacing: .1em; position: relative; display: inline-block; }
.section-title::after {
  content: ''; position: absolute; left: 0; bottom: -8px; width: 62px; height: 2px;
  background: linear-gradient(90deg, #6dd161, transparent); border-radius: 2px;
}
.section-sub { color: var(--c-muted); font-size: .9rem; margin-top: 14px; }
.map-progress { color: var(--c-muted); font-size: .86rem; letter-spacing: .1em; text-align: right; }

/* ---------- 地图节点 ---------- */
.map { padding: 26px 0 10px; }
.map-node { position: relative; display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; }
.map-link { position: relative; height: 34px; width: 1px; margin-left: 31px; background: var(--c-line); }
.map-link::after {
  content: ''; position: absolute; left: -4.5px; bottom: 0; width: 10px; height: 10px;
  border-right: 1.5px solid var(--c-muted); border-bottom: 1.5px solid var(--c-muted);
  transform: rotate(45deg); opacity: .8;
}
.lvl-node {
  display: flex; align-items: center; gap: 16px; text-align: left;
  width: 100%; padding: 18px 20px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  color: var(--c-text); cursor: pointer; position: relative; overflow: hidden;
  transition: transform .22s ease, box-shadow .25s ease, border-color .22s ease;
}
.lvl-node::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 48%; background: var(--sheen); pointer-events: none; }
.lvl-node::after {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .25s ease;
}
.lvl-node:hover:not(:disabled) { transform: translateX(5px); border-color: rgba(109, 209, 97, .55); box-shadow: 0 16px 32px rgba(0, 0, 0, .35); }
.lvl-node:hover:not(:disabled)::after { opacity: 1; }
.lvl-node:disabled { cursor: not-allowed; }
.lvl-medal {
  width: 58px; height: 58px; flex: none; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1;
  border-radius: 50%; position: relative;
  border: 1px solid rgba(102, 225, 191, .5);
  background: radial-gradient(circle at 34% 28%, rgba(109, 209, 97, .2), rgba(15, 21, 14, 0) 62%), var(--c-surface-2, #141a12);
  box-shadow: inset 0 0 20px rgba(109, 209, 97, .06);
}
.lvl-medal sup { position: absolute; top: -6px; right: -6px; font-size: .5em; color: var(--c-accent); }
.lvl-body { flex: 1; min-width: 0; }
.lvl-body .lvl-stage { font-size: .7rem; letter-spacing: .26em; color: var(--c-muted); }
.lvl-body .lvl-name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .06em; margin: 2px 0 4px; }
.lvl-body .lvl-desc { color: var(--c-muted); font-size: .86rem; }
.lvl-score { text-align: right; padding-left: 14px; min-width: 96px; }
.lvl-score .sc { color: var(--c-muted); font-size: .78rem; letter-spacing: .1em; }
.lvl-score .stars { justify-content: flex-end; }
.lvl-node .chip {
  position: absolute; top: 12px; right: 14px;
  font-size: .64rem; font-weight: 700; letter-spacing: .12em;
  background: var(--c-accent); color: #0f150e;
  padding: .24em .6em; border-radius: var(--r);
}
.lvl-node.locked { filter: saturate(.25) brightness(.72); }
.lvl-node.locked::marker, .lvl-node.locked { }
.lvl-node.locked .lvl-medal { border-color: var(--c-line); }
.lvl-node.cur {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px rgba(102, 225, 191, .55), 0 0 26px rgba(102, 225, 191, .2);
  animation: pulse 2.2s ease infinite;
}
.lvl-node.done { border-color: rgba(109, 209, 97, .45); }
.lvl-node.locked .lock-ic {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px;
  background: rgba(15, 21, 14, .5); border-radius: var(--r); z-index: 2;
}

.stars { display: inline-flex; gap: 3px; font-size: 1rem; line-height: 1; }
.stars i { font-style: normal; color: var(--c-line); transition: .3s; }
.stars i.on { color: var(--c-primary); text-shadow: 0 0 10px rgba(109, 209, 97, .6); }
.stars.s2 { font-size: 1.3rem; }

.legend { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; padding: 22px 0 8px; color: var(--c-muted); font-size: .82rem; }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.current { background: var(--c-accent); box-shadow: 0 0 10px rgba(102, 225, 191, .8); }
.dot.done { background: var(--c-primary); }
.dot.locked { background: var(--c-line); }

/* ---------- 关卡游戏 ---------- */
.game-shell { padding-top: 26px; }
.game-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.game-head-info { flex: 1; min-width: 200px; }
.game-title { font-size: clamp(1.3rem, 3.4vw, 1.9rem); letter-spacing: .08em; }
.game-tag { color: var(--c-accent); font-size: .8rem; letter-spacing: .3em; margin-top: 3px; }
.game-stars { display: inline-flex; gap: 4px; font-size: 1.7rem; line-height: 1; }
.game-stars i { font-style: normal; color: var(--c-line); transition: .3s; }
.game-stars i.on { color: var(--c-primary); text-shadow: 0 0 12px rgba(109, 209, 97, .65); }

.game-progress { margin: 24px 0 6px; }
.gp-track { height: 10px; border-radius: var(--r); background: var(--c-line); overflow: hidden; }
.gp-fill {
  height: 100%; width: 0; border-radius: var(--r);
  background: linear-gradient(90deg, #53c155, #6dd161, #66e1bf);
  position: relative; transition: width .5s ease;
}
.gp-fill::after {
  content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 26px;
  background: linear-gradient(90deg, transparent, rgba(238, 242, 238, .5));
  animation: sweep 1.6s ease infinite;
}
.gp-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--c-muted); font-size: .8rem; letter-spacing: .14em; }
.gp-labels span.on { color: var(--c-primary); }

/* 咕咕老师 */
.mascot-wrap { display: flex; align-items: flex-end; gap: 20px; margin: 20px 0 8px; }
.mascot { width: 118px; flex: none; transition: transform .3s ease; }
.mascot.bounce { animation: bounce .6s ease; }
.mascot[data-state="happy"] .idle-mouth { display: none; }
.mascot[data-state="happy"] .open-mouth { display: block; }
.mascot[data-state="happy"] .m-brow { stroke: #6dd161; }
.mascot[data-state="listen"] .idle-mouth { display: none; }
.mascot[data-state="listen"] .wow-mouth { display: block; }
.mascot[data-state="listen"] .m-lid { display: none; }
.mascot[data-state="listen"] .m-pupils { animation: blinkEyes 4s ease infinite; }
.mascot[data-state="sad"] .idle-mouth { display: none; }
.mascot[data-state="sad"] .sad-mouth { display: block; }
.mascot[data-state="sad"] .m-brow { display: none; }
.mascot[data-state="sad"] .sad-brow { display: block; }
.mascot-svg { width: 118px; height: auto; overflow: visible; }
.mascot[data-state="happy"] { animation: bob 1.6s ease infinite; }
.mascot-speech {
  position: relative; flex: 1; min-height: 74px;
  display: flex; align-items: center;
  padding: 18px 22px;
  border: 1px solid rgba(102, 225, 191, .4); border-radius: var(--r);
  background: linear-gradient(160deg, #21301f, #161e13);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(238, 242, 238, .06);
}
.mascot-speech::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, #66e1bf, transparent);
}
.ms-tail {
  position: absolute; left: -9px; bottom: 22px; width: 18px; height: 18px;
  background: #1c291a; border-left: 1px solid rgba(102, 225, 191, .4); border-bottom: 1px solid rgba(102, 225, 191, .4);
  transform: rotate(45deg); border-radius: 2px;
}
.mascot-speech p { font-size: 1.04rem; letter-spacing: .04em; }

/* ---------- 步骤区 ---------- */
.step-area { margin-top: 18px; }
.step-panel {
  padding: 30px 28px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  position: relative; overflow: hidden;
  animation: fadeUp .35s ease;
}
.step-panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46%; background: var(--sheen); pointer-events: none; }
.panel-head { text-align: center; margin-bottom: 22px; position: relative; }
.panel-head h3 { font-family: var(--serif); font-size: 1.32rem; letter-spacing: .1em; }
.panel-head p { color: var(--c-muted); font-size: .9rem; margin-top: 5px; }
.panel-foot { text-align: center; margin-top: 20px; position: relative; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.step-nav .spacer { flex: 1; }

/* 卡片网格（认识） */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; position: relative; }
.p-card {
  padding: 16px 10px 14px; text-align: center;
  border: 1px solid var(--c-line); border-radius: var(--r);
  background: #141a12; color: var(--c-text); cursor: pointer;
  transition: .2s ease; position: relative; overflow: hidden;
}
.p-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46%; background: linear-gradient(180deg, rgba(109, 209, 97, .07), transparent); }
.p-card:hover { transform: translateY(-3px); border-color: var(--c-accent); }
.p-card.speaking { border-color: var(--c-primary); box-shadow: 0 0 0 1px rgba(109, 209, 97, .5), 0 0 22px rgba(109, 209, 97, .25); animation: pulse 1.2s ease infinite; }
.p-card .p-sym { font-family: var(--serif); font-size: 2rem; line-height: 1.15; font-weight: 700; }
.p-card .p-ex { color: var(--c-muted); font-size: .88rem; margin-top: 4px; }
.p-card .p-play { display: inline-block; margin-top: 8px; font-size: .78rem; letter-spacing: .2em; color: var(--c-accent); opacity: .85; }

/* 跟读 */
.follow-box { text-align: center; position: relative; }
.follow-item { font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 3.4rem); letter-spacing: .12em; margin: 4px 0 2px; }
.follow-item small { display: block; font-family: var(--sans); font-size: .42em; color: var(--c-muted); letter-spacing: .3em; margin-top: 6px; }
.meter { display: flex; gap: 5px; align-items: flex-end; justify-content: center; height: 72px; margin: 18px 0; }
.meter i { width: 8px; border-radius: 3px; height: 12%; background: linear-gradient(180deg, #66e1bf, #53c155); transition: height .07s linear; }
.follow-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.verdict { min-height: 2em; margin-top: 14px; font-size: 1rem; letter-spacing: .06em; color: var(--c-muted); }
.verdict.good { color: var(--c-primary); }
.verdict.mid { color: var(--c-accent); }
.verdict.bad { color: var(--c-warn); }
.mic-tip { color: var(--c-muted); font-size: .8rem; margin-top: 4px; }

/* 听音选字 */
.play-box { text-align: center; position: relative; }
.play-target { font-family: var(--serif); font-size: clamp(1.7rem, 5vw, 2.3rem); letter-spacing: .1em; margin: 2px 0; }
.play-target small { display: block; font-family: var(--sans); font-size: .5em; color: var(--c-muted); letter-spacing: .3em; margin-top: 4px; }
.speak-btn {
  display: inline-flex; align-items: center; gap: .55em;
  margin: 14px auto 4px; padding: .6em 1.4em;
  border: 1px solid rgba(102, 225, 191, .55); border-radius: var(--r);
  background: rgba(102, 225, 191, .06); color: var(--c-accent);
  font-weight: 600; letter-spacing: .12em; cursor: pointer; transition: .2s;
}
.speak-btn:hover { background: rgba(102, 225, 191, .12); transform: translateY(-1px); }
.speak-btn.playing { animation: breath 1.1s ease infinite; }
.opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 540px; margin: 22px auto 0; }
.opt {
  font-family: var(--serif); font-size: 1.7rem; line-height: 1;
  padding: 20px 10px;
  border: 1px solid var(--c-line); border-radius: var(--r);
  background: #141a12; color: var(--c-text); cursor: pointer;
  transition: .18s ease; position: relative; overflow: hidden;
}
.opt::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 42%; background: linear-gradient(180deg, rgba(109, 209, 97, .06), transparent); }
.opt:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.opt.right { border-color: var(--c-primary); background: rgba(109, 209, 97, .14); color: var(--c-primary); }
.opt.wrong { animation: shake .4s ease; border-color: var(--c-warn); color: var(--c-warn); }
.opt:disabled { cursor: default; }

/* 拼读配对 */
.spell-box { max-width: 580px; margin: 0 auto; position: relative; }
.spell-pool-label { font-size: .78rem; letter-spacing: .28em; color: var(--c-muted); margin: 16px 0 8px; text-align: center; }
.pick-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pick {
  min-width: 64px; padding: .7em .8em; text-align: center;
  border: 1px solid var(--c-line); border-radius: var(--r);
  background: #141a12; color: var(--c-text);
  font-family: var(--serif); font-size: 1.35rem; cursor: pointer;
  transition: .16s ease;
}
.pick:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.pick.selected { border-color: var(--c-primary); background: rgba(109, 209, 97, .14); color: var(--c-primary); box-shadow: 0 0 0 1px rgba(109, 209, 97, .4); }
.pick:disabled { cursor: default; opacity: .4; }
.spell-formula { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 6px; font-family: var(--serif); font-size: 1.9rem; }
.spell-formula .slot { min-width: 52px; padding: 6px 10px; border: 1px dashed rgba(102, 225, 191, .55); border-radius: var(--r); min-height: 48px; display: grid; place-items: center; }
.spell-formula .slot.filled { border-style: solid; border-color: var(--c-primary); color: var(--c-primary); }
.spell-formula .plus { color: var(--c-muted); }
.spell-formula .eq { color: var(--c-muted); }
.spell-formula .result { color: var(--c-muted); }
.spell-formula .result.ok { color: var(--c-primary); }
.spell-hint { color: var(--c-muted); font-size: .86rem; text-align: center; min-height: 1.6em; }

/* 结算 */
.finish-box { text-align: center; position: relative; padding: 8px 0 4px; }
.finish-seal { font-size: 52px; line-height: 1; animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.finish-box h3 { font-family: var(--serif); font-size: 1.6rem; margin: 12px 0 4px; letter-spacing: .08em; }
.finish-box .sub { color: var(--c-muted); font-size: .94rem; }
.finish-stars { display: flex; gap: 12px; justify-content: center; font-size: 2.8rem; margin: 18px 0; }
.finish-stars i { font-style: normal; color: var(--c-line); animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.finish-stars i.on { color: var(--c-primary); text-shadow: 0 0 20px rgba(109, 209, 97, .75); }
.finish-stars i:nth-child(2) { animation-delay: .28s; }
.finish-stars i:nth-child(3) { animation-delay: .56s; }
.finish-score { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 6px 0 16px; }
.finish-score .fs { padding: 12px 18px; border: 1px solid var(--c-line); border-radius: var(--r); background: #141a12; min-width: 110px; }
.finish-score .fs b { font-family: var(--serif); font-size: 1.5rem; display: block; }
.finish-score .fs span { color: var(--c-muted); font-size: .76rem; letter-spacing: .16em; }
.finish-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 报告页 ---------- */
.report-hero { padding: clamp(34px, 6vw, 60px) 0 10px; }
.report-title { font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin: 18px 0 10px; letter-spacing: .06em; }
.report-title em { font-style: normal; background: linear-gradient(115deg, #6dd161 10%, #66e1bf 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.report-hero .hero-sub { max-width: 44em; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 22px; }
.stat-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  padding: 20px 18px; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 44%; background: var(--sheen); }
.stat-card b { font-family: var(--serif); font-size: 2rem; display: block; letter-spacing: .03em; position: relative; }
.stat-card b small { font-size: .52em; color: var(--c-muted); font-family: var(--sans); font-weight: 400; margin-left: 3px; }
.stat-card span { color: var(--c-muted); font-size: .8rem; letter-spacing: .16em; position: relative; }

.report-cards { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r);
  padding: 26px 24px; position: relative; overflow: hidden;
  margin-bottom: 20px;
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46%; background: var(--sheen); pointer-events: none; }
.card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(102, 225, 191, .16); position: relative;
}
.card-head h3 { font-size: 1.15rem; letter-spacing: .1em; }
.card-head::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 12px rgba(102, 225, 191, .8); }
.card-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 60px; height: 1px; background: linear-gradient(90deg, #6dd161, transparent); }

.m-row { display: grid; grid-template-columns: 150px 1fr 56px; gap: 12px; align-items: center; margin: 13px 0; position: relative; }
.m-row .m-name { font-size: .92rem; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bar { height: 9px; border-radius: var(--r); background: var(--c-line); overflow: hidden; }
.m-bar i { display: block; height: 100%; width: 0; border-radius: var(--r); background: linear-gradient(90deg, #53c155, #6dd161, #66e1bf); transition: width .9s ease .05s; }
.m-row .m-score { text-align: right; color: var(--c-muted); font-size: .82rem; white-space: nowrap; }

.weak-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin: 10px 0;
  border: 1px solid rgba(224, 180, 90, .38); border-radius: var(--r);
  background: rgba(224, 180, 90, .05); position: relative;
}
.weak-item .w-sym { font-family: var(--serif); font-size: 1.4rem; width: 52px; text-align: center; flex: none; }
.weak-item .w-body { flex: 1; }
.weak-item .w-body b { font-size: .95rem; }
.weak-item .w-body p { color: var(--c-muted); font-size: .8rem; margin-top: 2px; }
.weak-item .w-btn { flex: none; }
.empty-ok { text-align: center; padding: 26px 8px; color: var(--c-primary); letter-spacing: .1em; }
.empty-ok .big { font-size: 38px; display: block; margin-bottom: 8px; }

.tips { list-style: none; position: relative; display: grid; gap: 12px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r); }
.tips .t-ic { font-size: 20px; flex: none; }
.tips b { display: block; font-size: .95rem; }
.tips p { color: var(--c-muted); font-size: .84rem; margin-top: 2px; }

.report-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 8px 0 20px; position: relative; }

/* ---------- 页脚 ---------- */
.app-footer { border-top: 1px solid var(--c-line); padding: 34px 0 44px; margin-top: 40px; text-align: center; color: var(--c-muted); font-size: .84rem; }
.app-footer .serif { font-size: 1.06rem; letter-spacing: .3em; color: var(--c-text); display: block; margin-bottom: 8px; }

/* ---------- Toast / 彩带 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  z-index: 200; max-width: 88vw;
  padding: .8em 1.5em; border-radius: var(--r);
  background: #21301f; border: 1px solid rgba(102, 225, 191, .5);
  color: var(--c-text); font-size: .96rem; letter-spacing: .06em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--c-primary); }
.toast.warn { border-color: var(--c-warn); }

.confetti { position: fixed; inset: 0; z-index: 190; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px;
  opacity: 0; animation: confettiFall linear forwards;
}

/* ---------- 动画 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bounce { 0% { transform: scale(1); } 40% { transform: scale(1.12) translateY(-8px); } 70% { transform: scale(.96); } 100% { transform: scale(1); } }
@keyframes blinkEyes { 0%, 46%, 50%, 100% { opacity: 1; } 48% { opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(102, 225, 191, .55), 0 0 20px rgba(102, 225, 191, .16); } 50% { box-shadow: 0 0 0 3px rgba(102, 225, 191, .38), 0 0 34px rgba(102, 225, 191, .3); } }
@keyframes breath { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(109, 209, 97, .3); } 50% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(109, 209, 97, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes starIn { from { opacity: 0; transform: scale(0) rotate(-60deg); } to { opacity: 1; transform: none; } }
@keyframes sweep { 0% { left: -10%; } 100% { left: 110%; } }
@keyframes confettiFall {
  0% { opacity: 1; transform: translate3d(0, -20px, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--dr, 540deg)); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-stats, .hero-bar { margin-inline: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .report-cards { grid-template-columns: 1fr; }
  .mascot-wrap { gap: 12px; }
  .mascot { width: 92px; }
  .mascot-svg { width: 92px; }
}
@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-name { font-size: .92rem; }
  .app-bar-inner { height: 58px; }
  .nav-tab { padding: .44em .7em; font-size: .84rem; letter-spacing: .06em; }
  .mascot-mini { display: none; }
  .map-node { grid-template-columns: 1fr; gap: 10px; }
  .map-link { margin-left: 0; }
  .lvl-node { padding: 16px 16px; }
  .lvl-node:hover:not(:disabled) { transform: translateY(-3px); }
  .lvl-score { padding-left: 0; min-width: 0; }
  .opt-grid { grid-template-columns: repeat(2, 1fr); }
  .m-row { grid-template-columns: 1fr; gap: 6px; }
  .m-row .m-score { text-align: left; }
  .step-panel { padding: 24px 18px; }
  .mascot-speech p { font-size: .94rem; }
  .mascot-wrap { flex-direction: column; align-items: flex-start; }
  .ms-tail { display: none; }
  .game-head .btn-sm { margin-right: auto; }
  .finish-score .fs { min-width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-fig .face { animation: none; }
}
