/* ---------- 主题变量 ---------- */
:root {
  --bg: #f6f4f1;
  --bg-soft: #efece7;
  --card: #ffffff;
  --card-2: #faf9f7;
  --text: #232120;
  --text-dim: #7d7772;
  --line: #e3ded7;
  --accent: #1f1d1b;
  --accent-text: #ffffff;
  --gold: #b8934a;
  --ok: #3f9d63;
  --bad: #cf4b45;
  --warn: #d69a2c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
[data-theme="dark"] {
  --bg: #17181a;
  --bg-soft: #1e2023;
  --card: #212427;
  --card-2: #1a1d20;
  --text: #e9e6e2;
  --text-dim: #9a948d;
  --line: #33373b;
  --accent: #e9e6e2;
  --accent-text: #17181a;
  --gold: #d0a95c;
  --ok: #57b97c;
  --bad: #e2695f;
  --warn: #e0ad48;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.brand small { display: block; font-weight: 400; font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav > a, .nav button.linkish {
  padding: 6px 12px; border-radius: 999px; font-size: 14px;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav > a:hover, .nav button.linkish:hover { background: var(--bg-soft); }
.nav > a.active { background: var(--accent); color: var(--accent-text); }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  width: 32px; height: 32px; border-radius: 999px; line-height: 1;
}
.menu-btn { display: none; }
.btn-gold {
  background: linear-gradient(160deg, #d9b871, var(--gold));
  color: #3a2c0d; border: 0; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 54px; right: 12px; flex-direction: column; align-items: stretch;
         background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .menu-btn { display: block; margin-left: auto; }
}

/* ---------- 布局 ---------- */
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 22px 18px 60px; }
.footer { text-align: center; color: var(--text-dim); font-size: 12px; padding: 18px; border-top: 1px solid var(--line); }
.loading { text-align: center; color: var(--text-dim); padding: 60px 0; }

h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 4px; height: 17px; background: var(--gold); border-radius: 2px; }
.sub { color: var(--text-dim); font-size: 13px; margin: 0 0 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-dim); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: .15s;
}
.btn:hover { border-color: var(--text-dim); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 11px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.btn.bad { border-color: var(--bad); color: var(--bad); }
.btn.warn { border-color: var(--warn); color: var(--warn); }

input[type=text], input[type=password], input[type=email], input[type=date], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card-2); color: var(--text); font: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 1px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 5px; }

/* ---------- 词书卡片 ---------- */
.book-card {
  display: flex; gap: 12px; align-items: center; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: .16s; position: relative; overflow: hidden;
}
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.book-icon {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  display: grid; place-items: center; background: var(--bg-soft);
  font-weight: 700; font-size: 15px; letter-spacing: -.5px;
}
.book-name { font-weight: 600; }
.book-sub { font-size: 12px; color: var(--text-dim); }
.badge {
  position: absolute; top: 8px; right: 8px; font-size: 10px;
  background: var(--bad); color: #fff; padding: 2px 7px; border-radius: 999px;
}
.progress-mini { height: 3px; background: var(--bg-soft); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.progress-mini > i { display: block; height: 100%; background: var(--gold); }

/* ---------- 筛选行 ---------- */
.filters { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.filter-line { display: flex; align-items: flex-start; gap: 8px; }
.filter-label { font-size: 13px; color: var(--text-dim); flex: none; padding-top: 5px; width: 42px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.chip {
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 4px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--text-dim); }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip.gold.on { background: var(--gold); border-color: var(--gold); color: #2d2308; }

/* ---------- 单词表 ---------- */
.wordtable { width: 100%; border-collapse: collapse; }
.wordtable th, .wordtable td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; vertical-align: middle; }
.wordtable th { color: var(--text-dim); font-weight: 500; font-size: 12px; }
.wordtable tr:hover td { background: var(--card-2); }
.ru { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.masked { filter: blur(10px); cursor: pointer; user-select: none; transition: .15s; }
.masked:hover { filter: blur(8px); }
.mark-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.mark-known { background: var(--ok); }
.mark-unknown { background: var(--bad); }
.mark-fuzzy { background: var(--warn); }

/* ---------- 听写 ---------- */
.dictation { display: flex; flex-direction: column; align-items: center; padding: 26px 18px 34px; min-height: 430px; }
.dict-history {
  width: 100%; display: flex; gap: 14px; overflow-x: auto; font-size: 12px;
  color: var(--text-dim); padding-bottom: 10px; margin-bottom: 6px; scrollbar-width: thin;
}
.dict-history span { white-space: nowrap; }
.dict-history .hit { color: var(--ok); }
.dict-history .miss { color: var(--bad); }
.dict-prompt { display: flex; align-items: baseline; gap: 8px; margin: 46px 0 14px; }
.dict-zh { font-size: 32px; font-weight: 600; letter-spacing: 1px; }
.dict-pos { font-size: 12px; color: var(--text-dim); background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; }
.dict-submit {
  background: var(--accent); color: var(--accent-text); border: 0;
  padding: 7px 22px; border-radius: 9px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.dict-tip { font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.dict-input-wrap { width: min(560px, 92%); margin-top: 26px; position: relative; }
.dict-input {
  width: 100%; border: 0; border-bottom: 1.5px solid var(--text); background: transparent;
  font-family: Georgia, "Times New Roman", serif; font-size: 26px; padding: 6px 4px;
  text-align: center; color: var(--text);
}
.dict-input:focus { outline: none; border-bottom-color: var(--gold); }
.dict-controls { display: flex; gap: 22px; margin-top: 26px; align-items: center; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--text);
  background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 15px;
}
.round-btn:hover { background: var(--bg-soft); }
.round-btn.filled { background: var(--accent); color: var(--accent-text); }
.dict-progress { width: min(680px, 96%); margin-top: 26px; display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.dict-foot { font-size: 12px; color: var(--text-dim); margin-top: 22px; text-align: center; }
.dict-foot a { text-decoration: underline; }
.verdict { margin-top: 14px; font-size: 15px; min-height: 24px; }
.verdict .right { color: var(--ok); }
.verdict .wrong { color: var(--bad); }
.verdict .answer { font-family: Georgia, serif; font-size: 20px; }

/* ---------- 手写画布 ---------- */
.ink-panel { width: min(680px, 96%); margin-top: 18px; }
.ink-canvas {
  width: 100%; height: 170px; background: var(--card-2);
  border: 1px dashed var(--line); border-radius: 12px; touch-action: none; display: block;
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 50%; background-position: 0 85px;
}
.ink-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.cands { display: flex; gap: 6px; flex-wrap: wrap; }
.cand {
  font-family: Georgia, serif; font-size: 17px; padding: 3px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer;
}
.cand:hover { border-color: var(--gold); }

/* ---------- 学习模式 / 卡片 ---------- */
.study-stage { display: flex; flex-direction: column; align-items: center; padding: 40px 18px; min-height: 400px; }
.study-zh { font-size: 30px; font-weight: 600; margin-bottom: 10px; }
.study-ru { font-family: Georgia, serif; font-size: 34px; margin: 10px 0; }
.flashcard {
  width: min(420px, 92%); height: 240px; perspective: 1200px; cursor: pointer; margin: 10px auto 4px;
}
.flashcard-inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: grid; place-items: center; text-align: center; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.flash-back { transform: rotateY(180deg); background: var(--card-2); }

/* ---------- 消消乐 ---------- */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.match-tile {
  padding: 16px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; text-align: center; font-size: 15px; transition: .15s;
  min-height: 62px; display: grid; place-items: center;
}
.match-tile.ru { font-family: Georgia, serif; font-size: 17px; }
.match-tile.sel { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, var(--card)); }
.match-tile.gone { opacity: 0; pointer-events: none; transform: scale(.86); }
.match-tile.err { border-color: var(--bad); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px);} 75% { transform: translateX(5px);} }

/* ---------- 日历 ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: 12px; color: var(--text-dim); text-align: center; padding: 4px 0; }
.cal-cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; padding: 5px;
  display: flex; flex-direction: column; background: var(--card); font-size: 12px; cursor: pointer;
}
.cal-cell.empty { border: 0; background: none; cursor: default; }
.cal-cell.today { border-color: var(--gold); border-width: 2px; }
.cal-cell .d { color: var(--text-dim); }
.cal-cell .n { margin-top: auto; font-weight: 700; font-size: 15px; }
.cal-cell.has { background: color-mix(in srgb, var(--gold) 14%, var(--card)); }
.cal-cell.due { background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.cal-cell.done { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }

/* ---------- 统计块 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; text-align: center;
}
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--text-dim); }

/* ---------- 弹层 / 提示 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0,0,0,.35); padding: 18px; }
.modal {
  background: var(--card); border-radius: 16px; padding: 22px; width: min(430px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,.28); max-height: 88vh; overflow: auto;
}
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal .close { float: right; cursor: pointer; color: var(--text-dim); background: none; border: 0; font-size: 20px; line-height: 1; }
.toast-root { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  white-space: pre-line; text-align: center; max-width: 92vw;
  background: var(--accent); color: var(--accent-text); padding: 9px 18px;
  border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: pop .2s;
}
.toast.bad { background: var(--bad); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.captcha-box { display: flex; gap: 10px; align-items: center; }
.captcha-box svg { border-radius: 8px; border: 1px solid var(--line); cursor: pointer; flex: none; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; padding: 9px 14px; cursor: pointer; font-size: 14px;
  border-bottom: 2px solid transparent; color: var(--text-dim);
}
.tabs button.on { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }

pre.hint { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-size: 12px; }
.empty { text-align: center; color: var(--text-dim); padding: 50px 0; }

/* ---------- 批量导入组件（public/js/importer.js） ---------- */
.importer textarea.imp-text { width: 100%; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.6; resize: vertical; }
.imp-help { line-height: 1.7; }
.imp-cols { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.imp-col { background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.imp-col.req { border-color: var(--gold); }
.imp-col small { color: var(--text-dim); }
.imp-chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); }
.imp-chip.new { border-color: var(--ok); color: var(--ok); }
.imp-summary { margin: 10px 0 6px; }
.imp-ok { color: var(--ok); }
.imp-bad { color: var(--bad); }
.imp-errors ul { margin: 4px 0; padding-left: 18px; max-height: 220px; overflow: auto; font-size: 13px; color: var(--bad); }
.imp-errors code { margin-left: 8px; color: var(--text-dim); font-size: 12px; word-break: break-all; }
.imp-table { max-height: 360px; overflow: auto; }
.imp-chip[hidden] { display: none; }
#userSlot { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
#userSlot > a:not(.btn-gold) { padding: 6px 10px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
#userSlot > a:not(.btn-gold):hover { background: var(--bg-soft); }
#userSlot > a.active { background: var(--accent); color: var(--accent-text); }

/* 🔊 单词发音按钮（单词学习页） */
.say-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 4px 7px; vertical-align: middle; }
.say-btn:hover { border-color: var(--gold); }

/* 后台：语音用量条、重音编辑 */
.usage-bar { height: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--gold); }
.stress-letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.stress-letter { min-width: 30px; height: 36px; font-size: 18px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; }
.stress-letter:disabled { border-color: transparent; background: transparent; color: var(--text-dim); }
.stress-letter.vowel { cursor: pointer; }
.stress-letter.on { border-color: var(--gold); color: var(--gold); font-weight: 700; box-shadow: inset 0 -3px 0 var(--gold); }

/* 带 hidden 属性的元素一律隐藏（不让 .field 之类的 display 规则盖掉它） */
[hidden] { display: none !important; }

/* 班级（第 2 阶段） */
.class-code-input { font-size: 20px; letter-spacing: 4px; text-transform: uppercase; max-width: 180px; text-align: center; }
.class-card { display: block; color: inherit; text-decoration: none; }
.class-card:hover { border-color: var(--gold); }
.class-code-small { margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.class-code-small b { letter-spacing: 2px; color: var(--text); }
.class-invite { text-align: center; }
.class-code-big { font-size: clamp(36px, 10vw, 56px); font-weight: 800; letter-spacing: .25em; margin: 6px 0 12px; font-family: ui-monospace, Consolas, monospace; }

/* 作业（第 2 阶段） */
.assign-card { cursor: pointer; }
.assign-card:hover { border-color: var(--gold); }
.assign-state { font-size: 12px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.assign-state.ok { color: var(--ok); border-color: var(--ok); }
.assign-state.bad { color: var(--bad); border-color: var(--bad); }
.assign-state.warn { color: var(--warn); border-color: var(--warn); }
.assign-due { margin-top: 8px; font-size: 13px; }
.assign-due.soon { color: var(--bad); font-weight: 600; }
.assign-wrap { max-width: 720px; margin: 0 auto; }
.assign-rules { margin: 10px 0; padding-left: 20px; line-height: 1.8; }
.assign-progress { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-dim); }
.assign-bar { height: 6px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin: 6px 0 12px; }
.assign-bar i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.assign-q .lv-p-prompt { font-size: 20px; margin: 8px 0 14px; }
.assign-feedback { margin-top: 12px; }
.assign-verdict { font-size: 20px; font-weight: 700; }
.assign-verdict.ok { color: var(--ok); }
.assign-verdict.bad { color: var(--bad); }
.assign-review { margin-bottom: 8px; border-left: 4px solid var(--line); }
.assign-review.ok { border-left-color: var(--ok); }
.assign-review.bad { border-left-color: var(--bad); }
.assign-verdict.part { color: var(--warn); }

/* 短文听写（专四式） */
.pd-rules ol { margin: 6px 0; padding-left: 20px; line-height: 1.8; }
.pd-status { font-size: 18px; font-weight: 700; margin-top: 12px; }
.pd-sub { min-height: 1.4em; }
.pd-text { width: 100%; box-sizing: border-box; font-size: 17px; line-height: 1.7; resize: vertical; }
.pd-diff { line-height: 2.1; font-size: 17px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pd-bad { color: var(--bad); }
.pd-fix { color: var(--ok); font-weight: 600; margin-left: 2px; }
.pd-miss { color: var(--bad); border-bottom: 2px dashed var(--bad); }
.pd-case { color: var(--warn); border-bottom: 2px solid var(--warn); }
.pd-split { margin: 4px 0 10px; padding-left: 22px; line-height: 1.8; }

/* 学情看板 */
.dash-alert { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dash-alert:last-child { border-bottom: 0; }
.dash-alert-item { font-size: 14px; color: var(--warn); margin-top: 3px; }
.dash-row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

/* ---------- 第 3 阶段：激励体系 ---------- */
.flame-chip { display: inline-flex; align-items: center; gap: 3px; filter: grayscale(1); opacity: .65; }
.flame-chip.on { filter: none; opacity: 1; }
.flame-chip.warn { filter: none; opacity: 1; animation: rw-pulse 1.2s infinite; }
.flame-chip b { font-size: 13px; }
@keyframes rw-pulse { 50% { transform: scale(1.12); } }
.nav-more { position: relative; display: inline-block; }
.nav-more > summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary:hover { background: var(--bg-soft); }
.nav-more-list { position: absolute; right: 0; top: 34px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 110px; }
.nav-more-list a { padding: 7px 12px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.nav-more-list a:hover { background: var(--bg-soft); }
@media (max-width: 760px) { .nav-more-list { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; } }

.rw-card { overflow: hidden; }
.rw-top { display: flex; align-items: center; gap: 14px; }
.rw-main { flex: 1; min-width: 0; }
.rw-lv { font-size: 15px; margin-bottom: 6px; }
.rw-lv b { font-size: 18px; }
.rw-pet { color: var(--text-dim); font-size: 13px; }
.rw-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.6; }
.rw-bar { height: 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.rw-bar.thin { height: 6px; margin-top: 4px; }
.rw-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e8b84a, var(--gold)); border-radius: 999px; transition: width .4s; }
.rw-flame { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 8px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); filter: grayscale(1); opacity: .7; }
.rw-flame.on { filter: none; opacity: 1; border-color: #f2a65a; background: #fff4e6; color: #7a3a00; }
[data-theme="dark"] .rw-flame.on { background: #3a2a18; color: #ffcf9a; }
.rw-flame span { font-size: 22px; line-height: 1; }
.rw-flame b { font-size: 18px; line-height: 1.1; }
.rw-flame small { font-size: 11px; }
.rw-nudge { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fff3d6; color: #6a4300; font-size: 13.5px; line-height: 1.6; }
.rw-nudge.ok { background: #e6f5e8; color: #1f5a2a; }
[data-theme="dark"] .rw-nudge { background: #3d3115; color: #f1d392; }
[data-theme="dark"] .rw-nudge.ok { background: #1c3322; color: #a8e0b2; }
.rw-quests { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.rw-h { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.rw-quest { display: grid; grid-template-columns: 1fr auto; font-size: 14px; margin: 6px 0; }
.rw-quest .rw-bar { grid-column: 1 / -1; }
.rw-quest.done span { color: var(--text-dim); text-decoration: line-through; }
.reward-chip { margin-left: 8px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: #2b2008; }

.rw-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.rw-badges { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rw-badge { position: relative; text-align: center; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); opacity: .55; }
.rw-badge.on { opacity: 1; border-color: var(--gold); box-shadow: var(--shadow); }
.rw-medal { font-size: 32px; }
.rw-bn { font-weight: 600; font-size: 14px; margin-top: 4px; }
.rw-bz { font-size: 12.5px; color: var(--text-dim); }
.rw-bd { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.rw-new { position: absolute; top: 6px; right: 6px; font-size: 10px; background: var(--bad); color: #fff; padding: 1px 6px; border-radius: 999px; }
.rw-shop-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rw-preview svg { border: 1px solid var(--line); }
.rw-parts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.rw-part { text-align: center; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rw-part.on { border-color: var(--gold); box-shadow: var(--shadow); }
.rw-part .btn { margin-top: 6px; }
.rw-rank { display: flex; flex-direction: column; }
.rw-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.rw-row:last-child { border-bottom: 0; }
.rw-row.me { background: var(--bg-soft); }
.rw-no { width: 28px; text-align: center; font-weight: 600; }
.rw-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-tier { font-size: 18px; }
.avatar svg { display: block; }

/* ---------- 第 4 阶段：变格变位 ---------- */
.ft-wrap { max-width: 100%; overflow-x: auto; }
.ft-title { font-size: 18px; margin-bottom: 8px; }
.ft { border-collapse: collapse; margin: 0 0 8px; min-width: 200px; }
.ft th, .ft td { border: 1px solid var(--line); padding: 6px 12px; text-align: center; font-size: 15px; white-space: nowrap; }
.ft thead th { background: var(--card-2); font-size: 13px; color: var(--text-dim); font-weight: 600; }
.ft tbody th { background: var(--card-2); font-size: 12.5px; color: var(--text-dim); font-weight: 500; text-align: right; }
.ft-cell.none { color: var(--text-dim); }
.ft-cell.hit { background: #d9f2dc; font-weight: 700; box-shadow: inset 0 0 0 2px #3a9f4b; }
.ft-cell.miss { background: #fde0de; box-shadow: inset 0 0 0 2px var(--bad); }
[data-theme="dark"] .ft-cell.hit { background: #1d3a24; }
[data-theme="dark"] .ft-cell.miss { background: #442220; }
.ft-verb { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.ft-prompt { margin: 14px 0 6px; }
.ft-sentence { font-size: 22px; line-height: 2.2; }
.ft-blank { display: inline-block; vertical-align: middle; }
.ft-blank .ft-answer, .ft-blank-line { display: inline-block; }
.ft-input { min-width: 150px; max-width: 70vw; font-size: 20px; }
.ft-lemma { color: var(--gold); font-weight: 600; }
.ft-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.ft-big { font-size: 30px; font-weight: 700; }
.ft-fb { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 16px; line-height: 1.7; }
.ft-fb.ok { background: #e6f5e8; }
.ft-fb.bad { background: #fdeceb; }
[data-theme="dark"] .ft-fb.ok { background: #1c3322; }
[data-theme="dark"] .ft-fb.bad { background: #3a2220; }
.ft-why { font-size: 14px; color: var(--text-dim); }
.ft-table-wrap { margin-top: 10px; overflow-x: auto; }
.ft-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 15px; }
.ft-chip:hover { background: var(--bg-soft); }
.ft-ink { margin-top: 8px; }
.ft-blank .ft-answer { display: inline-block; vertical-align: middle; }
.ft-blank .ft-answer .row { display: inline-flex; gap: 6px; }
.ft-blank .ft-input { min-width: 130px; width: 170px; padding: 6px 10px; }
.ft-blank .ft-ink { display: block; margin-top: 6px; max-width: 90vw; }
.ft-story { font-size: 20px; line-height: 2.1; }
.ft-gap { display: inline-block; padding: 0 8px; border-bottom: 2px dashed var(--gold); color: var(--text-dim); border-radius: 4px; }
.ft-gap b { color: var(--gold); }
.ft-gap.now { background: var(--bg-soft); color: var(--text); border-bottom-style: solid; }
.ft-gap.ok { background: #d9f2dc; color: #1f5a2a; border-bottom: 2px solid #3a9f4b; font-weight: 700; }
.ft-gap.bad { background: #fde0de; color: #8a2a25; border-bottom: 2px solid var(--bad); }
.ft-machine { display: flex; justify-content: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.ft-reel { min-width: 120px; max-width: 30vw; padding: 16px 10px; border: 3px solid var(--gold); border-radius: 14px; background: var(--card-2); font-size: 20px; font-weight: 700; text-align: center; overflow: hidden; }
.ft-reel.spin { opacity: .65; transform: translateY(2px); }
.ft-reel.jackpot { animation: rw-pulse .5s 3; background: #fff1c2; color: #5a3d00; }
.ft-jack { font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.ft-boss { font-size: 76px; line-height: 1.1; transition: transform .2s; }
.ft-boss.hit { transform: scale(.82) rotate(-8deg); filter: brightness(1.6); }
.ft-boss.atk { transform: scale(1.2); }
.ft-hearts { font-size: 22px; margin-top: 6px; }
.ft-fall { position: relative; margin: 10px 0; border: 2px solid var(--line); border-radius: 12px; background: repeating-linear-gradient(180deg, var(--card-2), var(--card-2) 24px, var(--card) 24px, var(--card) 48px); overflow: hidden; }
.ft-block { position: absolute; width: 18%; min-width: 64px; height: 44px; border: 2px solid var(--gold); border-radius: 10px; background: #fff6d8; color: #3a2c0d; font-size: 20px; font-weight: 700; cursor: pointer; }
.ft-block.ok { background: #bfeac5; border-color: #3a9f4b; }
.ft-block.bad { background: #fbcfcc; border-color: var(--bad); }
.ft-stem { text-align: center; font-size: 30px; font-weight: 700; margin: 6px 0; }
.ft-slot { display: inline-block; min-width: 56px; margin-left: 4px; padding: 0 10px; border-bottom: 3px solid var(--gold); color: var(--gold); }
.ft-slot.ok { color: #2c8a3c; border-color: #2c8a3c; }
.ft-slot.bad { color: var(--bad); border-color: var(--bad); }
.ft-chain { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ft-chain-item { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
.ft-chain-item.done { background: #e6f5e8; }
.ft-chain-item.now { background: var(--gold); color: #2b2008; font-weight: 700; }
.ft-chain-log { margin-top: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }

/* ---------- 随机点名 · 分组（第 5 阶段） ---------- */
.pk-head { gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pk-source { max-width: 100%; min-width: 0; flex: 1 1 260px; }
.pk-opts { gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pk-stage { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px; text-align: center; margin-bottom: 14px; }
.pk-stage:fullscreen { display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--bg); padding: 30px; }
.pk-stage:fullscreen .pk-wheel { width: min(70vh, 80vw); }
.pk-stage:fullscreen .pk-result { font-size: 64px; }
.pk-stage:fullscreen .pk-roll { font-size: 88px; min-height: 40vh; }
.pk-fs { position: absolute; top: 10px; right: 10px; }
.pk-display { display: flex; justify-content: center; }
.pk-wheel { width: min(380px, 86vw); height: auto; display: block; }
.pk-disc { transition: transform 4s cubic-bezier(.12, .72, .1, 1); transform-origin: 0 0; }
.pk-roll { display: flex; align-items: center; justify-content: center; min-height: 200px; font-size: clamp(36px, 10vw, 64px); font-weight: 800; }
.pk-roll.rolling .pk-roll-name { opacity: .75; }
.pk-roll.pk-empty { font-size: 20px; color: var(--text-dim); font-weight: 500; }
.pk-result { min-height: 56px; font-size: clamp(28px, 8vw, 44px); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 12px; opacity: .2; transition: opacity .3s, transform .3s; }
.pk-result.show { opacity: 1; animation: pk-pop .45s ease-out; }
@keyframes pk-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.pk-go { font-size: 20px; padding: 12px 34px; margin: 8px 0 12px; }
.pk-history { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.pk-hist { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); }
.pk-roster { margin: 10px 0 16px; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-person.off { opacity: .45; text-decoration: line-through; }
.pk-n { width: 80px; }
.pk-mode { flex: 0 0 auto; width: auto; }
.pk-n { flex: 0 0 auto; }
.pk-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.pk-group { border: 2px solid var(--gc); border-radius: var(--radius); background: var(--card); padding: 10px 12px; animation: pk-pop .4s ease-out both; }
.pk-group-title { font-weight: 800; color: var(--gc); margin-bottom: 6px; }
.pk-group-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-member { font-size: 14px; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); display: inline-flex; align-items: center; }
.pk-groups-out { margin-top: 6px; }
.pk-saved h3 { margin-top: 22px; }
.pk-saved-item { margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .pk-disc { transition-duration: .6s; } .pk-result.show, .pk-group { animation: none; } }

/* ---------- 作品墙（第 5 阶段） ---------- */
.wl-card { display: block; text-decoration: none; color: inherit; }
.wl-card-theme { margin-top: 6px; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); }
.wl-pill.warn { background: var(--warn); color: #2d2308; font-weight: 600; }
.wl-pill.ok { background: var(--ok); color: #fff; }
.wl-theme { white-space: pre-wrap; margin: 10px 0; }
.wl-compose { margin: 10px 0; }
.wl-input { width: 100%; resize: vertical; font-size: 16px; }
.wl-toolbar { gap: 6px; margin: 14px 0 10px; flex-wrap: wrap; }
.wl-grid { columns: 300px; column-gap: 12px; }
.wl-grid > * { break-inside: avoid; margin-bottom: 12px; }
.wl-empty { column-span: all; }
.wl-post { padding: 12px 14px; display: block; }
.wl-post.wl-pending { border: 2px dashed var(--warn); }
.wl-post.wl-rejected { opacity: .75; border: 2px dashed var(--bad); }
.wl-author { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.wl-tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--gold); color: #2d2308; }
.wl-status { display: inline-block; font-size: 12px; margin-top: 6px; padding: 1px 8px; border-radius: 6px; }
.wl-status.pending { background: var(--warn); color: #2d2308; }
.wl-status.rejected { background: var(--bad); color: #fff; }
.wl-text { white-space: pre-wrap; word-break: break-word; margin: 8px 0; font-size: 16px; line-height: 1.55; }
.wl-acts { gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.wl-act { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--text); font-size: 14px; }
.wl-act.on { color: var(--bad); border-color: var(--bad); }
.wl-act:disabled { opacity: .45; cursor: default; }
.wl-comments:not(:empty) { margin-top: 8px; }
.wl-comment { padding: 6px 0; border-top: 1px dashed var(--line); }
.wl-comment .wl-text { margin: 4px 0; font-size: 15px; }
.wl-mod { gap: 6px; }
.wl-cinput { gap: 6px; margin-top: 6px; flex-wrap: nowrap; }
.wl-cinput input { flex: 1; min-width: 0; }
.wl-post .linkish, .wl-comment .linkish { background: none; border: 0; padding: 0; color: var(--text-dim); cursor: pointer; text-decoration: underline; }
.wl-home { margin-top: 18px; }
.wl-attach:not(:empty) { margin-top: 8px; }
.wl-attach-img { max-width: 100%; max-height: 220px; border-radius: 10px; display: block; margin-bottom: 4px; }
.wl-img { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin: 6px 0; cursor: zoom-in; background: var(--bg-soft); }
.wl-img-big { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; }
.wl-audio { width: 100%; margin: 6px 0; }
.wl-recording { background: var(--bad); color: #fff; border-color: var(--bad); }

/* ---------- 词书管理页（教学内容 → 单词 / 后台导入单词） ----------
 * 老师 2026-10-12 要「更活泼的学习类 App 风格」。只作用于 .wc 下面，全站其它页面不受影响。
 * 弹窗由全站共用的 modal() 画，内容外面包了一层 .wc.wc-modal。 */
.wc {
  --wc-brand: #5b5bd6;
  --wc-brand-2: #8b5cf6;
  --wc-brand-soft: #eeeefe;
  --wc-brand-text: #ffffff;
  --wc-ink: #3730a3;
  --wc-panel: var(--card);
  --wc-line: #e6e3f3;
  --wc-shadow: 0 1px 2px rgba(40, 30, 90, .05), 0 10px 28px rgba(60, 50, 140, .08);
  --wc-c0: linear-gradient(135deg, #ff8a65, #ff5e7e);
  --wc-c1: linear-gradient(135deg, #34d399, #0ea5a4);
  --wc-c2: linear-gradient(135deg, #fbbf24, #f97316);
  --wc-c3: linear-gradient(135deg, #60a5fa, #6366f1);
  --wc-c4: linear-gradient(135deg, #a78bfa, #ec4899);
  --wc-c5: linear-gradient(135deg, #4ade80, #16a34a);
  --wc-danger: var(--bad);
  --wc-danger-soft: #fdecec;
}
[data-theme="dark"] .wc {
  --wc-brand: #8b8cf6;
  --wc-brand-2: #a78bfa;
  --wc-brand-soft: #262645;
  --wc-brand-text: #14142b;
  --wc-ink: #c7c8ff;
  --wc-line: #34364a;
  --wc-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
  --wc-c0: linear-gradient(135deg, #b4533f, #a3324f);
  --wc-c1: linear-gradient(135deg, #1f8a6a, #0f6b6a);
  --wc-c2: linear-gradient(135deg, #a8781a, #a8521a);
  --wc-c3: linear-gradient(135deg, #2f6cb0, #3f41a8);
  --wc-c4: linear-gradient(135deg, #6c51b0, #9a3070);
  --wc-c5: linear-gradient(135deg, #2b8f50, #186b37);
  --wc-danger-soft: #3a2224;
}
.wc .btn.primary { background: linear-gradient(135deg, var(--wc-brand), var(--wc-brand-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--wc-brand) 30%, transparent); }
.wc .btn.primary:hover { filter: brightness(1.06); }
.wc .btn:focus-visible, .wc button:focus-visible { outline: 3px solid color-mix(in srgb, var(--wc-brand) 45%, transparent); outline-offset: 2px; }
.wc input:focus, .wc textarea:focus, .wc select:focus { outline: 2px solid color-mix(in srgb, var(--wc-brand) 50%, transparent); outline-offset: 1px; border-color: var(--wc-brand); }
.wc .wc-solid-bad { background: var(--wc-danger); border-color: var(--wc-danger); color: #fff; }
.wc-panel { background: var(--wc-panel); border: 1px solid var(--wc-line); border-radius: 20px; box-shadow: var(--wc-shadow); padding: 18px; }
.wc-title { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--wc-brand-soft); color: var(--wc-ink); white-space: nowrap; }
.wc-pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.wc-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .25); color: inherit; white-space: nowrap; }
.wc-tag.dim { background: var(--card-2); color: var(--text-dim); border: 1px solid var(--line); }

/* 书架：手机横向滑，大屏换行 */
.wc-shelf { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--wc-line) transparent; }
.wc-shelf::-webkit-scrollbar { height: 6px; }
.wc-shelf::-webkit-scrollbar-thumb { background: var(--wc-line); border-radius: 3px; }
.wc-book {
  flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px; border-radius: 18px; border: 2px solid transparent; cursor: pointer; text-align: left;
  background: var(--card); box-shadow: var(--wc-shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.wc-book:hover { transform: translateY(-2px); }
.wc-book.on { border-color: var(--wc-brand); transform: translateY(-3px); box-shadow: 0 10px 26px color-mix(in srgb, var(--wc-brand) 28%, transparent); }
.wc-cover {
  width: 100%; height: 58px; border-radius: 12px; margin-bottom: 6px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 20px; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  position: relative; overflow: hidden;
}
.wc-cover::after { content: ""; position: absolute; right: -14px; top: -14px; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.wc-c0 .wc-cover { background: var(--wc-c0); } .wc-c1 .wc-cover { background: var(--wc-c1); } .wc-c2 .wc-cover { background: var(--wc-c2); }
.wc-c3 .wc-cover { background: var(--wc-c3); } .wc-c4 .wc-cover { background: var(--wc-c4); } .wc-c5 .wc-cover { background: var(--wc-c5); }
.wc-book-name { font-weight: 700; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-book-meta { font-size: 12px; color: var(--text-dim); }
.wc-book .wc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.wc-book .wc-tag:not(.dim) { background: var(--wc-brand-soft); color: var(--wc-ink); }
.wc-book-add { background: transparent; box-shadow: none; border: 2px dashed var(--wc-line); justify-content: center; align-items: center; }
.wc-book-add .wc-cover { background: var(--wc-brand-soft); color: var(--wc-brand); text-shadow: none; font-size: 28px; }
.wc-book-add .wc-cover::after { display: none; }
.wc-book-add { flex-basis: 110px; }

/* 当前词书头部：跟着书的颜色走 */
.wc-head { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; border-radius: 22px; margin-bottom: 16px; color: #fff; position: relative; overflow: hidden; }
.wc-head:empty { display: none; }
.wc-head::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.wc-head.wc-c0::before { background: var(--wc-c0); } .wc-head.wc-c1::before { background: var(--wc-c1); } .wc-head.wc-c2::before { background: var(--wc-c2); }
.wc-head.wc-c3::before { background: var(--wc-c3); } .wc-head.wc-c4::before { background: var(--wc-c4); } .wc-head.wc-c5::before { background: var(--wc-c5); }
.wc-head::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .12); z-index: 0; }
.wc-head > * { position: relative; z-index: 1; }
.wc-head h2 { display: block; margin: 0; font-size: 24px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.wc-head h2::before { display: none; }
.wc-sub { margin: 2px 0 0; opacity: .9; font-size: 14px; }
.wc-head .wc-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wc-head .wc-pill { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(4px); }
.wc-head-actions { display: flex; gap: 8px; }
.wc .btn.wc-light { background: rgba(255, 255, 255, .92); border-color: transparent; color: #26215c; }
.wc .btn.wc-light.wc-danger { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .5); }

/* 主体：大屏左板块右上传 */
.wc-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.wc-main { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 860px) {
  .wc-body { grid-template-columns: minmax(0, 1fr); }
}

/* 板块瓷砖 */
.wc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wc-sec-head .wc-title { margin: 0; }
.wc-sec-tools { display: flex; gap: 6px; }
.wc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 860px) { .wc-tiles { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); } }
.wc-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 80px;
  padding: 8px 4px 6px; border-radius: 16px; border: 1.5px solid var(--wc-line); background: var(--card-2);
  cursor: pointer; text-align: center; transition: transform .15s, border-color .15s, background .15s;
}
.wc-tile:hover { border-color: var(--wc-brand); transform: translateY(-1px); }
.wc-badge {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--wc-brand-soft); color: var(--wc-brand); margin-bottom: 2px;
}
.wc-tile-name { font-size: 13px; font-weight: 600; line-height: 1.3; word-break: break-all; }
.wc-tile-n { font-size: 12px; color: var(--text-dim); }
.wc-tile-tts { position: absolute; top: 6px; right: 7px; font-size: 12px; }
.wc-tile.on { background: linear-gradient(145deg, var(--wc-brand), var(--wc-brand-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--wc-brand) 35%, transparent); }
.wc-tile.on .wc-badge { background: rgba(255, 255, 255, .25); color: #fff; }
.wc-tile.on .wc-tile-n { color: rgba(255, 255, 255, .85); }
.wc-tile.loose { border-style: dashed; background: transparent; }
.wc-tile.loose.on { border-style: solid; }
.wc-sec-bar { margin-bottom: 12px; padding: 10px; border-radius: 14px; background: var(--wc-brand-soft); display: flex; flex-direction: column; gap: 8px; }
.wc-sec-bar-name { font-weight: 700; color: var(--wc-ink); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.wc-sec-bar-name small { font-weight: 400; color: var(--text-dim); }
.wc-sec-bar-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wc-sec-empty, .wc-empty { text-align: center; padding: 18px 8px 22px; color: var(--text-dim); }
.wc-sec-empty b, .wc-empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.wc-sec-empty p, .wc-empty p { margin: 0 auto 14px; max-width: 320px; font-size: 13px; line-height: 1.6; }
.wc-empty-art { font-size: 40px; line-height: 1; margin-bottom: 10px; animation: wc-bob 2.6s ease-in-out infinite; }
@keyframes wc-bob { 50% { transform: translateY(-4px); } }

/* 上传区 */
.wc-target { display: inline-block; padding: 2px 12px; border-radius: 999px; background: linear-gradient(135deg, var(--wc-brand), var(--wc-brand-2)); color: #fff; font-size: 15px; }
.wc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
@media (max-width: 480px) { .wc-modes { grid-template-columns: 1fr; } }
.wc-mode {
  display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; text-align: left; cursor: pointer;
  border: 2px solid var(--wc-line); background: var(--card-2); transition: border-color .15s, background .15s;
}
.wc-mode b { display: block; font-size: 15px; }
.wc-mode small { display: block; color: var(--text-dim); font-size: 12px; line-height: 1.4; }
.wc-mode-icon { font-size: 22px; flex: 0 0 auto; }
.wc-mode.on { border-color: var(--wc-brand); background: var(--wc-brand-soft); }
.wc-mode.danger.on { border-color: var(--wc-danger); background: var(--wc-danger-soft); }
.wc .importer textarea.imp-text { border-radius: 14px; background: var(--card-2); border: 1.5px dashed var(--wc-line); min-height: 160px; }
.wc .importer textarea.imp-text:focus { border-style: solid; }
.wc .imp-col { border-radius: 999px; padding: 2px 10px; }
.wc .imp-col.req { border-color: var(--wc-brand); color: var(--wc-ink); background: var(--wc-brand-soft); }
.wc .imp-chip { border-radius: 999px; }
.wc .imp-table { border-radius: 12px; border: 1px solid var(--wc-line); }
.wc-done { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); animation: pop .25s; }
.wc-done-icon { font-size: 26px; line-height: 1; }
.wc-done p { margin: 6px 0 0; }

/* 单词列表 */
.wc-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.wc-search { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--wc-line); flex: 0 1 240px; }
.wc-search input { border: 0; background: transparent; padding: 8px 0; width: 100%; font: inherit; color: var(--text); }
.wc-search input:focus { outline: none; }
.wc-search:focus-within { border-color: var(--wc-brand); }
.wc-movebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 12px; border-radius: 14px; background: var(--wc-brand-soft); color: var(--wc-ink); animation: pop .2s; }
.wc-movebar select { width: auto; max-width: 180px; padding: 6px 10px; }
.wc-words { width: 100%; border-collapse: separate; border-spacing: 0; }
.wc-words th { font-size: 12px; font-weight: 500; color: var(--text-dim); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--wc-line); }
.wc-words td { padding: 10px; border-bottom: 1px solid var(--wc-line); vertical-align: middle; font-size: 14px; }
.wc-words tbody tr { transition: background .12s; }
.wc-words tbody tr:hover td { background: color-mix(in srgb, var(--wc-brand-soft) 60%, transparent); }
.wc-words .c-ru { font-weight: 700; font-size: 16px; }
.wc-words .c-meta { display: table-cell; }
.wc-words .c-meta .wc-tag { margin-right: 4px; }
.wc-words .c-ex { font-size: 13px; color: var(--text-dim); max-width: 260px; }
.wc-words .c-act { white-space: nowrap; text-align: right; }
.wc-rec { margin-left: 4px; font-size: 13px; }
.wc-icon { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--wc-line); background: var(--card); cursor: pointer; font-size: 15px; margin-left: 4px; transition: background .12s, border-color .12s; }
.wc-icon:hover { background: var(--wc-brand-soft); border-color: var(--wc-brand); }
.wc-icon.bad:hover { background: var(--wc-danger-soft); border-color: var(--wc-danger); }
.wc-pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; }
/* 手机：表格变成一张张小卡片，不横向滚动 */
@media (max-width: 680px) {
  .wc-words thead { display: none; }
  .wc-words, .wc-words tbody { display: block; }
  .wc-words tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "pick ru act" "pick zh zh" "pick meta meta" "pick ex ex"; align-items: center;
    column-gap: 10px; row-gap: 2px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--wc-line); border-radius: 16px; background: var(--card-2);
  }
  .wc-words td { display: block; padding: 0; border: 0; background: none !important; }
  .wc-words .c-pick { grid-area: pick; padding-top: 3px; }
  .wc-words .c-ru { grid-area: ru; }
  .wc-words .c-zh { grid-area: zh; color: var(--text-dim); }
  .wc-words .c-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px; }
  .wc-words .c-meta:empty, .wc-words .c-ex:empty { display: none; }
  .wc-words .c-ex { grid-area: ex; max-width: none; margin-top: 4px; }
  .wc-words .c-act { grid-area: act; display: flex; gap: 4px; }
  .wc-words .c-act .wc-icon { margin: 0; width: 40px; height: 40px; }
  .wc-head { padding: 16px; }
  .wc-head h2 { font-size: 21px; }
  .wc-search { flex: 1 1 100%; }
}

/* 弹窗 */
.wc-modal label.field > span, .wc-modal .field > span { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.wc-modal .field { margin-bottom: 14px; }
.wc-modal input[type=text], .wc-modal input[type=number], .wc-modal select { border-radius: 12px; }
.wc-modal input[type=number] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: inherit; }
.wc-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--wc-line); }
.wc-seg button { flex: 1 1 auto; min-height: 38px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 14px; color: var(--text-dim); transition: background .15s, color .15s; }
.wc-seg button.on { background: var(--card); color: var(--wc-ink); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
[data-theme="dark"] .wc-seg button.on { background: var(--wc-brand-soft); }
.wc-hint { font-size: 12.5px; line-height: 1.6; color: var(--text-dim); background: var(--wc-brand-soft); padding: 8px 12px; border-radius: 12px; margin: -4px 0 14px; }
.wc-classes { margin: -6px 0 14px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--wc-line); }
.wc-check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.wc-batch { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 8px; }
.wc-batch label span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
@media (max-width: 480px) { .wc-batch { grid-template-columns: 1fr 1fr; } }
.wc-batch-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 4px; padding: 10px; border-radius: 14px; background: var(--card-2); font-size: 13px; min-height: 46px; }
.wc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.wc-modal .wc-modes { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .wc *, .wc *::before, .wc *::after { animation: none !important; transition: none !important; }
}

/* 听写：提示方式开关、再听一遍 */
.dict-mode { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.dict-mode-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.dict-zh-hint { font-size: 20px; color: var(--text-dim); font-weight: 500; }
.dict-listen { display: block; margin: 0 auto 10px; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; cursor: pointer; }
.dict-listen[hidden] { display: none; }

/* 词书页顶部常用操作 */
.wc .wc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wc .wc-toolbar-title { font-size: 17px; }
.wc .wc-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wc .wc-toolbar-actions .btn { min-height: 40px; }
/* 单词库页：老师的管理入口 */
.wl-manage { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
/* 游戏厅：变格王国入口 */
.forms-entry { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; text-decoration: none; color: inherit; border: 1px solid var(--line); }
.forms-entry:hover { border-color: var(--accent); }
.forms-entry-icon { font-size: 30px; }

/* 导入：自动识别的说明（Word / Excel / 粘贴的试卷） */
.imp-notes:empty { display: none; }
.imp-notes { margin: 10px 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; }
.imp-notes ul { margin: 6px 0 0; padding-left: 18px; max-height: 180px; overflow: auto; }
.imp-notes li { margin: 2px 0; }

/* 上线前账号安全：只追加覆盖，手机竖屏和微信表单适配。 */
.auth-security { width:100%; min-width:0; box-sizing:border-box; }
.auth-security [hidden], a[href="/register"][hidden] { display:none !important; }
.auth-security input { min-width:0; width:100%; box-sizing:border-box; font-size:16px; min-height:44px; }
.auth-security .btn { min-height:44px; touch-action:manipulation; }
.auth-security-notice { padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); line-height:1.65; overflow-wrap:anywhere; }
.auth-captcha-row { display:flex; align-items:center; gap:10px; min-width:0; }
.auth-captcha-row input { flex:1; width:0; }
.auth-captcha-image { padding:0; flex:none; width:140px; min-height:48px; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fff; color:#333; cursor:pointer; }
.auth-captcha-image svg { width:100%; height:auto; display:block; }
.auth-credentials-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.auth-credentials-table { min-width:400px; }
.auth-credential-password { font-family:monospace; font-size:18px; letter-spacing:1px; user-select:text; -webkit-user-select:text; }
.auth-create-accounts { display:flex; align-items:center; gap:8px; margin:14px 0; }
.auth-create-accounts input { width:20px; height:20px; flex:none; }
@media (max-width:480px) {
  .auth-security { margin:12px auto !important; padding:18px; }
  .auth-security h1 { font-size:25px; }
  .auth-captcha-row { gap:8px; }
  .auth-captcha-image { width:128px; }
  .auth-credentials .btn { width:100%; min-height:44px; white-space:normal; }
}
