/* ===== 令牌（Brilliant 语言） ===== */
:root{
  --bg:#F5F3F1; --surface:#fff; --surface-2:#FAF9F7;
  --ink:#111; --ink-2:#4A4A4A; --ink-3:#63635F;
  --line:rgba(17,17,17,.08); --line-2:rgba(17,17,17,.14);
  --accent:#12805A; --accent-2:#E8F3EE;
  --ok:#12805A; --bad:#B42318;
  --r:16px; --r-sm:10px; --r-pill:999px;
  /* 设计令牌别名（2026-10-26）：让新组件复用既有色板 */
  --brand: var(--accent);
  --brand-hover: var(--accent);
  --brand-soft: var(--accent-2);
  --muted: var(--ink-3);
  --card: var(--surface);
  --warn: #A9741F;
  --r-md: 16px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.05);
  --shadow-2: 0 2px 6px rgba(17,17,17,.06), 0 18px 48px rgba(17,17,17,.10);
  --shadow-focus: 0 0 0 3px rgba(18,128,90,.16);
  --sidebar:236px;
  --side-bg:#F8F6F4;
  --sheet-bg:#FFFFFF;
  --foot-bg:#FDFCFB;
  --bubble-bg:#F3F6F4;
  --bubble-bad:#FBF1F0;
  --wrong-bg:#FDECEA;
  --on-ink:#FFFFFF;
  --shadow:0 1px 2px rgba(17,17,17,.04);
  --font-sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
  --font-serif:Georgia,"Songti SC","Noto Serif SC",serif;
  --ease:cubic-bezier(.2,.7,.3,1);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--bg); color:var(--ink); font:14px/1.6 var(--font-sans); -webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit}
.num{font-variant-numeric:tabular-nums}

.layout{display:flex; min-height:100vh}

.side{
  width:var(--sidebar); flex:none; position:fixed; inset:0 auto 0 0;
  border-right:1px solid var(--line); background:var(--side-bg);
  display:flex; flex-direction:column; padding:18px 14px;
}
.side-brand{display:flex; align-items:center; gap:10px; padding:6px 8px 18px}
.mark{width:28px;height:28px;border-radius:8px;background:var(--ink);color:var(--on-ink);display:grid;place-items:center;font-family:var(--font-serif);font-size:15px}
.side-brand-name{font-family:var(--font-serif); font-size:16px; letter-spacing:.02em}

.side-nav{flex:1; display:flex; flex-direction:column; gap:18px; overflow:auto}
.nav-group{display:flex; flex-direction:column; gap:2px}
.nav-title{font-size:12px; letter-spacing:.1em; color:var(--ink-3); padding:0 8px 6px; text-transform:uppercase}
.side-nav a{
  display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px;
  color:var(--ink-2); font-size:13.5px; transition:background .12s var(--ease), color .12s var(--ease);
}
.side-nav a:hover{background:rgba(17,17,17,.045); color:var(--ink)}
.side-nav a.on{background:var(--ink); color:var(--on-ink)}
.side-nav a .ic{width:16px; text-align:center; opacity:.75; font-size:13.5px}
.side-nav a .dot{margin-left:auto; font-size:12px; background:var(--bad); color:#fff; border-radius:999px; padding:0 6px}
.side-nav a.on .dot{background:var(--on-ink); color:var(--ink)}

.side-user{display:flex; align-items:center; gap:10px; padding:10px 8px; border-top:1px solid var(--line)}
.avatar-sm{width:28px;height:28px;border-radius:50%;background:var(--ink);color:var(--on-ink);display:grid;place-items:center;font-size:12px;font-family:var(--font-serif)}
.su-name{font-size:13.5px; font-weight:600}
.su-sub{font-size:12px; color:var(--ink-3)}

.main{flex:1; margin-left:var(--sidebar); display:flex; flex-direction:column; min-width:0}

.topbar{
  position:sticky; top:0; z-index:10; height:56px; flex:none;
  display:flex; align-items:center; gap:20px; padding:0 28px;
  background:rgba(245,243,241,.86); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.crumb{font-size:13.5px; color:var(--ink-2)}
.top-search{position:relative; margin-left:8px; flex:0 1 320px}
.top-search input{
  width:100%; height:34px; border-radius:8px; border:1px solid var(--line-2);
  background:var(--surface); padding:0 32px 0 12px; font:inherit; font-size:13.5px; color:var(--ink);
}
.top-search input:focus{outline:none; border-color:var(--ink); box-shadow:0 0 0 3px rgba(17,17,17,.06)}
.top-search .kbd{position:absolute; right:8px; top:7px; font-size:12px; color:var(--ink-3); border:1px solid var(--line-2); border-radius:4px; padding:0 4px}
.top-actions{margin-left:auto; display:flex; gap:8px}
.tbtn{height:34px; display:inline-flex; align-items:center; gap:6px; padding:0 14px; border-radius:8px; border:1px solid var(--line-2); font-size:13.5px; color:var(--ink); background:transparent; cursor:pointer; transition:background .12s}
.tbtn:hover{background:rgba(17,17,17,.04)}
.tbtn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.tbtn.primary:hover{background:#0f7350}
.tbtn b{font-weight:700}

.view{flex:1; padding:28px}
.page-head{display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:20px; gap:16px}
.page-title{font-family:var(--font-serif); font-size:28px; margin:0 0 4px; line-height:1.25}
.page-sub{color:var(--ink-3); font-size:13.5px; margin:0}

.card{background:var(--sheet-bg); border:1px solid var(--line); border-radius:var(--r); overflow:hidden}
.card-head{display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line)}
.card-title{font-size:13.5px; font-weight:600; margin:0}
.card-body{padding:16px 18px}
.card-foot{padding:12px 18px; border-top:1px solid var(--line); background:var(--surface-2)}

.grid{display:grid; gap:16px}
.g-12{grid-template-columns:repeat(12,1fr)}
.c8{grid-column:span 8} .c6{grid-column:span 6} .c4{grid-column:span 4} .c3{grid-column:span 3} .c12{grid-column:span 12}

.muted{color:var(--ink-3); font-size:13.5px}
.eyebrow{font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3)}

.stat-row{display:flex; gap:32px}
.stat-num{font-size:28px; font-weight:700; letter-spacing:-.01em}
.stat-label{font-size:12px; color:var(--ink-3); margin-top:2px}

.progress{height:6px; background:rgba(17,17,17,.08); border-radius:999px; overflow:hidden}
.progress > i{display:block; height:100%; background:var(--accent); border-radius:inherit; transition:width .45s var(--ease)}

.btn{height:36px; padding:0 16px; border-radius:8px; border:1px solid var(--line-2); background:transparent; color:var(--ink); font-size:13.5px; font-weight:500; cursor:pointer; transition:background .12s, transform .12s}
.btn:hover{background:rgba(17,17,17,.04)}
.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.btn.primary:hover{background:#0f7350; transform:translateY(-1px)}
.btn.ghost{border-color:transparent; color:var(--ink-2)}
.btn.ghost:hover{background:rgba(17,17,17,.05); color:var(--ink)}
.btn:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

.table{width:100%; border-collapse:collapse; font-size:13.5px}
.table th{
  text-align:left; font-weight:500; color:var(--ink-3); font-size:12px;
  padding:10px 18px; border-bottom:1px solid var(--line); background:var(--surface-2);
}
.table td{padding:12px 18px; border-bottom:1px solid var(--line)}
.table tr:last-child td{border-bottom:0}
.table tr:hover td{background:rgba(17,17,17,.02)}
.badge{display:inline-block; font-size:12px; padding:2px 8px; border-radius:999px; background:rgba(17,17,17,.05); color:var(--ink-2)}
.badge.ok{background:var(--accent-2); color:var(--accent)}
.badge.bad{background:var(--wrong-bg); color:var(--bad)}
.tag{font-size:12px; color:var(--ink-3)}

.quick{display:flex; gap:8px; flex-wrap:wrap}
.quick a{
  display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 14px;
  border:1px solid var(--line-2); border-radius:999px; font-size:13.5px; color:var(--ink-2); background:var(--surface);
  transition:background .12s, color .12s, border-color .12s;
}
.quick a:hover{background:var(--ink); color:var(--on-ink); border-color:var(--ink)}

.split{display:grid; grid-template-columns:220px 1fr; gap:16px; align-items:start}
.tree{display:flex; flex-direction:column; gap:2px; padding:10px}
.tree a{padding:8px 10px; border-radius:8px; font-size:13.5px; color:var(--ink-2)}
.tree a:hover{background:rgba(17,17,17,.04)}
.tree a.on{background:var(--accent-2); color:var(--accent); font-weight:600}

.list{display:flex; flex-direction:column}
.list-item{display:flex; align-items:center; gap:16px; padding:14px 18px; border-bottom:1px solid var(--line)}
.list-item:last-child{border-bottom:0}
.list-item:hover{background:rgba(17,17,17,.02)}
.li-main{flex:1; min-width:0}
.li-title{font-weight:600; font-size:13.5px; margin-bottom:2px}
.li-sub{font-size:12px; color:var(--ink-3)}
.li-bar{width:140px; flex:none}

.chart{display:flex; align-items:flex-end; gap:12px; height:200px; padding:18px}
.chart .bar{flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:8px; height:100%}
.chart .bar > i{width:100%; max-width:28px; border-radius:6px 6px 3px 3px; background:rgba(17,17,17,.10); transition:height .5s var(--ease)}
.chart .bar.today > i{background:var(--accent)}
.chart .bar span{font-size:12px; color:var(--ink-3)}

.foot{
  flex:none; display:flex; align-items:center; justify-content:space-between;
  padding:18px 28px; border-top:1px solid var(--line); color:var(--ink-3); font-size:12px;
}
.foot-links{display:flex; gap:16px}
.foot-links a:hover{color:var(--ink)}

.quiz{display:grid; grid-template-columns:1fr 280px; gap:16px; align-items:start}
.q-stem{font-size:16px; line-height:1.75; margin:12px 0 18px}
.opt{display:flex; gap:12px; padding:14px 16px; margin-bottom:10px; border:1px solid var(--line-2); border-radius:var(--r-sm); cursor:pointer; background:var(--surface); transition:border-color .12s, background .12s}
.opt:hover{background:rgba(17,17,17,.02)}
.opt .k{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;flex:none;border:1px solid var(--line-2);font-size:12px;color:var(--ink-2)}
.opt.on{border-color:var(--ink); background:rgba(17,17,17,.03)}
.opt.on .k{background:var(--ink); color:#fff; border-color:var(--ink)}
.opt.right{border-color:var(--ok); background:var(--accent-2)}
.opt.right .k{background:var(--ok); color:#fff; border-color:var(--ok)}
.opt.wrong{border-color:var(--bad); background:#FDECEA}
.opt.wrong .k{background:var(--bad); color:#fff; border-color:var(--bad)}
.analysis{border-top:1px solid var(--line); margin-top:18px; padding-top:14px; font-size:13.5px; line-height:1.8; color:var(--ink-2)}
.sheet{display:grid; grid-template-columns:repeat(5,1fr); gap:6px; padding:14px 18px}
.sheet a{height:28px; display:grid; place-items:center; border-radius:6px; border:1px solid var(--line); font-size:12px; color:var(--ink-2)}
.sheet a.done{background:var(--accent-2); border-color:transparent; color:var(--accent)}
.sheet a.now{border-color:var(--ink); color:var(--ink); font-weight:700}

.tabbar{display:none}
@media (max-width:1024px){
  .side{display:none}
  .main{margin-left:0}
  .view{padding:16px 16px 88px}
  .topbar{padding:0 16px; gap:10px}
  .top-search{display:none}
  .top-actions .tbtn:not(.primary){display:none}
  .g-12{grid-template-columns:repeat(6,1fr)}
  .c8,.c4,.c6,.c3,.c12{grid-column:span 6}
  .split{grid-template-columns:1fr}
  .tree{flex-direction:row; overflow:auto; padding:8px}
  .quiz{grid-template-columns:1fr}
  .page-title{font-size:24px}
  .foot{display:none}
  .tabbar{
    position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);
    background:var(--sheet-bg);backdrop-filter:blur(16px);border-top:1px solid var(--line);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .tabbar a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:9px 0 7px;font-size:12px;color:var(--ink-3)}
  .tabbar a .ti{font-size:16px;line-height:1}
  .tabbar a.on{color:var(--ink)}
}


/* ===== 答题页（Brilliant 风格） ===== */
.lesson-wrap { max-width: 820px; margin: 8px auto 0; }
.lesson { background: var(--sheet-bg); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.lesson-top { padding: 16px 20px; }
.lesson-progress { height: 6px; background: rgba(17,17,17,.07); border-radius: 999px; overflow: hidden; }
.lesson-progress > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }
.lesson-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size:12px; color: var(--ink-3); }
.lesson-exit { color: var(--ink-3); }
.lesson-exit:hover { color: var(--ink); }
.lesson-body { padding: 28px 32px 8px; }
.lesson-prompt { font-size:19px; line-height: 1.65; font-weight: 600; letter-spacing: -.01em; margin-bottom: 22px; }
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease), transform .12s var(--ease);
}
.opt-card:hover { border-color: rgba(17,17,17,.32); }
.opt-card.is-on { border-color: var(--ink); background: rgba(17,17,17,.035); }
.opt-card.is-right { border-color: var(--ok); background: var(--accent-2); }
.opt-card.is-wrong { border-color: var(--bad); background: var(--wrong-bg); }
.opt-card.is-dim { opacity: .5; }
.opt-key {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%; font-size:12px; color: var(--ink-2);
}
.opt-card.is-on .opt-key { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt-card.is-right .opt-key { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt-card.is-wrong .opt-key { background: var(--bad); color: #fff; border-color: var(--bad); }
.opt-text { flex: 1; font-size:13.5px; line-height: 1.6; }
.opt-mark { font-size:15px; font-weight: 700; }
.opt-mark.ok { color: var(--ok); }
.opt-mark.bad { color: var(--bad); }

/* 题目图片（题干 / 选项 / 解析） */
.opt-card.has-img { align-items: flex-start; }
.opt-card.has-img .opt-key { margin-top: 2px; }
.opt-imgs { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.q-images, .fb-images { display: flex; flex-direction: column; gap: 10px; }
.q-images { margin: -8px 0 20px; }
.fb-images { margin-top: 12px; }
.q-images img, .opt-imgs img, .fb-images img {
  display: block; max-width: 100%; width: auto; max-height: 360px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: zoom-in;
}
.opt-imgs img { max-height: 300px; border-radius: 10px; }
.q-images img:hover, .opt-imgs img:hover, .fb-images img:hover { border-color: var(--line-2); }

/* 图片放大预览 */
.img-viewer {
  position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
  padding: 28px; background: rgba(12,12,14,.86); backdrop-filter: blur(4px);
}
.img-viewer.open { display: flex; }
.img-viewer img {
  max-width: min(1200px, 94vw); max-height: 88vh; width: auto; height: auto;
  border-radius: 12px; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.img-viewer-close {
  position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.img-viewer-close:hover { background: rgba(255,255,255,.26); }
body.img-viewer-open { overflow: hidden; }
@media (max-width: 600px) {
  .img-viewer { padding: 12px; }
  .img-viewer img { max-height: 82vh; }
  .q-images img, .fb-images img { max-height: 300px; }
  .opt-imgs img { max-height: 240px; }
}

/* 气泡反馈 + 吉祥物 */
.fb { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; }
.fb-body { background: var(--bubble-bg); border-radius: 16px; padding: 16px 16px; flex: 1; }
.fb-bad .fb-body { background: var(--bubble-bad); }
.fb-title { font-weight: 700; font-size:13.5px; margin-bottom: 6px; }
.fb-ok .fb-title { color: var(--ok); }
.fb-bad .fb-title { color: var(--bad); }
.fb-text { font-size:13.5px; line-height: 1.75; color: var(--ink-2); }

/* 选项下方的正确答案条（参考小程序） */
.answer-reveal {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 2px; padding: 12px 16px;
  background: linear-gradient(135deg, rgba(41,168,92,.12), rgba(41,168,92,.04));
  border: 1px solid rgba(41,168,92,.28);
  border-radius: 14px;
}
.answer-reveal-icon {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok); color: #fff; font-size: 16px; font-weight: 800;
}
.answer-reveal-label { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.answer-reveal-value { font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--ok); letter-spacing: .06em; }
.answer-reveal-hint {
  margin-left: auto; flex: none; padding: 2px 10px; border-radius: 999px;
  background: rgba(41,168,92,.14); color: var(--ok); font-size: 12px;
}
.answer-reveal.is-text { align-items: flex-start; flex-wrap: wrap; }
.answer-reveal.is-text .answer-reveal-label { line-height: 28px; }
.answer-reveal.is-text .answer-reveal-value {
  flex: 1 1 100%; font-size: 14px; line-height: 1.75; font-weight: 600;
  letter-spacing: 0; word-break: break-word; color: var(--ink);
}
.mascot {
  width: 34px; height: 34px; flex: none; border-radius: 12px 12px 14px 10px;
  background: radial-gradient(120% 120% at 30% 25%, #6FE3A6 0%, #29CC57 55%, #12805A 100%);
  position: relative; box-shadow: 0 4px 12px rgba(18,128,90,.25);
}
.mascot::after {
  content: ''; position: absolute; inset: 11px; border-radius: 4px; background: #111;
}
.mascot.sad { filter: saturate(.5) brightness(.98); }

.lesson-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 32px 20px; border-top: 1px solid var(--line); background: var(--foot-bg);
}
.foot-right { display: flex; align-items: center; gap: 14px; }

@media (max-width: 1024px) {
  .lesson-wrap { margin-top: 0; }
  .lesson-body { padding: 20px 16px 4px; }
  .lesson-prompt { font-size:16px; }
  .lesson-foot { padding: 16px 16px 16px; }
  .foot-right .muted { display: none; }
}


/* ===== 夜间模式 ===== */
html[data-theme="dark"]{
  --bg:#101215;
  --surface:#1A1D22;
  --surface-2:#15181C;
  --sheet-bg:#1A1D22;
  --side-bg:#141619;
  --foot-bg:#171A1E;
  --bubble-bg:#20262A;
  --bubble-bad:#2A1F20;
  --wrong-bg:#2A1F20;
  --ink:#F1F3F5;
  --ink-2:#B7BDC6;
  --ink-3:#9AA1AC;
  --line:rgba(255,255,255,.14);
  --line-2:rgba(255,255,255,.22);
  --accent:#34D07A;
  --accent-2:rgba(52,208,122,.14);
  --ok:#34D07A;
  --bad:#FF7A72;
  --on-ink:#0F1114;
  --shadow:0 1px 2px rgba(0,0,0,.4);
}
html[data-theme="dark"] body{ background:var(--bg); color:var(--ink); }
html[data-theme="dark"] .topbar{ background:rgba(16,18,21,.86); }
html[data-theme="dark"] .chart .bar > i{ background:rgba(255,255,255,.14); }
html[data-theme="dark"] .chart .bar.today > i{ background:var(--accent); }
html[data-theme="dark"] .table tr:hover td{ background:rgba(255,255,255,.03); }
html[data-theme="dark"] .list-item:hover{ background:rgba(255,255,255,.03); }
html[data-theme="dark"] .opt-card:hover{ border-color:rgba(255,255,255,.34); }
html[data-theme="dark"] .btn:hover{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .tbtn:hover{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .progress{ background:rgba(255,255,255,.10); }
html[data-theme="dark"] .top-search input{ background:var(--surface); color:var(--ink); }
html[data-theme="dark"] .mascot{ box-shadow:0 4px 14px rgba(0,0,0,.5); }

/* 主题切换按钮 */
.theme-btn{
  width:34px; height:34px; flex:none; display:grid; place-items:center;
  border:1px solid var(--line-2); border-radius:8px; background:transparent; cursor:pointer;
  color:var(--ink-2); transition:background .12s, color .12s;
}
.theme-btn:hover{ background:rgba(127,127,127,.12); color:var(--ink); }
.theme-btn svg{ width:16px; height:16px; }


/* ===== 状态 / 登录 / 选题库 ===== */
.state { padding: 42px 20px; text-align: center; color: var(--ink-3); font-size:13.5px; }
.state.err { color: var(--bad); }

.login-wrap { display: flex; justify-content: center; padding: 40px; }
.login-card { width: 420px; max-width: 100%; padding: 28px; }
.login-input {
  width: 100%; height: 42px; padding: 16px; font: inherit; font-size:15px;
  letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.login-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(127,127,127,.14); }
.login-input::placeholder { letter-spacing: .06em; text-transform: none; color: var(--ink-3); }
.login-err { margin-top: 12px; color: var(--bad); font-size:13.5px; }
.login-hint { margin-top: 16px; color: var(--ink-3); font-size:12px; line-height: 1.7; }


/* 上传拖放区 */
.upload-drop{
  display:block; border:1.5px dashed var(--line-2); border-radius:12px; padding:28px 20px;
  text-align:center; cursor:pointer; transition:border-color .14s var(--ease), background .14s var(--ease);
}
.upload-drop:hover{ border-color:var(--accent); background:var(--accent-2); }


/* 登录页：原账号用户提示（W2） */
.login-olduser {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent-2);
  border: 1px solid rgba(18,128,90,.18);
}
.login-olduser .lou-title { font-size:13.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.login-olduser .lou-body { font-size:12px; line-height: 1.75; color: var(--ink-2); }
.login-olduser .lou-body b { color: var(--ink); }
html[data-theme="dark"] .login-olduser { border-color: rgba(52,208,122,.25); }


/* 考点详情：一句话 / 口诀 强调块 */
.highlight-block { background: var(--accent-2); border-radius: 12px; padding: 16px 16px; }
.highlight-tag { font-size:12px; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.highlight-text { font-size:15px; line-height: 1.8; color: var(--ink); }
.global-loading {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 999;
  background: rgba(17,17,17,.86); color: #fff; padding: 12px 20px; border-radius: 10px; font-size:13.5px;
}


/* 弹窗 + Toast（W8） */
.modal-mask {
  position: fixed; inset: 0; z-index: 900; background: rgba(16,24,20,.42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
  width: min(560px, 100%); max-height: 82vh; background: var(--card, #fff);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.22);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { display:flex; justify-content:space-between; gap:16px; padding:18px 20px 10px; }
.modal-title { font-size:16px; font-weight:700; color:var(--ink); }
.modal-meta { font-size:12px; color:var(--ink-3); margin-top:4px; }
.modal-close { color:var(--ink-3); font-size:16px; text-decoration:none; }
.modal-body { padding: 4px 20px 16px; overflow:auto; font-size:13.5px; line-height:1.9; color:var(--ink-2); white-space:pre-wrap; }
.modal-foot { padding: 12px 20px 16px; display:flex; justify-content:flex-end; }
.app-toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 1000;
  background: rgba(17,17,17,.88); color:#fff; padding: 12px 16px; border-radius: 10px; font-size:13.5px;
}
html[data-theme="dark"] .modal-card { background:#1b2420; }


/* W12 移动端：首页统计数字在窄屏排两列，避免「已做题/目」折行 */
@media (max-width: 480px) {
  .stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .stat-num { font-size:24px; }
  .stat-label { white-space: nowrap; font-size:12px; }
}


/* ===== 小程序推广（4.5.2 已发布） ===== */
.promo-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(120deg, #0f7a4d 0%, #12a35f 55%, #34c27a 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15,122,77,.18);
}
.promo-code { flex: none; text-align: center; }
.promo-code img {
  width: 84px; height: 84px; border-radius: 12px; background: #fff; padding: 5px;
  cursor: pointer; display: block;
}
.promo-code-tip { font-size:12px; margin-top: 4px; opacity: .9; }
.promo-text { flex: 1; min-width: 0; }
.promo-title { font-size:16px; font-weight: 700; letter-spacing: .01em; }
.promo-sub { font-size:13.5px; opacity: .92; margin-top: 4px; }
.promo-hint { font-size:12px; opacity: .85; margin-top: 6px; }
.promo-hint b { font-weight: 700; }
.promo-actions { flex: none; }
.promo-btn {
  height: 38px; padding: 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.94); color: #0f7a4d; font-size:13.5px; font-weight: 600;
}
.promo-btn:hover { background: #fff; }

/* 登录页扫码块 */
.login-mp {
  display: flex; gap: 14px; align-items: center; margin-top: 16px; padding: 12px 16px;
  border-radius: 12px; background: var(--accent-2); border: 1px solid rgba(18,128,90,.16);
}
.login-mp-code img { width: 76px; height: 76px; border-radius: 10px; background: #fff; padding: 4px; display: block; }
.login-mp-text .lmt-title { font-size:13.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.login-mp-text .lmt-sub { font-size:12px; line-height: 1.7; color: var(--ink-2); }

/* 右下角悬浮按钮（桌面） */
.mp-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; padding: ; border-radius: 50%; cursor: pointer;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(0,0,0,.12);
  transition: width .18s ease, border-radius .18s ease;
}
.mp-fab img { width: 38px; height: 38px; border-radius: 9px; display: block; }
.mp-fab > span:not(.mp-fab-close) { display: none; }
.mp-fab::after {
  content: '微信扫码刷题'; position: absolute; right: 60px; white-space: nowrap;
  background: var(--ink); color: #fff; font-size:12px; padding: 8px 12px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.mp-fab:hover::after { opacity: .95; }
.mp-fab:hover { transform: translateY(-1px); }
.mp-fab-close {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size:12px; line-height: 20px; text-align: center;
  opacity: 0; transition: opacity .15s ease; cursor: pointer;
}
.mp-fab:hover .mp-fab-close { opacity: .9; }
html[data-theme="dark"] .mp-fab { background: #23272c; }

@media (max-width: 1024px) {
  .promo-banner { flex-wrap: wrap; padding: 16px 16px; gap: 12px; }
  .promo-code img { width: 68px; height: 68px; }
  .promo-actions { display: none; }
  .mp-fab { display: none; }
  .login-mp { align-items: flex-start; }
}


/* 手机端：隐藏小程序码与桌面文案，突出「搜一搜」 */
.promo-hint-mobile { display: none; }
@media (max-width: 1024px) {
  .promo-code { display: none; }
  .promo-hint-desktop { display: none; }
  .promo-hint-mobile { display: block; }
  .promo-banner { padding: 16px 20px; }
}


/* ===== 更重的推广 ===== */
.promo-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px; font-size:13.5px;
  background: linear-gradient(90deg, #0f7a4d, #16a862 60%, #2fc27c);
  color: #fff;
}
.promo-topbar .ptb-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #b9ffd9; flex: none;
  box-shadow: 0 0 0 3px rgba(185,255,217,.25);
}
.promo-topbar .ptb-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-topbar .ptb-cta {
  flex: none; color: #0f7a4d; background: #fff; border-radius: 999px;
  padding: 5px 12px; font-weight: 600; font-size:12px;
}
.promo-topbar .ptb-close { flex: none; color: rgba(255,255,255,.85); font-size:13.5px; }

/* 欢迎弹窗 */
.promo-welcome { padding: 28px 24px 24px; text-align: center; }
.promo-welcome .pw-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: var(--accent-2); color: var(--accent); font-size:12px; font-weight: 700; letter-spacing: .08em;
}
.promo-welcome .pw-title { font-size:24px; font-weight: 800; margin: 10px 0 6px; color: var(--ink); }
.promo-welcome .pw-sub { font-size:13.5px; color: var(--ink-2); margin-bottom: 18px; }
.promo-welcome .pw-code {
  width: 200px; height: 200px; max-width: 60vw; max-height: 60vw;
  border-radius: 14px; background: #fff; border: 1px solid var(--line); padding: 8px;
}
.promo-welcome .pw-hint { font-size:12px; color: var(--ink-3); margin-top: 10px; }
.promo-welcome .pw-search {
  margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-2);
  font-size:12px; color: var(--ink-2);
}
.promo-welcome .pw-actions { display: flex; gap: 10px; margin-top: 18px; }
.promo-welcome .pw-actions .btn { flex: 1; height: 42px; }

/* ===== 视频版推广弹窗 ===== */
.modal-mask-video { padding: 0; }
.modal-card-video {
  width: min(520px, 100vw, calc((92vh - 100px) * 9 / 16));
  max-height: 92vh; background: #0d0f0e;
}
.promo-video { position: relative; padding: 0 0 16px; text-align: center; color: #fff; }
.pv-video-wrap { position: relative; width: 100%; background: #000; }
.pv-video {
  display: block; width: 100%; height: auto;
  aspect-ratio: 9 / 16; object-fit: cover; background: #000;
}
.pv-close {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.5); color: #fff; font-size: 18px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.pv-close:hover { background: rgba(0,0,0,.74); }
.pv-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #111; font-size: 24px;
  display: grid; place-items: center; cursor: pointer; z-index: 2;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.pv-play span { margin-left: 4px; }
.pv-sound-tip { display: none; padding: 10px 18px 0; font-size: 12px; color: #F5C56B; }
.pv-caption { padding: 10px 18px 0; font-size: 13px; color: rgba(255,255,255,.72); }
.pv-foot { display: flex; gap: 10px; padding: 12px 18px 0; }
.pv-foot .btn {
  flex: 1; height: 40px; background: transparent; color: #fff;
  border-color: rgba(255,255,255,.26);
}
.pv-foot .btn:hover { background: rgba(255,255,255,.08); }
.pv-foot .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pv-foot .btn.primary:hover { filter: brightness(1.05); }

/* 横幅加大 */
.promo-banner { padding: 24px 24px; gap: 24px; }
.promo-code img { width: 120px; height: 120px; }
.promo-code-tip { font-size:12px; }
.promo-title { font-size:19px; }
.promo-sub { font-size:13.5px; }
.promo-btn { height: 42px; padding: 20px; font-size:13.5px; }

@media (max-width: 1024px) {
  .promo-topbar { padding: 9px 12px; font-size:12px; gap: 8px; }
  .promo-topbar .ptb-text { white-space: normal; line-height: 1.5; }
  .promo-topbar .ptb-cta { display: none; }
  .promo-welcome .pw-actions { flex-direction: column; }
  .promo-welcome .pw-actions .btn { width: 100%; }
}


/* ===== 选择题库 v2（对齐小程序） ===== */
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cat-chip {
  height: 30px; padding: 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size:12px;
}
.cat-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 16px 16px 16px; }
.proj-card {
  padding: 16px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--card, #fff); transition: transform .12s ease, box-shadow .12s ease;
}
.proj-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.pc-name { font-size:15px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.pc-meta { font-size:12px; color: var(--ink-3); }
.pc-field { font-size:12px; color: var(--accent); margin-top: 6px; }

.subj-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.subj-row.on { background: var(--accent-2); }
.subj-check {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size:13.5px; color: #fff; flex: none;
}
.subj-check.on { background: var(--accent); border-color: var(--accent); }

.setup-foot {
  position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px; margin-top: 12px;
  background: var(--sheet-bg); border-top: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 -6px 20px rgba(0,0,0,.05);
}
.setup-foot .sf-info { font-size:13.5px; color: var(--ink-2); }
.setup-foot .sf-info b { font-size:16px; color: var(--accent); }
.setup-foot .btn.dim { opacity: .45; }
@media (max-width: 1024px) {
  .proj-grid { grid-template-columns: 1fr 1fr; padding: 12px; }
  .setup-foot { position: fixed; left: 12px; right: 12px; bottom: 78px; border-radius: 12px; z-index: 20; }
}


/* 选择题库页隐藏悬浮推广按钮，避免挡住底部「确认选择」 */
body.setup-mode .mp-fab { display: none; }


/* ===== 答题页设置（对齐小程序） ===== */
.lesson-tools { display: inline-flex; align-items: center; gap: 14px; }
.lesson-gear { color: var(--ink-3); font-size:12px; }
.lesson-gear:hover { color: var(--ink); }

.qz-fs-s .lesson-prompt { font-size:15px; }
.qz-fs-m .lesson-prompt { font-size:16px; }
.qz-fs-l .lesson-prompt { font-size:19px; }
.qz-fs-xl .lesson-prompt { font-size:24px; }
.qz-fs-s .opt-text { font-size:13.5px; }
.qz-fs-l .opt-text { font-size:16px; }
.qz-fs-xl .opt-text { font-size:16px; }

.qs-mask { position: fixed; inset: 0; background: rgba(16,24,20,.35); z-index: 200; }
.qs-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); z-index: 201;
  background: var(--sheet-bg); box-shadow: -18px 0 46px rgba(0,0,0,.16);
  display: flex; flex-direction: column;
}
.qs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--line);
}
.qs-title { font-size:16px; font-weight: 700; color: var(--ink); }
.qs-close { color: var(--ink-3); font-size:16px; }
.qs-body { flex: 1; overflow: auto; padding: 8px 20px; }
.qs-group { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.qs-group:last-child { border-bottom: 0; }
.qs-group-title { font-size:12px; color: var(--ink-3); padding: 8px 20px 4px; letter-spacing: .04em; }
.qs-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; font-size:13.5px; color: var(--ink);
}
.qs-item.qs-click { cursor: pointer; }
.qs-item.qs-click:hover { background: var(--accent-2); }
.qs-item.on { color: var(--accent); font-weight: 600; }
.qs-switch {
  width: 44px; height: 26px; border-radius: 999px; background: rgba(17,17,17,.16);
  position: relative; cursor: pointer; flex: none; transition: background .16s ease;
}
.qs-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .16s ease;
}
.qs-switch.on { background: var(--accent); }
.qs-switch.on::after { transform: translateX(18px); }
.qs-opts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.qs-opt {
  height: 28px; min-width: 40px; padding: 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size:12px;
}
.qs-opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
html[data-theme="dark"] .qs-switch { background: rgba(255,255,255,.2); }
html[data-theme="dark"] .qs-item.qs-click:hover { background: rgba(255,255,255,.06); }

@media (max-width: 1024px) {
  .qs-panel { width: 100vw; }
  .lesson-tools { gap: 10px; }
}


/* ===== 答题卡 ===== */
.lesson-sheet { color: var(--ink-3); font-size:12px; }
.lesson-sheet:hover { color: var(--ink); }
.as-mask { position: fixed; inset: 0; background: rgba(16,24,20,.42); z-index: 220; }
.as-panel {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 221;
  width: min(680px, 92vw); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--sheet-bg); border-radius: 16px; box-shadow: 0 28px 70px rgba(0,0,0,.24);
}
.as-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
.as-title { font-size:16px; font-weight: 700; color: var(--ink); }
.as-close { color: var(--ink-3); font-size:16px; }
.as-stats { display: flex; gap: 16px; padding: 20px 12px; font-size:13.5px; color: var(--ink-2); flex-wrap: wrap; }
.as-stats b { color: var(--ink); }
.as-stats .ok b { color: var(--accent); }
.as-stats .bad b { color: var(--bad); }
.as-filters { display: flex; gap: 8px; padding: 20px 12px; flex-wrap: wrap; }
.as-chip {
  height: 28px; padding: 12px; border-radius: 999px; cursor: pointer; font-size:12px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
}
.as-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.as-grid {
  flex: 1; overflow: auto; padding: 4px 20px 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px;
}
.as-cell {
  height: 40px; border-radius: 9px; cursor: pointer; font-size:13.5px;
  border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink-2);
}
.as-cell.right { background: var(--accent-2); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.as-cell.wrong { background: rgba(214,69,69,.10); border-color: rgba(214,69,69,.45); color: var(--bad); font-weight: 600; }
.as-cell.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.as-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px 16px; border-top: 1px solid var(--line);
}
.as-foot .muted { font-size:12px; }
html[data-theme="dark"] .as-cell { background: #1b2420; }
html[data-theme="dark"] .as-cell.right { background: rgba(52,208,122,.14); }
html[data-theme="dark"] .as-cell.wrong { background: rgba(224,102,102,.16); }


/* 收藏按钮（答题页） */
.foot-left { display: flex; align-items: center; gap: 14px; }
.fav-btn { font-size:13.5px; color: var(--ink-3); }
.fav-btn:hover { color: var(--accent); }


/* 减少动态效果（设置里可开） */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}


/* 考点冲刺 */
.sprint-card { max-width: 820px; margin: 0 auto; overflow: hidden; }
.sprint-head { padding: 20px 24px 8px; }
.sprint-name { font-size:19px; font-weight: 750; color: var(--ink); }
.sprint-meta { font-size:12px; color: var(--ink-3); margin-top: 6px; }
.sprint-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 24px 16px; }
.sprint-progress { height: 4px; background: rgba(17,17,17,.07); }
.sprint-progress > i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }

/* 资料预览 */
.preview-img { display: block; width: 100%; max-width: 720px; margin: 0 auto 12px; border-radius: 10px; border: 1px solid var(--line); }
.preview-lock {
  margin-top: 8px; padding: 16px 20px; border-radius: 12px; background: var(--accent-2);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.preview-lock .pl-title { font-size:13.5px; font-weight: 600; color: var(--ink); }
.preview-lock .pl-btns { display: flex; gap: 10px; }
html[data-theme="dark"] .sprint-progress { background: rgba(255,255,255,.1); }


/* 卡片不强制等高：避免「今日任务/最近做题/设置-显示」出现大片空白 */
.grid { align-items: start; }


/* ===== P1 视觉整理 ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 20px; text-align: center;
}
.empty-state .es-icon {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--accent-2); color: var(--accent); font-size:24px; margin-bottom: 4px;
}
.empty-state .es-title { font-size:15px; font-weight: 600; color: var(--ink); }
.empty-state .es-desc { font-size:13.5px; color: var(--ink-3); max-width: 380px; line-height: 1.7; }
.empty-state .btn { margin-top: 6px; }

/* 资料预览缩略图 + 吸底解锁 */
.pv-thumbs {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 12px; margin-bottom: 6px; background: var(--sheet-bg);
}
.pv-thumb {
  flex: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface, #fff); color: var(--ink-2); font-size:12px;
}
.pv-thumb:hover { border-color: var(--accent); color: var(--accent); }
.preview-lock { position: sticky; bottom: 12px; box-shadow: 0 -6px 18px rgba(0,0,0,.06); }

/* 分页条 */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 16px; border-top: 1px solid var(--line); }
.pager .btn { height: 30px; font-size:12px; }

/* 错题操作按钮加大到可点 */
.wrong-act { height: 32px; padding: 12px; font-size:12px; }

/* 答题页工具按钮 */
.lesson-tool {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 12px;
  border-radius: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); font-size:12px; cursor: pointer;
}
.lesson-tool:hover { border-color: var(--accent); color: var(--accent); }
.lesson-tools { display: inline-flex; align-items: center; gap: 8px; }


/* ===== P2 收尾 ===== */
/* 搜索关键词高亮 */
mark { background: #FFF2A8; color: inherit; padding: 1px; border-radius: 3px; }
html[data-theme="dark"] mark { background: rgba(255,214,0,.28); color: #fff; }

/* 考点页吸顶搜索条 */
.points-search {
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 8;
  padding: 12px 12px; margin-bottom: 12px;
  background: var(--bg);
}
.points-search .login-input { flex: 1; letter-spacing: 0; }
.points-search .muted { flex: none; font-size:12px; }

/* 字号体系：页面标题 24 / 卡片标题 17 / 正文 14 / 次要 13 */
.page-title { font-size:24px; letter-spacing: -.01em; }
.card-title { font-size:16px; }
body { font-size:13.5px; }
.muted { font-size:13.5px; }

/* 移动端触控目标 ≥ 40px */
@media (max-width: 1024px) {
  button, .btn, .as-chip, .qs-opt, .lesson-tool { min-height: 40px; }
  .wrong-act { min-height: 40px; padding: 16px; }
  .pager .btn { min-height: 40px; }
  .side-nav a { padding: 12px 8px; }
  .cat-chip { min-height: 36px; }
  .as-cell { height: 44px; }
  .pv-thumb { width: 40px; height: 40px; }
}


/* 按钮文字不换行（避免「练习」被挤成两行） */
.btn, button.btn, .pager .btn, .wrong-act { white-space: nowrap; }


/* ===== 首页重构：学习概览 ===== */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0; margin-bottom: 16px; overflow: hidden;
}
.hh-main { padding: 24px; }
.hh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hh-name { font-size:19px; font-weight: 750; color: var(--ink); }
.hh-sub { font-size:13.5px; color: var(--ink-3); margin-top: 4px; }
.hh-progress { margin-bottom: 18px; }
.hh-progress-meta { display: flex; justify-content: space-between; font-size:13.5px; color: var(--ink-2); margin-top: 8px; }
.hh-progress-meta b { color: var(--ink); }
.hh-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hh-stats .stat-num { font-size:24px; }
.hh-side {
  padding: 20px; background: var(--surface-2, #FAF9F7);
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
}
.hh-task-title { font-size:15px; font-weight: 700; color: var(--ink); }
.hh-task-desc { font-size:12px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.hh-cta { display: flex; justify-content: center; }
.hh-task-link { display: block; text-align: center; margin-top: 10px; font-size:12px; }
.home-recent td, .home-recent th { padding-top: 10px; padding-bottom: 10px; }

@media (max-width: 1024px) {
  .home-hero { grid-template-columns: 1fr; }
  .hh-side { border-left: 0; border-top: 1px solid var(--line); }
  .hh-stats { gap: 20px; }
}


/* ===== 答题页双栏（左题 + 右侧栏） ===== */
.quiz-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  align-items: start;
}
.quiz-shell .lesson-wrap { margin: 0; max-width: none; }

.quiz-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.quiz-side.is-collapsed { align-items: flex-end; }
.side-expand {
  height: 34px; padding: 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size:13.5px;
}

.side-card {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1);
  overflow: hidden; padding-bottom: 14px;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
.side-title { font-size:16px; font-weight: 700; color: var(--ink); margin: 0; }
.side-link { font-size:12px; color: var(--ink-3); cursor: pointer; }
.side-link:hover { color: var(--accent); }

/* 答题卡网格 */
.quiz-side .as-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  padding: 16px; max-height: 268px; overflow-y: auto;
  position: static; inset: auto;
}
.quiz-side .as-cell {
  height: 38px; border-radius: 9px; cursor: pointer; font-size:13.5px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.quiz-side .as-cell:hover { border-color: var(--brand); color: var(--brand); }
.quiz-side .as-cell.right { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.quiz-side .as-cell.wrong { background: rgba(168,55,42,.10); border-color: rgba(168,55,42,.40); color: var(--bad); font-weight: 600; }
.quiz-side .as-cell.cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.side-stats { display: flex; gap: 18px; padding: 16px 16px; font-size:13.5px; color: var(--muted); }
.side-stats b { font-size:15px; color: var(--ink); margin-left: 4px; }
.side-stats b.ok { color: var(--ok); }
.side-stats b.bad { color: var(--bad); }
.side-stats-sub { padding-top: 6px; }
.side-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 14px 18px 0; height: 36px; border-radius: 10px;
  border: 1px solid var(--line-2); font-size:13.5px; color: var(--ink); cursor: pointer;
}
.side-btn:hover { border-color: var(--brand); color: var(--brand); }

/* 设置面板 */
.side-body { padding: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; font-size:13.5px; color: var(--ink); }
.set-tip { padding: 16px 8px; font-size:12px; color: var(--ink-3); line-height: 1.6; }
.sw {
  width: 42px; height: 24px; border-radius: 999px; background: rgba(17,17,17,.16);
  position: relative; cursor: pointer; flex: none; transition: background .16s ease;
}
.sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .16s ease;
}
.sw.on { background: var(--brand); }
.sw.on::after { transform: translateX(18px); }
.side-select {
  height: 30px; padding: 8px; border-radius: 8px; font-size:13.5px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
}
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size:13.5px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); line-height: 1;
}
.stepper b { min-width: 16px; text-align: center; font-size:13.5px; color: var(--ink); }
.font-opts { display: inline-flex; gap: 4px; }
.font-opt {
  height: 28px; padding: 8px; border-radius: 7px; cursor: pointer; font-size:12px;
  border: 1px solid transparent; background: transparent; color: var(--ink-3);
}
.font-opt.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* 护眼模式 */
body.eye-care .quiz-shell { filter: sepia(.18) saturate(.94) brightness(1.02); }
body.eye-care { background: #F6F0E2; }

/* 成绩弹窗 */
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 8px 16px; }
.result-grid > div { text-align: center; padding: 16px 8px; border-radius: 12px; background: var(--surface-2); }
.result-grid b { display: block; font-size:24px; font-weight: 750; color: var(--ink); }
.result-grid b.ok { color: var(--ok); }
.result-grid b.bad { color: var(--bad); }
.result-grid span { font-size:12px; color: var(--ink-3); }

@media (max-width: 1200px) {
  .quiz-shell { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1024px) {
  .quiz-shell { grid-template-columns: 1fr; padding: 16px 16px 120px; }
  .quiz-side { display: none; }
}


/* 当前题的状态色优先于「当前」高亮 */
.quiz-side .as-cell.wrong.cur {
  background: var(--bad); border-color: var(--bad); color: #fff;
}
.quiz-side .as-cell.right.cur {
  background: var(--brand); border-color: var(--brand); color: #fff;
}


/* 夜间模式：开关关闭态轨道要可见 */
html[data-theme="dark"] .sw { background: rgba(255, 255, 255, .26); }
html[data-theme="dark"] .sw.on { background: var(--brand); }


/* ===== 顶部导航布局（2026-10-27 重构） ===== */
.layout { display: block; min-height: 100vh; }
.main { margin-left: 0 !important; display: block; min-height: 100vh; }
.view {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 28px 32px 56px;
}
.foot { max-width: 1240px; margin: 0 auto; padding: 24px 32px 40px; }

.topnav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 34px;
  height: 64px; padding: 32px;
  background: rgba(245,243,241,.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="dark"] .topnav { background: rgba(20,24,22,.88); }

.tn-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); text-decoration: none; }
.tn-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand, var(--accent)); color: #fff; font-size:15px; font-weight: 700;
}
.tn-name { font-size:16px; letter-spacing: .01em; }

.tn-links { display: flex; align-items: center; gap: 28px; flex: none; }
.tn-links a {
  position: relative; padding: 20px; font-size:13.5px; color: var(--ink-2);
  text-decoration: none; background: none !important; border-radius: 0;
}
.tn-links a:hover { color: var(--ink); background: none !important; }
.tn-links a.on { color: var(--ink); font-weight: 650; }
.tn-links a.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 12px; height: 2px;
  border-radius: 2px; background: var(--brand, var(--accent));
}

.tn-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tn-search { width: 220px; }
.tn-search input {
  width: 100%; height: 34px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size:13.5px;
}
.tn-search input:focus { outline: none; border-color: var(--brand, var(--accent)); box-shadow: var(--shadow-focus); }

.tn-msg, .tn-icon {
  position: relative; width: 34px; height: 34px; border-radius: 10px;
  display: inline-grid; place-items: center; border: 1px solid transparent;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.tn-msg:hover, .tn-icon:hover { background: var(--surface-2); color: var(--ink); }
.tn-msg svg, .tn-icon svg { width: 18px; height: 18px; }
.tn-msg .nav-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 4px;
  border-radius: 999px; background: var(--bad); color: #fff; font-size:12px; font-style: normal;
  display: grid; place-items: center; line-height: 1;
}

.tn-cta { height: 36px; padding: 16px; font-size:13.5px; }
.tn-user { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; text-decoration: none; color: var(--ink-2); }
.tn-user:hover { color: var(--ink); }
.tn-user .avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size:12px; }
.tn-user-name { font-size:13.5px; }

.crumb[hidden] { display: none; }

@media (max-width: 1024px) {
  .topnav {
    height: auto; padding: 12px 16px 8px;
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand right" "links links";
    row-gap: 8px; gap: 12px;
  }
  .tn-brand { grid-area: brand; }
  .tn-right { grid-area: right; justify-self: end; gap: 8px; }
  .tn-links { grid-area: links; gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .tn-links::-webkit-scrollbar { display: none; }
  .tn-links a { padding: 8px; white-space: nowrap; }
  .tn-links a.on::after { bottom: 0; }
  .tn-search { display: none; }
  .tn-user-name { display: none; }
  .tn-cta { height: 32px; padding: 12px; font-size:13.5px; }
  .view { padding: ; }
}


/* ===== 刷题模式选择页 ===== */
.practice-continue {
  display: grid; grid-template-columns: minmax(0,1fr) 280px;
  overflow: hidden; margin-bottom: 8px;
}
.pc-main { padding: 24px 24px; }
.pc-eyebrow { font-size:12px; color: var(--muted, var(--ink-3)); letter-spacing: .04em; }
.pc-title { font-size:19px; font-weight: 750; color: var(--ink); margin-top: 6px; }
.pc-meta { display: flex; justify-content: space-between; font-size:13.5px; color: var(--ink-2); }
.pc-meta b { color: var(--ink); }
.pc-side {
  padding: 24px; background: var(--surface-2); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; justify-content: center;
}
.pc-task { font-size:13.5px; color: var(--ink-2); }
.pc-link { font-size:12px; text-align: center; }

.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.mode-card {
  padding: 24px; display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2, 0 18px 48px rgba(17,17,17,.10)); }
.mode-title { font-size:16px; font-weight: 700; color: var(--ink); }
.mode-desc { font-size:13.5px; color: var(--ink-3); line-height: 1.65; }
.mode-go { margin-top: 8px; font-size:13.5px; font-weight: 600; color: var(--brand, var(--accent)); }

@media (max-width: 1024px) {
  .view { padding: 20px 16px 48px; }
  .practice-continue { grid-template-columns: 1fr; }
  .pc-side { border-left: 0; border-top: 1px solid var(--line); }
  .mode-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mode-grid { grid-template-columns: 1fr; }
}


/* 导航链接：强制横向一行（.side-nav 默认是 column） */
.topnav .tn-links { flex-direction: row; flex-wrap: nowrap; gap: 28px; overflow: visible; }
.topnav .tn-links a { flex: none; white-space: nowrap; }
.topnav .tn-user { white-space: nowrap; }
.topnav .tn-user-name { white-space: nowrap; }
@media (max-width: 1024px) {
  .topnav .tn-links { flex-direction: row; overflow-x: auto; gap: 18px; }
}


/* ===== 内容列表（替代表格） ===== */
.row-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.row-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.row-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.rc-main { flex: 1; min-width: 0; }
.rc-title {
  display: block; font-size:15px; font-weight: 600; color: var(--ink);
  line-height: 1.55; text-decoration: none;
}
a.rc-title:hover { color: var(--brand, var(--accent)); }
.rc-sub { font-size:13.5px; color: var(--ink-3); margin-top: 3px; }
.rc-tags { display: flex; gap: 8px; flex: none; }
.rc-mastery { display: flex; align-items: center; gap: 8px; flex: none; width: 120px; }
.rc-mastery .mini { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rc-mastery .mini i { display: block; height: 100%; background: var(--brand, var(--accent)); }
.rc-go { flex: none; font-size:13.5px; font-weight: 600; color: var(--brand, var(--accent)); text-decoration: none; }
.rc-go:hover { text-decoration: underline; }

.point-row .rc-main { padding-right: 8px; }
.q-row .rc-title { font-weight: 600; }
.search-q { line-height: 1.65; }

/* 首页最近做题 */
.recent-list { display: flex; flex-direction: column; padding: 4px 8px 12px; }
.recent-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
}
.recent-row:hover { background: var(--surface-2); }
.rr-main { flex: 1; min-width: 0; }
.rr-title { font-size:13.5px; font-weight: 600; color: var(--ink); }
.rr-sub { font-size:12px; color: var(--ink-3); margin-top: 2px; }
.rr-acc { font-size:15px; font-weight: 700; color: var(--brand, var(--accent)); }
.home-promo { margin-top: 32px; }

@media (max-width: 900px) {
  .row-card { flex-wrap: wrap; gap: 10px; padding: 16px; }
  .rc-tags { width: 100%; }
  .rc-mastery { width: 100%; }
}


/* ===== 排版统一（设计规范 v1.0） ===== */
.page-title { font-size:28px !important; line-height: 1.22; letter-spacing: -.015em; font-weight: 750; }
.page-sub { font-size:13.5px; color: var(--ink-3); }
.card-title { font-size:19px; }
body { font-size:15px; }
.card { border-radius: 16px; }
.card-body { padding: 24px; }
.card-head { padding: 24px 24px 8px; }
.card-foot { padding: 12px 24px 16px; }
.btn { height: 40px; border-radius: 10px; }
.btn.ghost { height: 30px; padding: 12px; font-size:12px; }
.progress { height: 8px; }
.stat-num { font-size:28px; }
@media (max-width: 1024px) {
  .page-title { font-size:24px !important; }
  .card-body { padding: 16px; }
}


/* ===== 我的页 ===== */
.me-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; margin-bottom: 16px; }
.me-account { overflow: hidden; }
.me-acc-main { display: flex; align-items: center; gap: 14px; padding: 24px 24px 16px; }
.me-avatar { width: 46px; height: 46px; font-size:19px; }
.me-name { font-size:16px; font-weight: 700; color: var(--ink); }
.me-sub { font-size:13.5px; color: var(--ink-3); margin-top: 2px; }
.me-acc-foot { padding: 24px 20px; }

.me-credit { padding: 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.me-credit-label { font-size:13.5px; color: var(--ink-3); }
.me-credit-num { font-size:30px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.me-credit-sub { font-size:12px; color: var(--ink-3); margin-bottom: 8px; }

.me-summary {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 24px 8px; margin-bottom: 20px;
}
.me-sum-item { text-align: center; padding: 8px 4px; }
.me-sum-item b { display: block; font-size:24px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.me-sum-item span { font-size:12px; color: var(--ink-3); }

.me-quick { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.me-tile { padding: 20px; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.me-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.me-tile-title { font-size:16px; font-weight: 700; color: var(--ink); }
.me-tile-desc { font-size:12px; color: var(--ink-3); margin-top: 4px; }

/* ===== 考点详情：底部动作 ===== */
.pd-actions { display: flex; gap: 12px; margin: 20px 0 8px; }
.pd-next { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px; }
.pd-next a {
  display: block; padding: 12px 12px; border-radius: 10px; text-decoration: none;
  font-size:13.5px; color: var(--ink-2); border: 1px solid var(--line);
}
.pd-next a:hover { border-color: var(--brand, var(--accent)); color: var(--brand, var(--accent)); }

@media (max-width: 1024px) {
  .me-grid { grid-template-columns: 1fr; }
  .me-quick { grid-template-columns: 1fr 1fr; }
  .me-summary { grid-template-columns: 1fr 1fr; row-gap: 12px; }
}


/* 设置行列表 */
.setting-list { display: flex; flex-direction: column; padding: 4px 16px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: 0; }
.setting-label { font-size:13.5px; color: var(--ink); }
.setting-value { display: inline-flex; align-items: center; gap: 8px; font-size:13.5px; color: var(--ink-2); }
.setting-value.muted { color: var(--ink-3); }
.setting-value .btn { height: 30px; padding: 12px; font-size:12px; }


/* ===== 考点详情：相关真题 ===== */
.qd-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 24px 20px; }
.qd-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.qd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.qd-text { font-size:15px; line-height: 1.75; color: var(--ink); font-weight: 500; }
.qd-opt { display: flex; gap: 8px; font-size:13.5px; color: var(--ink-2); padding: 8px 4px; line-height: 1.7; }
.qd-opt b { color: var(--ink-3); font-weight: 600; flex: none; }
.qd-ans { margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); font-size:13.5px; color: var(--ink-2); }
.qd-analysis { margin-top: 6px; line-height: 1.75; color: var(--ink-3); }

/* ===== 资料页 Tab ===== */
.lib-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.lib-tab {
  height: 36px; padding: 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size:13.5px; color: var(--ink-2);
}
.lib-tab:hover { border-color: var(--brand, var(--accent)); color: var(--brand, var(--accent)); }
.lib-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.lib-upload { display: flex; justify-content: center; padding: 8px 4px; }

/* ===== 统计：章节掌握度 ===== */
.bar-val { font-size:12px; color: var(--ink-3); font-style: normal; margin-bottom: 4px; }
.chapter-list { display: flex; flex-direction: column; gap: 4px; padding: 8px 24px 16px; }
.chapter-row {
  display: grid; grid-template-columns: minmax(0,1fr) 220px 56px 56px;
  align-items: center; gap: 14px; padding: 12px; border-bottom: 1px solid var(--line);
}
.chapter-row:last-child { border-bottom: 0; }
.ch-name { font-size:13.5px; color: var(--ink); }
.ch-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand, var(--accent)), var(--accent)); }
.ch-rate { font-size:13.5px; font-weight: 700; color: var(--ink); text-align: right; }
.ch-meta { font-size:12px; color: var(--ink-3); text-align: right; }

@media (max-width: 900px) {
  .chapter-row { grid-template-columns: minmax(0,1fr) 90px 48px; }
  .ch-meta { display: none; }
  .lib-tabs { overflow-x: auto; }
  .lib-tab { flex: none; }
}


/* 首页推广块瘦身 */
.home-promo .promo-banner { padding: 16px 24px; border-radius: 16px; }
.home-promo .promo-banner .pb-title { font-size:16px; }


/* 统计柱状图配色 */
.chart .bar i { background: var(--accent-2); border-radius: 6px 6px 0 0; }
.chart .bar.today i { background: var(--accent); }
.chart .bar span { font-size:12px; color: var(--ink-3); }


/* ===== 规范收口（2026-10-27 视觉审计） ===== */
/* 最小字号 12px */
.nav-badge { font-size:12px; min-width: 18px; height: 18px; line-height: 1; }
.mp-fab-close { font-size:12px; }
.tag { font-size:12px; }
.set-tip { font-size:12px; }

/* 按钮高度只允许 30 / 32 / 36 / 40 / 48 */
.tn-icon, .tn-msg { width: 36px; height: 36px; }
.btn { min-height: 32px; }
.btn.ghost { height: 32px; }
.as-chip { height: 32px; font-size:13.5px; }
.promo-btn { height: 40px; }
.quiz-side .as-cell { height: 40px; }
.setting-value .btn { height: 32px; }
.me-acc-foot .btn { height: 32px; }
.stepper button { width: 28px; height: 28px; }
.font-opt { height: 30px; }

/* 答题页底部按钮 */
.lesson-tool { min-height: 32px; }


/* ===== 规范收口 2 ===== */
.tn-msg .nav-badge { font-size:12px; min-width: 18px; height: 18px; }
.mp-fab span { font-size:12px; }
.me-acc-foot .btn, .me-acc-foot a.btn { height: 36px; min-height: 36px; display: inline-flex; align-items: center; }
.stepper button { width: 30px; height: 30px; }


/* ===== 主色文字在浅底上的对比度修正 ===== */
:root { --brand-strong: #0B5A41; }
html[data-theme="dark"] { --brand-strong: #45D798; }

.card .tree a.on,
.es-icon,
.tag-brand,
.mode-go,
.rc-go,
.point-go,
.side-link:hover,
.weak-go,
.entry-go,
.pc-link:hover { color: var(--brand-strong) !important; }


/* ===== 夜间 + 移动端修正 ===== */
/* 夜间：浅绿/浅红底上的文字改成深色，保证对比度 */
html[data-theme="dark"] .btn.primary,
html[data-theme="dark"] .tn-mark,
html[data-theme="dark"] .tn-msg .nav-badge,
html[data-theme="dark"] .lib-tab.on,
html[data-theme="dark"] .avatar-sm,
html[data-theme="dark"] .mp-fab-close { color: #08251A; }
html[data-theme="dark"] .btn.primary { font-weight: 700; }
html[data-theme="dark"] .avatar-sm { background: var(--brand); }
html[data-theme="dark"] .tn-links a.on::after { background: var(--brand); }

/* 移动端：触控目标 ≥ 40px */
@media (max-width: 1024px) {
  .btn, .btn.ghost, .as-chip, .lesson-tool, .lib-tab { height: auto; min-height: 40px; }
  .tn-links a { min-height: 40px; display: inline-flex; align-items: center; }
  .tabbar a span { font-size:12px; }
  .tabbar .ti { font-size:19px; }
  .setting-value .btn, .me-acc-foot .btn { min-height: 40px; }
  .stepper button { width: 40px; height: 40px; }
  .font-opt { height: 40px; }
}


/* ===== 最后修正 ===== */
@media (max-width: 1024px) {
  .me-acc-foot a.btn, .me-acc-foot .btn { height: 40px; min-height: 40px; }
}
html[data-theme="dark"] .quiz-side .as-cell.cur,
html[data-theme="dark"] .quiz-side .as-cell.wrong.cur { color: #08251A; }


/* ===== 字号阶梯收敛（规范 v1.0） ===== */
.page-title { font-size: 30px !important; }
.card-title { font-size: 19px !important; }
.page-sub, .rc-sub, .li-sub { font-size: 13.5px; }
@media (max-width: 1024px) {
  .page-title { font-size: 24px !important; }
}


/* ===== 按钮高度收敛：32 / 40 / 48 ===== */
.tn-cta { height: 40px; }
.me-acc-foot .btn, .me-acc-foot a.btn { height: 40px; min-height: 40px; }
.stepper button { width: 32px; height: 32px; }
.font-opt { height: 32px; }
.lesson-tool { min-height: 32px; height: 32px; }


/* ===== 图标按钮 40 ===== */
.tn-icon, .tn-msg { width: 40px; height: 40px; border-radius: 10px; }


/* ===== 最后两处高度 ===== */
.btn.btn-line { height: 40px; }
.lib-tab { height: 40px; }


/* ===== 移动端答题工具按钮 ===== */
@media (max-width: 1024px) {
  .lesson-tools .lesson-tool, .foot-left .lesson-tool { height: 40px; min-height: 40px; }
}


/* ===== 移动端答题页沉浸 ===== */
body.quiz-mode .tabbar { display: none; }
body.quiz-mode .quiz-shell { padding-bottom: 140px; }

@media (max-width: 640px) {
  .lesson-foot { flex-wrap: wrap; gap: 8px; align-items: stretch; }
  .foot-left { flex: 1 1 auto; display: flex; gap: 8px; }
  .foot-left > .btn, .foot-left > .lesson-tool { flex: 1; white-space: nowrap; justify-content: center; }
  .foot-right { flex: 1 1 100%; justify-content: space-between; }
  .foot-right .btn { flex: 1; }
  .lesson-tool { white-space: nowrap; }
  .quiz-foot, .lesson-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}


/* ===== 移动答题底栏 ===== */
@media (max-width: 640px) {
  .lesson-foot .btn,
  .lesson-foot .lesson-tool {
    height: 40px !important; min-height: 40px;
    padding: 0 10px; white-space: nowrap; font-size: 13.5px;
    line-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  }
}


/* ===== 动效 Demo（2026-10-27） ===== */
@keyframes fxPageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes fxItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes fxCorrect {
  0% { box-shadow: 0 0 0 0 rgba(18,128,90,.32); }
  100% { box-shadow: 0 0 0 14px rgba(18,128,90,0); }
}
@keyframes fxWrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.anim-page { animation: fxPageIn 240ms cubic-bezier(.22,.61,.36,1) both; }
.anim-item { animation: fxItemIn 260ms cubic-bezier(.22,.61,.36,1) both; }

/* 卡片 hover 抬升（统一 2px） */
.row-card, .mode-card, .me-tile, .qd-item, .recent-row {
  transition: transform 160ms cubic-bezier(.22,.61,.36,1),
              box-shadow 160ms cubic-bezier(.22,.61,.36,1),
              border-color 160ms ease;
  will-change: transform;
}
.row-card:hover, .mode-card:hover, .me-tile:hover, .qd-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.recent-row:hover { transform: translateX(2px); }

/* 按钮按压 */
.btn:active, .lib-tab:active, .lesson-tool:active { transform: scale(.98); }

/* 答题反馈 */
.opt-card.fx-correct { animation: fxCorrect 420ms ease-out 1; }
.opt-card.fx-wrong { animation: fxWrong 260ms ease-in-out 1; }

/* 减少动效时全部关闭 */
@media (prefers-reduced-motion: reduce) {
  .anim-page, .anim-item, .opt-card.fx-correct, .opt-card.fx-wrong { animation: none !important; }
  .row-card:hover, .mode-card:hover, .me-tile:hover, .qd-item:hover { transform: none; }
}
body.reduce-motion .anim-page,
body.reduce-motion .anim-item { animation: none !important; }


/* ===== 视觉资产 v1（批次 1） ===== */

/* ① 空态插画 */
.es-illus { margin-bottom: 4px; color: var(--brand, var(--accent)); opacity: .9; }
.es-illus svg { width: 88px; height: 88px; display: block; }
.empty-state .es-icon { display: none; }
html[data-theme="dark"] .es-illus { color: var(--brand-strong, var(--brand)); }

/* ② 品牌纹理（Hero / 页脚） */
.home-hero { position: relative; overflow: hidden; }
.home-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 88% -10%, rgba(18,128,90,.10), transparent 46%),
    radial-gradient(circle at 12% 110%, rgba(185,101,58,.07), transparent 42%),
    linear-gradient(rgba(17,17,17,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.028) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
  background-position: center, center, center, center;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.35));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,.35));
}
html[data-theme="dark"] .home-hero::before {
  background-image:
    radial-gradient(circle at 88% -10%, rgba(52,201,138,.14), transparent 46%),
    radial-gradient(circle at 12% 110%, rgba(224,138,90,.10), transparent 42%),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
}
.home-hero > * { position: relative; z-index: 1; }
.foot { position: relative; }
.foot::before {
  content: ''; position: absolute; inset: 0 -32px auto -32px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17,17,17,.14), transparent);
}

/* ③ 大数字排版 */
.stat-num { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.hh-stats .stat-num { font-size: 40px; }
.me-sum-item b { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ④ 卡片分层 */
.card--data { background: var(--surface-2); box-shadow: none; border: 1px solid var(--line); }
.card--action { border: 1px solid rgba(18,128,90,.42); box-shadow: 0 1px 2px rgba(18,128,90,.06); }
.card--action:hover { border-color: var(--brand, var(--accent)); }

/* ⑤ 主 CTA 渐变（全站唯一渐变按钮） */
.btn.primary {
  background-image: linear-gradient(135deg, #0E6B4E 0%, #0B5A41 100%);
  background-color: #0B5A41;
}
html[data-theme="dark"] .btn.primary {
  background-image: linear-gradient(135deg, #3FD79B 0%, #2FBF88 100%);
  background-color: #34C98A;
}

/* ⑥ 底部导航 SVG 图标 */
.tabbar .ti { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.tabbar .ti svg { width: 22px; height: 22px; }


/* 插画底：圆形浅底 + 居中线条图 */
.es-illus {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--brand-soft, rgba(18,128,90,.10));
  display: grid; place-items: center; margin-bottom: 14px;
}
.es-illus svg { width: 64px; height: 64px; }
html[data-theme="dark"] .es-illus { background: rgba(52,201,138,.12); }


/* ===== 批次 2/3：骨架 / 滚动 / 微光 ===== */
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.sk-wrap { display: flex; flex-direction: column; gap: 16px; }
.sk-card { background: var(--surface); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-1); }
.sk-line {
  height: 14px; border-radius: 7px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--surface-2) 25%, rgba(17,17,17,.06) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
html[data-theme="dark"] .sk-line {
  background: linear-gradient(90deg, #232B27 25%, rgba(255,255,255,.07) 37%, #232B27 63%);
  background-size: 400% 100%;
}
.sk-line.w30 { width: 30%; } .sk-line.w40 { width: 40%; } .sk-line.w55 { width: 55%; }
.sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; } .sk-line.w80 { width: 80%; }

/* 滚动出现 */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 320ms cubic-bezier(.22,.61,.36,1), transform 320ms cubic-bezier(.22,.61,.36,1);
}

/* 顶栏阅读进度 */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 80;
  background: linear-gradient(90deg, var(--brand, var(--accent)), var(--accent));
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; transition: opacity 200ms ease;
  pointer-events: none;
}
.read-progress.is-on { opacity: .9; }

/* 答题卡填格 */
@keyframes cellPop {
  0% { transform: scale(.86); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.quiz-side .as-cell.pop { animation: cellPop 260ms cubic-bezier(.22,.61,.36,1) 1; }

/* Hero 渐变缓慢流动 */
@keyframes heroGlow {
  0% { transform: translate3d(0,0,0) scale(1); opacity: .85; }
  50% { transform: translate3d(-18px,10px,0) scale(1.06); opacity: 1; }
  100% { transform: translate3d(10px,-8px,0) scale(1.02); opacity: .9; }
}
.home-hero::after {
  content: ''; position: absolute; right: -120px; top: -140px; width: 520px; height: 520px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 50% 50%, rgba(18,128,90,.16), rgba(185,101,58,.07) 46%, transparent 70%);
  filter: blur(2px);
  animation: heroGlow 26s ease-in-out infinite alternate;
}
html[data-theme="dark"] .home-hero::after {
  background: radial-gradient(circle at 50% 50%, rgba(52,201,138,.18), rgba(224,138,90,.08) 46%, transparent 70%);
}

/* 推广区微光扫过 */
@keyframes promoSheen {
  0% { transform: translateX(-140%) skewX(-16deg); }
  100% { transform: translateX(320%) skewX(-16deg); }
}
.promo-banner { position: relative; overflow: hidden; }
.promo-banner::after {
  content: ''; position: absolute; top: -40%; bottom: -40%; width: 28%;
  left: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  animation: promoSheen 5.6s ease-in-out infinite;
}

/* 减少动效：全部关闭 */
@media (prefers-reduced-motion: reduce) {
  .sk-line, .home-hero::after, .promo-banner::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .read-progress { display: none; }
}
body.reduce-motion .sk-line,
body.reduce-motion .home-hero::after,
body.reduce-motion .promo-banner::after { animation: none !important; }
body.reduce-motion .reveal { opacity: 1; transform: none; }


/* ===== 按钮居中修复（2026-10-27） ===== */
.btn, a.btn, button.btn,
.promo-btn, .lib-tab, .as-chip, .lesson-tool, .pager-btn,
.stepper button, .font-opt, .tn-cta, .side-btn, .q-nav-btn,
button, [role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}
/* 垂直内边距归零，避免文字被顶到上方 */
.btn, a.btn, button.btn, .promo-btn, .lib-tab, .as-chip, .lesson-tool, .pager-btn, .side-btn {
  padding-top: 0;
  padding-bottom: 0;
}
.btn, a.btn, button.btn { padding-left: 18px; padding-right: 18px; }
.btn.ghost { padding-left: 12px; padding-right: 12px; }
.btn.btn-line { padding-left: 18px; padding-right: 18px; }
.tn-cta { padding-left: 16px; padding-right: 16px; }
.promo-btn { padding-left: 20px; padding-right: 20px; }
.pager-btn { padding-left: 14px; padding-right: 14px; }
.as-chip { padding-left: 14px; padding-right: 14px; }

/* 全宽按钮保持拉伸 */
.btn[style*="width:100%"], .hh-cta, .pc-side .btn { display: flex; }

/* 答题卡格子：数字居中 */
.quiz-side .as-cell { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }


/* ===== 试做条 / 解锁弹窗 ===== */
.trial-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(185,101,58,.10), rgba(18,128,90,.08));
  border: 1px solid rgba(185,101,58,.28); border-radius: 14px;
}
.tb-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-tag {
  flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #fff;
}
.tb-text { font-size: 13.5px; color: var(--ink-2); }
.tb-btn { flex: none; height: 36px; padding: 0 16px; font-size: 13.5px; }

.unlock-steps { margin: 0 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }
.unlock-link { margin-bottom: 12px; }
.unlock-input { width: 100%; }
.unlock-err { min-height: 18px; margin-top: 8px; color: var(--bad); font-size: 12.5px; }
.modal-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

@media (max-width: 640px) {
  .trial-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .tb-btn { width: 100%; }
}


/* ===== 解锁弹窗间距 ===== */
.unlock-steps {
  display: flex; flex-direction: column; gap: 6px;
  margin: 0 0 14px; padding-left: 18px;
}
.unlock-steps li { margin: 0; line-height: 1.7; }
.unlock-link { margin: 12px 0 16px; }
.modal-body { padding-bottom: 4px; }
.modal-body .unlock-input { margin-top: 2px; }


/* 解锁弹窗：显式纵向布局 */
.unlock-body { display: flex; flex-direction: column; gap: 12px; }
.unlock-body > * { margin: 0 !important; }
.unlock-body .unlock-steps { padding-left: 18px; }
.unlock-body .unlock-link { display: flex; }
.unlock-body .unlock-err { min-height: 0; }


/* ===== 资料库：普通 / 精品 ===== */
.lib-subtabs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.lib-subtab {
  height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13.5px;
}
.lib-subtab.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.lib-search { width: 240px; margin-left: auto; }
@media (max-width: 640px) {
  .lib-search { width: 100%; margin-left: 0; }
}


/* 背题模式：正确答案行 */
.fb-answer {
  font-size: 14px; color: var(--ink); margin: 2px 0 8px;
  padding: 8px 12px; border-radius: 10px; background: var(--surface);
  border: 1px solid rgba(18,128,90,.28);
}
.fb-answer b { color: var(--brand, var(--accent)); font-size: 15px; }
.opt-card.is-locked { cursor: default; }


/* 简答题输入 */
.short-wrap { display: flex; flex-direction: column; gap: 8px; }
.short-input {
  width: 100%; min-height: 120px; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 15px; line-height: 1.7; resize: vertical; font-family: inherit;
}
.short-input:focus { outline: none; border-color: var(--brand, var(--accent)); box-shadow: var(--shadow-focus); }
.short-input:disabled { background: var(--surface-2); color: var(--ink-2); }
.short-tip { font-size: 12.5px; color: var(--ink-3); }
.short-ref { display: block; margin-top: 6px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }
.fb-answer .short-ref { font-weight: 400; font-size: 14px; }


/* 案例题背景 */
.case-bg {
  margin: 0 0 18px; padding: 16px 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.case-bg-title { font-size: 12px; font-weight: 700; color: var(--brand, var(--accent)); letter-spacing: .04em; margin-bottom: 6px; }
.case-bg-text { font-size: 14px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }


/* 翻题按钮：主文案 + 操作提示 */
.btn-nav {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: 48px; padding: 0 18px; border-radius: 12px; line-height: 1.15;
}
.btn-nav .nb-main { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.btn-nav .nb-arrow {
  width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); font-size: 11px; line-height: 1;
}
.btn-nav .nb-sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .01em; }
.btn-nav:hover { border-color: var(--brand, var(--accent)); }
.btn-nav:hover .nb-arrow { background: var(--brand-soft, var(--accent-2)); color: var(--brand-strong, var(--accent)); }
.btn-nav:disabled .nb-arrow { opacity: .6; }

@media (max-width: 640px) {
  .btn-nav { height: 40px; padding: 0 12px; }
  .btn-nav .nb-sub { display: none; }
}


/* 提高权重：盖过 .btn.ghost 的 height */
.btn.btn-nav {
  height: 48px; min-height: 48px; padding: 0 18px; border-radius: 12px;
  display: inline-flex; flex-direction: column; justify-content: center; gap: 2px;
}
@media (max-width: 640px) {
  .btn.btn-nav { height: 40px; min-height: 40px; padding: 0 12px; }
}


/* nav-btn v2 */
.btn.btn-nav {
  height: 52px; min-height: 52px; min-width: 118px; padding: 0 16px;
  border-radius: 12px; gap: 3px;
  border: 1px solid var(--line-2); background: var(--surface);
  transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
.btn.btn-nav:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line-2); }
.btn.btn-nav:active:not(:disabled) { transform: translateY(1px); }
.btn.btn-nav .nb-main { font-size: 13.5px; font-weight: 600; gap: 7px; display: inline-flex; align-items: center; }
.btn.btn-nav .nb-arrow {
  width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font-size: 11px; line-height: 1;
}
.btn.btn-nav .nb-sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }
.btn.btn-nav:hover:not(:disabled) .nb-arrow { border-color: var(--brand, var(--accent)); color: var(--brand-strong, var(--accent)); }
.btn.btn-nav:disabled { opacity: .45; }
@media (max-width: 640px) {
  .btn.btn-nav { height: 40px; min-height: 40px; min-width: 0; padding: 0 12px; }
}


/* nav-btn v3 */
.btn.btn-nav .nb-sub { font-size: 11px; color: var(--ink-3); opacity: 1; letter-spacing: .03em; }
.btn.btn-nav:disabled .nb-sub { opacity: .8; }


/* foot 对齐 */
.foot-left .lesson-tool { height: 52px; min-height: 52px; }
@media (max-width: 640px) {
  .foot-left .lesson-tool { height: 40px; min-height: 40px; }
}


/* nav-btn v4 keycap（参考 GitHub / Linear / VS Code 的 kbd 键帽惯例） */
.btn.btn-nav .nb-arrow {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  box-shadow: 0 1px 0 var(--line-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; line-height: 1; color: var(--ink-2);
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn.btn-nav:hover:not(:disabled) .nb-arrow {
  background: var(--surface); border-color: var(--brand, var(--accent)); color: var(--brand-strong, var(--accent));
}
.btn.btn-nav .nb-sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }
@media (max-width: 640px) {
  .btn.btn-nav .nb-arrow { width: 18px; height: 18px; box-shadow: none; }
}


/* nav-btn v5 tooltip（hover / 键盘聚焦时显示） */
.btn.btn-nav { position: relative; overflow: visible; }
.btn.btn-nav .nb-sub { display: none !important; }
.btn.btn-nav .nb-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink, #fff);
  font-size: 11.5px; line-height: 1.2; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 30;
  box-shadow: 0 6px 18px rgba(17, 17, 17, .16);
  transition: opacity .14s ease, transform .14s ease;
}
.btn.btn-nav .nb-tip::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.btn.btn-nav:hover:not(:disabled) .nb-tip,
.btn.btn-nav:focus-visible:not(:disabled) .nb-tip {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
html[data-theme="dark"] .btn.btn-nav .nb-tip { background: var(--surface-2); color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
html[data-theme="dark"] .btn.btn-nav .nb-tip::after { border-top-color: var(--surface-2); }
@media (max-width: 900px) { .btn.btn-nav .nb-tip { display: none; } }


/* nav-btn v6：去掉箭头后的常规按钮 */
.btn.btn-nav {
  height: 40px; min-height: 40px; min-width: 0; padding: 0 18px;
  border-radius: 10px; flex-direction: row; gap: 0;
  border: 1px solid var(--line-2); background: var(--surface);
}
.btn.btn-nav .nb-main { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.btn.btn-nav .nb-arrow { display: none !important; }
.foot-left .lesson-tool { height: 40px; min-height: 40px; }
@media (max-width: 640px) {
  .btn.btn-nav, .foot-left .lesson-tool { height: 40px; min-height: 40px; }
}


/* ===== 布局宽度 v1（参考 Bootstrap xxl 1320 / USWDS widescreen） ===== */
.view {
  max-width: 1320px;
  padding-left: clamp(16px, 3vw, 48px) !important;
  padding-right: clamp(16px, 3vw, 48px) !important;
}
.foot {
  max-width: 1320px;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: clamp(16px, 3vw, 48px);
}
@media (min-width: 1680px) {
  .view, .foot { max-width: 1560px; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
  .view, .foot { max-width: 960px; }
}

/* 答题页：主区更宽，侧栏 360 */
.quiz-shell {
  max-width: 1320px !important;
  grid-template-columns: minmax(0, 1fr) 360px !important;
}
@media (max-width: 1200px) and (min-width: 1025px) {
  .quiz-shell { grid-template-columns: minmax(0, 1fr) 320px !important; }
}
@media (max-width: 1024px) {
  .quiz-shell { grid-template-columns: 1fr !important; }
}

/* 正文限宽，避免容器变宽后一行过长 */
.card-body p, .fb-text, .qd-text, .qd-analysis { max-width: 72ch; }

/* 宽屏下列表行内边距略增 */
@media (min-width: 1400px) {
  .row-card { padding-left: 22px; padding-right: 22px; }
  .list-item { padding-left: 22px; padding-right: 22px; }
}


/* foot 伪元素不再外扩（避免 1280 下横向滚动） */
.foot::before { left: 0; right: 0; }


/* 首页 7:5 栅格 */
.c7 { grid-column: span 7; }
.c5 { grid-column: span 5; }
@media (max-width: 1024px) {
  .c7, .c5 { grid-column: span 6; }
}


/* lib-subtab 深色修复：选中态改用主色，避免 --ink 反色后白底白字 */
.lib-subtab.on { background: var(--brand, var(--accent)); border-color: var(--brand, var(--accent)); color: #fff; }


/* lib-subtab.on 深色文字：亮绿底配深字 */
html[data-theme="dark"] .lib-subtab.on { color: var(--on-ink); }

/* ===== 首页样板 A：内容门户型 ===== */
.ha-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px; align-items: center; padding: 38px 40px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #0b3a2a 0%, #12674a 52%, #12805a 100%);
  box-shadow: 0 18px 40px rgba(12, 70, 50, .18);
}
.ha-hero-glow {
  position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.20), transparent 62%);
  pointer-events: none;
}
.ha-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, #000 10%, transparent 70%);
}
.ha-hero > * { position: relative; z-index: 1; }
.ha-kicker {
  display: inline-block; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.72); margin-bottom: 10px;
}
.ha-title { font-size: 30px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin: 0 0 10px; color: #fff; }
.ha-sub { font-size: 14px; line-height: 1.75; color: rgba(255,255,255,.82); margin: 0 0 22px; max-width: 52ch; }
.ha-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ha-btn-main {
  height: 40px; padding: 0 20px; border-radius: 10px; background: #fff; color: #0b3a2a;
  font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center;
}
.ha-btn-main:hover { background: #f2f7f4; }
.ha-btn-ghost {
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.5);
  color: #fff; font-size: 13.5px; display: inline-flex; align-items: center;
}
.ha-btn-ghost:hover { background: rgba(255,255,255,.12); }
.ha-hero-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ha-ring-wrap { position: relative; display: grid; place-items: center; }
.ring { display: block; }
.ha-ring-txt { position: absolute; text-align: center; }
.ha-ring-txt b { display: block; font-size: 24px; font-weight: 800; }
.ha-ring-txt span { font-size: 11px; color: rgba(255,255,255,.72); }
.ha-side-meta { font-size: 12px; color: rgba(255,255,255,.78); }

.ha-section { margin-top: 32px; }
.ha-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.ha-section-head h2 { font-size: 17px; font-weight: 700; margin: 0; }

.ha-cover-card {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.ha-cover-art {
  display: grid; place-items: center; min-height: 168px; color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: .04em; background: linear-gradient(140deg, #1f5c45, #3f8f6b 60%, #7fb79d);
}
.ha-cover-body { padding: 22px 24px; }
.ha-cover-kicker { font-size: 11.5px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.ha-cover-title { font-size: 20px; font-weight: 700; margin: 6px 0 4px; }
.ha-cover-desc { font-size: 13px; color: var(--ink-2); }
.ha-cover-progress { margin: 14px 0 10px; }
.ha-cover-foot { display: flex; align-items: center; justify-content: space-between; }
.ha-cover-btn { height: 34px; padding: 0 16px; font-size: 13px; }

.ha-pts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ha-pt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.ha-pt:hover { border-color: var(--brand, var(--accent)); transform: translateY(-1px); }
.ha-pt-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--brand-soft, rgba(18,128,90,.10)); color: var(--brand-strong, #0F6B4A);
  font-weight: 700; font-size: 15px;
}
.ha-pt-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ha-pt-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ha-pt-meta { font-size: 11.5px; color: var(--ink-3); }
.ha-pt-go { font-size: 12px; color: var(--brand-strong, #0F6B4A); flex: none; }

.ha-two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.ha-mats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ha-mat {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.ha-mat:hover { border-color: var(--brand, var(--accent)); transform: translateY(-1px); }
.ha-mat-cover {
  height: 84px; border-radius: 10px; display: flex; align-items: flex-end; padding: 8px 10px;
  font-size: 10.5px; color: #fff; letter-spacing: .06em;
  background: linear-gradient(145deg, #2b6f52, #79b498);
}
.ha-mat-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.ha-mat-desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.ha-recent { padding: 6px 18px; }
.ha-empty { padding: 22px 4px; font-size: 13px; color: var(--ink-3); }

/* 样板字号阶梯对齐 + page-title 兼容 */
.ha-title.page-title { margin: 0 0 10px; font-size: 30px; line-height: 1.25; letter-spacing: -.01em; font-weight: 800; color: #fff; }
.hb-sr-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hs-label, .hs-btn { font-size: 12px; }
.hs-btn { height: 32px; }
.ha-kicker { font-size: 12px; }
.ha-sub { font-size: 15px; }
.ha-pt-title { font-size: 13.5px; }
.ha-pt-meta { font-size: 12px; }
.ha-mat-cover { font-size: 12px; }
.ha-mat-desc { font-size: 12px; }
.ha-cover-kicker { font-size: 12px; }
.ha-cover-desc { font-size: 13.5px; }
.ha-cover-title { font-size: 19px; }
.ha-cover-btn { height: 40px; font-size: 13.5px; }
.ha-section-head h2 { font-size: 16px; }
.ha-ring-txt span { font-size: 12px; }
.hb-lv { font-size: 19px; }
.hb-lv-sub { font-size: 12px; }
.hb-day { font-size: 12px; }
.hb-badge { font-size: 12px; }
.hb-goal-sub { font-size: 12px; }
.hb-path-sub, .hb-path-state { font-size: 12px; }
.hb-mini-stats b { font-size: 19px; }
.hb-mini-stats span { font-size: 12px; }
.hb-quote-text { font-size: 15px; }
.hb-quote-from { font-size: 12px; }
.hb-ring-txt b { font-size: 24px; }
.hb-ring-txt span { font-size: 12px; }
.nb-tip { font-size: 12px; }
.lib-subtab { height: 40px; }


.btn.btn-nav .nb-tip { font-size: 12px; }


/* 样板收尾修正 */
.home-switch .hs-label { font-size: 12px; }
html[data-theme="dark"] .hs-btn.on { color: var(--on-ink); }


/* A 响应式（定稿） */
@media (max-width: 1100px) {
  .ha-hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .ha-hero-side { flex-direction: row; justify-content: flex-start; gap: 16px; }
  .ha-cover-card { grid-template-columns: 1fr; }
  .ha-cover-art { min-height: 110px; }
  .ha-two { grid-template-columns: 1fr; }
  .ha-pts { grid-template-columns: 1fr; }
  .ha-mats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ha-title { font-size: 24px; }
  .ha-mats { grid-template-columns: 1fr; }
}


/* A hero 装饰层定位（恢复） */
.ha-hero > *:not(.ha-hero-glow) { position: relative; z-index: 1; }
.ha-hero-glow { position: absolute; z-index: 0; }


/* 桌面端侧栏常驻，顶部不再重复显示答题卡/设置入口 */
@media (min-width: 1025px) {
  .lesson-tools .quiz-tool-narrow { display: none; }
}

