/* ============ 设计系统：深海蓝 Pearl & Lagoon ============ */
:root {
  --bg: #e7f2f8;
  --surface: #f8fbfd;
  --surface-2: #e6eff6;
  --surface-3: #d8e6f0;
  --ink: #0b2233;
  --ink-2: #1f3d52;
  --muted: #4a6b80;
  --faint: #7d9cb0;
  --line: #d2e3ee;
  --accent: #0e7f95;
  --accent-deep: #075f73;
  --accent-soft: #d8eef3;
  --gold: #c08a2d;
  --gold-soft: #f5e8c8;
  --ok: #1e7d5a;
  --ok-soft: #d9ece3;
  --bad: #b04a4a;
  --bad-soft: #f3dddd;
  --so-soft: #efe3c8;
  --wave-1: rgba(14, 127, 149, .12);
  --wave-2: rgba(14, 127, 149, .08);
  --wave-3: rgba(192, 138, 45, .07);
  --shadow: 0 1px 2px rgba(11, 34, 51, .05), 0 8px 28px rgba(11, 34, 51, .08);
  --shadow-card: 0 2px 6px rgba(11, 34, 51, .07), 0 18px 44px rgba(7, 95, 115, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --serif: "Georgia", "Times New Roman", "Songti SC", serif;
}

[data-theme="dark"] {
  --bg: #060f18;
  --surface: #0b1a26;
  --surface-2: #102432;
  --surface-3: #17313f;
  --ink: #d9ebf4;
  --ink-2: #b3ccda;
  --muted: #7fa2b6;
  --faint: #5a7f94;
  --line: #1b3546;
  --accent: #1fa5b8;
  --accent-deep: #57cfe0;
  --accent-soft: #0d2c3a;
  --gold: #d9a84a;
  --gold-soft: #3a2f1b;
  --ok: #5fbf92;
  --ok-soft: #133326;
  --bad: #d97070;
  --bad-soft: #3a2020;
  --so-soft: #3a3322;
  --wave-1: rgba(31, 165, 184, .10);
  --wave-2: rgba(31, 165, 184, .06);
  --wave-3: rgba(217, 168, 74, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

/* 深海光晕背景 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(80% 55% at 50% -12%, rgba(64, 156, 190, .22), transparent 62%),
    radial-gradient(1200px 520px at 88% 112%, rgba(14, 127, 149, .16), transparent 60%),
    radial-gradient(900px 460px at 6% 96%, rgba(192, 138, 45, .10), transparent 55%);
}

/* 海底波浪装饰 */
.sea-deco {
  position: fixed; left: 0; right: 0; bottom: 0; height: 120px;
  z-index: -1; pointer-events: none; overflow: hidden;
}
.sea-deco svg { width: 110%; height: 100%; display: block; }
.sea-deco .w1 { fill: var(--wave-1); animation: waveDrift 16s ease-in-out infinite alternate; }
.sea-deco .w2 { fill: var(--wave-2); animation: waveDrift 22s ease-in-out infinite alternate-reverse; }
.sea-deco .w3 { fill: var(--wave-3); animation: waveDrift 28s ease-in-out infinite alternate; }
@keyframes waveDrift { from { transform: translateX(-2.5%); } to { transform: translateX(1.5%); } }

kbd {
  font-family: var(--mono); font-size: 11px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted);
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  height: 60px; padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 127, 149, .35);
}
.brand-name { font-weight: 700; letter-spacing: .02em; font-size: 16px; }
.brand-sub { font-size: 9.5px; letter-spacing: .22em; color: var(--faint); font-weight: 600; margin-top: 3px; }

.tabs { display: flex; gap: 2px; flex: 1; justify-content: center; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--muted);
  padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s, box-shadow .2s;
}
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(14, 127, 149, .35);
}

.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 150px; justify-content: flex-end; }
.streak { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 13px; }
.streak b { font-size: 15px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  display: inline-grid; place-items: center;
  transition: color .2s, border-color .2s, transform .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--faint); }
.icon-btn:active { transform: scale(.94); }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ============ 布局 ============ */
.shell { max-width: 860px; margin: 0 auto; padding: 28px 20px 80px; }
.view { display: none; animation: fadeUp .35s cubic-bezier(.16, 1, .3, 1); }
.view.is-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

.sec-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sec-desc { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 60ch; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14.5px; font-weight: 600;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 11px 22px;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 127, 149, .32);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(14, 127, 149, .42); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ============ 学习页 ============ */
.learn-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.book-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.book-chip {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 7px 15px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; color: var(--muted);
  transition: all .2s;
}
.book-chip:hover { border-color: var(--faint); color: var(--ink); }
.book-chip.is-on {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: 0 3px 10px rgba(14, 127, 149, .3);
}
.learn-meta { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

/* 卡片 */
.stage { min-height: 480px; display: grid; place-items: center; position: relative; }
.stage::before,
.stage::after {
  content: "";
  position: absolute; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 62%);
  filter: blur(1px);
  animation: bubble 9s ease-in-out infinite;
  pointer-events: none;
}
.stage::before { width: 46px; height: 46px; top: 10%; left: 10%; }
.stage::after { width: 30px; height: 30px; top: 22%; right: 13%; animation-delay: -4.5s; }
@keyframes bubble {
  0%, 100% { transform: translateY(0) scale(1); opacity: .45; }
  50% { transform: translateY(-16px) scale(1.08); opacity: .85; }
}
.card-wrap { perspective: 1400px; width: 100%; max-width: 640px; position: relative; z-index: 1; }
.card {
  position: relative; width: 100%; min-height: 460px;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.2, .9, .25, 1.1);
}
.card.is-flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
}
.card-back { transform: rotateY(180deg); display: flex; flex-direction: column; }

.card-front { display: grid; place-items: center; }
.front-inner { text-align: center; padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sound-orbit {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent-deep);
  border: 2px solid var(--accent);
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), transparent 70%);
  cursor: pointer;
  position: relative;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s;
  animation: breathe 2.8s ease-in-out infinite;
}
.sound-orbit:hover { transform: scale(1.06); box-shadow: 0 0 0 10px var(--accent-soft); }
.sound-orbit.is-playing { animation: pulse 1s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 12px var(--accent-soft); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.front-hint { font-size: 17px; font-weight: 600; }
.front-sub { font-size: 13px; color: var(--muted); }

/* 卡片背面 */
.back-scroll { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.back-head {
  padding: 30px 32px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 130%);
}
.back-word-row { display: flex; align-items: center; gap: 12px; }
.word-title { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.speak-btn { width: 40px; height: 40px; }
.word-phone { font-family: var(--mono); font-size: 15px; color: var(--accent-deep); margin-top: 8px; letter-spacing: .02em; }
.word-trans { font-size: 16px; font-weight: 600; margin-top: 10px; color: var(--ink-2); }
.back-body { padding: 20px 32px; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.back-foot { padding: 16px 32px 26px; border-top: 1px solid var(--line); text-align: center; }
.rate-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rate-hint { font-size: 12px; color: var(--faint); margin-top: 10px; }
.btn-rate { padding: 11px 20px; min-width: 118px; }
.rate-yes { background: var(--ok-soft); color: var(--ok); }
.rate-yes:hover { background: var(--ok); color: #fff; }
.rate-so { background: var(--so-soft); color: var(--gold); }
.rate-so:hover { background: var(--gold); color: #fff; }
.rate-no { background: var(--bad-soft); color: var(--bad); }
.rate-no:hover { background: var(--bad); color: #fff; }

/* 详情区块 */
.detail-block { animation: fadeUp .4s cubic-bezier(.16, 1, .3, 1) both; }
.detail-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--faint); text-transform: uppercase; margin-bottom: 9px;
}
.detail-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.etym-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.etym-gen { display: flex; flex-direction: column; gap: 7px; }
.etym-step { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; }
.etym-step b { color: var(--accent-deep); font-weight: 700; min-width: 22px; }
.etym-impact {
  margin-top: 12px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; font-size: 13.5px; color: var(--ink-2);
}
.etym-impact b { color: var(--accent-deep); }

.root-mini { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.root-chip {
  border: 1px solid var(--accent); color: var(--accent-deep);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700;
}
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--ink-2); }
.chip b { color: var(--accent-deep); font-weight: 600; }

.phrase-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.phrase-chip {
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 7px 12px;
  font-size: 13px; line-height: 1.5;
}
.phrase-chip b { display: block; color: var(--ink); font-size: 13.5px; }
.phrase-chip span { color: var(--muted); font-size: 12.5px; }

.sentence-item { border-left: 2px solid var(--line); padding: 2px 0 2px 12px; margin-bottom: 12px; }
.sentence-item .en { font-size: 14.5px; color: var(--ink-2); }
.sentence-item .zh { font-size: 13px; color: var(--muted); margin-top: 2px; }
.exam-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-deep);
  border-radius: 5px; padding: 1px 7px; margin-bottom: 6px; letter-spacing: .04em;
}

.rel-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rel-item {
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 5px 10px; font-size: 12.5px; color: var(--ink-2);
}
.rel-item b { color: var(--ink); font-weight: 600; }

.rem-box {
  background: var(--surface-2); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13.5px; color: var(--ink-2);
}

/* 空状态 */
.stage-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { color: var(--faint); margin-bottom: 14px; }
.stage-empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 17px; }
.stage-empty p { margin-bottom: 18px; font-size: 14px; }

/* 会话条 */
.session-bar {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 16px; font-size: 13.5px; color: var(--muted);
}

/* ============ 文章导学 ============ */
.art-head { margin-bottom: 20px; }

.drop-zone {
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  padding: 52px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: background .25s, border-color .25s, transform .2s, box-shadow .25s;
}
.drop-zone.is-over {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.012);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-soft) 80%, transparent);
}
.dz-icon { color: var(--accent); margin-bottom: 4px; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.dz-title { font-size: 17px; font-weight: 700; }
.dz-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.dz-row { display: flex; gap: 12px; margin-top: 6px; }

.art-paste {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.art-paste textarea {
  width: 100%; min-height: 220px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink);
  font-family: var(--serif); font-size: 15.5px; line-height: 1.8;
  padding: 14px 16px; resize: vertical; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.art-paste textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.art-paste textarea::placeholder { color: var(--faint); }
.art-paste-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 14px; }

.art-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 720px) { .art-stats { grid-template-columns: repeat(2, 1fr); } }
.as-card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow);
}
.as-card b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.as-card span { font-size: 12px; color: var(--muted); }
.as-card.fresh b { color: var(--gold); }
.as-card.miss b { color: var(--bad); }
.as-card.ok b { color: var(--ok); }

/* 导学三步 */
.guide-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 720px) { .guide-strip { grid-template-columns: 1fr; } }
.guide-step {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 13px 16px;
}
.guide-step b {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 14px;
  box-shadow: 0 3px 10px rgba(14, 127, 149, .35);
}
.guide-step span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

.art-actions { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }

.art-legend {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted); margin-bottom: 10px;
}
.art-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.art-legend .lg i {
  width: 12px; height: 12px; border-radius: 4px; display: inline-block;
}
.lg-known i { background: var(--ok-soft); border: 1px solid var(--ok); }
.lg-fresh i { background: var(--gold-soft); border: 1px solid var(--gold); }
.lg-missing i { background: var(--surface-3); border: 1px dashed var(--faint); }

.art-text {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 26px 30px;
  font-family: var(--serif); font-size: 16.5px; line-height: 2;
  box-shadow: var(--shadow-card);
  max-height: 480px; overflow-y: auto;
}
.art-text p { margin: 0 0 1.1em; }
.aw { border-radius: 4px; cursor: pointer; transition: background .15s, box-shadow .15s; padding: 0 2px; }
.aw:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.aw-known { color: var(--muted); text-decoration: underline dotted; text-decoration-color: var(--faint); text-underline-offset: 4px; }
.aw-fresh {
  background: var(--gold-soft);
  color: var(--accent-deep);
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
}
.aw-missing { color: var(--faint); text-decoration: underline dashed; text-decoration-color: var(--faint); text-underline-offset: 4px; }

.art-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 26px 0 12px;
}
.art-list-title { font-size: 17px; font-weight: 700; }
.art-filter { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.art-filter button {
  border: 0; background: var(--surface); color: var(--muted);
  font-family: inherit; font-size: 13px; padding: 7px 15px; cursor: pointer;
  transition: background .15s, color .15s;
}
.art-filter button.is-on {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 600;
}

.art-wordlist { display: flex; flex-direction: column; gap: 8px; }
.wl-row {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 11px 16px;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.wl-row:hover { border-color: var(--accent); transform: translateX(3px); box-shadow: var(--shadow); }
.wl-speak {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--accent-deep); cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.wl-speak:hover { background: var(--accent); color: #fff; }
.wl-word { font-size: 16px; font-weight: 700; min-width: 120px; }
.wl-trans { font-size: 13px; color: var(--muted); flex: 1; line-height: 1.5; }
.wl-cnt { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wl-tag {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  border-radius: 999px; padding: 3px 10px;
}
.wl-tag.fresh { background: var(--gold-soft); color: var(--gold); }
.wl-tag.known { background: var(--ok-soft); color: var(--ok); }
.wl-tag.missing { background: var(--surface-3); color: var(--faint); }
.art-wordlist .wl-empty { text-align: center; color: var(--faint); font-size: 13.5px; padding: 26px 0; }

/* ============ 测验 ============ */
.quiz-setup { max-width: 720px; margin: 0 auto; }
.quiz-run { max-width: 640px; margin: 0 auto; }
.quiz-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.mode-card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 20px 16px; cursor: pointer;
  text-align: left; font-family: inherit;
  color: var(--muted); display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.mode-card svg { color: var(--accent); }
.mode-card b { font-size: 15.5px; color: var(--ink); }
.mode-card span { font-size: 12.5px; }
.mode-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-card.is-on { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 640px) { .quiz-modes { grid-template-columns: 1fr; } }

.quiz-start-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.quiz-count-label { font-size: 13.5px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button {
  border: 0; background: var(--surface); color: var(--muted);
  font-family: inherit; font-size: 13.5px; padding: 8px 16px; cursor: pointer;
}
.seg button.is-on {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-weight: 600;
}

.quiz-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.quiz-bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.quiz-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: 999px; transition: width .3s;
}
.quiz-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }

.quiz-prompt { font-size: 30px; font-weight: 800; text-align: center; padding: 30px 0 26px; letter-spacing: -.01em; }
.quiz-prompt .q-listen {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--accent-deep); cursor: pointer;
}
.quiz-prompt .q-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 8px; letter-spacing: 0; }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .quiz-options { grid-template-columns: 1fr; } }
.q-opt {
  border: 1.5px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 15px 18px;
  font-family: inherit; font-size: 15px; color: var(--ink-2); text-align: left;
  cursor: pointer; transition: all .18s;
}
.q-opt:hover { border-color: var(--accent); }
.q-opt.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.q-opt.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.q-opt:disabled { cursor: default; opacity: 1; }

.quiz-feedback { margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted); min-height: 24px; }
.quiz-feedback .fb-ok { color: var(--ok); font-weight: 700; }
.quiz-feedback .fb-no { color: var(--bad); font-weight: 700; }

.quiz-done { text-align: center; padding: 40px 0; }
.done-score { font-size: 64px; font-weight: 800; letter-spacing: -.03em; }
.done-score small { font-size: 20px; color: var(--muted); font-weight: 600; }
.done-sub { color: var(--muted); margin: 6px 0 24px; }

/* ============ 词根页 ============ */
.roots-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.root-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.root-card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 18px;
  transition: transform .18s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 8px;
}
.root-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.root-card .rc-root { font-size: 21px; font-weight: 800; color: var(--accent-deep); font-family: var(--mono); }
.root-card .rc-mean { font-size: 14px; font-weight: 600; }
.root-card .rc-src { font-size: 12.5px; color: var(--muted); }
.root-card .rc-pie { font-size: 12.5px; color: var(--accent-deep); }
.root-card .rc-ex { font-size: 12.5px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }
.root-card .rc-imp { font-size: 12px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 8px; }

/* ============ 词库页 ============ */
.books-head { margin-bottom: 22px; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 9px 16px; color: var(--faint);
  margin-top: 14px; max-width: 340px;
}
.searchbox.wide { max-width: 480px; }
.searchbox input {
  border: 0; background: none; outline: none; flex: 1;
  font-family: inherit; font-size: 14px; color: var(--ink);
}
.searchbox input::placeholder { color: var(--faint); }

.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.book-card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: transform .18s, box-shadow .2s, border-color .2s;
}
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.book-card .bc-kind { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--accent-deep); }
.book-card .bc-name { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.book-card .bc-count { font-size: 12.5px; color: var(--faint); }
.book-card .bc-bar { height: 5px; background: var(--surface-3); border-radius: 999px; margin-top: 12px; overflow: hidden; }
.book-card .bc-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: 999px;
}
.book-card .bc-state { font-size: 12px; color: var(--muted); margin-top: 8px; }

.search-results { margin-top: 22px; }
.search-results h3 { font-size: 15px; margin-bottom: 10px; }
.sr-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .15s;
}
.sr-item:hover { border-color: var(--accent); }
.sr-item .sr-word { font-size: 16px; font-weight: 700; min-width: 130px; }
.sr-item .sr-trans { font-size: 13px; color: var(--muted); flex: 1; }
.sr-item .sr-book { font-size: 11.5px; color: var(--faint); }

/* ============ 统计页 ============ */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--muted); }

.panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }

.heatmap { display: grid; grid-template-columns: repeat(15, 1fr); gap: 5px; }
.hm-cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); position: relative; }
.hm-cell[data-lvl="1"] { background: #cfe4f0; }
.hm-cell[data-lvl="2"] { background: #9fd0e6; }
.hm-cell[data-lvl="3"] { background: var(--accent); opacity: .85; }
.hm-cell[data-lvl="4"] { background: var(--accent-deep); }
[data-theme="dark"] .hm-cell[data-lvl="1"] { background: #123042; }
[data-theme="dark"] .hm-cell[data-lvl="2"] { background: #1f5068; }
.hm-cell:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: var(--ink); color: var(--bg);
  font-size: 11px; padding: 3px 8px; border-radius: 5px; white-space: nowrap; z-index: 5;
}
.hm-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); margin-top: 10px; }

.bp-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.bp-row:last-child { border-bottom: 0; }
.bp-name { width: 90px; font-size: 13.5px; font-weight: 600; }
.bp-bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bp-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: 999px;
}
.bp-num { font-size: 12.5px; color: var(--faint); width: 90px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============ 查词 ============ */
.lookup-box { display: flex; gap: 10px; }
.lookup-box input {
  flex: 1;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-family: inherit; font-size: 15px;
  padding: 10px 18px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.lookup-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lookup-box input::placeholder { color: var(--faint); }

.lookup-result { display: flex; flex-direction: column; gap: 14px; }
.lookup-loading { font-size: 13.5px; color: var(--muted); }
.lk-src { font-size: 12px; color: var(--faint); }
.lk-err { font-size: 13.5px; color: var(--bad); }
.dict-pos {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent-deep);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 2px 12px; margin: 10px 0 6px;
}
.dict-def {
  border-left: 2px solid var(--line); padding: 2px 0 2px 12px;
  font-size: 14px; color: var(--ink-2); margin-bottom: 10px;
}
.dict-ex { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dict-ex::before { content: "例 · "; color: var(--faint); }
.syn-chip { cursor: pointer; transition: border-color .15s, color .15s, transform .15s; }
.syn-chip:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }

/* ============ 错词回顾 ============ */
.errors-head { margin-bottom: 18px; }
.err-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.err-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.err-list { display: flex; flex-direction: column; gap: 8px; }
.err-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 12px 16px;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.err-row:hover { border-color: var(--accent); transform: translateX(3px); box-shadow: var(--shadow); }
.err-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.err-word { font-size: 16px; font-weight: 700; }
.err-trans { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.err-fail {
  flex: none; font-size: 11.5px; font-weight: 700;
  background: var(--bad-soft); color: var(--bad);
  border-radius: 999px; padding: 3px 10px;
}
.err-lv { display: inline-flex; gap: 3px; }
.err-lv i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--line);
}
.err-lv i.on { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; }
.err-due {
  flex: none; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 3px 10px;
  min-width: 64px; text-align: center;
}
.err-due.due { background: var(--bad-soft); color: var(--bad); }
.err-due.ok { background: var(--ok-soft); color: var(--ok); }
.err-due.fresh { background: var(--gold-soft); color: var(--gold); }

/* ============ 设置页 ============ */
.settings-head { margin-bottom: 20px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.set-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.set-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-info b { font-size: 14.5px; color: var(--ink); }
.set-info span { font-size: 12.5px; color: var(--muted); max-width: 46ch; line-height: 1.5; }
.set-num { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.set-num-unit { font-size: 12.5px; color: var(--faint); }
.set-input {
  width: 96px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-family: inherit; font-size: 14.5px; text-align: center;
  padding: 8px 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.set-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { display: none; }
.switch i {
  position: absolute; inset: 0;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 999px; transition: background .2s, border-color .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  transition: transform .2s;
}
.switch input:checked + i { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(20px); }

.set-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.btn-ghost.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-ghost.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn-ghost.danger.arm { background: var(--bad); color: #fff; border-color: var(--bad); }
.set-note { font-size: 12.5px; color: var(--faint); line-height: 1.6; }

.set-about-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 8px 2px; border-bottom: 1px dashed var(--line);
  color: var(--muted);
}
.set-about-row:last-child { border-bottom: 0; }
.set-about-row b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ============ 弹层 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 15, 24, .55);
  backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeUp .25s ease;
}
.modal-mask[hidden] { display: none; }
.modal {
  width: 100%; max-width: 620px; max-height: 82vh;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 140%);
}
.modal-head h3 { font-size: 22px; font-weight: 800; }
.modal-body { padding: 18px 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }

.offline-bar {
  height: 8px; border-radius: 999px; background: var(--line);
  overflow: hidden; margin-top: 10px;
}
.offline-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width .3s ease;
}

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  padding: 10px 22px; border-radius: 999px; font-size: 14px;
  z-index: 100; box-shadow: var(--shadow-card);
  animation: fadeUp .3s ease;
}

/* ============ 移动端：顶栏标签可横向滑动 ============ */
@media (max-width: 860px) {
  .topbar { gap: 10px; padding: 0 10px; }
  .brand { min-width: 0; }
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }
  .topbar-right { min-width: 0; gap: 6px; }
  .tabs {
    flex: 1;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; padding: 8px 11px; }
}

/* ============ 细节 ============ */
.empty-note { color: var(--faint); font-size: 13px; margin-top: 6px; }

/* ============ 移动端适配 ============ */
@media (max-width: 720px) {
  .topbar { gap: 8px; padding: 0 10px; height: 54px; }
  .brand { min-width: auto; gap: 6px; flex: none; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }
  .topbar-right { min-width: auto; gap: 6px; flex: none; }
  .streak b { font-size: 14px; }

  .tabs {
    flex: 1;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; padding: 7px 11px; font-size: 13px; gap: 5px; }

  .shell { padding: 20px 14px 70px; }
  .sec-title { font-size: 20px; }
  .word-title { font-size: 34px; }
  .back-head { padding: 24px 22px 18px; }
  .back-body { padding: 16px 22px; }
  .back-foot { padding: 14px 22px 22px; }
  .btn-rate { min-width: 96px; padding: 10px 14px; }
  .art-text { padding: 20px 18px; font-size: 15.5px; max-height: 420px; }
  .drop-zone { padding: 38px 18px; }
  .as-card b { font-size: 22px; }
  .quiz-prompt { font-size: 24px; }
  .heatmap { grid-template-columns: repeat(8, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card { transition: none; }
  .sound-orbit { animation: none; }
  .stage::before, .stage::after { animation: none; }
}

/* ============ 登录 / 个人中心 ============ */
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 4px 12px 4px 5px; cursor: pointer;
  background: var(--accent-soft); color: var(--ink);
  font: inherit; transition: border-color .15s ease, background .15s ease;
}
.chip-btn:hover { border-color: var(--accent); }
.chip-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 12px; font-weight: 800;
}
.chip-name { font-size: 13px; font-weight: 700; }

.login-modal { max-width: 480px; }
.login-intro { font-size: 13px; line-height: 1.7; color: var(--faint); margin: 0; }
.login-title { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.login-exist-title { margin-top: 6px; margin-bottom: 6px; }
.login-create { display: flex; flex-direction: column; gap: 10px; }
.login-label { font-size: 14px; font-weight: 700; }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.login-modal input[type="text"],
.login-modal input[type="number"],
.login-modal select,
#umName,
#umExam {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.login-modal input:focus,
.login-modal select:focus,
#umName:focus,
#umExam:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.login-users { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.login-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; color: var(--ink); text-align: left;
}
.login-user:hover { border-color: var(--accent); background: var(--accent-soft); }
.lu-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 14px; font-weight: 800;
}
.lu-name { font-weight: 700; flex: none; font-size: 14px; }
.lu-exam { color: var(--faint); font-size: 12.5px; flex: 1; }
.lu-go { color: var(--accent-deep); font-size: 12.5px; font-weight: 700; }

.um-head { display: flex; align-items: center; gap: 12px; }
.um-sub { font-size: 12.5px; color: var(--faint); margin: 2px 0 0; }
.um-avatar-big {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 20px; font-weight: 800; flex: none;
}
.um-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.um-stat {
  background: var(--accent-soft); border-radius: 12px;
  padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 3px;
}
.um-stat b { font-size: 17px; color: var(--accent-deep); }
.um-stat span { font-size: 11.5px; color: var(--faint); }
.um-actions { display: flex; gap: 10px; margin-top: 2px; }
@media (max-width: 480px) {
  .um-grid { grid-template-columns: repeat(2, 1fr); }
  .login-grid { grid-template-columns: 1fr; }
}

/* ---------- 牛津词典 ---------- */
.ox-toolbar { display: flex; gap: 12px; align-items: center; margin: 6px 0 12px; flex-wrap: wrap; }
.ox-search {
  width: min(320px, 100%) !important;
  text-align: left !important;
  flex: 1 1 220px;
}
.ox-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ox-levels button {
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  cursor: pointer; transition: all .18s;
}
.ox-levels button:hover { border-color: var(--accent); color: var(--ink); }
.ox-levels button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ox-count { font-size: 13px; color: var(--faint); margin-bottom: 10px; }
.ox-list { display: flex; flex-direction: column; gap: 6px; }
.ox-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; cursor: pointer;
  font-family: inherit; text-align: left; transition: border-color .18s, background .18s;
}
.ox-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.ox-lv {
  flex: none; min-width: 38px; text-align: center;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted);
}
.ox-lv[data-lv="A1"] { background: rgba(46, 196, 182, .15); color: #0e8a7c; }
.ox-lv[data-lv="A2"] { background: rgba(74, 144, 226, .15); color: #2a6db5; }
.ox-lv[data-lv="B1"] { background: rgba(240, 178, 62, .18); color: #b07a0e; }
.ox-lv[data-lv="B2"] { background: rgba(247, 121, 88, .16); color: #c4522f; }
.ox-lv[data-lv="C1"] { background: rgba(214, 69, 65, .15); color: #b7302b; }
.ox-lv[data-lv="C2"] { background: rgba(110, 79, 168, .16); color: #6d46ab; }
.ox-w { font-size: 15.5px; font-weight: 700; color: var(--ink); min-width: 0; }
.ox-t { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-state { flex: none; font-size: 11.5px; color: var(--accent-deep); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }
.ox-state.learned { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.ox-more-wrap { text-align: center; margin: 14px 0; }

.ox-mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ox-mword-row { display: flex; align-items: center; gap: 10px; }
.ox-mword-row h3 { margin: 0; font-size: 26px; }
.ox-lv-badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); }
.ox-sub { margin: 2px 0 0; font-size: 14px; color: var(--faint); }
.ox-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.ox-mbody-wrap { margin-top: 4px; }
.ox-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 14px; padding: 8px 12px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 10px; font-size: 12.5px; color: var(--muted);
}
