/* ==========================================================================
   考研工作台 · 台灯
   像深夜书桌上唯一亮着的台灯：光只照着下一件该做的事，其余退进暗处。
   白天是纸面；夜里是冷蓝的夜加一圈暖光。明暗由 theme.js 按时间（或手动选择）写到 data-theme 上。
   设计说明：UI改版/设计说明.md
   ========================================================================== */

/* 白天 */
:root {
  color-scheme: light;
  --bg: #f1f0ec;
  --bg-tint: #e9e7e1;
  --surface: #fbfaf7;
  --surface-2: #f6f5f1;
  --surface-3: #ecebe5;
  --glass: rgba(251, 250, 247, 0.9);
  --glass-strong: rgba(251, 250, 247, 0.96);
  --line: rgba(36, 38, 43, 0.09);
  --line-strong: rgba(36, 38, 43, 0.17);
  --text: #24262b;
  --text-2: #4f5560;
  --text-3: #666c76;
  --ink: #24262b;
  --on-ink: #fbfaf7;
  --accent: #9a560a;
  --on-accent: #fff9ef;
  --accent-soft: rgba(154, 86, 10, 0.1);
  --danger: #b4442f;
  --danger-soft: rgba(180, 68, 47, 0.1);
  --warn: #8f6410;
  --warn-soft: rgba(143, 100, 16, 0.12);
  --ok: #5e7f4e;
  --ok-soft: rgba(94, 127, 78, 0.13);
  --seg-on: #fbfaf7;
  /* 导师：一颗暖色的灯泡光点 */
  --ai-1: #fff6e2;
  --ai-2: var(--accent);
  --ai-3: #c47a22;
  --ai-grad: radial-gradient(circle at 50% 40%, #fff6e2 0%, #f5cf8e 38%, #e39a3b 72%, #b86f22 100%);
  /* 被照亮的纸：白天就是更白的一张纸 */
  --paper: #ffffff;
  --paper-ink: #24262b;
  --paper-ink-2: #4f5560;
  --paper-line: rgba(36, 38, 43, 0.1);
  --paper-shadow: 0 1px 2px rgba(36, 38, 43, 0.06), 0 14px 36px -12px rgba(36, 38, 43, 0.2);
  /* 灯光：白天不开灯 */
  --lamp: transparent;
  --lamp-room: none;
  --shadow-xs: 0 1px 2px rgba(36, 38, 43, 0.05);
  --shadow-sm: 0 1px 2px rgba(36, 38, 43, 0.05), 0 2px 8px rgba(36, 38, 43, 0.04);
  --shadow-md: 0 2px 6px rgba(36, 38, 43, 0.06), 0 12px 30px rgba(36, 38, 43, 0.08);
  --shadow-lg: 0 8px 24px rgba(36, 38, 43, 0.1), 0 30px 80px rgba(36, 38, 43, 0.16);
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  /* 文楷：任务名、标题、导师说的话 */
  --font-kai: 'WenKai', 'LXGW WenKai', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
  /* 数字：细的系统字，等宽 */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --topbar-h: 56px;
  --ai-w: 408px;
  --tabbar-h: 0px;
  --pill-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* 夜里：冷蓝的夜，内容区上方一圈暖光 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #151922;
    --bg-tint: #191e28;
    --surface: #1b202a;
    --surface-2: #212734;
    --surface-3: #2a3140;
    --glass: rgba(27, 32, 42, 0.9);
    --glass-strong: rgba(27, 32, 42, 0.96);
    --line: rgba(196, 210, 232, 0.08);
    --line-strong: rgba(196, 210, 232, 0.16);
    --text: #e6e1d7;
    --text-2: #a3abb9;
    --text-3: #8690a0;
    --ink: #e6e1d7;
    --on-ink: #151922;
    --accent: #e39a3b;
    --on-accent: #1d1508;
    --accent-soft: rgba(227, 154, 59, 0.14);
    --danger: #e0705c;
    --danger-soft: rgba(224, 112, 92, 0.14);
    --warn: #d8b25a;
    --warn-soft: rgba(216, 178, 90, 0.14);
    --ok: #8db07a;
    --ok-soft: rgba(141, 176, 122, 0.15);
    --seg-on: #343c4d;
    --paper: #f3ebdc;
    --paper-ink: #2b2118;
    --paper-ink-2: #6b5b49;
    --paper-line: rgba(43, 33, 24, 0.12);
    --paper-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 26px 60px -18px rgba(0, 0, 0, 0.75), 0 0 90px -24px rgba(247, 200, 120, 0.4);
    --lamp: rgba(247, 214, 160, 0.1);
    --lamp-room: radial-gradient(ellipse 70% 52% at 50% -6%, rgba(247, 214, 160, 0.11), rgba(247, 214, 160, 0.035) 55%, transparent 78%);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 30px 80px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #151922;
  --bg-tint: #191e28;
  --surface: #1b202a;
  --surface-2: #212734;
  --surface-3: #2a3140;
  --glass: rgba(27, 32, 42, 0.9);
  --glass-strong: rgba(27, 32, 42, 0.96);
  --line: rgba(196, 210, 232, 0.08);
  --line-strong: rgba(196, 210, 232, 0.16);
  --text: #e6e1d7;
  --text-2: #a3abb9;
  --text-3: #8690a0;
  --ink: #e6e1d7;
  --on-ink: #151922;
  --accent: #e39a3b;
  --on-accent: #1d1508;
  --accent-soft: rgba(227, 154, 59, 0.14);
  --danger: #e0705c;
  --danger-soft: rgba(224, 112, 92, 0.14);
  --warn: #d8b25a;
  --warn-soft: rgba(216, 178, 90, 0.14);
  --ok: #8db07a;
  --ok-soft: rgba(141, 176, 122, 0.15);
  --seg-on: #343c4d;
  --paper: #f3ebdc;
  --paper-ink: #2b2118;
  --paper-ink-2: #6b5b49;
  --paper-line: rgba(43, 33, 24, 0.12);
  --paper-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 26px 60px -18px rgba(0, 0, 0, 0.75), 0 0 90px -24px rgba(247, 200, 120, 0.4);
  --lamp: rgba(247, 214, 160, 0.1);
  --lamp-room: radial-gradient(ellipse 70% 52% at 50% -6%, rgba(247, 214, 160, 0.11), rgba(247, 214, 160, 0.035) 55%, transparent 78%);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 30px 80px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass: var(--surface);
    --glass-strong: var(--surface);
  }
}
@media (prefers-contrast: more) {
  :root {
    --line: rgba(0, 0, 0, 0.3);
    --line-strong: rgba(0, 0, 0, 0.5);
    --text-2: #2c2c33;
    --text-3: #4c4c55;
  }
  :root[data-theme='dark'] {
    --line: rgba(255, 255, 255, 0.3);
    --line-strong: rgba(255, 255, 255, 0.5);
    --text-2: #d2d6de;
    --text-3: #b3b9c4;
  }
}

/* —— 基础 —— */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'palt' 0;
  /* 文楷只有一个字重，不要让浏览器硬加粗 */
  font-synthesis-weight: none;
  overflow-x: hidden;
}
/* 夜里内容区上方的一圈暖光；白天 --lamp-room 是 none */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--lamp-room);
  transition: opacity 1.2s ease;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h1,
h2,
h3,
.kai {
  font-family: var(--font-kai);
  font-weight: 400;
  letter-spacing: 0;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
::selection {
  background: var(--accent-soft);
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* —— 启动画面 —— */
.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--text-3);
}
.boot-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ai-grad);
  animation: breathe 2.4s var(--ease) infinite;
  box-shadow: 0 0 60px rgba(247, 200, 120, 0.45);
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.85;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================================================
   外壳布局
   没有侧栏：顶上一行小字导航，内容居中。导师面板在桌面从右侧展开（可以边说边看页面变化），
   平板从右侧滑出，手机从底部升起。每一页底部居中一条「跟导师说」。
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ai-w);
  min-height: 100dvh;
}
.shell.ai-closed {
  grid-template-columns: minmax(0, 1fr) 0;
}
.stage-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 顶栏：不吸顶，不加底色，夜里不挡住上方的灯光 */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: calc(1120px + 2 * clamp(18px, 3vw, 40px));
  min-height: var(--topbar-h);
  margin: 0 auto;
  padding: max(6px, env(safe-area-inset-top)) clamp(18px, 3vw, 40px) 0;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin-left: -9px;
}
.topnav-item {
  position: relative;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.topnav-item:hover {
  color: var(--text);
}
.topnav-item.active {
  color: var(--accent);
}
.topnav-item.more {
  display: none;
}
.nav-badge {
  margin-left: 2px;
  color: var(--text-3);
  font: 600 10.5px/1 var(--font);
  font-variant-numeric: tabular-nums;
  vertical-align: 0.55em;
}
.nav-badge.hot {
  color: var(--danger);
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
}
.tb-left .num {
  color: var(--text-2);
  font-weight: 500;
}
.topbar .menu-btn,
.topbar-title {
  display: none;
}
.topbar .theme-cycle {
  margin-right: -8px;
}
/* 外观：「更多」和设置页里的三段式 */
.theme-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.theme-seg svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.more-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.more-list {
  display: grid;
}
.more-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 50px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: 400 18px/1.2 var(--font-kai);
  text-align: left;
}
.more-item:last-child {
  border-bottom: 0;
}
.more-item.active {
  color: var(--accent);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: ease;
}

.main {
  flex: 1;
  min-width: 0;
  /* 灯光比版面宽，裁掉两侧，免得手机上整页被撑宽 */
  overflow-x: clip;
  padding: 10px clamp(18px, 3vw, 40px) calc(var(--pill-h) + var(--safe-b) + 56px);
  container-type: inline-size;
  container-name: main;
}
.page {
  max-width: 1120px;
  margin: 0 auto;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 27px;
  line-height: 1.15;
}
.page-head p {
  color: var(--text-2);
  margin-top: 6px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* —— AI 面板（桌面右侧，展开后常驻）—— */
.ai-dock {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}
.shell.ai-closed .ai-dock {
  border-left: 0;
}

/* —— 跟导师说：每页底部居中 —— */
.coach-pill {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-b));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2px;
  width: min(560px, calc(100vw - 32px));
  height: var(--pill-h);
  padding: 0 7px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--pill-h) / 2);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.shell:not(.ai-closed) .coach-pill {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
}
.coach-pill-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  padding: 0 6px 0 2px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 14.5px;
  text-align: left;
}
.coach-pill-main span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coach-pill-main:hover {
  color: var(--text-2);
}
.coach-pill .orb {
  width: 28px;
  height: 28px;
}
.coach-pill .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 20px;
}

@media (max-width: 1180px) {
  .shell,
  .shell.ai-closed {
    grid-template-columns: minmax(0, 1fr);
  }
  .topnav-item.secondary {
    display: none;
  }
  .topnav-item.more {
    display: inline-block;
  }
  .tb-phase {
    display: none;
  }
  .ai-dock {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    z-index: 60;
    box-shadow: var(--shadow-lg);
    transform: translateX(0);
    transition: transform 0.42s var(--ease);
  }
  .shell.ai-closed .ai-dock {
    transform: translateX(104%);
    box-shadow: none;
  }
  .ai-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(8, 10, 16, 0.38);
    animation: fade-in 0.3s var(--ease);
  }
  .shell.ai-closed .ai-scrim {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .topbar {
    gap: 6px;
    padding-left: 8px;
    padding-right: 16px;
  }
  .topbar .menu-btn {
    display: inline-grid;
  }
  .topbar-title {
    display: block;
    font: 400 18px/1 var(--font-kai);
    color: var(--text);
  }
  .topnav,
  .tb-date {
    display: none;
  }
  .topbar .theme-cycle {
    display: none;
  }
  .main {
    padding: 4px 16px calc(var(--pill-h) + var(--safe-b) + 44px);
  }
  .page-head {
    margin: 6px 0 18px;
  }
  /* 手机顶栏已经写着页名，这里不再重复 */
  .page-head h1 {
    display: none;
  }
  .page-head p {
    margin-top: 0;
    font-size: 13.5px;
  }
  .coach-pill {
    bottom: calc(12px + var(--safe-b));
  }
  .ai-dock {
    top: auto;
    left: 0;
    width: 100%;
    height: calc(100dvh - max(28px, env(safe-area-inset-top)));
    border-radius: 22px 22px 0 0;
    border-left: 0;
    transform: translateY(0);
    transition: transform 0.46s var(--ease);
  }
  .shell.ai-closed .ai-dock {
    transform: translateY(104%);
  }
  .shell.ai-dragging .ai-dock {
    transition: none;
  }
}

/* ==========================================================================
   组件
   ========================================================================== */
.card {
  min-width: 0;
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line);
}
.card-pad {
  padding: 18px 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 6px;
}
.card-head h2,
.card-head h3 {
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.card-head .sub {
  color: var(--text-3);
  font: 400 13px/1 var(--font);
}
.card-body {
  padding: 8px 20px 18px;
}
.section {
  margin-top: 28px;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 2px 12px;
  gap: 12px;
}
.section-title h2 {
  font-size: 21px;
}
.section-title small {
  color: var(--text-3);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-today {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
@container main (max-width: 900px) {
  .grid-today {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container main (max-width: 780px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container main (max-width: 480px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row.wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), background 0.18s var(--ease), border-color 0.18s, opacity 0.18s, box-shadow 0.18s;
  user-select: none;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.btn:hover {
  background: var(--surface-2);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 90%, var(--text));
}
.btn.primary:active {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 6px -4px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn.ai {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}
.btn.ghost:hover {
  background: var(--surface-3);
  color: var(--text);
}
.btn.danger {
  color: var(--danger);
}
.btn.danger.solid {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}
.btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 9px;
}
.btn.xs {
  height: 26px;
  padding: 0 8px;
  font-size: 12.5px;
  border-radius: 8px;
  gap: 4px;
}
.btn.xs svg {
  width: 14px;
  height: 14px;
}
.btn.lg {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  border-radius: 13px;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  transition: background 0.16s, color 0.16s, transform 0.12s;
  flex: none;
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}
.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.icon-btn:active {
  transform: scale(0.92);
}
.icon-btn.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.icon-btn.sm svg {
  width: 16px;
  height: 16px;
}

/* 输入 */
.field {
  display: grid;
  gap: 6px;
}
.field > label,
.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field .hint {
  font-size: 12px;
  color: var(--text-3);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 90px;
}
.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8b96' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.input.sm,
.select.sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13.5px;
  border-radius: 9px;
}
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .full {
  grid-column: 1 / -1;
}
@container main (max-width: 540px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 分段控件 */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--surface-3);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar {
  display: none;
}
.seg button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s, box-shadow 0.2s;
}
.seg button.on {
  background: var(--seg-on);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* 科目标签 */
/* 科目：一个小色点加文字，不用彩色底 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-2);
}
.chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c, #8e8e93) 75%, var(--text-3));
  flex: none;
}
.chip.plain,
.chip.warn,
.chip.danger,
.chip.ok,
.chip.ai {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-weight: 600;
}
.chip.plain::before,
.chip.warn::before,
.chip.danger::before,
.chip.ok::before,
.chip.ai::before {
  display: none;
}
.chip.plain {
  background: var(--surface-3);
  color: var(--text-2);
}
.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.chip.ai {
  background: var(--accent-soft);
  color: var(--accent);
}
.filter-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 560;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.16s var(--ease);
}
.filter-chip .sw {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.filter-chip.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}
.badge.soft {
  background: var(--surface-3);
  color: var(--text-2);
}
.pri {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.pri.高 {
  background: var(--danger);
}
.pri.中 {
  background: var(--accent);
}
.pri.低 {
  background: var(--text-3);
}

/* 进度条与圆环 */
.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--c, var(--accent));
  transition: width 0.6s var(--ease-out);
}
.bar.thin {
  height: 4px;
}
.ring {
  --size: 56px;
  width: var(--size);
  height: var(--size);
  position: relative;
  flex: none;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}
.ring .track {
  stroke: var(--surface-3);
}
.ring .val {
  stroke: var(--c, var(--accent));
  transition: stroke-dashoffset 0.9s var(--ease-out);
}
.ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 14px/1 var(--font-display);
  letter-spacing: -0.02em;
}

/* 复选框（圆形） */
.check {
  --c: var(--accent);
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1.8px solid var(--line-strong);
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.14s var(--ease), box-shadow 0.3s;
  color: var(--on-accent);
}
.check svg {
  width: 13px;
  height: 13px;
  stroke-width: 3.2;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.28s var(--ease-out);
}
.check:hover {
  border-color: var(--c);
}
.check:active {
  transform: scale(0.88);
}
.check.on {
  background: var(--c);
  border-color: var(--c);
  box-shadow: 0 0 12px -2px color-mix(in srgb, var(--c) 60%, transparent);
}
.check.on svg {
  opacity: 1;
  transform: scale(1);
}
.check.half {
  border-color: var(--c);
  background: conic-gradient(var(--c) var(--p, 50%), transparent 0);
}
.check.sq {
  border-radius: 7px;
}

/* 开关 */
.switch {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  border: 0;
  padding: 0;
  background: var(--surface-3);
  position: relative;
  transition: background 0.25s var(--ease);
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease);
}
.switch.on {
  background: var(--accent);
}
.switch.on::after {
  transform: translateX(18px);
}

/* 列表行 */
.list {
  display: grid;
}
.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.item:first-child {
  border-top: 0;
}
.item-main {
  flex: 1;
  min-width: 0;
}
.item-title {
  font: 400 16px/1.45 var(--font-kai);
  word-break: break-word;
}
.item-title.done {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}
.item-meta .late {
  color: var(--danger);
  font-weight: 600;
}
.item.clickable {
  cursor: pointer;
  border-radius: 10px;
}
.item.clickable:hover .item-title {
  color: var(--accent);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 10px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}
.empty svg {
  width: 30px;
  height: 30px;
  opacity: 0.6;
}

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 10, 16, 0.42);
  animation: fade-in 0.28s var(--ease);
}
.overlay.closing {
  animation: fade-out 0.24s var(--ease) forwards;
}
.sheet {
  width: min(560px, 100%);
  max-height: min(86dvh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: sheet-in 0.42s var(--ease);
  overflow: hidden;
}
.overlay.closing .sheet {
  animation: sheet-out 0.24s var(--ease) forwards;
}
.sheet.wide {
  width: min(760px, 100%);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px 22px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 {
  font-size: 20px;
  flex: 1;
}
.sheet-body {
  padding: 18px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.grabber {
  display: none;
}
@media (max-width: 760px) {
  .overlay {
    place-items: end center;
    padding: 0;
  }
  .sheet,
  .sheet.wide {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    padding-bottom: var(--safe-b);
    animation: sheet-up 0.46s var(--ease);
  }
  .overlay.closing .sheet {
    animation: sheet-down 0.3s var(--ease) forwards;
  }
  .grabber {
    display: block;
    width: 38px;
    height: 5px;
    border-radius: 3px;
    background: var(--line-strong);
    margin: 8px auto -2px;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
  }
}
@keyframes sheet-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}
@keyframes sheet-down {
  to {
    transform: translateY(100%);
  }
}

/* 提示条 */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: min(520px, calc(100vw - 32px));
}
@media (max-width: 760px) {
  .toasts {
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 76px);
  }
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: toast-in 0.4s var(--ease);
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
.toast span {
  flex: 1;
  min-width: 0;
}
.toast button {
  border: 0;
  background: rgba(127, 127, 127, 0.22);
  color: inherit;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  flex: none;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

/* 菜单 */
.menu {
  position: absolute;
  z-index: 70;
  min-width: 180px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  animation: menu-in 0.22s var(--ease);
  transform-origin: top right;
}
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-size: 14px;
}
.menu button svg {
  width: 17px;
  height: 17px;
  color: var(--text-2);
}
.menu button:hover {
  background: var(--surface-3);
}
.menu button.danger {
  color: var(--danger);
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* 出现动效 */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.flash {
  animation: flash 2.4s var(--ease-out);
}
@keyframes flash {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 154, 59, 0);
  }
  12% {
    box-shadow: 0 0 0 3px rgba(227, 154, 59, 0.5), 0 0 28px rgba(247, 200, 120, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 154, 59, 0);
  }
}
.row-flash {
  animation: row-flash 2.4s var(--ease-out);
}
@keyframes row-flash {
  12% {
    background: var(--accent-soft);
  }
}

/* ==========================================================================
   今日 · 台灯
   灯下（首屏）：中间一张"现在做"的纸卡，光只照着它；左边是报名便签和做完的小叠，
   右边是排队（越往后越暗）、今天的课和一行逾期；底下是导师最近一句话和生活底线。
   暗处（往下滚）：待复习、本周、各科、近 7 天。23:30 以后只劝你去睡。
   ========================================================================== */

.desk {
  position: relative;
  /* 灯下正好一屏：底边留出「跟导师说」的位置 */
  min-height: min(760px, calc(100dvh - var(--topbar-h) - var(--pill-h) - 56px));
  display: flex;
  flex-direction: column;
  padding-bottom: 28px;
}
.desk-greet {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 13.5px;
}
.desk-greet > span:first-child {
  color: var(--text-2);
}
.desk-label {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}
.desk-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 260px);
  grid-template-areas: 'left center right';
  align-items: center;
  gap: 36px;
  padding: 36px 0 28px;
}
.desk-left {
  grid-area: left;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.desk-center {
  grid-area: center;
  position: relative;
  display: grid;
  justify-items: center;
}
.desk-right {
  grid-area: right;
  align-self: center;
}

/* 灯：夜里是一圈暖光，白天几乎看不见 */
.lamp {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 920px;
  height: 680px;
  max-width: 180vw;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(247, 222, 178, 0.28), rgba(240, 196, 128, 0.12) 48%, rgba(231, 184, 119, 0.04) 72%, transparent);
  opacity: 0;
  transition: opacity 1.2s ease;
}
:root[data-theme='dark'] .lamp {
  opacity: 1;
  animation: lamp-on 1.6s var(--ease-out);
}
@keyframes lamp-on {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }
}

/* 现在做：被照亮的纸卡 */
.focus {
  position: relative;
  width: min(100%, 520px);
  padding: 26px 28px 22px;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--paper-shadow);
  border: 1px solid var(--paper-line);
  animation: focus-in 0.6s var(--ease-out);
}
.focus::before {
  /* 极细的纸纹 */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(97deg, transparent 0 3px, rgba(120, 90, 50, 0.025) 3px 4px), repeating-linear-gradient(7deg, transparent 0 5px, rgba(120, 90, 50, 0.018) 5px 6px);
}
.focus > * {
  position: relative;
}
@keyframes focus-in {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.97);
  }
}
.focus.leaving {
  animation: focus-out 0.4s var(--ease) forwards;
}
@keyframes focus-out {
  to {
    opacity: 0;
    transform: translate(-46%, 34%) scale(0.5) rotate(-4deg);
  }
}
.focus-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--paper-ink-2);
}
.focus-kicker > span:first-child {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}
:root[data-theme='dark'] .focus-kicker > span:first-child {
  color: #95530a;
}
.focus .chip {
  color: var(--paper-ink-2);
}
.focus .faint {
  color: color-mix(in srgb, var(--paper-ink-2) 80%, transparent);
}
.focus-title {
  text-wrap: pretty;
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.32;
  color: var(--paper-ink);
  word-break: break-word;
}
.focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--paper-ink-2);
}
.focus-meta b {
  font-weight: 600;
  color: var(--paper-ink);
}
.focus-meta .late {
  color: var(--danger);
}
:root[data-theme='dark'] .focus-meta .late {
  color: #b0452f;
}
.focus-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--paper-line);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paper-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.focus-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.focus .btn:not(.primary) {
  background: transparent;
  color: var(--paper-ink);
  border-color: var(--paper-line);
}
.focus .btn.ghost {
  border-color: transparent;
  color: var(--paper-ink-2);
}
.focus .btn:not(.primary):hover {
  background: rgba(120, 90, 50, 0.07);
}
.focus.quiet .focus-title {
  font-size: 26px;
}

/* 排队：越往后越暗，点哪件就拿到灯下 */
.queue {
  display: grid;
  gap: 2px;
}
.q-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 9px 10px;
  margin: 0 -10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  text-align: left;
  opacity: calc(1 - var(--i, 0) * 0.12);
  transition: opacity 0.25s, background 0.2s;
}
.q-item:hover,
.q-item:focus-visible {
  opacity: 1;
  background: var(--surface-2);
}
.q-title {
  font: 400 15.5px/1.4 var(--font-kai);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.q-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.q-meta .chip {
  height: 16px;
  font-size: 12px;
  color: var(--text-3);
}
.q-more {
  justify-self: start;
  margin: 2px 0 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
}
.q-sum,
.q-none {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
}
.q-classes {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.q-class {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  text-align: left;
}
.q-class .num {
  width: 3em;
  flex: none;
  color: var(--text-3);
}
.q-class > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.q-class.off > span:nth-child(2) {
  text-decoration: line-through;
  color: var(--text-3);
}
.q-overdue {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}
.q-overdue > span {
  margin-right: auto;
}
.q-overdue b {
  color: var(--danger);
  font-weight: 600;
}

/* 做完的：左下角一小叠纸 */
.pile {
  margin-top: auto;
}
.pile-none {
  font-size: 12.5px;
  color: var(--text-3);
}
.pile-stack {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.pile-top,
.pile-under {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font: 400 14px/1.4 var(--font-kai);
  color: var(--text-2);
  position: relative;
  transform: rotate(-1.5deg);
}
.pile-top svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  color: var(--ok);
}
.pile-top span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pile-under {
  position: absolute;
  inset: 0;
  transform: rotate(2.5deg) translate(3px, 3px);
  opacity: 0.6;
}
.pile-under.two {
  transform: rotate(-4deg) translate(-3px, 5px);
  opacity: 0.35;
}
.pile-list {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}
.pile-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  font-size: 13.5px;
  color: var(--text-3);
}
.pile-row .check {
  width: 18px;
  height: 18px;
}
.pile-row .check svg {
  width: 11px;
  height: 11px;
}

/* 报名便签：左上角暗处 */
.memo-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.memo-note-main {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--text);
}
.memo-note-main .desk-label {
  margin: 0 0 2px;
}
.memo-note-main b {
  font-size: 17px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.memo-note-main em {
  font: 500 12.5px/1 var(--font);
  font-style: normal;
  color: var(--accent);
}
.memo-note-main small {
  color: var(--text-3);
  font-size: 12px;
}
.memo-note-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.memo-note-item > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memo-note-item small {
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
}
.memo-note-item small.late {
  color: var(--danger);
}
.memo-note-item .check {
  width: 17px;
  height: 17px;
}
.memo-note-item .check svg {
  width: 10px;
  height: 10px;
}
.memo-note-more {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 12.5px;
}

/* 笔记：置顶标记、阅读时宽行距 */
.pin-mark {
  margin-left: 6px;
  font: 500 11px/1 var(--font);
  font-style: normal;
  color: var(--accent);
  vertical-align: 2px;
}
.notes-layout .md {
  font-size: 15.5px;
  line-height: 1.85;
}

/* 复习轮次：四颗小灯 */
.stages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stages i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.stages i.on {
  background: color-mix(in srgb, var(--accent) 70%, var(--surface));
  box-shadow: none;
}
.stages i.cur {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.stages span {
  margin-left: 4px;
}

/* 灯下的底边：导师最近一句话 + 生活底线 */
.desk-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  flex-wrap: wrap;
}
.coach-line {
  display: grid;
  gap: 8px;
  max-width: 560px;
  min-width: 0;
  flex: 1 1 320px;
}
.coach-say {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  text-align: left;
}
.coach-say .orb {
  width: 22px;
  height: 22px;
  margin-top: 2px;
}
.coach-say .kai {
  font-size: 15.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.coach-say:hover .kai {
  color: var(--text);
}
.slip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 34px;
  padding: 2px 4px 2px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-2);
}
.slip.undone {
  padding-right: 10px;
  color: var(--text-3);
}

.life {
  display: grid;
  gap: 8px;
  justify-items: end;
  margin-left: auto;
}
.life .desk-label {
  margin: 0;
}
.life-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 14px;
}
.life-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13.5px;
  transition: color 0.2s;
}
.life-dot i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.35s;
}
.life-dot:hover {
  color: var(--text-2);
}
.life-dot.on {
  color: var(--text);
}
.life-dot.on i {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 55%, transparent);
}
.mood {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-3);
}
.mood > span:first-child {
  margin-right: 2px;
}
/* 今天状态：五档，越好越亮；没选时只是空心的小圈 */
.mood-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
}
.mood-dot::before {
  content: '';
  width: calc(6px + var(--lv) * 6px);
  height: calc(6px + var(--lv) * 6px);
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.35s;
}
.mood-dot:hover::before {
  border-color: var(--accent);
}
.mood-dot.on::before {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) calc(40% + var(--lv) * 60%), transparent);
  box-shadow: 0 0 calc(var(--lv) * 14px) color-mix(in srgb, var(--accent) 60%, transparent);
}
.mood-word {
  color: var(--text-2);
  min-width: 4em;
}

/* 深夜：光圈缩小变暗，只劝你去睡 */
.desk.late {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 40px 0 60px;
}
.late-light {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 520px;
  height: 420px;
  max-width: 140vw;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(247, 214, 160, 0.14), rgba(231, 184, 119, 0.04) 60%, transparent);
  animation: lamp-dim 2.4s var(--ease-out);
}
@keyframes lamp-dim {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    filter: brightness(1.6);
  }
}
.late-title {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text);
}
.late-sub {
  max-width: 26em;
  text-wrap: balance;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
}
.late-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* 暗处：不在灯下，往下滚才看到 */
.dark-zone {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 48px;
  margin-top: 24px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.zone-col {
  display: grid;
  align-content: start;
  gap: 40px;
  min-width: 0;
}
.zone {
  min-width: 0;
}
.zone-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--text-3);
}
.zone-head h2 {
  font-size: 19px;
  color: var(--text-2);
}
.zone-none {
  font-size: 13.5px;
  color: var(--text-3);
}
.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 本周：每天一根光柱 */
.week-cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.wcol {
  display: grid;
  grid-template-rows: 64px auto auto;
  justify-items: center;
  gap: 6px;
  padding: 6px 0 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-3);
  transition: background 0.18s;
}
.wcol:hover,
.wcol.sel {
  background: var(--surface-2);
}
.wcol-bar {
  align-self: end;
  display: flex;
  align-items: flex-end;
  width: 10px;
  height: 64px;
  border-radius: 5px;
  background: var(--surface-3);
  overflow: hidden;
}
.wcol.evening .wcol-bar {
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
  height: 40px;
}
.wcol-bar i {
  width: 100%;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 70%, var(--text-3));
  transition: height 0.6s var(--ease-out);
}
.wcol.today .wcol-bar i {
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent);
}
.wcol-bar i.over {
  background: var(--danger);
}
.wcol-w {
  font-size: 12.5px;
}
.wcol.today .wcol-w {
  color: var(--accent);
  font-weight: 600;
}
.wcol-n {
  font-size: 11.5px;
}
.wcol.past {
  opacity: 0.6;
}
.day-detail {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}
.z-week .day-detail {
  display: grid;
}

/* 近 7 天：每天一盏灯，越亮学得越久 */
.lights7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 0 2px;
}
.l7 {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.l7 i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 200, 120, var(--a)) 0 40%, rgba(247, 200, 120, calc(var(--a) * 0.35)) 55%, transparent 72%);
  border: 1px solid var(--line-strong);
}
:root[data-theme='light'] .l7 i {
  background: radial-gradient(circle, rgba(196, 122, 34, var(--a)) 0 42%, transparent 46%);
}
.l7.today span {
  color: var(--accent);
  font-weight: 600;
}
.streak {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 12px;
  transition: background 0.16s;
}
.task-row + .task-row {
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
.task-row:hover {
  background: var(--surface-2);
}
.task-row .check {
  margin-top: 1px;
}
.task-row .t {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.group-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin: 12px 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.group-label.late {
  color: var(--danger);
}

.day-detail-head {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
}
.day-detail-head b {
  font-size: 14px;
}
.day-detail-head small {
  font-size: 12.5px;
  color: var(--text-3);
}
.day-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
}
.day-line svg {
  flex: none;
  color: var(--c);
}
.day-line span {
  flex: 1;
  min-width: 0;
}
.day-line span.done {
  color: var(--text-3);
  text-decoration: line-through;
}
.day-line small {
  font-size: 12px;
  color: var(--text-3);
}

/* 各科进度：一行一科 */
.subj-list {
  display: grid;
  column-gap: 28px;
}
@container main (min-width: 561px) and (max-width: 880px) {
  .subj-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.subj {
  display: grid;
  grid-template-columns: minmax(0, 6.5em) minmax(0, 1fr) 3em;
  grid-template-areas: 'name bar pct' 'meta meta meta';
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 9px 8px;
  margin: 0 -8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  text-align: left;
  transition: background 0.16s;
}
.subj:hover {
  background: var(--surface-2);
}
.subj:active {
  background: var(--surface-3);
}
.subj-name {
  grid-area: name;
  display: flex;
  align-items: center;
  gap: 7px;
  font: 400 15px/1.2 var(--font-kai);
  white-space: nowrap;
  min-width: 0;
}
.subj-name::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 75%, var(--text-3));
}
.subj-name em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--warn);
  background: var(--warn-soft);
}
.subj-bar {
  grid-area: bar;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}
.subj-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.8s var(--ease-out);
}
.subj-pct {
  grid-area: pct;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}
.subj-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  padding-left: 15px;
  font-size: 12px;
  color: var(--text-3);
}
.subj-meta .late {
  color: var(--danger);
  font-weight: 600;
}

.focus-line {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}
.focus-line b {
  font: 400 15px/1.4 var(--font-kai);
  color: var(--text-3);
  white-space: nowrap;
}

.change-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.change-row:first-child {
  border-top: 0;
}
.who {
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-2);
}
.who.ai {
  background: var(--accent-soft);
  color: var(--accent);
}
.who svg {
  width: 14px;
  height: 14px;
}
.change-main {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}
.change-main .s {
  line-height: 1.45;
  word-break: break-word;
}
.change-main .s.undone {
  color: var(--text-3);
  text-decoration: line-through;
}
.change-main details {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-2);
}
.change-main summary {
  cursor: pointer;
  color: var(--text-3);
  list-style: none;
}
.change-main summary::-webkit-details-marker {
  display: none;
}
.change-main ul {
  margin: 6px 0 0;
  padding-left: 16px;
}


/* 中等宽度：排队移到灯下面 */
@container main (max-width: 980px) {
  .desk-grid {
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    grid-template-areas: 'left center' 'left right';
    gap: 28px 32px;
  }
  .desk-right {
    align-self: start;
  }
  .desk-left {
    justify-content: flex-start;
  }
  .pile {
    margin-top: 0;
  }
}
/* 窄屏：按重要程度排成一列：现在做 → 接下来 → 生活底线 → 报名 → 做完的 → 暗处 */
@container main (max-width: 680px) {
  .desk {
    min-height: 0;
  }
  .desk-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    padding: 20px 0 8px;
  }
  .desk-left {
    display: contents;
  }
  .desk-center {
    order: 1;
  }
  .desk-right {
    order: 2;
  }
  .memo-note {
    order: 3;
  }
  .pile {
    order: 4;
    margin-top: 0;
  }
  .focus {
    padding: 22px 20px 18px;
  }
  .lamp {
    width: 640px;
    height: 560px;
  }
  .desk-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .life {
    justify-items: start;
  }
  .life-dots {
    justify-content: flex-start;
  }
  .slip {
    margin-left: 0;
  }
  .dark-zone {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .focus,
  .focus.leaving,
  .lamp,
  .late-light {
    animation: none;
  }
  .wcol-bar i,
  .subj-bar i {
    transition: none;
  }
}

/* ==========================================================================
   看板
   ========================================================================== */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  max-width: 100%;
}
.toolbar .scroll::-webkit-scrollbar {
  display: none;
}
/* 文字筛选：一行字，选中的是琥珀色 */
.toolbar .text-filter {
  gap: 2px;
  margin-left: -8px;
}
.tf {
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.18s;
}
.tf:hover {
  color: var(--text);
}
.tf.on {
  color: var(--accent);
  font-weight: 600;
}

/* 三列：「进行中」在光里，纸卡；另外两列在暗处 */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.col {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  transition: background 0.2s, box-shadow 0.2s;
}
.col.drop {
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
.col-lamp {
  position: absolute;
  left: 50%;
  top: 120px;
  width: 640px;
  height: 640px;
  max-width: 200%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(247, 222, 178, 0.2), rgba(240, 196, 128, 0.07) 55%, transparent);
  opacity: 0;
}
:root[data-theme='dark'] .col-lamp {
  opacity: 1;
}
.col-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.col-head h2 {
  font-size: 20px;
  color: var(--text-2);
}
.col.lit .col-head h2 {
  color: var(--accent);
}
.col-head .n {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.col-list {
  display: grid;
  gap: 8px;
  min-height: 60px;
  align-content: start;
}
.col-group {
  margin: 10px 2px 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.col-group:first-child {
  margin-top: 0;
}
.col-group.late {
  color: var(--danger);
}
.col-empty {
  padding: 26px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}
.tcard {
  position: relative;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s, background 0.2s;
}
.tcard:hover {
  background: var(--surface-2);
}
/* 光里的纸卡 */
.col.lit .tcard {
  background: var(--paper);
  color: var(--paper-ink);
  border-color: var(--paper-line);
  box-shadow: var(--paper-shadow);
}
.col.lit .tcard .tc-meta,
.col.lit .tcard .chip {
  color: var(--paper-ink-2);
}
.tcard.ghost {
  opacity: 0.28;
}
.tcard.done .tc-title {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}
.tc-title {
  font: 400 15.5px/1.45 var(--font-kai);
  word-break: break-word;
}
.tc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-3);
}
.tc-meta .chip {
  height: 16px;
  font-size: 12px;
  color: var(--text-3);
}
.tc-meta .late {
  color: var(--danger);
  font-weight: 600;
}
.tc-meta .today {
  color: var(--accent);
  font-weight: 600;
}
.tc-meta svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}
/* 拖起来的卡片：像从桌上拿起一张纸，投影变深、微微倾斜 */
.drag-clone {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  margin: 0;
  cursor: grabbing;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18), 0 30px 60px -12px rgba(0, 0, 0, 0.45);
  will-change: transform;
}
.drop-line {
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: -2px 4px;
}
.board-hint {
  font-size: 12.5px;
  color: var(--text-3);
  margin: -6px 2px 12px;
}
@container main (max-width: 620px) {
  .board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
  }
  .board::-webkit-scrollbar {
    display: none;
  }
  .col {
    flex: 0 0 min(84vw, 360px);
    scroll-snap-align: center;
  }
  .board {
    gap: 18px;
  }
}

/* ==========================================================================
   规划
   ========================================================================== */
/* 阶段：一条分段的线，当前那段亮着 */
.timeline {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.tl-phase {
  /* 宽度按天数分，但最短的阶段（考前 6 天）也要放得下标题和日期 */
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 7.5em;
  padding: 0 4px 6px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-2);
}
.tl-phase .bar {
  order: -1;
  flex: none;
  height: 3px;
  margin-bottom: 12px;
}
.tl-phase.cur .bar {
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 50%, transparent);
}
.tl-phase.past {
  opacity: 0.55;
}
.tl-phase b {
  display: block;
  font: 400 16px/1.3 var(--font-kai);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-phase.cur b {
  color: var(--accent);
}
.tl-phase small {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
}
.tl-phase small span {
  white-space: nowrap;
}
@container main (max-width: 640px) {
  .timeline {
    flex-direction: column;
    gap: 14px;
  }
  .tl-phase {
    flex: auto !important;
    min-width: 0;
  }
}
/* 选中阶段的说明：被照亮的一张纸 */
.phase-detail {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--paper-ink-2);
  border: 1px solid var(--paper-line);
  box-shadow: var(--paper-shadow);
  font-size: 14px;
  line-height: 1.7;
}
.phase-detail b {
  color: var(--paper-ink);
  font: 400 17px/1.4 var(--font-kai);
}
.phase-detail ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

/* 周日历：今天那一列在光里；周三周四只有晚上能学，更暗 */
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cal-day {
  position: relative;
  min-height: 170px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  transition: background 0.2s, border-color 0.2s;
}
.cal-day.evening {
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.cal-day.past {
  opacity: 0.7;
}
.cal-day.today {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%), var(--surface);
}
.cal-day.drop {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cal-day-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  padding: 0 2px;
}
.cal-day-h em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-3);
  opacity: 0.85;
}
.cal-day.today .cal-day-h span {
  color: var(--accent);
  font-weight: 600;
}
.cal-day-h b {
  font: 300 18px/1 var(--font-display);
  color: var(--text);
}
.cal-task {
  font: 400 13.5px/1.4 var(--font-kai);
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  position: relative;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  word-break: break-word;
}
.cal-day.today .cal-task {
  background: var(--paper);
  color: var(--paper-ink);
  border-color: var(--paper-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.cal-task.done,
.cal-day.today .cal-task.done {
  color: var(--text-3);
  text-decoration: line-through;
}
.cal-lec {
  font-size: 11.5px;
  color: var(--text-3);
  padding: 2px 4px;
  display: flex;
  gap: 4px;
  align-items: flex-start;
  line-height: 1.35;
}
.cal-lec svg {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 1px;
}
.cal-foot {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-3);
  padding: 0 2px;
}
@container main (max-width: 820px) {
  .cal {
    grid-template-columns: minmax(0, 1fr);
  }
  .cal-day {
    min-height: 0;
  }
}

.goal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.goal:first-child {
  border-top: 0;
}
.goal span {
  flex: 1;
  min-width: 0;
}
.goal span.done {
  color: var(--text-3);
  text-decoration: line-through;
}
.ms-group {
  border-top: 1px solid var(--line);
}
.ms-group:first-child {
  border-top: 0;
}
.ms-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  background: none;
  text-align: left;
}
.ms-head .bar {
  flex: 1;
  max-width: 160px;
}
.ms-head svg.chev {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform 0.25s var(--ease);
}
.ms-head.open svg.chev {
  transform: rotate(90deg);
}
.ms-list {
  padding: 0 0 12px 4px;
  display: grid;
  gap: 2px;
}
.ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
}
.ms-item span.done {
  color: var(--text-3);
  text-decoration: line-through;
}

/* ==========================================================================
   课程
   ========================================================================== */
.course {
  overflow: hidden;
}
.course-cover {
  position: relative;
  padding: 22px 22px 20px;
}
.course-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.course-cover h2 {
  margin-top: 6px;
  font-size: 22px;
}
.course-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}
.course-cover .row {
  margin-top: 14px;
}
.course-ok {
  font-size: 13.5px;
  color: var(--text-3);
}

/* 灯带：一集一颗灯珠 */
.beads {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.bead-group {
  display: grid;
  gap: 7px;
  max-width: 100%;
}
.bead-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.bead {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.bead.on {
  background: #f3d49c;
  box-shadow: 0 0 6px 1px rgba(247, 200, 120, 0.55);
}
:root[data-theme='light'] .bead.on {
  background: var(--accent);
  box-shadow: none;
}
.bead.today {
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 10px 1px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: bead-glow 2.6s ease-in-out infinite;
}
@keyframes bead-glow {
  50% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 14px 2px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}
.bead-group.behind .bead:not(.on):not(.today) {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent);
}
.bead-group small {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}
.bead-group small b {
  color: var(--accent);
  font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .bead.today {
    animation: none;
  }
}
.course-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.course-stats div small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}
.course-stats div b {
  font: 300 22px/1.2 var(--font-display);
  font-variant-numeric: tabular-nums;
}
@container main (max-width: 520px) {
  .course-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.alert svg {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
}
.alert.warn {
  background: var(--warn-soft);
  color: color-mix(in srgb, var(--warn) 80%, var(--text));
}
.alert.ok {
  background: var(--ok-soft);
  color: color-mix(in srgb, var(--ok) 80%, var(--text));
}
.alert.info {
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
}
.alert.danger {
  background: var(--danger-soft);
  color: color-mix(in srgb, var(--danger) 80%, var(--text));
}
.seg-row {
  border-top: 1px solid var(--line);
}
.seg-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  border: 0;
  background: none;
  text-align: left;
}
.seg-row-head:hover {
  background: var(--surface-2);
}
.seg-row-head .name {
  font: 400 16px/1.35 var(--font-kai);
  flex: 1;
  min-width: 0;
}
.seg-row-head .name small {
  display: block;
  font: 400 12px/1.5 var(--font);
  color: var(--text-3);
  margin-top: 2px;
}
.seg-row-head .bar {
  width: 90px;
}
.seg-row-head svg.chev {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform 0.25s var(--ease);
}
.seg-row.open .seg-row-head svg.chev {
  transform: rotate(90deg);
}
.ep-list {
  padding: 0 20px 12px 20px;
}
.ep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  border-top: 1px dashed var(--line);
}
.ep:first-child {
  border-top: 0;
}
.ep .i {
  width: 34px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  flex: none;
}
.ep .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep.done .t {
  color: var(--text-3);
}
.ep .d {
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stepper {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
/* 每天可用时间：七根光柱，高度是小时数 */
.hour-cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  height: 56px;
  margin: 4px 0 8px;
}
.hour-cols span {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hour-cols i {
  width: 8px;
  border-radius: 4px;
  background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: height 0.4s var(--ease-out);
}

.stepper label {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
  font-weight: 600;
}
.stepper input {
  text-align: center;
  padding: 6px 2px;
}

/* ==========================================================================
   笔记 / 记录
   ========================================================================== */
.notes-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@container main (max-width: 760px) {
  .notes-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.note-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
}
.note-item:hover {
  background: var(--surface-2);
}
.note-item.on {
  background: var(--surface-3);
}
.note-item b {
  display: block;
  font: 400 15.5px/1.4 var(--font-kai);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-item small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.link-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  transition: transform 0.18s var(--ease), box-shadow 0.2s;
  min-width: 0;
}
.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
/* 科目、资料的小方块：安静的底色，科目只用一圈淡淡的颜色 */
.link-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  font: 400 16px/1 var(--font-kai);
  color: var(--text-2);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--line-strong)) 45%, transparent);
}
.link-card .m {
  flex: 1;
  min-width: 0;
}
.link-card b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.link-card small {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.log-day {
  margin-top: 16px;
}
.log-day h4 {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 650;
  margin-bottom: 4px;
}
.review-card {
  padding: 16px 18px;
}
/* 复盘：像日记，一天一页，文楷 */
.review-card h4 {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-weight: 400;
}
.review-card h4 .kai {
  font-size: 18px;
}
.review-mood {
  font-size: 12.5px;
  color: var(--accent);
}
.review-card dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 12px;
  margin: 12px 0 0;
}
.review-card dt {
  color: var(--text-3);
  font-size: 13px;
  padding-top: 2px;
}
.review-card dd {
  margin: 0;
  white-space: pre-wrap;
  font: 400 15.5px/1.7 var(--font-kai);
}
.review-card .mood,
.card .mood {
  justify-items: start;
}

/* ==========================================================================
   Markdown
   ========================================================================== */
.md {
  font-size: 14.5px;
  line-height: 1.7;
  word-break: break-word;
}
.md > * + * {
  margin-top: 0.6em;
}
.md h1,
.md h2,
.md h3,
.md h4 {
  font-size: 15.5px;
  margin-top: 1em;
}
.md h2 {
  font-size: 16.5px;
}
.md ul,
.md ol {
  padding-left: 1.3em;
  margin-bottom: 0;
}
.md li + li {
  margin-top: 0.25em;
}
.md code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
}
.md pre {
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-3);
  overflow-x: auto;
}
.md pre code {
  padding: 0;
  background: none;
}
.md blockquote {
  margin-left: 0;
  padding-left: 12px;
  border-left: 3px solid var(--line-strong);
  color: var(--text-2);
}
.md strong {
  font-weight: 650;
}
.md hr {
  border: 0;
  border-top: 1px solid var(--line);
}
.md table {
  border-collapse: collapse;
  font-size: 13px;
}
.md td,
.md th {
  border: 1px solid var(--line);
  padding: 4px 8px;
}

/* ==========================================================================
   AI 导师面板
   ========================================================================== */
.ai {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 12px 12px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.ai-head .who-name {
  flex: 1;
  min-width: 0;
}
.ai-head b {
  font: 400 17px/1.2 var(--font-kai);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ai-head small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-head .live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}
.ai-head .live.busy {
  background: var(--ai-2);
  animation: breathe 1.2s infinite;
}
.ai-head .live.off {
  background: var(--danger);
}
.ai-drag {
  display: none;
}
@media (max-width: 760px) {
  .ai-drag {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    touch-action: none;
    z-index: 2;
  }
  .ai-drag::after {
    content: '';
    display: block;
    width: 38px;
    height: 5px;
    border-radius: 3px;
    background: var(--line-strong);
    margin: 7px auto 0;
  }
  .ai-head {
    padding-top: 22px;
  }
}
/* 导师：一颗暖色的灯泡光点 */
.orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ai-grad);
  flex: none;
  position: relative;
  box-shadow: 0 0 18px -2px rgba(247, 190, 110, 0.55);
}
.orb.busy {
  animation: breathe 1.4s var(--ease) infinite;
}
.ai-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 10px;
}
.ai-empty {
  display: grid;
  gap: 16px;
  padding: 10px 2px;
}
.ai-empty h3 {
  font-size: 22px;
}
.ai-empty p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}
.suggest {
  display: grid;
  gap: 8px;
}
.suggest button {
  text-align: left;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  transition: background 0.16s, transform 0.12s;
}
.suggest button:hover {
  background: var(--surface-3);
}
.suggest button:active {
  transform: scale(0.985);
}
.suggest button svg {
  width: 16px;
  height: 16px;
  color: var(--ai-2);
  flex: none;
  margin-top: 2px;
}
.msg {
  margin-bottom: 18px;
  animation: msg-in 0.36s var(--ease);
}
@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.msg.user {
  display: flex;
  justify-content: flex-end;
}
.bubble {
  max-width: 88%;
  padding: 9px 14px;
  border-radius: 14px 14px 4px 14px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble .vtag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  opacity: 0.6;
  margin-right: 6px;
}
.bubble .vtag svg {
  width: 12px;
  height: 12px;
}
.msg.assistant .body {
  padding: 0 2px;
}
/* 导师说的话用文楷 */
.msg.assistant .md {
  font-family: var(--font-kai);
  font-size: 15.5px;
  line-height: 1.75;
}
.msg.assistant .md code,
.msg.assistant .md pre {
  font-family: var(--font-mono);
}
.msg-actions {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  opacity: 0.8;
}
.thinking {
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.thinking summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}
.thinking summary::-webkit-details-marker {
  display: none;
}
.thinking summary svg {
  width: 13px;
  height: 13px;
}
.thinking .tx {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 2px solid var(--line-strong);
  white-space: pre-wrap;
  line-height: 1.55;
  max-height: 220px;
  overflow-y: auto;
}
.tools {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}
.tool {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.tool > .tool-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.tool.ok svg {
  color: var(--ok);
}
.tool.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: transparent;
}
.tool.error > .tool-label {
  white-space: normal;
}
.tool.pending svg {
  color: var(--warn);
}
.spin {
  display: inline-block;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ai-2);
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.receipt {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
}
.receipt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}
.receipt-head svg {
  width: 16px;
  height: 16px;
  color: var(--ok);
}
.receipt-head .spacer {
  flex: 1;
}
.receipt ul {
  margin: 0;
  padding: 0 12px 10px 30px;
  font-size: 12.5px;
  color: var(--text-2);
  max-height: 220px;
  overflow-y: auto;
}
.receipt li + li {
  margin-top: 3px;
}
.receipt.undone {
  opacity: 0.65;
}
.pending-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.pending-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: color-mix(in srgb, var(--warn) 75%, var(--text));
}
.pending-card h4 svg {
  width: 17px;
  height: 17px;
}
.pending-card ul {
  margin: 8px 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-2);
  max-height: 180px;
  overflow-y: auto;
}
.pending-card.resolved {
  background: var(--surface-2);
  border-color: var(--line);
}
.err-card {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.err-card svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.notice {
  font-size: 12.5px;
  color: var(--warn);
  margin: 6px 0;
}
.cursor::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  border-radius: 2px;
  background: var(--ai-2);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 6px 2px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing 1.2s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.composer {
  flex: none;
  padding: 10px 12px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.composer-box {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-2);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.composer-box.rec {
  border-color: var(--ai-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ai-2) 18%, transparent);
}
.composer textarea {
  flex: 1;
  min-height: 24px;
  max-height: 160px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 15px;
  line-height: 1.5;
}
.send {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  flex: none;
  transition: transform 0.12s, opacity 0.2s;
}
.send:disabled {
  opacity: 0.25;
}
.send:active {
  transform: scale(0.9);
}
.send svg {
  width: 18px;
  height: 18px;
}
.send.stop {
  background: var(--danger);
  color: #fff;
}
.mic {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text-2);
  flex: none;
  position: relative;
}
.mic:hover {
  background: var(--surface-3);
}
.mic svg {
  width: 19px;
  height: 19px;
  position: relative;
}
.mic.rec {
  color: #2b2118;
  background: var(--ai-grad);
}
.mic.rec::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 15px;
  border: 2px solid var(--ai-2);
  opacity: 0.5;
  transform: scale(var(--lvl, 1));
  transition: transform 0.08s linear;
}
.composer-hint {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  margin: 6px 4px 0;
}

/* 语音通话 */
/* 通话：整块暗下来，只剩中间一圈灯光，亮度随声音起伏（白天也一样） */
.call {
  --text: #e6e1d7;
  --text-2: #a3abb9;
  --text-3: #8690a0;
  --surface-3: #2a3140;
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 22px calc(26px + var(--safe-b));
  color: var(--text);
  background: radial-gradient(70% 46% at 50% 40%, rgba(247, 214, 160, 0.13), rgba(247, 214, 160, 0.03) 60%, transparent 80%), #12151c;
  animation: fade-in 0.6s var(--ease);
}
.call-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-2);
  font-size: 13px;
}
.call-orb-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  width: 100%;
}
.call-orb {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 50% 45%, #fff8e8 0%, #f7d9a2 34%, #e6a24c 70%, #b9732a 100%);
  position: relative;
  box-shadow: 0 0 calc(50px + var(--ring, 0) * 90px) calc(8px + var(--ring, 0) * 30px) rgba(247, 200, 120, calc(0.28 + var(--ring, 0) * 0.3));
  transform: scale(var(--s, 1));
  transition: transform 0.12s linear, box-shadow 0.12s linear;
}
.call-orb::before {
  content: '';
  position: absolute;
  inset: -90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 214, 160, 0.18), transparent);
  opacity: calc(0.4 + var(--ring, 0) * 0.6);
  pointer-events: none;
  transition: opacity 0.2s;
}
.call-orb.thinking {
  animation: breathe 1.3s var(--ease) infinite;
}
.call-state {
  font: 400 19px/1.3 var(--font-kai);
  margin-top: 42px;
  text-align: center;
}
.call-caption {
  min-height: 70px;
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
  margin-top: 12px;
  text-align: center;
  color: var(--text-2);
  font: 400 16px/1.7 var(--font-kai);
}
.call-caption .me {
  color: var(--text);
}
.call-actions {
  display: flex;
  gap: 22px;
  margin-top: 18px;
}
.call-btn {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--text-2);
}
.call-btn i {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text);
  transition: transform 0.12s;
}
.call-btn:active i {
  transform: scale(0.92);
}
.call-btn i svg {
  width: 24px;
  height: 24px;
}
.call-btn.end i {
  background: #c4553f;
  color: #fff;
}
.call-btn.on i {
  background: #e39a3b;
  color: #1d1508;
}

/* 口令页 */
.pin {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.pin .card {
  width: min(360px, 100%);
  padding: 26px;
  display: grid;
  gap: 14px;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.12s !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .call-orb,
  .orb.busy,
  .boot-orb {
    animation: none !important;
  }
}

/* 拖拽落点标记 */
.drop-before {
  position: relative;
}
.drop-before::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: -6px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}
.drop-end::after {
  content: '';
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin: 2px 4px;
}

/* 弹层不在 main 容器内，单独按视口折叠 */
@media (max-width: 560px) {
  .sheet .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   课程表 · 课堂记录
   ========================================================================== */
.tt {
  overflow: hidden;
  /* 白天的格子和夜里的格子 */
  --tt-day: var(--paper);
  --tt-night: #e4e6eb;
}
:root[data-theme='dark'] .tt {
  --tt-day: #212733;
  --tt-night: #131720;
}
.tt-head,
.tt-body {
  display: grid;
  grid-template-columns: 46px repeat(7, minmax(0, 1fr));
}
.tt-head {
  border-bottom: 1px solid var(--line);
  padding: 10px 0 8px;
}
.tt-dh {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-3);
}
.tt-dh b {
  font: 300 18px/1 var(--font-display);
  color: var(--text);
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.tt-dh.today b {
  background: var(--accent);
  color: var(--on-accent);
}
.tt-body {
  position: relative;
}
.tt-axis {
  position: relative;
}
.tt-axis span {
  position: absolute;
  right: 8px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.tt-col {
  position: relative;
  border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--tt-day) var(--dusk), var(--tt-night) var(--night));
  background-size: 100% var(--h), 100% 100%;
}
.tt-col.today {
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--accent) 7%, var(--tt-day)) var(--dusk), color-mix(in srgb, var(--accent) 6%, var(--tt-night)) var(--night));
}
.tt-block {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text);
  text-align: left;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  transition: box-shadow 0.18s, transform 0.18s var(--ease);
}
.tt-block:hover {
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.tt-block:active {
  transform: scale(0.98);
}
.tt-block b {
  font: 400 13px/1.3 var(--font-kai);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.tt-block small {
  color: var(--text-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tt-block .tt-room {
  color: var(--text-3);
}
/* 考研课：描琥珀边，像灯下的那张纸 */
.tt-block.ky {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
}
.tt-block.flex {
  border-style: dashed;
}
.tt-block.off {
  opacity: 0.5;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px);
}
.tt-block.off b {
  text-decoration: line-through;
}
.tt-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  z-index: 3;
  pointer-events: none;
}
.tt-now::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.tt-flag {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 1px;
}
.tt-flag.off {
  background: var(--danger-soft);
  color: var(--danger);
}
.tt-empty {
  text-align: center;
  padding: 10px;
  font-size: 13px;
}

/* 手机：按天列表 */
.tt-mobile {
  display: none;
}
@container main (max-width: 620px) {
  .tt {
    display: none;
  }
  .tt-mobile {
    display: block;
  }
}
.tt-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.tt-days button {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
}
.tt-days button b {
  font: 300 18px/1.1 var(--font-display);
  color: var(--text);
}
.tt-days button i {
  font-style: normal;
  height: 10px;
  line-height: 10px;
  letter-spacing: 1px;
  color: var(--accent);
}
.tt-days button.today b {
  color: var(--accent);
}
.tt-days button.on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
}
.tt-days button.on b {
  color: var(--accent);
}
.tt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--text);
  text-align: left;
}
.tt-item:first-child {
  border-top: 0;
}
.tt-item > svg {
  color: var(--text-3);
  flex: none;
}
.tt-item.off .tt-main b {
  text-decoration: line-through;
  color: var(--text-3);
}
.tt-time {
  display: grid;
  width: 44px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.tt-time b {
  font-size: 14px;
  font-weight: 650;
}
.tt-time small {
  font-size: 12px;
  color: var(--text-3);
}
.tt-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.tt-main b {
  font: 400 16px/1.35 var(--font-kai);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
}
.tt-main small {
  font-size: 12.5px;
  color: var(--text-3);
}

/* 课程列表 */
.grid-tt {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
}
@container main (max-width: 900px) {
  .grid-tt {
    grid-template-columns: minmax(0, 1fr);
  }
}
.tt-group + .tt-group {
  margin-top: 14px;
}
.tt-class {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--text);
  text-align: left;
}
.tt-class > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 70%, var(--text-3));
  flex: none;
}
.tt-class > svg {
  color: var(--text-3);
  flex: none;
}
.tt-class .tt-main {
  border-left: 0;
  padding-left: 0;
}
.tt-class:hover .tt-main b {
  color: var(--accent);
}

/* 规划页周日历里的课：学校课是灰色的块，考研课描琥珀边，时间不固定的用虚线 */
.cal-class {
  display: flex;
  align-items: baseline;
  gap: 5px;
  width: 100%;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  word-break: break-word;
}
.cal-class b {
  flex: none;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}
.cal-class.kaoyan {
  background: transparent;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--text);
}
.cal-class.kaoyan b {
  color: var(--accent);
}
.cal-class.flex {
  border-style: dashed;
}

/* 课堂记录 */
.lesson {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.lesson-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lesson-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.lesson-title {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  text-align: left;
  line-height: 1.4;
}
.lesson-title:hover {
  color: var(--accent);
}
.lesson-sum {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-2);
}
.lesson-points {
  margin: 8px 0 2px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-2);
}
.lesson-points li + li {
  margin-top: 3px;
}
.lesson-sec {
  margin-top: 12px;
}
.lesson-sec .task-row {
  padding-left: 0;
  padding-right: 0;
}
.lesson-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.lesson-note {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}
.lesson-note b {
  margin-right: 8px;
  color: var(--text);
  font-weight: 600;
}
.lesson-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  transition: border-color 0.18s, background 0.18s;
}
.lesson-drop > svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}
.lesson-drop b {
  display: block;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
}
.lesson-drop small {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
}
.lesson-drop:hover,
.lesson-drop.drag-on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.lesson-drop.compact {
  padding: 10px 14px;
}
.lesson-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}
.lesson-file svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex: none;
}
.lesson-file b {
  display: block;
  word-break: break-all;
}
.lesson-file small {
  color: var(--text-3);
  font-size: 12.5px;
}
.lesson-preview {
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13.5px;
}
.occ {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.upload-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 13.5px;
  color: var(--text-2);
}
.upload-nudge > svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
}
.upload-nudge span {
  flex: 1;
  min-width: 0;
}
.upload-nudge b {
  color: var(--text);
  margin-right: 4px;
}
@container main (max-width: 520px) {
  .upload-nudge {
    flex-wrap: wrap;
  }
}

/* 导师面板：附件与拖入 */
.bubble .att {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 6px;
  padding: 8px 10px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--on-ink) 14%, transparent);
  white-space: normal;
}
.bubble .att svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.bubble .att b {
  display: block;
  font-size: 13px;
  word-break: break-all;
}
.bubble .att small {
  display: block;
  font-size: 11.5px;
  opacity: 0.7;
}
.ai-dropzone {
  position: absolute;
  inset: 10px;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 20px;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  pointer-events: none;
}
.ai-dropzone svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}
.ai-dropzone b {
  font-size: 16px;
}
.ai-dropzone small {
  color: var(--text-3);
  font-size: 13px;
}
.tt-block.short {
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 5px;
  padding-top: 4px;
  padding-bottom: 3px;
}
.tt-block.short b {
  -webkit-line-clamp: 1;
}

/* ==========================================================================
   报名备忘
   ========================================================================== */
/* 下一个关键节点：页面里唯一被灯照着的一块 */
.memo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  background: radial-gradient(70% 140% at 18% 0%, var(--lamp), transparent 65%), var(--surface);
}
:root[data-theme='dark'] .memo-hero {
  background: radial-gradient(70% 140% at 18% 0%, rgba(247, 214, 160, 0.13), transparent 65%), var(--surface);
  border-color: rgba(247, 214, 160, 0.16);
}
.memo-eyebrow {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.memo-hero h2 {
  font-size: 26px;
  line-height: 1.25;
  margin-top: 4px;
}
.memo-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 4px;
}
.memo-count b {
  font: 200 clamp(52px, 8vw, 72px) / 0.95 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.memo-count .unit {
  font: 400 19px/1.2 var(--font-kai);
  color: var(--text-2);
}
.memo-ongoing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}
.memo-ongoing i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  flex: none;
}
.memo-hero-side {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.35;
  transition: background 0.16s var(--ease);
}
.memo-hero-side:hover {
  background: var(--surface-3);
}
.memo-hero-side small {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-3);
}
.memo-pin {
  grid-column: 1 / -1;
}
.memo-pin b {
  color: var(--text);
}
.memo-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
}
.memo-foot {
  margin-top: 16px;
  align-items: start;
}
@container main (max-width: 860px) {
  .memo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container main (max-width: 520px) {
  .memo-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .memo-hero-side {
    justify-self: start;
  }
}
.memo-anchor {
  scroll-margin-top: 16px;
}

/* 时间线 */
.mt {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  position: relative;
}
.mt-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}
.mt-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 16px;
  bottom: -2px;
  width: 2px;
  border-radius: 1px;
  background: var(--line-strong);
}
.mt-item:last-child {
  padding-bottom: 2px;
}
.mt-item:last-child::before {
  display: none;
}
.mt-item.past::before {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
.mt-dot {
  width: 12px;
  height: 12px;
  margin: 4px 0 0 5px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  position: relative;
  z-index: 1;
}
.mt-item.key .mt-dot {
  border-color: var(--text-2);
}
.mt-item.past .mt-dot {
  background: color-mix(in srgb, var(--accent) 45%, var(--surface));
  border-color: transparent;
}
.mt-item.now .mt-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 0 16px 2px color-mix(in srgb, var(--accent) 50%, transparent);
}
.mt-item.soon .mt-dot {
  border-color: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-soft);
}
.mt-head,
.mm-title {
  border: 0;
  background: none;
}
.mt-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  text-align: left;
  font-size: 12.5px;
  color: var(--text-3);
}
.mt-date {
  font-weight: 600;
  color: var(--text-2);
}
.mt-cd {
  font-weight: 650;
}
.mt-cd.now {
  color: var(--accent);
}
.mt-cd.soon {
  color: var(--warn);
}
.mt-cd.past {
  color: var(--text-3);
  font-weight: 500;
}
.mt-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 2px;
  min-width: 0;
}
.mt-title b {
  font: 400 16.5px/1.4 var(--font-kai);
}
.mt-title .icon-btn {
  opacity: 0.55;
}
.mt-title .icon-btn:hover {
  opacity: 1;
}
.mt-item.past .mt-title b,
.mt-item.minor .mt-title b {
  color: var(--text-2);
  font-weight: 560;
}
.mt-time {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 560;
}
.mm-detail {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-line;
  word-break: break-word;
}
.mm-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 12.5px;
}
.item-meta .mm-links {
  margin-top: 0;
}
.mm-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 560;
}

/* 材料 / 待办清单 */
.mm-item .check {
  margin-top: 1px;
}
.mm-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.mm-title {
  padding: 0;
  text-align: left;
  font-size: 15px;
}
.mm-title:hover {
  color: var(--accent);
}
.mm-item.is-done .item-meta {
  margin-top: 2px;
}
.item-meta .soon {
  color: var(--warn);
  font-weight: 600;
}

/* 注意事项、来源 */
.memo-tips {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.memo-tips b {
  color: var(--text);
}
.memo-note {
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 10px;
}
.memo-note b {
  color: var(--text);
  font-weight: 600;
}
.memo-sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}
.memo-sources li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
}
.memo-sources a {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text);
  line-height: 1.45;
}
.memo-sources a:hover {
  color: var(--accent);
}
.memo-sources a svg {
  color: var(--text-3);
  flex: none;
  transform: translateY(1px);
}
.memo-sources span {
  flex: none;
  font-size: 12px;
}
.memo-entries {
  gap: 8px;
  margin-top: 6px;
}
.memo-entries a {
  text-decoration: none;
}

/* 今日页：报名提醒 */
.memo-today .card-head h2 svg {
  color: var(--warn);
}
.memo-next {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  padding: 12px 14px;
  margin: 4px 0 4px;
  border-radius: 14px;
  background: var(--warn-soft);
  text-align: left;
}
.memo-next-cd {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex: none;
}
.memo-next-cd b {
  font: 750 32px/1 var(--font-display);
  letter-spacing: -0.03em;
  color: color-mix(in srgb, var(--warn) 75%, var(--text));
}
.memo-next-cd b:not(.num) {
  font-size: 18px;
}
.memo-next-cd small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.memo-next-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.memo-next-main b {
  font-size: 15.5px;
}
.memo-next-main small {
  font-size: 12.5px;
  color: var(--text-2);
}
