/* =========================================================
 * Echo · 每日英语听说打卡  —— 样式表
 * ========================================================= */

/* ---------------- 变量与主题 ---------------- */
:root {
  --bg: #f5f6fb;
  --bg-soft: #eceef7;
  --card: #ffffff;
  --card-2: #fbfbfe;
  --text: #1a1f36;
  --text-2: #5b6482;
  --text-3: #8b93ad;
  --line: #e6e8f2;
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-soft: #eef0ff;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 1px 2px rgba(24, 27, 56, .04), 0 8px 24px rgba(24, 27, 56, .06);
  --shadow-lg: 0 2px 6px rgba(24, 27, 56, .06), 0 18px 46px rgba(24, 27, 56, .12);
  --radius: 20px;
  --radius-sm: 14px;
  --sidebar: 250px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0d1020;
  --bg-soft: #141830;
  --card: #171b33;
  --card-2: #1c2140;
  --text: #eef1ff;
  --text-2: #a8b0d3;
  --text-3: #7a83a8;
  --line: #262c4d;
  --brand: #818cf8;
  --brand-2: #a78bfa;
  --brand-soft: #232a52;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .4), 0 22px 50px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(99, 102, 241, .16), transparent 60%),
    radial-gradient(700px 420px at 96% 4%, rgba(236, 72, 153, .12), transparent 62%);
  pointer-events: none; z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }

/* ---------------- 布局 ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 26px 18px;
  display: flex; flex-direction: column; gap: 26px;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.main {
  position: relative; z-index: 1;
  margin-left: var(--sidebar);
  min-height: 100%;
  display: flex; flex-direction: column;
}
.view { flex: 1; padding: 20px 32px 60px; max-width: 1120px; width: 100%; margin: 0 auto; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 18px; letter-spacing: .3px; }
.brand-text span { font-size: 12px; color: var(--text-3); }

/* 导航 */
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 14px;
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: .2s;
}
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px rgba(99, 102, 241, .3); }
.sidebar-foot { margin-top: auto; }
.ghost-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 14px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2); font-size: 14px;
}
.ghost-btn:hover { color: var(--text); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-title { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: .2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--text-2);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.streak-pill {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.streak-pill b { color: var(--text); font-size: 14px; }

.foot { padding: 18px 32px 30px; color: var(--text-3); font-size: 12px; text-align: center; }

/* 底部 tab（移动端） */
.tabbar { display: none; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.section-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 30px 0 14px; font-size: 16px; font-weight: 700;
}
.section-title small { color: var(--text-3); font-weight: 500; font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 14px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .28);
  transition: transform .15s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: var(--card); color: var(--text); border-color: var(--line); box-shadow: none;
}
.btn.secondary:hover { background: var(--bg-soft); }
.btn.ok { background: linear-gradient(120deg, #10b981, #34d399); box-shadow: 0 8px 20px rgba(16, 185, 129, .3); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.wide { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
}
.chip.lv1 { background: rgba(16, 185, 129, .14); color: #0d9e73; }
.chip.lv2 { background: rgba(59, 130, 246, .14); color: #2f7de1; }
.chip.lv3 { background: rgba(139, 92, 246, .16); color: #7c53e8; }
.chip.lv4 { background: rgba(249, 115, 22, .16); color: #e2760f; }
.chip.lv5 { background: rgba(14, 165, 233, .16); color: #0284c7; }
.chip.lv6 { background: rgba(244, 114, 182, .16); color: #db2777; }
[data-theme="dark"] .chip.lv1 { color: #34d399; }
[data-theme="dark"] .chip.lv2 { color: #7fb2f7; }
[data-theme="dark"] .chip.lv3 { color: #b79cfb; }
[data-theme="dark"] .chip.lv4 { color: #fbaa63; }
[data-theme="dark"] .chip.lv5 { color: #7dd3fc; }
[data-theme="dark"] .chip.lv6 { color: #f9a8d4; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 14px; font-size: 14px; z-index: 100;
  background: #1a1f36; color: #fff; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 今日页 ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 26px 28px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(125deg, #5b5ff0 0%, #8b5cf6 48%, #ec4899 110%);
  box-shadow: 0 20px 44px rgba(99, 102, 241, .35);
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.hero::before {
  content: ""; position: absolute; right: 60px; bottom: -110px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.hero-main { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.hero-greet { font-size: 13px; opacity: .85; letter-spacing: .4px; }
.hero-title { font-size: 26px; font-weight: 750; margin: 6px 0 10px; line-height: 1.35; }
.hero-sub { font-size: 14px; opacity: .9; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero .btn { background: #fff; color: #4f46e5; box-shadow: 0 10px 24px rgba(0, 0, 0, .16); }
.hero .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); box-shadow: none; }

.ring-wrap { position: relative; z-index: 1; display: grid; place-items: center; }
.ring {
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0);
}
.ring-inner {
  width: 108px; height: 108px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px);
  display: grid; place-items: center; text-align: center; line-height: 1.2;
}
.ring-inner b { font-size: 26px; display: block; }
.ring-inner span { font-size: 11px; opacity: .85; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.stat {
  padding: 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat i { font-style: normal; font-size: 20px; }
.stat b { display: block; font-size: 26px; margin: 8px 0 2px; letter-spacing: -.5px; }
.stat span { font-size: 12px; color: var(--text-3); }

/* 热力图 */
.heat { padding: 20px 22px; }
.heat-grid {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr);
  gap: 5px; overflow-x: auto; padding-bottom: 4px;
}
.heat-cell {
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--bg-soft); border: 1px solid transparent;
}
.heat-cell.l1 { background: rgba(99, 102, 241, .3); }
.heat-cell.l2 { background: rgba(99, 102, 241, .55); }
.heat-cell.l3 { background: rgba(99, 102, 241, .8); }
.heat-cell.l4 { background: var(--brand); }
.heat-cell.today { border-color: var(--brand-2); }
.heat-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); margin-top: 12px; }

/* ---------------- 课程列表 ---------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.seg button {
  padding: 8px 14px; border-radius: 11px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600;
}
.seg button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.seg-toggle {
  padding: 10px 14px; border-radius: 14px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--text-2); border: 1px solid var(--line);
}
.seg-toggle:hover { color: var(--text); }
.seg-toggle.on { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.chip.casual { background: rgba(236, 72, 153, .14); color: #db2777; }
[data-theme="dark"] .chip.casual { color: #f9a8d4; }
.search {
  flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
}
.search input { flex: 1; border: 0; outline: none; background: transparent; color: var(--text); font-size: 14px; }
.search svg { width: 17px; height: 17px; stroke: var(--text-3); fill: none; stroke-width: 2; }

.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.lesson {
  position: relative; overflow: hidden; cursor: pointer;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.lesson:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lesson-art { height: 132px; overflow: hidden; }
.lesson-art .scene { width: 100%; height: 100%; }
.lesson-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lesson-title { font-size: 15.5px; font-weight: 700; }
.lesson-title small { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.lesson-meta { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.done-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(16, 185, 129, .4);
}
.score-badge {
  padding: 3px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--text-2); font-weight: 600;
}
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }

/* ---------------- 对话详情 ---------------- */
.detail-hero {
  position: relative; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-lg); margin-bottom: 18px;
}
.detail-hero .scene { width: 100%; height: 210px; }
.detail-hero-info {
  position: absolute; inset: auto 0 0 0; padding: 18px 22px;
  background: linear-gradient(transparent, rgba(10, 12, 30, .78));
  color: #fff;
}
.detail-hero-info h2 { margin: 0 0 4px; font-size: 22px; }
.detail-hero-info p { margin: 0; font-size: 13px; opacity: .88; }
.detail-hero-info .chip { background: rgba(255, 255, 255, .2); color: #fff; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  position: sticky; top: 68px; z-index: 12;
}
.toolbar .spacer { flex: 1; }
.rate-box { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px;
  background: var(--line); width: 110px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); cursor: pointer; box-shadow: 0 2px 6px rgba(99, 102, 241, .5);
}
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.switch input { display: none; }
.switch i {
  width: 38px; height: 22px; border-radius: 999px; background: var(--line);
  position: relative; transition: .2s; flex: none;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(16px); }

.lines { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.line { display: flex; gap: 12px; align-items: flex-start; }
.line.b { flex-direction: row-reverse; }
.avatar {
  width: 38px; height: 38px; border-radius: 13px; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 14px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.line.b .avatar { background: linear-gradient(135deg, #f97316, #ef4444); }
.bubble {
  flex: 1; max-width: 720px; padding: 14px 16px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: box-shadow .25s, border-color .25s, transform .2s;
}
.line.b .bubble { background: var(--card-2); }
.line.playing .bubble { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.bubble .en { font-size: 16.5px; line-height: 1.55; font-weight: 600; letter-spacing: .1px; }
.bubble .en span.w { cursor: pointer; border-radius: 4px; padding: 0 1px; }
.bubble .en span.w:hover { background: var(--brand-soft); color: var(--brand); }
.bubble .zh { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.bubble .zh.hide { display: none; }
.line-tools { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.mini {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 10px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text-2);
  transition: .18s;
}
.mini:hover { color: var(--brand); border-color: var(--brand); }
.mini.rec-on { background: var(--bad); color: #fff; border-color: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }

.result { margin-top: 10px; padding: 11px 13px; border-radius: 13px; background: var(--bg-soft); font-size: 13px; }
.result .score-line { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.big-score { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.s-ok { color: var(--ok); } .s-mid { color: var(--warn); } .s-bad { color: var(--bad); }
.marks { line-height: 1.9; }
.marks span { padding: 2px 6px; border-radius: 6px; margin-right: 4px; font-weight: 600; }
.marks .ok { background: rgba(16, 185, 129, .14); color: #0d9e73; }
.marks .close { background: rgba(245, 158, 11, .16); color: #d1830c; }
.marks .miss { background: rgba(239, 68, 68, .14); color: #e14b4b; text-decoration: line-through; }
.heard { margin-top: 8px; color: var(--text-3); font-size: 12px; }

.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.word {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer;
}
.word:hover { border-color: var(--brand); }
.word b { font-size: 14.5px; }
.word span { font-size: 12.5px; color: var(--text-3); display: block; margin-top: 2px; }
.word .spk { margin-left: auto; color: var(--text-3); font-size: 15px; }

.tip-card {
  padding: 16px 18px; border-radius: var(--radius); font-size: 13.5px; line-height: 1.75;
  background: linear-gradient(120deg, rgba(99, 102, 241, .1), rgba(236, 72, 153, .08));
  border: 1px solid var(--line); color: var(--text-2);
}
.tip-card b { color: var(--text); }

.finish-bar { margin: 28px 0 10px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------- 模块连读 ---------------- */
.play-module {
  margin-left: auto; align-self: center;
  padding: 8px 14px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(99, 102, 241, .3);
  transition: transform .15s;
}
.play-module:hover { transform: translateY(-1px); }

.module-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.module-btn {
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: transform .18s, box-shadow .2s, border-color .2s;
}
.module-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.module-btn .mb-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.module-btn small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.player { display: grid; grid-template-columns: 1fr 302px; gap: 18px; align-items: start; }
.player-main { padding: 20px 22px 22px; }
.player-head h2 { margin: 10px 0 0; font-size: 20px; }
.player-head h2 small { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

.stage {
  display: flex; gap: 20px; align-items: center; margin: 18px 0 16px;
  padding: 18px; border-radius: 18px; min-height: 176px;
  background: var(--bg-soft); transition: background .35s;
}
.stage.is-intro { background: linear-gradient(120deg, rgba(99, 102, 241, .14), rgba(236, 72, 153, .1)); }
.stage-art { width: 210px; flex: none; border-radius: 14px; overflow: hidden; background: var(--card); }
.stage-art .scene { width: 100%; height: 136px; display: block; }
.stage-body { flex: 1; min-width: 0; }
.stage-tag { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.stage-tag .spk {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  color: #fff; font-size: 12px; background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.stage-tag .spk.b { background: linear-gradient(135deg, #f97316, #ef4444); }
.stage-en { font-size: 25px; font-weight: 700; line-height: 1.45; letter-spacing: .2px; }
.stage.is-intro .stage-en { font-size: 22px; }
.stage-zh { margin-top: 10px; font-size: 15px; color: var(--text-2); line-height: 1.65; }
.stage-zh.hide { display: none; }
.stage-res { margin-top: 12px; padding: 10px 13px; border-radius: 12px; background: var(--card); font-size: 13px; }
.stage-res.rec { color: var(--bad); font-weight: 600; }
.stage-res .big-score { margin-right: 10px; }

.pbar { height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s; }
.pmeta { margin-top: 9px; font-size: 12.5px; color: var(--text-3); }
.player-ctrl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.player-opts {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line);
}

.player-list { padding: 14px; max-height: 620px; overflow: auto; position: sticky; top: 86px; }
.pl-head { padding: 4px 8px 12px; font-size: 14px; font-weight: 700; }
.pl-head span { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; margin-top: 3px; }
.pl-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 11px; cursor: pointer; font-size: 13.5px;
}
.pl-item:hover { background: var(--bg-soft); }
.pl-item.now { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pl-idx {
  width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center;
  font-size: 11px; color: var(--text-3); background: var(--bg-soft);
}
.pl-item.now .pl-idx { background: var(--brand); color: #fff; }
.pl-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.pl-done { color: var(--ok); }
.pl-cnt { font-size: 11px; color: var(--text-3); }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 16px 0 4px;
}
.pager .pg {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line);
}
.pager .pg:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.pager .pg.on { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.pager .pg:disabled { opacity: .4; cursor: default; }
.pager .pg.dots { border: 0; background: none; min-width: 20px; padding: 0; }
.pager .pg-total { margin-left: auto; font-size: 12.5px; color: var(--text-3); }
.head-acts { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.play-module.ghost {
  background: var(--card); color: var(--text-2); border: 1px solid var(--line); box-shadow: none;
}
.play-module.ghost:hover { color: var(--brand); border-color: var(--brand); }

/* ---------------- 模块小结 ---------------- */
.notes-head { padding: 22px 24px; margin-bottom: 16px; }
.note-card { padding: 20px 22px; margin-bottom: 16px; }
.note-head { display: flex; align-items: center; gap: 10px; font-size: 16.5px; }
.tag-kind {
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand); flex: none;
}
.note-intro { margin: 10px 0 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.note-rows { display: flex; flex-direction: column; gap: 8px; }
.note-row {
  display: grid; grid-template-columns: 1.15fr 1fr auto; gap: 12px; align-items: center;
  padding: 11px 14px; border-radius: 13px; background: var(--bg-soft); cursor: pointer;
  transition: background .18s;
}
.note-row:hover { background: var(--brand-soft); }
.nr-en { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nr-play { opacity: .35; font-size: 12px; }
.note-row:hover .nr-play { opacity: 1; }
.nr-zh { font-size: 13px; color: var(--text-2); }
.nr-note { font-size: 11.5px; color: var(--text-3); text-align: right; white-space: nowrap; }

/* ---------------- 复习 ---------------- */
.weak-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: 13px; cursor: pointer;
}
.weak-row:hover { background: var(--bg-soft); }
.tag-score {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; background: var(--bg-soft);
}
.tag-score.s-mid { background: rgba(245, 158, 11, .15); color: #d1830c; }
.tag-score.s-bad { background: rgba(239, 68, 68, .13); color: #e14b4b; }
.wr-text { flex: 1; min-width: 0; }
.wr-en { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-zh { font-size: 12px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini.ok { background: var(--ok); color: #fff; border-color: var(--ok); }

/* ---------------- 我的 ---------------- */
.rowcard { padding: 18px 20px; margin-bottom: 14px; }
.progress-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-row .nm { width: 72px; font-size: 13.5px; font-weight: 600; flex: none; }
.bar { flex: 1; height: 9px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.progress-row .num { font-size: 12.5px; color: var(--text-3); width: 56px; text-align: right; flex: none; }

.setting-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 0;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .k { flex: 1; }
.setting-row .k small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
select {
  padding: 8px 12px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 13px; font-family: inherit; max-width: 230px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 76px; }
  .view { padding: 14px 16px 30px; }
  .topbar { padding: 12px 16px; }
  .topbar-title { font-size: 19px; }
  .foot { padding: 10px 16px 20px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  }
  .tabbar .nav-item {
    flex: 1; flex-direction: column; gap: 3px; padding: 7px 0; font-size: 11px; border-radius: 12px;
  }
  .tabbar .nav-item svg { width: 22px; height: 22px; }
  .tabbar .nav-item.active { background: transparent; color: var(--brand); box-shadow: none; }

  .hero { padding: 20px; gap: 18px; border-radius: 22px; }
  .hero-title { font-size: 21px; }
  .ring { width: 108px; height: 108px; }
  .ring-inner { width: 88px; height: 88px; }
  .ring-inner b { font-size: 21px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 22px; }

  .module-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .module-btn { padding: 12px; font-size: 13px; }
  .player { grid-template-columns: 1fr; }
  .player-main { padding: 16px; }
  .stage { flex-direction: column; gap: 14px; padding: 14px; min-height: 0; }
  .stage-art { width: 100%; }
  .stage-art .scene { height: 112px; }
  .stage-body { width: 100%; }
  .stage-en { font-size: 20px; }
  .stage.is-intro .stage-en { font-size: 19px; }
  .player-list { position: static; max-height: 340px; }
  .play-module { font-size: 11.5px; padding: 7px 11px; }
  .section-title { flex-wrap: wrap; }

  .note-row { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .nr-note { text-align: left; white-space: normal; }
  .notes-head { padding: 16px; }
  .note-card { padding: 16px; }
  .head-acts { width: 100%; margin-left: 0; margin-top: 8px; }
  .head-acts .play-module { flex: 1; justify-content: center; }
  .pager { justify-content: center; }
  .pager .pg { min-width: 42px; height: 42px; }
  .pager .pg-total { width: 100%; text-align: center; margin: 6px 0 0; }
  .tag-score { width: 36px; height: 36px; font-size: 14px; }

  .lesson-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .lesson-art { height: 96px; }
  .lesson-body { padding: 11px 12px 13px; }
  .lesson-title { font-size: 14px; }

  .detail-hero .scene { height: 158px; }
  .toolbar { top: 56px; padding: 11px 12px; gap: 8px; }
  .bubble .en { font-size: 15.5px; }
  .avatar { width: 32px; height: 32px; border-radius: 11px; font-size: 12px; }
  .word-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 380px) {
  .lesson-grid { grid-template-columns: 1fr 1fr; }
  .rate-box input[type="range"] { width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
