/* ============ 云课堂 全局样式（移动优先） ============ */
:root {
  --primary: #4F86F7;
  --primary-dark: #3A6DE0;
  --success: #22C55E;
  --danger: #EF4444;
  --warn: #F59E0B;
  --bg: #F3F5FA;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-2: #6B7280;
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(17, 24, 39, .07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.5;
  touch-action: manipulation;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
/* 统一线性图标 */
.ci { display: inline-block; vertical-align: -2px; flex: none; }
a { color: var(--primary); text-decoration: none; }

/* 布局 */
#app { min-height: 100vh; }
.page { max-width: 1080px; margin: 0 auto; padding: 16px 16px 90px; }
.page.full { max-width: none; padding-bottom: 16px; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topbar .btn { white-space: nowrap; }
.topbar .brand { font-weight: 700; font-size: 17px; color: var(--primary); }
.topbar .spacer { flex: 1; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid.c2 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .grid.c4 { grid-template-columns: repeat(4, 1fr); }
}

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card-title { font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.card .muted { color: var(--text-2); font-size: 13px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; cursor: pointer;
  padding: 10px 16px; min-height: 44px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 15px;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #EEF2FF; color: var(--primary); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.success { background: var(--success); }
.btn.danger { background: var(--danger); }
.btn.warn { background: var(--warn); }
.btn.big { padding: 14px 22px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 44px; min-width: 44px; padding: 0; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; background: #fff; color: var(--text); outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.field textarea { min-height: 90px; resize: vertical; }

/* 标签 */
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: #EEF2FF; color: var(--primary);
}
.tag.gray { background: #F3F4F6; color: var(--text-2); }
.tag.green { background: #DCFCE7; color: #15803D; }
.tag.red { background: #FEE2E2; color: #B91C1C; }
.tag.orange { background: #FEF3C7; color: #B45309; }

/* 列表项 */
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
}
.item:last-child { border-bottom: none; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* 头像 */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}

/* 空状态 */
.empty { text-align: center; color: var(--text-2); padding: 40px 0; }
.empty .icon { font-size: 40px; margin-bottom: 8px; }

/* 底部导航（学生） */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; height: 60px; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 11px; gap: 2px;
}
.tabbar a.active { color: var(--primary); }
.tabbar a .t-icon { font-size: 20px; }

/* Toast */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 999; width: max-content; max-width: 90vw; }
.toast {
  background: rgba(17, 24, 39, .92); color: #fff; border-radius: 10px;
  padding: 10px 18px; margin-bottom: 8px; font-size: 14px;
  animation: fadeIn .2s; text-align: center;
}
.toast.error { background: rgba(220, 38, 38, .95); }
.toast.success { background: rgba(22, 163, 74, .95); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--card); border-radius: 14px; padding: 20px;
  width: 100%; max-width: 440px; max-height: 85vh; overflow: auto;
  animation: pop .18s;
}
.modal h3 { margin: 0 0 12px; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============ 课堂直播间 ============ */
.live-wrap { min-height: 100vh; display: flex; flex-direction: column; background: #101728; color: #E7EAF3; }
.live-main { flex: 1; display: flex; min-height: 0; }
.live-stage { flex: 1; padding: 20px; overflow: auto; min-width: 0; }
.live-side {
  width: 340px; flex: none; background: #17203A; display: flex; flex-direction: column;
  border-left: 1px solid #232E4D;
}
@media (max-width: 900px) {
  .live-side { width: 100%; border-left: none; }
  .live-main { flex-direction: column; }
  .live-side { max-height: 45vh; }
}
.live-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #17203A; border-bottom: 1px solid #232E4D;
}
.live-badge {
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.live-code { font-size: 20px; font-weight: 800; letter-spacing: 4px; color: #FFD34D; }
.stage-title { text-align: center; font-size: 22px; font-weight: 800; margin: 12px 0 18px; }

/* 题目大屏 */
.quiz-stage .q-stem { font-size: 20px; font-weight: 700; margin-bottom: 16px; white-space: pre-wrap; }
.opt-bar-row { margin-bottom: 10px; }
.opt-bar { position: relative; background: #1E2A4A; border-radius: 10px; overflow: hidden; height: 52px; display: flex; align-items: center; }
.opt-bar .fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #4F86F7aa, #4F86F7); transition: width .5s; }
.opt-bar.correct .fill { background: linear-gradient(90deg, #22C55Eaa, #22C55E); }
.opt-bar .opt-label { position: relative; padding: 0 14px; display: flex; gap: 10px; align-items: center; width: 100%; }
.opt-key { background: #FFFFFF22; border-radius: 8px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.opt-text { flex: 1; }
.opt-count { font-weight: 700; color: #FFD34D; }

/* 学生答题卡 */
.ans-card .opt-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #1E2A4A; border: 2px solid transparent; color: #E7EAF3;
  border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; font-size: 16px; text-align: left;
}
.ans-card .opt-btn.picked { border-color: var(--primary); background: #25355F; }
.ans-card .opt-btn.correct { border-color: var(--success); background: #16311f; }
.ans-card .opt-btn.wrong { border-color: var(--danger); background: #331818; }
.big-fab {
  width: 120px; height: 120px; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #FF7A59, #E8442E);
  color: #fff; font-size: 22px; font-weight: 800; margin: 30px auto; display: block;
  box-shadow: 0 0 0 12px #E8442E33, 0 8px 30px #E8442E66;
  animation: fabPulse 1.2s infinite;
}
@keyframes fabPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.big-fab:disabled { animation: none; opacity: .4; }

/* 弹幕层 */
.danmaku-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.danmaku-item {
  position: absolute; white-space: nowrap; padding: 4px 12px;
  background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; font-size: 14px;
  animation: dm 8s linear forwards;
}
@keyframes dm {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* 聊天区 */
.chat-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; }
.chat-msg { margin-bottom: 8px; font-size: 14px; word-break: break-all; }
.chat-msg .name { color: #7EA6FF; font-weight: 600; margin-right: 6px; }
.chat-msg.teacher .name { color: #FFD34D; }
.chat-msg .bubble { background: #1E2A4A; display: inline-block; padding: 4px 10px; border-radius: 8px; }
.chat-msg.pinned { background: #2A2410; border-left: 3px solid #FFD34D; padding: 4px 8px; border-radius: 6px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #232E4D; }
.chat-input input { flex: 1; background: #1E2A4A; border: 1px solid #2E3C63; color: #fff; border-radius: 8px; padding: 10px 12px; outline: none; }

/* 排行榜 */
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.lb-row .rank { width: 34px; text-align: center; font-weight: 800; }
.lb-row.top1 .rank { color: #FFD34D; font-size: 18px; }
.lb-row.top2 .rank { color: #C0C8D8; font-size: 17px; }
.lb-row.top3 .rank { color: #E8A25C; font-size: 17px; }
.lb-row .bar-wrap { flex: 1; height: 22px; background: #1E2A4A; border-radius: 999px; overflow: hidden; }
.lb-row .bar { height: 100%; background: linear-gradient(90deg, #4F86F7, #7EA6FF); border-radius: 999px; transition: width .5s; }

/* 控制面板（教师） */
.ctrl-panel { padding: 12px; overflow-y: auto; }
.ctrl-block { background: #17203A; border: 1px solid #232E4D; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ctrl-block h4 { margin: 0 0 8px; font-size: 14px; color: #9FB0D0; }
.ctrl-block .btn { width: 100%; margin-bottom: 8px; }
.ctrl-row { display: flex; gap: 8px; }
.ctrl-row .btn { margin-bottom: 0; }
/* 结束游戏：全宽、醒目、始终在可视区内 */
.ctrl-end-btn { height: 42px; margin-top: 10px; font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.ctrl-tip { font-size: 12px; line-height: 1.7; color: #9FB0D0; }

/* 统计数字 */
.stat-num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-2); }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-align: center; }

/* 登录页 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #4F86F7 0%, #7EA6FF 100%); }
.auth-card { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 20px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl th { color: var(--text-2); font-weight: 600; font-size: 13px; }
.tbl-scroll { overflow-x: auto; }

/* 抢答结果横幅 */
.race-banner {
  background: linear-gradient(90deg, #E8442E, #FF7A59); border-radius: 14px;
  padding: 16px; text-align: center; font-size: 18px; font-weight: 800; color: #fff;
  animation: pop .3s;
}
.rollcall-banner {
  background: linear-gradient(90deg, #7C3AED, #A78BFA); border-radius: 14px;
  padding: 16px; text-align: center; font-size: 18px; font-weight: 800; color: #fff; animation: pop .3s;
}

/* 进度条 */
.progress { height: 10px; background: #E5E7EB; border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }

/* 杂项 */
.flex { display: flex; align-items: center; gap: 8px; }
.flex1 { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.right { text-align: right; }
.center { text-align: center; }
.w100 { width: 100%; }
.pointer { cursor: pointer; }
.qr-img { width: 200px; height: 200px; display: block; margin: 10px auto; border-radius: 8px; }
.code-big { font-size: 34px; font-weight: 900; letter-spacing: 8px; color: var(--primary); text-align: center; }

/* ===== 课堂小游戏 ===== */
.ctrl-select, .ctrl-input {
  width: 100%; margin-bottom: 8px; background: #1E2A4A; color: #E7EAF3;
  border: 1px solid #2E3C63; border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none;
}
.ctrl-select:focus, .ctrl-input:focus { border-color: #4F86F7; }

/* 排序挑战 */
.order-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.order-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: #1E2A4A; border: 1px solid #2E3C63; border-radius: 12px;
  color: #E7EAF3; font-size: 16px; font-weight: 700;
  animation: chipIn .45s both;
}
.order-chip.correct { background: #16311F; border-color: #22C55E; color: #86EFAC; }
.order-chip.correct .idx {
  display: inline-flex; width: 24px; height: 24px; border-radius: 50%;
  background: #22C55E; color: #06210F; align-items: center; justify-content: center; font-size: 13px;
}
.order-pick { display: flex; flex-direction: column; gap: 8px; }
.order-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; background: #1E2A4A; border: 1px solid #2E3C63; border-radius: 12px;
  color: #E7EAF3; font-size: 15px; cursor: pointer; transition: all .18s;
}
.order-item:hover { border-color: #4F86F7; }
.order-item.picked { border-color: #4F86F7; background: #25355F; }
.order-item.correct { border-color: #22C55E; background: #16311F; color: #86EFAC; cursor: default; }
.order-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF14;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.order-item.picked .order-no { background: #4F86F7; color: #fff; }
.order-item.correct .order-no { background: #22C55E; color: #06210F; }

/* 概念连线 */
.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col-title { font-size: 12px; color: #9FB0D0; font-weight: 700; margin-bottom: 8px; text-align: center; }
.match-cell {
  display: block; width: 100%; text-align: left; margin-bottom: 8px; padding: 11px 12px;
  background: #1E2A4A; border: 1px solid #2E3C63; border-radius: 10px;
  color: #E7EAF3; font-size: 14px; line-height: 1.35;
}
button.match-cell.pick { cursor: pointer; transition: all .18s; }
button.match-cell.pick:hover { border-color: #4F86F7; }
button.match-cell.pick.sel { border-color: #4F86F7; background: #25355F; box-shadow: 0 0 0 2px #4F86F755; }
button.match-cell.pick.done { border-color: #22C55E; background: #16311F; color: #86EFAC; }
.match-answer {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 6px;
  background: #1E2A4A; border-radius: 10px; font-size: 14px; color: #E7EAF3;
}
.match-answer .left { font-weight: 700; color: #7EA6FF; }
.match-answer .arrow { color: #9FB0D0; }
.match-answer .right { color: #E7EAF3; }
.match-answer.mine { background: #17203A; border: 1px solid #2E3C63; }

/* 词云 */
.wc-cloud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 18px; padding: 20px; min-height: 120px;
}
.wc-word {
  color: #7EA6FF; font-weight: 800; line-height: 1.1;
  animation: chipIn .5s both; white-space: nowrap;
}
.wc-word:nth-child(3n) { color: #FFD34D; }
.wc-word:nth-child(4n) { color: #86EFAC; }
.wc-word:nth-child(5n) { color: #F0A6FF; }
.wc-count { font-size: .4em; color: #9FB0D0; margin-left: 1px; }

/* 课堂盲盒 */
.mystery-stat { font-size: 14px; color: #FFD34D; font-weight: 700; margin-left: 10px; }
.box-grid { display: grid; grid-template-columns: repeat(3, minmax(96px, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto; }
.box-grid.student { grid-template-columns: repeat(3, minmax(88px, 1fr)); max-width: 100%; }
.mystery-box {
  min-height: 108px; padding: 12px 8px; border-radius: 14px; text-align: center;
  background: #1E2A4A; border: 1px solid #2E3C63; color: #E7EAF3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  animation: chipIn .35s both;
}
.mystery-box.closed { cursor: pointer; background: linear-gradient(160deg, #24335C, #1A2440); }
.mystery-box.closed:hover { border-color: #FFD34D; transform: translateY(-2px); transition: all .18s; }
.mystery-box.closed .box-icon { font-size: 30px; animation: boxFloat 2.2s ease-in-out infinite; }
.mystery-box.mine { border-color: #FFD34D; box-shadow: 0 0 0 2px #FFD34D44; }
.mystery-box.claimed { border-color: #4F86F7; }
.mystery-box.answered { border-color: #22C55E55; }
.mystery-box.revealed { min-height: 0; align-items: stretch; text-align: left; gap: 6px; }
.box-icon { font-size: 26px; }
.box-no { font-size: 11px; color: #9FB0D0; }
.box-title { font-size: 13px; font-weight: 800; }
.box-owner { font-size: 12px; color: #9FB0D0; }
.box-owner.correct { color: #86EFAC; }
.box-owner.wrong { color: #FCA5A5; }
.box-points { font-size: 13px; font-weight: 800; color: #FFD34D; }
.box-points.task { color: #7EA6FF; }
.box-points.correct { color: #22C55E; }
.box-points.wrong { color: #EF4444; }
.box-points.pending { color: #9FB0D0; font-weight: 500; }
.box-q { font-size: 12px; line-height: 1.45; color: #C9D6F2; }
.box-answer { font-size: 12px; color: #86EFAC; margin-top: 4px; }
@keyframes boxFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }

/* 课堂小纸条：匿名便签墙 */
.note-count { font-size: 14px; color: #FFD34D; font-weight: 700; margin-left: 10px; }
.note-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px;
  max-width: 880px; margin: 16px auto; align-items: start;
}
.note-wall.student { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-width: 100%; }
.sticky-note {
  position: relative; min-height: 116px; padding: 16px 14px 10px; border-radius: 4px;
  color: #2B2B2B; box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; gap: 8px; animation: notePop .4s both;
  transition: transform .18s, box-shadow .18s;
}
.sticky-note:hover { transform: rotate(0deg) translateY(-2px) scale(1.02) !important; box-shadow: 0 10px 22px rgba(0, 0, 0, .38); z-index: 3; }
.sticky-note.c0 { background: #FFE68A; }
.sticky-note.c1 { background: #A7E8A2; }
.sticky-note.c2 { background: #9FD8FF; }
.sticky-note.c3 { background: #FFC2D1; }
.sticky-note.c4 { background: #D6C7FF; }
.sticky-note.c5 { background: #FFD3A6; }
.sticky-note.pinned {
  grid-column: span 2; transform: rotate(0deg) !important;
  box-shadow: 0 0 0 3px #FFD34D, 0 10px 24px rgba(0, 0, 0, .4); z-index: 2;
}
.sticky-note.pinned .note-text { font-size: 20px; font-weight: 800; }
.note-text { font-size: 15px; line-height: 1.5; word-break: break-word; flex: 1; white-space: pre-wrap; }
.note-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(0, 0, 0, .45); }
.note-pin { color: #7A5B00; cursor: pointer; font-weight: 700; }
.note-pin:hover { text-decoration: underline; }
.note-del { position: absolute; top: 4px; right: 7px; color: rgba(0, 0, 0, .3); cursor: pointer; font-size: 13px; }
.note-del:hover { color: #D22; }
.note-empty { grid-column: 1 / -1; text-align: center; color: #9FB0D0; padding: 34px 0; }
.note-input {
  width: 100%; background: #1E2A4A; color: #fff; border: 1px solid #2E3C63;
  border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; resize: vertical;
}
.note-input:focus { outline: none; border-color: #4F86F7; }
@keyframes notePop {
  from { opacity: 0; transform: translateY(10px) scale(.9); }
  to { opacity: 1; }
}

/* 课堂积分 */
.my-points {
  cursor: pointer; background: #2A3A66; color: #FFD34D; border-radius: 999px;
  padding: 4px 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.my-points:hover { background: #34477D; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: #C7D3EE; padding: 5px 0; cursor: pointer;
}
.switch-row input { width: 38px; height: 20px; accent-color: #4F86F7; cursor: pointer; }
.points-overlay {
  position: fixed; inset: 0; background: rgba(8, 12, 24, .78);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.points-card {
  width: min(680px, 94vw); max-height: 86vh; overflow: auto;
  background: #141D33; border: 1px solid #2A3A66; border-radius: 18px;
  padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.points-head { display: flex; align-items: center; gap: 10px; }
.points-head h3 { flex: 1; margin: 0; font-size: 20px; color: #fff; }
.points-badge {
  background: #FFD34D; color: #3A2B00; border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 800;
}
.points-close { background: none; border: none; color: #9FB0D0; font-size: 20px; cursor: pointer; }
.points-close:hover { color: #fff; }
.points-tabs { display: flex; gap: 8px; margin: 14px 0 10px; }
.points-tabs button {
  flex: 1; background: #1E2A4A; color: #9FB0D0; border: 1px solid #2E3C63;
  border-radius: 10px; padding: 8px; cursor: pointer; font-size: 14px;
}
.points-tabs button.on { background: #2F4B8F; color: #fff; border-color: #4F86F7; font-weight: 700; }
.points-list { display: flex; flex-direction: column; gap: 6px; }
.points-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; background: #1A2440;
}
.points-row.me { background: #26365F; box-shadow: inset 0 0 0 1px #4F86F7; }
.points-rank { width: 30px; text-align: center; font-weight: 900; color: #9FB0D0; font-size: 15px; }
.points-row:nth-child(1) .points-rank { color: #FFD34D; }
.points-row:nth-child(2) .points-rank { color: #C9D6EA; }
.points-row:nth-child(3) .points-rank { color: #E0A06A; }
.points-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #E7EAF3; font-weight: 600; }
.points-sub { color: #7E8DB0; font-size: 12px; white-space: nowrap; }
.points-val { width: 64px; text-align: right; font-size: 20px; font-weight: 900; color: #FFD34D; }
.points-empty { text-align: center; color: #9FB0D0; padding: 26px 0; }
.points-tip { margin-top: 12px; color: #7E8DB0; font-size: 12px; line-height: 1.6; }

@keyframes chipIn {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 520px) {
  .match-cols { grid-template-columns: 1fr; }
  .order-chip { padding: 8px 14px; font-size: 15px; }
  .box-grid, .box-grid.student { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mystery-box { min-height: 88px; padding: 8px 6px; }
  .mystery-box.closed .box-icon { font-size: 24px; }
  .box-title { font-size: 12px; }
  .note-wall, .note-wall.student { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sticky-note { min-height: 96px; padding: 12px 10px 8px; }
  .sticky-note.pinned { grid-column: span 2; }
  .sticky-note.pinned .note-text { font-size: 17px; }
  .note-text { font-size: 14px; }
  .points-card { padding: 14px; }
  .points-sub { display: none; }
  .points-val { width: 52px; font-size: 17px; }
}

/* ================= 课堂大屏（投影模式） ================= */
.screen-page {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 15% 0%, #E8F0FF 0%, transparent 60%),
    radial-gradient(900px 520px at 92% 100%, #F3E8FF 0%, transparent 55%),
    #F7F9FE;
  color: #1F2937; overflow: hidden;
}
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 36px 10px; }
.screen-brand { display: flex; align-items: center; gap: 14px; }
.screen-logo { font-size: 34px; }
.screen-class { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.screen-sub { font-size: 13px; color: #7B8794; margin-top: 2px; }
.screen-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.screen-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: #fff;
  border: 1px solid #E3E8F4; font-size: 15px; font-weight: 600; color: #44506B;
  box-shadow: 0 4px 14px rgba(31, 45, 80, .06);
}
.screen-pill.online { color: #0B7A4B; background: #EEFCF4; border-color: #C9F0DC; }
.screen-pill.online i { width: 9px; height: 9px; border-radius: 50%; background: #12B76A; display: inline-block; animation: scPulse 1.6s infinite; }
.screen-pill.code { background: #EEF3FF; border-color: #D6E2FF; color: #2B4AB3; letter-spacing: 2px; }
.screen-pill.phase { background: #FFF7E8; border-color: #FFE7BB; color: #9A5B00; }
.screen-btn { border: none; background: #2F4AB8; color: #fff; padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.screen-btn:hover { background: #26399A; }
@keyframes scPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.screen-main {
  flex: 1; min-height: 0; overflow: auto;
  padding: 10px 330px 92px 44px;
  display: flex; flex-direction: column; justify-content: center;
}

.sc-kicker {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 18px; font-weight: 800; color: #2F4AB8;
  background: #EAF0FF; border-radius: 999px; padding: 8px 18px; margin-bottom: 18px;
}
.sc-center, .sc-game { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; width: 100%; }
.sc-center .sc-kicker, .sc-game .sc-kicker { align-self: center; }
.sc-big { font-size: 110px; font-weight: 900; color: #2F4AB8; line-height: 1; }
.sc-big small { font-size: 36px; color: #7B8794; margin-left: 6px; }
.sc-bar { width: min(720px, 70vw); height: 18px; background: #E6ECF8; border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.sc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4C6EF5, #22B8CF); border-radius: 999px; transition: width .4s; }
.sc-sub { font-size: 18px; color: #6B778C; }
.sc-sub.center { text-align: center; }
.sc-sub b { color: #2F4AB8; }
.sc-empty { font-size: 20px; color: #98A2B3; padding: 36px 0; }

.sc-hero { text-align: center; }
.sc-hero-icon { font-size: 64px; margin-bottom: 8px; }
.sc-hero h1 { font-size: 52px; margin: 0 0 10px; font-weight: 900; letter-spacing: 2px; }
.sc-hero p { font-size: 20px; color: #6B778C; margin: 0; }
.sc-hero-stats { display: flex; gap: 20px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.sc-hero-stats > div { background: #fff; border: 1px solid #E6EBF6; border-radius: 18px; padding: 18px 34px; box-shadow: 0 10px 30px rgba(31, 45, 80, .07); }
.sc-hero-stats b { display: block; font-size: 34px; color: #2F4AB8; }
.sc-hero-stats span { font-size: 14px; color: #7B8794; }

.sc-quiz { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 1120px; margin: 0 auto; }
.sc-row-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sc-row-top .sc-kicker { margin-bottom: 0; }
.sc-timer { font-size: 22px; font-weight: 800; color: #E8590C; background: #FFF3E8; border-radius: 999px; padding: 6px 16px; }
.sc-question { font-size: 44px; line-height: 1.35; font-weight: 800; margin: 0; color: #1F2937; }
.sc-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.sc-opt {
  display: flex; align-items: center; gap: 16px; background: #fff;
  border: 2px solid #E3E9F6; border-radius: 16px; padding: 20px 22px;
  font-size: 24px; font-weight: 600; box-shadow: 0 6px 18px rgba(31, 45, 80, .05);
}
.sc-opt > i {
  width: 40px; height: 40px; border-radius: 12px; background: #EEF3FF; color: #2F4AB8;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-weight: 800; font-size: 20px; flex: none;
}
.sc-opt.right { border-color: #12B76A; background: #F0FCF6; }
.sc-opt.right > i { background: #12B76A; color: #fff; }
.sc-opt > em { font-style: normal; color: #12B76A; font-size: 24px; font-weight: 800; margin-left: auto; }
.sc-opt .sc-count { color: #7B8794; font-size: 16px; font-weight: 600; margin-left: auto; }
.sc-explain { margin-top: 10px; background: #FFF9E6; border: 1px solid #FFE7BB; border-radius: 14px; padding: 16px 20px; font-size: 19px; color: #7A4B00; }
.sc-explain b { margin-right: 10px; }
.sc-texts { display: flex; flex-direction: column; gap: 10px; }
.sc-text { background: #fff; border: 1px solid #E6EBF6; border-radius: 12px; padding: 12px 16px; font-size: 18px; text-align: left; }
.sc-text b { color: #2F4AB8; margin-right: 6px; }

.sc-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 1000px; }
.sc-chip { background: #fff; border: 2px solid #E3E9F6; border-radius: 12px; padding: 14px 22px; font-size: 22px; font-weight: 600; }
.sc-order {
  text-align: left; font-size: 22px; line-height: 1.9; color: #1F2937;
  background: #fff; border-radius: 16px; padding: 14px 26px 14px 52px;
  box-shadow: 0 10px 30px rgba(31, 45, 80, .07); max-width: 900px;
}
.sc-order li::marker { color: #2F4AB8; font-weight: 800; }
.sc-match { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: min(900px, 80vw); }
.sc-col { display: flex; flex-direction: column; gap: 10px; }
.sc-col span { background: #fff; border: 2px solid #E3E9F6; border-radius: 12px; padding: 12px 16px; font-size: 20px; }
.sc-pairs { display: flex; flex-direction: column; gap: 10px; width: min(900px, 80vw); }
.sc-pair { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #E6EBF6; border-radius: 12px; padding: 12px 18px; font-size: 20px; }
.sc-pair em { color: #12B76A; font-style: normal; }
.sc-pair b { color: #2F4AB8; }

.sc-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; max-width: 900px; padding: 16px; }
.sc-cloud span { font-weight: 800; line-height: 1.1; }
.sc-cloud small { font-size: .45em; color: #98A2B3; margin-left: 3px; font-weight: 700; }

.sc-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: min(760px, 70vw); }
.sc-box {
  aspect-ratio: 1.15 / 1; background: #fff; border: 2px dashed #C9D6F5; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 18px; box-shadow: 0 8px 22px rgba(31, 45, 80, .06);
}
.sc-box .sc-gift { font-size: 52px; }
.sc-box i { font-style: normal; font-size: 14px; color: #98A2B3; }
.sc-box.claimed { border-style: solid; border-color: #FFD8A8; background: #FFF9F0; }
.sc-box.answered { border-style: solid; border-color: #C9F0DC; background: #F2FCF7; }
.sc-box b { font-size: 20px; color: #1F2937; }
.sc-box span { font-size: 16px; color: #6B778C; }
.sc-reveal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-height: 60vh; overflow: auto; padding-right: 6px; text-align: left; }
.sc-card { background: #fff; border: 1px solid #E6EBF6; border-radius: 14px; padding: 14px 16px; box-shadow: 0 6px 16px rgba(31, 45, 80, .05); }
.sc-card h3 { font-size: 18px; margin: 0 0 8px; }
.sc-card p { font-size: 15px; line-height: 1.5; margin: 4px 0; color: #44506B; }
.sc-card .sc-answer { color: #0B7A4B; font-weight: 600; }
.sc-card-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #7B8794; margin-bottom: 6px; }
.sc-card-top em { font-style: normal; background: #EEF3FF; color: #2F4AB8; border-radius: 999px; padding: 2px 8px; }
.sc-card-top b { margin-left: auto; color: #E8590C; font-size: 16px; }

.sc-notes { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-height: 58vh; overflow: auto; padding: 10px 6px; max-width: 1100px; }
.sc-note {
  width: 200px; min-height: 130px; padding: 16px 16px 12px; border-radius: 4px;
  font-size: 17px; line-height: 1.5; text-align: left; color: #3B2F1E;
  box-shadow: 0 8px 20px rgba(31, 45, 80, .12); word-break: break-word;
  background: #FFF3BF;
}
.sc-note.c0 { background: #FFF3BF; }
.sc-note.c1 { background: #FFD8D8; }
.sc-note.c2 { background: #D8F5E3; }
.sc-note.c3 { background: #DCE7FF; }
.sc-note.c4 { background: #F3E0FF; }
.sc-note.c5 { background: #FFE8CC; }

.sc-survey { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 1040px; margin: 0 auto; }
.sc-survey-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-height: 58vh; overflow: auto; }
.sc-bars { display: flex; flex-direction: column; gap: 10px; }
.sc-bar-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.sc-bar-row .sc-bar { flex: 1; width: auto; height: 16px; margin: 0; }
.sc-bar-row em { font-style: normal; width: 36px; text-align: right; color: #44506B; font-weight: 700; }
.sc-bar-row span { width: 18px; color: #7B8794; }
.sc-avg { font-size: 16px; color: #2F4AB8; }

.screen-qr {
  position: fixed; right: 32px; bottom: 64px; width: 250px; z-index: 40;
  background: #fff; border: 1px solid #E7ECF7; border-radius: 20px;
  padding: 16px 16px 12px; text-align: center;
  box-shadow: 0 18px 50px rgba(31, 45, 80, .18);
}
.screen-qr img { width: 100%; border-radius: 10px; display: block; }
.sc-qr-title { font-size: 18px; font-weight: 800; color: #1F2937; margin-bottom: 10px; }
.sc-qr-code { margin-top: 8px; font-size: 14px; color: #7B8794; }
.sc-qr-code b { color: #2F4AB8; letter-spacing: 2px; font-size: 17px; }
.sc-qr-hint { margin-top: 4px; font-size: 12px; color: #98A2B3; }

.sc-race {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%);
  background: #FFF3E8; border: 2px solid #FFC078; color: #9A4A00;
  font-size: 26px; font-weight: 800; padding: 16px 36px; border-radius: 999px;
  box-shadow: 0 14px 40px rgba(154, 74, 0, .18); z-index: 45;
}

.sc-points { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); }
.sc-points-card { width: min(1000px, 88vw); max-height: 82vh; background: #fff; border-radius: 24px; padding: 28px 34px; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.sc-points-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sc-points-head h2 { font-size: 30px; margin: 0; }
.sc-points-close { cursor: pointer; font-size: 22px; color: #98A2B3; padding: 6px 10px; }
.sc-points-list { overflow: auto; }
.sc-points-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 14px; font-size: 20px; }
.sc-points-row:nth-child(odd) { background: #F8FAFE; }
.sc-points-row.top { background: linear-gradient(90deg, #FFF7E0, #FFFDF6); }
.sc-points-rank { width: 44px; height: 44px; border-radius: 50%; background: #EEF3FF; color: #2F4AB8; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.sc-points-row:nth-child(1) .sc-points-rank { background: #FFD43B; color: #7A4B00; }
.sc-points-row:nth-child(2) .sc-points-rank { background: #DEE2E6; color: #495057; }
.sc-points-row:nth-child(3) .sc-points-rank { background: #FFC078; color: #7A3E00; }
.sc-points-name { font-weight: 700; }
.sc-points-sub { color: #7B8794; font-size: 14px; }
.sc-points-val { margin-left: auto; font-size: 26px; font-weight: 900; color: #2F4AB8; }

.screen-foot {
  position: fixed; left: 0; right: 0; bottom: 0; height: 44px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; font-size: 13px; color: #8A94A6;
  background: linear-gradient(0deg, rgba(247, 249, 254, .96), rgba(247, 249, 254, 0));
}

@media (max-width: 1100px) {
  .screen-main { padding: 10px 250px 92px 28px; }
  .screen-qr { width: 200px; right: 18px; }
  .screen-class { font-size: 20px; }
  .sc-question { font-size: 34px; }
  .sc-options { grid-template-columns: 1fr; }
  .sc-opt { font-size: 20px; padding: 14px 16px; }
  .sc-big { font-size: 84px; }
  .sc-boxes { width: min(560px, 80vw); }
  .sc-reveal-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .screen-head { padding: 14px 18px 6px; }
  .screen-meta { display: none; }
  .screen-main { padding: 8px 18px 72px; }
  .screen-qr { display: none; }
  .sc-hero h1 { font-size: 34px; }
  .sc-question { font-size: 26px; }
  .sc-boxes { width: 100%; }
  .sc-points-card { padding: 18px; }
  .sc-points-sub { display: none; }
}

/* ---------- 一次扫码加入课堂 ---------- */
.join-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(160deg,#EEF3FF 0%,#F7F9FC 45%,#EAF7F0 100%);padding:24px;font-family:inherit}
.join-card{width:100%;max-width:400px;background:#fff;border-radius:22px;box-shadow:0 18px 50px rgba(31,60,120,.12);padding:30px 24px 26px;text-align:center}
.join-logo{font-size:44px;line-height:1}
.join-title{font-size:24px;margin:8px 0 18px;color:#12203C}
.join-class{font-size:22px;font-weight:800;color:#12203C}
.join-meta{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 22px;color:#6B7A99;font-size:13px}
.join-pill{background:#E8F7EE;color:#16A34A;border-radius:999px;padding:3px 10px;font-size:12px;font-weight:700}
.join-field{text-align:left;margin-bottom:14px}
.join-field label{display:block;font-size:13px;color:#5B6B8C;margin-bottom:6px}
.join-field input{width:100%;height:48px;border:1.5px solid #DCE4F2;border-radius:12px;padding:0 14px;font-size:16px;background:#F8FAFE;color:#12203C;outline:none;box-sizing:border-box}
.join-field input:focus{border-color:#4F86F7;background:#fff}
.join-btn{width:100%;height:50px;border:0;border-radius:14px;background:linear-gradient(90deg,#4F86F7,#6A5BFF);color:#fff;font-size:17px;font-weight:800;letter-spacing:1px;cursor:pointer}
.join-btn:disabled{opacity:.6}
.join-tip{font-size:12px;color:#8B9AB8;margin-top:12px}
.join-login{display:inline-block;margin-top:14px;font-size:13px;color:#4F86F7;cursor:pointer}
.join-sub{color:#6B7A99;font-size:14px}
.join-error{color:#D14343;font-size:14px;line-height:1.6;margin:12px 0;background:#FFF5F5;border:1px solid #F8D7DA;border-radius:12px;padding:12px}
.join-error-tip{color:#8A6D6D;font-size:12px;margin-top:4px}
.join-retry{margin-top:10px;border:1px solid #F0B4B4;background:#fff;color:#D14343;border-radius:10px;padding:8px 16px;font-size:13px;font-weight:700;cursor:pointer}
.join-offline{margin:12px 0;background:#FFF8E8;border:1px solid #F5DFA8;color:#8A6A1F;border-radius:12px;padding:10px 12px;font-size:13px;line-height:1.6}
.join-link{color:#4F86F7;font-size:14px;cursor:pointer;text-decoration:none}
.join-foot{position:fixed;bottom:18px;font-size:12px;color:#93A2BE}

/* ---------- 学生互动中心 ---------- */
.stu-home{padding:8px 4px 24px;max-width:760px;margin:0 auto}
.stu-hero{background:linear-gradient(135deg,#3B6EF6 0%,#6A5BFF 55%,#8B5CF6 100%);border-radius:20px;padding:20px;color:#fff;box-shadow:0 14px 34px rgba(70,100,240,.35)}
.stu-hero-top{display:flex;justify-content:space-between;align-items:center;font-size:12px;opacity:.92}
.stu-live i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#7CF7B0;margin-right:6px;box-shadow:0 0 0 4px rgba(124,247,176,.18)}
.stu-online{background:rgba(255,255,255,.16);padding:2px 9px;border-radius:999px}
.stu-hero-name{font-size:23px;font-weight:900;margin-top:10px}
.stu-hero-hello{font-size:13px;opacity:.85;margin-top:4px}
.stu-stats{display:flex;gap:10px;margin-top:16px}
.stu-stats>div{flex:1;background:rgba(255,255,255,.14);border-radius:12px;padding:10px 8px;text-align:center}
.stu-stats b{display:block;font-size:20px;line-height:1.2}
.stu-stats span{font-size:11px;opacity:.85}
.stu-sec{display:flex;align-items:baseline;gap:8px;color:#E7EAF3;font-size:15px;font-weight:800;margin:20px 4px 10px}
.stu-sec-tip{font-size:11px;font-weight:400;color:#8B9AB8}
.stu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stu-grid.two{grid-template-columns:repeat(2,1fr)}
.stu-tile{display:flex;flex-direction:column;align-items:flex-start;gap:4px;background:#17203A;border:1px solid #253153;border-radius:14px;padding:12px;color:#E7EAF3;text-align:left;min-height:96px;font-family:inherit;cursor:pointer;transition:transform .12s,border-color .12s}
.stu-tile:active{transform:scale(.97)}
.stu-tile .stu-ic{font-size:22px;line-height:1.1}
.stu-tile .stu-nm{font-size:14px;font-weight:800}
.stu-tile .stu-st{font-size:11px;color:#8B9AB8}
.stu-tile.on{border-color:#4F86F7;background:linear-gradient(160deg,#1E2C55,#22306B);box-shadow:0 0 0 2px rgba(79,134,247,.25),0 10px 24px rgba(40,80,200,.25)}
.stu-tile.on .stu-st{color:#93C5FD}
.stu-tile.small{min-height:78px}
@media (max-width:420px){ .stu-grid{grid-template-columns:repeat(2,1fr)} }

/* ---------- 按需课堂码 ---------- */
.qr-float{position:fixed;right:28px;bottom:28px;width:250px;background:#fff;border-radius:16px;padding:14px;box-shadow:0 18px 50px rgba(0,0,0,.35);z-index:60;color:#12203C;text-align:center}
.qr-float-head{display:flex;justify-content:space-between;align-items:center;font-size:14px;margin-bottom:8px}
.qr-float-x{border:0;background:#EEF2FA;color:#5B6B8C;border-radius:50%;width:24px;height:24px;cursor:pointer}
.qr-float-img{width:100%;border-radius:10px;display:block}
.qr-float-code{font-weight:800;margin-top:8px}
.qr-float-tip{font-size:11px;color:#7C8DB0;margin-top:4px}
.sc-qr-close{position:absolute;top:8px;right:8px;border:0;background:#EEF2FA;color:#5B6B8C;border-radius:50%;width:26px;height:26px;cursor:pointer}

.qr-float-ops{display:flex;gap:6px;align-items:center}
.qr-float-refresh{border:0;background:#EEF2FA;color:#4F6B99;border-radius:999px;padding:3px 9px;font-size:11px;cursor:pointer}
.qr-float-url{font-size:11px;color:#7C8DB0;word-break:break-all;margin-top:6px;line-height:1.4}
.sc-qr-refresh{margin-top:8px;border:0;background:#EEF2FA;color:#4F6B99;border-radius:999px;padding:4px 12px;font-size:12px;cursor:pointer}

/* 断线/重连状态条 */
.conn-bar{display:flex;align-items:center;gap:8px;justify-content:center;padding:6px 12px;font-size:12.5px;
  background:#3A2A12;color:#FFD34D;border-bottom:1px solid #5A4420}
.conn-bar.clickable{cursor:pointer;background:#4A2412;color:#FFB27A}
.conn-bar.clickable:active{filter:brightness(1.15)}
.conn-dot{width:7px;height:7px;border-radius:50%;background:#FFD34D;animation:connPulse 1.1s infinite}
@keyframes connPulse{0%,100%{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}

/* ---------- 手速挑战 / 数字炸弹 / Emoji 猜词 ---------- */
.speed-stage{display:flex;flex-direction:column;align-items:center;gap:8px;margin:18px auto 10px}
.speed-light{font-size:72px;line-height:1;filter:drop-shadow(0 0 18px rgba(255,80,80,.45))}
.speed-light.go{animation:speedPop .5s ease-out infinite alternate;filter:drop-shadow(0 0 24px rgba(34,197,94,.7))}
.speed-text{font-size:18px;font-weight:900;color:#9FB0D0;letter-spacing:1px}
.speed-text.go{color:#22C55E;font-size:26px}
.speed-text.early{color:#FCA5A5}
.speed-btn{display:block;margin:8px auto 0;width:100%;max-width:340px;height:88px;border:0;border-radius:22px;
  background:#24335C;color:#9FB0D0;font-size:22px;font-weight:900;font-family:inherit;letter-spacing:2px;cursor:pointer;transition:all .12s}
.speed-btn.go{background:linear-gradient(135deg,#22C55E,#16A34A);color:#fff;
  box-shadow:0 0 0 6px rgba(34,197,94,.18),0 12px 28px rgba(34,197,94,.35);transform:scale(1.02)}
.speed-btn.bad{background:#3A1F26;color:#FCA5A5}
.speed-btn:disabled{opacity:.55;cursor:default}
@keyframes speedPop{from{transform:scale(1)}to{transform:scale(1.08)}}
.speed-result-list{max-width:520px;margin:14px auto 0}
.speed-row{display:flex;align-items:center;gap:10px;padding:10px 14px;margin-bottom:8px;background:#1E2A4A;
  border:1px solid #2E3C63;border-radius:12px;font-size:14px;color:#E7EAF3}
.speed-row .rank{flex:none;width:24px;height:24px;border-radius:50%;background:#2A3A66;color:#93C5FD;
  display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:12px}
.speed-row .nm{flex:1;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.speed-row .ms{color:#9FB0D0;font-size:13px}
.speed-row .pt{color:#FFD34D;font-weight:900}
.speed-row.hit{border-color:#22C55E;background:#16311F}
.speed-row.early{opacity:.6}
.num-input{width:100%;background:#1E2A4A;color:#fff;border:1px solid #2E3C63;border-radius:14px;padding:16px;
  font-size:20px;text-align:center;font-weight:800;font-family:inherit;outline:none}
.num-input:focus{border-color:#4F86F7}
.num-input:disabled{opacity:.6}
.num-bomb{font-size:76px;font-weight:900;color:#FFD34D;text-align:center;line-height:1.1;
  text-shadow:0 0 30px rgba(255,211,77,.4);animation:chipIn .4s both}
.emoji-clue{font-size:64px;text-align:center;line-height:1.2;margin:16px 0 4px;letter-spacing:6px;animation:chipIn .35s both}
.emoji-clue.small{font-size:44px;margin:8px 0 0}
.emoji-answer{font-size:30px;font-weight:900;color:#FFD34D;text-align:center}

/* 大屏：新游戏 */
.sc-speed-signal{font-size:96px;line-height:1;margin-top:10px;animation:speedPop 1s ease-in-out infinite alternate}
.sc-bomb-num{font-size:120px;font-weight:900;line-height:1;color:#FFD34D;text-shadow:0 0 60px rgba(255,211,77,.45)}
.sc-emoji-clue{font-size:110px;line-height:1.2;letter-spacing:10px;text-align:center}
.sc-emoji-clue.small{font-size:74px}
.sc-rank-list{width:min(760px,92vw);margin-top:14px}
.sc-rank-row{display:flex;align-items:center;gap:14px;padding:10px 18px;margin-bottom:8px;background:#17203A;
  border:1px solid #2A3A66;border-radius:12px;color:#E7EAF3;font-size:20px}
.sc-rank-row .rk{width:30px;height:30px;border-radius:50%;background:#2A3A66;color:#93C5FD;
  display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:15px}
.sc-rank-row .nm{flex:1;font-weight:800;text-align:left}
.sc-rank-row .ms{color:#9FB0D0;font-size:17px}
.sc-rank-row .pt{color:#FFD34D;font-weight:900}
.sc-rank-row.hit{border-color:#22C55E;background:#16311F}
.sc-rank-row.early{opacity:.6}

/* 分组词语接龙（学生端） */
.chain-wrap{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.chain-head{text-align:center;padding:4px 0 2px}
.chain-title{display:inline-flex;align-items:center;gap:8px;font-size:19px;font-weight:900;color:#E7EAF3}
.chain-sub{margin-top:4px;font-size:12px;line-height:1.7;color:#9FB0D0}
.chain-my{position:relative;background:#1B2542;border:1px solid #2A3A66;border-radius:16px;padding:14px;
  border-top:3px solid var(--gc,#4F86F7)}
.chain-my-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.chain-badge{font-size:13px;font-weight:800;border-radius:999px;padding:4px 12px}
.chain-count{font-size:12px;color:#9FB0D0}
.chain-preview{background:#131C33;border:1px dashed #2E3C63;border-radius:12px;padding:12px;
  font-size:15px;line-height:1.9;color:#E7EAF3}
.chain-fix{color:#B6C4E2}
.chain-words{color:#FFD34D;font-weight:900;padding:0 2px}
.chain-words.placeholder{color:#5C6C92}
.chain-members{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.chain-member{font-size:11px;color:#9FB0D0;background:#131C33;border:1px solid #2A3A66;border-radius:999px;padding:2px 9px}
.chain-member.done{color:#4ADE80;border-color:rgba(34,197,94,.5);background:#16311F}
.chain-turn{margin-top:14px;font-size:13px;font-weight:700;color:#93C5FD}
.chain-bank{margin-top:10px;display:flex;flex-direction:column;gap:10px}
.chain-bank-row{background:#131C33;border:1px solid #24304F;border-radius:12px;padding:10px 12px}
.chain-bank-name{font-size:12px;font-weight:900;margin-bottom:7px;letter-spacing:1px}
.chain-chips{display:flex;flex-wrap:wrap;gap:7px}
.chain-chip{background:#1E2A4A;border:1px solid #2E3C63;border-radius:999px;color:#D5DEF1;
  font-size:13px;padding:6px 12px;cursor:pointer;transition:all .15s;font-family:inherit}
.chain-chip:hover{border-color:#4F86F7;color:#fff}
.chain-chip.on{background:#4F86F7;border-color:#7EA6FF;color:#fff;font-weight:800}
.chain-input-row{display:flex;gap:8px;margin-top:12px}
.chain-wait{margin-top:12px;text-align:center;font-size:13px;color:#9FB0D0;background:#131C33;
  border:1px dashed #2A3A66;border-radius:10px;padding:10px}
.chain-wait.center{text-align:center;margin-top:0}
.chain-others{background:#182342;border:1px solid #2A3A66;border-radius:14px;padding:12px 14px}
.chain-others-title{font-size:12px;font-weight:800;color:#9FB0D0;margin-bottom:8px;letter-spacing:.5px}
.chain-other{background:#1B2542;border-left:4px solid #4F86F7;border-radius:10px;padding:8px 12px;margin-bottom:8px}
.chain-other:last-child{margin-bottom:0}
.chain-other-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.chain-other-name{font-size:13px;font-weight:900}
.chain-other-tag{font-size:11px;color:#9FB0D0}
.chain-other-tag.done{color:#4ADE80}
.chain-other-words{margin-top:4px;font-size:13px;color:#C7D3EC;line-height:1.6}
.chain-foot{text-align:center;font-size:12px;color:#7A89AC;line-height:1.7}

/* 接龙结果：多组对比 */
.chain-compare{display:flex;flex-direction:column;gap:10px}
.chain-compare-card{background:#1B2542;border:1px solid #2A3A66;border-left:4px solid var(--gc,#4F86F7);
  border-radius:14px;padding:14px}
.chain-compare-card.mine{border-color:#4F86F7;background:#1D2B50;box-shadow:0 0 0 2px rgba(79,134,247,.22)}
.chain-compare-top{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.chain-compare-name{font-size:14px;font-weight:900}
.chain-me-tag{font-size:10px;font-weight:800;color:#93C5FD;background:#1B3A6B;border-radius:999px;padding:2px 8px}
.chain-compare-words{margin-left:auto;font-size:11px;color:#9FB0D0}
.chain-compare-sentence{font-size:15px;line-height:1.9;color:#FFD34D;font-weight:700}

/* 教师端：接龙小组面板 */
.chain-tboard{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:16px}
.chain-tgroup{background:#1B2542;border:1px solid #2A3A66;border-left:4px solid #4F86F7;border-radius:14px;padding:12px}
.chain-tgroup-top{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.chain-tgroup-name{font-size:14px;font-weight:900}
.chain-tgroup-sentence{font-size:14px;line-height:1.85;color:#E7EAF3;word-break:break-word}

/* 大屏：词语接龙 */
.sc-chain-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;
  width:min(1200px,94vw);margin-top:22px}
.sc-chain-card{background:#17203A;border:2px solid #2A3A66;border-radius:16px;padding:16px 18px;text-align:left}
.sc-chain-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.sc-chain-gname{font-size:19px;font-weight:900}
.sc-chain-tag{font-size:13px;color:#9FB0D0}
.sc-chain-tag.done{color:#4ADE80}
.sc-chain-sentence{font-size:22px;line-height:1.75;font-weight:800;color:#FFD34D}

/* 模拟经营（学生端） */
.sim-wrap{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:12px}

/* 阶段进度 */
.sim-head{display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 0 2px}
.sim-stage-dots{display:flex;align-items:center;gap:10px}
.sim-dot{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:800;background:#1E2A4A;color:#7A89AC;border:1px solid #2A3A66;transition:all .2s}
.sim-dot.done{background:#16311F;border-color:#22C55E;color:#4ADE80}
.sim-dot.on{background:#4F86F7;border-color:#7EA6FF;color:#fff;box-shadow:0 0 0 4px rgba(79,134,247,.22)}
.sim-chapter{font-size:13px;color:#9FB0D0;letter-spacing:.5px;display:flex;flex-direction:column;gap:3px}
.sim-chapter b{font-size:14px;color:#E7EAF3;letter-spacing:0}
.sim-chapter span{font-size:12px;color:#8494B8}

/* 顶部：我的公司身份区 */
.sim-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:16px 18px;border-radius:18px;border:1px solid #2E3C63;border-left:4px solid var(--co,#4F86F7);
  background:linear-gradient(135deg,#1E2A4A 0%,#141C33 78%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);overflow:hidden}
.sim-hero::after{content:'';position:absolute;right:-40px;top:-40px;width:130px;height:130px;border-radius:50%;
  background:var(--co,#4F86F7);opacity:.14}
.sim-hero.empty{background:linear-gradient(135deg,#1C2440,#141C33);border-style:dashed}
.sim-hero-main{min-width:0}
.sim-hero-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:#C7D3EC;
  background:rgba(255,255,255,.08);border-radius:999px;padding:3px 10px}
.sim-hero-name{margin-top:8px;font-size:24px;font-weight:900;color:var(--co,#fff);line-height:1.2;
  text-shadow:0 2px 12px rgba(0,0,0,.35)}
.sim-hero.empty .sim-hero-name{color:#9FB0D0;font-size:20px}
.sim-hero-role{display:inline-flex;align-items:center;gap:5px;margin-top:8px;font-size:12px;color:#E7EAF3;
  background:rgba(255,255,255,.1);border-radius:8px;padding:3px 10px}
.sim-hero-side{flex:none;text-align:right}
.sim-hero-total{font-size:26px;font-weight:900;color:#FFD34D;line-height:1.1}
.sim-hero-total small{display:block;margin-top:2px;font-size:10px;font-weight:600;color:#9FB0D0;letter-spacing:1px}

/* 通用内容卡 */
.sim-card{background:#182342;border:1px solid #2A3A66;border-radius:16px;padding:16px}
.sim-card-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:15px;font-weight:800;
  color:#E7EAF3;margin-bottom:12px}
.sim-card-sub{font-size:11px;font-weight:600;color:#9FB0D0;background:#131C33;border-radius:999px;padding:3px 9px}
.sim-scene{font-size:14px;line-height:1.85;color:#D5DEF1}
.sim-task{margin-top:10px;display:flex;align-items:flex-start;gap:6px;font-size:13px;font-weight:700;
  color:#FFD34D;background:rgba(255,211,77,.08);border:1px dashed rgba(255,211,77,.35);
  border-radius:10px;padding:8px 10px;line-height:1.6}
.sim-narr{margin-bottom:10px;margin-top:-2px;display:flex;align-items:flex-start;gap:6px;font-size:13px;
  line-height:1.75;color:#BFE3FF;background:#131C33;border-radius:10px;padding:8px 10px}

/* 决策投票 */
.sim-options{display:flex;flex-direction:column;gap:10px}
.sim-opt{display:flex;align-items:flex-start;gap:12px;text-align:left;background:#1B2542;border:1px solid #2A3A66;
  border-radius:14px;padding:13px 14px;color:#E7EAF3;font-family:inherit;cursor:pointer;transition:all .15s}
.sim-opt:not(:disabled):hover{border-color:#4F86F7;background:#1D2B50}
.sim-opt:not(:disabled):active{transform:scale(.995)}
.sim-opt.picked{border-color:#22C55E;background:#16311F;box-shadow:0 0 0 2px rgba(34,197,94,.2)}
.sim-opt:disabled{opacity:.62;cursor:default}
.sim-key{flex:none;width:26px;height:26px;border-radius:50%;background:#2A3A66;color:#93C5FD;margin-top:1px;
  display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:13px}
.sim-opt.picked .sim-key{background:#22C55E;color:#fff}
.sim-opt-text{flex:1;min-width:0;font-size:14px;line-height:1.55;color:#E7EAF3;display:flex;flex-direction:column;gap:3px}
.sim-opt-text small{color:#9FB0D0;font-size:12px;line-height:1.5}
.sim-check{flex:none;color:#4ADE80;font-weight:900;font-size:16px;line-height:26px}
.sim-vote-state{margin-top:12px;text-align:center;font-size:12px;color:#9FB0D0;background:#131C33;
  border:1px dashed #2A3A66;border-radius:10px;padding:8px}
.sim-vote-state.done{color:#4ADE80;border-color:#22C55E;background:#16311F}

/* 公司看板 */
.sim-companies{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.sim-co{background:#1B2542;border:1px solid #2A3A66;border-radius:12px;padding:10px 12px}
.sim-co.me{border-color:#4F86F7;box-shadow:0 0 0 2px rgba(79,134,247,.25);background:#1D2B50}
.sim-co-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sim-co-name{font-weight:900;font-size:14px}
.sim-total{font-size:13px;font-weight:900;color:#FFD34D}
.sim-metric{display:inline-flex;align-items:center;gap:3px;color:#C7D3EC;font-variant-numeric:tabular-nums}
.sim-metric .ci{color:#7E90B8}
.sim-metrics{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:8px;font-size:11px;color:#C7D3EC;
  padding-top:8px;border-top:1px dashed #2A3A66}

/* 阶段结算 */
.sim-know{font-size:13px;line-height:1.8;color:#D5DEF1;background:#131C33;border-left:3px solid #FFD34D;
  border-radius:8px;padding:10px 12px}
.sim-result-list{margin-top:12px;display:flex;flex-direction:column;gap:6px}
.sim-result-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:12px;color:#C7D3EC;
  padding:7px 0;border-top:1px dashed #2A3A66}
.sim-result-name{font-weight:800;min-width:76px}
.sim-result-choice{color:#9FB0D0}
.sim-delta{font-weight:800;color:#4ADE80}
.sim-delta.minus{color:#F87171}

/* 最终排名 */
.sim-rank{display:flex;flex-direction:column;gap:8px}
.sim-rank-row{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#1E2A4A;
  border:1px solid #2E3C63;border-radius:12px;font-size:14px;color:#E7EAF3}
.sim-rank-row.champion{background:linear-gradient(90deg,#2A2410,#1E2A4A);border-color:#FFD34D;
  box-shadow:0 0 0 1px rgba(255,211,77,.35)}
.sim-rank-row .rank{flex:none;width:26px;height:26px;border-radius:50%;background:#2A3A66;color:#93C5FD;
  display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:12px}
.sim-rank-row.champion .rank{background:#FFD34D;color:#20180A}
.sim-rank-total{margin-left:auto;color:#FFD34D;font-weight:900}

/* 教师端提示 */
.sim-teacher-status{margin-top:8px;font-size:12px;line-height:1.7;color:#9FB0D0}

/* 大屏：模拟经营 */
.sc-sim-scene{width:min(1100px,94vw);font-size:19px;line-height:1.8;color:#D5DEF1;text-align:center;margin-top:14px}
.sc-sim-task{width:min(1100px,94vw);margin-top:12px;display:flex;align-items:center;justify-content:center;gap:8px;
  font-size:17px;font-weight:800;color:#FFD34D;background:rgba(255,211,77,.08);
  border:1px dashed rgba(255,211,77,.35);border-radius:12px;padding:10px 14px}
.sc-sim-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;width:min(1150px,94vw);margin-top:22px}
.sc-sim-card{background:#17203A;border:2px solid #2A3A66;border-radius:14px;padding:14px 16px;text-align:center}
.sc-sim-name{font-size:20px;font-weight:900}
.sc-sim-metrics{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:8px;font-size:16px;color:#C7D3EC}
.sc-sim-total{margin-top:8px;font-size:17px;font-weight:900;color:#FFD34D}

/* 你问我答 */
.qa-box{background:#17203A;border:1px solid #232E4D;border-radius:14px;padding:14px}
.qa-list{display:flex;flex-direction:column;gap:10px;max-height:380px;min-height:120px;overflow:auto;padding-right:2px}
.qa-row{display:flex;gap:10px;padding:10px 12px;background:#1E2A4A;border:1px solid #2E3C63;border-radius:10px}
.qa-row.question{border-left:3px solid #4F86F7}
.qa-row.answer{border-left:3px solid #22C55E;background:#16281F;border-color:#1F4A32}
.qa-ic{flex:none;font-size:17px;line-height:1.5}
.qa-body{min-width:0;flex:1}
.qa-who{font-size:12px;color:#9FB0D0;display:flex;gap:6px;align-items:center;margin-bottom:2px}
.qa-txt{font-size:14px;color:#E7EAF3;line-height:1.75;word-break:break-word;white-space:pre-wrap}
.qa-empty{color:#7E8CAD;font-size:12px;text-align:center;padding:22px 0}
.qa-input{display:flex;gap:8px;margin-top:12px;align-items:flex-end}
.qa-input input,.qa-input textarea{flex:1;min-width:0;background:#1E2A4A;color:#E7EAF3;border:1px solid #2E3C63;border-radius:10px;padding:11px 14px;font-size:14px;line-height:1.6;outline:none}
.qa-input textarea{min-height:78px;resize:vertical}
.qa-input input:focus,.qa-input textarea:focus{border-color:#4F86F7}
/* 教师回答：多行输入框 + 右下发送 */
.qa-ta{min-height:96px;line-height:1.65;resize:vertical;margin-bottom:8px}
.qa-send-row{display:flex;justify-content:flex-end}
.qa-send-row .btn{width:auto;min-width:104px;margin-bottom:0}
.qa-count{margin-left:6px;background:#EF4444;color:#fff;border-radius:9px;font-size:11px;padding:1px 7px;font-weight:700}

/* 课堂进度 / 学习记录 */
.outline-box{background:#17203A;border:1px solid #232E4D;border-radius:14px;padding:6px 12px}
.outline-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-top:1px dashed #24304F;font-size:13px;color:#9FB0D0}
.outline-row:first-child{border-top:0}
.outline-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#33415F}
.outline-row.now{color:#E7EAF3;font-weight:800}
.outline-row.now .outline-dot{background:#FFD34D;box-shadow:0 0 0 3px rgba(255,211,77,.18)}
.outline-row.done .outline-dot,.outline-dot.done{background:#22C55E}
.outline-row.done{color:#8FA6C9}
.outline-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.outline-st{flex:none;font-size:11px;color:#7E8CAD}
.outline-row.now .outline-st{color:#FFD34D}
.stu-home-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:560px){.stu-home-two{grid-template-columns:1fr}}

/* ===== 学习风格测试（Kolb） ===== */
.ls-page{max-width:880px}
.ls-intro-top{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.ls-badge{background:#4F86F7;color:#fff;border-radius:6px;padding:2px 8px;font-size:12px;font-weight:800}
.ls-sub{font-size:12px;color:var(--text-2)}
.ls-title{font-size:22px;margin:4px 0 8px}
.ls-rule{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0;text-align:center}
.ls-rule-item{background:#F6F9FF;border:1px solid #E3EBF7;border-radius:10px;padding:10px 4px}
.ls-rule-item b{display:block;font-size:20px;color:var(--primary)}
.ls-rule-item span{font-size:11px;color:var(--text-2)}
.ls-tipbox{background:#F8FAFD;border:1px dashed #DCE6F5;border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.9;color:#4B5563}
.ls-tipbox b{color:var(--primary)}
.mt8{margin-top:8px}
/* 答题 */
.ls-quiz-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.ls-progress{height:6px;background:#EEF2F7;border-radius:999px;overflow:hidden;margin-bottom:16px}
.ls-progress-bar{height:100%;background:linear-gradient(90deg,#4F86F7,#7EA6FF);transition:width .3s}
.ls-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px;background:#F6F9FF;border:1px solid #E3EBF7;border-radius:8px;padding:8px 12px;margin-bottom:14px;font-size:12px;color:#4B5563}
.ls-legend b{color:var(--primary)}
.ls-legend span{color:#C3CEDA;margin:0 2px}
.ls-q{font-size:17px;font-weight:800;margin-bottom:12px;line-height:1.6}
.ls-opts{display:flex;flex-direction:column;gap:10px}
.ls-opt{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:#fff;transition:border-color .15s,background .15s;cursor:pointer;user-select:none}
.ls-opt:active{background:#EEF4FF}
.ls-opt.done{border-color:#BFD3F5;background:#F6F9FF}
.ls-opt-txt{flex:1;font-size:14px;line-height:1.6}
.ls-ranks{display:flex;gap:6px;flex:none}
.ls-rank{width:34px;height:34px;border-radius:8px;border:1px solid var(--border);background:#fff;color:var(--text-2);font-weight:700;cursor:pointer;padding:0}
.ls-rank:hover{border-color:var(--primary);color:var(--primary)}
.ls-rank.on{background:var(--primary);border-color:var(--primary);color:#fff}
.ls-hint{font-size:12px;color:var(--text-2);margin-top:10px;text-align:center}
.ls-warn{font-size:12px;color:#B45309;background:#FEF3C7;border-radius:8px;padding:6px 10px;margin-top:10px;text-align:center}
.ls-nav{display:flex;gap:10px;margin-top:14px}
.ls-nav .btn{flex:1}
@media (max-width:480px){
  .ls-opt{flex-wrap:wrap}
  .ls-opt-txt{flex:1 1 100%}
  .ls-ranks{width:100%;justify-content:flex-end;margin-top:6px}
}
/* 结果页：复刻参考图 */
.ls-sheet{background:#F7FAFF;border:1px solid #DCE6F5;border-radius:14px;padding:16px;margin-bottom:12px}
.ls-sheet-head{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.ls-sheet-head h2{font-size:20px;margin:0}
.ls-app{font-size:11px;color:#fff;background:#8FB4EC;border-radius:4px;padding:2px 7px;flex:none}
.ls-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
@media (max-width:640px){.ls-cards{grid-template-columns:repeat(2,1fr)}}
.ls-sc{background:#fff;border:1px solid #E3EBF7;border-radius:8px;padding:8px 10px}
.ls-sc-name{font-size:12px;font-weight:700;color:#374151}
.ls-sc-en{font-size:9px;color:#8A9AB3;line-height:1.35;min-height:24px}
.ls-sc-num{font-size:22px;font-weight:900;color:#C0392B;letter-spacing:1px}
.ls-chart-title{font-size:12px;font-weight:700;color:#4B5563;margin:16px 0 0}
.ls-chart{position:relative;height:400px;background:#fff;border:1px solid #E3EBF7;border-radius:6px;overflow:hidden;margin-top:8px}
@media (max-width:640px){.ls-chart{height:300px}}
.ls-quad{position:absolute;width:50%;height:50%;display:flex;align-items:center;justify-content:center}
.ls-quad.tl{left:0;top:0;background:#DCEAD7}
.ls-quad.tr{right:0;top:0;background:#EDE7F3}
.ls-quad.bl{left:0;bottom:0;background:#D9E7F7}
.ls-quad.br{right:0;bottom:0;background:#DFE7F6}
.ls-quad-lb{text-align:center;color:#4A5568;line-height:1.5}
.ls-quad-lb b{display:block;font-size:16px;font-weight:800;color:#4A5568}
.ls-quad-lb span{font-size:11px;color:#5F6B7A}
.ls-axis-x{position:absolute;left:5%;right:5%;top:50%;height:1px;background:#3B4453}
.ls-axis-y{position:absolute;top:5%;bottom:5%;left:50%;width:1px;background:#3B4453}
.ls-axis-x::after{content:'';position:absolute;right:-1px;top:-4px;border-left:8px solid #3B4453;border-top:4px solid transparent;border-bottom:4px solid transparent}
.ls-axis-y::after{content:'';position:absolute;top:-1px;left:-4px;border-bottom:8px solid #3B4453;border-left:4px solid transparent;border-right:4px solid transparent}
.ls-ticks-x{position:absolute;left:5%;right:5%;top:calc(50% + 3px);display:flex;justify-content:space-between;font-size:8px;color:#6B7280;pointer-events:none}
.ls-ticks-y{position:absolute;left:calc(50% - 22px);width:16px;display:flex;flex-direction:column;justify-content:space-between;font-size:8px;color:#6B7280;text-align:right;pointer-events:none}
.ls-ticks-y.top{top:5%;height:44%}
.ls-ticks-y.bottom{top:51%;height:44%}
.ls-axis-lb{position:absolute;font-size:11px;font-weight:800;color:#2563EB}
.ls-lb-left{left:8px;top:calc(50% - 18px)}
.ls-lb-right{right:8px;top:calc(50% - 18px)}
.ls-lb-top{left:calc(50% + 8px);top:6px}
.ls-lb-bottom{left:calc(50% + 8px);bottom:6px}
.ls-dot{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:6px;white-space:nowrap;z-index:2}
.ls-dot i{width:16px;height:16px;border-radius:50%;background:#E74C3C;box-shadow:0 0 0 3px rgba(231,76,60,.22);flex:none}
.ls-dot em{font-style:normal;font-size:12px;font-weight:700;color:#C0392B}
.ls-sheet-foot{text-align:right;font-size:11px;color:#8A9AB3;margin-top:8px}
.ls-desc .ls-type{display:flex;align-items:baseline;gap:10px;margin-bottom:6px}
.ls-type-cn{font-size:20px;font-weight:900;color:var(--primary)}
.ls-type-en{font-size:12px;color:var(--text-2)}
.ls-desc-txt{margin:0 0 10px;font-size:14px;line-height:1.8;color:#374151}
.ls-suggest{background:#F0F7FF;border-left:3px solid var(--primary);border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.8;color:#33507A}
/* 课堂小游戏内的学习风格测试入口 */
.game-ls-box{margin-top:10px;padding:12px;border:1px dashed #3B4E7D;border-radius:12px;background:#141D33}
.game-ls-title{font-size:14px;font-weight:800;color:#E7EAF3;margin-bottom:4px}
.game-ls-desc{font-size:12px;color:#8B9AB8;line-height:1.7;margin-bottom:10px}
.game-ls-box .btn.block{width:100%}
/* ===== 数字大纲（思维导图） ===== */
.mm-page{display:flex;height:calc(100vh - 64px);min-height:520px;background:#F5F6FB;overflow:hidden}
.mm-nav{width:176px;flex:none;display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--border);padding:6px 0 18px;overflow-y:auto}
.mm-nav-top{display:flex;flex-direction:column;padding-bottom:4px}
.mm-nav-item{display:block;width:100%;border:none;background:transparent;text-align:left;padding:9px 16px;
  font-size:13px;line-height:1.4;color:#4A5265;cursor:pointer;white-space:nowrap}
.mm-nav-item:hover{background:#F4F6FB;color:var(--primary)}
.mm-nav-item.active{background:#EDF2FF;color:var(--primary);font-weight:600}
.mm-nav-item:focus-visible,.mm-nav-group-head:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
.mm-nav-group{margin-top:4px}
.mm-nav-group-head{display:flex;align-items:center;justify-content:space-between;width:100%;
  padding:10px 16px 6px;border:none;background:transparent;font-size:12px;font-weight:700;
  letter-spacing:.4px;color:#7A839A;cursor:pointer}
.mm-nav-group-head:hover{color:var(--primary)}
.mm-nav-chevron{font-size:10px;transform:rotate(0deg);transition:transform .2s ease}
.mm-nav-chevron.open{transform:rotate(90deg)}
.mm-nav-children{display:grid;grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.8,.2,1)}
.mm-nav-children.open{grid-template-rows:1fr}
.mm-nav-children-inner{min-height:0;overflow:hidden}
.mm-children{display:grid;grid-template-rows:0fr;transition:grid-template-rows .18s ease}
.mm-children.open{grid-template-rows:1fr}
.mm-children-inner{min-height:0;overflow:hidden}
.mm-tree{width:290px;flex:none;display:flex;flex-direction:column;background:#fff;border-right:1px solid var(--border)}
.mm-tree-head{padding:14px 16px 10px;border-bottom:1px solid var(--border)}
.mm-doc-title{font-weight:700;font-size:15px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mm-doc-sub{margin-top:4px;font-size:12px;color:var(--text-2)}
.mm-tree-tools{display:flex;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border)}
.mm-tree-tools .btn{min-height:30px;padding:4px 10px;font-size:12px}
.mm-tree-list{flex:1;overflow:auto;padding:6px 0 24px}
.mm-row{display:flex;align-items:center;height:32px;padding-right:8px;font-size:13px;color:#3F4759;cursor:pointer;white-space:nowrap}
.mm-row:hover{background:#F4F6FB}
.mm-row.sel{background:#EDF2FF;color:var(--primary);font-weight:600}
.mm-arrow{width:18px;height:18px;flex:none;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:#98A1B5;font-size:11px;cursor:pointer;padding:0;transition:transform .18s ease}
.mm-arrow.open{transform:rotate(90deg)}
.mm-arrow:hover{color:var(--primary)}
.mm-arrow.empty{cursor:default}
.mm-dot{width:8px;height:8px;border-radius:50%;flex:none;margin-left:2px;background:#8B93A8}
.mm-dot.d0{background:#7C6CF0}
.mm-dot.d1{background:var(--primary)}
.mm-dot.d2{background:var(--success)}
.mm-dot.d3{background:var(--warn)}
.mm-row-text{flex:1;margin-left:7px;overflow:hidden;text-overflow:ellipsis}
.mm-row-add{opacity:0;flex:none;border:none;background:transparent;color:var(--primary);font-size:15px;line-height:1;cursor:pointer;padding:2px 4px}
.mm-row:hover .mm-row-add,.mm-row.sel .mm-row-add{opacity:1}
.mm-inline-input{flex:1;min-width:0;margin-left:7px;border:none;outline:none;background:#fff;border-bottom:1px solid var(--primary);font-size:13px;color:inherit;padding:1px 2px}
.mm-canvas{flex:1;position:relative;overflow:hidden;background:#F5F6FB;cursor:grab;min-width:0}
.mm-canvas:active{cursor:grabbing}
.mm-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}
.mm-edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.mm-edges path{fill:none;stroke:#C7CDDE;stroke-width:1.5}
.mm-node{position:absolute;height:38px;display:flex;align-items:center;justify-content:center;padding:0 20px;
  background:#fff;border:1px solid #DCE0EC;border-radius:19px;color:#414A63;font-size:13.5px;
  cursor:pointer;user-select:none;box-shadow:0 1px 3px rgba(30,41,59,.04)}
.mm-node.root{border-color:#8B93F8;background:#F7F6FF;color:#4E56C9;font-weight:600}
.mm-node.sel{border-color:var(--primary);box-shadow:0 0 0 2px rgba(79,134,247,.18)}
.mm-node-text{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mm-node .mm-inline-input{flex:1;margin:0;text-align:center;background:transparent;border-bottom:1px solid var(--primary)}
.mm-node-toggle{position:absolute;right:-9px;top:50%;transform:translateY(-50%);width:16px;height:16px;
  display:flex;align-items:center;justify-content:center;padding:0;border-radius:50%;
  background:#fff;border:1px solid #C3CBDF;color:#6B7280;font-size:10px;line-height:1;cursor:pointer}
.mm-node-add{position:absolute;right:-34px;top:50%;transform:translateY(-50%);width:22px;height:22px;
  display:flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:50%;
  background:var(--primary);color:#fff;font-size:13px;line-height:1;cursor:pointer;box-shadow:0 2px 6px rgba(79,134,247,.35)}
.mm-node:not(.haskids) .mm-node-add{right:-12px}
.mm-toolbar{position:absolute;left:14px;top:14px;display:flex;flex-direction:column;gap:4px;
  background:#fff;border:1px solid var(--border);border-radius:10px;padding:5px;box-shadow:var(--shadow)}
.mm-toolbar button{width:30px;height:30px;display:flex;align-items:center;justify-content:center;
  border:none;border-radius:6px;background:transparent;color:#4B5563;font-size:15px;cursor:pointer}
.mm-toolbar button:hover{background:#F0F3FA;color:var(--primary)}
.mm-savestate{position:absolute;right:14px;top:14px;padding:5px 10px;border-radius:999px;
  background:#fff;border:1px solid var(--border);font-size:12px;color:var(--text-2)}
.mm-savestate.saving{color:var(--warn)}
.mm-savestate.error{color:var(--danger)}
.mm-detail{width:288px;flex:none;display:flex;flex-direction:column;background:#fff;border-left:1px solid var(--border);padding:14px;overflow-y:auto}
.mm-detail-head{font-weight:700;font-size:15px;margin-bottom:12px}
.mm-detail-empty{font-size:13px;line-height:1.8;color:var(--text-2);background:#F8F9FC;border:1px dashed #E1E5F0;border-radius:10px;padding:12px}
.mm-field label{display:block;font-size:12px;color:var(--text-2);margin-bottom:6px}
.mm-field textarea{width:100%;min-height:82px;border:1px solid var(--border);border-radius:10px;padding:10px;
  font-size:14px;line-height:1.6;color:var(--text);resize:vertical;outline:none}
.mm-field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 2px rgba(79,134,247,.12)}
.mm-meta{margin-top:14px}
.mm-meta>div{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px dashed #EEF0F6;font-size:13px}
.mm-meta span{color:var(--text-2)}
.mm-meta b{font-weight:600;color:var(--text)}
.mm-detail-actions{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.mm-detail-actions .btn{min-height:36px;font-size:13px}
.mm-detail-tip{margin-top:16px;font-size:12px;line-height:1.7;color:#9AA3B8}
@media (max-width:1200px){.mm-nav{width:156px}.mm-tree{width:250px}.mm-detail{width:260px}}
@media (max-width:900px){.mm-nav{display:none}.mm-tree{width:230px}.mm-detail{width:240px}}
@media (max-width:720px){
  .mm-page{flex-direction:column;height:auto;overflow:visible}
  .mm-tree{width:auto;flex:none;max-height:240px;border-right:none;border-bottom:1px solid var(--border)}
  .mm-canvas{flex:none;height:440px}
  .mm-detail{width:auto;flex:none;border-left:none;border-top:1px solid var(--border)}
}

/* ============ 学生课堂：左侧大纲 + 右侧工作台（一体化） ============ */
.stu-desk{flex:1;display:flex;flex-direction:row;min-height:0;min-width:0}
.sd-nav{width:230px;flex:none;background:#131B2F;border-right:1px solid #232E4D;
  padding:14px 10px 24px;overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.sd-nav-title{padding:4px 10px 10px}
.sd-course{font-size:15px;font-weight:900;color:#E7EAF3;line-height:1.35}
.sd-course-sub{font-size:11px;color:#8B9AB8;margin-top:3px}
.sd-grp{font-size:11px;font-weight:700;letter-spacing:.5px;color:#7E8CAD;padding:14px 10px 6px}
.sd-item{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border:0;
  border-radius:10px;background:transparent;color:#C9D6F2;font-size:13.5px;line-height:1.4;
  font-family:inherit;text-align:left;cursor:pointer;text-decoration:none;transition:background .12s}
.sd-item:hover{background:#1B2540}
.sd-item.on{background:#2B4FD6;color:#fff;font-weight:800;box-shadow:0 6px 16px rgba(43,79,214,.35)}
.sd-item>span{width:18px;flex:none;text-align:center}
.sd-outline{background:#17203A;border:1px solid #232E4D;border-radius:12px;padding:2px 10px}
.sd-ol-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px dashed #24304F;
  font-size:12.5px;color:#9FB0D0}
.sd-ol-row:first-child{border-top:0}
.sd-dot{width:7px;height:7px;flex:none;border-radius:50%;background:#3B4A6B}
.sd-ol-row.now{color:#E7EAF3;font-weight:800}
.sd-ol-row.now .sd-dot{background:#FFD34D;box-shadow:0 0 0 3px rgba(255,211,77,.18)}
.sd-ol-row.done .sd-dot,.sd-dot.done{background:#22C55E}
.sd-ol-row.now .sd-ol-st{color:#FFD34D}
.sd-ol-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sd-ol-st{flex:none;font-size:11px;color:#7E8CAD}
.sd-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;position:relative}
.sd-main-head{display:flex;align-items:center;gap:10px;padding:12px 16px 8px;flex:none}
.sd-main-title{font-size:15px;font-weight:800;color:#E7EAF3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sd-main-progress{margin-left:auto;flex:none;font-size:12px;color:#8B9AB8}
.sd-back{flex:none;border:1px solid #2E3C63;background:#1B2540;color:#C9D6F2;border-radius:999px;
  padding:5px 12px;font-size:12px;font-family:inherit;cursor:pointer}
.sd-back:hover{border-color:#4F86F7;color:#fff}
.sd-bar{height:6px;margin:0 16px 4px;flex:none;border-radius:999px;background:#1E2A4A;overflow:hidden}
.sd-bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#4F86F7,#8B5CF6);transition:width .4s}
.sd-fabbar{display:flex;justify-content:center;gap:14px;padding:9px 16px;flex:none;
  background:#131B2F;border-top:1px solid #232E4D}
.sd-fabbar button{width:42px;height:42px;border-radius:50%;border:1px solid #2E3C63;background:#1E2A4A;
  font-size:18px;line-height:1;cursor:pointer;transition:transform .12s,border-color .12s}
.sd-fabbar button:hover{border-color:#4F86F7;transform:translateY(-1px)}
.sd-burger{display:none;border:0;background:transparent;color:#E7EAF3;font-size:19px;
  line-height:1;padding:2px 4px;cursor:pointer}
.sd-mask{position:fixed;inset:0;z-index:55;background:rgba(6,10,20,.55)}
@media (max-width:900px){
  .stu-desk{flex-direction:row}
  .sd-burger{display:block}
  .sd-nav{position:fixed;top:0;bottom:0;left:0;z-index:60;transform:translateX(-100%);
    transition:transform .22s ease;box-shadow:12px 0 30px rgba(0,0,0,.4)}
  .sd-nav.open{transform:none}
}
@media (max-width:560px){
  .sd-main-head{padding:10px 12px 6px}
  .sd-bar{margin:0 12px 2px}
  .sd-fabbar{gap:10px;padding:8px 12px}
}
