/* 嘉豪智慧课堂 · AI 背诵测评（白色主题） */
:root {
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --line: #E4E8EE;
  --line-strong: #D7DDE5;
  --text: #1F2937;
  --ink: #14181F;
  --muted: #6B7280;
  --gold: #FFD400;
  --gold-hover: #FFDF52;
  --gold-deep: #C9A500;
  --gold-dark: #A88500;
  --gold-ink: #4F3F00;
  --gold-50: #FFFBEB;
  --gold-100: #FFF4C7;
  --red: #E5484D;
  --green: #25C06A;
  --blue: #3B7DE0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-float: 0 12px 32px -12px rgba(15, 23, 42, .18);
  --shadow-modal: 0 24px 60px -20px rgba(15, 23, 42, .30);
  --font: Inter, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(255, 212, 0, .16), transparent 62%),
    radial-gradient(700px 460px at 100% 0%, rgba(201, 165, 0, .06), transparent 55%);
  pointer-events: none;
  z-index: -1;
}
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }
a { color: var(--gold-dark); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row-gap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-gap.end { justify-content: flex-end; }

/* ---------- 顶部栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 40px);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  color: #FFD400;
  background: none;
  box-shadow: none;
}
.brand-mark svg { display: block; width: 32px; height: 32px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .5px; color: var(--ink); line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.topbar-ctx { flex: 1; display: flex; align-items: center; justify-content: center; gap: 14px; min-width: 0; padding: 0 24px; }
.ctx-search { position: relative; width: min(420px, 40vw); }
.ctx-search.hidden { display: none; }
.ctx-search .ctx-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.ctx-search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #F7F8FA;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border .16s ease, box-shadow .16s ease, background .16s ease;
}
.ctx-search input:focus { border-color: var(--gold-deep); background: #fff; box-shadow: 0 0 0 3px rgba(255, 212, 0, .16); }
.topbar-class { font-size: 13px; color: var(--gold-dark); font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.topbar-right { display: flex; gap: 8px; }
.ghost-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  transition: all .16s ease;
}
.ghost-btn:hover { background: var(--gold-50); border-color: var(--gold); }
.primary-btn {
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 2px 6px rgba(201, 165, 0, .18);
  transition: background .16s ease, transform .16s ease;
}
.primary-btn:hover { background: var(--gold-hover); transform: translateY(-1px); }
.primary-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.danger-btn {
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(229, 72, 77, .22);
}
.wide { width: 100%; }
.big { padding: 15px 34px; font-size: 16px; }
.back-btn { background: none; color: var(--muted); padding: 0; margin-bottom: 8px; font-size: 13px; }
.back-btn:hover { color: var(--ink); }

/* ---------- 视图容器 ---------- */
.view {
  max-width: 1460px;
  margin: 0 auto;
  padding: 30px clamp(18px, 3.4vw, 52px) 48px;
  min-height: calc(100vh - 64px);
  animation: fadeUp .3s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 5px; letter-spacing: .2px; color: var(--ink); font-weight: 600; }
.section-head p { margin: 0; font-size: 13px; }

/* ---------- 登录 ---------- */
.login-view {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(30px, 5vw, 84px);
  max-width: 1400px;
  padding-top: 54px;
}
.login-left h1 {
  font-size: clamp(38px, 4.6vw, 68px);
  line-height: 1.14;
  margin: 18px 0 20px;
  letter-spacing: -.5px;
  font-weight: 700;
  color: var(--ink);
}
.login-left h1 span {
  background: linear-gradient(transparent 62%, var(--gold) 62%, var(--gold) 92%, transparent 92%);
  color: var(--ink);
}
.login-badge {
  display: inline-block;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold-50);
  color: var(--gold-ink);
  font-size: 12px;
  letter-spacing: 1px;
}
.login-desc { color: var(--muted); font-size: clamp(14px, 1.15vw, 16px); line-height: 1.9; max-width: 620px; }
.login-features { display: flex; gap: 32px; margin: 30px 0; flex-wrap: wrap; }
.feature b { display: block; font-size: 28px; color: var(--ink); font-weight: 700; }
.feature b::after { content: ""; display: block; width: 22px; height: 3px; background: var(--gold); margin-top: 6px; border-radius: 2px; }
.feature span { font-size: 12px; color: var(--muted); }
.login-tip { color: var(--muted); font-size: 13px; }
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px);
  box-shadow: var(--shadow-float);
}
.login-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: .2px; color: var(--ink); }
.login-card .muted { margin: 0 0 22px; font-size: 13px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .3px; }
.field select, .field input, textarea, .search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border .16s ease, box-shadow .16s ease;
}
.field select:focus, .field input:focus, textarea:focus, .search:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, .18);
}
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 4px 0 20px; }
.check input { accent-color: var(--gold-deep); }
.login-error { color: var(--red); font-size: 13px; min-height: 18px; margin: 10px 0 0; }
.login-note { color: #9CA3AF; font-size: 12px; text-align: center; margin: 12px 0 0; }

/* ---------- 选人 ---------- */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 12px; }
.roster-item {
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  transition: all .16s ease;
}
.roster-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold-deep);
  box-shadow: var(--shadow-float);
}
.roster-item b { display: block; font-size: 19px; margin-bottom: 5px; letter-spacing: .2px; color: var(--ink); font-weight: 600; }
.roster-item span { font-size: 11px; color: var(--muted); }
.roster-item em {
  display: inline-block; margin-top: 6px; font-style: normal;
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: #FFF9DB; color: #8A6D00; border: 1px solid #F1E3A2;
}
.chip-group { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.chip.active { background: var(--gold-50); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.scope-grade {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 8px; background: #FFF9DB; border: 1px solid #F1E3A2;
  color: #6B5800; font-size: 12.5px; font-weight: 600;
}
.search { max-width: 300px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 13px; }

/* ---------- 首页 ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.welcome h1 { font-size: clamp(28px, 3vw, 42px); margin: 6px 0 8px; letter-spacing: .2px; color: var(--ink); font-weight: 600; }
.welcome-ring {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--gold-50);
  border: 1px solid var(--gold);
  font-size: 28px; font-weight: 700; color: var(--ink);
  flex-shrink: 0;
}
.welcome-ring span { display: block; font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: 1px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mode-card {
  text-align: left;
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: all .18s ease;
}
.mode-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  right: -70px; top: -90px; background: var(--gold-50);
}
.mode-dictation::after { background: #F1F5FF; }
.mode-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); box-shadow: var(--shadow-float); }
.mode-icon {
  width: 54px; height: 54px; border-radius: 10px;
  display: grid; place-items: center; font-size: 24px; font-weight: 700;
  background: var(--gold-50); color: var(--gold-ink); margin-bottom: 18px;
  position: relative; z-index: 1;
}
.mode-dictation .mode-icon { background: #F1F5FF; color: #1D4ED8; }
.mode-card h3 { font-size: clamp(20px, 1.8vw, 26px); margin: 0 0 10px; letter-spacing: .2px; color: var(--ink); font-weight: 600; position: relative; z-index: 1; }
.mode-card p { color: var(--muted); line-height: 1.8; margin: 0 0 22px; font-size: 13px; max-width: 520px; position: relative; z-index: 1; }
.mode-link { color: var(--gold-dark); font-size: 13px; letter-spacing: .3px; font-weight: 600; position: relative; z-index: 1; }
.mode-dictation .mode-link { color: #1D4ED8; }
.recent-wrap { margin-top: 30px; }
.recent-wrap h3 { font-size: 15px; letter-spacing: .2px; margin-bottom: 12px; color: var(--ink); font-weight: 600; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.recent-item {
  padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.recent-item b { font-size: 13px; display: block; margin-bottom: 4px; font-weight: 600; color: var(--ink); }
.recent-item span { font-size: 11px; color: var(--muted); }
.recent-score { font-size: 21px; font-weight: 700; color: var(--green); }
.recent-score.low { color: var(--red); }
.recent-score.mid { color: var(--blue); }
.empty-mini { color: var(--muted); font-size: 13px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 10px; background: #fff; }

/* ---------- 篇目 ---------- */
.filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-group { display: flex; gap: 4px; padding: 4px; background: #EBEFF5; border-radius: 9px; }
.tab { padding: 7px 15px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; transition: all .16s; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); font-weight: 600; }
.text-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.text-item {
  text-align: left; padding: 18px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); color: var(--text); transition: all .16s ease;
}
.text-item:hover { transform: translateY(-2px); border-color: var(--gold-deep); box-shadow: var(--shadow-float); }
.text-item .t-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.text-item h3 { margin: 0; font-size: 18px; letter-spacing: .2px; color: var(--ink); font-weight: 600; }
.text-item .tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--gold-50); color: var(--gold-ink); border: 1px solid var(--gold-100); white-space: nowrap; }
.text-item .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.text-item .preview { font-size: 12.5px; color: #4B5563; line-height: 1.7; }
.text-item .t-tags { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pass-badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; font-weight: 600; }
.pass-badge.pass { color: #0F8A4D; background: #E9F9F0; border-color: #BCEBD2; }
.pass-badge.fail { color: #C93636; background: #FDECEC; border-color: #F6C9C9; }
.pass-badge.none { color: var(--muted); background: #F3F4F6; border-color: #E5E7EB; font-weight: 500; }
.text-item .best-line { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.best-go { margin-left: auto; color: #8A6D00; font-weight: 600; }

/* ---------- 背诵 ---------- */
.recite-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.recite-title h2 { margin: 0 0 5px; font-size: clamp(22px, 2.2vw, 30px); color: var(--ink); font-weight: 600; }
.recite-title p { margin: 0; font-size: 12.5px; }
.recite-stats { display: flex; gap: 16px; color: var(--muted); font-size: 12px; letter-spacing: .5px; }
.recite-body { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; align-items: start; }
.paper {
  padding: clamp(22px, 2.6vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 2.2;
  letter-spacing: .5px;
  max-height: 66vh;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.paper::-webkit-scrollbar { width: 6px; }
.paper::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
.paper .miss { color: var(--red); background: #FEF0F0; border-bottom: 2px solid var(--red); border-radius: 2px; }
.paper .ok { color: var(--ink); }
.mic-panel {
  position: sticky; top: 82px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.mic-orbit {
  width: 200px; height: 200px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: var(--gold-50);
  border: 1px solid var(--gold-100);
}
.mic-orbit::before, .mic-orbit::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--gold-100); }
.mic-orbit::after { inset: 34px; }
.mic-orbit.recording { animation: pulse 2s ease-in-out infinite; border-color: #F7C6C8; background: #FFF7F7; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .10); }
  50% { box-shadow: 0 0 0 24px rgba(229, 72, 77, 0); }
}
.mic-core { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center; gap: 5px; }
.mic-label { font-size: 12px; color: var(--muted); letter-spacing: 1.5px; }
.mic-time { font-size: 34px; font-weight: 700; letter-spacing: 1.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.live-box { width: 100%; }
.live-head { font-size: 11.5px; color: var(--muted); letter-spacing: .5px; display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #CBD5E1; }
.live-box.recording .dot { background: var(--red); box-shadow: 0 0 6px rgba(229, 72, 77, .6); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.live-text {
  min-height: 110px; max-height: 200px; overflow: auto;
  padding: 13px 15px; border-radius: 8px;
  background: #F8FAFC; border: 1px solid var(--line);
  font-size: 14px; line-height: 1.85; color: #475569;
}
.mic-actions { width: 100%; display: flex; justify-content: center; }
.mic-hint { font-size: 11.5px; color: #94A3B8; text-align: center; line-height: 1.7; }

/* ---------- 弹窗 / 倒计时 ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(15, 23, 42, .38); backdrop-filter: blur(4px); padding: 20px; }
.modal-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px; padding: 34px; text-align: center;
  box-shadow: var(--shadow-modal);
}
.modal-card.wide-card { width: min(640px, 100%); text-align: left; }
.modal-card h2 { margin: 8px 0; font-size: 23px; color: var(--ink); }
.modal-card textarea { width: 100%; resize: vertical; margin: 12px 0 20px; line-height: 1.8; }
.countdown { font-size: 80px; font-weight: 800; color: var(--gold-deep); margin: 16px 0 22px; font-variant-numeric: tabular-nums; animation: pop .6s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- 结果 ---------- */
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.result-head h2 { margin: 0; font-size: clamp(21px, 2vw, 28px); color: var(--ink); font-weight: 600; }
.result-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 18px; }
.score-card, .dims-card, .detail-card, .ai-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: clamp(22px, 2.4vw, 32px);
  box-shadow: var(--shadow);
}
.score-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ring-wrap { position: relative; width: 210px; height: 210px; }
.score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #EEF1F5; stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--gold-deep); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 540; stroke-dashoffset: 540; transition: stroke-dashoffset 1.2s cubic-bezier(.22,.8,.2,1); }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-num { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: .5px; color: var(--ink); }
.ring-level { font-size: 12px; color: var(--gold-dark); letter-spacing: 2px; margin-top: 7px; font-weight: 600; }
.score-card h3 { margin: 12px 0 5px; font-size: 18px; color: var(--ink); font-weight: 600; }
.quick-stats { display: flex; gap: 24px; margin-top: 20px; }
.quick-stats b { display: block; font-size: 20px; color: var(--ink); }
.quick-stats span { font-size: 10.5px; color: var(--muted); }
.dims-card h3, .detail-card h3 { margin: 0 0 18px; font-size: 15px; letter-spacing: .2px; color: var(--ink); font-weight: 600; }
.dim { margin-bottom: 18px; }
.dim-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.dim-head b { color: var(--gold-dark); font-size: 15px; }
.bar { height: 7px; border-radius: 99px; background: #EEF1F5; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width 1s ease; }
.dim p { font-size: 11px; color: #9CA3AF; margin: 5px 0 0; }
.detail-card { margin-top: 18px; }
.ai-card { margin-top: 18px; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ai-head h3 { margin: 0; font-size: 15px; color: var(--ink); font-weight: 600; }
.ai-state { font-size: 11.5px; color: var(--muted); }
.ai-comment {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  background: #FFFBE6; border: 1px solid #F5E7A6;
  font-size: 14.5px; line-height: 1.75; color: #6B5800; font-weight: 500;
}
.ai-block h4 { margin: 0 0 5px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.ai-block p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.8; color: #374151; }
.ai-block:last-child p { margin-bottom: 0; }
.ai-empty { color: var(--muted) !important; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-head h3 { margin: 0; }
.legend { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 10px; }
.sw.miss { background: #FEF0F0; border-bottom: 2px solid var(--red); }
.sw.ok { background: #F0FDF4; border-bottom: 2px solid var(--green); }
.compare { max-height: 44vh; font-size: clamp(17px, 1.3vw, 21px); }
.suggest {
  margin: 16px 0 20px; padding: 14px 16px; border-radius: 8px;
  background: var(--gold-50); border: 1px solid var(--gold-100);
  font-size: 13px; line-height: 1.9; color: var(--gold-ink);
}

/* ---------- 听写 ---------- */
.dict-setup { max-width: 960px; }
.dict-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.kind-card { text-align: left; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--muted); transition: all .16s; }
.kind-card b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 7px; font-weight: 600; }
.kind-card span { font-size: 12px; line-height: 1.7; }
.kind-card.active { border-color: var(--gold-deep); background: var(--gold-50); }
.kind-card.active b { color: var(--gold-ink); }
.dict-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dict-note { margin: 6px 0 22px; font-size: 12.5px; color: var(--muted); padding: 12px 16px; border-radius: 8px; background: #fff; border: 1px dashed var(--line-strong); }
.dict-run-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dict-progress { flex: 1; max-width: 520px; }
.dict-progress span { font-size: 12px; color: var(--muted); }
.progress { height: 7px; border-radius: 99px; background: #E9EDF3; margin-top: 9px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .3s; }
.dict-timer { font-size: 17px; font-variant-numeric: tabular-nums; color: var(--gold-dark); letter-spacing: 1px; font-weight: 600; }
.dict-card {
  max-width: 880px; margin: 0 auto; padding: clamp(28px, 3.4vw, 50px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow-float); text-align: center;
}
.dict-tag { display: inline-block; padding: 5px 13px; border-radius: 999px; background: var(--gold-50); color: var(--gold-ink); font-size: 11.5px; letter-spacing: .3px; margin-bottom: 18px; border: 1px solid var(--gold-100); }
.dict-question { font-size: clamp(19px, 2vw, 27px); line-height: 1.9; min-height: 80px; color: var(--ink); white-space: pre-wrap; }
.dict-audio { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.speak-btn { padding: 12px 24px; border-radius: 8px; background: #F1F5FF; color: #1D4ED8; border: 1px solid #C7D6FF; font-size: 14px; }
.dict-answer { width: 100%; margin: 24px 0 18px; padding: 16px 18px; font-size: 21px; text-align: center; border-radius: 10px; background: #fff; border: 1px solid var(--line-strong); color: var(--ink); outline: none; letter-spacing: 1.5px; }
.dict-answer:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(255, 212, 0, .18); }
.dict-actions { display: flex; gap: 10px; justify-content: center; }
.dict-result-score { text-align: right; }
.dict-result-score b { font-size: 50px; color: var(--gold-dark); line-height: 1; }
.dict-result-score span { color: var(--muted); font-size: 12px; margin-left: 5px; }
.dict-review { display: grid; gap: 10px; }
.review-item { padding: 16px 20px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.review-item.ok { border-left: 3px solid var(--green); }
.review-item.bad { border-left: 3px solid var(--red); }
.review-item .rv-head { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.review-item .rv-answer { font-size: 14px; line-height: 1.8; }
.review-item .rv-answer em { font-style: normal; color: var(--green); font-weight: 600; }
.review-item.bad .rv-answer em { color: var(--red); }
.review-item .rv-expected { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---------- 抽屉 ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); backdrop-filter: blur(3px); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 92vw); background: #fff; border-left: 1px solid var(--line); padding: 24px; overflow: auto; animation: slideIn .28s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-head h3 { margin: 0; font-size: 17px; color: var(--ink); }
.drawer-body { display: grid; gap: 9px; }
.history-item { padding: 13px 15px; border-radius: 10px; background: #F8FAFC; border: 1px solid var(--line); }
.history-item .h-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.history-item .h-top b { font-size: 13px; color: var(--ink); }
.history-item .h-top span { font-size: 18px; font-weight: 700; color: var(--gold-dark); }
.history-item .h-meta { font-size: 10.5px; color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 8px; background: var(--ink);
  color: #fff; font-size: 13px; z-index: 99; max-width: 80vw; text-align: center;
  box-shadow: var(--shadow-float);
}
.toast.error { background: #B91C1C; }
.toast.ok { background: #15803D; }

/* ---------- 背诵舞台 / 对照 ---------- */
.recite-stage {
  max-width: 860px;
  margin: clamp(6px, 3vh, 40px) auto 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.recite-stage .mic-orbit { width: 280px; height: 280px; }
.recite-stage .mic-time { font-size: 46px; }
.recite-status { font-size: 14px; color: var(--muted); letter-spacing: 4px; min-height: 20px; }
.auto-scope { font-size: 13px; color: var(--gold-dark); font-weight: 600; }
.sub-title { font-size: 14px; margin: 22px 0 10px; color: var(--ink); font-weight: 600; }
.transcript-box {
  padding: 18px 22px; border: 1px solid var(--line); border-radius: 10px;
  background: #F8FAFC; font-size: 16px; line-height: 1.9; color: #374151;
  white-space: pre-wrap; max-height: 26vh; overflow: auto; letter-spacing: .5px;
}
.paper .homo { color: #B45309; background: #FFFBEB; border-bottom: 2px solid #D97706; border-radius: 2px; }
.sw.homo { background: #FFFBEB; border-bottom: 2px solid #D97706; }

/* ---------- 听写台 ---------- */
.dict-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.dict-scope { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.dict-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.scope-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; max-height: 56vh; overflow: auto; padding-right: 4px;
}
.scope-item {
  display: flex; gap: 10px; align-items: center; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; transition: all .15s;
}
.scope-item:hover { border-color: var(--gold-deep); }
.scope-item.checked { border-color: var(--gold-deep); background: var(--gold-50); }
.scope-check {
  width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 12px; color: #fff; background: #fff; flex: 0 0 auto;
}
.scope-item.checked .scope-check { background: var(--gold-deep); border-color: var(--gold-deep); }
.scope-text b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.scope-text i { font-style: normal; font-size: 11px; color: var(--muted); }
.dict-settings { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.dict-settings h3 { font-size: 15px; margin: 0 0 14px; color: var(--ink); font-weight: 600; }
.dict-settings .field { margin-bottom: 12px; }
.dict-settings .small { text-align: center; margin: 12px 0 0; }

.play-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 5vh; }
.play-source { font-size: 18px; color: var(--muted); letter-spacing: 1px; min-height: 24px; }
.play-stage .mic-orbit { width: 260px; height: 260px; }
.mic-orbit.playing { animation: pulseGold 2.2s ease-in-out infinite; }
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 165, 0, .14); }
  50% { box-shadow: 0 0 0 26px rgba(201, 165, 0, 0); }
}
.play-stage .dict-actions { flex-wrap: wrap; justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .login-view { grid-template-columns: 1fr; padding-top: 34px; }
  .login-left { text-align: center; }
  .login-features { justify-content: center; }
  .recite-body, .result-grid { grid-template-columns: 1fr; }
  .mic-panel { position: static; }
  .paper { max-height: 40vh; }
  .dict-options { grid-template-columns: 1fr 1fr; }
  .dict-layout { grid-template-columns: 1fr; }
  .dict-settings { position: static; }
}
@media (max-width: 720px) {
  .topbar { height: 58px; }
  .brand-sub, .topbar-class { display: none; }
  .topbar-ctx { padding: 0 10px; gap: 8px; }
  .ctx-search { width: 38vw; }
  .ctx-search input { height: 34px; padding-left: 30px; }
  .ghost-btn { padding: 7px 10px; }
  .view { padding-top: 22px; }
  .mode-grid, .dict-kind { grid-template-columns: 1fr; }
  .welcome-ring { display: none; }
  .dict-options { grid-template-columns: 1fr; }
  .text-list { grid-template-columns: 1fr; }
  .quick-stats { gap: 16px; }
  .recite-stage .mic-orbit { width: 220px; height: 220px; }
  .play-stage .mic-orbit { width: 200px; height: 200px; }
}
