/* 拼读星球 · 教师端样式：浅蓝背景 + 白色大圆角卡片 + 蓝色主色（对齐原型图 967/968） */
:root {
  --brand: #4C86F0;
  --brand-d: #2F6BD8;
  --brand-l: #E8F0FE;
  --bg: #EAF2FF;
  --bg-2: #DCE8FF;
  --paper: #FFFFFF;
  --ink: #1F2A44;
  --ink-2: #5B6784;
  --ink-3: #8A96B2;
  --line: #E6ECF9;
  --mint: #28CFA6;
  --amber: #FFBC42;
  --orange: #FF8F72;
  --violet: #9B78F8;
  --red: #F35B5B;
  --r: 18px;
  --r-sm: 12px;
  --sh: 0 8px 24px rgba(52, 96, 178, .10);
  --sh-hi: 0 14px 34px rgba(52, 96, 178, .18);
  --ease: cubic-bezier(.2, .8, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.spacer { flex: 1; }
.ipa { font-family: "Times New Roman", Georgia, serif; font-size: 17px; }
.ellipsis { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

/* ============ 登录 ============ */
.login {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(900px 520px at 50% -10%, #F5F9FF 0%, var(--bg) 45%, var(--bg-2) 100%);
}
.login-card {
  width: 400px; padding: 34px 32px 26px; background: var(--paper);
  border-radius: 26px; box-shadow: var(--sh-hi);
}
.brand-line { display: flex; align-items: baseline; gap: 10px; }
.brand-ipa { font-family: "Times New Roman", Georgia, serif; font-size: 21px; color: var(--brand); letter-spacing: .5px; }
.brand-cn { font-size: 19px; font-weight: 700; }
.login-sub { margin: 10px 0 22px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.login-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 12px; color: var(--ink-3); }
/* 登录卡片底部的 ICP 备案号（工信部要求展示；链接指向备案系统官网） */
.icp-line { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.icp-line a { color: var(--ink-3); text-decoration: none; }
.icp-line a:hover { color: var(--brand); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.field.inline { flex: 1; min-width: 160px; margin-bottom: 0; }
.field input, .field select, .field textarea, select, .cfg-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #FAFCFF; outline: none; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus, .cfg-row select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(76, 134, 240, .16); background: #fff;
}
.row-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 4px 0 18px; }
.row-gap { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

/* ============ 按钮 ============ */
.btn {
  padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; transition: transform .12s var(--ease), box-shadow .16s var(--ease), background .16s;
}
.btn:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(76, 134, 240, .28); }
.btn.primary:hover { background: var(--brand-d); }
.btn.ghost { background: transparent; border-style: dashed; color: var(--ink-2); }
.btn.block { width: 100%; }
.chip {
  padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); transition: all .14s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(76, 134, 240, .26); }
.chip.danger { color: var(--red); }
.chip.danger:hover { border-color: var(--red); color: var(--red); }
.link { color: var(--brand); font-size: 13px; padding: 2px 0; }
.link:hover { text-decoration: underline; }
.icon-btn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: var(--brand-l); color: var(--brand); }
.round-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 20px;
  line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(76, 134, 240, .3);
}
.round-btn:disabled { opacity: .38; cursor: default; }
.icon { font-size: 15px; }
.dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* ============ 外壳 ============ */
.shell { height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: 62px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; gap: 16px;
  background: linear-gradient(180deg, #EFF5FF 0%, rgba(234, 242, 255, .6) 100%);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.tabs { display: flex; gap: 6px; background: rgba(255, 255, 255, .7); padding: 4px; border-radius: 999px; }
.tab { padding: 6px 20px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: all .14s var(--ease); }
.tab.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(76, 134, 240, .26); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.badge.ok { color: var(--mint); border-color: rgba(40, 207, 166, .4); background: rgba(40, 207, 166, .1); }
.badge.warn { color: #C98A16; border-color: rgba(255, 188, 66, .5); background: rgba(255, 188, 66, .14); }
.who { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px; background: #fff; box-shadow: var(--sh); }
.who:hover { box-shadow: var(--sh-hi); }
.who-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #7FA9F7); color: #fff; display: grid; place-items: center; font-size: 13px; }
.who-meta { display: flex; flex-direction: column; line-height: 1.25; }
.who-meta b { font-size: 13px; }
.who-meta i { font-style: normal; font-size: 11px; color: var(--ink-3); }

.body { flex: 1; display: flex; gap: 16px; padding: 0 20px 20px; min-height: 0; }

/* ============ 侧边导航 ============ */
.sidebar {
  width: 196px; flex: none; background: var(--paper); border-radius: 20px; padding: 12px 10px;
  box-shadow: var(--sh); display: flex; flex-direction: column;
}
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px;
  font-size: 14px; color: var(--ink-2); text-align: left; transition: all .14s var(--ease); position: relative;
}
.nav-item:hover { background: var(--brand-l); color: var(--brand-d); }
.nav-item.active { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(76, 134, 240, .28); }
.nav-icon { width: 18px; text-align: center; font-size: 14px; opacity: .9; }
.nav-label { flex: 1; }
.nav-badge {
  min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--brand-l); color: var(--brand-d);
  font-size: 11px; text-align: center;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .26); color: #fff; }
.nav-badge.red { background: var(--red); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 10px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }

/* ============ 内容区 ============ */
.view { flex: 1; overflow-y: auto; padding-right: 4px; }
.view::-webkit-scrollbar { width: 8px; }
.view::-webkit-scrollbar-thumb { background: #CBD9F2; border-radius: 8px; }
.page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-head h1 { margin: 0 0 4px; font-size: 22px; }
.page-head p { margin: 0; font-size: 13px; }
.head-actions { display: flex; gap: 10px; flex: none; }

.panel { background: var(--paper); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh); }
.panel.sticky { position: sticky; top: 0; }
/* flex-wrap：筛选区元素会随功能增加（用户管理有搜索框 + 机构 + 会员到期两个下拉），
   窄窗口下必须能换行，否则会横向溢出把「搜索/清空」挤出可视区 */
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel.empty { padding: 46px; text-align: center; color: var(--ink-2); }

.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { background: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.stat-n.red { color: var(--red); }
.stat-n.mint { color: var(--mint); }
.stat-l { font-size: 12px; color: var(--ink-2); }

.grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.entry {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--sh);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.entry:hover { transform: translateY(-3px); box-shadow: var(--sh-hi); }
.entry:active { transform: translateY(0) scale(.99); }
.entry b { font-size: 14px; }
.entry i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.entry-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 17px;
}
.entry-icon.blue { background: linear-gradient(135deg, #6B9BF5, #4C86F0); }
.entry-icon.violet { background: linear-gradient(135deg, #B394FB, #9B78F8); }
.entry-icon.orange { background: linear-gradient(135deg, #FFA98F, #FF8F72); }
.entry-icon.mint { background: linear-gradient(135deg, #58DDBD, #28CFA6); }
.entry-icon.amber { background: linear-gradient(135deg, #FFCE6B, #FFBC42); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.two-col > .col-side { display: flex; flex-direction: column; gap: 16px; }
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-list { width: 280px; flex: none; }

/* ============ 表格 ============ */
/* 2026-10-13：body 有全局 user-select:none（防 UI 文字误选），但老师要复制数据
   ——用户管理的手机号、登录日志的账号/IP、详情弹窗里的家长姓名都要能选中拷贝。
   这里按「数据展示」划范围显式放开（带 -webkit- 前缀兜老内核）：
   表格 / 表格外壳 / 弹窗正文 / 统计块。 */
/* 注意：这里刻意写「显式元素选择器」而不是 .table * —
   两者浏览器里等价，但 *.jsdom 的 getComputedStyle 不认 `* ` 后代，
   护栏测试（tools/teacher_selectable_test.js）就验不到单元格本身。 */
.table-wrap, .table, .table thead, .table tbody, .table tr, .table th, .table td,
.table td span, .table td b,
.modal-body, .modal-body div, .modal-body p, .modal-body span, .modal-body ul, .modal-body li,
.stat-row, .stat, .stat span {
  -webkit-user-select: text;
  user-select: text;
}
/* 控件收回：放开的容器里的按钮 / 开关 / 链接仍然不可选，避免老师拖选时把操作项一起选走。
   必须写在上面那条之后才能盖得住（同权重看顺序）。 */
.table button, .ops, .ops button, .switch, .switch i,
#nav, .nav-item, .tab, .chip, .topbar, .who {
  -webkit-user-select: none;
  user-select: none;
}
.table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.table th { text-align: left; padding: 8px 10px; font-weight: 500; color: var(--ink-3); font-size: 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #F7FAFF; }
.table .ops { display: flex; gap: 10px; flex-wrap: wrap; }
.bar { height: 8px; border-radius: 999px; background: #EEF3FC; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6B9BF5, #4C86F0); transition: width .3s var(--ease); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--brand-l); color: var(--brand-d); font-size: 12px; }
.tag.ok { background: rgba(40, 207, 166, .14); color: #159C7C; }
.tag.blue { background: rgba(76, 134, 240, .14); color: var(--brand-d); }
.tag.green { background: rgba(40, 207, 166, .14); color: #159C7C; }
.tag.gray { background: #F0F3F9; color: var(--ink-3); }
.big { font-size: 20px; }
.stars { display: inline-flex; gap: 1px; }
.stars .star { color: #D9E2F5; font-size: 13px; }
.stars .star.on { color: var(--amber); }

/* ============ 卡片 / 列表 ============ */
/* 班级卡片列表：班级多时折行排布，最高占视口一半，内部滚动（表格区始终可见） */
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-content: start; max-height: 50vh; overflow-y: auto; padding-right: 6px; }
.class-cards::-webkit-scrollbar { width: 8px; }
.class-cards::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.class-cards::-webkit-scrollbar-thumb:hover { background: #b9c2d0; }
.class-card { background: var(--paper); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); cursor: pointer; border: 2px solid transparent; transition: all .16s var(--ease); }
.class-card:hover { transform: translateY(-2px); box-shadow: var(--sh-hi); }
.class-card.active { border-color: var(--brand); }
.class-card.blue { border-top: 4px solid #4C86F0; }
.class-card.orange { border-top: 4px solid #FF8F72; }
.class-card.violet { border-top: 4px solid #9B78F8; }
.cc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cc-body { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.invite { font-size: 13px; }
.invite b { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; color: var(--brand); }
.cc-foot { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

.class-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.class-check { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: all .14s var(--ease); }
.class-check:hover { border-color: var(--brand); background: #FAFCFF; }
.cc-main { display: flex; flex-direction: column; gap: 2px; }
.cc-main i { font-style: normal; font-size: 12px; color: var(--ink-3); }

.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left;
  padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #FCFDFF;
  transition: all .16s var(--ease);
}
.mode-card:hover { border-color: var(--brand); background: #F7FAFF; }
.mode-card.active { border-color: var(--brand); background: var(--brand-l); box-shadow: 0 6px 16px rgba(76, 134, 240, .16); }
.mode-card b { font-size: 14px; }
.mode-card i { font-style: normal; font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.mode-thumb { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--brand); box-shadow: var(--sh); }

.filter-row { display: flex; gap: 8px; align-items: center; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; letter-spacing: 1.5px; font-weight: 600; }
.code-grid { display: flex; flex-wrap: wrap; gap: 8px; max-height: 320px; overflow-y: auto; margin-top: 10px; padding: 12px; background: #F7F9FC; border: 1px solid var(--line); border-radius: 12px; }
.code-cell { padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; user-select: all; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 批阅 ============ */
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.review-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; transition: background .14s; }
.review-list li:hover { background: #F5F9FF; }
.review-list li.active { background: var(--brand-l); box-shadow: inset 0 0 0 1px rgba(76, 134, 240, .35); }
.rl-avatar { width: 30px; height: 30px; border-radius: 50%; background: #EEF3FC; color: var(--brand-d); display: grid; place-items: center; font-size: 13px; flex: none; }
.rl-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rl-main i { font-style: normal; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-star { font-size: 11px; flex: none; }
.audio-row { display: flex; align-items: center; gap: 14px; padding: 14px; background: #F7FAFF; border-radius: var(--r-sm); }
.play-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 15px; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(76, 134, 240, .3); flex: none; }
.play-btn:hover { background: var(--brand-d); }
.play-btn:active { transform: scale(.96); }
.wave { flex: 1; height: 40px; display: flex; align-items: center; gap: 2px; }
.wave i { flex: 1; background: linear-gradient(180deg, #9DBDF9, #4C86F0); border-radius: 999px; min-height: 4px; opacity: .85; }
.machine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.machine > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: #FBFDFF; border-radius: var(--r-sm); border: 1px solid var(--line); }
.machine b { font-size: 14px; }
.star-pick { display: flex; gap: 6px; margin-bottom: 14px; }
.star-pick .star { font-size: 26px; color: #D9E2F5; transition: transform .12s var(--ease), color .12s; }
.star-pick .star:hover { transform: scale(1.12); }
.star-pick .star.on { color: var(--amber); }
.quick-phrases { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ============ 图表 / 分布 ============ */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding: 8px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-col i { width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #A8C4FA, #6B9BF5); transition: height .4s var(--ease); }
.chart-col i.hi { background: linear-gradient(180deg, #FFD27A, #FFBC42); }
.chart-col span { font-size: 11px; color: var(--ink-3); }
.dist { display: flex; flex-direction: column; gap: 12px; }
.dist-row { display: grid; grid-template-columns: 76px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.dist-label { color: var(--ink-2); }
.log-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.log-list li { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 10px; }
.log-list li:hover { background: #F7FAFF; }
.log-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.log-main b { font-size: 13px; }
.log-main i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.log-delta { width: 36px; text-align: center; font-weight: 700; font-size: 13px; border-radius: 8px; padding: 3px 0; }
.log-delta.up { color: #159C7C; background: rgba(40, 207, 166, .13); }
.log-delta.down { color: var(--red); background: rgba(243, 91, 91, .12); }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rules li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.rules li:last-child { border-bottom: 0; }
.rules li span { color: var(--ink-2); }

/* ============ 配置 ============ */
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cfg-grid .panel { display: flex; flex-direction: column; gap: 4px; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 4px; border-bottom: 1px dashed var(--line); }
.cfg-row:last-child { border-bottom: 0; }
.cfg-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cfg-main b { font-size: 14px; }
.cfg-main span { font-size: 12px; line-height: 1.5; }
.cfg-row select { width: 168px; flex: none; }
.switch {
  width: 46px; height: 26px; border-radius: 999px; background: #DCE4F3; position: relative; flex: none;
  transition: background .2s var(--ease);
}
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: transform .2s var(--ease); }
.switch.on { background: var(--brand); }
.switch.on i { transform: translateX(20px); }
.switch:active i { width: 23px; }
.stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper button { width: 30px; height: 30px; border-radius: 10px; background: var(--brand-l); color: var(--brand-d); font-size: 15px; }
.stepper button:hover { background: #D8E6FD; }
.stepper b { min-width: 22px; text-align: center; }

/* ============ 侧栏快照 / 预览 ============ */
.snap { list-style: none; margin: 0; padding: 0; }
.snap li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.snap li:last-child { border-bottom: 0; }
.snap span { color: var(--ink-2); }
.preview { margin-top: 14px; padding: 14px; border-radius: var(--r-sm); background: linear-gradient(135deg, #F2F7FF, #E7F0FF); display: flex; flex-direction: column; gap: 6px; }
.preview-tag { font-size: 11px; color: var(--brand-d); }
.preview b { font-size: 14px; }
.preview i { font-style: normal; font-size: 12px; }
.cover-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cover { height: 54px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; font-size: 12px; border: 2px solid transparent; }
.cover.blue { background: linear-gradient(135deg, #7FA9F7, #4C86F0); }
.cover.orange { background: linear-gradient(135deg, #FFA98F, #FF8F72); }
.cover.purple { background: linear-gradient(135deg, #B394FB, #9B78F8); }
.cover.mint { background: linear-gradient(135deg, #58DDBD, #28CFA6); }
.cover.active { border-color: var(--ink); }
.cover-preview { color: var(--ink); }
.cover-preview.blue { background: linear-gradient(135deg, #EAF2FF, #DCE8FF); }
.qr-fake { display: grid; place-items: center; padding: 10px; }
.qr-grid { width: 200px; height: 200px; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); background: #fff; border-radius: 12px; padding: 8px; box-shadow: var(--sh); }
.qr-grid i { background: transparent; }
.qr-grid i.on { background: var(--ink); border-radius: 2px; }

/* ============ 弹层 / 提示 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(24, 38, 66, .34); display: grid; place-items: center; z-index: 50; backdrop-filter: blur(2px); }
.modal { width: 460px; max-width: 90vw; max-height: 82vh; background: #fff; border-radius: 20px; box-shadow: var(--sh-hi); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.toast {
  position: fixed; left: 50%; bottom: 44px; transform: translate(-50%, 16px);
  padding: 11px 20px; border-radius: 999px; background: rgba(31, 42, 68, .92); color: #fff; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .22s var(--ease); z-index: 60;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(200, 48, 48, .94); }

@media (max-width: 1180px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .grid-8 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .cfg-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 词汇游戏战绩 ---------- */
.games-stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.stat-card { padding: 14px 16px; }
.stat-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.stat-card-head b { font-size: 14px; }
.stat-nums { display: flex; gap: 10px; }
.stat-nums span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.stat-nums b { font-size: 18px; font-weight: 700; }
.stat-nums i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
.table-wrap .table { min-width: 860px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; vertical-align: middle; }
.pill.warn { background: #FFF3E2; color: #A76A00; }
@media (max-width: 1100px) { .games-stat-row { grid-template-columns: repeat(3, 1fr); } }
.link.red { color: var(--red); }
.pill { background: #EEF3FC; color: var(--brand-d); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: var(--paper);
}
.form-grid textarea { min-height: 110px; resize: vertical; }

/* ===================== 批量导入（网页版 / App 共用） ===================== */
.import-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; }
.inline-field > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hidden-input { display: none; }
.import-text {
  width: 100%; min-height: 170px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6;
}
.import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.import-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.pill.ok { background: #E6F6EC; color: #1B7F45; }
.pill.warn { background: #FFF3E2; color: #A76A00; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 词汇游戏管理（内容管理里的一块） ---------- */
.diff-stars { color: var(--amber); letter-spacing: 1px; font-size: 13px; }
.diff-stars i { color: #DDE4F2; font-style: normal; }
.pill.off { background: #F1F2F6; color: #868FA6; }
.warn-text { color: #D9822B; font-weight: 500; }

/* 玩法下面的「题材」行：浅底，一眼看出从属于上面那个玩法。
   缩进 / ▸ / 层级色块序号统一由 app.js 生成（和教材树、磨耳朵共用 .tree-row / .tw / .lvb），
   这里不要再给 td 加 padding-left，否则会和行首缩进叠在一起、层级越深越歪 */
tr.game-theme > td { background: #FAFBFE; }

/* 题材弹窗里的「可勾选单元清单」 */
.unit-picks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  max-height: 34vh; overflow: auto; padding: 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.unit-pick {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: #fff;
}
.unit-pick:hover { border-color: var(--brand); }
.unit-pick.on { border-color: var(--brand); background: #EEF4FF; }
.unit-pick b { font-weight: 600; font-size: 13px; }
.unit-pick i { margin-left: auto; white-space: nowrap; }

.round-list { margin: 4px 0 0; padding: 0; list-style: none; max-height: 46vh; overflow: auto; }
.round-list > li {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 9px 12px; margin-bottom: 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.round-no {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-l); color: var(--brand-d); font-size: 11px;
}
.round-list .chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.round-list .chip { font-style: normal; padding: 3px 10px; font-size: 12px; cursor: default; }
.round-list .chip.ok { background: #E6F6EC; border-color: #BEE6CD; color: #1B7F45; font-weight: 500; }

/* ---------- 宠物看板 ---------- */
/* 需照看的行整行淡红，老师一眼扫到就去点「提醒」 */
.table tr.row-warn td { background: #FFF6F3; }
.pill.red { background: #FFE9E3; color: #C74325; }
.pill.mint { background: #E3FAF3; color: #0B8A6A; }
/* 状态条在表格里要和小字数字并排，别把行撑高 */
.table .bar { width: 52px; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* ---------------- 用户管理（会员到期日标签） ---------------- */
.tag.danger { background: rgba(240, 90, 90, .14); color: #C6303A; }
.tag.muted { background: #F0F3F9; color: var(--ink-3); }
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  display: grid; grid-template-columns: 1.5fr 1fr .7fr .8fr; gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.order-row .no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.order-row .muted { color: var(--muted); }
.modal-sub { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ---------------- 层级树交互（教材管理 / 磨耳朵 / 任务内容选择） ---------------- */
/* 默认只显示顶层：双击行展开下级、再双击收起；单击行选中 */
.tree-row { cursor: pointer; }
.tree-row:hover td { background: #F5F8FF; }
.tree-row.row-sel td { background: #EAF1FF; }
.tree-row.row-sel td:first-child b { color: #2B4ACB; }
.tw {
  display: inline-block; width: 20px; text-align: center;
  color: #7A8699; font-weight: 700; user-select: none;
}
.tw.leaf { color: #C9D2E0; }

/* 层级序号徽标（树形结构行首 1/2/3）：不同层级不同颜色，1 红 / 2 橙 / 3 绿 / 4+ 紫 */
.lvb {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  border-radius: 4px; color: #fff; font-size: 11px; font-weight: 700;
  text-align: center; margin-right: 6px; vertical-align: 1px;
}
.lvb.c1 { background: #F05060; }
.lvb.c2 { background: #F59E0B; }
.lvb.c3 { background: #10B981; }
.lvb.c4 { background: #8B5CF6; }
