/* 英文：Source Serif 4 Regular（Anthropic Serif 未公开授权，设备上装有时优先用它）。
   声明成 300–700 的字重范围：页面整体用 Light 时，英文仍然是 Regular，不会被合成加粗。 */
@font-face {
  font-family: "Latin Serif"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(https://fonts.gstatic.com/s/sourceserif4/v14/vEFF2_tTDB4M7-auWDN0ahZJW3IX2iZPwg3BucvUtfykDXr4Y3qwzQ.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 道道 · v5 视觉
   安静、克制、耐看：只有「现在」一张卡片，其余是平铺列表 + 细分隔线。
   绿色（Sage）只用于：主按钮、当前状态、进度、输入胶囊。字号层级：16 / 12，圆角：8 / 12 / 16 / 999。 */
:root {
  /* 石灰 → 灰鼠尾草：低饱和、带一点暖意；左上一层很淡的柔光 */
  --bg: #e2e3dd;
  --page: radial-gradient(130% 70% at 15% 0%, rgba(250, 249, 245, .9) 0%, rgba(250, 249, 245, 0) 55%),
          radial-gradient(120% 65% at 100% 100%, rgba(138, 160, 142, .45) 0%, rgba(138, 160, 142, 0) 70%),
          linear-gradient(165deg, #eceae4 0%, #d8dcd2 45%, #bfc9bc 100%);
  --surface: #ffffff; --fill: rgba(0, 0, 0, .045);
  --ink: #1f2124; --ink-2: #4a4e54; --muted: #6e737a; --faint: #858b87; --ghost: rgba(40, 56, 46, .30);
  --line: rgba(40, 56, 46, .10);
  --sage-1: #4a6b5d; --sage-2: #3d5a50; --sage-3: #2d4b41;
  --accent: #3d5a50; --accent-soft: rgba(74, 107, 93, .10); --late: #b0632c;
  /* 深 Sage 渐变：左上环境光 → 中段 → 右下自然收暗；带一点色相偏移（偏黄绿 → 偏蓝绿） */
  --btn: radial-gradient(circle at 20% 0%, rgba(120, 150, 137, .28), transparent 45%),
         linear-gradient(135deg, #49665a 0%, #354f45 55%, #283d35 100%);
  --btn-ink: #f4f7f5; --btn-edge: 1px solid rgba(255, 255, 255, .08);
  --btn-shadow: 0 2px 8px rgba(40, 61, 53, .18);
  --capsule: radial-gradient(circle at 22% 0%, rgba(126, 156, 142, .32), transparent 55%),
             linear-gradient(135deg, #4b695c 0%, #365046 55%, #283d35 100%);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, .04); --card-border: 1px solid rgba(0, 0, 0, .03);
  --bar-bg: rgba(236, 235, 230, .78); --bar-line: rgba(0, 0, 0, .06);
  --sheet: #ecebe6;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --pill: 999px;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --font: "Anthropic Serif", "Latin Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --num: var(--font);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316; --surface: #1b1c20;
    /* 顶部一层宽而柔的环境光，向下自然过渡到 #111215 */
    --page: radial-gradient(150% 60% at 50% -8%, rgba(104, 108, 118, .55) 0%, rgba(104, 108, 118, 0) 72%),
            linear-gradient(180deg, #27282d 0%, #191a1d 45%, #0e0f11 100%);
    --fill: rgba(255, 255, 255, .06);
    --ink: #f2f2f7; --ink-2: #c9cbd0; --muted: #a9acb3; --faint: #82868d; --ghost: rgba(255, 255, 255, .20);
    --line: rgba(255, 255, 255, .07);
    --accent: #8fb09f; --accent-soft: rgba(74, 107, 93, .22); --late: #d99a62;
    --btn-shadow: 0 2px 10px rgba(0, 0, 0, .35);
    --card-shadow: none; --card-border: 1px solid rgba(255, 255, 255, .07);
    --bar-bg: rgba(27, 28, 32, .80); --bar-line: rgba(255, 255, 255, .08);
    --sheet: #17181b;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: transparent; color: var(--ink); font-family: var(--font); font-weight: 300; font-size: 17px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--page); pointer-events: none; }
body { padding: env(safe-area-inset-top) 0 calc(88px + env(safe-area-inset-bottom)); min-height: 100dvh; }
body.bare { padding-bottom: 24px; }
main { max-width: 640px; margin: 0 auto; padding: 8px 20px 24px; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { transition: opacity .15s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- 标题 ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head > div { min-width: 0; }
.dateline { font-size: .8125rem; color: var(--muted); margin: 14px 0 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.015em; font-weight: 600; }
.addbtn { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; margin: 0 -6px 4px 0; border-radius: var(--pill); }
.addbtn svg { width: 24px; height: 24px; stroke-width: 1.4; }
.addbtn:active { opacity: .5; }
.subline { color: var(--muted); font-size: .8125rem; margin: 0 0 20px; font-variant-numeric: tabular-nums; }
.subline b { color: var(--ink-2); font-weight: 500; }
/* 今天页：小标题「今天」→ 大标题日期（星期弱一级）→ 中标题「计划 · 完成」 */
h1 .wd { font-size: .6em; font-weight: 300; color: var(--muted); margin-left: .45em; letter-spacing: 0; }
.subline.mid { font-size: .95rem; color: var(--ink-2); margin: 4px 0 20px; }
.subline.mid b { color: var(--ink); font-weight: 500; }
.sec { display: flex; justify-content: space-between; align-items: center; font-size: .8125rem; font-weight: 500; color: var(--muted); margin: 28px 0 4px; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: .95rem; margin: 8px 0 4px; min-height: 36px; color: var(--muted); }
.foot { color: var(--faint); font-size: .8125rem; margin: 10px 0 0; line-height: 1.55; }
.empty { color: var(--faint); padding: 14px 0; margin: 0; font-size: .85rem; }
.small { font-size: .8125rem; color: var(--muted); }

/* ---------- 「现在」：唯一的卡片 ---------- */
.now { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--card-shadow); border: var(--card-border); padding: 18px 18px 12px; margin-top: 8px; }
.now .kind { font-size: .8125rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.now .live { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.now .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.now .title { font-size: 1.3rem; font-weight: 600; line-height: 1.3; margin: 6px 0 4px; letter-spacing: -.01em; }
.now .meta { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.now .late { color: var(--late); }
.now .detail { color: var(--faint); font-size: .8125rem; margin: 6px 0 0; line-height: 1.5; }
.now .clock { font-family: var(--num); font-size: 2.3rem; font-weight: 500; font-variant-numeric: tabular-nums; margin: 12px 0 0; letter-spacing: -.02em; }
.now .clock small { font-family: var(--font); font-size: .8125rem; color: var(--muted); font-weight: 300; margin-left: 8px; letter-spacing: 0; }
.now .actions { margin-top: 16px; }
.now.idle .title { font-size: 1.05rem; font-weight: 500; }
.bigbtn { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-m);
  background: var(--btn); color: var(--btn-ink); font-size: .95rem; font-weight: 500; cursor: pointer; box-shadow: var(--btn-shadow); border: var(--btn-edge); }
.bigbtn:active { opacity: .88; }
.bigbtn.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.textbtn { background: none; border: 0; color: var(--accent); padding: 8px 4px; min-height: 40px; cursor: pointer; font-size: .85rem; }
.textbtn.muted { color: var(--muted); }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; }

/* ---------- 平铺列表 ---------- */
.list { margin: 0; }
.item { display: flex; align-items: flex-start; gap: 14px; min-height: 52px; padding: 0; position: relative; color: inherit; }
.item + .item { border-top: 1px solid var(--line); }
.list.withcheck .item + .item { border-top: 0; }
.list.withcheck .item + .item::before { content: ""; position: absolute; top: 0; right: 0; left: 36px; border-top: 1px solid var(--line); }
.item .main { flex: 1; min-width: 0; padding: 13px 0 12px; display: block; color: inherit; }
.item .name { display: block; font-size: 1rem; font-weight: 300; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .l2 { display: block; color: var(--muted); font-size: .8125rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.item .l3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--faint); font-size: .8125rem; line-height: 1.45; margin-top: 2px; }
.item .st-active { color: var(--accent); }
.item .st-late { color: var(--late); }
.item .v { color: var(--muted); font-size: .85rem; text-align: right; flex: none; max-width: 62%; align-self: center; font-variant-numeric: tabular-nums; }
.item .v b { color: var(--ink-2); font-weight: 500; }
.item .chev { flex: none; align-self: center; width: 7px; height: 7px; border-right: 1.5px solid var(--ghost); border-top: 1.5px solid var(--ghost); transform: rotate(45deg); margin: 0 4px 0 2px; }
.item.active .name { color: var(--accent); font-weight: 500; }
.item.done .name { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--ghost); }
.item.done .l2, .item.done .l3 { color: var(--ghost); }
.item.row { align-items: center; }
.item.row .main { padding: 14px 0; }
button.item { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.item.addrow .main { color: var(--accent); font-size: .9rem; }

/* 一键完成的圆圈：1.5px、淡色 */
.check { flex: none; width: 22px; height: 22px; margin-top: 14px; border-radius: 50%; border: 1.5px solid var(--ghost); background: none; padding: 0;
  display: grid; place-items: center; cursor: pointer; position: relative; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.check::after { content: ""; position: absolute; inset: -12px; }
.check:active { opacity: .6; }
.check svg { opacity: 0; width: 12px; height: 12px; stroke: #fff; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s var(--ease); }
.check.on { background: var(--sage-1); border-color: var(--sage-1); }
.check.on svg { opacity: 1; }
.check.gone { background: var(--fill); border-color: transparent; }
.check.gone::before { content: ""; width: 8px; border-top: 1.5px solid var(--faint); }

details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
.caret { display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid var(--ghost); border-bottom: 1.5px solid var(--ghost);
  transform: rotate(-45deg); transition: transform .2s var(--ease); margin-left: 8px; position: relative; top: -1px; }
details.fold[open] > summary .caret { transform: rotate(45deg); }

/* ---------- 计划 / 每天 ---------- */
.day { border-top: 1px solid var(--line); }
.day:first-of-type { border-top: 0; }
.day-h { display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 10px; }
.day-h b { font-weight: 500; font-size: .95rem; }
.day-h .small { font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; color: var(--faint); }
.today-tag { color: var(--accent); font-size: .8125rem; margin-left: 8px; }
.today-tag.muted { color: var(--faint); }
.day .list { padding-bottom: 8px; }
.day .note-line { color: var(--faint); font-size: .8125rem; padding: 4px 0 4px 36px; }

/* ---------- 记录 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 10px 0 10px; }
.stat + .stat { padding-left: 12px; border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--num); font-size: 1.05rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .75rem; }
@media (max-width: 360px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } .stat:nth-child(4) { border-top: 1px solid var(--line); } }
.week-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; }
.week-nav b { font-weight: 500; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.week-nav button { background: none; border: 0; color: var(--muted); min-width: 40px; min-height: 40px; cursor: pointer; display: grid; place-items: center; }
.week-nav button:disabled { color: var(--ghost); }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 14px 0 4px; }
.strip div { text-align: center; font-size: .75rem; color: var(--faint); }
.strip i { display: block; height: 3px; border-radius: 2px; background: var(--fill); margin: 0 auto 6px; overflow: hidden; }
.strip i em { display: block; height: 100%; background: var(--sage-1); }
.strip .today { color: var(--accent); }
.review { white-space: pre-wrap; padding: 6px 0; font-size: .9rem; line-height: 1.65; color: var(--ink-2); }

/* ---------- 专注页 ---------- */
.focus { text-align: center; padding: 6px 0 0; }
.focus .kind { color: var(--muted); font-size: .8125rem; }
.focus .title { font-size: 1.3rem; font-weight: 600; margin: 4px 16px 2px; line-height: 1.3; }
.focus .meta { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.ring { position: relative; width: min(66vw, 240px); aspect-ratio: 1; margin: 26px auto 24px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--fill); }
.ring .bar { stroke: var(--sage-1); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.ring.break .bar { stroke: var(--ghost); }
.ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .clock { font-family: var(--num); font-size: 2.7rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring .state { font-size: .8125rem; color: var(--muted); }
.ring .state.focus { color: var(--accent); }
.ring .sub { font-size: .8125rem; color: var(--faint); margin-top: 2px; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 8px; }
.controls .wide { grid-column: 1 / -1; }
.pill { min-height: 46px; border-radius: var(--r-m); border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: .9rem; cursor: pointer; }
.pill.primary { background: var(--btn); color: var(--btn-ink); font-weight: 500; border: var(--btn-edge); box-shadow: var(--btn-shadow); }
.pill:active { opacity: .7; }
.pill:disabled { opacity: .45; }
.info .item .main { display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; }
.info .k { color: var(--muted); flex: none; }
.info .val { color: var(--ink-2); text-align: right; white-space: pre-wrap; word-break: break-word; }

/* ---------- 底部：单层悬浮 Tab Bar ---------- */
#dock { position: fixed; z-index: 20; left: 14px; right: 14px; bottom: calc(8px + env(safe-area-inset-bottom));
  max-width: 440px; margin: 0 auto; height: 54px; border-radius: var(--r-l);
  background: var(--bar-bg); border: 1px solid var(--bar-line);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center; padding: 0 4px; }
#dock a { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: .6875rem; color: var(--faint); padding: 5px 0; transition: color .2s var(--ease); }
#dock a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#dock a.on { color: var(--accent); }
/* 个人输入入口：空白的鼠尾草绿胶囊（不叠毛玻璃，底栏已经是毛玻璃） */
#dock .ask { width: 76px; height: 30px; margin: 0 6px; border-radius: var(--pill); cursor: pointer;
  background: var(--capsule); border: 1px solid rgba(255, 255, 255, .10); box-shadow: 0 1px 4px rgba(40, 61, 53, .20); }
#dock .ask:active { opacity: .8; }

/* ---------- 底部面板 ---------- */
body.sheet-open #dock { display: none; }
body.sheet-open { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
/* 面板以整页显示（不用固定悬浮层，iOS 主屏幕 App 里悬浮层中的输入框弹不出键盘） */
.sheet { display: flex; flex-direction: column; min-height: calc(100dvh - 40px - env(safe-area-inset-top)); padding-top: 4px; }
@keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }
.sheet.tall { min-height: calc(100dvh - 40px - env(safe-area-inset-top)); }
.sheet .bar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; flex: none; }
.sheet .bar b { font-size: .95rem; font-weight: 500; }
.sheet .bar button { background: none; border: 0; color: var(--accent); font-size: .9rem; min-height: 40px; padding: 0 2px; cursor: pointer; min-width: 44px; }
.sheet .bar button:first-child { text-align: left; color: var(--muted); }
.sheet .bar button:last-child { text-align: right; }
.sheet .bar button.strong { font-weight: 600; }
.sheet .bar button:disabled { color: var(--ghost); }
.sheet .scroll { flex: 1; }

.field { width: 100%; border: var(--card-border); background: var(--surface); border-radius: var(--r-m); padding: 12px 14px; font-size: 1rem; outline: none; }
textarea.field { resize: none; min-height: 46px; }
.field.big { font-size: 1.05rem; }
.opts { margin-top: 12px; border-radius: var(--r-m); overflow: hidden; background: var(--surface); border: var(--card-border); }
.opt { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 14px; position: relative; gap: 12px; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt label { flex: none; font-size: .9rem; }
.opt input, .opt select { border: 0; background: none; text-align: right; outline: none; min-width: 0; flex: 1; color: var(--muted); font-size: .9rem; }
.opts textarea.field { border: 0; border-radius: 0; }
.opts .item { padding: 0 14px; }
.seg { display: flex; background: var(--fill); border-radius: var(--r-s); padding: 2px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 6px; min-height: 30px; font-size: .78rem; cursor: pointer; color: var(--ink-2); padding: 0 6px; white-space: nowrap; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); color: var(--ink); font-weight: 500; }
.opt .seg { flex: 1; max-width: 250px; }
.danger, .danger .main { color: var(--late) !important; }

/* 对话 */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 10px; min-height: 100%; justify-content: flex-end; }
.msg { max-width: 84%; padding: 9px 13px; border-radius: var(--r-l); white-space: pre-wrap; word-break: break-word; font-size: .92rem; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--sage-2); color: #f3f6f4; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: var(--card-border); color: var(--ink); border-bottom-left-radius: 6px; }
.msg.typing { color: var(--faint); }
.acts { align-self: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.act { display: flex; align-items: center; gap: 10px; padding: 9px 2px; font-size: .8rem; color: var(--ink-2); }
.act + .act { border-top: 1px solid var(--line); }
.act svg { width: 13px; height: 13px; stroke: var(--accent); stroke-width: 2; fill: none; flex: none; stroke-linecap: round; stroke-linejoin: round; }
.act .txt { flex: 1; min-width: 0; }
.act button { background: none; border: 0; color: var(--muted); font-size: .8125rem; cursor: pointer; padding: 4px; }
.composer { display: flex; gap: 8px; align-items: center; flex: none; padding-top: 6px; }
.composer .field { flex: 1; min-width: 0; }
.composer textarea { flex: 1; max-height: 120px; min-height: 42px; border-radius: 21px; padding: 10px 16px; resize: none; outline: none; font-size: .95rem;
  background: var(--capsule); border: 1px solid rgba(255, 255, 255, .12); color: #eef3f0; caret-color: #eef3f0;
  -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none; }
.composer button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; flex: none; display: grid; place-items: center; }
.composer button svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.composer button:disabled { opacity: .35; }

/* ---------- 其他 ---------- */
.banner { padding: 12px 0; margin: 4px 0 0; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.banner b { color: var(--ink-2); font-weight: 500; }
.banner .textbtn { flex: none; padding-right: 0; }
.addline { display: flex; gap: 8px; margin: 4px 0 8px; }
.addline .field { flex: 1; }
.addline button { border: 0; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent); padding: 0 16px; font-weight: 500; cursor: pointer; }
.report textarea { margin-top: 4px; }
.report .actions { display: flex; justify-content: flex-end; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
td, th { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); }
th { color: var(--muted); font-weight: 300; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

#toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--surface); color: var(--ink); border: var(--card-border); box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  padding: 9px 16px; border-radius: var(--pill); font-size: .8rem; max-width: calc(100% - 40px); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#toast button { background: none; border: 0; color: var(--accent); font-weight: 500; cursor: pointer; padding: 2px 0 2px 12px; }
body.bare #toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

.login { max-width: 360px; margin: 20vh auto 0; }
.login h1 { margin-bottom: 20px; }
.login .bigbtn { margin-top: 12px; }

@media (min-width: 720px) { main { padding-top: 24px; } }
@media (prefers-color-scheme: dark) {
  .now { background: rgba(255, 255, 255, .05); }            /* 夜间卡片跟随背景渐变 */
  .sec, .dateline { color: #c3c6cc; font-weight: 500; }     /* 夜间小标题：细宋体在深底上发虚，提亮并加一档 */
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
