:root {
  --bg: #0e1014;
  --panel: #171a21;
  --panel-2: #1f232c;
  --line: #2a2f3a;
  --text: #e9ecf3;
  --muted: #8b93a7;
  --accent: #4d6bfe;
  --accent-soft: rgba(77, 107, 254, .14);
  --ok: #38c172;
  --bad: #ff6b6b;
  --warn: #f5a623;
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: radial-gradient(1100px 560px at 50% -220px, #1a2030 0%, var(--bg) 62%);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.app { max-width: 600px; margin: 0 auto; padding: 18px 16px 44px; }

/* topbar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #7a5cff); color: #fff;
  font: 700 18px/1 var(--mono); box-shadow: 0 6px 18px rgba(77, 107, 254, .35);
}
.brand h1 { font-size: 16px; margin: 0; }
.sub { margin: 0; font-size: 11.5px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 15px; cursor: pointer; }
.icon-btn:hover { color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; background: var(--panel); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tab { flex: 1; padding: 8px 0; border: 0; border-radius: 9px; cursor: pointer; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.tab.active { background: var(--panel-2); color: var(--text); }

/* home */
.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.today-main { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px; text-align: center; }
.big-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; cursor: pointer; font-family: inherit; font-weight: 500; }
.btn:hover { border-color: #3d465c; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; margin-bottom: 10px; }
.btn.xl { padding: 14px; font-size: 15px; }
.btn.tiny { padding: 5px 10px; font-size: 12px; margin-left: auto; }
.btn:disabled { opacity: .5; cursor: default; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.small { font-size: 11.5px; line-height: 1.6; }
.tips { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: #c3cad8; }
.tips li { margin-bottom: 6px; }

/* plan */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.phases { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.phase { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.ph-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.ph-top span { color: var(--muted); font-size: 11.5px; }
.ph-note { font-size: 11.5px; color: #98a1b3; margin-top: 3px; }

/* ===== 大肥鱼课堂（白板 + 虚拟老师） ===== */
.classroom {
  display: grid; grid-template-columns: minmax(0, 1fr) 118px;
  gap: 12px; align-items: end; margin: 6px 0 12px;
}
.whiteboard {
  border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #0e1626, #0a0f17);
  padding: 12px 14px; min-height: 232px;
  display: flex; flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.wb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wb-head #wb-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-text { font-size: 16.5px; line-height: 1.85; color: #e9efff; flex: 1; }
.whiteboard .console { margin-top: 8px; font-size: 12.5px; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #333a48; display: block; }
.dots i.on { background: var(--accent); }
.dots i.done { background: var(--ok); }
.teacher { display: flex; flex-direction: column; align-items: center; gap: 0; }
.anime { width: 100%; display: block; }
.anime .eyes { transform-origin: 120px 146px; animation: abl 4.8s infinite; }
@keyframes abl { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.anime .mouth { transform-origin: 120px 174px; }
.anime.talking .mouth { animation: amouth .26s infinite alternate; }
@keyframes amouth { from { transform: scaleY(.55); } to { transform: scaleY(1.6); } }
.teacher-name { font-size: 10.5px; color: #aab3c8; margin-top: -6px; }
@media (max-width: 520px) {
  .classroom { grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
  .whiteboard { min-height: 200px; padding: 10px 12px; }
  .wb-text { font-size: 15px; }
  .teacher-name { display: none; }
}
/* plan */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.phases { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.phase { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.ph-top { display: flex; justify-content: space-between; font-size: 12.5px; }
.ph-top span { color: var(--muted); font-size: 11.5px; }
.ph-note { font-size: 11.5px; color: #98a1b3; margin-top: 3px; }

/* ===== 大肥鱼课堂（B 站式：窗口 + 白板 + 虚拟人） ===== */


/* 旧版鱼（保留兼容） */

.fish-voice {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 10px; font-size: 12px; color: var(--muted);
}
.fv-item { display: flex; align-items: center; gap: 8px; }
.fv-item input[type="range"] { width: 110px; accent-color: var(--accent); }
.fv-item select {
  background: #0b0d12; color: var(--text); border: 1px solid #2b3140;
  border-radius: 8px; padding: 4px 8px; font-size: 12px; font-family: inherit;
}
.fv-item b { color: var(--text); font-variant-numeric: tabular-nums; }
.mute-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 9px; width: 34px; height: 28px; font-size: 14px; cursor: pointer;
  display: grid; place-items: center; font-family: inherit;
}
.mute-btn:hover { border-color: var(--accent); }
.mute-btn.muted { color: var(--bad); border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .08); }
.fish-stage { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.fish { width: 118px; height: 92px; flex: none; filter: drop-shadow(0 8px 18px rgba(77, 107, 254, .35)); }
.fish .eye { animation: fishblink 4.6s infinite; transform-origin: center; }
@keyframes fishblink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.bubble {
  flex: 1; min-height: 84px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font-size: 14.5px; line-height: 1.75;
  position: relative;
}
.bubble::before {
  content: ""; position: absolute; left: -8px; top: 26px; width: 14px; height: 14px;
  background: var(--panel-2); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.fish-controls { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; margin: 12px 0 8px; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #333a48; display: block; }
.dots i.on { background: var(--accent); }
.dots i.done { background: var(--ok); }
.ask-box { margin-top: 4px; }
.ask-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #c3cad8; margin-bottom: 8px; }
.chat-log {
  max-height: 320px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 8px; margin-bottom: 10px; padding-right: 2px;
}
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg .bubble-txt {
  max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px;
  line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.msg.user .bubble-txt { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.msg.ai .bubble-txt { background: var(--panel-2); border: 1px solid var(--line); color: #e2e8f7; border-bottom-left-radius: 5px; }
.msg.ai .bubble-txt.typing::after { content: "▍"; color: var(--accent); animation: blink 1s steps(2) infinite; }
.ask-row { display: flex; gap: 8px; align-items: center; }
.ask-row input { flex: 1; }
.ask-row .icon-btn { flex: none; width: 40px; height: 40px; font-size: 16px; }
.ask-row .icon-btn.listening { border-color: var(--bad); color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* chapter bars */
.chbars { display: flex; flex-direction: column; gap: 8px; }
.chrow { display: grid; grid-template-columns: 104px 1fr 44px; gap: 10px; align-items: center; font-size: 12px; }
.chrow span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c3cad8; }
.ch-track { height: 8px; border-radius: 999px; background: #232833; overflow: hidden; }
.ch-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7a5cff); }
.ch-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* round bar */
.roundbar { margin-bottom: 12px; }
.rb-info { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.rb-retry { color: var(--warn); }
.rb-track { height: 6px; border-radius: 999px; background: #232833; overflow: hidden; }
.rb-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #7fd0ff); transition: width .25s; }

/* flash card */
.flash { min-height: 320px; }
.chip-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: #a9bbff; }
.chip.ghost { background: var(--panel-2); color: var(--muted); }
.flash-title { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 8px; }
.flash-front { font-size: 18px; line-height: 1.7; margin-bottom: 18px; }
.flash-back { font-size: 14px; color: #cfd6e4; line-height: 1.8; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.example { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: #0b0d12; border: 1px solid #262b35; border-radius: 10px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; }
.example:empty { display: none; }

.selfrate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.selfrate button { padding: 11px 6px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-family: inherit; font-size: 13.5px; cursor: pointer; }
.selfrate button:hover { border-color: var(--accent); }
.selfrate button[data-known="unknown"]:hover { border-color: var(--bad); }
.selfrate button[data-known="known"]:hover { border-color: var(--ok); }

/* answer area */
.quiz-prompt { font-size: 15px; line-height: 1.75; margin-bottom: 12px; }
.answer-area { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.opt { text-align: left; padding: 11px 13px; border-radius: 12px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-family: inherit; line-height: 1.5; white-space: pre-wrap; }
.opt:hover { border-color: #3d465c; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
input.text, textarea.code {
  width: 100%; background: #0b0d12; color: var(--text); border: 1px solid #2b3140;
  border-radius: 12px; padding: 11px 13px; font-size: 14px; font-family: var(--mono); outline: none;
}
input.text:focus, textarea.code:focus { border-color: var(--accent); }
textarea.code { min-height: 220px; resize: vertical; line-height: 1.55; tab-size: 4; }
textarea.code.out { min-height: 120px; }

/* code / console */
pre.console { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: #0b0d12; border: 1px solid #262b35; border-radius: 10px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; margin: 8px 0; }
pre.console.buggy { border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .05); }

/* verdict */
.verdict { margin-top: 14px; padding: 13px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); }
.verdict.ok { border-color: rgba(56, 193, 114, .45); background: rgba(56, 193, 114, .08); }
.verdict.bad { border-color: rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .07); }
.verdict-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.tag { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(255, 107, 107, .16); color: #ff9d9d; }
.tag:empty { display: none; }
.verdict-body { font-size: 13px; color: #c4cbd9; margin: 8px 0 10px; line-height: 1.75; }
.verdict-body .kv { color: var(--muted); }
.verdict-body .ans { font-family: var(--mono); color: #9fe8bc; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.stream { margin-top: 10px; padding: 12px; border-radius: 12px; background: #0b0d12; border: 1px solid #262b35; font-size: 13px; line-height: 1.8; white-space: pre-wrap; color: #d6dceb; }
.stream::after { content: "▍"; color: var(--accent); animation: blink 1s steps(2) infinite; }
.stream.done::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }

/* summary */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 14px; }
.summary-grid div { background: var(--panel-2); border-radius: 12px; padding: 10px; text-align: center; }
.summary-grid b { display: block; font-size: 20px; }
.summary-grid span { font-size: 11px; color: var(--muted); }
.sum-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 12.5px; background: var(--panel-2); border-radius: 10px; padding: 8px 11px; }
.sum-row span:last-child { color: var(--ok); }

/* lab */
.lab-group { margin-bottom: 14px; }
.lab-head { font-size: 12px; color: #7c8698; margin: 12px 0 6px; }
.lab-item { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.lab-item:hover { border-color: var(--accent); }
.lab-item .li-title { font-size: 13.5px; }
.lab-item .li-meta { font-size: 11px; color: var(--muted); }
.lab-item .li-badge { margin-left: auto; font-size: 10.5px; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: #9db2ff; white-space: nowrap; }
.lab-item.done .li-badge { background: rgba(56, 193, 114, .16); color: #7ee2a8; }
.task-box {
  background: var(--accent-soft); border: 1px solid rgba(77, 107, 254, .35);
  border-radius: 12px; padding: 10px 13px; font-size: 13px; line-height: 1.7;
  color: #d7deff; margin: 8px 0 6px;
}
.result { margin-top: 14px; padding: 13px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.result.ok { border-color: rgba(56, 193, 114, .45); background: rgba(56, 193, 114, .08); }
.result.bad { border-color: rgba(255, 107, 107, .4); background: rgba(255, 107, 107, .07); }
.result .kv { color: var(--muted); }
.test-row { font-family: var(--mono); font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.test-row:last-child { border-bottom: 0; }
.test-row .ok { color: var(--ok); }
.test-row .no { color: var(--bad); }

/* stats */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.bar-track { height: 8px; border-radius: 999px; background: #232833; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7a5cff); }
.bar-fill.high { background: linear-gradient(90deg, #ff6b6b, #ff9d5c); }
.bar-fill.medium { background: linear-gradient(90deg, var(--warn), #ffd479); }
.bar-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.atom-list { display: flex; flex-direction: column; gap: 8px; }
.ch-head { font-size: 11.5px; color: #7c8698; margin: 14px 0 4px; }
.atom-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--panel-2); border-radius: 11px; font-size: 12.5px; }
.atom-row .a-title { font-weight: 500; }
.atom-row .a-meta { color: var(--muted); font-size: 11px; }
.atom-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #3a4152; flex: none; }
.atom-row .dot.due { background: var(--warn); }
.atom-row .dot.learned { background: var(--ok); }

/* modal & misc */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 18px; z-index: 50; backdrop-filter: blur(3px); }
.modal-box {
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.modal-box h3 { margin: 0 0 12px; font-size: 15px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.field input { width: 100%; background: #0b0d12; border: 1px solid #2b3140; color: var(--text); border-radius: 10px; padding: 9px 11px; font-size: 13px; font-family: var(--mono); outline: none; }
.field input:focus { border-color: var(--accent); }
.hidden { display: none !important; }
.foot { text-align: center; font-size: 11px; color: #5b6377; margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #232833; color: var(--text); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; font-size: 12.5px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (max-width: 380px) {
  .app { padding: 14px 12px 36px; }
  .today { grid-template-columns: 1fr; }
  .flash-front { font-size: 16px; }
}
.again-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(77,107,254,.10), rgba(77,107,254,.04));
  border: 1px solid rgba(77, 107, 254, .35);
}
.again-text { font-size: 13px; color: #d7deff; margin-bottom: 8px; }
.again-box .row { gap: 8px; }
/* ===== 学习栏：今日任务 / 状态 / 推荐 ===== */
.todo-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.todo-item { display: grid; grid-template-columns: 84px 1fr 96px; gap: 10px; align-items: center; font-size: 12.5px; }
.todo-name { color: #cdd5e6; }
.todo-track { height: 8px; border-radius: 999px; background: #232833; overflow: hidden; }
.todo-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7a5cff); }
.todo-item.done .todo-fill { background: linear-gradient(90deg, #38c172, #6ee7a8); }
.todo-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.todo-item.done .todo-num { color: var(--ok); }

.insight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.ins-item { background: var(--panel-2); border-radius: 12px; padding: 9px; text-align: center; }
.ins-item b { display: block; font-size: 19px; }
.ins-item span { font-size: 11px; color: var(--muted); }

.hist-title, .weak-title { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.hist-row { display: flex; gap: 6px; align-items: flex-end; height: 62px; margin-bottom: 12px; }
.hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; }
.hist-bar { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #5f7bff, #3f56d8); }
.hist-day { font-size: 9.5px; color: #6f7a90; }

.weak { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.weak-chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 107, 107, .12); color: #ff9d9d; border: 1px solid rgba(255, 107, 107, .3);
}

.rec-list { display: flex; flex-direction: column; gap: 8px; }
.rec-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid transparent; border-radius: 12px; cursor: pointer;
}
.rec-item:hover { border-color: var(--accent); }
.rec-idx {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11.5px;
  background: var(--accent-soft); color: #a9bbff;
}
.rec-title { font-size: 13.5px; }
.rec-why { font-size: 11px; color: var(--muted); }
.rec-go { margin-left: auto; font-size: 11.5px; color: #9db2ff; white-space: nowrap; }

/* 再来一题 */
/* ===== 统计页：成绩单 ===== */
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0 14px; }
.rep-cell { background: var(--panel-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.rep-cell b { font-size: 20px; letter-spacing: .2px; }
.rep-k { font-size: 11px; color: #9fb0d0; }
.rep-s { font-size: 10.5px; color: #6f7a90; }
.report-split { margin-bottom: 6px; }

.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.badge {
  display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto auto;
  column-gap: 8px; padding: 9px 10px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid transparent; opacity: .5;
}
.badge.on { opacity: 1; border-color: rgba(56, 193, 114, .4); background: rgba(56, 193, 114, .08); }
.badge-dot { grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 13px; }
.badge.on .badge-dot { color: var(--ok); }
.badge-name { font-size: 12.5px; }
.badge-detail { font-size: 10.5px; color: var(--muted); }
/* 应用图标 */
img.logo { width: 34px; height: 34px; border-radius: 9px; display: block; }
/* ===== 订阅中心 ===== */
.sub-box { max-width: 560px; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sub-head h3 { margin: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.plan {
  position: relative; border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 10px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px;
}
.plan.hot { border-color: var(--accent); background: linear-gradient(180deg, rgba(77,107,254,.12), rgba(77,107,254,.03)); }
.plan.free { opacity: .85; }
.plan-tag {
  position: absolute; top: -9px; right: 10px; font-size: 10px; padding: 2px 8px;
  border-radius: 999px; background: var(--accent); color: #fff;
}
.plan-name { font-size: 13px; color: #cdd6ea; }
.plan-price { font-size: 22px; font-weight: 600; }
.plan-price span { font-size: 11px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 2px 0 6px; padding-left: 15px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.plan button { margin-top: auto; width: 100%; font-size: 12px; padding: 7px 0; }
@media (max-width: 520px) {
  .plan-grid { grid-template-columns: 1fr; }
}
/* ===== 待订阅提示 / 二维码 ===== */
.locked-bubble { border-color: rgba(255, 196, 0, .45) !important; background: rgba(255, 196, 0, .08) !important; }
.locked-bubble b { color: #ffd76a; }
.locked-bubble p { margin: 4px 0 8px; font-size: 12px; color: #d9d2bd; }
.locked-bubble button { font-size: 12px; padding: 6px 12px; }
.qr-box { display: flex; gap: 12px; align-items: center; margin: 10px 0 4px; }
.qr-img-wrap {
  width: 132px; height: 132px; flex: none; border-radius: 12px; overflow: hidden;
  background: #fff; display: grid; place-items: center; border: 1px solid var(--line);
}
.qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; display: none; }
.qr-none { font-size: 10.5px; color: #55607a; text-align: center; padding: 6px; line-height: 1.5; }
.qr-tip b { font-size: 13px; }