/* ============================================================
   组件样式 —— 只引用 tokens.css 中的变量
   设计依据：docs/ui-concepts/设计v2_教师工作台.html（定稿）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

/* 键盘焦点可见（无障碍硬要求） */
:focus-visible { outline: 2px solid var(--ink-900); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* ============================================================
   布局壳
   ============================================================ */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s6) var(--s4) var(--s5); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; font-size: 14.5px; color: var(--text-2);
  -webkit-tap-highlight-color: transparent;   /* 触屏：去系统灰块，用下方 :active 即时反馈 */
  border-radius: var(--r-pill);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background: var(--surface-2); color: var(--text); }
}
.nav a:active { background: var(--surface-2); color: var(--text); transform: scale(.96); }   /* 按下即反馈（触屏无 hover） */
.nav a.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.nav a.on:active { background: var(--primary); }
.nav a .cnt { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-3); }
.nav a.on .cnt { color: rgb(255 255 255 / 0.7); }
.side-foot { margin-top: auto; padding: var(--s4) var(--s3) 0; font-size: 12.5px; color: var(--text-3); }

/* margin-inline:auto + width:100%：大屏内容区居中（grid 下不写 width 会被压成 fit-content） */
.main { padding: 40px 44px 56px; width: 100%; max-width: 1120px; margin-inline: auto; }

/* ── Hero 区 ── */
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s7); }
.hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.hero .sub { margin-top: 6px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; align-items: center; gap: var(--s3); padding-top: 4px; }
.avatar {
  width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--primary);
  color: var(--on-primary); display: grid; place-items: center; font-size: 14px; font-weight: 700;
}

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: var(--s5) var(--s5) var(--s4);
  transition: box-shadow var(--dur-norm) var(--ease-out), transform var(--dur-norm) var(--ease-out);
}
.card.hoverable:hover { box-shadow: var(--sh-hover); transform: translateY(-2px); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s4); }
.card-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-3);
  text-transform: uppercase; font-variant-numeric: tabular-nums;
}

/* ============================================================
   列表行（待办等）
   ============================================================ */
.todo {
  display: flex; align-items: center; gap: var(--s3);
  padding: 13px 12px; margin: 0 -12px; border-radius: var(--r-el);
  transition: background var(--dur-fast) var(--ease-out);
}
.todo:hover { background: var(--surface-2); }
.todo + .todo { margin-top: 2px; }
.todo .t-txt { flex: 1; min-width: 0; }
.todo .t-txt b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.todo .t-txt span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dot.amber { background: var(--c-amber); }
.dot.green { background: var(--c-green); }
.dot.blue { background: var(--c-blue); }
.dot.red { background: var(--c-red); }
.dot.gray { background: var(--ink-300); }

/* ── 胶囊按钮 ── */
.pill {
  flex: 0 0 auto; padding: 7px 16px; border-radius: var(--r-pill);
  background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text);
  transition: background var(--dur-fast) var(--ease-out), transform 100ms var(--ease-out);
}
.pill:hover { background: var(--surface-3); }
.pill:active { transform: scale(0.96); }
.pill.solid { background: var(--primary); color: var(--on-primary); }
.pill.solid:hover { background: var(--primary-hover); }
.pill.ghost { background: transparent; color: var(--text-2); }
.pill.ghost:hover { background: var(--surface-2); color: var(--text); }

/* ============================================================
   时间轴（课表）
   ============================================================ */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 14px; width: 1px; background: var(--line); }
.period { position: relative; display: flex; align-items: center; gap: var(--s3); padding: 11px 0; }
.period::before {
  content: ""; position: absolute; left: -22px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--ink-300); box-sizing: border-box;
}
.period.now::before { background: var(--primary); border-color: var(--primary); }
.period .no { font-size: 12.5px; color: var(--text-3); width: 52px; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.period .cls { font-weight: 600; font-size: 14.5px; }
.period .subj { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.period.now .no { color: var(--text); }
.period.now .cls { font-weight: 700; }

/* ============================================================
   数据行（纯排版）
   ============================================================ */
.stats { display: flex; gap: var(--s7); margin: var(--s6) 2px; }
.stat .eyebrow { display: block; margin-bottom: 6px; }
.stat .num {
  font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px;
}
.stat .num i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

/* ============================================================
   图表条
   ============================================================ */
.bars { display: flex; flex-direction: column; gap: 12px; padding-top: 2px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: var(--s3); }
.bar-label { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: var(--r-pill); background: var(--primary); width: 0;
  animation: grow 700ms var(--ease-out) forwards;
}
.bar-row.dim .bar-fill { background: var(--ink-300); }
.bar-val { font-size: 12.5px; font-weight: 600; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
@keyframes grow { to { width: var(--w, 100%); } }

/* ============================================================
   表单
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s4); }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  height: 40px; padding: 0 14px; font-size: 14.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-el);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field textarea { height: auto; padding: 10px 14px; resize: vertical; }
.field input:hover, .field select:hover { border-color: var(--ink-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(var(--sh-color) / 0.08);
}
.field .err { font-size: 12.5px; color: var(--c-red); }
.field.has-err input { border-color: var(--c-red); }

/* ============================================================
   表格（成绩单 / 名单）
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--surface-2); }
.tbl tbody tr { transition: background var(--dur-fast) var(--ease-out); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tbl .num.muted { color: var(--text-3); font-weight: 400; }
.tbl .seq { color: var(--text-3); font-variant-numeric: tabular-nums; width: 44px; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 36px 32px 28px;
}
.login-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-card .sub { font-size: 13.5px; color: var(--text-3); margin-bottom: var(--s5); }
.login-card .btn-row { margin-top: var(--s5); }
.login-card .btn-row .pill { width: 100%; height: 44px; font-size: 14.5px; }
.login-err {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--c-red);
  background: color-mix(in srgb, var(--c-red) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c-red) 25%, var(--surface));
  border-radius: var(--r-el); padding: 10px 14px; margin-bottom: var(--s4);
}

/* ============================================================
   动效（staggered reveal / 工具类）
   ============================================================ */
.reveal { opacity: 0; transform: translateY(12px); animation: rise var(--dur-slow) var(--ease-out) forwards; }
.reveal:nth-child(1) { animation-delay: 0ms; }
.reveal:nth-child(2) { animation-delay: 60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s5); }
.mt-5 { margin-top: var(--s5); }
.foot { margin-top: var(--s6); font-size: 12px; color: var(--text-3); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 32px 28px 48px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  /* 导航 → 底部悬浮圆角栏（浮于内容之上，2026-10-11） */
  .side {
    position: fixed; left: var(--s3); right: var(--s3);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 40; padding: 6px; gap: 0;
    /* 毛玻璃：内容滚过栏下时模糊融合，而非硬遮挡（配回退：不支持 color-mix 时用不透明白） */
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 2px 6px rgb(var(--sh-color) / .05), 0 14px 34px -10px rgb(var(--sh-color) / .2);
    animation: floatNavIn var(--dur-norm) var(--ease-out);
  }
  html.nav-static .side { animation: none; }   /* 仅首次访问播放入场动画（见 base.html 标记） */
  @keyframes floatNavIn { from { opacity: 0; transform: translateY(12px); } }
  .nav { flex-direction: row; flex-wrap: nowrap; gap: 2px; }
  .nav a {
    flex: 1; justify-content: center; text-align: center; white-space: nowrap;
    min-width: 44px; min-height: 44px; padding: 0 4px;
    font-size: 12.5px; border-radius: 14px;
  }
  .nav a .nav-more { display: none; }        /* 移动端短标签：数据 / 考试 */
  .side-foot { display: none; }
  .main { padding: var(--s5) var(--s4) 104px; }   /* 底部留白：内容不被悬浮栏遮挡 */
  .hero h1 { font-size: 26px; }
  .stats { gap: var(--s6); flex-wrap: wrap; }
  /* 触摸目标 ≥ 44px（WCAG 2.5.8） */
  .pill { min-height: 44px; padding: 10px 18px; }
}

/* ============================================================
   成绩录入（键盘流界面）
   ============================================================ */
.entry-tip {
  font-size: 12.5px; color: var(--text-2); background: var(--surface-2);
  border-radius: var(--r-el); padding: 10px 14px; margin-bottom: var(--s4);
  line-height: 1.9;
}
.entry-tip b { color: var(--text); }
.entry-tbl td { padding: 7px 12px; }
.score-input {
  width: 88px; height: 36px; padding: 0 10px; text-align: right;
  font-size: 14.5px; font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); font-family: inherit; box-sizing: border-box;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.score-input:hover { border-color: var(--ink-300); }
.score-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(var(--sh-color) / 0.08);
}
.score-input.err { border-color: var(--c-red); }
.err-text { font-size: 12.5px; color: var(--c-red); }
.entry-tbl input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}
.save-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--c-green); font-weight: 600;
  background: color-mix(in srgb, var(--c-green) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c-green) 25%, var(--surface));
  border-radius: var(--r-el); padding: 10px 14px; margin-bottom: var(--s4);
}
/* 软标签（考试类型等） */
.tag-soft {
  display: inline-block; font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border-radius: var(--r-pill); padding: 3px 10px;
  white-space: nowrap;
}

/* 教学简报（AI / 本地摘要） */
.briefing {
  white-space: pre-wrap;
  line-height: 2.0;
  font-size: 14.5px;
  color: var(--text);
  max-width: 780px;
}

/* ============================================================
   工作台 · 日历组件（月历 + 选中日详情）
   设计依据：docs/设计-教师工作台与日历-20261011.md（F1 移动端优先）
   说明：整块 scope 在 .wb-cal 下，与全局类（.todo 等）互不干扰
   ============================================================ */
.wb-cal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s5); align-items: stretch; margin-bottom: var(--s5); }
.wb-cal > .card { min-width: 0; }

/* —— 月历 —— */
.wb-cal .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.wb-cal .cal-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; white-space: nowrap; }   /* 防窄容器下标题被压成竖排 */
.wb-cal .cal-title .arrow { border: 0; background: transparent; color: var(--text-3); font-size: 18px; cursor: pointer; padding: 2px 9px; border-radius: 8px; font-family: inherit; line-height: 1; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.wb-cal .cal-title .arrow:hover { background: var(--surface-2); color: var(--text); }
.wb-cal .weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; font-size: 12px; letter-spacing: .1em; color: var(--text-3); padding-bottom: 6px; }
.wb-cal .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 2px; }   /* minmax(0,1fr)：列可收缩，数字不会撑破卡片 */
.wb-cal .cal-grid.fade-in { animation: wbGridIn var(--dur-fast) var(--ease-out); }
@keyframes wbGridIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* 格子：纯数字（无任何标记）；深浅 = 当天安排分量（dayShade 唯一定档） */
.wb-cal .cal-day { position: relative; height: 56px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.wb-cal .cal-day.other { color: var(--ink-300); cursor: default; }
.wb-cal .cal-num { position: relative; width: 31px; height: 31px; line-height: 31px; text-align: center; border-radius: 50%; font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-400); transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.wb-cal .cal-day.other .cal-num { color: var(--ink-300); }
.wb-cal .cal-day[data-shade="1"] .cal-num { color: var(--ink-600); }
.wb-cal .cal-day[data-shade="2"] .cal-num { color: var(--text); }
.wb-cal .cal-day[data-shade="3"] .cal-num { color: var(--text); font-weight: 800; }
.wb-cal .cal-day:hover .cal-num { background: var(--surface-2); }
.wb-cal .cal-day.selected .cal-num { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.wb-cal .cal-day.selected:hover .cal-num { background: var(--primary); }

/* —— 详情区 —— */
/* 限高 = 月历卡实际高度（JS syncDetailHeight 同步），超出内部滚动：
   内容再多也不把下方卡片推远；单列（≤1024px）不限高，随页面流式滚动 */
.wb-cal .cal-detail { display: flex; flex-direction: column; }
.wb-cal .cal-detail .detail-body { overflow-y: auto; flex: 1; min-height: 0; }
.wb-cal .cal-detail .detail-body::-webkit-scrollbar { width: 6px; }
.wb-cal .cal-detail .detail-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.wb-cal .cal-detail .detail-body::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }
.wb-cal .cal-detail .detail-body::-webkit-scrollbar-track { background: transparent; }
.wb-cal .detail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s4); }
.wb-cal .detail-head h2 { font-size: 17px; margin: 0; font-weight: 700; }
.wb-cal .detail-head .sub { font-size: 12.5px; color: var(--text-3); }
.wb-cal .sec-title { font-size: 11.5px; letter-spacing: .14em; color: var(--text-3); margin: var(--s4) 0 var(--s2); }
.wb-cal .sec-title:first-of-type { margin-top: 0; }
.wb-cal .empty { color: var(--text-3); font-size: 13px; padding: 6px 0; }
.wb-cal .wk-head { display: flex; align-items: center; justify-content: space-between; }
.wb-cal .wk-toggle { border: 0; background: none; font: inherit; font-size: 11.5px; letter-spacing: .05em;
  color: var(--text-3); cursor: pointer; padding: 8px 0; min-height: 32px;
  transition: color var(--dur-fast) var(--ease-out); }
.wb-cal .wk-toggle:hover { color: var(--text); }
.wb-cal .wk-arrow { display: inline-block; }
.wb-cal .wk-list { margin-top: 2px; }
.wb-cal .wk-list .ev { padding: 5px 0; }
.wb-cal .ev { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; }
.wb-cal .ev::before { content: ""; width: 3px; border-radius: 2px; align-self: stretch; background: var(--evc); flex: none; }
.wb-cal .ev .t { font-size: 13.5px; font-weight: 600; }
.wb-cal .ev .d { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.wb-cal .ev.cancelled .t { text-decoration: line-through; color: var(--text-3); }
.wb-cal .ev.cancelled::before { opacity: .4; }

/* 待办条目（cal-todo：与全局 .todo 列表行区分） */
.wb-cal .cal-todo-row { position: relative; display: flex; align-items: flex-start; }
.wb-cal .cal-todo { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; cursor: pointer; border-radius: 10px; flex: 1; min-width: 0; -webkit-tap-highlight-color: transparent; }
.wb-cal .cal-todo input { appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--ink-300); border-radius: 6px; margin: 2px 0 0; cursor: pointer; position: relative; flex: none; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.wb-cal .cal-todo input:checked { background: var(--primary); border-color: var(--primary); }
.wb-cal .cal-todo input:checked::after { content: ""; position: absolute; left: 5.5px; top: 2px; width: 5.5px; height: 10px; border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(42deg); animation: wbCheckIn var(--dur-norm) var(--ease-out); }
@keyframes wbCheckIn { from { opacity: 0; transform: rotate(42deg) scale(.4); } to { opacity: 1; transform: rotate(42deg) scale(1); } }
.wb-cal .cal-todo .tt { font-size: 14.5px; transition: color var(--dur-norm), opacity var(--dur-norm); }
.wb-cal .cal-todo .due { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.wb-cal .cal-todo.done .tt { color: var(--text-3); text-decoration: line-through; opacity: .7; }
.wb-cal .prep { display: inline-block; font-size: 11px; color: var(--text-3); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
/* 删除：默认常显（触屏无 hover 能力）；有悬停能力的设备上默认隐藏、悬停浮现 */
.wb-cal .cal-del { position: absolute; right: 0; top: 4px; border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 14px; line-height: 1; padding: 8px; border-radius: 8px; transition: opacity var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.wb-cal .cal-del:hover { color: var(--c-red); background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) {
  .wb-cal .cal-del { opacity: 0; }
  .wb-cal .cal-todo-row:hover .cal-del { opacity: 1; }
}

/* 添加待办：圆圈加号 → 展开输入行 */
.wb-cal .add-wrap { margin-top: var(--s2); }
.wb-cal .add-todo { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1.5px dashed var(--ink-300); border-radius: 50%; background: none; color: var(--text-3); cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.wb-cal .add-todo:hover { border-style: solid; border-color: var(--primary); color: var(--primary); background: var(--surface-2); transform: translateY(-1px); }
.wb-cal .add-todo:active { transform: scale(.94); }
.wb-cal .add-todo svg { display: block; }
.wb-cal .add-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; animation: wbFormIn var(--dur-norm) var(--ease-out); }
.wb-cal .add-form[hidden] { display: none; }
@keyframes wbFormIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.wb-cal .add-form input[type="text"], .wb-cal .add-form input[type="date"] { font-family: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; height: 34px; transition: border-color var(--dur-fast) var(--ease-out); }
.wb-cal .add-form input[type="text"] { flex: 1; min-width: 140px; }
.wb-cal .add-form input:hover { border-color: var(--ink-300); }
.wb-cal .add-form input:focus { outline: none; border-color: var(--primary); }
.wb-cal .add-form .seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px; gap: 2px; background: var(--surface-2); }
.wb-cal .add-form .seg button { border: 0; background: none; font-family: inherit; font-size: 12.5px; color: var(--text-2); padding: 4px 11px; border-radius: var(--r-pill); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.wb-cal .add-form .seg button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.wb-cal .add-form .ok { border: 0; background: var(--primary); color: var(--on-primary); font-family: inherit; font-size: 13px; font-weight: 600; padding: 0 16px; height: 34px; border-radius: var(--r-pill); cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.wb-cal .add-form .ok:hover { opacity: .92; }
.wb-cal .add-form .ok:active { transform: scale(.96); }
.wb-cal .add-err { font-size: 12.5px; color: var(--c-red); margin-top: 6px; }

/* —— 周条（≤1024px 替代整月网格：7 天横排，点相邻天一步直达 · 2026-10-11）—— */
.weekbar { display: none; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 0 calc(-1 * var(--s3)); }   /* 出血到卡片内边距：7 格触摸目标 ≥44px（375 屏实测 41→44.4） */
.weekbar .wb-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0 8px; border-radius: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.weekbar .wd { font-size: 10.5px; letter-spacing: .08em; color: var(--text-3); }
.weekbar .wn {
  position: relative; width: 34px; height: 34px; line-height: 34px; text-align: center;
  border-radius: 50%; font-size: 15.5px; font-weight: 600; color: var(--ink-600);
  font-variant-numeric: tabular-nums;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.weekbar .wb-item.today .wn { color: var(--text); }
.weekbar .wb-item.today .wn::after {          /* 今天的标记：数字下 4px 墨点 */
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--primary); transform: translateX(-50%);
}
.weekbar .wb-item.sel .wn { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.weekbar .wb-item.sel .wn::after { background: var(--on-primary); }
.weekbar .wb-item:active .wn { background: var(--surface-2); }
.weekbar .wb-item.sel:active .wn { background: var(--primary); }
@media (hover: hover) and (pointer: fine) {
  .weekbar .wb-item:hover .wn { background: var(--surface-2); }
  .weekbar .wb-item.sel:hover .wn { background: var(--primary); }
}

/* —— 整月浮层（窄屏点月份展开；挂 body 级，借 wb-cal 类复用月历部件样式）—— */
.cal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgb(var(--sh-color) / .32);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh var(--s4) var(--s4); overscroll-behavior: contain;
  animation: calFade var(--dur-fast) var(--ease-out);
}
.cal-overlay[hidden] { display: none; }       /* 显式覆盖：上方 display:flex 会盖掉 UA 的 hidden 规则 */
@keyframes calFade { from { opacity: 0; } }
.wb-cal.cal-panel {                           /* 面板是单块内容，不是两列 grid 容器 */
  display: block; margin: 0; width: 100%; max-width: 420px;
  animation: calPanelIn var(--dur-norm) var(--ease-out);
}
@keyframes calPanelIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ============================================================
   成绩数据看板（考试页顶部：原「数据视角」并入 · 2026-10-11）
   与工具箱（工具页 · 2026-10-11）
   ============================================================ */
.kb-stats { margin-bottom: var(--s4); }
.kb-list { display: flex; flex-direction: column; gap: 10px; }
.kb-row { display: grid; grid-template-columns: 84px 1fr 46px; align-items: center; gap: var(--s3); }
.kb-row .kb-label { font-size: 13px; color: var(--text-2); text-align: right; }
.kb-row .kb-track { height: 8px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.kb-row .kb-fill { display: block; height: 100%; width: var(--w, 0%); background: var(--primary);
  border-radius: var(--r-pill); transition: width var(--dur-slow) var(--ease-out); }
.kb-row .kb-num { font-size: 13px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums; text-align: right; }
.tool-desc { margin: 0 0 var(--s4); font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.tool-planned { opacity: .6; cursor: default; }

/* 学生页：积分奖惩 + 悬赏（2026-10-11，记账逻辑移植自合并平台） */
.stu-ops { display: flex; gap: 4px; }
.stu-ops .pill { min-width: 38px; text-align: center; }
.stu-ops .stu-add { color: var(--c-green); }
.stu-ops .stu-sub { color: var(--c-red); }
.stu-form { display: flex; gap: 6px; margin-top: 8px; }
.stu-form[hidden] { display: none; }
.stu-form input[type="text"] { flex: 1; min-width: 120px; font-family: inherit; font-size: 13px;
  padding: 6px 10px; height: 34px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); }
.stu-form input[type="text"]:focus { outline: none; border-color: var(--primary); }
.bounty-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s4); }
.bounty-form input { font-family: inherit; font-size: 13px; padding: 6px 10px; height: 36px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.bounty-form input[name="title"] { flex: 1; min-width: 160px; }
.bounty-form input[type="number"] { width: 80px; }
.bounty-form input[name="description"] { flex: 1; min-width: 140px; }
.bounty { display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 12px 0; border-top: 1px solid var(--line); }
.bounty.closed { opacity: .55; }
.bounty-main { min-width: 0; font-size: 13.5px; }
.bounty-main .muted { font-size: 12.5px; margin-top: 3px; }
.bounty-ops { display: flex; gap: 8px; align-items: center; flex: none; }
.bounty-complete { display: flex; gap: 6px; }
.bounty-complete select { font-family: inherit; font-size: 13px; height: 34px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.page-err { background: color-mix(in srgb, var(--c-red) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c-red) 25%, var(--surface));
  color: var(--c-red); border-radius: var(--r-el); padding: 10px 14px;
  margin-bottom: var(--s4); font-size: 13.5px; }

/* 窄视口（≤1024px）：单列堆叠 + 月历改「周条」模式（首屏空间让给详情）
   2026-10-11：修复原断点漏掉 780–1024 区间（网格溢出）；周条为移动端信息密度方案 */
@media (max-width: 1024px) {
  .wb-cal { grid-template-columns: 1fr; gap: var(--s4); }
  .wb-cal > .card { padding: var(--s4); }                    /* 卡片收紧：密度 + 周条触摸目标 44px 达标 */
  .wb-cal .cal-pane .weekbar { display: grid; }              /* 周条替代整月网格 */
  .wb-cal .cal-pane .weekdays,
  .wb-cal .cal-pane .cal-grid { display: none; }
  .wb-cal .cal-pane .cal-title { cursor: pointer; }          /* 点月份展开整月浮层 */
  .wb-cal .cal-pane .cal-title span::after {
    content: "▾"; font-size: 10px; color: var(--text-3); margin-left: 3px; vertical-align: 2px;
  }
}

/* 移动端（铁律 F1）：交互目标 ≥44px */
@media (max-width: 760px) {
  .wb-cal .cal-day { height: 46px; }   /* 7 列 × 48px 在 375 宽屏会溢出，46px 为不溢出的最大档 */
  .wb-cal .add-todo { width: 44px; height: 44px; }
  .wb-cal .cal-title .arrow { padding: 11px 14px; }
  .wb-cal .add-form input[type="text"], .wb-cal .add-form input[type="date"], .wb-cal .add-form .ok { height: 44px; }
  .wb-cal .add-form .seg button { padding: 10px 14px; }
  .wb-cal .cal-del { padding: 14px; top: 0; }
}

/* 动效安全 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .bar-fill { animation: none; width: var(--w, 100%); }
}

/* ============================================================
   托管登记（E1）——入口小方钮 + 弹层（2026-10-11 改版）
   设计依据：docs/设计-教师块总纲-20261011.md §4.1
   形态：常驻大卡 → 44px 方钮（右上角状态点=今日两节登记齐）
   弹层复用 cal-overlay 模式；移动端贴底抽屉
   ============================================================ */

/* —— 入口方钮（下方带文字标注）—— */
.care-entry { margin-top: var(--s5); display: flex; flex-direction: column; align-items: center; gap: 6px; width: fit-content; }
.care-label { font-size: 12px; line-height: 1; color: var(--text-3); letter-spacing: .02em;
  transition: color var(--dur-fast) var(--ease-out); }
.care-entry:hover .care-label { color: var(--text-2); }
.care-fab {
  position: relative; width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--text-2); cursor: pointer; box-shadow: var(--sh-card);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.care-fab:hover { border-color: var(--ink-300); color: var(--text); background: var(--surface-2); transform: translateY(-1px); }
.care-fab:active { transform: scale(.95); }
.care-fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.care-fab svg { display: block; }
.care-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--c-green); }

/* —— 弹层 —— */
.care-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgb(var(--sh-color) / .32);
  display: flex; align-items: center; justify-content: center;
  padding: 6vh var(--s4); overscroll-behavior: contain;
  animation: calFade var(--dur-fast) var(--ease-out);   /* 与整月浮层同一淡入 */
}
.care-overlay[hidden] { display: none; }               /* 显式覆盖 display:flex */
.care-panel {
  width: 100%; max-width: 460px; margin: 0;
  max-height: 86vh; overflow: auto;
  animation: calPanelIn var(--dur-norm) var(--ease-out);
}
.care-panel .care-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.care-panel .care-head h2 { font-size: 16px; font-weight: 700; }
.care-panel .care-head .sub { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.care-x {
  flex: none; width: 34px; height: 34px; padding: 0; margin-right: -6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: none; color: var(--text-3); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.care-x:hover { background: var(--surface-2); color: var(--text); }
.care-x:active { transform: scale(.94); }
.care-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.care-panel .care-cls { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); flex-wrap: wrap; }
.care-panel .care-cls label { font-size: 13px; color: var(--text-2); flex: none; }
.care-panel select,
.care-panel input[type="date"] {
  font-family: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-el); padding: 8px 12px;
  min-height: 42px; max-width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.care-panel select:hover { border-color: var(--ink-300); }
.care-panel select:focus,
.care-panel input[type="date"]:focus { outline: none; border-color: var(--primary); }
.care-sess { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.care-sess .info { flex: 1; min-width: 170px; }
.care-sess .info b { font-size: 15px; }
.care-sess .info .mut { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.care-sess .pill { min-width: 110px; text-align: center; justify-content: center; }
.care-sess .pill.done { background: var(--surface-2); color: var(--c-green); }
.care-sess .pill[disabled] { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; font-weight: 400; }
.care-extra { margin-top: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s2); }
.care-extra .link {
  background: none; border: none; padding: 10px 0; min-height: 44px; font: inherit;
  font-size: 13px; color: var(--text-3); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.care-extra .link:hover { color: var(--text-2); }
.care-extra-form { display: grid; gap: var(--s2); margin-top: var(--s1); }
.care-extra-form[hidden] { display: none; }
.care-rowline { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.care-err { font-size: 13px; color: var(--c-red); }
.care-ok { font-size: 13px; color: var(--c-green); font-weight: 600; }

/* 移动端：同样居中显示（2026-10-12 按用户要求，弃用贴底抽屉形态）；触发钮保持 44px 触摸目标 */
@media (max-width: 760px) {
  .care-overlay { padding: 5vh var(--s3); }   /* align-items:center 沿用基础样式 → 屏幕居中 */
  .care-panel { max-width: none; max-height: 86vh; }   /* 四角圆角与上浮动画沿用默认（calPanelIn） */
  .care-sess .pill { width: 100%; }
  .care-rowline select, .care-rowline input[type="date"], .care-rowline .pill { flex: 1 1 auto; }
}
