/* 「我的空间」—— 深底、暖金、克制。大字日期是唯一的"亮点"，其余都安静。 */
:root {
  --bg: #0B0C10;
  --raise: #15161C;
  --raise2: #1C1D25;
  --line: #24262E;
  --line2: #30323C;
  --text: #EDE9E2;
  --sub: #A6A7B0;
  --mute: #72747E;
  --brass: #E3A73F;
  --brass-soft: rgba(227, 167, 63, .14);
  --brass-ink: #1B1306;
  --red: #F87171;
  --green: #5FD39A;
  --blue: #7E8CFF;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: var(--sans);
  --figure: var(--sans);

  --gut: 20px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --bar: rgba(11, 12, 16, .92);
  --scrim: rgba(0, 0, 0, .55);
  --toast-act: #9A6A12;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.78 var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 版面 ---------- */
#view {
  max-width: 640px; margin: 0 auto; outline: none;
  padding: calc(var(--safe-t) + 18px) var(--gut) calc(var(--tab-h) + var(--safe-b) + 40px);
  min-height: 100vh;
}
.page-h {
  font: 600 30px/1.3 var(--serif); letter-spacing: .02em;
  margin: 14px 0 6px;
}
.page-sub { color: var(--mute); font-size: 14px; margin: 0 0 22px; }
.block { margin-top: 34px; }
.block-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font: 600 19px/1.4 var(--serif); margin: 0 0 6px;
}
.block-h small { font: 400 13px var(--sans); color: var(--mute); }
.subhead { font-size: 13px; color: var(--mute); margin: 18px 0 2px; }
.empty {
  color: var(--mute); font-size: 15px; padding: 16px 0;
  border-top: 1px solid var(--line);
}

/* ---------- 今天：大日期 ---------- */
.today-top { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 18px; padding-top: 6px; }
.today-num {
  font: 400 104px/.82 var(--figure); color: var(--brass);
  letter-spacing: -.04em; font-variant-numeric: lining-nums;
}
.today-meta { padding-bottom: 6px; }
.today-meta .wd { font: 600 22px/1.3 var(--serif); }
.today-meta .md { color: var(--sub); font-size: 14px; }
.today-line { margin: 22px 0 0; font-size: 15px; color: var(--sub); }
.today-line b { color: var(--text); font-weight: 600; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sync.off::before { background: var(--mute); }
.sync.busy::before { background: var(--brass); }

/* ---------- 列表行 ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.row.idea { grid-template-columns: 1fr auto; }
.check {
  width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  border: 1.5px solid var(--line2); display: grid; place-items: center;
  transition: background .18s, border-color .18s;
}
.check svg { width: 14px; height: 14px; stroke-width: 2.4; opacity: 0; color: var(--brass-ink); }
.row.done .check { background: var(--brass); border-color: var(--brass); }
.row.done .check svg { opacity: 1; }
.row.done .rt { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--line2); }
.row.overdue .check { border-color: var(--red); }
.rbody { min-width: 0; text-align: left; width: 100%; }
.rt { font-size: 16px; line-height: 1.65; word-break: break-word; }
.rmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 13px; color: var(--mute); }
.rmeta .bell { color: var(--brass); }
.rmeta .late { color: var(--red); }
.rmeta .th { display: inline-flex; align-items: center; gap: 6px; }
.rmeta .th::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--mute)); }
.rside { font: 400 15px var(--figure); color: var(--sub); padding-top: 2px; white-space: nowrap; }
.rside.bell { color: var(--brass); }
.pending .rt { color: var(--sub); }
.working { color: var(--brass); }
.working::after { content: "…"; animation: dots 1.2s steps(3) infinite; display: inline-block; width: 1em; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1em; } }

.more-link { display: block; padding: 12px 0; color: var(--sub); font-size: 14px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }

/* 今日资讯预告 */
.teaser { display: block; padding: 16px 0 4px; border-top: 1px solid var(--line); }
.teaser .tt { font: 600 19px/1.6 var(--serif); }
.teaser .ts { color: var(--mute); font-size: 13px; margin-top: 6px; }

/* ---------- 资讯 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 5px 13px; border-radius: 999px; font: 400 14px var(--figure);
  color: var(--sub); border: 1px solid var(--line);
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.issue-label { color: var(--mute); font-size: 13px; margin: 18px 0 0; }
.lead { margin-top: 12px; }
.lead h2 { font: 600 25px/1.5 var(--serif); margin: 0 0 12px; letter-spacing: .01em; }
.lead p { margin: 0 0 12px; color: var(--text); }
.why { color: var(--sub); font-size: 14px; padding: 10px 0 0; border-top: 1px dashed var(--line2); margin-top: 14px; }
.src { font-size: 13px; color: var(--brass); display: inline-block; margin-top: 6px; }
.news-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.news-item:first-child { border-top: 1px solid var(--line); }
.news-item .nt { font-weight: 600; font-size: 16.5px; line-height: 1.6; }
.news-item .nd { color: var(--sub); font-size: 15px; margin-top: 6px; }
.news-item .tag { display: inline-block; font-size: 12px; color: var(--c, var(--sub)); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; line-height: 1.6; margin-right: 8px; vertical-align: 2px; }
.sec-h { display: flex; align-items: center; gap: 10px; font: 600 19px/1.4 var(--serif); margin: 38px 0 4px; }
.sec-h::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--c, var(--brass)); }
.ahead { border-top: 1px solid var(--line); }
.ahead li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ahead li b { font: 400 15px var(--figure); color: var(--brass); }
.skip .news-item .nt { font-weight: 400; color: var(--sub); }
ul.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- 想法 ---------- */
.search {
  width: 100%; background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; font-size: 16px; outline: none;
}
.search:focus { border-color: var(--line2); }
.seg { display: inline-flex; background: var(--raise); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 14px; border-radius: 8px; font-size: 14px; color: var(--sub); }
.seg button[aria-checked="true"], .seg button.on { background: var(--raise2); color: var(--text); box-shadow: 0 0 0 1px var(--line2) inset; }
.ideas-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ideas-bar .search { flex: 1; }
.theme-h { display: flex; align-items: center; gap: 10px; margin: 30px 0 4px; font: 600 18px/1.4 var(--serif); }
.theme-h .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.theme-h small { font: 400 13px var(--sans); color: var(--mute); }
.graph-wrap { margin: 10px calc(-1 * var(--gut)) 0; }
.graph-wrap svg { width: 100%; height: auto; display: block; stroke: none; }
.graph-wrap text { font-family: var(--sans); fill: var(--text); }
.graph-note { color: var(--mute); font-size: 13px; margin-top: 8px; }

/* ---------- 更多 / 设置 ---------- */
.set-group { margin-top: 30px; }
.set-group h3 { font: 600 18px/1.4 var(--serif); margin: 0 0 4px; }
.set-group p.desc { color: var(--mute); font-size: 14px; margin: 0 0 10px; }
.set-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; font-size: 16px;
}
.set-row:first-of-type { border-top: 1px solid var(--line); }
.set-row .val { color: var(--mute); font-size: 14px; }
.set-row .val.ok { color: var(--green); }
.set-row.danger { color: var(--red); }
.code {
  font: 13px/1.6 ui-monospace, Menlo, monospace; background: var(--raise); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; word-break: break-all; margin: 8px 0; user-select: all;
}
.steps { padding-left: 1.3em; margin: 8px 0; color: var(--sub); font-size: 15px; }
.steps li { margin: 6px 0; }
.steps b { color: var(--text); font-weight: 600; }
textarea.sources { width: 100%; min-height: 220px; font: 13px/1.7 ui-monospace, Menlo, monospace; }

/* ---------- 私密 ---------- */
.secret-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.secret-item:first-child { border-top: 1px solid var(--line); }
.secret-item .st { font-weight: 600; }
.secret-item .sx { color: var(--sub); font-size: 15px; white-space: pre-wrap; margin-top: 4px; }
.secret-item .sm { color: var(--mute); font-size: 12px; margin-top: 6px; display: flex; gap: 14px; }

/* ---------- 表单与按钮 ---------- */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--mute); }
.field input, .field select, textarea {
  background: var(--raise); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; font-size: 16px; color: var(--text); width: 100%; outline: none;
  -webkit-appearance: none; appearance: none; min-height: 46px;
}
.field input:focus, .field select:focus, textarea:focus { border-color: var(--line2); background: var(--raise2); }
textarea { resize: none; line-height: 1.7; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 500;
  background: var(--raise2); border: 1px solid var(--line2);
}
.btn.primary { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); font-weight: 600; }
.btn.ghost { background: none; border-color: transparent; color: var(--sub); }
.btn.danger { color: var(--red); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.form-err { color: var(--red); font-size: 14px; min-height: 1.5em; margin: 10px 0 0; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: grid; justify-items: center; gap: 1px; font-size: 11px; color: var(--mute); padding: 6px 0; }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { color: var(--brass); }
.rec-btn {
  justify-self: center; width: 56px; height: 56px; border-radius: 50%; margin-top: -18px;
  background: var(--brass); color: var(--brass-ink); display: grid; place-items: center;
  box-shadow: 0 0 0 6px var(--bg);
}
.rec-btn svg { width: 26px; height: 26px; stroke-width: 1.9; }
.rec-btn:active { transform: scale(.96); }

/* ---------- 面板 ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-back { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease; }
.sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto;
  max-width: 640px; margin: 0 auto;
  background: var(--raise); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line2);
  padding: 8px var(--gut) calc(var(--safe-b) + 22px);
  animation: up .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line2); margin: 2px auto 14px; }
.sheet-title { font: 600 21px/1.4 var(--serif); margin: 0 0 14px; }
.sheet textarea { background: var(--bg); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

#cap-text { font-size: 19px; line-height: 1.7; min-height: 120px; }
.cap-hint { color: var(--mute); font-size: 13px; margin: 10px 0 18px; min-height: 1.6em; }
.cap-hint.live { color: var(--brass); }
.cap-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cap-row .btn { flex: 1; height: 52px; font-size: 17px; }
.mic {
  width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--brass); color: var(--brass);
}
.mic svg { width: 28px; height: 28px; }
.mic.on { background: var(--brass); color: var(--brass-ink); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px var(--brass-soft); } }

.it-raw { color: var(--mute); font-size: 13px; margin: 8px 0 0; }
.it-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.it-grid .full { grid-column: 1 / -1; }
.it-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.it-actions #it-save, .it-actions #it-done { flex: 1 1 40%; }

/* 到点提醒卡片：只放最常用的两件事 —— 完成、稍后提醒 */
.rm-text { font: 600 27px/1.5 var(--serif); margin: 6px 0 4px; word-break: break-word; }
.rm-when { font: 400 16px var(--figure); color: var(--brass); margin: 0 0 24px; }
.rm-done { height: 54px; font-size: 18px; }
.rm-label { color: var(--mute); font-size: 13px; margin: 26px 0 10px; }
.snooze { display: flex; flex-wrap: wrap; gap: 8px; }
.snooze button {
  height: 42px; padding: 0 16px; border-radius: 999px; font-size: 15px;
  background: var(--raise2); border: 1px solid var(--line2);
}
.snooze button:active { background: var(--brass-soft); border-color: var(--brass); }
.snooze button small { color: var(--mute); font: 400 13px var(--figure); margin-left: 6px; }
.rm-edit { display: block; margin: 30px 0 4px auto; color: var(--mute); font-size: 14px; padding: 6px 0; }
#sheet-item .seg { margin-bottom: 14px; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; align-items: center; padding: calc(var(--safe-t) + 24px) var(--gut) 24px; }
.login-in { width: 100%; max-width: 380px; margin: 0 auto; }
.login-title { font: 600 44px/1.2 var(--serif); margin: 0; letter-spacing: .04em; }
.login-title::after { content: ""; display: block; width: 36px; height: 2px; background: var(--brass); margin: 18px 0 0; }
.login-sub { color: var(--sub); margin: 16px 0 34px; }
.login .btn { margin-top: 16px; height: 50px; font-size: 16px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px; max-width: calc(100vw - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 首屏唯一的入场：大日期缓缓出现 */
.today-num { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 700px) {
  :root { --gut: 32px; }
  .today-num { font-size: 128px; }
}

/* ---------- 详情面板（待办 / 想法） ---------- */
.d-head { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; margin-top: 4px; }
.check.big { width: 28px; height: 28px; margin-top: 6px; }
.check.big svg { width: 17px; height: 17px; }
.check.on { background: var(--brass); border-color: var(--brass); }
.check.on svg { opacity: 1; }
.d-title, .d-idea {
  background: none; border: 0; padding: 0; min-height: 0; border-radius: 0; width: 100%;
  font: 600 22px/1.55 var(--sans); color: var(--text); overflow: hidden;
}
.d-idea { font: 400 19px/1.75 var(--sans); }
.d-title:focus, .d-idea:focus { background: none; border: 0; }
.d-raw { color: var(--mute); font-size: 13px; margin: 10px 0 0 42px; line-height: 1.7; }
.d-idea ~ .d-raw { margin-left: 0; }
.d-date { color: var(--mute); font: 400 13px var(--sans); margin: 0 0 8px; }
.d-label { color: var(--mute); font-size: 13px; margin: 26px 0 10px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 999px; font-size: 15px; color: var(--sub);
  background: var(--raise2); border: 1px solid var(--line2); cursor: pointer;
}
.pick.on { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }
.pick.cat::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.pick.cat.on { background: var(--raise2); color: var(--text); border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; }
.pick.add { background: none; border-style: dashed; }
.pick.native input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; cursor: pointer; }
.d-foot { display: flex; gap: 22px; margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line); }
.linkish { color: var(--sub); font-size: 14px; padding: 4px 0; }
.linkish.danger { color: var(--red); }
.d-raw .linkish { font-size: 13px; color: var(--brass); padding: 0; }

/* ---------- 左右滑 ---------- */
.swipe { position: relative; overflow: hidden; }
.swipe > .row { position: relative; background: var(--row-bg, var(--bg)); will-change: transform; }
.swipe-bg { position: absolute; top: 0; bottom: 1px; display: flex; align-items: stretch; }
.swipe-bg.right { left: 0; right: 0; background: var(--brass); color: var(--brass-ink); font-weight: 600; padding-left: 20px; align-items: center; visibility: hidden; }
.swipe.to-right .swipe-bg.right { visibility: visible; }
.swipe-bg.left { right: 0; }
.swipe-bg.left button { width: 76px; font-size: 14px; font-weight: 500; background: var(--raise2); color: var(--text); }
.swipe-bg.left button.danger { background: #B4444B; color: #fff; }

/* 带"撤销"的提示 */
.toast.has-action { pointer-events: auto; display: inline-flex; align-items: center; gap: 14px; }
.toast-act { color: var(--toast-act); font-weight: 600; font-size: 14px; }
.sheet .d-title, .sheet .d-idea, .sheet .d-title:focus, .sheet .d-idea:focus { background: none; border: 0; padding: 0; }
.d-when { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
.d-when-v { font-size: 16px; color: var(--text); }
.d-when-v.bell { color: var(--brass); }
.d-when-act { font-size: 14px; color: var(--mute); }


/* ================= 主题 ================= */
/* A 纯白：参考 Things / Todoist —— 白底、黑字、一个蓝色强调，全部黑体 */
:root[data-theme="a"] {
  --bg: #FFFFFF; --raise: #FFFFFF; --raise2: #F4F4F6; --line: #EDEDF0; --line2: #DADADF;
  --text: #1D1D1F; --sub: #5C5C63; --mute: #9C9CA3;
  --brass: #2F6BEB; --brass-soft: rgba(47, 107, 235, .12); --brass-ink: #FFFFFF;
  --red: #E5484D; --green: #22A06B; --bar: rgba(255, 255, 255, .92); --scrim: rgba(20, 20, 30, .28);
  --toast-act: #9EC1FF; --serif: var(--sans); color-scheme: light;
}
/* B 石材：贴合高端家具 —— 石灰底、白色面板、胡桃木色强调，标题保留宋体 */
:root[data-theme="b"] {
  --bg: #ECEBE7; --raise: #FAFAF8; --raise2: #F1F0EC; --line: #DAD8D2; --line2: #C9C6BE;
  --text: #24211C; --sub: #5F5A51; --mute: #948E83;
  --brass: #8B5A33; --brass-soft: rgba(139, 90, 51, .12); --brass-ink: #FFFFFF;
  --red: #B9473E; --green: #4E8A5B; --bar: rgba(236, 235, 231, .92); --scrim: rgba(30, 25, 20, .3);
  --toast-act: #E2B98F; color-scheme: light;
}
/* C 原生：参考 iPhone 自带「提醒事项」/「设置」—— 浅灰底 + 白色分组卡片 */
:root[data-theme="c"] {
  --bg: #F2F2F7; --raise: #FFFFFF; --raise2: #F2F2F7; --line: #E5E5EA; --line2: #D1D1D6;
  --text: #111111; --sub: #4A4A50; --mute: #8E8E93;
  --brass: #FF8A00; --brass-soft: rgba(255, 138, 0, .14); --brass-ink: #FFFFFF;
  --red: #FF3B30; --green: #34C759; --bar: rgba(249, 249, 249, .94); --scrim: rgba(0, 0, 0, .25);
  --toast-act: #FFB65C; --serif: var(--sans); --row-bg: #FFFFFF; color-scheme: light;
}
:root[data-theme="a"] .today-num, :root[data-theme="c"] .today-num { font-family: var(--sans); font-weight: 700; letter-spacing: -.05em; color: var(--text); font-size: 92px; line-height: .9; }
:root[data-theme="a"] .page-h, :root[data-theme="c"] .page-h { font-weight: 700; font-size: 32px; }
:root[data-theme="a"] .block-h, :root[data-theme="c"] .block-h, :root[data-theme="a"] .theme-h, :root[data-theme="c"] .theme-h,
:root[data-theme="a"] .sec-h, :root[data-theme="c"] .sec-h { font-weight: 700; }
:root[data-theme="a"] .today-meta .wd { color: var(--brass); font-weight: 700; }
:root[data-theme="a"] .rside, :root[data-theme="c"] .rside { font-family: var(--sans); font-size: 14px; }
:root[data-theme="a"] .sheet-body, :root[data-theme="b"] .sheet-body, :root[data-theme="c"] .sheet-body { box-shadow: 0 -8px 30px rgba(0, 0, 0, .08); border-top-color: transparent; }
:root[data-theme="a"] .check, :root[data-theme="c"] .check { border-width: 1.8px; }
/* C：每一组是一张白色圆角卡片 */
:root[data-theme="c"] .rows { background: #FFFFFF; border: 0; border-radius: 14px; padding: 0 16px; overflow: hidden; }
:root[data-theme="c"] .rows > .swipe:last-child > .row, :root[data-theme="c"] .rows > .row:last-child { border-bottom: 0; }
:root[data-theme="c"] .block-h { font-size: 20px; margin-bottom: 10px; }
:root[data-theme="c"] .teaser { background: #FFFFFF; border: 0; border-radius: 14px; padding: 16px; }
:root[data-theme="c"] .teaser .tt { font-weight: 600; }
:root[data-theme="c"] .empty { border: 0; }
:root[data-theme="b"] .rec-btn, :root[data-theme="a"] .rec-btn, :root[data-theme="c"] .rec-btn { box-shadow: 0 0 0 6px var(--bg), 0 6px 18px rgba(0, 0, 0, .12); }
.d-when + .d-foot, div:has(> .d-when) + .d-foot { border-top: 0; margin-top: 18px; padding-top: 4px; }

/* ---------- 顶部日期 + 天气汇率 ---------- */
body { font-variant-numeric: tabular-nums; }
.day-head { padding-top: 10px; }
.day-date { font: 700 30px/1.25 var(--sans); letter-spacing: .01em; margin: 0; display: flex; align-items: baseline; gap: 12px; }
.day-wd { font: 500 17px var(--sans); color: var(--mute); letter-spacing: 0; }
.glance { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; font-size: 14px; color: var(--sub); min-height: 22px; }
.glance b { color: var(--text); font-weight: 600; }
.glance .g-sub { color: var(--mute); }
.page-h { font-weight: 700; }
.block-h, .theme-h, .sec-h, .sheet-title, .lead h2, .teaser .tt { font-weight: 600; }

/* ================= 字体 ================= */
:root { --head: var(--sans); --head-w: 700; }
.day-date, .page-h, .block-h, .sec-h, .login-title, .sheet-title, .lead h2 { font-family: var(--head); font-weight: var(--head-w); }
.day-wd { font-family: var(--head); }


/* ================= 外观（字体由 app.js 按选择写进 --sans / --head） ================= */
body { font-size: calc(16px * var(--body-scale, 1)); }
:root[data-theme] .day-date { font-size: calc(30px * var(--head-scale, 1)); }
:root[data-theme] .page-h { font-size: calc(31px * var(--head-scale, 1)); }
:root[data-theme] .block-h { font-size: calc(19px * var(--head-scale, 1)); }
:root[data-head-only="1"] .lead h2 { font-family: var(--sans); font-weight: 700; }
.tabbar, .glance, .rmeta, .subhead, .d-label, .toast, .rside { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif; }

/* 更多配色 */
:root[data-theme="h"] { /* 朱砂：白底、墨字、朱红 */
  --bg: #FFFFFF; --raise: #FFFFFF; --raise2: #F6F4F2; --line: #EEEAE6; --line2: #DDD6CF;
  --text: #1A1614; --sub: #5C534D; --mute: #A0958C; --brass: #C23B2B; --brass-soft: rgba(194, 59, 43, .1); --brass-ink: #FFFFFF;
  --red: #C23B2B; --green: #3F8F5A; --bar: rgba(255, 255, 255, .92); --scrim: rgba(26, 22, 20, .28); --toast-act: #F2A79D; color-scheme: light;
}
:root[data-theme="e"] { /* 宣纸：暖白、赭石 */
  --bg: #F6F3EC; --raise: #FFFDF8; --raise2: #EFEBE2; --line: #E4DED2; --line2: #D3CBBB;
  --text: #2A2520; --sub: #625A50; --mute: #9A9083; --brass: #A0522D; --brass-soft: rgba(160, 82, 45, .12); --brass-ink: #FFFFFF;
  --red: #B9473E; --green: #4E8A5B; --bar: rgba(246, 243, 236, .92); --scrim: rgba(42, 37, 32, .28); --toast-act: #E8B48F; color-scheme: light;
}
:root[data-theme="g"] { /* 雾蓝：冷灰蓝、藏青 */
  --bg: #EEF2F6; --raise: #FFFFFF; --raise2: #E6ECF2; --line: #DCE3EA; --line2: #C9D3DD;
  --text: #17222E; --sub: #4E5B69; --mute: #8693A1; --brass: #1F4E8C; --brass-soft: rgba(31, 78, 140, .1); --brass-ink: #FFFFFF;
  --red: #C8453F; --green: #2F8A5F; --bar: rgba(238, 242, 246, .92); --scrim: rgba(23, 34, 46, .28); --toast-act: #9DBCE8; color-scheme: light;
}
:root[data-theme="f"] { /* 墨绿：深绿底、香槟金 */
  --bg: #101A16; --raise: #16231E; --raise2: #1C2C26; --line: #24352E; --line2: #2F443B;
  --text: #E8EDE9; --sub: #A9B5AE; --mute: #74827A; --brass: #D4B572; --brass-soft: rgba(212, 181, 114, .14); --brass-ink: #14110A;
  --red: #F08A80; --green: #7FD1A2; --bar: rgba(16, 26, 22, .92); --scrim: rgba(0, 0, 0, .5); --toast-act: #8A6A20; color-scheme: dark;
}
:root[data-theme="d"] { color-scheme: dark; } /* 夜色 = 最初的深色 */
:root[data-theme="e"] .sheet-body, :root[data-theme="g"] .sheet-body, :root[data-theme="h"] .sheet-body { box-shadow: 0 -8px 30px rgba(0, 0, 0, .08); border-top-color: transparent; }
:root[data-theme="e"] .rec-btn, :root[data-theme="g"] .rec-btn, :root[data-theme="h"] .rec-btn { box-shadow: 0 0 0 6px var(--bg), 0 6px 18px rgba(0, 0, 0, .12); }

/* 外观选择页 */
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.pv { text-align: left; border-radius: 14px; padding: 12px 12px 10px; border: 1px solid var(--pv-line); position: relative; overflow: hidden; }
.pv.on { box-shadow: 0 0 0 2px var(--brass); }
.pv-date { line-height: 1.3; white-space: nowrap; }
.pv-date small { font-size: 11px; opacity: .55; font-weight: 400; }
.pv-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 10px; padding: 6px 0; border-top: 1px solid var(--pv-line); border-bottom: 1px solid var(--pv-line); }
.pv-ck { width: 11px; height: 11px; border-radius: 50%; border: 1.2px solid currentColor; opacity: .4; }
.pv-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-time { color: var(--pv-accent); font-size: 11.5px; }
.pv-name { font: 500 12px -apple-system, "PingFang SC", sans-serif; opacity: .6; margin-top: 8px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 6px; }
.sw { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--sub); }
.sw-dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.sw-dot span { width: 14px; height: 14px; border-radius: 50%; }
.sw.on .sw-dot { outline: 2px solid var(--brass); outline-offset: 3px; }
.sw.on { color: var(--text); font-weight: 600; }
.font-list { border-top: 1px solid var(--line); }
.font-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; }
.font-opt.on .fo-sample { color: var(--brass); }
.fo-sample { color: var(--text); line-height: 1.4; }
.fo-name { display: grid; justify-items: end; font: 500 13px -apple-system, "PingFang SC", sans-serif; color: var(--sub); white-space: nowrap; }
.fo-name small { font-size: 11px; color: var(--mute); font-weight: 400; }
.font-opt.on .fo-name { color: var(--brass); }

/* ---------- 按住说话 ---------- */
.rec-btn, .mic { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rec-ov { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; background: var(--scrim); pointer-events: none; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 40px); }
.rec-ov-in { background: var(--raise); color: var(--text); border-radius: 22px; padding: 22px 34px 18px; display: grid; justify-items: center; gap: 8px; min-width: 220px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
.rec-level { display: flex; align-items: center; gap: 5px; height: 40px; }
.rec-level span { width: 6px; height: 36px; border-radius: 3px; background: var(--brass); transform: scaleY(.25); transition: transform .08s linear; }
.rec-time { font: 600 22px -apple-system, "PingFang SC", sans-serif; font-variant-numeric: tabular-nums; min-height: 30px; }
.rec-tip { font-size: 13px; color: var(--mute); }
.rec-ov[data-state="rec"] .rec-tip { color: var(--sub); }
.rec-ov[data-state="busy"] .rec-level span { animation: recbusy 1s ease-in-out infinite; }
.rec-ov[data-state="busy"] .rec-level span:nth-child(2) { animation-delay: .1s; }
.rec-ov[data-state="busy"] .rec-level span:nth-child(3) { animation-delay: .2s; }
.rec-ov[data-state="busy"] .rec-level span:nth-child(4) { animation-delay: .3s; }
.rec-ov[data-state="busy"] .rec-level span:nth-child(5) { animation-delay: .4s; }
@keyframes recbusy { 50% { transform: scaleY(.8); } }

/* ---------- 专业词库 ---------- */
.vocab-add { display: flex; gap: 10px; margin: 6px 0 18px; }
.vocab-add input { flex: 1; }
.vocab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.vocab-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--raise2); border: 1px solid var(--line2); font-size: 15px; }
.vocab-chip button { width: 24px; height: 24px; border-radius: 50%; color: var(--mute); font-size: 16px; line-height: 1; }
.toast { max-width: calc(100vw - 32px); }
.toast.has-action { display: flex; }
.toast-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-act { flex: none; }

/* ---------- 下拉刷新 ---------- */
.ptr { position: fixed; top: calc(var(--safe-t) - 44px); left: 50%; z-index: 30; width: 38px; height: 38px; border-radius: 50%;
  background: var(--raise); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); display: grid; place-items: center; color: var(--mute);
  transform: translate(-50%, 0); opacity: 0; transition: opacity .15s; pointer-events: none; }
.ptr.show { opacity: 1; }
.ptr svg { width: 20px; height: 20px; transition: transform .2s; }
.ptr.ready { color: var(--brass); }
.ptr.ready svg { transform: rotate(180deg); }
.ptr.spin { transition: transform .2s, opacity .15s; color: var(--brass); }
.ptr.spin svg { animation: ptrspin .8s linear infinite; }
.ptr.spin svg path { d: path("M12 4a8 8 0 1 0 8 8"); }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* ---------- 资讯 v2 ---------- */
.nlist { border-top: 1px solid var(--line); }
.nrow { border-bottom: 1px solid var(--line); }
.nrow-h { display: block; width: 100%; text-align: left; padding: 13px 0; }
.nrow .nt { font-weight: 600; font-size: 16px; line-height: 1.6; }
.nrow .nwhy { color: var(--brass); font-size: 14px; margin-top: 3px; line-height: 1.6; }
.nrow .ns { color: var(--sub); font-size: 14.5px; margin-top: 3px; line-height: 1.65; }
.nrow-d { padding: 0 0 14px; }
.nrow-d .nd { color: var(--sub); font-size: 15px; margin: 0 0 6px; }
.nmeta { display: flex; align-items: center; gap: 12px; }
.ncat { font-size: 12px; color: var(--mute); border: 1px solid var(--line2); border-radius: 4px; padding: 0 6px; line-height: 1.7; }
.aif { font-size: 11px; color: var(--brass); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-right: 6px; vertical-align: 2px; font-weight: 500; }
.ntabs { display: flex; gap: 6px; margin: 30px 0 4px; overflow-x: auto; scrollbar-width: none; }
.ntabs::-webkit-scrollbar { display: none; }
.ntabs button { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 15px; color: var(--sub); background: var(--raise2); border: 1px solid var(--line); }
.ntabs button small { font-size: 12px; color: var(--mute); margin-left: 5px; }
.ntabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ntabs button.on small { color: var(--bg); opacity: .7; }
.must .nrow-h { padding: 14px 0; }
.ahead-h { color: var(--sub); font-size: 14px; }
.chip { position: relative; }
.chip .unseen { position: absolute; top: 3px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
/* 来源列表 */
.src-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.src-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.src-row .dot.ok { background: var(--green); }
.src-row .dot.bad { background: var(--red); }
.src-st { font-size: 12.5px; color: var(--mute); }
.src-st.bad { color: var(--red); }
.src-add { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.src-add .full { grid-column: 1 / -1; }
