/* 教师工作台 · 设计系统
   风格：教室黑板 + 纸质作业本的温和底色，配合学生喜欢的明快组色。
   所有资源本地化，无外部字体与统计脚本。 */

:root {
  --wb-bg: #f4f2ec;
  --wb-bg-soft: #ece9e0;
  --wb-panel: #ffffff;
  --wb-panel-2: #faf9f5;
  --wb-ink: #1e2430;
  --wb-ink-2: #4b5563;
  --wb-sub: #7a8290;
  --wb-line: #e3ded2;
  --wb-brand: #4f46e5;
  --wb-brand-soft: #eef0ff;
  --wb-board: #1f3b32;
  --wb-board-2: #16302a;
  --wb-chalk: #f3f0e4;
  --wb-chalk-dim: #b9c7bf;
  --wb-danger: #d64545;
  --wb-ok: #1f9d68;
  --wb-warn: #d98324;
  --wb-radius: 18px;
  --wb-radius-sm: 12px;
  --wb-shadow: 0 10px 30px rgba(31, 38, 45, 0.08), 0 2px 6px rgba(31, 38, 45, 0.05);
  --wb-shadow-sm: 0 3px 10px rgba(31, 38, 45, 0.06);
  --wb-g1: #ef7d3b;
  --wb-g2: #2f8fd8;
  --wb-g3: #1fa47a;
  --wb-g4: #9a6ce0;
  --wb-g5: #e05d6f;
  --wb-g6: #d9a520;
  --wb-rail-w: 212px;
  --wb-aisle-w: 16px;
}

html[data-theme="dark"] {
  --wb-bg: #0f1216;
  --wb-bg-soft: #141920;
  --wb-panel: #171d24;
  --wb-panel-2: #1c232c;
  --wb-ink: #e9ecf1;
  --wb-ink-2: #b9c1cc;
  --wb-sub: #8a94a3;
  --wb-line: #28313c;
  --wb-brand: #8b87ff;
  --wb-brand-soft: #232447;
  --wb-board: #10241f;
  --wb-board-2: #0b1b17;
  --wb-chalk: #e9efe6;
  --wb-chalk-dim: #93a89e;
  --wb-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --wb-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(79, 70, 229, 0.07), transparent 62%),
    radial-gradient(900px 480px at -8% 8%, rgba(31, 157, 104, 0.07), transparent 60%),
    var(--wb-bg);
  color: var(--wb-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }

/* ---------- 布局 ---------- */
.wb-app {
  display: grid;
  grid-template-columns: var(--wb-rail-w) minmax(0, 1fr);
  min-height: 100vh;
}

.wb-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--wb-panel);
  border-right: 1px solid var(--wb-line);
}

.wb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 12px;
}

.wb-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #3f3aa8, #6d63ff);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.28);
  flex: none;
}

.wb-brand-mark svg { width: 21px; height: 21px; }

.wb-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.wb-brand-text b { font-size: 15px; letter-spacing: 0.2px; }
.wb-brand-text i {
  font-style: normal;
  font-size: 11px;
  color: var(--wb-sub);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.wb-nav { display: flex; flex-direction: column; gap: 4px; }

.wb-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--wb-ink-2);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.wb-nav-item svg { width: 19px; height: 19px; flex: none; opacity: 0.85; }
.wb-nav-item:hover { background: var(--wb-bg-soft); color: var(--wb-ink); }
.wb-nav-item:active { transform: scale(0.98); }

.wb-nav-item.is-active {
  background: var(--wb-brand-soft);
  color: var(--wb-brand);
  font-weight: 600;
}

html[data-theme="dark"] .wb-nav-item.is-active { color: #b7b3ff; }

.wb-rail-foot { margin-top: auto; padding: 0 8px; }

.wb-friend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--wb-ink-2);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.wb-friend:hover { border-color: var(--wb-brand); color: var(--wb-brand); }
.wb-friend-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--wb-ok);
  box-shadow: 0 0 0 3px rgba(31, 157, 104, 0.14);
}

.wb-rail-note {
  margin: 10px 2px 0;
  font-size: 11px;
  color: var(--wb-sub);
  line-height: 1.6;
}

.wb-main { min-width: 0; display: flex; flex-direction: column; }

.wb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(16px, 3vw, 34px) 10px;
}

.wb-top-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.wb-class-chip,
.wb-week-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  color: var(--wb-ink-2);
  box-shadow: var(--wb-shadow-sm);
}

.wb-week-chip { background: var(--wb-brand-soft); border-color: transparent; color: var(--wb-brand); font-family: inherit; cursor: pointer; }
.wb-week-chip:hover { filter: brightness(0.97); }

.wb-top-actions { display: flex; gap: 8px; }

.wb-icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-ink-2);
  cursor: pointer;
  box-shadow: var(--wb-shadow-sm);
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.wb-icon-btn:hover { color: var(--wb-brand); border-color: var(--wb-brand); }
.wb-icon-btn:active { transform: scale(0.96); }
.wb-icon-btn svg { width: 19px; height: 19px; }
.wb-icon-btn.is-on { color: #fff; background: var(--wb-brand); border-color: var(--wb-brand); }

/* ---------- 视图 ---------- */
.wb-views { padding: 4px clamp(16px, 3vw, 34px) 40px; }

.wb-view { animation: wbFade 0.26s ease; }
.wb-view[hidden] { display: none; }

@keyframes wbFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 今日 Hero ---------- */
.wb-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3vw, 30px) clamp(22px, 3.4vw, 36px);
  border-radius: 24px;
  background:
    radial-gradient(680px 300px at 88% -30%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(150deg, var(--wb-board), var(--wb-board-2));
  color: var(--wb-chalk);
  box-shadow: 0 18px 38px rgba(22, 48, 42, 0.24);
}

.wb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
}

.wb-hero-main { position: relative; z-index: 1; min-width: 0; }

.wb-hero-date {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--wb-chalk-dim);
  font-variant-numeric: tabular-nums;
}

.wb-hero-week {
  margin: 10px 0 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wb-hero-week.is-link { cursor: pointer; }
.wb-hero-week.is-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

.wb-hero-quote {
  margin: 14px 0 0;
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--wb-chalk-dim);
  max-width: 46em;
  line-height: 1.7;
}

.wb-hero-quote::before {
  content: "“";
  margin-right: 2px;
  color: rgba(243, 240, 228, 0.45);
  font-size: 1.3em;
}

.wb-hero-quote::after {
  content: "”";
  margin-left: 2px;
  color: rgba(243, 240, 228, 0.45);
  font-size: 1.3em;
}

.wb-hero-clock {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 6px 4px 18px;
  border-left: 1px solid rgba(243, 240, 228, 0.16);
  flex: none;
}

.wb-clock {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.wb-clock-sec {
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--wb-chalk-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 教室座位 ---------- */
.wb-board {
  margin-top: 20px;
  padding: clamp(16px, 2.4vw, 24px);
  border-radius: 24px;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow);
}

.wb-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wb-board-head h2 { margin: 0; font-size: 17px; letter-spacing: 0.01em; }
.wb-board-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--wb-sub); }

.wb-board-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.wb-board-legend { display: flex; flex-wrap: wrap; gap: 8px; }

.wb-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--wb-sub);
}

.wb-legend-dot { width: 9px; height: 9px; border-radius: 3px; }

.wb-podium {
  margin: 0 auto 16px;
  width: min(320px, 62%);
  padding: 7px 0;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--wb-bg-soft), transparent);
  border: 1px dashed var(--wb-line);
  color: var(--wb-sub);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
}

/* ---------- 今日点名 ---------- */
.wb-roll-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--wb-bg-soft);
}

.wb-roll-bar .wb-btn { margin-top: 0; }
.wb-roll-bar .wb-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.wb-roll-scope {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--wb-sub);
}

.wb-roll-scope .wb-select {
  width: auto;
  margin: 0;
  padding: 5px 26px 5px 9px;
  font-size: 12.5px;
}

.wb-roll-nr {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--wb-ink-2);
  cursor: pointer;
}

.wb-roll-nr input { position: absolute; opacity: 0; pointer-events: none; }
.wb-roll-nr .wb-switch { width: 34px; height: 20px; }
.wb-roll-nr .wb-switch::after { top: 3px; left: 3px; width: 14px; height: 14px; }
.wb-roll-nr input:checked + .wb-switch { background: var(--wb-brand); }
.wb-roll-nr input:checked + .wb-switch::after { transform: translateX(14px); }
.wb-roll-nr input:focus-visible + .wb-switch { outline: 2px solid var(--wb-brand-soft); outline-offset: 2px; }

.wb-roll-bar .wb-roll-week { margin: 0 0 0 auto; }

/* 点名座位特效 */
.wb-seat.is-roll-hit {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--wb-brand);
  background: var(--wb-panel);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.32), 0 10px 22px rgba(31, 38, 45, 0.16);
  z-index: 2;
}

.wb-seat.is-pick-hit {
  animation: wbSeatPick 0.9s ease;
  border-color: var(--wb-brand);
  background: var(--wb-brand-soft);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4), 0 12px 26px rgba(31, 38, 45, 0.18);
  z-index: 3;
}

@keyframes wbSeatPick {
  0% { transform: scale(0.9); }
  40% { transform: scale(1.08); }
  70% { transform: scale(0.99); }
  100% { transform: scale(1); }
}

/* 点名结果条 */
.wb-pickbar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: min(880px, calc(100vw - 32px));
  width: max-content;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow);
  animation: wbPickIn 0.22s ease;
}

.wb-pickbar-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }

.wb-pickbar-kicker {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--wb-sub);
}

.wb-pickbar-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--wb-brand);
  white-space: nowrap;
}

.wb-pickbar-week {
  flex: none;
  align-self: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wb-brand-soft);
  color: var(--wb-brand);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.wb-roll-hint {
  color: var(--wb-brand);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.wb-btn.is-active {
  border-color: var(--wb-brand);
  color: var(--wb-brand);
  background: var(--wb-brand-soft);
}

/* 手动点名：座位进入可点选状态 */
.wb-seats.is-manual .wb-seat {
  cursor: crosshair;
  border-color: color-mix(in srgb, var(--wb-brand) 48%, var(--wb-line));
}
.wb-seats.is-manual .wb-seat:hover {
  border-color: var(--wb-brand);
  box-shadow: 0 0 0 2px var(--wb-brand-soft), 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* 结果条出现时给座位区留出可滚动空间，避免挡住最后一排 */
body.has-pickbar .wb-view[data-view="today"] .wb-seats { padding-bottom: 88px; }

.wb-pickbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.wb-pickbar-ask { font-size: 12.5px; color: var(--wb-sub); }
.wb-pickbar-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.wb-sc-mini { display: none; }

@keyframes wbPickIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wb-seats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr));
  gap: 9px;
}

.wb-seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 56px;
  padding: 7px 7px 7px 10px;
  border-radius: 11px;
  border: 1px solid var(--wb-line);
  border-left: 3px solid var(--seat-color, var(--wb-line));
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  overflow: hidden;
}

.wb-seat:hover {
  transform: translateY(-2px);
  box-shadow: var(--wb-shadow-sm);
  border-color: var(--seat-color, var(--wb-brand));
}

.wb-seat:active { transform: scale(0.98); }

.wb-seat-name {
  display: block;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-seat-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  font-size: 10px;
  color: var(--wb-sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.wb-seat-meta > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 首页考勤：仅异常状态改变座位颜色，正常学生保持小组配色 */
.wb-seat.has-att {
  border-color: color-mix(in srgb, var(--att-color) 58%, var(--wb-line));
  border-left-color: var(--att-color);
  background: color-mix(in srgb, var(--att-color) 12%, var(--wb-panel));
}
.wb-seat.has-att:hover { border-color: var(--att-color); }
.wb-seat.has-att .wb-seat-name { padding-right: 32px; }
.wb-seat-att {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--att-color);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--att-color) 24%, transparent);
}

.wb-seat.is-empty {
  border-style: dashed;
  border-left-width: 2px;
  border-left-color: var(--wb-line);
  background: transparent;
  cursor: default;
  align-items: center;
  justify-content: center;
  color: var(--wb-sub);
  font-size: 12px;
}

.wb-seat.is-empty:hover { transform: none; box-shadow: none; }

/* 过道：由 JS 真正插入一个空列 */
.wb-aisle { width: 100%; }

/* ---------- 空状态 ---------- */
.wb-empty {
  margin-top: 8px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 18px;
  border: 1px dashed var(--wb-line);
  background: var(--wb-panel-2);
  text-align: center;
}

.wb-empty h3 { margin: 0; font-size: 17px; }
.wb-empty p { margin: 8px auto 0; max-width: 42em; font-size: 13px; color: var(--wb-sub); line-height: 1.75; }
.wb-empty-actions { margin-top: 18px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.wb-empty-note { font-size: 12px !important; }

/* ---------- 按钮 ---------- */
.wb-btn {
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-ink);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wb-btn:hover { box-shadow: var(--wb-shadow-sm); }
.wb-btn:active { transform: scale(0.98); }

.wb-btn.primary {
  border-color: transparent;
  background: linear-gradient(140deg, #4f46e5, #6d63ff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.26);
}

.wb-btn.danger {
  border-color: rgba(214, 69, 69, 0.4);
  color: var(--wb-danger);
  background: transparent;
  margin-top: 18px;
}

.wb-foot-note {
  margin: 18px 4px 0;
  font-size: 11.5px;
  color: var(--wb-sub);
  line-height: 1.7;
}

/* ---------- 占位页 ---------- */
.wb-placeholder {
  padding: clamp(26px, 4vw, 48px);
  border-radius: 24px;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-placeholder h2 { margin: 0 0 8px; font-size: 20px; }
.wb-placeholder p { margin: 0; color: var(--wb-sub); font-size: 13.5px; }

.wb-pill {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--wb-brand-soft);
  color: var(--wb-brand);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Toast ---------- */
.wb-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(8px);
  z-index: 90;
  max-width: min(88vw, 460px);
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(30, 36, 48, 0.94);
  color: #f4f5f7;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wb-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 移动端 ---------- */
.wb-bottomnav { display: none; }

@media (max-width: 900px) {
  .wb-app { grid-template-columns: minmax(0, 1fr); --wb-aisle-w: 8px; }
  .wb-rail { display: none; }

  .wb-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  .wb-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--wb-panel) 92%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--wb-line);
  }

  .wb-bottomnav button {
    border: 0;
    background: transparent;
    color: var(--wb-sub);
    font-size: 11.5px;
    padding: 7px 0 5px;
    border-radius: 10px;
    cursor: pointer;
  }

  .wb-bottomnav button.is-active { color: var(--wb-brand); font-weight: 600; }

  .wb-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .wb-hero-clock { border-left: 0; padding: 0; }
  .wb-clock { font-size: 38px; }

  .wb-seats { grid-template-columns: repeat(var(--cols, 8), minmax(52px, 1fr)); gap: 6px; }
  .wb-seat { min-height: 48px; padding: 6px 6px 6px 9px; border-left-width: 3px; }
  .wb-seat-name { font-size: 12px; }
  .wb-seat-meta { display: none; }
}

@media (max-width: 520px) {
  .wb-top { padding: 12px 14px 6px; }
  .wb-views { padding: 4px 14px 30px; }
  .wb-hero { padding: 18px; border-radius: 20px; }
  .wb-hero-week { font-size: 22px; }
  .wb-seats { grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr)); }
  .wb-seat { min-height: 42px; padding: 5px; justify-content: center; align-items: center; }
  .wb-seat-name { font-size: 11px; }
  .wb-podium { width: 70%; }
}

/* ---------- 确认弹框 ---------- */
.wb-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 18, 22, 0.44);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.wb-modal-overlay.is-show { opacity: 1; }

.wb-modal {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 20px;
  background: var(--wb-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}

.wb-modal-overlay.is-show .wb-modal { transform: none; }
.wb-modal h3 { margin: 0; font-size: 17px; }
.wb-modal p { margin: 10px 0 0; font-size: 13px; color: var(--wb-sub); line-height: 1.75; }

.wb-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* 首页座位快捷考勤弹层 */
.wb-attpop {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 20px;
}
.wb-attpop-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 22, 0.46);
  backdrop-filter: blur(3px);
}
.wb-attpop-panel {
  position: relative;
  width: min(430px, 100%);
  padding: 25px;
  border-radius: 22px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  animation: wbAttPopIn 0.2s ease;
}
.wb-attpop-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--wb-bg-soft);
  color: var(--wb-sub);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.wb-attpop-close:hover { color: var(--wb-ink); background: var(--wb-line); }
.wb-attpop-kicker { margin: 0 0 5px; color: var(--wb-brand); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.wb-attpop-panel h3 { margin: 0; padding-right: 32px; font-size: 23px; }
.wb-attpop-current { margin: 7px 0 18px; color: var(--wb-sub); font-size: 12.5px; line-height: 1.6; }
.wb-attpop-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.wb-att-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 66px;
  padding: 9px 5px;
  border: 1px solid var(--wb-line);
  border-radius: 13px;
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.wb-att-choice:hover {
  transform: translateY(-2px);
  border-color: var(--status-color);
  background: color-mix(in srgb, var(--status-color) 8%, var(--wb-panel));
}
.wb-att-choice.is-active {
  border-color: var(--status-color);
  background: color-mix(in srgb, var(--status-color) 13%, var(--wb-panel));
  box-shadow: inset 0 0 0 1px var(--status-color);
}
.wb-att-choice:disabled { opacity: 0.55; cursor: wait; transform: none; }
.wb-att-choice b { color: var(--status-color); font-size: 15px; }
.wb-att-choice small { color: var(--wb-sub); font-size: 10.5px; }
.wb-attpop-hint { margin: 15px 0 0; color: var(--wb-sub); font-size: 11.5px; line-height: 1.7; }
.wb-attpop-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 19px; }
@keyframes wbAttPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 620px) {
  .wb-attpop { place-items: end center; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); }
  .wb-attpop-panel { width: 100%; padding: 22px 18px 18px; border-radius: 20px; }
  .wb-att-choice { min-height: 62px; }
  .wb-seat.has-att .wb-seat-name { padding-right: 0; padding-top: 9px; }
  .wb-seat-att { top: 2px; right: 2px; padding: 0 4px; font-size: 8px; }
}

.wb-btn.danger-solid {
  margin: 0;
  border-color: transparent;
  background: var(--wb-danger);
  color: #fff;
  box-shadow: 0 8px 18px rgba(214, 69, 69, 0.24);
}

/* ---------- 班级页：标签与工具栏 ---------- */
.wb-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-tab {
  border: 0;
  background: transparent;
  color: var(--wb-sub);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.wb-tab:hover { color: var(--wb-ink); }
.wb-tab.is-active { background: var(--wb-brand-soft); color: var(--wb-brand); }
html[data-theme="dark"] .wb-tab.is-active { color: #b7b3ff; }

.wb-pane { animation: wbFade 0.22s ease; }
.wb-pane[hidden] { display: none; }

.wb-pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: var(--wb-radius);
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-bar-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wb-bar-info b { font-size: 15px; }
.wb-bar-info span { font-size: 12.5px; color: var(--wb-sub); }

.wb-bar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.wb-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.wb-btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }

/* 座位排 / 列自定义 */
.wb-seat-grid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--wb-ink-2);
}
.wb-seat-grid > span { color: var(--wb-sub); }
.wb-input-num {
  width: 46px;
  height: 34px;
  padding: 0 4px;
  border: 1px solid var(--wb-line);
  border-radius: 10px;
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  font-family: inherit;
  font-size: 13px;
  text-align: center;
}
.wb-input-num:focus { outline: 2px solid var(--wb-brand-soft); border-color: var(--wb-brand); }

/* 座位交互态 */
.wb-seat.is-selected {
  outline: 2px solid var(--wb-brand);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--wb-brand-soft);
}

.wb-seat.is-locked { border-style: solid; }
.wb-seat-lock {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 9px;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 4px;
  background: var(--wb-bg-soft);
  color: var(--wb-sub);
}

.wb-seat.is-swappable { cursor: pointer; }
.wb-seat.is-swapping { animation: wbPop 0.28s ease; }

@keyframes wbPop {
  0% { transform: scale(0.94); }
  60% { transform: scale(1.03); }
  100% { transform: none; }
}

/* ---------- 考勤 ---------- */
.wb-status-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.wb-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.wb-status-btn i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-color, var(--wb-sub));
}

.wb-status-btn:hover { border-color: var(--status-color, var(--wb-brand)); }

.wb-status-btn.is-active {
  color: #fff;
  background: var(--status-color, var(--wb-brand));
  border-color: transparent;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--status-color, var(--wb-brand)) 28%, transparent);
}

.wb-status-btn.is-active i { background: #fff; }

.wb-att-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.wb-sum-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  font-size: 12px;
  color: var(--wb-sub);
}

.wb-sum-chip b { font-size: 14px; color: var(--wb-ink); font-variant-numeric: tabular-nums; }

.wb-att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 9px;
}

.wb-att-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--wb-line);
  border-left: 3px solid var(--status-color, var(--wb-line));
  background: var(--wb-panel);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.wb-att-card:hover { transform: translateY(-2px); box-shadow: var(--wb-shadow-sm); }
.wb-att-card:active { transform: scale(0.98); }

.wb-att-name { font-size: 13.5px; font-weight: 600; }
.wb-att-state {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--status-color, var(--wb-sub));
  background: color-mix(in srgb, var(--status-color, var(--wb-sub)) 13%, transparent);
}

.wb-att-card.is-none .wb-att-state { color: var(--wb-sub); background: var(--wb-bg-soft); }

/* ---------- 值日 ---------- */
.wb-duty-week {
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: var(--wb-radius);
  background: linear-gradient(140deg, var(--wb-board), var(--wb-board-2));
  color: var(--wb-chalk);
  box-shadow: 0 14px 30px rgba(22, 48, 42, 0.22);
}

.wb-duty-week b { font-size: 22px; }
.wb-duty-week p { margin: 6px 0 0; font-size: 13px; color: var(--wb-chalk-dim); }

.wb-duty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.wb-duty-card {
  padding: 14px 16px;
  border-radius: var(--wb-radius);
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-duty-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--wb-sub);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.wb-duty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--wb-line);
  font-size: 13px;
}

.wb-duty-row:last-child { border-bottom: 0; }
.wb-duty-row span { color: var(--wb-sub); font-size: 12.5px; }
.wb-duty-row b { font-weight: 600; }

.wb-duty-flag {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--wb-brand-soft);
  color: var(--wb-brand);
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
}

/* 值日分组与岗位设置 */
.wb-duty-config {
  margin-top: 14px;
  border: 1px solid var(--wb-line);
  border-radius: var(--wb-radius);
  background: var(--wb-panel);
  box-shadow: var(--wb-shadow-sm);
  overflow: hidden;
}
.wb-duty-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
}
.wb-duty-config-head h4 { margin: 0; font-size: 14.5px; }
.wb-duty-config-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--wb-sub); }
.wb-duty-config-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wb-duty-block { padding: 14px 16px; min-width: 0; }
.wb-duty-block + .wb-duty-block { border-left: 1px solid var(--wb-line); }
.wb-duty-block-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-duty-block-head b { font-size: 13.5px; }
.wb-duty-block-head .wb-hint { flex: 1; min-width: 0; }
.wb-duty-block-head .wb-select { margin-left: auto; }
.wb-duty-group-list,
.wb-duty-assign-list {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}
.wb-duty-group-row,
.wb-duty-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.wb-duty-group-row > span,
.wb-duty-assign-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-duty-group-row .wb-select,
.wb-duty-assign-row .wb-select { width: 108px; flex: none; }

@media (max-width: 900px) {
  .wb-duty-config-body { grid-template-columns: minmax(0, 1fr); }
  .wb-duty-block + .wb-duty-block { border-left: 0; border-top: 1px solid var(--wb-line); }
}

.wb-duty-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.wb-duty-group {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-sub);
}

.wb-duty-group.is-now {
  background: var(--wb-brand-soft);
  border-color: transparent;
  color: var(--wb-brand);
  font-weight: 600;
}

/* ---------- 积分 / 学生：通用卡片 ---------- */
.wb-card {
  padding: 16px 18px;
  border-radius: var(--wb-radius);
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-sec-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wb-sec-head h2 { margin: 0; font-size: 15.5px; }
.wb-sec-head p { margin: 4px 0 0; font-size: 12px; color: var(--wb-sub); }

.wb-pill-soft {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--wb-bg-soft);
  color: var(--wb-sub);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.wb-empty-mini {
  margin: 0;
  padding: 18px 4px;
  color: var(--wb-sub);
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
}

/* ---------- 积分页 ---------- */
.wb-points-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.wb-points-col { display: flex; flex-direction: column; gap: 14px; }

.wb-tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

.wb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  color: var(--wb-ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.wb-tag b { font-size: 12px; color: var(--wb-ok); font-variant-numeric: tabular-nums; }
.wb-tag.is-neg b { color: var(--wb-danger); }

.wb-tag.is-active {
  background: var(--wb-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.24);
}

.wb-tag.is-active b { color: #fff; }

.wb-pick-tools { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.wb-pick-tools .wb-btn.sm { flex: none; }
.wb-pick-tools #wbQuickSubmit { margin-left: auto; }

.wb-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 7px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.wb-pick {
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  color: var(--wb-ink-2);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.14s ease;
}

.wb-pick:hover { border-color: var(--wb-brand); }
.wb-pick.is-on {
  background: var(--wb-brand-soft);
  border-color: var(--wb-brand);
  color: var(--wb-brand);
  font-weight: 700;
}

.wb-pick-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 1px;
}

.wb-flow { display: flex; flex-direction: column; max-height: 320px; overflow: auto; }

.wb-flow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--wb-line);
  font-size: 13px;
}

.wb-flow-row:last-child { border-bottom: 0; }
.wb-flow-time { flex: none; width: 40px; font-size: 11.5px; color: var(--wb-sub); font-variant-numeric: tabular-nums; }
.wb-flow-name { flex: none; font-weight: 600; }
.wb-flow-label { flex: 1; min-width: 0; color: var(--wb-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-flow-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.wb-flow-delta.pos { color: var(--wb-ok); }
.wb-flow-delta.neg { color: var(--wb-danger); }

.wb-flow-undo {
  flex: none;
  padding: 2px 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--wb-sub);
  font-size: 12px;
  cursor: pointer;
}

.wb-flow-undo:hover { color: var(--wb-danger); background: var(--wb-bg-soft); }

.wb-rank { display: flex; flex-direction: column; gap: 2px; }

.wb-rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.wb-rank-row:hover { background: var(--wb-bg-soft); }
.wb-rank-no { flex: none; width: 22px; text-align: center; font-weight: 700; color: var(--wb-sub); font-variant-numeric: tabular-nums; }
.wb-rank-row:nth-child(1) .wb-rank-no { color: #d9a520; }
.wb-rank-row:nth-child(2) .wb-rank-no { color: #8a94a3; }
.wb-rank-row:nth-child(3) .wb-rank-no { color: #c2703d; }
.wb-rank-name { font-weight: 600; }
.wb-rank-pts { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 学生页 ---------- */
.wb-stu-wrap {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.wb-stu-side { padding: 14px; }

.wb-input {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  margin: 2px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  font-size: 13px;
  font-family: inherit;
}

.wb-input:focus { outline: 2px solid var(--wb-brand-soft); border-color: var(--wb-brand); }

.wb-stu-items { display: flex; flex-direction: column; gap: 2px; max-height: 62vh; overflow: auto; }

.wb-stu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--wb-ink-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.wb-stu-item:hover { background: var(--wb-bg-soft); }
.wb-stu-item.is-active { background: var(--wb-brand-soft); color: var(--wb-brand); font-weight: 700; }
.wb-stu-item-pts { margin-left: auto; font-size: 12px; color: var(--wb-sub); font-variant-numeric: tabular-nums; }
.wb-stu-item.is-active .wb-stu-item-pts { color: var(--wb-brand); }

.wb-stu-detail { min-height: 320px; }

.wb-stu-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.wb-stu-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--seat-color, var(--wb-brand));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.wb-stu-name { margin: 0; font-size: 20px; }
.wb-stu-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--wb-sub); }
.wb-stu-score { margin-left: auto; text-align: right; }
.wb-stu-score b { font-size: 26px; font-variant-numeric: tabular-nums; }
.wb-stu-score span { display: block; font-size: 11.5px; color: var(--wb-sub); }

.wb-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 16px 0;
}

.wb-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--wb-panel-2);
  border: 1px solid var(--wb-line);
}

.wb-stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.wb-stat span { font-size: 11.5px; color: var(--wb-sub); }

.wb-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wb-ink-2);
}

.wb-timeline { display: flex; flex-direction: column; }

.wb-tl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--wb-line);
  font-size: 13px;
}

.wb-tl-row:last-child { border-bottom: 0; }
.wb-tl-date { flex: none; width: 76px; font-size: 11.5px; color: var(--wb-sub); font-variant-numeric: tabular-nums; }
.wb-tl-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wb-report {
  margin-top: 4px;
  padding: 14px;
  border-radius: 12px;
  background: var(--wb-panel-2);
  border: 1px dashed var(--wb-line);
}

.wb-report pre {
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--wb-ink-2);
  white-space: pre-wrap;
}

.wb-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .wb-points-wrap, .wb-stu-wrap { grid-template-columns: minmax(0, 1fr); }
  .wb-stu-items { max-height: 260px; }
}

@media (max-width: 620px) {
  .wb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-pick-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: 260px; }
  .wb-pick-tools #wbQuickSubmit { width: 100%; margin-left: 0; }
}

/* ---------- 设置页 ---------- */
.wb-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.wb-span-2 { grid-column: span 2; }

.wb-form { display: grid; gap: 12px; }

.wb-field {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--wb-sub);
}

.wb-field .wb-input { margin: 6px 0 0; }

.wb-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--wb-sub);
}

.wb-field-hint.is-warn { color: var(--wb-danger); }

.wb-textarea {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
}

.wb-textarea:focus { outline: 2px solid var(--wb-brand-soft); border-color: var(--wb-brand); }

.wb-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.wb-hint { font-size: 11.5px; color: var(--wb-sub); line-height: 1.6; }

.wb-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--wb-ink-2);
  cursor: pointer;
}

.wb-switch-row input { position: absolute; opacity: 0; pointer-events: none; }

.wb-switch {
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--wb-line);
  transition: background 0.2s ease;
}

.wb-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.wb-switch-row input:checked + .wb-switch { background: var(--wb-brand); }
.wb-switch-row input:checked + .wb-switch::after { transform: translateX(18px); }
.wb-switch-row input:focus-visible + .wb-switch { outline: 2px solid var(--wb-brand-soft); outline-offset: 2px; }

/* 隐私模式：投屏时模糊分数 */
html.is-private .wb-seat-meta,
html.is-private .wb-rank-pts,
html.is-private .wb-stu-score b,
html.is-private .wb-stu-item-pts,
html.is-private .wb-stat b,
html.is-private .wb-flow-delta {
  filter: blur(6px);
  user-select: none;
}

@media (max-width: 860px) {
  .wb-settings { grid-template-columns: minmax(0, 1fr); }
  .wb-span-2 { grid-column: auto; }
}

/* ---------- 班级切换 ---------- */
.wb-top-left { position: relative; }

button.wb-class-chip {
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s ease, color 0.18s ease;
}

button.wb-class-chip:hover { border-color: var(--wb-brand); color: var(--wb-brand); }

.wb-class-pop {
  position: absolute;
  top: 38px;
  left: 0;
  z-index: 60;
  min-width: 220px;
  max-width: 300px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  box-shadow: var(--wb-shadow);
}

.wb-class-pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--wb-ink);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.wb-class-pop-item:hover { background: var(--wb-panel-2); }
.wb-class-pop-item i { font-style: normal; font-size: 11px; color: var(--wb-brand); }
.wb-class-pop-item.is-active { background: var(--wb-brand-soft); }

.wb-class-pop-item.is-manage {
  margin-top: 4px;
  border-top: 1px solid var(--wb-line);
  border-radius: 0 0 9px 9px;
  color: var(--wb-brand);
  font-weight: 600;
  justify-content: flex-start;
}

.wb-class-pop-empty { margin: 6px 10px; font-size: 12px; color: var(--wb-sub); }

/* ---------- 班级管理 ---------- */
.wb-class-list { display: grid; gap: 8px; }

.wb-class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel-2);
}

.wb-class-item.is-active { border-color: var(--wb-brand); background: var(--wb-brand-soft); }
.wb-class-item-main { display: grid; gap: 2px; min-width: 0; }
.wb-class-item-main b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-class-item-main span { font-size: 11.5px; color: var(--wb-sub); }
.wb-class-item-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.wb-class-item-actions .wb-btn { margin-top: 0; padding: 6px 12px; font-size: 12px; }

.wb-class-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- 名单管理 ---------- */
.wb-import-row { margin-top: 0; }

.wb-roster-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--wb-line);
}

.wb-roster-tools h3 { margin: 0; font-size: 14px; }
.wb-roster-tools .wb-form-actions { margin-top: 0; }

.wb-roster-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed var(--wb-line);
  background: var(--wb-panel-2);
}

.wb-roster-table { margin-top: 10px; max-height: 330px; overflow: auto; }

.wb-roster-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 72px 90px 64px;
  gap: 8px;
  align-items: center;
  padding: 6px 2px;
}

.wb-roster-row.is-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--wb-panel);
  font-size: 11.5px;
  color: var(--wb-sub);
  font-weight: 600;
  padding-bottom: 4px;
}

.wb-roster-row .wb-input { margin: 0; padding: 7px 9px; font-size: 12.5px; }
.wb-roster-row .wb-btn { margin-top: 0; padding: 7px 10px; font-size: 12px; }

@media (max-width: 620px) {
  .wb-class-new { grid-template-columns: 1fr; }
  .wb-roster-add { grid-template-columns: 1fr 1fr; }
  .wb-roster-row { grid-template-columns: minmax(0, 1fr) 56px 70px 56px; }
}

.wb-print-head { display: none; }

/* ---------- 打印 ---------- */
@media print {
  @page { size: A4 portrait; margin: 12mm; }

  .wb-print-head { display: block; margin-bottom: 12px; }
  .wb-print-head h2 { margin: 0; font-size: 18px; }
  .wb-print-head p { margin: 4px 0 0; font-size: 11px; color: #555; }

  html,
  body { background: #fff !important; }

  /* 打印一律使用浅色变量，避免深色主题打出黑底 */
  html[data-theme] {
    --wb-bg: #fff;
    --wb-bg-soft: #f4f5f7;
    --wb-panel: #fff;
    --wb-panel-2: #fff;
    --wb-ink: #16181c;
    --wb-ink-2: #33373e;
    --wb-sub: #6b7280;
    --wb-line: #dfe2e7;
    --wb-board: #fff;
    --wb-board-2: #fff;
    --wb-chalk: #16181c;
    --wb-chalk-dim: #4b5563;
  }

  .wb-rail, .wb-bottomnav, .wb-tabs, .wb-top, .wb-pane-bar, .wb-top-actions,
  .wb-seat-tip, .wb-foot-note, .wb-toast { display: none !important; }
  .wb-app { display: block; }
  .wb-views { padding: 0 6mm; }
  .wb-view:not([data-view="class"]) { display: none !important; }
  .wb-pane { display: none !important; }
  .wb-pane[data-pane="seats"] { display: block !important; }
  .wb-board { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .wb-seat { break-inside: avoid; box-shadow: none; border: 1px solid #cfd4dc; }
  .wb-seat-name { font-size: 13.5px; }
  .wb-seat-meta { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 大屏模式 ---------- */
.wb-app.is-screen {
  --wb-rail-w: 232px;
  --wb-aisle-w: 24px;
}

/* 大屏下压缩顶部与课程区，确保整张座位表在首屏可见 */
.wb-app.is-screen .wb-hero {
  align-items: center;
  padding: 14px 24px;
  border-radius: 18px;
}
.wb-app.is-screen .wb-hero-main { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.wb-app.is-screen .wb-hero-date { margin: 0; font-size: 12px; }
.wb-app.is-screen .wb-hero-week { margin: 0; font-size: clamp(22px, 2.2vw, 30px); }
.wb-app.is-screen .wb-hero-quote { display: none; }
.wb-app.is-screen .wb-hero-clock { border-left: 0; padding: 0; }
.wb-app.is-screen .wb-clock { font-size: clamp(34px, 3.4vw, 46px); }
.wb-app.is-screen .wb-clock-sec { font-size: 14px; }

.wb-app.is-screen .wb-lessons { margin-top: 10px; }
.wb-app.is-screen .wb-lessons-head { margin-bottom: 4px; }
.wb-app.is-screen .wb-lessons-head h2 { font-size: 13px; }
.wb-app.is-screen .wb-lesson-cards { gap: 8px; }
.wb-app.is-screen .wb-lesson { padding: 6px 12px; border-radius: 12px; }
.wb-app.is-screen .wb-lesson-kicker { margin-bottom: 2px; font-size: 10px; letter-spacing: 0.08em; }
.wb-app.is-screen .wb-lesson h3 { font-size: 15px; }
.wb-app.is-screen .wb-lesson.is-now h3 { font-size: 17px; }
.wb-app.is-screen .wb-lesson.is-break h3 { font-size: 14px; }
.wb-app.is-screen .wb-lesson-meta { margin-top: 2px; font-size: 10.5px; }
.wb-app.is-screen .wb-lesson-status { margin: 3px 0; font-size: 10.5px; }
.wb-app.is-screen .wb-lesson-progress { height: 3px; }
.wb-app.is-screen .wb-lesson-line { display: none; }

.wb-app.is-screen .wb-board { margin-top: 12px; padding: 16px 20px; }
.wb-app.is-screen .wb-board-head { margin-bottom: 8px; }
.wb-app.is-screen .wb-podium { margin-bottom: 10px; padding: 5px 0; }
.wb-app.is-screen .wb-seats { gap: 6px; }
.wb-app.is-screen .wb-seat { min-height: 64px; padding: 7px 10px 7px 13px; }
.wb-app.is-screen .wb-seat-name { font-size: calc(22px * var(--wb-seat-scale, 1)); }
.wb-app.is-screen .wb-seat-meta { gap: 5px; font-size: calc(12px * var(--wb-seat-scale, 1)); }

/* 投屏字号调节（仅大屏模式显示） */
.wb-seat-font {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--wb-line);
  border-radius: 999px;
  background: var(--wb-panel-2);
}
.wb-app.is-screen .wb-seat-font { display: inline-flex; }
.wb-seat-font-btn {
  border: 0;
  background: transparent;
  color: var(--wb-ink-2);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.wb-seat-font-btn:hover:not(:disabled) { background: var(--wb-brand-soft); color: var(--wb-brand); }
.wb-seat-font-btn:disabled { opacity: 0.35; cursor: default; }
.wb-seat-font-val {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  color: var(--wb-sub);
  font-variant-numeric: tabular-nums;
}

/* 高度较小的屏幕（如 1440×900）继续收窄，保证座位表仍能一屏放下 */
@media (max-height: 950px) {
  .wb-app.is-screen .wb-seats { gap: 4px; }
  .wb-app.is-screen .wb-seat { min-height: 56px; padding: 5px 9px 5px 12px; }
  .wb-app.is-screen .wb-seat-name { font-size: calc(18px * var(--wb-seat-scale, 1)); }
  .wb-app.is-screen .wb-seat-meta { font-size: calc(11.5px * var(--wb-seat-scale, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 校历 ---------- */
.wb-cal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 18px;
  align-items: start;
}

.wb-cal-main { padding: 18px 20px 20px; }
.wb-cal-nav { display: flex; align-items: center; gap: 8px; }
.wb-cal-nav .wb-btn { white-space: nowrap; flex: none; }

.wb-icon-btn.sm {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

.wb-cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 8px;
}

.wb-cal-week span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--wb-sub);
}

.wb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.wb-cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 58px;
  padding: 6px 8px;
  border: 1px solid var(--wb-line);
  border-radius: 12px;
  background: var(--wb-panel-2);
  color: var(--wb-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wb-cal-cell:hover { border-color: var(--wb-brand); transform: translateY(-1px); }
.wb-cal-cell.is-blank { border-color: transparent; background: transparent; cursor: default; }
.wb-cal-cell.is-blank:hover { transform: none; }
.wb-cal-cell.is-weekend { background: var(--wb-bg-soft); }
.wb-cal-cell.is-today { border-color: var(--wb-brand); }
.wb-cal-cell.is-selected {
  background: var(--wb-brand-soft);
  border-color: var(--wb-brand);
  box-shadow: inset 0 0 0 1px var(--wb-brand);
}

.wb-cal-num {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.wb-cal-count {
  margin-top: auto;
  font-size: 10px;
  color: var(--wb-sub);
}

.wb-cal-cell.has-note::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wb-warn);
}

.wb-cal-cell.is-holiday {
  background: rgba(214, 69, 69, 0.08);
  border-color: rgba(214, 69, 69, 0.35);
}

.wb-cal-cell.is-holiday .wb-cal-num {
  color: var(--wb-danger);
  text-decoration: line-through;
}

.wb-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--wb-sub);
}

.wb-cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--wb-sub);
}

.wb-cal-dot.is-today { background: var(--wb-brand); }
.wb-cal-dot.is-holiday { background: var(--wb-danger); }
.wb-cal-dot.is-note { background: var(--wb-warn); }

.wb-cal-side { padding: 18px 18px 16px; }
.wb-cal-daystat { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-cal-abnormal {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--wb-danger);
}

.wb-cal-noteadd {
  display: flex;
  gap: 8px;
  margin: 14px 0 10px;
}

.wb-cal-notes { display: flex; flex-direction: column; gap: 8px; }

.wb-cal-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--wb-bg-soft);
  font-size: 13px;
  line-height: 1.5;
}

.wb-cal-note-del {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--wb-sub);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}

.wb-cal-note-del:hover { color: var(--wb-danger); background: rgba(214, 69, 69, 0.1); }

/* ---------- 点名记分 ---------- */
.wb-roll-week { margin: 4px 0 0; font-size: 11.5px; color: var(--wb-sub); }

.wb-score-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-ink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.wb-score-btn b { color: var(--wb-ok); font-variant-numeric: tabular-nums; }
.wb-score-btn.is-neg b { color: var(--wb-danger); }
.wb-score-btn:hover { border-color: var(--wb-brand); color: var(--wb-brand); }
.wb-score-btn:active { transform: scale(0.97); }

/* ---------- 座位拖动 ---------- */
.wb-view[data-view="class"] .wb-seat[data-student] { touch-action: none; cursor: grab; }
.wb-seat.is-dragging { opacity: 0.35; }
.wb-seat.is-drop {
  outline: 2px dashed var(--wb-brand);
  outline-offset: 2px;
}

.wb-drag-ghost {
  position: fixed;
  z-index: 200;
  margin: 0;
  transform: translate(-50%, -50%) rotate(-2deg) scale(1.04);
  box-shadow: var(--wb-shadow);
  pointer-events: none;
  opacity: 0.94;
}

body.is-seat-drag { cursor: grabbing; user-select: none; }

@media (max-width: 960px) {
  .wb-cal { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  .wb-cal-main { padding: 14px; }
  .wb-cal-main .wb-sec-head { flex-wrap: wrap; }
  .wb-cal-main .wb-sec-head > div:first-child { flex: 1 1 100%; }
  .wb-sched .wb-sec-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .wb-sched-actions { width: 100%; }
  .wb-cal-nav { margin-left: auto; }
  .wb-cal-cell { min-height: 46px; padding: 4px 5px; border-radius: 10px; }
  .wb-cal-week, .wb-cal-grid { gap: 5px; }
  .wb-cal-count { display: none; }
  .wb-cal-noteadd { flex-wrap: wrap; }
  .wb-cal-noteadd .wb-input { min-width: 0; flex: 1 1 150px; }
  .wb-roll-bar { gap: 8px; }
}

@media (max-width: 900px) {
  .wb-bottomnav { grid-template-columns: repeat(5, 1fr); }
  .wb-bottomnav button { font-size: 11px; }

  .wb-pickbar {
    left: 12px;
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    transform: none;
    max-width: none;
    width: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main ask"
      "btns skip";
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .wb-pickbar-actions { display: contents; }
  .wb-pickbar-main { grid-area: main; justify-content: flex-start; gap: 6px; min-width: 0; }
  .wb-pickbar-kicker { font-size: 11px; }
  .wb-pickbar-name { font-size: 19px; }
  .wb-pickbar-week { padding: 2px 6px; font-size: 10.5px; }
  .wb-pickbar-ask { grid-area: ask; justify-self: end; font-size: 12px; }
  .wb-pickbar-btns { grid-area: btns; flex-wrap: nowrap; gap: 6px; }
  #wbPickSkip { grid-area: skip; justify-self: end; }
  .wb-pickbar .wb-score-btn { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .wb-sc-full { display: none; }
  .wb-sc-mini { display: inline; }
}

/* ---------- 日历 / 课程表 弹层 ---------- */
.wb-calpop { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }

.wb-calpop-mask { position: absolute; inset: 0; background: rgba(20, 26, 32, 0.45); backdrop-filter: blur(3px); }

.wb-calpop-panel {
  position: relative;
  width: min(1060px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  padding: 22px clamp(16px, 2.5vw, 28px) 26px;
  border-radius: 22px;
  background: var(--wb-bg);
  border: 1px solid var(--wb-line);
  box-shadow: 0 30px 80px rgba(15, 20, 26, 0.35);
  animation: wbCalPopIn 0.2s ease;
}

@keyframes wbCalPopIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.wb-calpop-panel .wb-calview { animation: none; }

.wb-calpop-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  color: var(--wb-ink-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--wb-shadow-sm);
}
.wb-calpop-close:hover { color: var(--wb-danger); border-color: var(--wb-danger); }

@media (max-width: 900px) {
  .wb-calpop { padding: 0; }
  .wb-calpop-panel {
    width: 100%;
    max-height: none;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- 今日课程 ---------- */
.wb-lessons { margin-top: 18px; }

.wb-lessons-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wb-lessons-head h2 { margin: 0; font-size: 15px; }

.wb-lessons-link {
  border: 0;
  background: transparent;
  color: var(--wb-brand);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.wb-lessons-link:hover { background: var(--wb-brand-soft); }

.wb-lesson-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.wb-lesson {
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--wb-radius);
  background: var(--wb-panel);
  border: 1px solid var(--wb-line);
  box-shadow: var(--wb-shadow-sm);
}

.wb-lesson-kicker { margin: 0 0 4px; font-size: 11.5px; letter-spacing: 0.12em; color: var(--wb-sub); }
.wb-lesson h3 { margin: 0; font-size: 20px; }
.wb-lesson-none { color: var(--wb-sub); font-weight: 500; }
.wb-lesson-meta { margin: 4px 0 0; font-size: 12px; color: var(--wb-sub); font-variant-numeric: tabular-nums; }

.wb-lesson.is-now {
  border-color: var(--wb-brand);
  background: linear-gradient(160deg, var(--wb-brand-soft), var(--wb-panel) 72%);
}
.wb-lesson.is-now h3 { color: var(--wb-brand); font-size: 24px; }
.wb-lesson.is-now .wb-lesson-kicker { color: var(--wb-brand); }
html[data-theme="dark"] .wb-lesson.is-now h3,
html[data-theme="dark"] .wb-lesson.is-now .wb-lesson-kicker { color: #b7b3ff; }

.wb-lesson-status { margin: 8px 0 6px; font-size: 12px; color: var(--wb-ink-2); }
.wb-lesson-progress { height: 5px; border-radius: 99px; background: var(--wb-line); overflow: hidden; }
.wb-lesson-progress i { display: block; height: 100%; border-radius: 99px; background: var(--wb-brand); transition: width 0.5s ease; }

.wb-lesson.is-next.is-soon { border-color: var(--wb-warn); }
.wb-lesson.is-next.is-soon .wb-lesson-kicker { color: var(--wb-warn); }
.wb-lesson.is-break { background: var(--wb-panel-2); }
.wb-lesson.is-break h3 { font-size: 18px; }
.wb-lesson.is-empty { grid-column: 1 / -1; }

.wb-lesson-line { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.wb-lesson-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--wb-line);
  background: var(--wb-panel);
  font-size: 11.5px;
  color: var(--wb-ink-2);
}
.wb-lesson-chip b { color: var(--wb-sub); font-weight: 600; }
.wb-lesson-chip i { font-style: normal; color: var(--wb-sub); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.wb-lesson-chip.is-done { opacity: 0.45; }
.wb-lesson-chip.is-now { border-color: var(--wb-brand); color: var(--wb-brand); background: var(--wb-brand-soft); }
.wb-lesson-chip.is-now b,
.wb-lesson-chip.is-now i { color: var(--wb-brand); }

.wb-lesson-chip.is-mode {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--wb-brand) 45%, var(--wb-line));
  color: var(--wb-brand);
  font-weight: 600;
}

/* ---------- 课程表编辑 ---------- */
.wb-sched-actions { display: flex; gap: 8px; flex: none; flex-wrap: wrap; }
.wb-sched-scroll { overflow-x: auto; }

.wb-sched-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.wb-sched-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--wb-ink-2);
  cursor: pointer;
}
.wb-sched-switch input { position: absolute; opacity: 0; pointer-events: none; }
.wb-sched-switch .wb-switch { width: 34px; height: 20px; }
.wb-sched-switch .wb-switch::after { top: 3px; left: 3px; width: 14px; height: 14px; }
.wb-sched-switch input:checked + .wb-switch { background: var(--wb-brand); }
.wb-sched-switch input:checked + .wb-switch::after { transform: translateX(14px); }
.wb-sched-switch input:focus-visible + .wb-switch { outline: 2px solid var(--wb-brand-soft); outline-offset: 2px; }

.wb-sched-alt {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--wb-line);
  border-radius: 999px;
  background: var(--wb-panel-2);
}
.wb-sched-alt-btn {
  border: 0;
  background: transparent;
  color: var(--wb-sub);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.wb-sched-alt-btn.is-active { background: var(--wb-brand); color: #fff; }
.wb-sched-mode { font-size: 11.5px; color: var(--wb-sub); }

.wb-sched-grid {
  display: grid;
  grid-template-columns: 150px repeat(5, minmax(88px, 1fr));
  gap: 6px;
  min-width: 640px;
}

.wb-sched-corner,
.wb-sched-day { padding: 6px 8px; font-size: 12px; color: var(--wb-sub); text-align: center; }
.wb-sched-corner { text-align: left; }
.wb-sched-day { font-weight: 600; color: var(--wb-ink-2); }
.wb-sched-day.is-weekend { color: var(--wb-brand); }

.wb-sched-slot { border: 1px solid var(--wb-line); border-radius: 10px; padding: 6px 8px; background: var(--wb-panel-2); }
.wb-sched-slot.is-named {
  background: var(--wb-brand-soft);
  border-color: color-mix(in srgb, var(--wb-brand) 28%, var(--wb-line));
}
.wb-sched-slot.is-named b { color: var(--wb-brand); }
.wb-sched-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wb-sched-slot-top b { font-size: 12px; }
.wb-sched-del { border: 0; background: transparent; color: var(--wb-sub); cursor: pointer; font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.wb-sched-del:hover { color: var(--wb-danger); background: rgba(214, 69, 69, 0.1); }

.wb-sched-times { display: flex; align-items: center; gap: 2px; margin-top: 4px; color: var(--wb-sub); font-size: 11px; }
.wb-sched-time { flex: 1; width: 0; min-width: 0; border: 0; background: transparent; color: var(--wb-sub); font-family: inherit; font-size: 11px; padding: 1px 0; font-variant-numeric: tabular-nums; }
.wb-sched-time:focus { outline: 1px solid var(--wb-brand); border-radius: 4px; color: var(--wb-ink); }

.wb-sched-cell {
  width: 100%;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--wb-line);
  border-radius: 10px;
  background: var(--wb-panel);
  color: var(--wb-ink);
  font-family: inherit;
  font-size: 13.5px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.wb-sched-cell::placeholder { color: var(--wb-line); }
.wb-sched-cell.is-weekend { background: var(--wb-panel-2); border-color: color-mix(in srgb, var(--wb-brand) 18%, var(--wb-line)); }
.wb-sched-cell:hover { border-color: var(--wb-brand); }
.wb-sched-cell:focus { outline: 2px solid var(--wb-brand-soft); border-color: var(--wb-brand); background: var(--wb-brand-soft); }

.wb-sched-break { grid-column: 1 / -1; text-align: center; font-size: 11px; color: var(--wb-sub); padding: 3px 0; letter-spacing: 0.2em; }

@media (max-width: 620px) {
  .wb-lesson-cards { grid-template-columns: 1fr; gap: 8px; }
  .wb-lesson { padding: 12px 14px; }
  .wb-lesson h3 { font-size: 18px; }
  .wb-lesson.is-now h3 { font-size: 20px; }
  .wb-sched-actions { flex-wrap: wrap; }
}
