/* ===== Brooks 价格行为 · 小白训练营 样式 ===== */
:root{
  --bg:#f4f6f9; --bg-2:#e9eef4; --card:#ffffff; --card-2:#f8fafc;
  --ink:#12263f; --ink-2:#1c3350; --ink-soft:#41556b; --muted:#7d8b9b;
  --gold:#b8821f; --gold-2:#c8992f; --gold-soft:#f4e7cc;
  --line:#dce3ec; --line-2:#cdd8e4; --text:#1c2733; --text-soft:#3a4856;
  --ok:#1FA97A; --bad:#D93A3A; --info:#2F6FEB;
  /* K线颜色（与主题无关，市场色） */
  --bull:#D93A3A; --bear:#1FA97A; --doji:#9aa7b4; --trend:#2F6FEB;
  --shadow:0 6px 22px rgba(18,38,63,.10);
  --radius:14px;
}
html[data-theme="dark"]{
  --bg:#0d1623; --bg-2:#0f1b2c; --card:#15233a; --card-2:#18284a;
  --ink:#0f1d31; --ink-2:#16263f; --ink-soft:#9fb4c9; --muted:#7d8b9b;
  --gold:#d8a63f; --gold-2:#e6bf6a; --gold-soft:#2a2417;
  --line:#26374f; --line-2:#30425d; --text:#dce3ec; --text-soft:#aebbc9;
  --shadow:0 6px 22px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC",sans-serif;
  background:var(--bg); color:var(--text); line-height:1.6;
  -webkit-font-smoothing:antialiased; min-height:100vh;
}
a{color:inherit;text-decoration:none}
b,strong{color:var(--gold-2)}

/* ---------- Topbar ---------- */
.topbar{
  position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:14px;
  padding:10px 18px; background:var(--ink); color:#fff;
  box-shadow:0 2px 14px rgba(0,0,0,.25);
  padding-top:calc(10px + env(safe-area-inset-top));
  padding-left:calc(18px + env(safe-area-inset-left));
  padding-right:calc(18px + env(safe-area-inset-right));
}
.brand{display:flex; align-items:center; gap:10px; font-size:16px; letter-spacing:.3px; min-width:0}
.brand-text{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.brand-text b{color:var(--gold-2)}
.brand-mark{
  width:22px; height:22px; border-radius:5px; flex:none; background:
    linear-gradient(135deg,var(--gold) 0 50%, transparent 50%) ,
    linear-gradient(135deg, transparent 50%, var(--gold-2) 50%);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.25);
}
/* 汉堡按钮：桌面隐藏 */
.menu-btn{
  display:none; flex:none; width:42px; height:42px; border-radius:10px; cursor:pointer;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16);
  padding:0; align-items:center; justify-content:center; position:relative;
}
.menu-btn:hover{background:rgba(255,255,255,.2)}
.menu-ico{display:block; width:18px; height:14px; position:relative}
.menu-ico i{
  position:absolute; left:0; width:100%; height:2px; border-radius:2px; background:#fff;
  transition:transform .22s ease, opacity .16s ease, top .22s ease;
}
.menu-ico i:nth-child(1){top:0}
.menu-ico i:nth-child(2){top:6px}
.menu-ico i:nth-child(3){top:12px}
.menu-btn[aria-expanded="true"] .menu-ico i:nth-child(1){top:6px; transform:rotate(45deg)}
.menu-btn[aria-expanded="true"] .menu-ico i:nth-child(2){opacity:0}
.menu-btn[aria-expanded="true"] .menu-ico i:nth-child(3){top:6px; transform:rotate(-45deg)}
.nav-scrim{display:none}
.nav{display:flex; gap:4px; flex:1; flex-wrap:wrap; align-items:center}
.nav a{
  padding:6px 11px; border-radius:9px; color:#cfd9e6; font-size:14px;
  transition:.15s; white-space:nowrap;
}
.nav a:hover{background:rgba(255,255,255,.10); color:#fff}
.nav a.active{background:var(--gold); color:#1b1304; font-weight:700}
.topbar-right{display:flex; align-items:center; gap:10px; flex:none; margin-left:auto}
.ring{position:relative; width:40px; height:40px}
.ring svg{transform:rotate(-90deg)}
.ring-bg{fill:none; stroke:rgba(255,255,255,.18); stroke-width:5}
.ring-fg{fill:none; stroke:var(--gold-2); stroke-width:5; stroke-linecap:round;
  stroke-dasharray:113.1; stroke-dashoffset:113.1; transition:stroke-dashoffset .5s}
.ring-pct{position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; color:#fff}
.theme-btn{background:rgba(255,255,255,.10); border:none; cursor:pointer; width:38px; height:38px;
  border-radius:9px; display:flex; align-items:center; justify-content:center}
.theme-btn:hover{background:rgba(255,255,255,.2)}
.theme-ico{width:16px;height:16px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%, #ffd87a 0 45%, transparent 46%);
  box-shadow:inset -5px -3px 0 0 #f4f6f9;}
html[data-theme="dark"] .theme-ico{background:#0d1623; box-shadow:inset 0 0 0 2px #ffd87a;}

.view{max-width:1120px; margin:0 auto; padding:22px 16px 60px}
.foot{max-width:1120px; margin:0 auto; padding:18px 16px 30px; color:var(--muted); font-size:12.5px}
.foot p{margin:0}

/* ---------- Generic ---------- */
h1,h2,h3{color:var(--ink-2); margin:0 0 10px}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3{color:var(--gold-2)}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:18px}
.muted{color:var(--muted)}
.btn{display:inline-flex; align-items:center; gap:6px; background:var(--gold); color:#1b1304;
  border:none; padding:9px 16px; border-radius:10px; font-weight:700; cursor:pointer;
  font-size:14px; font-family:inherit; transition:.15s}
.btn:hover{filter:brightness(1.06)}
.btn.ghost{background:transparent; color:var(--ink-soft); border:1px solid var(--line-2)}
.btn.ghost:hover{background:var(--bg-2); color:var(--text)}
.btn:disabled{opacity:.45; cursor:not-allowed}
.chip{display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px;
  background:var(--gold-soft); color:var(--gold); border:1px solid var(--line-2); margin:2px}
.cite{font-size:12px; color:var(--muted); background:var(--bg-2); border:1px dashed var(--line-2);
  padding:2px 8px; border-radius:7px; display:inline-block}
.section-title{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:14px}
.section-title h2{font-size:22px; margin:0}
.section-title .sub{color:var(--muted); font-size:13px}

/* ---------- Home / Knowledge map ---------- */
.hero{display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin-bottom:22px}
.hero-copy{flex:1; min-width:260px}
.hero h1{font-size:26px}
.hero p{color:var(--text-soft); margin:6px 0 14px}
.bigring{width:120px;height:120px;flex:none}
.bigring svg{transform:rotate(-90deg)}
.bigring .rb{fill:none;stroke:var(--line);stroke-width:9}
.bigring .rf{fill:none;stroke:var(--gold);stroke-width:9;stroke-linecap:round;
  stroke-dasharray:339.29;stroke-dashoffset:339.29;transition:stroke-dashoffset .6s}
.bigring text{fill:var(--ink-2);font-size:30px;font-weight:800}
html[data-theme="dark"] .bigring text{fill:var(--gold-2)}

.map-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px}
.map-node{position:relative; background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; cursor:pointer; transition:.15s; overflow:hidden}
.map-node:hover{transform:translateY(-3px); border-color:var(--gold); box-shadow:var(--shadow)}
.map-node .num{font-size:13px; font-weight:800; color:var(--gold); letter-spacing:1px}
.map-node .ttl{font-size:16px; font-weight:700; color:var(--ink-2); margin:4px 0 6px}
html[data-theme="dark"] .map-node .ttl{color:var(--text)}
.map-node .rg{font-size:11.5px; color:var(--muted); line-height:1.45}
.map-node.done::after{content:""; position:absolute; top:10px; right:10px; width:14px; height:14px;
  border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px rgba(31,169,122,.18)}
.map-node .bar{height:5px; background:var(--bg-2); border-radius:4px; margin-top:10px; overflow:hidden}
.map-node .bar i{display:block; height:100%; background:var(--gold); width:0}
.module-links{display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; margin-top:8px}
.mlink{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; cursor:pointer; transition:.15s}
.mlink:hover{border-color:var(--gold); transform:translateY(-2px)}
.mlink b{display:block; font-size:15px; color:var(--ink-2)}
html[data-theme="dark"] .mlink b{color:var(--text)}
.mlink span{font-size:12px; color:var(--muted)}

/* ---------- Onboarding ---------- */
.qcard .q{font-size:16px; font-weight:700; margin-bottom:12px; color:var(--ink-2)}
html[data-theme="dark"] .qcard .q{color:var(--text)}
.opt{display:block; width:100%; text-align:left; background:var(--card-2); border:1px solid var(--line-2);
  padding:11px 14px; border-radius:10px; margin:7px 0; cursor:pointer; font-size:14px; font-family:inherit; color:var(--text); transition:.15s}
.opt:hover{border-color:var(--gold)}
.opt.sel{background:var(--gold-soft); border-color:var(--gold); font-weight:700}
.result-box{background:var(--card-2); border-left:4px solid var(--gold); padding:14px; border-radius:10px; margin-top:6px}
.result-box ul{margin:8px 0 0; padding-left:20px}

/* ---------- K线游戏 ---------- */
.game-wrap{display:grid; grid-template-columns:1fr; gap:16px}
.canvas-box{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:12px; box-shadow:var(--shadow)}
#gameCanvas{width:100%; height:auto; display:block; border-radius:8px; background:
  linear-gradient(var(--bg-2),var(--bg-2));}
.game-hud{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.level-pill{background:var(--gold-soft); color:var(--gold); font-weight:800; padding:5px 12px; border-radius:999px; font-size:14px}
.opts-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:10px}
.opt-game{padding:13px 12px; border-radius:11px; border:2px solid var(--line-2); background:var(--card);
  cursor:pointer; font-size:15px; font-weight:600; color:var(--text); font-family:inherit; transition:.15s; text-align:center}
.opt-game:hover{border-color:var(--gold)}
.opt-game.correct{border-color:var(--ok); background:rgba(31,169,122,.12); color:var(--ok)}
.opt-game.wrong{border-color:var(--bad); background:rgba(217,58,58,.10); color:var(--bad)}
.opt-game:disabled{cursor:default}
.fb{margin-top:8px; border-radius:12px; padding:14px; border:1px solid var(--line); background:var(--card-2); display:none}
.fb.show{display:block}
.fb .head{font-weight:800; margin-bottom:6px}
.fb .head.ok{color:var(--ok)} .fb .head.bad{color:var(--bad)}
.legend{display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--muted); margin-top:8px}
.legend i{display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:5px; vertical-align:-1px}

/* ---------- Terms（常显卡 / 列表） ---------- */
.toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:14px}
.search{flex:1; min-width:200px; display:flex; align-items:center; gap:8px; background:var(--card);
  border:1px solid var(--line-2); border-radius:10px; padding:8px 12px}
.search input{flex:1; border:none; background:transparent; outline:none; font-size:14px; color:var(--text); font-family:inherit}
.search input::placeholder{color:var(--muted)}
.viewtoggle{display:flex; gap:0; border:1px solid var(--line-2); border-radius:9px; overflow:hidden}
.viewtoggle button{border:none; background:var(--card); padding:8px 14px; cursor:pointer; font-size:13.5px; color:var(--text-soft); font-family:inherit}
.viewtoggle button.active{background:var(--gold); color:#1b1304; font-weight:700}
.alpha{display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px}
.alpha button{width:30px; height:30px; border-radius:8px; border:1px solid var(--line-2); background:var(--card);
  cursor:pointer; color:var(--text-soft); font-size:13px; font-family:inherit}
.alpha button.active{background:var(--gold); color:#1b1304; border-color:var(--gold); font-weight:700}
.alpha button:disabled{opacity:.35; cursor:not-allowed}
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px}
.tcard{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; transition:.15s;
  border-left:4px solid var(--gold)}
.tcard:hover{border-color:var(--gold); box-shadow:var(--shadow)}
.tc-head{display:flex; align-items:baseline; justify-content:space-between; gap:8px}
.tc-en{font-size:17px; font-weight:800; color:var(--ink-2); word-break:break-word}
html[data-theme="dark"] .tc-en{color:var(--text)}
.tc-id{font-size:11px; color:var(--muted); font-weight:600; white-space:nowrap}
.tc-cn{color:var(--gold); font-weight:700; margin-top:4px; font-size:14px}
.tc-zh{font-size:13.5px; color:var(--text-soft); margin-top:7px; line-height:1.55}
.tc-en2{font-size:12px; color:var(--muted); margin-top:8px; font-style:italic; line-height:1.5}
.termlist{display:flex; flex-direction:column; gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden}
.trow{display:grid; grid-template-columns:200px 150px 1fr; gap:12px; padding:11px 14px; border-bottom:1px solid var(--line); align-items:start}
.trow:last-child{border-bottom:none}
.trow:nth-child(even){background:var(--card-2)}
.tr-en{font-weight:800; color:var(--ink-2); font-size:14.5px}
html[data-theme="dark"] .tr-en{color:var(--text)}
.tr-en small{color:var(--muted); font-weight:600; margin-left:6px}
.tr-cn{color:var(--gold); font-weight:700; font-size:13.5px}
.tr-zh{font-size:13px; color:var(--text-soft)}
.tr-def{display:block; font-size:11.5px; color:var(--muted); font-style:italic; margin-top:3px}
@media (max-width:640px){ .trow{grid-template-columns:1fr; gap:4px} }

/* ---------- 图解库 / 概念图 ---------- */
.gallery{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; margin-top:4px}
.diagram-card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow); display:flex; flex-direction:column}
.diagram-card:hover{border-color:var(--gold)}
.dc-svg{padding:10px; background:var(--card-2); border-bottom:1px solid var(--line)}
.dc-svg svg{width:100%; height:auto; display:block}
.dc-meta{padding:12px 14px}
.dc-title{font-size:16px; font-weight:800; color:var(--ink-2); display:flex; align-items:center; gap:8px}
html[data-theme="dark"] .dc-title{color:var(--text)}
.dc-ch{font-size:11.5px; font-weight:700; color:var(--gold); background:var(--gold-soft); border-radius:7px; padding:2px 8px}
.dc-cap{font-size:13px; color:var(--text-soft); margin-top:7px; line-height:1.55}

/* ---------- Quiz ---------- */
.quiz-box{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow)}
.quiz-q{font-size:17px; font-weight:700; color:var(--ink-2); margin-bottom:6px}
html[data-theme="dark"] .quiz-q{color:var(--text)}
.quiz-meta{font-size:12.5px; color:var(--muted); margin-bottom:14px}
.grouptabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px}
.grouptabs button{padding:6px 12px; border-radius:9px; border:1px solid var(--line-2); background:var(--card);
  cursor:pointer; font-size:13px; color:var(--text-soft); font-family:inherit}
.grouptabs button.active{background:var(--gold); color:#1b1304; border-color:var(--gold); font-weight:700}
.answer-reveal{display:none; margin-top:14px; border-top:1px dashed var(--line-2); padding-top:12px}
.answer-reveal.show{display:block}
.answer-reveal .a{font-size:15px; color:var(--text)}
.selfrate{display:flex; gap:10px; margin-top:12px}
.quiz-progress{height:6px; background:var(--bg-2); border-radius:4px; overflow:hidden; margin:10px 0}
.quiz-progress i{display:block; height:100%; background:var(--gold); transition:width .3s}
.wrongbook{margin-top:8px}
.wrongbook .item{border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; background:var(--card-2)}
.wrongbook .item .q{font-weight:700; color:var(--ink-2)}
html[data-theme="dark"] .wrongbook .item .q{color:var(--text)}

/* ---------- Rules ---------- */
.rule{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px}
.rule .rh{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.rule .rn{font-weight:800; color:var(--gold); font-size:15px}
.rule .en{font-style:italic; color:var(--ink-soft); font-size:13px; border-left:3px solid var(--gold-soft); padding-left:10px; margin:4px 0 8px}
.rule .zh{font-size:14px; color:var(--text-soft)}
.rule .tags{margin-top:8px}
.tagbadge{font-size:11.5px; padding:2px 9px; border-radius:999px; background:var(--bg-2); border:1px solid var(--line-2); color:var(--ink-soft); margin-right:5px}
.filterbar{display:flex; gap:7px; flex-wrap:wrap; margin-bottom:14px}
.filterbar button{padding:7px 13px; border-radius:10px; border:1px solid var(--line-2); background:var(--card);
  cursor:pointer; font-size:13.5px; color:var(--text-soft); font-family:inherit}
.filterbar button.active{background:var(--gold); color:#1b1304; border-color:var(--gold); font-weight:700}

/* ---------- Plan ---------- */
.week{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:12px}
.week h3{display:flex; align-items:center; gap:10px; font-size:16px; margin:0 0 8px}
.week h3 .wk{background:var(--gold-soft); color:var(--gold); border-radius:8px; padding:2px 9px; font-size:13px}
.task{display:flex; align-items:flex-start; gap:10px; padding:6px 0; cursor:pointer}
.task input{margin-top:5px; width:17px; height:17px; accent-color:var(--gold); flex:none}
.task.done label{text-decoration:line-through; color:var(--muted)}
.task label{font-size:14px; color:var(--text-soft)}
.plan-summary{display:flex; align-items:center; gap:14px; margin-bottom:14px; flex-wrap:wrap}
.plan-bar{flex:1; min-width:200px; height:10px; background:var(--bg-2); border-radius:6px; overflow:hidden}
.plan-bar i{display:block; height:100%; background:linear-gradient(90deg,var(--gold),var(--gold-2)); width:0; transition:width .4s}

/* ---------- Chapter ---------- */
.chap-head{display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; margin-bottom:14px}
.chap-head .cn{font-size:13px; font-weight:800; color:var(--gold)}
.chap-head h2{font-size:24px; margin:2px 0}
.chap-nav{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap}
.speed-table{width:100%; border-collapse:collapse; margin-top:6px}
.speed-table th,.speed-table td{border:1px solid var(--line); padding:10px 12px; text-align:left; font-size:13.5px; vertical-align:top}
.speed-table th{background:var(--bg-2); color:var(--ink-soft)}
.speed-table td.c{font-weight:700; color:var(--ink-2); min-width:130px}
html[data-theme="dark"] .speed-table td.c{color:var(--text)}
.speed-table td.cite{color:var(--muted); font-size:12px; white-space:nowrap}
.open-course{margin-top:16px}
.empty{color:var(--muted); text-align:center; padding:30px}

/* ---------- 移动端（≤860px）：顶栏单行 + 导航抽屉 ---------- */
:root{ --topbar-h:58px }
@media (max-width:860px){
  .topbar{gap:10px; padding:9px 14px; flex-wrap:nowrap;
    padding-top:calc(9px + env(safe-area-inset-top));
    padding-left:calc(14px + env(safe-area-inset-left));
    padding-right:calc(14px + env(safe-area-inset-right));}
  .menu-btn{display:flex}
  .brand{font-size:14.5px; flex:1; min-width:0}
  /* 窄屏隐藏装饰性副标题，优先保住主品牌名 */
  .brand-back{display:none}
  .brand-text b{color:var(--gold-2)}
  .topbar-right{gap:8px}
  .ring{width:38px; height:38px}
  .theme-btn{width:38px; height:38px}

  /* 导航变抽屉：固定定位在顶栏下方，默认收起 */
  .nav{
    position:fixed; left:0; right:0;
    top:calc(var(--topbar-h) + env(safe-area-inset-top));
    z-index:40; display:grid; grid-template-columns:repeat(2,1fr); gap:8px;
    padding:14px 14px calc(20px + env(safe-area-inset-bottom));
    background:var(--ink); flex:none;
    border-top:1px solid rgba(255,255,255,.10);
    box-shadow:0 18px 40px rgba(0,0,0,.42);
    max-height:calc(100vh - var(--topbar-h) - env(safe-area-inset-top));
    max-height:calc(100dvh - var(--topbar-h) - env(safe-area-inset-top));
    overflow-y:auto; -webkit-overflow-scrolling:touch;
    transform:translateY(-102%);
    opacity:0; visibility:hidden; pointer-events:none;
    transition:transform .26s cubic-bezier(.22,.8,.3,1), opacity .2s ease, visibility .26s;
  }
  .nav.open{transform:translateY(0); opacity:1; visibility:visible; pointer-events:auto}
  .nav a{
    padding:13px 14px; font-size:15px; border-radius:11px; text-align:center;
    background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.09);
    white-space:normal;
  }
  .nav a:active{background:rgba(255,255,255,.14)}
  .nav a.active{background:var(--gold); color:#1b1304; border-color:var(--gold)}
  .nav-scrim{
    display:block; position:fixed; inset:0; z-index:35;
    background:rgba(6,12,20,.5); backdrop-filter:blur(2px);
    opacity:0; visibility:hidden; transition:opacity .2s ease, visibility .2s;
  }
  .nav-scrim.open{opacity:1; visibility:visible}
  .nav-scrim[hidden]{display:block}

  .opts-grid{grid-template-columns:1fr}
  .view{padding:16px 14px 56px}
  .hero h1{font-size:22px}
  .hero{gap:14px}
}

/* 导航打开时锁定背景滚动 */
body.nav-open{overflow:hidden}

/* 表格可横滑 */
.tbl-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 -2px}

/* ---------- 游戏通关庆祝 ---------- */
.game-complete-overlay{position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center;
  background:rgba(13,22,35,.55); backdrop-filter:blur(3px); padding:18px; animation:gcFade .25s ease}
@keyframes gcFade{from{opacity:0}to{opacity:1}}
.game-complete-modal{position:relative; background:var(--card); border:1px solid var(--line); border-radius:20px;
  box-shadow:0 18px 60px rgba(18,38,63,.35); max-width:520px; width:100%; padding:26px 24px; text-align:center;
  animation:gcPop .35s cubic-bezier(.18,.9,.32,1.3)}
@keyframes gcPop{from{transform:scale(.85); opacity:0}to{transform:scale(1); opacity:1}}
.gc-emoji{font-size:54px; line-height:1; margin-bottom:6px}
.gc-title{font-size:24px; font-weight:800; color:var(--ink-2); margin:4px 0 4px}
html[data-theme="dark"] .gc-title{color:var(--gold-2)}
.gc-sub{color:var(--text-soft); font-size:14px; margin-bottom:16px; line-height:1.6}
.gc-stats{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:14px 0 18px}
.gc-stat{background:var(--bg-2); border:1px solid var(--line-2); border-radius:12px; padding:10px 16px; min-width:90px}
.gc-stat b{display:block; font-size:22px; color:var(--gold); font-weight:800; line-height:1.2}
.gc-stat span{font-size:12px; color:var(--muted)}
.gc-states{display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin:6px 0 18px}
.gc-state{font-size:12px; background:var(--gold-soft); color:var(--gold); border:1px solid var(--line-2);
  border-radius:999px; padding:3px 10px}
.gc-badge{display:inline-block; background:linear-gradient(135deg,var(--gold),var(--gold-2)); color:#1b1304;
  font-weight:800; font-size:13px; padding:6px 16px; border-radius:999px; margin-bottom:10px; letter-spacing:.5px}
.gc-actions{display:flex; gap:10px; justify-content:center; flex-wrap:wrap}
.gc-close{position:absolute; top:12px; right:14px; background:transparent; border:none; cursor:pointer;
  font-size:24px; color:var(--muted); line-height:1}
.gc-close:hover{color:var(--text)}
.confetti{position:fixed; top:-14px; width:9px; height:14px; z-index:61; pointer-events:none; border-radius:2px;
  animation:gcFall linear forwards}
@keyframes gcFall{to{transform:translateY(106vh) rotate(540deg); opacity:.85}}

/* ===== K 线闯关 · 章节地图与关卡 UI ===== */
.gc-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; margin-top:6px}
.chap-card{position:relative; background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 16px 16px; cursor:pointer; transition:.16s; box-shadow:var(--shadow)}
.chap-card:hover{transform:translateY(-3px); border-color:var(--gold); box-shadow:0 10px 26px rgba(184,130,31,.18)}
.chap-card.done{border-color:var(--ok)}
.chap-done-badge{position:absolute; top:12px; right:12px; background:var(--ok); color:#fff;
  font-size:12px; font-weight:800; padding:3px 10px; border-radius:999px}
.chap-num{font-size:13px; font-weight:800; color:var(--gold); letter-spacing:1px}
.chap-title{font-size:18px; font-weight:800; color:var(--ink-2); margin:4px 0 6px}
html[data-theme="dark"] .chap-title{color:var(--text)}
.chap-sub{font-size:13px; color:var(--muted); line-height:1.5; min-height:38px; margin-bottom:12px}
.chap-bar{height:6px; background:var(--bg-2); border-radius:4px; overflow:hidden; margin-bottom:8px}
.chap-bar i{display:block; height:100%; background:linear-gradient(90deg,var(--gold),var(--gold-2)); width:0}
.chap-meta{font-size:12.5px; color:var(--ink-soft); font-weight:700; margin-bottom:12px}
.chap-enter{padding:9px 14px; font-size:14px}
.gc-hud{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:14px}
.gc-hud .btn.ghost{padding:7px 13px; font-size:13px}
.choice-box{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow)}
.game-wrap .q,.choice-box .q{font-size:16px; font-weight:700; margin-bottom:10px; color:var(--ink-2)}
html[data-theme="dark"] .game-wrap .q,html[data-theme="dark"] .choice-box .q{color:var(--text)}
.gc-tip{margin-top:18px; background:var(--gold-soft); border:1px solid var(--line-2); border-radius:12px;
  padding:13px 15px; font-size:13.5px; color:var(--gold); line-height:1.6}
.gc-tip b{color:var(--ink-2)}
@media (max-width:640px){
  .gc-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
  .chap-title{font-size:16px}
  .chap-sub{min-height:0}
  /* 进度环与主题按钮：触控区不小于 40px */
  .menu-btn{width:40px; height:40px}
  /* 表格：允许横滑并保持可读字号 */
  .speed-table{font-size:12.5px}
  .speed-table th,.speed-table td{padding:9px 10px}
  .speed-table td.c{min-width:0; white-space:normal}
  .speed-table td.cite{white-space:normal}
  /* 代码/长串：防止撑破容器 */
  .cite{word-break:break-word}
  .tc-en{word-break:break-word; overflow-wrap:anywhere}
  .tr-en{word-break:break-word; overflow-wrap:anywhere}
  /* 触摸目标：选项卡、筛选、字母索引 */
  .grouptabs button,.filterbar button{padding:9px 14px}
  .alpha button{width:34px; height:34px}
  .viewtoggle button{padding:9px 14px}
  /* 搜索框字号 ≥16px，避免 iOS 聚焦时页面缩放 */
  .search input{font-size:16px}
  /* 搜索框与输入：保证足够触控高度 */
  .search{padding:10px 12px}
  /* 复选框较小，但整行 <label> 均可点击 → 用 min-height 撑足触控高度 */
  .task{padding:11px 0; min-height:44px; align-items:center}
  .task input{width:20px; height:20px; margin-top:0}
  /* 行内小按钮：补足触控高度 */
  .btn{padding:11px 18px}
  .btn.ghost{padding:11px 18px}
  /* 内联写了 padding 的小按钮（如「清空错题本」）也补足高度 */
  .btn.ghost[style]{min-height:36px}
  .quiz-q{font-size:16px}
  .section-title h2{font-size:19px}
  .chap-head h2{font-size:20px}
  .quiz-box{padding:15px}
  .card{padding:15px}
  .game-complete-modal{padding:22px 18px}
  .gc-emoji{font-size:44px}
  .gc-title{font-size:20px}
}


/* 返回主站标识（点品牌回 quant.ren） */
.brand-back{font-size:12px;font-weight:400;opacity:.5;margin-left:8px;letter-spacing:.02em;white-space:nowrap}
/* 极窄屏（≤400px）只留主品牌名，避免被省略号截断 */
@media (max-width:400px){
  .brand-text .brand-tail{display:none}
  .brand{font-size:15px}
}
