/* 看板模块样式：仅作用于 .kb-* 与 .kb-stage 内 SVG，不影响原系统 */
/* 看板激活时占满主区：覆盖系统 #content 的 padding，教室舞台铺满 */
body.kb-active #app, body.kb-active #main { overflow:hidden; }
body.kb-active #content { padding:0 !important; overflow:hidden !important; }

.kb-wrap { position:relative; width:100%; height:100%; min-height:0; overflow:hidden; }
.kb-head { position:absolute; left:20px; right:20px; top:8px; z-index:8; display:flex; align-items:flex-start; justify-content:flex-end; gap:12px; padding:0; background:transparent; border:none; box-shadow:none; }
.kb-head > div:first-child { display:none; } /* 系统顶栏已有「看板」标题，避免重复且遮挡教室前墙 */
.kb-title { font-size:16px; font-weight:700; color:var(--ink,#222); text-shadow:0 0 6px #f7f7f5,0 0 12px #f7f7f5; }
.kb-sub { margin-top:2px; font-size:12px; color:var(--ink3,#888); text-shadow:0 0 6px #f7f7f5,0 0 12px #f7f7f5; }
.kb-head-right { display:flex; align-items:center; gap:10px; }
.kb-count { padding:4px 10px; border-radius:999px; background:var(--fill,#f3f3f1); color:var(--ink2,#555); font-size:12px; }
.kb-grid { position:absolute; inset:0; display:grid; grid-template-columns:minmax(0,1fr) 300px; }
.kb-main { position:relative; min-width:0; overflow:hidden; background:#f7f7f5; }
.kb-stage { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; background:#f7f7f5; }
.kb-stage-inner { position:absolute; left:0; top:0; transform-origin:0 0; will-change:transform; }
.kb-stage .scene-svg { display:block; overflow:visible; user-select:none; }
.kb-stage .scene-svg text { font-family:var(--font,inherit); }
.kb-stage .scene-svg .wm { font-size:9.5px; fill:#c4c4c1; letter-spacing:.4px; pointer-events:none; }
.kb-stage .scene-svg .zone-lbl { font-size:11.5px; fill:#b0b0ad; letter-spacing:2px; font-weight:500; pointer-events:none; }
.kb-stage .scene-svg .lbl { font-size:13px; fill:#3b3b3a; font-weight:500; paint-order:stroke; stroke:#fff; stroke-width:3px; stroke-linejoin:round; pointer-events:none; }
.kb-stage .scene-svg .lbl .dtag { font-size:10px; fill:#256abf; font-weight:600; }
.kb-stage .scene-svg .plate { font-size:11px; fill:#5c5c5a; font-weight:500; }
.kb-stage .scene-svg .seatno { font-size:9.5px; fill:#a3a3a0; }
.kb-stage .scene-svg .board-left text, .kb-stage .scene-svg .board-right text { font-family:KaiTi, STKaiti, serif; }
.kb-stage .scene-svg .board-left .lsn-past { opacity:.36; }
.kb-stage .scene-svg .board-left .lsn-now { fill:#ffd76e; font-weight:700; }
.kb-stage .scene-svg .board-left .lsn-future { opacity:.86; }
.kb-stage .seat { cursor:pointer; }
.kb-stage .seat .hit { fill:transparent; }
.kb-stage .seat:hover .hit { fill:rgba(47,127,240,.06); }
.kb-stage .seat .stu { transition:opacity .3s; }
.kb-stage .seat .stu-in { transition:transform .25s cubic-bezier(.3,1.4,.6,1), opacity .3s; }
.kb-stage .seat .face { opacity:0; transition:opacity .18s; }
.kb-stage .seat .head { transition:transform .25s cubic-bezier(.3,1.4,.6,1); transform-box:fill-box; transform-origin:center bottom; }
.kb-stage .seat:hover .face { opacity:1; }
.kb-stage .seat:hover .head { transform:translateY(-3px); }
.kb-stage .seat .arm { opacity:0; }
.kb-stage .seat.empty .add { opacity:0; transition:opacity .15s; }
.kb-stage .seat.empty:hover .add { opacity:1; }
.kb-stage .seat .tint { mix-blend-mode:multiply; pointer-events:none; opacity:.6; }
.kb-stage .seat.ghost .stu-in { opacity:.16; }
.kb-stage .seat.ghost:hover .stu-in { opacity:.32; }
.kb-stage .badge .badge-bg { fill:#222; }
.kb-stage .badge .badge-tx { fill:#fff; font-size:10.5px; font-weight:600; }
.kb-stage .badge.light .badge-bg { fill:#fff; stroke:#dcdcda; }
.kb-stage .badge.light .badge-tx { fill:#222; }
.kb-stage .badge.up .badge-bg { fill:#14b0a6; }
.kb-stage .badge.down .badge-bg { fill:#e5483b; }
.kb-stage .chip .chip-bg { fill:#fff; stroke:#e1e1df; }
.kb-stage .chip .chip-tx { font-size:11px; font-weight:600; fill:#555; }
.kb-stage .chip.green .chip-bg { fill:#e6f5ec; stroke:#9fd6b5; }
.kb-stage .chip.green .chip-tx { fill:#167a45; }
.kb-stage .chip.amber .chip-bg { fill:#fff6e3; stroke:#f3d28d; }
.kb-stage .chip.amber .chip-tx { fill:#a86c00; }
.kb-stage .chip.blue .chip-bg { fill:#e8f1fe; stroke:#a9c9f6; }
.kb-stage .chip.blue .chip-tx { fill:#1f63c7; }
.kb-stage .chip.red .chip-bg { fill:#fdecea; stroke:#f2b2ab; }
.kb-stage .chip.red .chip-tx { fill:#1f63c7; }
.kb-stage .chip.red .chip-tx { fill:#c23a2e; }
.kb-stage .teacher { cursor:pointer; }
.kb-stage .teacher .t-head { transition:transform .3s; transform-box:fill-box; transform-origin:center bottom; }
.kb-stage .teacher:hover .t-head { transform:translateY(-3px); }
.kb-stage .teacher .t-pupil { transition:transform .4s; }
.kb-side { min-width:0; height:100%; overflow-y:auto; padding:62px 14px 22px 4px; display:flex; flex-direction:column; gap:12px; background:var(--bg,#f5f5f4); }
.kb-side::-webkit-scrollbar { width:8px; }
.kb-side::-webkit-scrollbar-thumb { background:#dcdcda; border-radius:8px; border:2px solid var(--bg,#f5f5f4); }
.kb-side-card { background:var(--card,#fff); border:1px solid var(--line,#e8e8e6); border-radius:12px; padding:13px 14px; box-shadow:0 1px 3px rgba(0,0,0,.03); }
.kb-side-title { font-size:13px; font-weight:700; color:var(--ink,#222); margin-bottom:10px; }
.kb-kv { display:flex; justify-content:space-between; gap:10px; font-size:12.5px; line-height:1.9; }
.kb-kv span { color:var(--ink3,#888); }
.kb-kv b { color:var(--ink,#222); font-weight:600; text-align:right; }
.kb-list { display:flex; flex-direction:column; gap:6px; }
.kb-list-row { display:grid; grid-template-columns:24px 1fr auto; gap:8px; align-items:center; font-size:12.5px; }
.kb-list-row span { width:22px; height:22px; display:grid; place-items:center; border-radius:6px; background:var(--fill,#f3f3f1); color:var(--ink2,#555); font-size:11px; }
.kb-list-row b { font-weight:600; }
.kb-list-row em { color:var(--ink3,#999); font-style:normal; font-size:11px; }
.kb-line { font-size:12.5px; color:var(--ink2,#555); line-height:1.6; }
.kb-empty { font-size:12px; color:var(--ink3,#999); padding:4px 0; }
.kb-modal .kb-modal-name { font-size:18px; font-weight:700; margin-bottom:10px; }

/* 学生悬停信息卡：浮层，不参与舞台缩放，不改动教室布局 */
.kb-stu-popup { position:fixed; z-index:900; width:340px; max-height:calc(100vh - 90px); overflow:auto; padding:14px; border:1px solid var(--line,#e8e8e6); border-radius:14px; background:var(--card,#fff); box-shadow:0 14px 40px rgba(0,0,0,.16); color:var(--ink,#222); }
.kb-pop-bridge { position:fixed; z-index:899; background:transparent; pointer-events:auto; }
.kb-stu-popup * { pointer-events:auto; }
.kb-pop-head { display:grid; grid-template-columns:58px minmax(0,1fr); gap:10px; align-items:center; padding-bottom:10px; border-bottom:1px solid var(--line,#eee); }
.kb-pop-ava { width:56px; height:56px; border-radius:50%; overflow:hidden; background:var(--fill,#f3f3f1); }
.kb-pop-ava svg { display:block; width:100%; height:100%; }
.kb-pop-main { min-width:0; }
.kb-pop-name { font-size:17px; font-weight:700; line-height:1.3; }
.kb-pop-meta { margin-top:3px; font-size:12px; color:var(--ink3,#888); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kb-pop-status { margin-top:4px; font-size:12px; color:var(--ink2,#555); }
.kb-pop-status i { display:inline-block; width:7px; height:7px; margin-right:5px; border-radius:50%; background:#16a96b; vertical-align:1px; }
.kb-pop-sec { display:grid; grid-template-columns:42px minmax(0,1fr); gap:6px; margin-top:10px; font-size:12.5px; line-height:1.55; }
.kb-pop-sec-title { color:var(--ink3,#888); font-weight:600; }
.kb-pop-text { color:var(--ink2,#555); overflow-wrap:anywhere; }
.kb-pop-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.kb-pop-stats > div { min-width:0; padding:9px 8px; border-radius:10px; background:var(--fill,#f7f7f5); text-align:center; }
.kb-pop-stats b, .kb-pop-stats span, .kb-pop-stats em { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kb-pop-stats b { font-size:15px; font-weight:700; color:var(--ink,#222); }
.kb-pop-stats span { margin-top:2px; font-size:11px; color:var(--ink3,#999); }
.kb-pop-stats em { margin-top:2px; font-size:10.5px; color:var(--ink3,#999); font-style:normal; }
.kb-pop-actions { display:flex; gap:8px; margin-top:12px; }
.kb-pop-btn { flex:1; min-width:0; height:34px; border:1px solid var(--line,#ddd); border-radius:9px; background:var(--card,#fff); color:var(--ink2,#444); font-size:12.5px; font-weight:600; cursor:pointer; }
.kb-pop-btn:hover { background:var(--fill,#f5f5f3); }
.kb-pop-btn.primary { border-color:var(--primary,#0ea5a4); background:var(--primary,#0ea5a4); color:#fff; }

/* 看板底部浮动工具条：覆盖在教室上，不占舞台尺寸 */
.kb-dock { position:absolute; z-index:9; left:0; right:300px; bottom:16px; display:flex; justify-content:center; gap:8px; padding:0 16px; pointer-events:none; }
.kb-dock button { pointer-events:auto; min-width:80px; height:38px; padding:0 14px; border:1px solid var(--line,#e2e2df); border-radius:999px; background:rgba(255,255,255,.94); color:var(--ink2,#444); font-size:12.5px; font-weight:600; box-shadow:0 5px 18px rgba(0,0,0,.08); cursor:pointer; backdrop-filter:blur(4px); }
.kb-dock button:hover { transform:translateY(-1px); border-color:var(--primary,#0ea5a4); color:var(--ink,#222); }
.kb-dock button.active { border-color:var(--primary,#0ea5a4); background:var(--primary,#0ea5a4); color:#fff; }
.kb-stage.att-mode .seat { cursor:pointer; }
.kb-stage.att-mode .seat:hover .hit { fill:rgba(20,176,166,.10); }
.kb-att-bar { position:absolute; z-index:9; left:0; right:300px; bottom:64px; display:flex; justify-content:center; flex-wrap:wrap; gap:8px 14px; padding:0 16px; color:var(--ink2,#555); font-size:12.5px; pointer-events:none; }
.kb-att-bar[hidden] { display:none; }
.kb-att-bar span { padding:4px 9px; border-radius:999px; background:rgba(255,255,255,.94); box-shadow:0 3px 12px rgba(0,0,0,.06); }
.kb-att-bar b { color:var(--ink,#222); font-size:13px; }
.kb-att-bar .leave b { color:#2f7ff0; }
.kb-att-bar .absent b { color:#e5483b; }
.kb-att-bar .late b { color:#c47d00; }
.kb-att-bar .tip { background:transparent; box-shadow:none; color:var(--ink3,#999); }
.kb-att-badge { position:fixed; z-index:850; min-width:46px; padding:4px 10px; border:1px solid #d7d7d4; border-radius:999px; background:#fff; color:var(--ink,#222); font-size:12px; font-weight:700; text-align:center; box-shadow:0 5px 18px rgba(0,0,0,.12); pointer-events:none; }
.kb-att-badge.leave { border-color:#a9c9f6; background:#e8f1fe; color:#1f63c7; }
.kb-att-badge.late { border-color:#f3d28d; background:#fff6e3; color:#a86c00; }
.kb-att-badge.absent { border-color:#f2b2ab; background:#fdecea; color:#c23a2e; }
.kb-att-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; max-height:360px; overflow:auto; }
.kb-att-grid button { display:flex; align-items:center; gap:7px; min-width:0; height:38px; padding:0 9px; border:1px solid var(--line,#e6e6e3); border-radius:8px; background:var(--card,#fff); color:var(--ink,#222); font-size:12.5px; cursor:pointer; }
.kb-att-grid button:hover { border-color:var(--primary,#0ea5a4); background:var(--fill,#f8f8f6); }
.kb-att-ico { font-size:14px; }

@media (max-width:1180px) {
  .kb-grid { grid-template-columns:minmax(0,1fr) 260px; }
  .kb-side { padding:12px 10px 20px 2px; }
  .kb-title { font-size:14px; }
  .kb-dock { right:260px; }
  .kb-att-bar { right:260px; }
}
@media (max-width:900px) {
  .kb-grid { grid-template-columns:minmax(0,1fr); }
  .kb-side { display:none; }
  .kb-dock { right:0; }
  .kb-att-bar { right:0; bottom:58px; }
  .kb-dock button { min-width:0; padding:0 10px; font-size:11.5px; }
}
