/* ========== 物理星球大冒险 · 设计系统 ========== */
:root {
  --bg: #0b1026;
  --bg2: #121a3f;
  --card: #1a2250;
  --card2: #232d68;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef2ff;
  --muted: #9aa5d1;
  --accent: #4dabf7;
  --accent-2: #845ef7;
  --gold: #ffd43b;
  --green: #51cf66;
  --red: #ff6b6b;
  --orange: #ffa94d;
  --cyan: #22b8cf;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  --app-w: 540px;
}
body.theme-dawn {
  --bg: #fff4e6; --bg2: #ffe8cc; --card: #ffffff; --card2: #fff0e0; --line: rgba(0,0,0,0.08);
  --text: #2b2d42; --muted: #6c6f85; --shadow: 0 10px 30px rgba(255, 140, 60, 0.18);
}
body.theme-forest {
  --bg: #0d1f17; --bg2: #143026; --card: #1b3a2e; --card2: #24503d; --text: #ecfdf5; --muted: #9fd1b7;
}
body.theme-candy {
  --bg: #2a0f3a; --bg2: #3b1555; --card: #4a1d6b; --card2: #5e2787; --text: #fff0fb; --muted: #e2b4f5;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(132, 94, 247, 0.25), transparent 60%),
              radial-gradient(900px 500px at 110% 20%, rgba(77, 171, 247, 0.18), transparent 60%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
}
#stars { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; pointer-events: none; opacity: 0.8; }
#app { position: relative; z-index: 1; max-width: var(--app-w); margin: 0 auto; min-height: 100vh; padding: 0 16px 90px; }
#app.no-nav { padding-bottom: 24px; }
button, input, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: 0.5px; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0 0 10px; }
b { color: var(--gold); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.card.glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 12px 40px color-mix(in srgb, var(--accent) 25%, transparent); }
.card.clickable { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.card.clickable:active { transform: scale(0.98); }
@media (hover: hover) { .card.clickable:hover { transform: translateY(-2px); } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: none;
  font-weight: 700; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, #000), var(--accent-2));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  user-select: none;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.btn:disabled { filter: grayscale(0.6) brightness(0.7); cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.btn-sm { padding: 8px 14px; font-size: 14px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.btn.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:active { transform: scale(0.97); }
.btn.gold { background: linear-gradient(135deg, #ffd43b, #ff922b); color: #3b2300; }
.btn.green { background: linear-gradient(135deg, #51cf66, #20c997); }
.btn.red { background: linear-gradient(135deg, #ff6b6b, #f03e3e); }
.btn.icon { padding: 10px; width: 42px; height: 42px; border-radius: 50%; }

/* ---------- 顶部栏 ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 70%, transparent); }
.topbar .back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); font-size: 20px; display: grid; place-items: center; }
.topbar h2 { flex: 1; font-size: 20px; }

/* ---------- HUD ---------- */
.hud { display: flex; align-items: center; gap: 12px; padding: 14px 0 6px; }
.hud .avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 30px;
  background: radial-gradient(circle at 30% 30%, var(--card2), var(--card)); border: 2px solid var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 50%, transparent); cursor: pointer; }
.hud .info { flex: 1; min-width: 0; }
.hud .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .title { font-size: 12px; color: var(--muted); }
.xpbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 4px; }
.xpbar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.08); border: 1px solid var(--line); white-space: nowrap; }
.chip.gold { color: var(--gold); }
.chip.fire { color: var(--orange); }

/* ---------- 底部导航 ---------- */
.bottomnav { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(calc(100% - 32px), calc(var(--app-w) - 32px));
  display: flex; justify-content: space-around; padding: 8px; border-radius: 22px; z-index: 20;
  background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bottomnav button { background: none; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; padding: 6px 10px; border-radius: 14px; position: relative; }
.bottomnav button .ic { font-size: 22px; transition: transform 0.2s; }
.bottomnav button.active { color: var(--text); background: rgba(255,255,255,0.08); }
.bottomnav button.active .ic { transform: translateY(-2px) scale(1.15); }
.bottomnav .dot { position: absolute; top: 4px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* ---------- 星图 ---------- */
.hero { padding: 18px 0 6px; }
.hero h1 { font-size: 30px; background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.world-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.world { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--wc) 22%, var(--card)), var(--card)); cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.15s; }
.world:active { transform: scale(0.98); }
.world::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--wc) 40%, transparent), transparent 70%); }
.planet { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--wc) 80%, #fff), var(--wc) 55%, color-mix(in srgb, var(--wc) 50%, #000));
  box-shadow: 0 0 24px color-mix(in srgb, var(--wc) 60%, transparent), inset -8px -8px 18px rgba(0,0,0,0.35); animation: float 4s ease-in-out infinite; }
.world:nth-child(2n) .planet { animation-delay: -2s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.world .meta { flex: 1; min-width: 0; }
.world .meta h3 { font-size: 19px; }
.world .meta .theme { font-size: 13px; color: var(--muted); }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--wc, var(--accent)); border-radius: 999px; transition: width 0.5s; }
.world .pct { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 章节列表 ---------- */
.chapter-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.chapter { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--card2), var(--card)); cursor: pointer; position: relative; }
.chapter.locked { opacity: 0.6; filter: saturate(0.4); }
.chapter.cleared { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.chapter .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
.chapter .meta { flex: 1; min-width: 0; }
.chapter .meta .t { font-weight: 700; font-size: 16px; }
.chapter .meta .s { font-size: 12px; color: var(--muted); }
.chapter .stars { font-size: 12px; color: var(--gold); margin-top: 3px; letter-spacing: 1px; }
.chapter .badge { position: absolute; top: -8px; right: 12px; background: var(--gold); color: #3b2300; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }

/* ---------- 关卡路径 ---------- */
.level-path { position: relative; padding: 10px 0 30px; }
.level-node { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; position: relative; }
.level-node:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.level-node::before { content: ''; position: absolute; left: 50%; top: 100%; height: 22px; width: 3px; border-left: 3px dashed var(--line); transform: translateX(-50%); }
.level-node:last-child::before { display: none; }
.lnode { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; flex-shrink: 0; position: relative; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--card2), var(--card)); border: 3px solid var(--line); transition: transform 0.15s; }
.lnode.open { border-color: var(--accent); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent); animation: pulse 1.8s infinite; }
.lnode.done { border-color: var(--gold); background: radial-gradient(circle at 35% 30%, #5a4a12, #3a2f0a); }
.lnode.locked { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; }
.lnode.boss { width: 86px; height: 86px; font-size: 40px; border-color: var(--red); }
.lnode.boss.open { box-shadow: 0 0 26px rgba(255, 107, 107, 0.6); }
.lnode:active { transform: scale(0.94); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent); } 50% { box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 75%, transparent); } }
.lnode .stars { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--gold); white-space: nowrap; background: var(--bg); padding: 0 4px; border-radius: 6px; letter-spacing: 1px; }
.level-node .meta { flex: 1; }
.level-node .meta .t { font-weight: 700; font-size: 15px; }
.level-node .meta .s { font-size: 12px; color: var(--muted); }
.level-node .meta .tag { display: inline-block; margin-top: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--muted); }

/* ---------- 知识卡 ---------- */
.kcard { border-radius: 24px; padding: 22px 20px; min-height: 320px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); box-shadow: var(--shadow); animation: cardin 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes cardin { from { opacity: 0; transform: translateX(30px) rotate(1deg); } to { opacity: 1; transform: none; } }
.kcard .visual { font-size: 54px; text-align: center; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4)); animation: float 3s ease-in-out infinite; }
.kcard h3, .kcard h2.kcard-title { font-size: calc(20px * var(--fs, 1)); text-align: center; }
.kcard .body { font-size: calc(15px * var(--fs, 1)); line-height: 1.7; }
.kcard .body ul { padding-left: 20px; margin: 6px 0; }
.kcard .body li { margin: 3px 0; }
.kcard .formula { font-family: 'Cambria Math', 'Times New Roman', serif; font-size: 22px; text-align: center; padding: 10px; border-radius: 12px; background: rgba(0,0,0,0.25); border: 1px dashed color-mix(in srgb, var(--gold) 60%, transparent); color: var(--gold); }
.kcard .tip { font-size: calc(13px * var(--fs, 1)); padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 15%, transparent); border-left: 3px solid var(--orange); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.2s; }
.dots i.on { background: var(--accent); width: 22px; border-radius: 4px; }

/* ---------- 答题 ---------- */
.quiz-head { display: flex; align-items: center; gap: 10px; padding: 12px 0 8px; }
.hearts { font-size: 20px; letter-spacing: 2px; }
.hearts .lost { opacity: 0.25; filter: grayscale(1); }
.qprogress { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.qprogress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width 0.4s; }
.combo { font-weight: 900; color: var(--orange); font-size: 14px; min-width: 48px; text-align: right; }
.combo.hot { animation: combopop 0.3s; text-shadow: 0 0 12px var(--orange); }
@keyframes combopop { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
.qbox { animation: cardin 0.3s; }
.qtype { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); margin-bottom: 8px; }
.qtext { font-size: calc(17px * var(--fs, 1)); font-weight: 600; line-height: 1.6; margin-bottom: 14px; }
.q-img { display: block; max-width: 100%; max-height: 300px; margin: -4px auto 14px; border-radius: 10px; background: #fff; object-fit: contain; }
.q-img.q-thumb { max-height: 120px; margin: 6px 0; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255,255,255,0.04); cursor: pointer; text-align: left; color: var(--text); font-size: calc(15px * var(--fs, 1)); transition: all 0.15s; width: 100%; }
.opt .k { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,0.1); flex-shrink: 0; font-size: 13px; }
.opt:active { transform: scale(0.98); }
.opt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.opt.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 18%, transparent); animation: rightpop 0.4s; }
.opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 18%, transparent); animation: shake 0.4s; }
.opt:disabled { cursor: default; }
@keyframes rightpop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.judge-row { display: flex; gap: 12px; }
.judge-row .opt { justify-content: center; font-size: 18px; font-weight: 700; padding: 18px; }
.inp { width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0,0,0,0.25); color: var(--text); font-size: calc(18px * var(--fs, 1)); outline: none; }
.inp:focus { border-color: var(--accent); }
.inp-row { display: flex; gap: 10px; align-items: center; }
.inp-row .unit { font-size: 16px; color: var(--muted); white-space: nowrap; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-grid .col { display: flex; flex-direction: column; gap: 10px; }
.mitem { padding: 12px 10px; border-radius: 12px; border: 2px solid var(--line); background: rgba(255,255,255,0.04); cursor: pointer; font-size: calc(14px * var(--fs, 1)); text-align: center; color: var(--text); transition: all 0.15s; position: relative; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.mitem.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); transform: scale(1.03); }
.mitem.paired { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 18%, transparent); }
.mitem.right { border-color: var(--green) !important; }
.mitem.wrong { border-color: var(--red) !important; }
.order-pool, .order-seq { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 8px; border-radius: 14px; border: 2px dashed var(--line); }
.order-seq { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: rgba(0,0,0,0.15); }
.oitem { padding: 9px 14px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); cursor: pointer; font-size: calc(14px * var(--fs, 1)); display: inline-flex; gap: 6px; align-items: center; color: var(--text); }
.oitem .n { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.oitem.right { border-color: var(--green); } .oitem.wrong { border-color: var(--red); }
.feedback { margin-top: 14px; padding: 14px; border-radius: 16px; animation: cardin 0.3s; }
.feedback.ok { background: color-mix(in srgb, var(--green) 15%, transparent); border: 1px solid color-mix(in srgb, var(--green) 50%, transparent); }
.feedback.bad { background: color-mix(in srgb, var(--red) 15%, transparent); border: 1px solid color-mix(in srgb, var(--red) 50%, transparent); }
.feedback .fh { font-weight: 800; font-size: calc(17px * var(--fs, 1)); margin-bottom: 6px; }
.feedback .fe { font-size: calc(14px * var(--fs, 1)); color: var(--text); opacity: 0.9; }
.feedback .ans { font-size: calc(13px * var(--fs, 1)); color: var(--muted); margin-top: 6px; }

/* ---------- 阅读设置 ---------- */
body.fs-l { --fs: 1.15; }
body.fs-xl { --fs: 1.3; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
.fav-btn { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--muted); font-size: 12px; white-space: nowrap; }
.fav-btn.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.mode-row.three { grid-template-columns: repeat(3, 1fr); }
.mode-row.three .mode-card { padding: 12px 10px; }
.mode-row.three .mode-card .t { font-size: 14px; }
.answer-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.sheet-cell { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--muted); font-weight: 700; }
.sheet-cell.done { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); border-color: var(--accent); }
.sheet-cell.cur { outline: 2px solid var(--gold); }
.exam-score { font-family: var(--font-display); font-size: 72px; line-height: 1; margin: 6px 0; }
.exam-score span { font-size: 22px; }
.exam-review { padding: 12px 14px; border-radius: 14px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); }
.exam-review summary { cursor: pointer; font-size: 14px; }

/* ---------- 综合大题 ---------- */
.case-card { padding: 14px; }
.case-title { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; cursor: pointer; }
.case-fig { border-radius: 12px; background: #0f1730; border: 1px solid var(--line); padding: 6px; margin-bottom: 10px; }
.case-fig svg { display: block; width: 100%; height: auto; }
.card-fig { margin: 2px 0 4px; animation: cardin 0.4s 0.1s backwards; }
.case-stem { font-size: calc(15px * var(--fs, 1)); line-height: 1.7; }
.tts-btn { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--muted); font-size: 12px; }
.tts-btn.on { color: var(--accent); border-color: var(--accent); }

/* ---------- 排行榜 ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 18px; }
.pod { flex: 1; max-width: 140px; text-align: center; }
.pod-av { font-size: 38px; animation: float 3s ease-in-out infinite; }
.pod-1 .pod-av { font-size: 50px; }
.pod-name { font-weight: 800; font-size: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-val { font-size: 11px; color: var(--muted); min-height: 30px; }
.pod-base { margin-top: 6px; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 35%, var(--card2)), var(--card)); border: 1px solid var(--line); }
.pod-1 .pod-base { height: 90px; box-shadow: 0 0 24px rgba(255, 212, 59, 0.35); }
.pod-2 .pod-base { height: 66px; }
.pod-3 .pod-base { height: 50px; }
.pod.me .pod-name { color: var(--gold); }
.rank-no { width: 26px; text-align: center; font-family: var(--font-display); font-size: 18px; color: var(--muted); }
.rank-row.me { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 212, 59, 0.25); }

.qtype.diff-1 { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.qtype.diff-2 { background: color-mix(in srgb, var(--orange) 20%, transparent); color: var(--orange); }
.qtype.diff-3 { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); }

/* ---------- 家长守护 / 冲刺 ---------- */
.guard-lock { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; display: grid; place-items: center; padding: 24px; text-align: center; background: radial-gradient(circle at 50% 30%, #1b2459, #070a1a 70%); }
.guard-lock .box { max-width: 360px; animation: modalin 0.5s cubic-bezier(.2,1.4,.4,1); }
.sprint-card { border-color: color-mix(in srgb, #f06595 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, #f06595 22%, var(--card)), var(--card)); }
.sprint-days { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; align-content: center; background: linear-gradient(135deg, #f06595, #845ef7); color: #fff; flex-shrink: 0; }
.sprint-days b { font-family: var(--font-display); font-size: 28px; line-height: 1; color: #fff; }
.sprint-days span { font-size: 11px; }

/* ---------- 无障碍 ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.topbar h1.topbar-title { flex: 1; font-size: 20px; }
.plain-btn { background: none; border: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.world .meta h2.world-name { font-size: 19px; }
.modal h2.modal-title { font-size: 20px; margin-bottom: 10px; text-align: center; }
/* 对错同时用符号表示，色弱也能分辨 */
.opt.right::after, .mitem.right::after, .oitem.right::after { content: '✓'; margin-left: auto; padding-left: 8px; font-weight: 900; color: var(--green); }
.opt.wrong::after, .mitem.wrong::after, .oitem.wrong::after { content: '✗'; margin-left: auto; padding-left: 8px; font-weight: 900; color: var(--red); }
.judge-row .opt.right::after, .judge-row .opt.wrong::after { margin-left: 8px; }
/* 主色较浅（如黄色星球）时按钮文字仍清晰 */
.btn { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.btn.gold { text-shadow: none; }
.tabs button.active { background: color-mix(in srgb, var(--accent) 55%, #000); }

/* ---------- 新手引导 ---------- */
.tour-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 85; }
.tour-spot { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(5, 8, 20, 0.78), 0 0 0 3px var(--gold), 0 0 30px var(--gold); pointer-events: none; transition: all 0.3s; }
.tour-tip { position: fixed; left: 50%; transform: translateX(-50%); width: min(92vw, 420px); padding: 16px; border-radius: 18px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--gold); box-shadow: var(--shadow); animation: cardin 0.3s; }

.story-card .body p { margin: 0 0 10px; text-indent: 2em; }
.story-item.locked { opacity: 0.55; }

/* ---------- 道具栏 ---------- */
.item-bar { display: flex; gap: 6px; }
.item-btn { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 5px 8px 5px 6px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); color: var(--text); font-size: 15px; line-height: 1; transition: transform 0.1s; }
.item-btn:active { transform: scale(0.92); }
.item-btn .n { font-size: 11px; font-weight: 800; min-width: 14px; height: 14px; border-radius: 7px; background: var(--gold); color: #3b2300; display: grid; place-items: center; padding: 0 3px; }
.item-btn.off { opacity: 0.45; filter: grayscale(0.6); }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mode-card { padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 25%, var(--card)), var(--card)); cursor: pointer; transition: transform 0.15s; position: relative; overflow: hidden; }
.mode-card:active { transform: scale(0.97); }
.mode-card .ic { font-size: 30px; }
.mode-card .t { font-weight: 800; margin-top: 4px; }
.mode-card .s { font-size: 12px; color: var(--muted); }
.mode-card .best { position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--gold); font-weight: 700; }
.timer-lite { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; margin: 6px 0 2px; }
.timer-lite > i { display: block; height: 100%; background: var(--gold); width: 100%; transition: width 0.25s linear; }

.cause-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,0.15); }
.cause-btn { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); font-size: 13px; }
.cause-btn.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 20%, transparent); }
.cause-btn:active { transform: scale(0.95); }
.kp-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--kc) 70%, transparent); background: color-mix(in srgb, var(--kc) 18%, transparent); color: var(--text); transition: transform 0.1s; }
.kp-chip:active { transform: scale(0.95); }
.kp-chip b { color: var(--text); font-weight: 800; }

/* ---------- Boss ---------- */
.boss-arena { border-radius: 24px; padding: 18px 16px 14px; background: radial-gradient(circle at 50% 0%, rgba(255, 107, 107, 0.25), transparent 60%), linear-gradient(160deg, #2a1230, #15102b); border: 1px solid rgba(255,107,107,0.3); position: relative; overflow: hidden; }
.boss-face { font-size: 72px; text-align: center; filter: drop-shadow(0 10px 20px rgba(255,0,0,0.35)); animation: bossidle 2.4s ease-in-out infinite; }
@keyframes bossidle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-8px) scale(1.04); } }
.boss-face.hit { animation: bosshit 0.45s; }
@keyframes bosshit { 0% { transform: scale(1) rotate(0); filter: brightness(2) drop-shadow(0 0 20px #fff); } 30% { transform: scale(0.85) rotate(-8deg); } 60% { transform: scale(1.1) rotate(6deg); } 100% { transform: scale(1); } }
.boss-face.attack { animation: bossattack 0.5s; }
@keyframes bossattack { 0% { transform: scale(1); } 40% { transform: scale(1.5) translateY(30px); } 100% { transform: scale(1); } }
.boss-name { text-align: center; font-family: var(--font-display); font-size: 20px; color: #ffb3b3; }
.hpbar { height: 16px; border-radius: 999px; background: rgba(0,0,0,0.4); overflow: hidden; border: 1px solid rgba(255,255,255,0.15); margin: 8px 0; }
.hpbar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f03e3e, #ff8787); transition: width 0.45s cubic-bezier(.2,.8,.2,1); }
.hpbar.player > i { background: linear-gradient(90deg, #20c997, #51cf66); }
.hp-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.taunt { position: relative; margin: 10px auto 0; max-width: 90%; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,0.1); font-size: 14px; text-align: center; animation: cardin 0.3s; }
.timer { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; margin: 10px 0 2px; }
.timer > i { display: block; height: 100%; background: var(--gold); width: 100%; transition: width 0.25s linear; }
.timer.urgent > i { background: var(--red); }
.dmg { position: absolute; font-weight: 900; font-size: 28px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); pointer-events: none; animation: dmgfly 0.9s ease-out forwards; }
@keyframes dmgfly { 0% { opacity: 1; transform: translateY(0) scale(0.6); } 30% { transform: translateY(-20px) scale(1.3); } 100% { opacity: 0; transform: translateY(-70px) scale(1); } }

/* Boss 演出 */
.boss-face.boss-enter { animation: bossenter 0.9s cubic-bezier(.2,1.4,.4,1), bossidle 2.4s 0.9s ease-in-out infinite; }
@keyframes bossenter { 0% { transform: translateY(-160px) scale(0.3) rotate(-25deg); opacity: 0; filter: brightness(3); } 60% { transform: translateY(12px) scale(1.18); opacity: 1; } 80% { transform: translateY(-4px) scale(0.96); } 100% { transform: none; filter: none; } }
.boss-arena.rage { border-color: rgba(255, 60, 60, 0.75); animation: ragepulse 1.2s ease-in-out infinite; }
@keyframes ragepulse { 0%, 100% { box-shadow: inset 0 0 26px rgba(255, 0, 0, 0.22); } 50% { box-shadow: 0 0 26px 3px rgba(255, 60, 60, 0.45), inset 0 0 48px rgba(255, 0, 0, 0.42); } }
.boss-arena.rage .boss-face { filter: drop-shadow(0 0 14px #ff3b3b) saturate(1.7); animation: bossidle 1.1s ease-in-out infinite; }
.rage-tag { color: #ff6b6b; font-size: 12px; }
.boss-arena.danger::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 44px rgba(255, 30, 30, 0.75); animation: heartbeat 0.9s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { opacity: 0.25; } 15% { opacity: 1; } 30% { opacity: 0.45; } 45% { opacity: 0.9; } }
.boss-face.boss-die { animation: bossdie 1.5s forwards !important; }
@keyframes bossdie { 0% { transform: scale(1); } 12% { transform: scale(1.35) rotate(-10deg); filter: brightness(3); } 24% { transform: scale(1.1) rotate(10deg); filter: brightness(1.2); } 38% { transform: scale(1.45) rotate(-8deg); filter: brightness(4); } 55% { transform: scale(1.2) rotate(6deg); } 100% { transform: scale(0.05) rotate(540deg); opacity: 0; filter: brightness(6) blur(6px); } }
.boss-arena.defeated { border-color: rgba(255, 212, 59, 0.6); box-shadow: 0 0 40px rgba(255, 212, 59, 0.35); }

/* ---------- 结算 ---------- */
.result { text-align: center; padding: 20px 10px; }
.result .bigstars { font-size: 46px; letter-spacing: 6px; margin: 10px 0; }
.result .bigstars span { display: inline-block; opacity: 0.25; filter: grayscale(1); transform: scale(0.6); }
.result .bigstars span.on { opacity: 1; filter: none; animation: starpop 0.5s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes starpop { 0% { transform: scale(0.2) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }
.result .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.result .stat { padding: 12px 6px; border-radius: 14px; background: rgba(255,255,255,0.06); }
.result .stat .v { font-size: 22px; font-weight: 900; font-family: var(--font-display); }
.result .stat .k { font-size: 12px; color: var(--muted); }
.reward-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.reward { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,212,59,0.1); border: 1px solid rgba(255,212,59,0.3); font-size: 14px; animation: cardin 0.4s backwards; }
.reward .ic { font-size: 22px; }

/* ---------- 实验室 ---------- */
.sim-wrap { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #0f1730; color: #eef2ff; }
.sim-task { display: block; line-height: 1.6; padding: 10px 14px; background: rgba(255, 212, 59, 0.12); border-bottom: 1px solid rgba(255, 212, 59, 0.25); font-size: 14px; }
.sim-task > b { color: var(--gold); margin: 0 4px; }
.sim-task .sim-quiz, .sim-task .quiz { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sim-task.done { background: rgba(81, 207, 102, 0.15); border-color: rgba(81, 207, 102, 0.4); }
.sim-canvas { display: block; width: 100%; height: 260px; background: #0f1730; touch-action: none; }
.sim-controls { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.sim-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sim-row > span:first-child { min-width: 64px; color: #c3cbea; }
.sim-row input[type=range] { flex: 1; accent-color: var(--accent); }
.sim-readout { min-width: 76px; text-align: right; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.sim-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sim-controls select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: #1a2250; color: #eef2ff; }
.sim-controls input[type=text], .sim-controls input[type=number] { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: #1a2250; color: #eef2ff; width: 90px; }

/* ---------- 列表 / 其它屏 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); }
.item .ic { font-size: 28px; width: 44px; text-align: center; }
.item .meta { flex: 1; min-width: 0; }
.item .meta .t { font-weight: 700; }
.item .meta .s { font-size: 12px; color: var(--muted); }
.item.locked { opacity: 0.5; filter: grayscale(0.8); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { padding: 14px 10px; border-radius: 16px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); text-align: center; }
.stat-tile .v { font-size: 24px; font-weight: 900; font-family: var(--font-display); color: var(--accent); }
.stat-tile .k { font-size: 12px; color: var(--muted); }
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { aspect-ratio: 1; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); font-size: 28px; cursor: pointer; }
.badge .n { font-size: 10px; color: var(--muted); text-align: center; padding: 0 4px; line-height: 1.2; }
.badge.got { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,212,59,0.3); }
.badge.got .n { color: var(--text); }
.badge:not(.got) { filter: grayscale(1); opacity: 0.45; }
.formula-card { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); }
.formula-card .expr { font-family: 'Cambria Math', 'Times New Roman', serif; font-size: 22px; color: var(--gold); margin: 4px 0; }
.formula-card .m { font-size: 13px; color: var(--muted); }
.formula-card.locked { opacity: 0.5; }
.formula-card.locked .expr { filter: blur(5px); }
.shop-item { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); text-align: center; }
.shop-item .ic { font-size: 40px; }
.shop-item .n { font-weight: 700; margin: 4px 0; font-size: 14px; }
.shop-item.owned { border-color: var(--green); }
.shop-item.equipped { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,212,59,0.3); }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-family: var(--font-display); font-size: 18px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,0.06); margin: 6px 0 14px; }
.tabs button { flex: 1; border: none; background: none; color: var(--muted); padding: 8px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.tabs button.active { background: color-mix(in srgb, var(--accent) 55%, #000); color: #fff; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { font-size: 48px; margin-bottom: 8px; }
.streak-ring { width: 120px; height: 120px; border-radius: 50%; margin: 10px auto; display: grid; place-items: center; background: conic-gradient(var(--orange) var(--p, 0%), rgba(255,255,255,0.08) 0); position: relative; }
.streak-ring::before { content: ''; position: absolute; top: 10px; right: 10px; bottom: 10px; left: 10px; border-radius: 50%; background: var(--card); }
.streak-ring .v { position: relative; text-align: center; }
.streak-ring .v b { font-size: 34px; font-family: var(--font-display); color: var(--orange); display: block; line-height: 1; }
.streak-ring .v span { font-size: 12px; color: var(--muted); }
.week { display: flex; justify-content: space-between; margin: 12px 0; }
.week .d { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255,255,255,0.06); color: var(--muted); }
.week .d.on { background: var(--orange); color: #fff; font-weight: 800; }
.week .d.today { outline: 2px solid var(--accent); }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: rgba(5, 8, 20, 0.7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fadein 0.2s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(440px, 100%); border-radius: 24px; padding: 22px 20px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); box-shadow: var(--shadow); animation: modalin 0.3s cubic-bezier(.2,1.4,.4,1); max-height: 85vh; overflow: auto; }
@keyframes modalin { from { transform: scale(0.8) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 20px; margin-bottom: 10px; text-align: center; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions .btn { flex: 1; }
.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92%, 420px); }
.toast { padding: 10px 16px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: toastin 0.3s cubic-bezier(.2,1.4,.4,1); max-width: 100%; text-align: center; }
.toast.ok { border-color: var(--green); } .toast.bad { border-color: var(--red); } .toast.gold { border-color: var(--gold); color: var(--gold); }
@keyframes toastin { from { transform: translateY(-20px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.out { animation: toastout 0.3s forwards; }
@keyframes toastout { to { transform: translateY(-20px); opacity: 0; } }
.ach-pop { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 70; padding: 16px 22px; border-radius: 20px; background: linear-gradient(135deg, #3b2f0a, #1a1505); border: 2px solid var(--gold); box-shadow: 0 0 40px rgba(255,212,59,0.4); display: flex; gap: 14px; align-items: center; animation: achin 0.5s cubic-bezier(.2,1.5,.4,1), toastout 0.4s 3.2s forwards; pointer-events: none; }
@keyframes achin { from { transform: translateX(-50%) scale(0.3) rotate(-10deg); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.ach-pop .ic { font-size: 40px; animation: float 2s infinite; }
.ach-pop .t { font-size: 12px; color: var(--gold); }
.ach-pop .n { font-weight: 800; font-size: 17px; }
.float-text { position: fixed; z-index: 65; font-weight: 900; font-size: 22px; pointer-events: none; animation: dmgfly 1s ease-out forwards; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
#fx-canvas { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 55; pointer-events: none; }
.shake { animation: shake 0.4s; }
.lvlup { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 80; display: grid; place-items: center; background: rgba(5,8,20,0.75); animation: fadein 0.3s; }
.lvlup .box { text-align: center; animation: modalin 0.5s cubic-bezier(.2,1.5,.4,1); }
.lvlup .lv { font-family: var(--font-display); font-size: 70px; color: var(--gold); text-shadow: 0 0 40px var(--gold); line-height: 1; }
.lvlup .t { font-size: 20px; margin-top: 10px; }

/* ---------- 首次引导 ---------- */
.onboard { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 30px 0; }
.onboard .logo { font-size: 90px; animation: float 3s infinite; filter: drop-shadow(0 10px 30px rgba(77,171,247,0.5)); }
.onboard h1 { font-size: 36px; margin: 10px 0 4px; }
.avatar-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 16px 0; }
.avatar-pick button { width: 54px; height: 54px; border-radius: 50%; font-size: 28px; border: 2px solid var(--line); background: var(--card); }
.avatar-pick button.on { border-color: var(--accent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent); transform: scale(1.1); }

@media (max-width: 380px) {
  .result .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .lnode { width: 64px; height: 64px; font-size: 26px; }
}
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
/* 生活中的物理 / 家长简报卡 */
.life-photo { display: block; max-width: 100%; max-height: 320px; margin: 8px auto; border-radius: 12px; object-fit: contain; }
.talk-card summary { cursor: pointer; font-weight: 700; line-height: 1.6; }
.talk-card summary::marker { color: var(--accent); }
.brief-img { display: block; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.35); }
/* 实验报告 */
.lab-h { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 8px; }
.lab-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #1a1a2e; font-weight: 800; font-size: 14px; flex: none; }
.lab-steps { margin: 4px 0 0; padding-left: 22px; line-height: 1.7; font-size: 14px; }
.lab-table-wrap { overflow-x: auto; margin-top: 8px; }
.lab-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.lab-table th, .lab-table td { border: 1px solid rgba(255,255,255,0.18); padding: 4px; text-align: center; }
.lab-table th { background: rgba(255,255,255,0.06); font-weight: 600; }
.lab-cell { width: 100%; min-width: 56px; box-sizing: border-box; background: rgba(255,255,255,0.06); border: 1px solid transparent; border-radius: 6px; color: var(--text); padding: 6px 4px; text-align: center; font-size: 14px; }
.lab-cell:focus { outline: 2px solid var(--accent); }
/* 分步讲解 */
.steps-q { margin-bottom: 10px; line-height: 1.6; max-height: 6.5em; overflow: auto; }
.steps-list { margin: 0; padding-left: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 8px; }
.step-item { counter-increment: st; position: relative; padding: 10px 40px 10px 40px; border-radius: 12px; background: rgba(255,255,255,0.06); line-height: 1.7; animation: stepIn .35s ease-out both; }
.step-item::before { content: counter(st); position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #1a1a2e; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.step-item:last-child { outline: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.step-tts { position: absolute; right: 6px; top: 6px; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step-item { animation: none; } }
/* 作业 */
.hw-group summary { cursor: pointer; font-weight: 700; }
.hw-opt { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; cursor: pointer; }
.hw-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.hw-made summary { cursor: pointer; line-height: 1.6; }
/* 学习时长 */
.time-bars { display: flex; align-items: flex-end; height: 96px; margin-top: 14px; }
.time-bar { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--accent), #4dabf7); position: relative; min-width: 0; }
.time-bar span { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--text); }
.time-labels { display: flex; margin-top: 4px; }
.time-labels > div { flex: 1; text-align: center; font-size: 10px; min-width: 0; white-space: nowrap; overflow: visible; }
/* 错题筛选 */
.filter-chips { gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
button.kp-chip { color: var(--text); font: inherit; font-size: 12px; }
.kp-chip.on { font-weight: 800; box-shadow: 0 0 0 2px color-mix(in srgb, var(--kc) 50%, transparent); }
.steps-fig { margin: 0 0 10px; border-radius: 12px; background: rgba(255,255,255,0.05); padding: 8px 10px; }
.steps-fig summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.steps-fig .card-fig { margin-top: 8px; }

/* 使用说明 */
.help-h2 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.help-h3 { font-size: 15px; margin: 14px 0 4px; }
.help-p, .help-list { font-size: 14px; line-height: 1.75; margin: 6px 0; }
.help-list { padding-left: 22px; }
.help-list li { margin: 4px 0; }
.help-quote { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); border-left: 3px solid var(--accent); font-size: 14px; margin-bottom: 10px; }
.help-table-wrap { overflow-x: auto; margin: 8px 0; }
.help-table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.help-table th, .help-table td { border: 1px solid color-mix(in srgb, currentColor 22%, transparent); padding: 6px 8px; text-align: left; vertical-align: top; }
.help-table th { background: color-mix(in srgb, currentColor 8%, transparent); }
.help-sec code, .help-quote code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, currentColor 12%, transparent); word-break: break-all; }
.help-sec mark { background: var(--gold); color: #222; border-radius: 3px; padding: 0 2px; }
