/* ============================================================
   班级动态桌面 · 老师发布端（V1.0 移动端样式）
   ============================================================ */

:root {
  --ink: #1f2d3d;
  --muted: #8a97a6;
  --line: #e8edf2;
  --bg: #f5f6f8;
  --card: #ffffff;
  --brand: #2f9e6e;
  --brand-soft: #eafaf2;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #c9871f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.screen { min-height: 100vh; padding-bottom: 86px; }
.hidden { display: none !important; }

/* ---------- 登录页 ---------- */

#screen-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 24px;
  padding: 36px 26px 30px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(25, 42, 60, 0.08);
}

.login-logo {
  width: 58px; height: 58px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2f9e6e, #57c99a);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.login-title { margin: 0; font-size: 18px; font-weight: 800; }
.login-sub { margin: 4px 0 26px; font-size: 13px; color: var(--muted); }

/* ---------- 通用组件 ---------- */

.pin-input {
  width: 100%;
  padding: 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 10px;
  text-indent: 10px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fafbfc;
  transition: border-color 0.15s;
}
.pin-input:focus { border-color: var(--brand); background: #fff; }

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 2px 7px;
}

.textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.55;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}
.textarea:focus { border-color: var(--brand); background: #fff; }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 15.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid #f5c6c8;
}
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; }

/* ---------- 主界面框架 ---------- */

.app-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header-inner {
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
}
.app-class { font-size: 15px; font-weight: 800; }
.app-class small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.header-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px;
}
/* V2.1.7：头部按钮组 + 切换班级高亮（醒目但不抢戏） */
.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.header-btn-accent {
  color: var(--brand);
  border-color: #9fd6bc;
  background: #eef9f3;
  white-space: nowrap;
}
.header-btn:active { transform: scale(0.96); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; border: none; background: transparent;
  padding: 10px 0 12px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .ico { font-size: 20px; line-height: 1; }
.tabbar button.active { color: var(--brand); }

.page { max-width: 520px; margin: 0 auto; padding: 16px 16px 20px; }
.page.hidden { display: none; }

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(25, 42, 60, 0.05);
}

.card-title { margin: 0 0 2px; font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-sub { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.tag {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.gray { background: #eef1f4; color: var(--muted); }

/* ---------- 模块选择 chips ---------- */

.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip {
  border: 1.5px solid var(--line);
  background: #fafbfc;
  border-radius: 12px;
  padding: 9px 4px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}
.chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.chip.chip-danger { border-color: #f5c6c8; color: var(--danger); background: var(--danger-soft); }
.chip.chip-danger.active { border-color: var(--danger); background: var(--danger); color: #fff; }

/* ---------- iOS 分段控件：3 套模板一键切换 ---------- */

.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eef1f4;
  border-radius: 14px;
}
.seg button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 0;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.1s;
}
.seg button:active { transform: scale(0.97); }
.seg button.active {
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(25, 42, 60, 0.10);
}

/* 四段版（日常/冲刺/班务/作业）：手机上四个按钮并排，字号和留白收紧一点，
   保证「📚 作业」在小屏也不换行、不被挤掉 */
.seg--4 button {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 2px;
  font-size: 12px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* ---------- 单行输入框 ---------- */

.text-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fafbfc;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.text-input:focus { border-color: var(--brand); background: #fff; }

/* V2.2.0 纯数字时间框：干掉系统表盘/步进器，数字键盘直输，居中等宽显示 HH:MM */
[data-hms] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  text-align: center;
  font-weight: 800;
  font-family: inherit;
  min-width: 78px;
}
[data-hms]::placeholder { color: #b9c2cc; font-weight: 600; letter-spacing: 0; }

/* ---------- 本周课表编辑器（V2.1.8：5 天页签 + 科目下拉 + 起止时间） ---------- */

/* ---------- V2.1.10 今日临时调课（V2.1.11：表头改警示黄，一眼和正式课表区分） ---------- */
.tto-box {
  border: 1.5px solid #f0cf6b;
  background: linear-gradient(180deg, #fffbea 0%, #fffdf7 100%);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
/* V2.1.11：表头 = 浅黄警示块 + 加粗放大标题，明确写清「仅今天，明天自动恢复」 */
.tto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  background: #fff3bf;
  border: 1.5px solid #f5df8f;
  border-radius: 10px;
  padding: 8px 10px;
}
.tto-title { font-size: 14.5px; font-weight: 900; color: #8a5a00; line-height: 1.45; }
.tto-date {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #8a5a00;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.tto-reset {
  flex: 0 0 auto;
  border: 1.5px solid #e0b95e;
  background: #fff;
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  color: #8a5a00;
  cursor: pointer;
}
.tto-list { display: flex; flex-direction: column; gap: 6px; }
.tto-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 4px 8px 4px 10px;
}
.tto-no {
  flex: 0 0 auto;
  min-width: 26px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--brand);
}
.tto-no.is-tag { min-width: 44px; color: var(--muted); background: #eef2f6; border-radius: 7px; padding: 2px 6px; }
/* V2.1.11：节次起止时间小字提示（老师确认在改哪一节）
   V2.1.12：显示完整区间 08:10–08:55，纯文字只读 —— 时间继承本周课表，这里改不了 */
.tto-time {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tto-sel {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  color: var(--ink);
  padding: 0 8px;
  outline: none;
}
.tto-empty { margin: 2px 0; font-size: 12.5px; color: var(--muted); }
.tto-tip { margin: 8px 2px 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.ttw-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.ttw-tab {
  flex: 1;
  border: 1.5px solid var(--line);
  background: #fafbfc;
  border-radius: 10px;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}
.ttw-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.ttw-form { display: flex; flex-direction: column; gap: 8px; }
/* V2.1.12：三行布局 —— 第一行「完整节次名 + 展示 + 删除」，第二行「时间」，
   第三行「科目下拉」独占整行、38px 高。每一层都不与别的元素抢宽度，绝无挤缝可能。 */
.ttw-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fafbfc;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 9px 10px;
}
.ttw-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ttw-line-head { min-height: 26px; }
.ttw-name {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 0;
  outline: none;
  border-bottom: 1px dashed transparent;
}
.ttw-name:focus { color: var(--ink); border-bottom-color: var(--brand); }
.ttw-subject {
  display: block;
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}
.ttw-subject:focus { border-color: var(--brand); }
.ttw-start, .ttw-end {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink-2);
  padding: 0 4px;
  text-align: center;
  outline: none;
}
.ttw-dash { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--muted); }
.ttw-show {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
.ttw-show-box {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.ttw-del {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: #c0392b;
  font-size: 15px;
  font-weight: 900;
  padding: 2px 4px;
  cursor: pointer;
  line-height: 1;
}
.ttw-add {
  margin-top: 8px;
  width: 100%;
  border: 1.5px dashed var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  color: var(--brand);
  cursor: pointer;
}
.ttw-add:disabled { color: var(--muted); border-color: var(--line); opacity: .6; cursor: not-allowed; }
.ttw-tip {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- 紧急喊话卡 ---------- */

.card-shout { border: 1.5px solid #f5c6c8; }
.shout-status {
  margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--danger);
  background: var(--danger-soft); border-radius: 10px; padding: 8px 12px;
}

/* ---------- 标签选择（待办发布者） ---------- */

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.tag-pick {
  border: 1.5px solid var(--line); background: #fafbfc; color: var(--ink);
  font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  cursor: pointer; transition: all 0.12s; font-family: inherit;
}
.tag-pick.active { border-color: var(--brand); background: var(--brand); color: #fff; }

/* V2.1.16 追加：单身份锁死横幅 —— 显著位置标明当前发布身份，替代手选框 */
.tag-locked {
  margin: 4px 0 10px;
  padding: 10px 14px;
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
  background: var(--brand-soft, rgba(16, 163, 110, 0.08));
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

/* ---------- iOS 开关 ---------- */

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: none; }
.switch-label { font-size: 14.5px; font-weight: 700; }
.switch-label small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }

.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; cursor: pointer;
  background: #dcdfe4; border-radius: 999px;
  transition: background 0.22s;
}
.switch .track::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.switch input:checked + .track { background: #34c759; }
.switch input:checked + .track::before { transform: translateX(20px); }

/* ---------- 滑块 ---------- */

.slider-row { padding: 6px 2px 2px; }
.slider-meta { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.slider-meta b { color: var(--brand); }

input[type='range'] {
  -webkit-appearance: none;
  width: 100%; height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--brand) var(--pct, 50%), #dfe4ea var(--pct, 50%));
  outline: none;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  cursor: pointer;
}

/* ---------- 模板卡 ---------- */

.tpl-card {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #fafbfc;
  padding: 13px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.tpl-card.active { border-color: var(--brand); background: var(--brand-soft); }
.tpl-emoji { font-size: 26px; flex: 0 0 auto; }
.tpl-card > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.tpl-name { display: block; font-size: 15px; font-weight: 800; }
.tpl-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.tpl-check { margin-left: auto; font-size: 18px; color: var(--brand); font-weight: 900; visibility: hidden; }
.tpl-card.active .tpl-check { visibility: visible; }

/* ---------- 闹钟列表 ---------- */

.sched-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-child { border-bottom: none; }
.sched-time { font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sched-info { flex: 1; min-width: 0; }
.sched-info .to { font-size: 13px; font-weight: 700; }
.sched-info .to small { display: block; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.sched-del {
  border: none; background: transparent; color: var(--muted);
  font-size: 16px; padding: 6px; cursor: pointer;
}
.sched-off .sched-time, .sched-off .sched-info { opacity: 0.4; }

.alarm-form { display: flex; gap: 10px; align-items: flex-end; }
.alarm-form .field { flex: 1; min-width: 0; }   /* 防止 select 固有宽度把表单撑出屏幕 */
.alarm-form input[type='time'], .alarm-form select {
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fafbfc;
  padding: 11px 12px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  outline: none;
}

/* ---------- 状态条 ---------- */

.status-strip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 2px 4px 0;
}
.status-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5df; }
.status-strip .dot.online { background: #34c759; }
.status-strip b { color: var(--ink); }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 104px;
  transform: translateX(-50%);
  background: rgba(31, 45, 61, 0.92);
  color: #fff;
  font-size: 13.5px; font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  z-index: 99;
  max-width: 82vw;
  text-align: center;
}

/* ---------- 大屏预览（所见即所得） ---------- */

.pv-board {
  margin-top: 10px;
  background: #f4f7f5;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.pv-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; align-items: stretch; }
/* 作业模式预览：单列铺满（大屏里作业跨列，没有侧栏） */
.pv-grid--solo { grid-template-columns: 1fr; }
.pv-col { min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.pv-block {
  background: #ffffff;
  border-radius: 12px;
  padding: 9px 11px;
  box-shadow: 0 1px 4px rgba(25, 42, 60, 0.06);
  min-width: 0;
}
.pv-block-title { font-size: 11.5px; font-weight: 900; color: #33475b; margin-bottom: 6px; }

/* V1.5.8 与大屏同款：马卡龙底色长条 + 【科目】深色锚点开头，内容同行起笔 */
.pv-hw-row {
  display: flex; align-items: baseline; gap: 4px;
  background: color-mix(in srgb, var(--c, #2f9e6e) 16%, #ffffff);
  border-radius: 9px;
  padding: 6px 9px;
  margin-bottom: 5px;
  min-width: 0;
}
.pv-hw-row:last-child { margin-bottom: 0; }
.pv-hw-row b { flex: 0 0 auto; font-size: 13.5px; font-weight: 900; color: var(--cd, #33475b); white-space: nowrap; }
.pv-hw-row span { flex: 1 1 auto; min-width: 0; font-size: 11.5px; font-weight: 700; color: #2b323d; line-height: 1.35; word-break: break-word; }

.pv-todo-row {
  display: flex; align-items: baseline; gap: 6px;
  background: #f2f8f5; border-left: 3px solid #57c99a;
  border-radius: 0 8px 8px 0;
  padding: 5px 8px; margin-bottom: 5px;
}
.pv-todo-row:last-child { margin-bottom: 0; }
.pv-todo-row b { flex: 0 0 auto; font-size: 10.5px; font-weight: 900; color: #2f9e6e; background: #fff; padding: 1px 6px; border-radius: 6px; }
.pv-todo-row span { font-size: 11.5px; font-weight: 700; color: #2f3641; min-width: 0; }

.pv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pv-chip {
  font-size: 11px; font-weight: 800; color: #2f3641;
  background: var(--c, #eef2f0);
  border-radius: 7px; padding: 4px 7px;
  display: inline-flex; align-items: baseline; gap: 3px;
}
.pv-chip i { font-style: normal; font-size: 9.5px; opacity: 0.55; font-weight: 900; }

.pv-msg {
  background: #fdf6e0; border-radius: 12px; padding: 10px 12px;
  font-size: 12.5px; font-weight: 600; font-style: italic; color: #8a6d2f;
}

/* V2.2.0 预览区高亮名单卡（顶替寄语位） */
.pv-att-card {
  background: linear-gradient(155deg, #fff4f2, #ffe9e3);
  border-radius: 12px; padding: 9px 11px;
  box-shadow: inset 3px 0 0 #c0392b;
}
.pv-att-title { font-size: 12.5px; font-weight: 900; color: #a5281b; margin-bottom: 7px; }
/* V2.2.0 终版：与大屏同款统一排版（科目彩色文字 + 名字同字号同粗细，自然折行） */
.pv-att-row { font-size: 12px; line-height: 1.5; font-weight: 700; color: #6b4438; word-break: keep-all; }
.pv-att-subject {
  color: var(--cd, #c0392b);
  margin-right: 2px; white-space: nowrap;
}
.pv-att-names { font-weight: 700; }
/* V2.2.1 字号档位与大屏同步：字少（≤5人）→ 大字档（对应大屏 21px=值日生正文档） */
.pv-att-big { font-size: 15px; }
/* 请假名单：挂值日生预览块下方（与未交名单同字号协调，自然换行） */
.pv-att-leave {
  margin-top: 7px; padding-top: 7px; border-top: 1px dashed rgba(192,57,43,0.35);
  font-size: 12px; font-weight: 700; color: #a94438; line-height: 1.5; word-break: keep-all;
}
/* 发布面板：待发布名单草稿行 */
.att-draft-list { display: flex; flex-direction: column; gap: 6px; }
.att-draft-row {
  position: relative; background: #fff7f5; border: 1px solid #f3cdc5; border-radius: 10px;
  padding: 7px 30px 7px 10px; font-size: 12.5px; line-height: 1.5; color: #7f1d10;
  overflow-wrap: anywhere;
}
/* V2.2.1 已发布名单行：复用 att-draft-row 红色系（语义一致=未交名单）；请假行米黄区分 */
.att-pub-leave { background: #fffdf5; border-color: #e8d9b8; }
.att-draft-subject { color: var(--cd, #c0392b); margin-right: 2px; }
.att-draft-del {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer;
  background: #fbe3de; color: #c0392b; font-size: 14px; font-weight: 900; line-height: 1;
}
/* 科目/状态选择行允许横向滚动，科目多也不挤爆 */
.att-subject-tabs { flex-wrap: nowrap; overflow-x: auto; }

.pv-cd {
  background: linear-gradient(135deg, #2f9e6e, #57c99a);
  color: #fff; border-radius: 12px;
  padding: 10px 14px;
  display: flex; align-items: baseline; gap: 6px;
}
.pv-cd-label { font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.pv-cd b { font-size: 26px; font-weight: 900; line-height: 1; }
.pv-cd-unit { font-size: 11px; font-weight: 800; opacity: 0.9; }

.pv-cd--hero {
  flex: 1;
  flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 4px;
  min-height: 190px;
}
.pv-cd--hero .pv-cd-label { font-size: 13px; }
.pv-cd--hero b { font-size: 72px; }
.pv-cd--hero .pv-cd-unit { font-size: 14px; }

/* ==================== V2.1.24 预览同步元信息条 + 倒计时副标题 ==================== */
.pv-cd-label { word-break: keep-all; }
.pv-cd-sub { font-size: 11px; font-weight: 700; opacity: 0.92; min-width: 0; word-break: keep-all; }
.pv-cd--hero .pv-cd-sub { font-size: 12.5px; opacity: 0.95; }
.pv-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  padding: 7px 10px; margin-bottom: 8px;
  background: #f4f7fb; border: 1px solid #e3e8ef; border-radius: 9px;
}
.pv-ver { font-size: 11.5px; font-weight: 700; line-height: 1.5; color: #47586b; }
.pv-ver.is-ok { color: #1f7a3d; }
.pv-ver.is-warn { color: #b3541e; }
.pv-ver.is-time { margin-left: auto; color: #5c7085; font-weight: 600; }

.pv-empty {
  background: #ffffff; border-radius: 12px;
  padding: 14px; text-align: center;
  font-size: 12px; font-weight: 700; color: #8a97a5;
}

/* ---------- 作业覆盖提示 ---------- */

.overwrite-hint {
  margin-top: 8px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
  color: #9a6b1f;
  background: #fdf3df;
  border: 1px solid #f0dfb8;
  border-radius: 10px;
  padding: 8px 11px;
}

/* ---------- 已发布待办管理（单项删除） ---------- */

.pub-todo-row {
  display: flex; align-items: center; gap: 8px;
  background: #f6f9f7; border-left: 4px solid var(--accent-2);
  border-radius: 0 10px 10px 0;
  padding: 9px 10px;
  margin-bottom: 7px;
}
.pub-todo-tag {
  flex: 0 0 auto;
  font-size: 11px; font-weight: 800; color: var(--accent);
  background: #ffffff;
  padding: 2px 8px; border-radius: 8px;
  box-shadow: 0 1px 3px rgba(25, 42, 60, 0.08);
  white-space: nowrap;
}
.pub-todo-text {
  flex: 1 1 auto; min-width: 0;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}
.pub-todo-del {
  flex: 0 0 auto;
  border: none; background: transparent;
  font-size: 16px; line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.pub-todo-del:hover { background: #feecec; }
.pub-todo-del:disabled { opacity: 0.4; }

/* ==================== V1.5.2 身份认领（学科 + 姓名） ==================== */

.claim-step { margin-top: 2px; text-align: left; }

.claim-tip {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
}
.claim-sub {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.claim-subjects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.claim-subject {
  padding: 10px 0;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fafbfc;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.claim-subject.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.claim-name {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: #fafbfc;
}
.claim-name:focus { border-color: var(--brand); background: #fff; }

.claim-error {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
}

.btn-claim-back {
  display: block;
  margin: 16px auto 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* 顶部当前身份（手机端才显示，大屏永远只显示科目标签） */
.teacher-id {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 800;
  vertical-align: middle;
}

/* ==================== V2.1.16 教室大屏在线状态点 ==================== */

.desk-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f0f3f8;
  font-size: 11.5px;
  font-weight: 800;
  vertical-align: middle;
}
.desk-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.desk-status .dot.d-on { background: #17a05e; box-shadow: 0 0 0 3px rgba(23, 160, 94, .16); }
.desk-status .dot.d-off { background: #98a2b3; }
.desk-status .dot.d-unk { background: #c3cbd8; border: 2px solid #e5e9f0; }
.desk-status em { font-style: normal; color: #4b5563; }
.desk-status.is-on { background: #e7f6ee; }
.desk-status.is-on em { color: #16794a; }
.desk-status.is-off { background: #f2f4f7; }
.desk-status.is-off em { color: #6b7280; }

/* ==================== V1.5.3 待办「次日自动撤下」勾选项 ==================== */

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
  cursor: pointer;
}

.check-sub {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ==================== V2.1.2 唯一客服入口（管理页最底部） ==================== */

.card-cs { padding-bottom: 18px; }

/* 管理页最后一张卡是客服入口，别被底部导航压住 */
#page-admin { padding-bottom: 96px; }

.btn-cs {
  display: block;
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1.5px solid #bfe8d2;
  background: #eaf7f0;
  color: #157a43;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  font-family: inherit;
  cursor: pointer;
}
.btn-cs:active { transform: scale(0.99); }

.btn-copy-cs { width: 100%; font-size: 16px; padding: 14px; font-weight: 900; }

/* 科任老师的「主账号验证」闸门 */
#admin-gate .btn { width: 100%; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(23, 37, 61, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.sheet-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 26px 22px 30px;
  text-align: center;
  animation: sheet-up 0.22s ease-out;
}
@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f2f5f8;
  color: #7b8794;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.sheet-emoji { font-size: 30px; line-height: 1; }
.sheet-title { margin: 8px 0 4px; font-size: 19px; font-weight: 900; color: #17253d; }
.sheet-sub { margin: 0 0 16px; font-size: 13px; color: #7b8794; }

.support-box {
  padding: 16px;
  border-radius: 14px;
  background: #f6faf8;
  border: 1.5px dashed #bfe8d2;
}
.support-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: #7b8794; }
.support-id {
  margin: 8px 0 14px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #157a43;
}
.support-box .btn { width: 100%; }
.support-hint { margin: 14px 0 0; font-size: 12px; color: #8a97ab; line-height: 1.6; }
.support-ok { margin: 10px 0 0; font-size: 13px; font-weight: 800; color: #157a43; }

/* ==================== V2.1 主账号登录 + 管理 Tab ==================== */

.owner-switch {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: #7b8794;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.owner-step {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px dashed #dbe4ee;
}

.owner-step .claim-name { margin-top: 10px; }

.tabbar button.hidden { display: none; }

.admin-block { margin: 4px 0 6px; }

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed #eef2f7;
  font-size: 14px;
  color: #40506a;
}
.admin-row:last-child { border-bottom: none; }
.admin-row b { font-weight: 900; color: #17253d; }
.admin-row b.is-expired-text { color: #d93a3a; }

.admin-form { display: flex; gap: 8px; margin-top: 10px; }
.admin-form .claim-name { flex: 1 1 auto; width: 100%; min-width: 0; }
.admin-form .btn { flex: 0 0 auto; width: auto; white-space: nowrap; padding: 13px 22px; }

.admin-msg { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #157a43; min-height: 16px; }

.admin-claim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #e8eef6;
  border-radius: 12px;
  background: #fafcff;
}

.admin-claim-label { font-size: 14px; font-weight: 800; color: #24344e; }
.admin-claim-label .admin-pin { font-size: 12px; color: #8a97ab; font-weight: 700; margin-left: 4px; }

.admin-unbind {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid #ffd9d9;
  border-radius: 10px;
  background: #fff5f5;
  color: #d93a3a;
  font-size: 12.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.admin-unbind:hover { background: #ffe9e9; }

.admin-unbind.admin-enter {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.admin-unbind.admin-enter:hover { background: #dbeafe; }

/* ==================== V2.1.3 快捷登录（30 天 Token） ==================== */

.quick-login {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1.5px dashed #dbe4ee;
}

.btn-quick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #bfe8d2;
  border-radius: 14px;
  background: linear-gradient(180deg, #f2fdf7 0%, #e7f8ef 100%);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.btn-quick:active { transform: scale(0.985); }

.quick-ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  font-size: 19px;
  box-shadow: 0 1px 4px rgba(21, 122, 67, 0.14);
}

.quick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quick-text b { font-size: 15px; font-weight: 900; color: #157a43; }
.quick-text small { font-size: 11.5px; font-weight: 700; color: #5f8f77; }

.quick-other {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: #a0aab8;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

/* ==================== V2.1.3 历史卡密（打码 + 小眼睛 + 复制） ==================== */

.owner-link {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 0 2px;
  border: none;
  background: transparent;
  color: #4a7fb5;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.key-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #e8eef6;
  border-radius: 14px;
  background: #fafcff;
}

.key-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.key-account { font-size: 12.5px; font-weight: 800; color: #40506a; }
.key-when { font-size: 11.5px; font-weight: 700; color: #a8b3c2; }

.key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #17253d;
  padding: 8px 0;
  word-break: break-all;
}
.key-code.is-open { color: #157a43; }

.key-actions { display: flex; gap: 8px; margin-top: 2px; }

.key-eye,
.key-copy {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.key-eye {
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #40506a;
}
.key-copy {
  border: 1px solid #bfe8d2;
  background: #eaf7f0;
  color: #157a43;
}
.key-eye:active,
.key-copy:active { transform: scale(0.97); }

/* ==================== V2.1.3 退出当前账号（故意不显眼） ==================== */

.btn-logout-soft {
  display: block;
  width: 100%;
  margin: 6px 0 10px;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #a8b3c2;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-logout-soft:active { color: #d93a3a; }

/* ==================== V2.1.6 客服下拉（点按展开 / 移开即收） ==================== */

.cs-collapse {
  margin: 22px 0 0;
  padding: 0 4px;
}

/* 默认只露这一行极简小字 */
.cs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  padding: 6px 2px;
  border: none;
  background: none;
  color: #8a97ab;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cs-toggle:active { opacity: 0.65; }
.cs-caret {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.24s ease;
}
.cs-collapse.open .cs-caret { transform: rotate(180deg); }

/* 下拉面板：max-height 0 → N 实现平滑展开 */
.cs-panel {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin-top 0.28s ease;
}
.cs-collapse.open .cs-panel {
  max-height: 400px;
  margin-top: 8px;
  opacity: 1;
}

.cs-panel-inner {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 16px;
  padding: 16px 16px 15px;
  box-shadow: 0 6px 20px rgba(23, 37, 61, 0.06);
}

.cs-row { display: flex; align-items: baseline; gap: 8px; }
.cs-label { font-size: 12.5px; font-weight: 700; color: #8a97ab; }
.cs-id {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #17253d;
  user-select: all;
  -webkit-user-select: all;
}
.cs-hint { margin: 8px 0 12px; font-size: 12.5px; color: #8a97ab; line-height: 1.5; }

.cs-copy {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cs-copy:active { transform: scale(0.99); }

.cs-ok {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #157a43;
  text-align: center;
}

/* ==================== V2.1.17 大屏离线强提醒（发布前拦截模态） ==================== */
.offc-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  animation: offc-in 0.18s ease-out;
}
@keyframes offc-in { from { opacity: 0; } to { opacity: 1; } }
.offc-card {
  width: min(88vw, 340px); background: #fff; border-radius: 14px;
  padding: 20px 18px 16px; box-shadow: 0 12px 40px rgba(10, 18, 28, 0.28);
  text-align: center;
}
.offc-title { font-size: 16px; font-weight: 800; color: #b3541e; margin-bottom: 8px; }
.offc-body { font-size: 13.5px; color: #475569; line-height: 1.7; margin-bottom: 16px; }
.offc-btns { display: flex; gap: 10px; }
.offc-btn {
  flex: 1; padding: 11px 0; border-radius: 10px; border: none;
  font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.offc-no { background: #eef2f7; color: #475569; }
.offc-no:active { background: #e2e8f0; }
.offc-yes { background: #1a5fb4; color: #fff; }
.offc-yes:active { background: #144a90; }

/* ==================== V2.1.17 定时喊话任务面板 ==================== */
.sched-box { margin-top: 14px; padding: 12px 12px 10px; border: 1px dashed #c9d4e3; border-radius: 10px; background: #f8fafc; }
.sched-head { display: flex; align-items: center; justify-content: space-between; }
.sched-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sched-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 9px 11px; }
.sched-info { min-width: 0; flex: 1; }
.sched-info b { font-size: 15px; }
.sched-kind { font-size: 12px; color: #1a5fb4; background: #e8f0fd; border-radius: 6px; padding: 1px 6px; margin: 0 4px; }
.sched-on { font-size: 12px; color: #157a43; }
.sched-off { font-size: 12px; color: #b3541e; }
.sched-done { font-size: 12px; color: #7b8794; }
.sched-content-txt { font-size: 13px; color: #475569; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-acts { display: flex; gap: 6px; flex-shrink: 0; }
.sched-empty { text-align: center; color: #7b8794; font-size: 13px; padding: 8px 0; }

/* ==================== V2.1.18d 喊话双模式切换 + 自定义周几勾选圈 ==================== */
.shout-tabs { display: flex; gap: 8px; margin-top: 10px; background: #eef2f7; border-radius: 10px; padding: 4px; }
.shout-tab { flex: 1; border: none; background: transparent; border-radius: 8px; padding: 10px 0; font-size: 14.5px; font-weight: 700; color: #64748b; cursor: pointer; transition: all .15s; }
.shout-tab.active { background: #fff; color: #1e293b; box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.shout-tab#shout-tab-sched.active { color: #1a7f37; }
.week-picks { display: flex; gap: 8px; margin-top: 8px; }
.week-pick { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #c9d4e3; background: #fff; color: #475569; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .12s; }
.week-pick.on { background: var(--brand, #1a5fb4); border-color: var(--brand, #1a5fb4); color: #fff; box-shadow: 0 2px 6px rgba(26, 95, 177, .3); }

/* ==================== V2.1.18 单双周 + 自定义课程 + 考试通知 ==================== */
.ttp-box { margin-top: 12px; padding: 12px; border: 1px dashed #c9d4e3; border-radius: 10px; background: #f8fafc; }
/* V2.1.23 一键设定作息 */
.tsc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.tsc-cell { display: flex; flex-direction: column; gap: 4px; }
.tsc-cell span { font-size: 12px; color: #475569; }
.tsc-cell .text-input { margin: 0; }
.tsc-result { margin-top: 10px; }
.tsc-preview { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; max-height: 200px; overflow-y: auto; }
.tsc-prow { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; border-bottom: 1px dashed #eef2f7; font-size: 13.5px; }
.tsc-prow:last-child { border-bottom: none; }
.tsc-pno { color: #1e293b; font-weight: 600; }
.tsc-ptime { color: #2563eb; font-variant-numeric: tabular-nums; }
.tsc-pnoon .tsc-ptime { color: #9a6b00; }
.tsc-warn { font-size: 12.5px; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 6px 8px; margin: 6px 0 0; line-height: 1.5; }
.tsc-ok { font-size: 12.5px; color: #15803d; margin: 6px 0 8px; }
.ttp-tip { font-size: 12.5px; color: #475569; line-height: 1.7; margin: 8px 0; }
.ttc-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ttc-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: 8px 10px; }
.ttc-row b { flex: 1; font-size: 14.5px; }
.ttc-dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ttc-empty { font-size: 13px; color: #7b8794; padding: 4px 0 2px; }
.ttc-colors { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.ttc-swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ttc-swatch.active { border-color: #1a5fb4; transform: scale(1.1); }
.chip-custom { border-style: dashed; }
.exam-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.exam-row { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid #e3e8ef; border-radius: 10px; padding: 9px 11px; }
.exam-info { min-width: 0; flex: 1; }
.exam-info b { font-size: 15px; }

/* ==================== V2.1.18b 场次编排 + 自定义课程行内编辑 ==================== */
.exam-session-row { display: flex; flex-direction: column; gap: 6px; }
.exam-session-row .ttw-line { display: flex; align-items: center; gap: 6px; }
.exam-session-row .ex-del { margin-left: auto; }
.ttc-row.is-editing { flex-wrap: wrap; background: #f0f6ff; }
.ttc-name-input { flex: 1; min-width: 72px; font-size: 14.5px; padding: 6px 8px; border: 1px solid #c9d4e3; border-radius: 8px; }
.ttc-colors-inline { display: flex; gap: 5px; margin: 0; flex-wrap: wrap; }
.ttc-colors-inline .ttc-swatch { width: 18px; height: 18px; border-width: 2px; flex-shrink: 0; }
.ttw-edit, .ttw-save { border: none; background: none; cursor: pointer; font-size: 15px; padding: 2px 4px; }
.ttw-save { color: #1a7f4b; font-weight: 700; }

/* V2.1.18：闹钟灰字提示（替代黑底胶囊报错） */
.alarm-hint { display: block; margin-top: 8px; font-size: 12px; color: #8a94a3; text-align: right; }
.alarm-hint-warn { color: #c2571b; font-weight: 600; }

/* ==================== V2.1.21 考试轮次 / 花名册 / 值日排班 ==================== */

/* 五段快捷模板（日常/冲刺/班务/作业/考试）：小屏也不换行 */
.seg--5 button {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 1px;
  font-size: 11.5px;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.seg--5 button.active { font-weight: 800; }

/* 考试轮次表单 */
.exr-form {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #c9d4e3;
  border-radius: 12px;
  background: #f8fafc;
}
.exr-form .tto-head { margin-bottom: 8px; }
.exr-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exr-date { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7a8c; font-weight: 700; }
.exr-date .text-input { margin: 0; }
.exam-row.is-editing { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(47, 158, 110, 0.12); }
.exam-sess-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ex-chip {
  font-size: 11.5px; font-weight: 700; color: #3d5a75;
  background: #eef4fa; border-radius: 999px; padding: 2px 7px; white-space: nowrap;
}
.exam-session-card {
  border: 1px solid #e3e8ef;
  background: #fff;
  border-radius: 10px;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.exs-top { display: flex; align-items: center; gap: 6px; }
.exs-top .ex-date {
  flex: 0 0 128px; min-width: 0; font-size: 13px; padding: 6px 7px;
  border: 1px solid #c9d4e3; border-radius: 8px; background: #fff; font-family: inherit;
}
.exs-top .ex-subj {
  flex: 1 1 auto; min-width: 0; font-size: 13.5px; padding: 6px 7px;
  border: 1px solid #c9d4e3; border-radius: 8px; background: #fff; font-family: inherit; font-weight: 700;
}
.exs-mid { display: flex; align-items: center; gap: 6px; }
.exs-mid input { flex: 1 1 0; min-width: 0; }
.exs-bottom { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 6px; }
.exs-bottom label {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: #6b7a8c; font-weight: 700;
  white-space: nowrap; min-width: 0;
}
.exs-bottom input {
  flex: 1 1 auto; min-width: 0; font-size: 13px; padding: 5px 7px;
  border: 1px solid #c9d4e3; border-radius: 8px; background: #fff; font-family: inherit;
}

/* 花名册 */
.roster-box {
  padding: 12px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  background: #f6faf8;
}
.roster-box .tto-head { margin-bottom: 8px; }
.roster-box .textarea { margin: 0 0 8px; }

/* 值日排班 */
.duty-day-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dbe6f1;
  border-radius: 12px;
  background: #fff;
}
.duty-day-box .textarea { margin: 0 0 8px; }
.duty-pick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.duty-pick-row .btn { flex: 0 0 auto; }
.duty-pick-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.duty-pick {
  border: 1px solid #cdd9e6; background: #fff; color: #33475c;
  border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.duty-pick.picked { border-color: #2f9e6e; background: #eafaf2; color: #1f7a53; }
.duty-week-overview { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.dwo-row {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12.5px; color: #33475c; padding: 4px 2px; border-bottom: 1px dashed #e8eef5;
}
.dwo-row:last-child { border-bottom: none; }
.dwo-row b { flex: 0 0 40px; color: #1d2f42; }
.dwo-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dwo-row span.is-empty { color: #a6b2c1; }
.ttw-tab.is-today::after { content: '·今'; font-size: 10px; opacity: 0.7; }

/* 手机端预览：考试模式示意 */
.pv-exam { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.pv-exam-clock {
  background: #f7fbf8; border-radius: 10px; padding: 10px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.pv-exam-clock b { font-size: 30px; letter-spacing: 1px; color: #17324a; }
.pv-exam-clock span { font-size: 14px; font-weight: 800; color: #2f9e6e; margin-left: 4px; }
.pv-exam-clock em { font-style: normal; font-size: 10.5px; color: #7a8a9c; }
.pv-exam-info {
  display: flex; flex-direction: column; gap: 5px; justify-content: center;
  background: #f8fafc; border-radius: 10px; padding: 10px;
}
.pv-exam-tag {
  align-self: flex-start; font-size: 10px; font-weight: 800; color: #fff;
  background: #2f9e6e; border-radius: 999px; padding: 2px 8px;
}
.pv-exam-info b { font-size: 22px; color: #16283a; }
.pv-exam-info i { font-style: normal; font-size: 12px; font-weight: 700; color: #2f9e6e; }
.pv-exam-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 10.5px; color: #5c7085; }
.pv-exam-meta span { background: #fff; border-radius: 6px; padding: 2px 5px; }

/* V2.1.22b 卡密兑换：时长 / 额度 二选一 */
.redeem-mode { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.redeem-opt {
  display: flex; align-items: flex-start; gap: 9px;
  border: 1.5px solid var(--line, #dbe4ec); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.redeem-opt input { margin: 3px 0 0; accent-color: #2f9e6e; flex: 0 0 auto; }
.redeem-opt span { display: flex; flex-direction: column; gap: 2px; }
.redeem-opt b { font-size: 13.5px; color: var(--ink, #16283a); }
.redeem-opt small { font-size: 11.5px; color: var(--muted, #5c7085); line-height: 1.45; }
.redeem-opt:has(input:checked) { border-color: #2f9e6e; background: #f2faf6; }

/* ==================== V2.1.23 切换班级底部弹窗 ==================== */
.switch-mask { position: fixed; inset: 0; background: rgba(15, 30, 48, 0.45); z-index: 90; }
.switch-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  background: #fff; border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 78vh; overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(15, 30, 48, 0.18);
}
.ss-handle { width: 44px; height: 4px; border-radius: 2px; background: #d7dfe9; margin: 2px auto 10px; }
.ss-head { display: flex; align-items: center; justify-content: space-between; }
.ss-title { font-size: 17px; font-weight: 800; color: var(--ink, #16283a); }
.ss-close { border: none; background: #f1f5f9; color: #64748b; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; }
.ss-sub { font-size: 12px; color: var(--muted, #5c7085); line-height: 1.6; margin: 8px 0 4px; }
.ss-sec { font-size: 13px; font-weight: 700; color: #1e293b; margin: 12px 0 8px; }
.ss-list { display: flex; flex-direction: column; gap: 8px; }
.ss-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 1px solid #e3e8ef; background: #f8fafc;
  border-radius: 10px; padding: 11px 12px;
}
.ss-item:active { background: #eef4fb; }
.ss-item.is-cur { border-color: #2f9e6e; background: #f2faf6; }
.ss-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ss-item-name { font-size: 14.5px; font-weight: 700; color: var(--ink, #16283a); }
.ss-item-name small.ss-who { font-size: 11.5px; font-weight: 600; color: #2f6fbe; margin-left: 6px; }
.ss-pin { font-size: 11.5px; color: var(--muted, #5c7085); }
.ss-item-tag { font-size: 12.5px; font-weight: 700; color: #2f6fbe; flex: 0 0 auto; }
.ss-item.is-cur .ss-item-tag { color: #2f9e6e; }
.ss-empty { font-size: 13px; color: var(--muted, #5c7085); background: #f8fafc; border: 1px dashed #c9d4e3; border-radius: 10px; padding: 14px 12px; line-height: 1.6; }
.ss-join { display: flex; gap: 8px; }
.ss-join .claim-name { flex: 1; margin: 0; }
.ss-join .btn { flex: 0 0 auto; min-width: 88px; margin: 0; }
.ss-tip { font-size: 11.5px; color: var(--muted, #5c7085); line-height: 1.6; margin: 10px 0 0; }
.ss-msg { font-size: 12.5px; color: #c0392b; min-height: 16px; margin: 6px 0 0; }

/* ===== V2.2.2 消息中心 / 反馈箱 ===== */
.tabbar button { position: relative; }
.tab-reddot {
  position: absolute; top: 4px; left: calc(50% + 8px);
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #e0392b; color: #fff;
  font-size: 10px; line-height: 17px; text-align: center; font-weight: 800;
  border: 2px solid #fff; box-sizing: content-box;
}
.tab-reddot.hidden { display: none; }
.feedback-card-top { border-left: 4px solid var(--brand, #2f6fbe); }
.announce-list { display: flex; flex-direction: column; gap: 10px; }
.ann-empty { font-size: 13px; color: var(--muted, #5c7085); text-align: center; padding: 28px 0; }
.ann-item {
  background: #fff; border: 1px solid var(--line, #e3e9f2); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 4px rgba(30,50,90,.05);
}
.ann-unread { border-left: 4px solid #e0392b; background: #fffaf9; }
.ann-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ann-title { font-size: 14.5px; font-weight: 800; color: var(--ink, #16283a); line-height: 1.5; }
.ann-new {
  display: inline-block; background: #e0392b; color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 8px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}
.ann-time { font-size: 11px; color: var(--muted, #5c7085); white-space: nowrap; flex: 0 0 auto; }
.ann-body {
  font-size: 13px; color: #44536e; line-height: 1.75; margin-top: 8px;
  white-space: pre-wrap; word-break: break-word;
}
/* V2.2.6 智能折叠：已读=1行，未读=2行，置顶=全展开 */
.ann-body.ann-clamp-1, .ann-body.ann-clamp-2 {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-body.ann-clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.ann-body.ann-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.ann-item.ann-pinned { border-left: 4px solid #f59e0b; background: #fffdf7; }
.ann-pinned-tag {
  display: inline-block; background: #f59e0b; color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 8px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}
.ann-more { display: block; margin-top: 4px; font-size: 12px; color: var(--brand, #2f6fbe); font-weight: 600; }
/* 详情弹层正文 */
.ann-detail-content {
  font-size: 14px; color: var(--ink, #16283a); line-height: 1.8;
  white-space: pre-wrap; word-break: break-word; margin-top: 14px;
  max-height: 56vh; overflow-y: auto;
}
.ann-detail-title { font-size: 18px; font-weight: 800; color: var(--ink, #16283a); line-height: 1.5; }
.ann-detail-time { font-size: 12px; color: var(--muted, #5c7085); margin: 6px 0 14px; }
#feedback-sheet textarea, #feedback-sheet input {
  width: 100%; padding: 12px; border: 1.5px solid var(--line, #e3e9f2);
  border-radius: 10px; background: #fafbfc; font-size: 15px; font-family: inherit; outline: none;
}
#feedback-sheet textarea:focus, #feedback-sheet input:focus { border-color: var(--brand, #2f6fbe); background: #fff; }
