/* =========================================================
 * style.css
 * 配色：暖纸底 + 墨绿主色。克制、低饱和，长时间看不累。
 * =======================================================*/

:root {
  --paper: #f7f4ee;
  --paper-2: #f0ebe1;
  --card: #fffdfa;
  --ink: #23201c;
  --ink-2: #4d4740;
  --muted: #857c70;
  --line: #e6dfd3;
  --line-2: #d9d0c1;

  --accent: #2f6b52;
  --accent-ink: #235240;
  --accent-soft: #e7f0ea;

  --warn: #a85c12;
  --warn-soft: #fbefdf;
  --danger: #a33a2a;
  --danger-soft: #f9ece9;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 32, 28, 0.04), 0 8px 24px rgba(35, 32, 28, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -260px, #fdfbf6 0%, rgba(253, 251, 246, 0) 70%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- 骨架 ---------- */

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 18px 116px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  margin: 0 -18px;
  padding: 0 18px;
  background: rgba(247, 244, 238, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}
.brand-text { font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }

.topnav { display: none; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
}
.topnav a:hover { background: var(--paper-2); }
.topnav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.debt {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  white-space: nowrap;
}
.topnav + .debt { margin-left: 0; }
.debt--over { background: var(--danger-soft); color: var(--danger); }

.view { padding-top: 22px; min-height: 60vh; }

.loading { color: var(--muted); font-size: 14px; padding: 40px 0; text-align: center; }

/* ---------- 页头 ---------- */

.page-head { margin-bottom: 22px; }
.page-title {
  font-size: 25px;
  line-height: 1.35;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  font-weight: 650;
}
.page-sub { margin: 0; font-size: 13.5px; color: var(--muted); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-gap { display: flex; gap: 8px; }

/* ---------- 区块 ---------- */

.section { margin-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.section-title {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
}
.section-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-note { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.hint--box {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--ink-2);
}

.banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 22px;
  line-height: 1.6;
}
.banner--warn { background: var(--warn-soft); color: #7b4408; border: 1px solid #f0dcbe; }
.banner strong { font-weight: 650; }

/* ---------- 任务条 ---------- */

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 9px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.task:hover { border-color: var(--line-2); transform: translateY(-1px); }
.task:active { transform: translateY(0); }
.task-main { flex: 1; min-width: 0; }
.task-title {
  font-size: 15.5px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.task-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.task-cta { font-size: 13.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.task--urgent { border-left: 3px solid var(--danger); padding-left: 14px; }
.task--urgent .task-cta { color: var(--danger); }
.task--new {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}
.task--new .task-title { color: var(--accent-ink); }

/* ---------- 标签 ---------- */

.tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1.7;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  vertical-align: 1px;
}
.tag--tech { background: #e7eef7; color: #2d5680; }
.tag--book { background: #f4ebda; color: #855c22; }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }
.tag--accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 统计条 ---------- */

.stat-strip {
  display: flex;
  gap: 8px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--line);
}
.stat-strip > div { flex: 1; text-align: center; }
.stat-strip b {
  display: block;
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-strip span { font-size: 11.5px; color: var(--muted); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translateY(0.5px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--paper-2); }
.btn--danger { color: var(--danger); border-color: #e3c6c0; background: transparent; }
.btn--danger:hover { background: var(--danger-soft); }
.btn--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn--lg { padding: 14px 20px; font-size: 16px; width: 100%; border-radius: 13px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.stack { display: grid; gap: 9px; }

.icon-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 17px;
  line-height: 1;
  flex: none;
}
.icon-btn:hover { background: var(--paper-2); color: var(--danger); }

/* ---------- 表单 ---------- */

.field { margin-bottom: 16px; }
.label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.label-hint { font-weight: 400; color: var(--muted); font-size: 12px; }

.input, .textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 11px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 76px; line-height: 1.65; }
.textarea--tall { min-height: 190px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--paper-2);
  border-radius: 11px;
  gap: 2px;
}
.segmented button {
  border: none;
  background: transparent;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented button.is-on {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(35, 32, 28, 0.09);
}
.seg-inline { margin: 18px 0 6px; }

/* ---------- 复习流程 ---------- */

.review { padding-top: 2px; }
.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  min-height: 28px;
}
.back { font-size: 13.5px; color: var(--muted); cursor: pointer; }
.back:hover { color: var(--ink); }

.review-title {
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  font-weight: 650;
}
.review-prompt { margin: 0 0 20px; color: var(--ink-2); font-size: 14.5px; }
.review-h2 { font-size: 21px; margin: 0 0 8px; font-weight: 650; }
.check-hint { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }

.kp-mask {
  background: var(--paper-2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.kp-mask-text { font-size: 14px; color: var(--ink-2); }
.kp-mask-text b { color: var(--ink); font-size: 16px; }
.kp-reveal { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }

.kp-open {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 8px;
}
.kp-open-label { font-size: 12px; color: var(--accent-ink); font-weight: 600; letter-spacing: 0.06em; }
.kp-open-list { margin: 8px 0 0; padding-left: 20px; font-size: 14.5px; }
.kp-open-list li { margin-bottom: 4px; }

.panel { margin-top: 6px; }

.rec { display: grid; place-items: center; gap: 10px; padding: 26px 0 18px; }
.rec-btn {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(47, 107, 82, 0.24);
  transition: transform 0.15s, background 0.2s;
}
.rec-btn:hover { transform: scale(1.03); }
.rec-btn.is-rec { background: var(--danger); animation: pulse 1.7s ease-out infinite; }
.rec-stop { width: 26px; height: 26px; border-radius: 5px; background: #fff; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 58, 42, 0.34); }
  70% { box-shadow: 0 0 0 22px rgba(163, 58, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 58, 42, 0); }
}
.rec-time { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.rec-hint { font-size: 13px; color: var(--muted); }
.rec-playback { display: grid; justify-items: center; gap: 8px; margin-top: 6px; }
.rec-playback audio { width: 250px; max-width: 72vw; height: 36px; }

.kp-list { margin-bottom: 20px; }
.kp-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  margin-bottom: 9px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.kp-check input {
  margin: 4px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}
.kp-text { flex: 1; font-size: 14.5px; line-height: 1.55; }
.kp-check.is-hit { background: var(--accent-soft); border-color: #bcd7c6; }
.kp-check.is-hit .kp-text { color: var(--accent-ink); }

.prev-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 22px;
  background: var(--paper-2);
}
.prev-box summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 550;
  list-style: none;
}
.prev-box summary::-webkit-details-marker { display: none; }
.prev-box summary::before { content: "▸ "; color: var(--muted); }
.prev-box[open] summary::before { content: "▾ "; }
.prev-meta { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12.5px; }
.prev-text {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow: auto;
}

.grade-wrap { margin: 4px 0 18px; }
.grade-title { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
.grades { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.grade {
  text-align: left;
  border: 1px solid var(--line-2);
  background: var(--card);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.grade:hover { transform: translateY(-1px); }
.grade b { display: block; font-size: 15.5px; font-weight: 650; }
.grade span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.grade-next {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}
.grade.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.grade--danger:hover { border-color: #d8a89e; background: var(--danger-soft); }
.grade--warn:hover { border-color: #dfc09a; background: var(--warn-soft); }

/* 结果页 */
.done { text-align: center; padding-top: 30px; }
.done-mark {
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
  font-weight: 600;
}
.done-mark.is-bad { background: var(--danger-soft); color: var(--danger); }
.done-title { font-size: 22px; margin: 0 0 8px; font-weight: 650; }
.done-detail { margin: 0 auto 22px; max-width: 440px; color: var(--ink-2); font-size: 14.5px; }
.done-meta {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.done-meta > div { display: grid; gap: 2px; }
.done-meta span { font-size: 11.5px; color: var(--muted); }
.done-meta b { font-size: 16px; font-weight: 650; }
.done-meta .is-warn b { color: var(--warn); }
.done-actions { display: grid; gap: 9px; margin-top: 24px; }

/* ---------- 概念页 ---------- */

.concept { padding-top: 2px; }
.concept-title { font-size: 26px; line-height: 1.35; margin: 6px 0 8px; font-weight: 650; letter-spacing: -0.01em; }
.concept-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; flex-wrap: wrap; }
.meta-text { font-size: 12.5px; color: var(--muted); }

.schedule-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.schedule-main { margin-bottom: 12px; }
.schedule-label { font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.schedule-value { font-size: 19px; font-weight: 600; margin-top: 1px; }
.schedule-stats {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.schedule-stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.schedule-actions { display: flex; gap: 9px; }
.schedule-actions .btn--primary { flex: 1; }

.kp-edit { display: grid; gap: 8px; }
.kp-row { display: flex; align-items: center; gap: 8px; }
.kp-row .input { flex: 1; }
.kp-row .tag { flex: none; }

.save-status { font-size: 12px; color: var(--muted); height: 16px; }

.gap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--warn-soft);
  border: 1px solid #f0dcbe;
  border-radius: 11px;
  margin-bottom: 8px;
}
.gap-text { flex: 1; font-size: 14px; line-height: 1.5; }
.gap-row.is-closed { background: var(--paper-2); border-color: var(--line); opacity: 0.75; }
.gap-row.is-closed .gap-text { text-decoration: line-through; color: var(--muted); }
.closed-gaps { margin-top: 12px; }
.closed-gaps summary { font-size: 13px; color: var(--muted); cursor: pointer; margin-bottom: 8px; }

.tl { border-left: 2px solid var(--line); padding-left: 18px; margin-left: 4px; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-2);
  border: 2px solid var(--paper);
}
.tl-item:first-child::before { background: var(--accent); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-mode { font-size: 13px; font-weight: 550; }
.tl-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.tl-sub { font-size: 12.5px; color: var(--muted); margin: 3px 0 7px; }
.tl-text { margin-top: 6px; }
.tl-text summary { font-size: 12.5px; color: var(--accent-ink); cursor: pointer; }
.tl-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------- 库 ---------- */

.lib-tools { margin-bottom: 18px; }
.chips { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-2);
  background: transparent;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.lib-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.lib-row:hover { border-color: var(--line-2); }
.lib-main { flex: 1; min-width: 0; }
.lib-title { font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.lib-side { display: flex; align-items: center; gap: 8px; flex: none; }
.chev { color: var(--line-2); font-size: 20px; line-height: 1; }

/* ---------- 说明文字 ---------- */

.prose { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.prose p { margin: 0 0 14px; }
.prose b { color: var(--ink); font-weight: 600; }
.prose-note {
  background: var(--paper-2);
  border-radius: 11px;
  padding: 12px 15px;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- 空状态 ---------- */

.empty { text-align: center; padding: 40px 18px; color: var(--muted); }
.empty-icon { font-size: 26px; color: var(--line-2); margin-bottom: 8px; }
.empty h3 { font-size: 15.5px; color: var(--ink); margin: 0 0 6px; font-weight: 600; }
.empty p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.empty-actions { display: grid; gap: 9px; margin-top: 20px; max-width: 300px; margin-left: auto; margin-right: auto; }

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 10.5px;
  color: var(--muted);
  padding: 4px 22px;
  border-radius: 10px;
}
.tabbar svg { width: 21px; height: 21px; }
.tabbar a.active { color: var(--accent); }

/* ---------- 弹窗 ---------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  background: rgba(28, 25, 21, 0.42);
  padding: 0;
  animation: fade 0.16s ease;
}
.modal-root[hidden] { display: none; }
.modal {
  background: var(--card);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: slideup 0.22s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.modal-title { font-size: 17px; margin: 0 0 16px; font-weight: 650; }
.modal-text { font-size: 14px; color: var(--ink-2); margin: 0 0 20px; line-height: 1.7; }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

@keyframes slideup { from { transform: translateY(16px); opacity: 0.5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- toast ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 88px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}
.toast {
  background: #2b2721;
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  animation: fade 0.18s ease;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

/* ---------- 桌面 ---------- */

@media (min-width: 860px) {
  .app { padding-bottom: 60px; max-width: 780px; }
  .topnav { display: flex; }
  .tabbar { display: none; }
  .toast-root { bottom: 30px; }
  .modal-root { place-items: center; padding: 20px; }
  .modal { border-radius: 18px; max-height: 84vh; padding-bottom: 22px; }
  .grades { grid-template-columns: repeat(4, 1fr); }
  .task-title { font-size: 16px; }
  .done-actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
