/* 背单词 · 教师版 样式 */
:root {
  --bg: #f7f5ef;
  --panel: #ffffff;
  --line: #e7e2d8;
  --text: #23281f;
  --muted: #7a7f72;
  --accent: #256038;
  --accent-2: #b9722a;
  --accent-4: #f6e8d1;
  --accent-soft: rgba(37, 96, 56, .12);
  --accent-line: rgba(37, 96, 56, .35);
  --font: 'Avenir Next', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --base-size: 17px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(30, 40, 30, .08), 0 2px 6px rgba(30, 40, 30, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--base-size);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
code { background: rgba(0, 0, 0, .05); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .9em; }
.warn-text { color: #b45309; }
.ok-text { color: #15803d; font-weight: 600; }
.bad-text { color: #b91c1c; font-weight: 600; }
.center { justify-content: center; }

/* ---------- 布局 ---------- */
#shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 16px; }
.logo { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; font-family: 'Songti SC', 'KaiTi', serif; }
.brand-title { font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand-sub { font-size: 12px; color: var(--muted); }
#nav { padding: 6px 12px 20px; flex: 1; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
  padding: 9px 12px; margin: 2px 0; border: 0; background: transparent; border-radius: 10px; cursor: pointer;
  color: var(--text); font-size: .96em; transition: background .15s;
}
.nav-item:hover { background: rgba(0, 0, 0, .04); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item em { font-style: normal; font-size: .85em; color: var(--muted); }
.nav-label { font-size: .8em; color: var(--muted); padding: 6px 12px 4px; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 12px; }
.nav-empty { color: var(--muted); font-size: .88em; padding: 4px 12px 10px; line-height: 1.6; }
.side-bottom { padding: 16px 20px; border-top: 1px solid var(--line); }
.side-quote { font-family: 'Songti SC', serif; color: var(--muted); font-size: .9em; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .7); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.topbar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-r { display: flex; align-items: center; gap: 14px; }
#crumb { font-size: .95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb-book { color: var(--muted); }
.crumb-sep { margin: 0 8px; color: var(--muted); }
.sync-badge { font-size: .8em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sync-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.sync-badge.off .dot { background: #9ca3af; }
.sync-badge.warn .dot { background: #f59e0b; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: .92em; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-4); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .9em; }
.content { padding: 26px 32px 40px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: .82em; padding: 18px; border-top: 1px solid var(--line); }
.menu-btn { display: none !important; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 16px; cursor: pointer;
  transition: all .15s; font-size: .95em; white-space: nowrap;
}
.btn:hover { border-color: var(--accent-line); color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.big { padding: 12px 24px; font-size: 1.02em; border-radius: 12px; }
.btn.sm { padding: 4px 10px; font-size: .85em; border-radius: 8px; }
.btn.danger:hover { color: #b91c1c; border-color: #fecaca; }
.btn:disabled { opacity: .6; cursor: default; }
.txt-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .9em; }
.txt-btn:hover { color: var(--accent); }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--accent-soft); }
.row-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.form label { display: block; margin-bottom: 14px; font-size: .92em; color: #4b5246; }
.form label input, .form label textarea, .form label select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; font-size: 1em; }
.form label input:focus, .form label textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.search, .search { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; min-width: 240px; }
input.search:focus { border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9em; color: #4b5246; cursor: pointer; }
.check.sm { font-size: .8em; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; }

/* ---------- 面板 ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .02); }
.panel-h { font-weight: 700; font-size: 1.05em; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.panel-h .muted { font-weight: 400; font-size: .85em; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-emoji { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.empty-state h2 { margin: 0 0 6px; }

/* ---------- 首页 ---------- */
.hello h1 { margin: 4px 0 6px; font-size: 1.7em; letter-spacing: .01em; }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.home-grid .panel { margin-bottom: 20px; }
.plan-rows { display: flex; flex-direction: column; gap: 10px; }
.plan-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; background: #faf9f5; }
.plan-row .pr-l { display: flex; align-items: center; gap: 8px; }
.plan-row input { width: 64px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.plan-row .pr-r { color: var(--accent); font-weight: 600; }
.plan-btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ring-row { display: flex; align-items: center; gap: 18px; }
.ring { width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(0, 0, 0, .06) 0); display: grid; place-items: center; flex-shrink: 0; }
.ring span { width: 70px; height: 70px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; }
.ring-text p { margin: 3px 0; }
.book-bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.bar-row:hover { background: #faf9f5; }
.bar-name { width: 180px; font-size: .92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { flex: 1; height: 8px; border-radius: 6px; background: rgba(0, 0, 0, .06); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar-num { width: 70px; text-align: right; font-size: .85em; color: var(--muted); }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #faf9f5; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: .95em; }
.chip:hover { border-color: var(--accent-line); color: var(--accent); }
.admin-teaser p { margin: 0 0 12px; color: var(--muted); }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.mini-stats > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.mini-stats b { font-size: 1.6em; display: block; color: var(--accent); }
.mini-stats span { color: var(--muted); font-size: .85em; }

/* ---------- 登录 ---------- */
.login-wrap { display: flex; justify-content: center; padding: 24px 16px 64px; }
@media (max-width: 760px) { .login-wrap { padding: 8px 10px 48px; } .login-card { padding: 22px 18px; } }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 4px; }
.login-card p.muted { margin-top: 0; font-size: .92em; }
.login-card .btn.big { width: 100%; margin-top: 6px; }
/* —— 李中源老师原创：署名 + 每日激励语 —— */
.login-author { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; margin-bottom: 12px; border-radius: 999px; background: linear-gradient(135deg, #256038, #3f8f5c); color: #fff; font-size: .82em; font-weight: 700; letter-spacing: .5px; box-shadow: 0 2px 8px rgba(37, 96, 56, .25); }
.login-author span { font-weight: 400; opacity: .85; font-size: .92em; }
.login-card .cheer { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #f5faf6; border-left: 3px solid #3f8f5c; color: #24402e; line-height: 1.7; font-size: .95em; }
.login-card .cheer .cheer-en, .cheer-line .cheer-en { display: block; margin-top: 4px; color: #6b7280; font-size: .9em; font-style: italic; }
.cheer-line { margin: 6px 0 6px; padding-left: 10px; border-left: 3px solid #3f8f5c; color: #24402e; line-height: 1.65; font-size: .95em; }
@media (max-width: 760px) { .login-card .cheer { font-size: .92em; padding: 10px 12px; } }
.login-hint { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .85em; color: var(--muted); display: flex; flex-direction: column; gap: 8px; line-height: 1.7; }

/* ---------- 单词卡片 ---------- */
.study { max-width: 960px; margin: 0 auto; }
.study-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.progress-line { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.progress-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(0, 0, 0, .07); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.progress-line span { font-size: .88em; color: var(--muted); white-space: nowrap; }
.study-actions { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 6px 14px; cursor: pointer; font-size: .85em; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }
.seg button[hidden] { display: none; }

.word-stage { display: flex; justify-content: center; padding: 10px 0; perspective: 1600px; }
.word-card {
  --w: 700px; --flip: .6s;
  width: min(100%, var(--w)); height: clamp(330px, 46vh, 440px);
  cursor: pointer; position: relative; transform-style: preserve-3d;
  transition: transform var(--flip) cubic-bezier(.2, .7, .2, 1);
}
.word-card.is-flipped { transform: rotateY(180deg); }
.say.sm-say { padding: 2px 10px; font-size: .6em; vertical-align: middle; margin-left: 6px; }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(circle at 90% 0%, rgba(0, 0, 0, .015) 0, transparent 45%);
}
.face.back { transform: rotateY(180deg); }
.card-body { padding: 34px 40px 10px; overflow-y: auto; }
.card-foot { padding: 12px 40px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .82em; display: flex; justify-content: space-between; background: #fcfbf8; }
.kicker { font-size: .8em; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 14px; }
.big-word { font-family: 'Avenir Next', 'Baskerville', Georgia, serif; font-size: clamp(42px, 6.5vw, 64px); font-weight: 600; line-height: 1.1; color: var(--text); word-break: break-word; }
.mid-word { font-family: 'Avenir Next', 'Baskerville', Georgia, serif; font-size: 26px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.ipa { color: var(--accent-2); font-family: 'Baskerville', Georgia, serif; margin-top: 8px; font-size: 1.05em; min-height: 1em; }
.speak-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.say { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: .92em; }
.say:hover { border-color: var(--accent-line); color: var(--accent); }
.say.big { margin: 16px 0; padding: 12px 26px; font-size: 1.05em; }
.defs { font-size: 1.18em; line-height: 1.7; }
.def-line { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; }
.def-line .pos { color: var(--accent-2); min-width: 46px; font-size: .86em; font-weight: 600; font-style: italic; }
.defs .single { display: block; padding: 2px 0; }
.example { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--accent-4); background: #fcfaf4; border-radius: 0 8px 8px 0; font-size: .98em; }
.example-trans { color: var(--muted); font-size: .9em; padding: 4px 16px 0 19px; }
.card-ctrl { display: flex; flex-direction: column; align-items: center; margin-top: 20px; gap: 8px; }
.flip-btn { min-width: 240px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.flip-btn em { font-style: normal; font-size: .72em; opacity: .7; border: 1px solid rgba(255, 255, 255, .5); padding: 0 6px; border-radius: 5px; }
.ctrl-hint { font-size: .85em; color: var(--muted); }
.rate-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; }
.rate-q { color: var(--muted); font-size: .92em; margin-bottom: 10px; }
.rate-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 760px; }
.rate { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 14px 12px; cursor: pointer; text-align: left; transition: all .15s; }
.rate b { display: block; font-size: 1.02em; }
.rate em { display: block; font-style: normal; color: var(--muted); font-size: .8em; margin-top: 2px; }
.rate span { position: absolute; right: 10px; top: 8px; font-size: .72em; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.rate:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.rate.r1:hover { border-color: #f0a0a0; background: #fff7f7; }
.rate.r2:hover { border-color: #f0c98a; background: #fffbf3; }
.rate.r3:hover { border-color: #99c8a8; background: #f5fbf6; }
.study-bottom { display: flex; justify-content: center; gap: 28px; margin-top: 18px; color: var(--muted); font-size: .85em; }

/* ---------- 完成 ---------- */
.done { text-align: center; padding: 50px 16px; }
.done-emoji { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 30px; }
.done h2 { margin: 0 0 4px; }
.done-stats { display: flex; justify-content: center; gap: 36px; margin: 26px 0; }
.done-stats b { display: block; font-size: 1.8em; color: var(--accent); }
.done-stats span { color: var(--muted); font-size: .85em; }

/* ---------- 列表 ---------- */
.wrong-list { display: flex; flex-direction: column; }
.wrong-row { display: flex; gap: 14px; align-items: baseline; padding: 10px 8px; border-bottom: 1px solid #f1ede4; cursor: pointer; border-radius: 8px; }
.wrong-row:hover { background: #faf9f5; }
.wrong-row b { min-width: 140px; }
.wrong-row .wr-def { flex: 1; color: #4b5246; }
.wrong-row .wr-count { color: #b45309; font-size: .82em; white-space: nowrap; }
.browse-grid { display: flex; flex-direction: column; gap: 18px; }
.cat-h { font-weight: 700; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.cat-chev { color: var(--muted); font-size: .8em; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; transition: all .15s; }
.wcard:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.wcard.mastered { border-left: 3px solid var(--accent); }
.wc-word { font-weight: 600; font-family: 'Avenir Next', Georgia, serif; }
.wc-def { color: var(--muted); font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.book-head h2 { margin: 0; }

/* ---------- 听写 ---------- */
.dict-controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.dict-pick { display: flex; flex-wrap: wrap; gap: 8px 14px; max-height: 260px; overflow-y: auto; padding: 8px 0; }
.dp-chip { display: inline-flex; gap: 6px; align-items: center; font-size: .9em; cursor: pointer; padding: 3px 8px; border-radius: 8px; }
.dp-chip:hover { background: #faf9f5; }
.dict-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 36px; max-width: 640px; margin: 0 auto; text-align: center; box-shadow: var(--shadow); }
.dict-def { font-size: 1.3em; text-align: left; display: inline-block; }
.dict-card .def-line .pos { min-width: auto; }
#dictForm { display: flex; gap: 10px; margin-top: 16px; }
#dictInput { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; outline: none; font-size: 1.1em; letter-spacing: .04em; }
#dictInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#dictFb { margin-top: 14px; font-size: 1.05em; min-height: 1.6em; }

/* ---------- 后台管理 ---------- */
.admin .panel-h + .muted { margin-top: -6px; margin-bottom: 10px; }
.book-manage { margin-top: 14px; display: flex; flex-direction: column; }
.bm-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #f1ede4; flex-wrap: wrap; }
.bm-name em { font-style: normal; color: var(--muted); font-size: .82em; background: #f4f1e9; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.bm-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#batchText { width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; resize: vertical; font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: .92em; line-height: 1.7; }
#batchText:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.preview-h { margin: 14px 0 8px; }
.preview-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.pv-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 7px 14px; border-bottom: 1px solid #f4f1e9; font-size: .92em; }
.pv-row b { font-family: 'Avenir Next', Georgia, serif; }
.pv-row.dup { background: #fffaf0; }
.pv-row.dup b::after { content: " 已存在"; font-size: .72em; color: #b45309; font-weight: 400; font-family: var(--font); }
.admin-word-list { max-height: 380px; overflow-y: auto; border-top: 1px solid var(--line); }
.aw-row { display: flex; gap: 14px; padding: 8px 6px; border-bottom: 1px solid #f4f1e9; cursor: pointer; font-size: .92em; }
.aw-row:hover { background: #faf9f5; }
.aw-row b { min-width: 170px; font-family: 'Avenir Next', Georgia, serif; }
.aw-row span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 20px; margin-bottom: 14px; align-items: end; }
.settings-grid label { display: flex; flex-direction: column; gap: 5px; font-size: .88em; color: #4b5246; }
.settings-grid input, .settings-grid select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; }
.settings-grid input[type=color] { padding: 2px; height: 38px; }
#adminWordList, .admin-word-list { margin-top: 8px; }

/* ---------- 覆盖层 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 26, 20, .35); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; backdrop-filter: blur(3px); }
.overlay.show { display: flex; }
.sheet { background: #fff; border-radius: 20px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.sheet-h { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 24px 8px; }
.sheet-word { font-family: 'Avenir Next', Georgia, serif; font-size: 34px; font-weight: 600; }
.sheet-ipa { color: var(--accent-2); }
.sheet-body { padding: 8px 24px 16px; }
.sheet-ex { margin-top: 12px; font-size: .95em; }
.sheet-meta { margin-top: 18px; color: var(--muted); font-size: .85em; }
.sheet-f { display: flex; gap: 10px; padding: 14px 24px 22px; border-top: 1px solid var(--line); justify-content: flex-end; }
.sheet-form { padding: 8px 24px 22px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 200; pointer-events: none; }
.toast { background: #23281f; color: #fff; padding: 11px 22px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(10px); transition: all .25s; font-size: .92em; }
.toast-wrap.show .toast { opacity: 1; transform: translateY(0); }

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .menu-btn { display: inline-flex !important; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  #shell.menu-open .sidebar { transform: translateX(0); }
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 0 14px; }
  .user-chip b, .sync-badge span:not(.dot) { display: none; }
  .card-body { padding: 26px 22px 8px; }
  .card-foot { padding: 10px 22px; }
  .word-card { height: clamp(320px, 58vh, 460px); }
  .rate-row { grid-template-columns: 1fr; }
  .rate em { display: inline; margin-left: 6px; }
  .done-stats { gap: 20px; }
  .bar-name { width: 110px; }
  .pv-row { grid-template-columns: 1fr; gap: 2px; }
  .study-bottom span.muted { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .word-card { transition: none; }
}

/* ---------- 补充：核心词库 / 设置 / 学生名单 ---------- */
.badge { font-size: .72em; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.mcard { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.mcard:hover { border-color: var(--accent-line); }
.mcard.in { opacity: .55; }
.mcard input { margin-top: 5px; }
.wc-mark { font-size: .75em; color: var(--accent-2); margin-top: 2px; }
.wc-mark::before { content: '· '; }
.table-wrap { margin-top: 8px; overflow-x: auto; }
table.students { width: 100%; border-collapse: collapse; font-size: .92em; }
table.students th, table.students td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #f1ede4; white-space: nowrap; }
table.students th { color: var(--muted); font-weight: 500; font-size: .85em; }
.settings-list { display: flex; flex-direction: column; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid #f4f1e9; cursor: pointer; }
.toggle input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.toggle b, .set-row b { display: block; font-weight: 600; }
.toggle em, .set-row em { font-style: normal; color: var(--muted); font-size: .85em; display: block; }
.set-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid #f4f1e9; }
.set-row input, .set-row select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.set-row input[type=number] { width: 90px; }
#testSpeak { margin-top: 14px; align-self: flex-start; }
.sync-info { display: flex; gap: 12px; align-items: center; }
.user-chip { cursor: pointer; border-radius: 999px; padding: 3px 8px 3px 3px; }
.user-chip:hover { background: var(--accent-soft); }

/* ---------- 登录页提示 ---------- */
.conn-bar { display: flex; gap: 8px; align-items: flex-start; font-size: .85em; padding: 9px 12px; border-radius: 10px; margin: 4px 0 16px; line-height: 1.55; }
.conn-bar .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.conn-bar.ok { background: #f0f8f2; color: #256038; }
.conn-bar.ok .dot { background: #22c55e; }
.conn-bar.bad { background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; }
.conn-bar.bad .dot { background: #ef4444; }
.conn-bar code { background: rgba(0,0,0,.06); }
.login-toast { min-height: 0; }
.login-toast.err { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff5f5; color: #b91c1c; border: 1px solid #fecaca; font-size: .9em; }
.roster-box { margin: 12px 0 0; padding: 12px; border-radius: 12px; background: rgba(37, 96, 56, .06); border: 1px dashed rgba(37, 96, 56, .35); }
.roster-box label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.roster-box select { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .15); font-size: 1em; background: #fff; }
.roster-box .muted { margin-top: 6px; }
.login-toast.ok { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; font-size: .9em; }

/* ---------- 登录页：密码显隐 / 登录模式提示 ---------- */
.check.pw-show { display: inline-flex; margin: -6px 0 10px; font-size: .85em; color: var(--muted); }
.login-mode { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: #f7f9f6; color: var(--muted); font-size: .88em; line-height: 1.6; }
.login-mode:empty { display: none; }
.login-mode.teacher { background: #fdf6ea; color: #8a5a17; }

/* ---------- 连不上服务器 ---------- */
.net-banner { display: none; }
.net-banner.show { display: block; position: sticky; top: 0; z-index: 30; background: #fff5f5; color: #b91c1c; border-bottom: 1px solid #fecaca; padding: 10px 18px; font-size: .9em; line-height: 1.6; }
.net-banner code { background: rgba(0,0,0,.06); border-radius: 4px; padding: 0 4px; }
.net-down p { line-height: 1.8; }
.net-down .row-btns { margin: 16px 0 6px; }
