/* ================================================================
   成长手帐 · 样式
   主题：lavender（默认）/ sakura / mint / night（深色）
   ================================================================ */

/* Nunito（数字和英文用）：字体文件放在自己的网站里，不依赖 Google Fonts。可变字体，一个文件包含 600–900 */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url(fonts/nunito-latin.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;
}

:root, [data-theme="lavender"] {
  --bg: #f6f3fb;
  --dot: #e4ddf1;
  --card: #ffffff;
  --ink: #2e2a3a;
  --muted: #8a849a;
  --line: #ece7f4;
  --accent: #8b6fd6;
  --accent-ink: #ffffff;
  --accent-2: #f39ac1;
  --soft: #f0eafc;
  --partial: #ffc978;
  --partial-ink: #5a3d00;
  --rest: #9fb4e6;
  --empty: #ebe7f2;
  --zero: #cbc5d6;
  --note: #fff5d6;
  --note-ink: #4a3d1a;
  --shadow: 0 6px 20px rgba(90, 60, 160, .08);
  color-scheme: light;
}
[data-theme="sakura"] {
  --bg: #fff5f7; --dot: #f9dfe6; --ink: #3a2a30; --muted: #9a8189; --line: #f6e4e9;
  --accent: #ec7aa1; --accent-2: #ffb36b; --soft: #ffe8ef;
  --partial: #ffd27a; --rest: #a9c3ef; --empty: #f5e9ec; --zero: #d8c6cc;
  --note: #fff1dc; --shadow: 0 6px 20px rgba(200, 80, 120, .08);
}
[data-theme="mint"] {
  --bg: #f1faf7; --dot: #d6eee6; --ink: #22332f; --muted: #7c918b; --line: #e1f0eb;
  --accent: #36ae93; --accent-2: #ffa98a; --soft: #dcf3ec;
  --partial: #ffd27a; --rest: #9fbde8; --empty: #e5f1ed; --zero: #c3d3ce;
  --note: #fffbe0; --shadow: 0 6px 20px rgba(30, 120, 100, .08);
}
[data-theme="soda"] {
  --bg: #f2f9ff; --dot: #d9eaf8; --ink: #1f2d3a; --muted: #7a8c9c; --line: #e0edf7;
  --accent: #3a9ad9; --accent-2: #f5b21b; --soft: #e1f0fb;
  --partial: #ffd27a; --rest: #a7b8e8; --empty: #e6eff6; --zero: #c4d3df;
  --note: #fff8d6; --shadow: 0 6px 20px rgba(40, 120, 190, .09);
}
[data-theme="galaxy"] {
  --bg: #120f24; --dot: #221c40; --card: #1c1736; --ink: #f3eeff; --muted: #a59fca; --line: #2e2752;
  --accent: #ff8fc8; --accent-ink: #1c1736; --accent-2: #8fd3ff; --soft: #33264f;
  --partial: #f2c46b; --partial-ink: #2a1d00; --rest: #8fa4e6; --empty: #2a2449; --zero: #5b5585;
  --note: #2d2550; --note-ink: #f6f0ff; --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
[data-theme="night"] {
  --bg: #17152b; --dot: #26233f; --card: #221f3b; --ink: #ece9ff; --muted: #a19cc4; --line: #322e52;
  --accent: #a990ff; --accent-ink: #17152b; --accent-2: #ff9ccf; --soft: #2f2952;
  --partial: #e8b86a; --partial-ink: #2a1d00; --rest: #7f95d6; --empty: #2d2a4a; --zero: #5d5880;
  --note: #3a3456; --note-ink: #f3eeff; --shadow: 0 6px 20px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* 调色盘：只存三个色相（OKLCH，0–359）：主色 --h、点缀色 --h2、底色 --hb（背景、卡片、线、字），其余颜色都在这里推出来。
   OKLCH 里明度、鲜艳度固定，只转色相：不管选哪个颜色，看起来都一样亮、字都一样清楚。
   （主色配白字的对比度全色相 ≥ 3.2，和现成主题一个水平） */
[data-theme="custom"] {
  --h: 350; --h2: 40; --hb: var(--h);
  --bg: oklch(.968 .02 var(--hb)); --dot: oklch(.91 .03 var(--hb)); --card: #ffffff;
  --ink: oklch(.30 .03 var(--hb)); --muted: oklch(.63 .035 var(--hb)); --line: oklch(.935 .018 var(--hb));
  --accent: oklch(.62 .15 var(--h)); --accent-ink: #ffffff; --accent-2: oklch(.76 .13 var(--h2)); --soft: oklch(.945 .03 var(--h));
  --partial: #ffd27a; --rest: #a7b8e8; --empty: oklch(.935 .012 var(--hb)); --zero: oklch(.83 .025 var(--hb));
  --note: #fff5d6; --shadow: 0 6px 20px oklch(.5 .15 var(--h) / .09);
}
[data-theme="custom"][data-cc="dark"] {
  --bg: oklch(.20 .025 var(--hb)); --dot: oklch(.27 .03 var(--hb)); --card: oklch(.255 .03 var(--hb));
  --ink: oklch(.95 .015 var(--hb)); --muted: oklch(.74 .035 var(--hb)); --line: oklch(.32 .04 var(--hb));
  --accent: oklch(.78 .13 var(--h)); --accent-ink: oklch(.20 .025 var(--h)); --accent-2: oklch(.82 .11 var(--h2)); --soft: oklch(.32 .06 var(--h));
  --partial: #e8b86a; --partial-ink: #2a1d00; --rest: #7f95d6; --empty: oklch(.30 .03 var(--hb)); --zero: oklch(.49 .04 var(--hb));
  --note: oklch(.34 .035 var(--hb)); --note-ink: #f3eeff; --shadow: 0 6px 20px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  /* 自动滚动（聚焦输入框等）时，不要把内容藏到悬浮导航栏后面 */
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1024px) { html { scroll-padding-bottom: 0; scroll-padding-top: 96px; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
.num, .total b, .kpi b, .dad-total b, .cal-d, .greet-date, .page-title, .strip-day b, .hist-bar b {
  font-family: Nunito, ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:active:not(:disabled) { transform: scale(.96); }
h1, h3, h4 { margin: 0; }
h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; font-weight: 400; }
.mt { margin-top: 16px; }
.center { text-align: center; }
.boot { min-height: 100vh; display: grid; place-items: center; font-size: 32px; color: var(--accent); animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 外壳：手机 = 悬浮底部导航 ================= */
.nav {
  position: fixed; z-index: 10;
  left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  height: 64px; display: flex; justify-content: space-around; align-items: center;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: 0 6px;
}
.brand, .me-chip, .nav-me { display: none; }
.tabs { flex: 1; display: flex; justify-content: space-around; align-items: center; gap: 2px; }
.nav-btn {
  flex: 1; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: none; border: 0; border-radius: 16px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.nav-btn svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.on { color: var(--accent); background: var(--soft); }
.nav-btn.wide-only { display: none; }

/* 我的（昵称 + 主题色） */
.me-chip {
  align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card);
  border-radius: 99px; padding: 4px 14px 4px 4px; height: 40px; font-weight: 700; font-size: 13.5px;
}
.me-swatch {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) 0 50%, var(--accent-2) 50% 100%);
}
/* 消息：信封按钮（未读带数字）、消息面板 */
.msg-btn {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.msg-btn.in-greet { width: 44px; height: 44px; box-shadow: var(--shadow); }
.msg-btn svg, .msg-row svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.msg-badge {
  font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--accent-2); color: #fff; text-align: center;
}
.msg-btn .msg-badge { position: absolute; top: -4px; right: -4px; box-shadow: 0 0 0 2px var(--card); }
.me-float.has-unread::after {
  content: ''; position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 2px var(--card);
}
.msg-sheet { position: relative; }
.msg-sheet h3 { margin-right: 44px; }
.msg-box { margin: 10px 0 16px; }
.msg-text { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-jump { display: block; margin: 12px auto 0; }
.msg-empty { margin: 16px 0 8px; }
.msg-row {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 14.5px;
}
.msg-row span { flex: 1; text-align: left; }
.msg-row b { color: var(--muted); }
.me-name { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-logout { display: block; margin: 4px auto 0; color: var(--muted); }
.sheet-version { display: block; margin: 10px auto 0; color: var(--muted); font-size: 12px; opacity: .75; text-decoration: none; }

/* 大手机横屏 / iPad 竖屏：底部标签栏居中，6 个全显示 */
@media (min-width: 600px) {
  .nav { left: 50%; right: auto; width: min(560px, calc(100% - 24px)); transform: translateX(-50%); }
  .nav-btn.wide-only { display: flex; }
  .nav-btn { font-size: 13px; }
  .nav-btn svg { width: 25px; height: 25px; }
}
.main {
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(100px + env(safe-area-inset-bottom, 0px));
  max-width: 1280px; margin: 0 auto;
}
.page-title { font-size: 26px; font-weight: 900; margin: 4px 0 14px; letter-spacing: .5px; }

/* ================= 通用组件 ================= */
.card {
  background: var(--card); border-radius: 22px; padding: 18px;
  margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.btn {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 14px;
  padding: 10px 18px; min-height: 46px; font-weight: 600;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-style: dashed; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 13.5px; }
.btn.block { width: 100%; margin-bottom: 14px; }
.link { background: none; border: 0; color: var(--accent); padding: 4px; font-weight: 600; }
.icon-btn {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  border: 0; background: var(--soft); color: var(--accent); font-size: 18px; line-height: 1; font-weight: 700;
}
.icon-btn.lg { width: 44px; height: 44px; font-size: 22px; border-radius: 14px; }
.icon-btn:disabled { opacity: .35; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between h3 { margin: 0; }

input, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px;
  padding: 11px 14px; outline: none; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:focus, textarea:focus { border-color: var(--accent); background: var(--card); }
label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
label input, label textarea { margin-top: 6px; color: var(--ink); font-weight: 400; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }

/* 分段按钮 */
.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; min-height: 46px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.seg-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg-btn.zero.on { background: var(--zero); border-color: var(--zero); color: var(--ink); }

/* ================= 今天页：问候头部 ================= */
.greet { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.greet-text { flex: 1; min-width: 0; }
.greet-hello { font-size: 14px; color: var(--muted); font-weight: 600; }
.greet-date { font-size: 30px; font-weight: 900; line-height: 1.15; letter-spacing: .5px; }
.greet-date small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.greet-sub { font-size: 12.5px; color: var(--muted); }
.theme-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none;
  background: conic-gradient(var(--accent) 0 50%, var(--accent-2) 50% 100%);
  box-shadow: 0 0 0 3px var(--card), var(--shadow);
}
.cal-sheet .calendar { box-shadow: none; border: 0; padding: 0; margin-bottom: 10px; }
.cal-sheet .legend { margin: 0 0 14px; justify-content: center; }
.today-tag {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px; font-weight: 700; background: var(--accent-2); color: #fff;
  padding: 2px 9px; border-radius: 99px; vertical-align: middle; letter-spacing: 0;
}
.today-tag.future { background: var(--soft); color: var(--accent); white-space: nowrap; }

/* 本周贴纸条 */
.strip { display: flex; gap: 6px; }
.strip-day {
  flex: 1; min-width: 0; border-radius: 16px; border: 0; background: var(--card);
  padding: 7px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11.5px; color: var(--muted); box-shadow: var(--shadow);
}
.strip-day b { font-size: 15px; color: var(--ink); line-height: 1.2; }
.sticker { font-size: 17px; line-height: 1; height: 18px; display: inline-flex; align-items: center; }
.st-done .sticker    { color: var(--accent); }
.st-partial .sticker { color: var(--partial); }
.st-rest .sticker    { color: var(--rest); }
.st-started .sticker { color: var(--muted); }
.st-empty .sticker   { color: var(--empty); }
.strip-day.sel { background: var(--accent); color: var(--accent-ink); }
.strip-day.sel b, .strip-day.sel .sticker { color: var(--accent-ink); }
.strip-day.today:not(.sel) { box-shadow: inset 0 0 0 2px var(--accent); }
.strip-day.future { opacity: .6; }
.rec-strip { margin-bottom: 14px; }

/* 昨天的留言：便利贴 */
.note-card {
  position: relative; background: var(--note); color: var(--note-ink);
  border-radius: 6px 18px 18px 18px; padding: 14px 16px 14px 18px; margin: 4px 4px 16px;
  transform: rotate(-.8deg); box-shadow: var(--shadow);
}
.note-card::before {
  content: ''; position: absolute; top: -9px; left: 22px; width: 54px; height: 18px;
  background: color-mix(in srgb, var(--accent-2) 55%, transparent); border-radius: 3px; transform: rotate(-4deg);
}
.note-card .note-from { font-size: 12px; opacity: .7; font-weight: 700; display: block; }
.note-card .note-text { font-size: 15px; font-weight: 600; }

.ro-banner { background: var(--soft); color: var(--accent); padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }

/* 日期类型 + 心情 */
.type-seg { margin-bottom: 14px; }
.type-seg .seg-btn { min-height: 54px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.type-seg .seg-btn .emo { font-size: 19px; }

.hint { color: var(--muted); text-align: center; padding: 26px 18px; }
.hint .emo { font-size: 30px; display: block; margin-bottom: 4px; }
.rest-card { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, var(--soft), var(--card)); }
.rest-card p { margin: 2px 0 0; }
.rest-moon { font-size: 40px; color: var(--rest); }

/* 计划卡头部 */
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.plan-head .link { flex: none; margin-top: -2px; }

/* 周计划页 */
.ptype {
  flex: none; white-space: nowrap; border: 1px solid var(--line); background: transparent; border-radius: 99px;
  padding: 3px 9px; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.4;
}
.ptype.t-繁忙 { background: color-mix(in srgb, var(--partial) 35%, var(--card)); border-color: transparent; color: var(--partial-ink); }
.ptype.t-休息 { background: color-mix(in srgb, var(--rest) 28%, var(--card)); border-color: transparent; color: var(--ink); }
.ptype.ro { cursor: default; }
.mini-seg { margin-bottom: 10px; gap: 6px; }
.mini-seg .seg-btn { min-height: 34px; font-size: 13px; border-radius: 11px; }
.done-badge { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
/* 页头：这一周的名字（她自己起） */
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.wk-head .page-title, .wk-head .pager { margin: 0; }
.wk-name { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; min-width: 0; }
button.wk-name { cursor: pointer; }
button.wk-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.wk-name small { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .5px; }
.wk-name .t { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: .5px; line-height: 1.25; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; overflow-wrap: anywhere; }
.wk-name .t i { font-style: normal; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); padding: 3px 9px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
/* 和别的页一样：手机上标题一行（右上角留给“我的”按钮），翻页胶囊撑满下一行；iPad 也给那个圆按钮让出位置 */
@media (min-width: 768px) and (max-width: 1023px) { .wk-head { padding-right: 56px; } }
@media (max-width: 767px) {
  .wk-head { padding-right: 52px; }
  .wk-head .pager, .wk-head .wk-edit { flex-basis: calc(100% + 52px); margin-right: -52px; }
  .wk-head .pill-pager { flex: 1; justify-content: space-between; }
}
.wk-edit { flex: 1 1 320px; max-width: 560px; padding: 14px 16px; margin: 0; }
.wk-edit h4 { margin: 0 0 8px; font-size: 14px; }
.wk-emos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wk-emos button { width: 38px; height: 38px; border-radius: 12px; border: 1.5px solid transparent; background: var(--bg); font-size: 19px; line-height: 1; padding: 0; }
.wk-emos button.on { border-color: var(--accent); background: var(--soft); }
.wk-line { display: flex; gap: 8px; }
.wk-line input { flex: 1; min-width: 0; height: 42px; font-weight: 700; }
.wk-line .btn { flex: none; }
.wk-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wk-sugg button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; }

/* 一周的路：七站，小伙伴站在今天，尽头是目标的旗子 */
.road-card { padding: 14px 16px 8px; }
.road-top { font-size: 14px; color: var(--muted); }
.road-top b { color: var(--accent); font-size: 17px; }
.road-svg { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.road-svg.narrow { max-width: 520px; }
.rd-road, .rd-walked { fill: none; stroke: color-mix(in srgb, var(--accent) 13%, var(--card)); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.rd-walked { stroke: color-mix(in srgb, var(--accent) 34%, var(--card)); }
.rd-mid { fill: none; stroke: var(--card); stroke-width: 2; stroke-dasharray: 8 11; stroke-linecap: round; opacity: .9; }
.rd-far { fill: none; stroke: color-mix(in srgb, var(--accent) 30%, var(--card)); stroke-width: 6; stroke-dasharray: 1 13; stroke-linecap: round; }
.rd-paw { fill: color-mix(in srgb, var(--accent) 62%, var(--card)); }
/* 水面和石头：没走出来的那一段是水；写一件事放一块石头，做完一件石头变成走过的颜色 */
.rd-water { fill: none; stroke: color-mix(in srgb, #4aa8e0 34%, var(--card)); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.rd-ripple { fill: none; stroke: color-mix(in srgb, #4aa8e0 62%, var(--card)); stroke-width: 2; stroke-dasharray: 5 15; stroke-linecap: round; opacity: .7; }
.rd-stone { pointer-events: none; }
.rd-stone .t { fill: #f1ead6; }
.rd-stone .b { fill: #b1a88d; }
.rd-stone.on .t { fill: color-mix(in srgb, var(--accent) 55%, #ffffff); }
.rd-stone.on .b { fill: color-mix(in srgb, var(--accent) 80%, #000000); }
.rd-stone-ring { fill: none; stroke: #f0b429; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: rd-ring 1.1s ease-in-out infinite alternate; }
.rd-stone.pop .t, .rd-stone.pop .b { transform-box: fill-box; transform-origin: center; animation: rd-pop .45s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.rd-st.last1 .halo { opacity: 1; animation: rd-last 1.1s ease-in-out infinite alternate; }
.rd-hop { animation: rd-hop .55s cubic-bezier(.3, .1, .3, 1) backwards; }
.rd-walked.fresh, .rd-road.fresh { stroke-dasharray: 1; animation: rd-draw .9s .5s ease-out backwards; }
.rd-mid.fresh, .rd-paw.fresh { animation: rd-fade .5s 1.35s ease-out backwards; }
.rd-ask circle { fill: var(--card); stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; }
.rd-ask text { font-size: 15px; font-weight: 900; fill: var(--accent); text-anchor: middle; }
.rd-ask { animation: rd-ask 1.6s ease-in-out infinite alternate; }
@keyframes rd-ring { from { opacity: .35; transform: scale(.9); } to { opacity: 1; transform: scale(1.12); } }
@keyframes rd-pop { from { transform: scale(0); opacity: 0; } }
@keyframes rd-last { from { opacity: .35; } to { opacity: 1; } }
@keyframes rd-hop { 0% { transform: translate(var(--hx), var(--hy)); } 50% { transform: translate(calc(var(--hx) / 2), calc(var(--hy) / 2 - 24px)); } 100% { transform: none; } }
@keyframes rd-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rd-fade { from { opacity: 0; } }
@keyframes rd-ask { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .rd-stone-ring, .rd-stone.pop .t, .rd-stone.pop .b, .rd-st.last1 .halo, .rd-hop, .rd-walked.fresh, .rd-road.fresh, .rd-mid.fresh, .rd-paw.fresh, .rd-ask { animation: none !important; } }
.rd-st, .rd-bottle-g { cursor: pointer; outline: 0; }
.rd-st .halo { fill: var(--soft); stroke: var(--accent); stroke-width: 1.5; opacity: 0; }
.rd-st.sel .halo { opacity: 1; }
.rd-st:focus-visible .halo { opacity: 1; stroke-width: 3; }
.rd-st .lab { font-size: 13.5px; font-weight: 800; fill: var(--ink); text-anchor: middle; }
.rd-st .sub { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.rd-st.sel .lab, .rd-st.today .lab { fill: var(--accent); }
.rd-done, .rd-pin { fill: var(--accent); }
.rd-done-paw { fill: var(--accent-ink); }
.rd-plain { fill: var(--card); stroke: color-mix(in srgb, var(--accent) 30%, var(--card)); stroke-width: 2; }
.rd-plan { fill: var(--card); stroke: var(--accent); stroke-width: 2.5; }
.rd-open { fill: var(--card); stroke: color-mix(in srgb, var(--muted) 55%, transparent); stroke-width: 2; stroke-dasharray: 4 4; }
.rd-num { font-size: 12.5px; font-weight: 900; fill: var(--accent); text-anchor: middle; }
.rd-plus { font-size: 17px; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.rd-hill { fill: color-mix(in srgb, var(--partial) 38%, var(--card)); }
.rd-tent { fill: color-mix(in srgb, var(--rest) 45%, var(--card)); stroke: var(--card); stroke-width: 2; stroke-linejoin: round; }
.rd-tent-door { fill: color-mix(in srgb, var(--rest) 85%, var(--ink)); }
.rd-moon { font-size: 13px; fill: color-mix(in srgb, var(--rest) 80%, var(--ink)); }
.rd-pond { fill: color-mix(in srgb, var(--rest) 38%, var(--card)); }
.btl-glass { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.btl-cork { fill: #c98a4b; }
.btl-paper { fill: var(--note); stroke: color-mix(in srgb, var(--partial) 70%, var(--ink)); stroke-width: 1; }
.btl-ribbon { stroke: var(--accent-2); stroke-width: 3; }
.rd-bottle-g.none .btl-glass { stroke: var(--accent-2); stroke-dasharray: 4 3; }
.rd-bottle-g.none .btl-paper, .rd-bottle-g.none .btl-ribbon, .rd-bottle-g.none .btl-cork, .rd-bottle-g.none .rd-pond { display: none; }
.rd-bottle-g.due .rd-bottle { animation: btl-rock 1.2s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes btl-rock { from { rotate: -7deg; } to { rotate: 7deg; } }
.rd-goal { font-size: 13.5px; font-weight: 900; fill: var(--ink); text-anchor: middle; }
.rd-bottle-g.none .rd-goal { fill: var(--muted); font-weight: 700; }
.rd-goal-sub { font-size: 11.5px; fill: var(--muted); text-anchor: middle; }
.rd-goal-sub tspan { fill: var(--accent-2); font-weight: 900; }
.rd-bottle-g:focus-visible .rd-goal { text-decoration: underline; }

/* 目标面板里的一小片夜空（各个主题下都是深色的） */
.goal-sky {
  --sky: color-mix(in srgb, var(--accent) 20%, #1b1638); --sky-ink: #ffffff; --sky-soft: #cfc8f2; --star: #ffd772;
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 12px; padding: 14px 18px; border: 0; border-radius: 18px;
  color: var(--sky-ink); text-align: left; font: inherit; cursor: pointer;
  /* 夜空里零星的小星星：只是底色上的几个点 */
  background:
    radial-gradient(1.5px 1.5px at 12% 78%, #8f86c9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 31% 18%, #8f86c9 50%, transparent 51%),
    radial-gradient(2px 2px at 44% 66%, #6f66ad 50%, transparent 51%), radial-gradient(1.5px 1.5px at 58% 24%, #8f86c9 50%, transparent 51%),
    radial-gradient(2px 2px at 71% 82%, #6f66ad 50%, transparent 51%), radial-gradient(1.5px 1.5px at 86% 14%, #8f86c9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 95% 60%, #8f86c9 50%, transparent 51%), var(--sky);
}
.goal-sky.static { cursor: default; margin: 14px 0; }
.gs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gs-text small { font-size: 12.5px; font-weight: 800; color: var(--sky-soft); }
.gs-text b { font-size: 20px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.gs-text i { font-style: normal; color: var(--star); font-weight: 900; font-family: Nunito, ui-rounded, sans-serif; font-size: 1.15em; }
.gs-count { font-size: 14px; font-weight: 700; color: var(--sky-soft); }
.gs-hint { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--star); }
.const-svg { flex: none; display: block; width: clamp(130px, 42%, 230px); height: auto; overflow: visible; }
.cs-star { fill: #ffd772; }
.cs-glow { fill: #ffd772; opacity: .16; }
.cs-dot.next { fill: none; stroke: #ffd772; stroke-width: 2; }
/* 夜空是活的：亮着的星一闪一闪（各闪各的），下一颗会出现的位置往外荡光圈 */
.cs-pt, .cs-star, .cs-glow, .cs-next, .cs-burst { transform-box: fill-box; transform-origin: center; }
.cs-star { animation: cs-twinkle 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.53s); }
.cs-glow { animation: cs-glow 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.53s); }
@keyframes cs-twinkle { 50% { transform: scale(1.3) rotate(12deg); } }
@keyframes cs-glow { 50% { opacity: .45; transform: scale(1.4); } }
.cs-next { fill: none; stroke: #ffd772; stroke-width: 2; animation: cs-ripple 1.8s ease-out infinite; }
@keyframes cs-ripple { from { transform: scale(.45); opacity: 1; } to { transform: scale(2); opacity: 0; } }
/* 走进周计划页（或瓶子打开）时：星星一颗一颗冒出来 */
.cs-intro .cs-pt { animation: cs-in .45s cubic-bezier(.2, 1.6, .4, 1) backwards; animation-delay: calc(var(--i) * .07s + .15s); }
@keyframes cs-in { from { transform: scale(0); opacity: 0; } }
/* 上次来之后新点亮的星：炸开一圈光 */
.cs-burst { fill: none; stroke: #ffd772; stroke-width: 2.5; opacity: 0; animation: cs-burst 1s ease-out 2 backwards; animation-delay: calc(var(--i) * .09s + .55s); }
@keyframes cs-burst { from { transform: scale(.4); opacity: 1; } to { transform: scale(4.5); opacity: 0; } }

/* ---------- 周计划的画面：有目标时整张卡片是夜色，目标在左上角，星星在背景里，路在前面 ---------- */
.road-card.night {
  --sky: color-mix(in srgb, var(--accent) 20%, #1b1638); --sky-ink: #ffffff; --sky-soft: #cfc8f2; --star: #ffd772;
  color: var(--sky-ink); border-color: transparent;
  background:
    radial-gradient(1.5px 1.5px at 8% 62%, #8f86c9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 33% 12%, #8f86c9 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 40%, #6f66ad 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 10%, #8f86c9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 96% 44%, #8f86c9 50%, transparent 51%), radial-gradient(2px 2px at 22% 92%, #6f66ad 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 8%, #b9b0ea 50%, transparent 51%), radial-gradient(2px 2px at 70% 30%, #8f86c9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 26%, #8f86c9 50%, transparent 51%), radial-gradient(2px 2px at 80% 18%, #b9b0ea 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 52%, #6f66ad 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 26%, #b9b0ea 50%, transparent 51%),
    /* 右上角亮一点：星星那片天 */
    radial-gradient(55% 95% at 90% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%), var(--sky);
}
.road-scene { position: relative; }
.scene-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.scene-head small { font-size: 12.5px; font-weight: 800; color: var(--sky-soft); }
.scene-head b { font-size: 22px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.scene-head .gs-count { font-size: 14px; font-weight: 700; color: var(--sky-soft); }
.scene-head i { font-style: normal; font-weight: 900; font-size: 1.2em; font-family: Nunito, ui-rounded, sans-serif; color: var(--star); }
.scene-head i.d { color: var(--sky-ink); }
.road-card.night .road-top { margin-top: 8px; color: var(--sky-soft); font-size: 13px; }
.road-card.night .road-top b { color: var(--star); }
/* 宽屏：这几行字浮在画面左上角，路的画面从卡片顶上开始（星星在右上方的背景里） */
/* 宽屏为了省高度，排成两行：目标名 + 已亮几颗 · 还有几天 / 提示 */
.road-scene.wide .scene-top { position: absolute; top: 0; left: 4px; z-index: 1; max-width: 64%; }
.road-scene.wide .scene-head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.road-scene.wide .scene-head small { display: none; }
.road-scene.wide .scene-head b { font-size: 24px; }
.road-scene.wide .gs-hint { width: 100%; margin-top: 0; }
/* 窄屏：字在左边三行（目标名 / 亮了几颗 · 还有几天 / 提示），右边四成宽是星星那片天；下面一行是这一周走到哪儿了 */
.road-scene.narrow .scene-head { position: relative; width: 100%; padding-right: 42%; }
.road-scene.narrow .scene-head small { display: none; }
.road-scene.narrow .scene-head b { font-size: 20px; }
.road-scene.narrow .gs-hint { margin-top: 2px; }
.road-scene.narrow .gs-hint:empty { display: none; }
.scene-sky { position: absolute; top: 0; right: 0; width: 40%; height: 100%; min-height: 70px; overflow: visible; pointer-events: none; }
.road-card.night .road-scene.narrow .road-top { margin-top: 3px; }
.const-hit { cursor: pointer; outline: 0; }
.const-bg { pointer-events: none; }
.gs-week { color: var(--sky-soft); font-weight: 700; }
.scene-head .gs-week b, .road-scene.wide .scene-head .gs-week b { color: var(--star); font-size: 1.15em; line-height: inherit; }
/* 夜色里的路：同样的东西换一套颜色 */
.night .rd-road { stroke: color-mix(in srgb, #ffffff 11%, var(--sky)); }
.night .rd-walked { stroke: color-mix(in srgb, var(--accent) 52%, var(--sky)); }
.night .rd-mid { stroke: rgba(255, 255, 255, .5); }
.night .rd-far { stroke: rgba(255, 255, 255, .3); }
.night .rd-paw { fill: rgba(255, 255, 255, .5); }
.night .rd-water { stroke: #2c4a66; }
.night .rd-ripple { stroke: #5d86ab; }
.night .rd-stone-ring { stroke: var(--star); }
.night .rd-ask text { fill: #2c4a66; }
.night .rd-ask circle { fill: #ffffff; stroke: none; }
.night .rd-st .halo { fill: rgba(255, 255, 255, .08); stroke: var(--star); }
.night .rd-st .lab { fill: #ffffff; }
.night .rd-st .sub { fill: var(--sky-soft); }
.night .rd-st.sel .lab, .night .rd-st.today .lab { fill: var(--star); }
.night .rd-done, .night .rd-pin { fill: color-mix(in srgb, var(--accent) 62%, #ffffff); }
.night .rd-done-paw { fill: var(--sky); }
.night .rd-plain { fill: var(--sky); stroke: rgba(255, 255, 255, .3); }
.night .rd-plan { fill: var(--sky); stroke: color-mix(in srgb, var(--accent) 45%, #ffffff); }
.night .rd-num { fill: #ece6ff; }
.night .rd-open { fill: var(--sky); stroke: rgba(255, 255, 255, .45); }
.night .rd-plus { fill: var(--sky-soft); }
.night .rd-hill { fill: color-mix(in srgb, var(--partial) 34%, var(--sky)); }
.night .rd-tent { fill: color-mix(in srgb, var(--rest) 70%, var(--sky)); stroke: var(--sky); }
.night .rd-tent-door { fill: var(--sky); }
.night .rd-moon { fill: #ffffff; }
.night .rd-pond { fill: color-mix(in srgb, var(--rest) 38%, var(--sky)); }
.night .rd-bottle-g .btl-glass { fill: #ffffff; stroke: color-mix(in srgb, var(--accent) 45%, #ffffff); }
.night .rd-goal { fill: #ffffff; }
.night .rd-goal-sub { fill: var(--sky-soft); }
.night .rd-goal-sub tspan { fill: #ffb3d3; }

/* 目标面板 */
.goal-sheet { position: relative; }
/* 面板在手机上几乎占满屏幕，外面没有地方可点：右上角一定要有关闭 */
.sheet-x { position: absolute; top: 12px; right: 12px; z-index: 1; width: 40px; height: 40px; font-size: 22px; line-height: 1; }
.goal-sheet.opened .sheet-x { color: #ffffff; background: rgba(255, 255, 255, .12); }
.goal-sheet h3 { margin: 0 44px 2px 0; font-size: 21px; overflow-wrap: anywhere; }
.goal-sheet.opened h3 { margin: 4px 44px 2px; text-align: center; }
.gform { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.gf-lab { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.gform .goal-title { min-height: 48px; font-size: 16px; font-weight: 700; }
.gform .goal-date { min-height: 46px; }
.gf-letter {
  width: 100%; padding: 12px 14px; border: 1.5px solid color-mix(in srgb, var(--partial) 55%, var(--card)); border-radius: 14px;
  background: var(--note); color: var(--note-ink); font: inherit; font-size: 16px; line-height: 1.6; resize: none;
}
.gf-note { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-size: 13px; color: var(--muted); line-height: 1.5; }
.gf-note svg { flex: none; width: 56px; height: 32px; }
.gs-link { display: block; margin: 0 auto; }
.gs-bottle { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; padding: 18px 14px 14px; border-radius: 20px; background: var(--bg); text-align: center; }
.gs-bottle svg { width: 180px; height: auto; }
.gs-bottle b { font-size: 17px; font-weight: 900; }
.gs-bottle p { margin: 0; line-height: 1.6; }
.gs-bottle i { font-style: normal; font-weight: 900; font-size: 16px; color: var(--accent-2); font-family: Nunito, ui-rounded, sans-serif; }
.gs-bottle.fresh svg { animation: pop-in .55s cubic-bezier(.2, 1.6, .4, 1); }
.gs-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.gs-actions > * { flex: 1; justify-content: center; min-height: 48px; }
.gs-more { margin: 18px 0 0; font-size: 14px; }
.gs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 12px; margin-top: 16px; }
/* 瓶子打开：整张面板是夜空 */
.goal-sheet.opened { --sky-soft: #cfc8f2; background: color-mix(in srgb, var(--accent) 20%, #1b1638); color: #ffffff; text-align: center; }
.goal-sheet.opened > small { font-size: 13px; font-weight: 800; color: var(--sky-soft); }
.goal-sheet.opened h3 { font-size: 24px; animation: pop-in .55s cubic-bezier(.2, 1.6, .4, 1); }
.goal-sheet.opened .const-svg { width: min(100%, 300px); margin: 10px auto 14px; }
.go-letter {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px 26px; border-radius: 6px 18px 18px 6px;
  background: #fff5d6; color: #4a3d1a; text-align: left; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); animation: up .5s ease-out .25s backwards;
}
.go-letter::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 4px; background: var(--accent-2); }
.go-letter small, .go-letter span { font-size: 12.5px; font-weight: 700; color: #6b5a2a; }
.go-letter span { text-align: right; }
.go-letter p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.go-ask { margin: 18px 0 10px; font-size: 14px; font-weight: 800; color: var(--sky-soft); }
.goal-sheet.opened .btn { border-color: #6a60a8; background: transparent; color: #ffffff; }
.goal-sheet.opened .btn.go-wait { margin: 10px 0 0; border-color: transparent; color: var(--sky-soft); font-weight: 700; }
.goal-sheet.opened .btn.go-yes { border-color: #ffd772; background: #ffd772; color: #3a2c00; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { .const-svg *, .rd-bottle-g.due .rd-bottle { animation: none !important; } .cs-burst { display: none; } }

/* 点开的那一站：这一天的计划 */
.planner-copy { margin-bottom: 14px; }
/* 这张卡属于上面点中的那一站：描边 + 顶上一个小尖角指着那一站（--nf：那一站在路上的横向位置，-0.5 … 0.5） */
.day-pane { position: relative; padding: 14px 18px 16px; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.day-pane::before {
  content: ""; position: absolute; top: -8px; left: calc(50% + var(--nf, 0) * (100% - 32px)); width: 14px; height: 14px; margin-left: -7px;
  background: var(--card); border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-radius: 3px 0 0 0; transform: rotate(45deg);
}
.day-pane.under-narrow::before { left: calc(50% + var(--nf, 0) * min(100% - 32px, 520px)); }
.day-pane.fresh { animation: dp-in .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes dp-in { from { transform: translateY(-10px) scale(.985); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow); } }
.dp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dp-head b { font-size: 17px; }
.dp-open { margin-left: auto; }
.dp-types { display: inline-flex; gap: 4px; margin-left: 4px; }
.dp-types button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 99px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.dp-types button.on { background: var(--soft); border-color: transparent; color: var(--accent); }
.dp-types button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-pane .plan-row { align-items: center; gap: 12px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); }
.day-pane .plan-row:last-of-type { border-bottom: 0; }
.day-pane .check { width: 32px; height: 32px; margin: 0; }
.dp-dot { width: 32px; flex: none; text-align: center; color: var(--muted); font-weight: 900; }
.plan-row.is-done .dp-dot { color: var(--accent); }
.day-pane .plan-input { background: transparent; border-color: transparent; padding: 8px; min-height: 0; font-size: 16.5px; font-weight: 600; line-height: 1.45; }
.day-pane .plan-input:focus { background: var(--bg); border-color: var(--accent); }
.day-pane .plan-input.done, .day-pane .is-done .dp-txt { color: var(--muted); font-weight: 500; text-decoration: none; }
.dp-txt { flex: 1; min-width: 0; padding: 8px; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.day-pane .icon-btn { margin: 0; width: 32px; height: 32px; font-size: 16px; background: transparent; color: var(--muted); visibility: hidden; }
.day-pane .plan-row:focus-within .icon-btn { visibility: visible; }
.day-pane .plan-row { --xw: 44px; }
.dp-time, .wt-time { margin-right: 6px; font-size: .88em; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dp-add { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.dp-add::before { content: '+'; width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 18px; color: var(--accent); box-sizing: border-box; }
/* 还什么都没写：整行都是“在这儿写”的大按钮，不是一行灰色小字 */
.dp-add.first {
  width: 100%; margin-top: 4px; padding: 12px 14px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--card)); color: var(--accent); font-size: 16px; font-weight: 800;
}
.dp-add.first::before { border-color: var(--accent); }
.dp-note { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* 想搞定的事 */
.plan-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.plan-row .check { margin-top: 8px; }
.plan-row .icon-btn { margin-top: 4px; }
/* 几点开始（可选）：没填的行平时什么都不显示；填了的是行尾一行安静的小字，坐在 × 平时空着的位置上（--xw = × 加间距）。
   正在写的那一行（.ed，见 app.js 的 planRowEd）展开：字还是占满一行，下面多出一条放胶囊——
   点胶囊（或平时行尾的那个时间），在它旁边浮出一个小弹层（.pt-pop）选钟点，不占位置 */
.plan-time {
  flex: none; display: none; align-items: center;
  font-size: 13.5px; font-weight: 600; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.plan-time.set { display: inline-flex; margin-right: calc(-1 * var(--xw, 46px)); }
.plan-time.ro { margin-right: 0; padding: 0 4px; min-height: 30px; }
.plan-input.done ~ .plan-time { opacity: .65; }
.plan-row.ed { flex-wrap: wrap; row-gap: 4px; }
/* 换行以后，字那一格不能再按 100% 宽去占一整行：从 0 长起，和勾、× 留在第一行 */
.plan-row.ed .plan-input { flex: 1 1 0; width: 0; min-width: 0; }
.plan-row.ed .plan-time { display: flex; order: 9; flex-basis: 100%; margin: 0; padding: 0 0 3px var(--xw, 46px); opacity: 1; }
.pt-cap { display: inline-flex; align-items: center; min-height: 30px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: none; line-height: 1; }
/* 今天页计划卡片最上面：通往目标的那条路。出发的小旗 → 走过的站（脚印）→ 还没走的虚线 → 漂流瓶 */
.pc { margin: 0 0 8px; display: flex; flex-direction: column; min-width: 0; }
.tr-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tr-far { fill: none; stroke: color-mix(in srgb, var(--accent) 34%, var(--card)); stroke-width: 4; stroke-dasharray: 1 10; stroke-linecap: round; }
.tr-walked { fill: none; stroke: color-mix(in srgb, var(--accent) 36%, var(--card)); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.tr-paw { fill: color-mix(in srgb, var(--accent) 70%, var(--card)); }
.tr-flag { fill: var(--accent); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tr-walked.part { stroke-width: 6; stroke: color-mix(in srgb, var(--accent) 30%, var(--card)); }
.tr-walked.old { stroke: color-mix(in srgb, var(--accent) 24%, var(--card)); stroke-dasharray: 0 0; }
.tr-lab.note { fill: var(--muted); font-weight: 700; text-anchor: start; }
.tr-lab.note.mid { text-anchor: middle; }
.tr-lab.note tspan { fill: var(--accent); font-weight: 900; }
.tr-mile { fill: var(--accent-2); stroke: var(--card); stroke-width: 1.5; }
.tr-lab.mile { fill: var(--muted); font-size: 10.5px; font-weight: 700; }
.tr-lab.back { fill: var(--accent); }
.tr-day { cursor: pointer; }
.trail-card .pc { margin: 0; }
.tr-sel { fill: none; stroke: var(--accent); stroke-width: 2; }
.tr-skip { fill: color-mix(in srgb, var(--muted) 45%, var(--card)); }
.tr-tent { fill: var(--rest); }
.tr-dot { fill: color-mix(in srgb, var(--accent) 75%, var(--card)); }
.tr-dot.part { fill: var(--card); stroke: color-mix(in srgb, var(--accent) 75%, var(--card)); stroke-width: 1.2; }
.tr-here { transform-box: fill-box; transform-origin: center; }
.tr-here circle { fill: var(--card); stroke: var(--accent); stroke-width: 2.2; }
.tr-here.none circle { stroke-dasharray: 3 3.5; }
.tr-here.part circle { stroke: color-mix(in srgb, var(--accent) 26%, var(--card)); }
.tr-here.part circle.tr-arc { fill: none; stroke: var(--accent); stroke-width: 2.8; stroke-linecap: round; transition: stroke-dasharray .4s ease-out; }
.tr-here.full circle { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; }
.tr-here-paw { fill: var(--accent-ink); }
.tr-here-half { fill: var(--accent); }
.tr-lab { font-size: 12.5px; font-weight: 800; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.tr-lab.goal { fill: var(--muted); }
.tr-lab.goal tspan { fill: var(--accent-2); font-weight: 900; font-size: 14px; }
.tr-glow { fill: #ffd772; }
.tr-btl { cursor: pointer; outline: 0; }
.tr-btl:focus-visible .tr-lab { text-decoration: underline; }
/* 刚做完：路往前长出一段 → 走到新的一站 */
.tr-svg.go .tr-walked.fresh { stroke-dasharray: 1; animation: rd-draw .8s .25s ease-out backwards; }
.tr-svg.go .tr-here.pop { animation: tr-pop .5s .95s cubic-bezier(.2, 1.8, .4, 1) backwards; }
/* 今天全部做完：路画到头的那一下，尽头的瓶子亮一下、晃一下，冒几颗小星星 */
.tr-glow, .tr-shake, .tr-spark { transform-box: fill-box; transform-origin: center; }
.tr-spark { fill: #ffd772; stroke: #ffffff; stroke-width: 1; opacity: 0; }
.tr-svg.go .tr-glow { animation: tr-flash 1s 1.1s ease-out; }
.tr-svg.go .tr-shake { animation: tr-shake .7s 1.1s ease-in-out; }
.tr-svg.go .tr-spark { animation: tr-spark .7s ease-out both; }
@keyframes tr-flash { 25% { opacity: 1; transform: scale(1.9); } 60% { opacity: .85; transform: scale(1.25); } }
@keyframes tr-shake { 15% { transform: rotate(-14deg) scale(1.18); } 35% { transform: rotate(12deg) scale(1.18); } 55% { transform: rotate(-8deg) scale(1.08); } 75% { transform: rotate(5deg); } }
@keyframes tr-spark { 0% { opacity: 0; transform: scale(0) rotate(-40deg); } 40% { opacity: 1; transform: scale(1.25) rotate(0deg); } 100% { opacity: 0; transform: scale(.4) rotate(40deg); } }
@keyframes tr-pop { from { transform: scale(.55); } }
@keyframes tr-pulse { 50% { transform: scale(1.25); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .pc * { animation: none !important; } }
/* 远方来的信：信到了的那一下（整屏）、拆开的信纸、信箱 */
.lt-env { width: 34px; flex: none; fill: var(--card); stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; animation: lt-wob 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.lt-env .seal { fill: var(--accent-2); stroke: none; }
/* 信到了：屏幕暗下来，信从远处的角落飞过来，落在中间轻轻飘着。--d：刚做完计划时先等路画到头（2.4s） */
.lt-arrive-mask {
  --d: 0s; position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(60, 50, 110, .82), rgba(12, 10, 30, .92) 70%);
  animation: lt-mask-in .5s var(--d) ease-out backwards;
}
.lt-arrive-mask.fresh { --d: 2.4s; }
@keyframes lt-mask-in { from { opacity: 0; visibility: hidden; } }
.lt-arrive { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
.lt-big { position: relative; padding: 0; margin-bottom: 14px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: lt-fly 1.2s calc(var(--d) + .15s) cubic-bezier(.2, 1.1, .3, 1) backwards, lt-float 3.2s calc(var(--d) + 1.35s) ease-in-out infinite; }
.lt-big .lt-env { position: relative; display: block; width: min(56vw, 230px); fill: #fffdf7; stroke: #e9dcc0; stroke-width: 1; animation: none; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .45)); }
.lt-big .lt-env .seal { fill: #e2574c; }
.lt-glow { position: absolute; inset: -38%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 215, 114, .55), rgba(255, 215, 114, 0) 65%); animation: lt-glow 2.4s calc(var(--d) + 1s) ease-in-out infinite backwards; }
.lt-big i { position: absolute; font-style: normal; color: #ffd772; animation: lt-twinkle 1.8s calc(var(--d) + 1.2s) ease-in-out infinite backwards; }
.lt-big .s1 { left: -12%; top: -8%; font-size: 26px; }
.lt-big .s2 { right: -14%; top: 12%; font-size: 18px; animation-delay: calc(var(--d) + 1.7s); }
.lt-big .s3 { right: 2%; bottom: -16%; font-size: 14px; animation-delay: calc(var(--d) + 2.1s); }
.lt-arrive-t { margin: 0; font-size: 21px; font-weight: 900; letter-spacing: 1px; text-wrap: balance; }
.lt-arrive-s { margin: 0 0 10px; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.lt-arrive-t, .lt-arrive-s, .lt-arrive-go, .lt-arrive-later { animation: in-up .5s calc(var(--d) + 1s) ease-out backwards; }
.lt-arrive-s { animation-delay: calc(var(--d) + 1.1s); }
.lt-arrive-go { min-width: 150px; animation-delay: calc(var(--d) + 1.25s); }
.lt-arrive-later { color: rgba(255, 255, 255, .75); animation-delay: calc(var(--d) + 1.4s); }
@keyframes lt-fly { from { opacity: 0; transform: translate(-70vw, -60vh) scale(.08) rotate(-70deg); } 55% { opacity: 1; transform: translate(5vw, 3vh) scale(1.12) rotate(10deg); } 78% { transform: translate(-1vw, -1vh) scale(.97) rotate(-4deg); } }
@keyframes lt-float { 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes lt-glow { 0% { opacity: 0; } 50% { opacity: 1; transform: scale(1.12); } 100% { opacity: .55; } }
@keyframes lt-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(-20deg); } 50% { opacity: 1; transform: scale(1) rotate(0deg); } }
@keyframes lt-wob { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.lt-sheet { position: relative; }
/* 一张信：横格信纸 + 手写体。称呼顶格，正文空两格，落款、日期靠右。行高统一 36px，字正好落在横线上 */
.lt-paper {
  --rule: #e4dccb; --pen: #2b2740; --pen-soft: #7a7390;
  position: relative; margin: 26px 0 16px; padding: 16px 22px 26px; border-radius: 3px; background: #fffdf7; color: var(--pen);
  font-family: "Kaiti SC", STKaiti, KaiTi, "Kaiti TC", "Noto Serif SC", "Songti SC", serif;
  box-shadow: 0 1px 0 #efe7d6, 0 10px 26px color-mix(in srgb, var(--ink) 20%, transparent); transform: rotate(-.6deg);
  animation: lt-unfold .5s cubic-bezier(.2, 1.2, .4, 1) backwards;
}
/* 折过的痕迹：三折信纸的两道折痕 */
.lt-paper::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(transparent calc(34% - 6px), rgba(0, 0, 0, .035) 34%, rgba(255, 255, 255, .5) calc(34% + 1px), transparent calc(34% + 7px)),
              linear-gradient(transparent calc(67% - 6px), rgba(0, 0, 0, .035) 67%, rgba(255, 255, 255, .5) calc(67% + 1px), transparent calc(67% + 7px)); }
@keyframes lt-unfold { from { opacity: 0; transform: rotate(-4deg) scaleY(.2); transform-origin: 50% 0; } }
.lt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lt-post { flex: 1; margin: 0; font: 800 11.5px Nunito, ui-rounded, "PingFang SC", sans-serif; letter-spacing: .08em; color: var(--pen-soft); opacity: .8; }
.lt-mark { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -14px; border-radius: 50%; border: 2px solid #8a849a; box-shadow: inset 0 0 0 3px #fffdf7, inset 0 0 0 4.5px #8a849a; font: 900 11.5px Nunito, ui-rounded, sans-serif; color: #5e5873; transform: rotate(-14deg); opacity: .8; position: relative; z-index: 1; background: #fffdf7; }
.lt-st { display: grid; place-items: center; width: 40px; height: 48px; border: 2px dashed color-mix(in srgb, var(--accent) 55%, #ffffff); border-radius: 3px; background: color-mix(in srgb, var(--accent) 14%, #ffffff); }
.lt-st svg { width: 30px; }
.lt-body { background: repeating-linear-gradient(transparent 0 33px, var(--rule) 33px 34px, transparent 34px 36px); font-size: 19px; line-height: 36px; }
.lt-body p, .lt-body blockquote { margin: 0; line-height: 36px; overflow-wrap: anywhere; }
.lt-hi { font-size: 19px; font-weight: 700; }
.lt-lead { text-indent: 2em; font-size: 16.5px; color: var(--pen-soft); }
.lt-quote { padding-left: 2em; font-size: 20px; font-weight: 700; white-space: pre-wrap; }
.lt-quote::before { content: '“'; margin-left: -.6em; color: var(--accent-2); }
.lt-quote::after { content: '”'; color: var(--accent-2); }
.lt-line { text-indent: 2em; font-size: 20px; font-weight: 700; }
.lt-then { text-indent: 2em; font-size: 17.5px; }
.lt-then b { font: 900 1.05em Nunito, ui-rounded, sans-serif; color: var(--accent); }
.lt-clue { text-indent: 2em; font-size: 16.5px; font-style: italic; color: #c9bfe8; }
.lt-sign { padding-top: 36px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 18px; font-weight: 700; }
.lt-via { text-align: right; font-size: 13.5px; color: var(--pen-soft); }
.lt-date { text-align: right; font-size: 15.5px; color: var(--pen-soft); }
.lt-paw { width: 15px; height: 15px; fill: var(--accent); }
.lt-jump { display: block; margin: 10px auto 0; }
/* 神秘人的信：深色的纸，金色的落款 */
.lt-paper.myst { --rule: rgba(255, 255, 255, .09); --pen: #f3eeff; --pen-soft: #a59fca; background: #1d1a36; box-shadow: 0 10px 28px rgba(12, 10, 30, .45); }
.lt-paper.myst::after { opacity: .25; }
.lt-paper.myst .lt-mark { color: #a59fca; background: #1d1a36; }
.lt-paper.myst .lt-mark { border-color: #a59fca; box-shadow: inset 0 0 0 3px #1d1a36, inset 0 0 0 4.5px #a59fca; }
.lt-paper.myst .lt-sign { color: #ffd772; font-weight: 900; }
/* 写信 */
.lt-sheet textarea { width: 100%; margin-top: 10px; }
.lt-when { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; font-size: 14.5px; font-weight: 700; }
.lt-when label { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.lt-when input { width: auto; margin: 0; accent-color: var(--accent); }
.lt-write-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.lt-write-row p { margin: 0 0 10px; }
.lt-note { font-size: 14px; font-weight: 800; color: var(--accent); }
div.lt-item { cursor: default; }
/* 本地测试：预览每种信的一排小按钮 */
.lt-test { margin-top: 14px; padding: 10px 12px; border: 1.5px dashed var(--zero); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.lt-test p { flex: 1 0 100%; margin: 0 0 2px; }
.lt-test .chip-btn { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lt-gone { margin: 10px 0 0; text-align: center; }
.lt-gone b { display: block; color: var(--ink); font-weight: 700; }
.lt-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.lt-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 700; text-align: left; cursor: pointer; }
.lt-item.new { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.lt-item-day { flex: none; font: 900 13px Nunito, ui-rounded, sans-serif; color: var(--muted); }
.lt-item-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-item i { flex: none; font-style: normal; font-size: 12px; font-weight: 900; color: var(--accent); }
.lt-box-row { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .lt-env, .lt-paper, .lt-arrive-mask, .lt-arrive-mask * { animation: none !important; } }
/* 好的计划长什么样（周计划页，清单下面） */
.plan-guide { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pg-title { font-size: 14.5px; font-weight: 900; color: var(--ink); }
.pg-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pg-tok { display: inline-flex; align-items: baseline; gap: 7px; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--card)); font-size: 14.5px; font-weight: 800; color: var(--ink); }
.pg-tok i { font-style: normal; font-size: 12px; font-weight: 800; color: var(--accent); }
.pg-plus { font-weight: 900; color: var(--muted); }
.pg-note { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.pg-bad { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.plan-row.ed .pt-cap { min-height: 36px; padding: 0 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 14.5px; }
.plan-row.ed .plan-time.set .pt-cap { background: var(--soft); }
.plan-time.open .pt-cap { color: var(--accent); }
.plan-row.ed .plan-time.open .pt-cap { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pt-text { display: inline-flex; align-items: center; gap: 6px; }
.pt-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* 选钟点的弹层：挂在 body 上、浮在页面上面（位置由 app.js 的 ptPlace 算，跟着页面一起滚）。
   后面垫一层透明的 .pt-back 接住“点外面”。从上到下：正在定的时间（大字）→ 三个时段 → 这个时段的钟点 → 分钟 → 不定时间 / 好了。
   三个时段各有颜色（--pt-c，选中的格子上的字是 --pt-ink）：上午暖黄、下午天蓝、晚上跟主题色 */
.pt-am { --pt-c: #f6b545; --pt-ink: #3a2a00; }
.pt-pm { --pt-c: #2f8ad6; --pt-ink: #fff; }
.pt-ev { --pt-c: var(--accent); --pt-ink: var(--accent-ink, #fff); }
.pt-back { position: fixed; inset: 0; z-index: 60; }
.pt-pop {
  position: absolute; z-index: 61; display: grid; gap: 8px; box-sizing: border-box; width: max-content; max-width: calc(100vw - 24px);
  padding: 14px 12px 12px; border-radius: 22px; background: var(--card); outline: none;
  border: 1px solid var(--line); box-shadow: 0 18px 44px -8px rgba(30, 20, 70, .38), 0 3px 10px rgba(30, 20, 70, .12);
  animation: pt-in .16s cubic-bezier(.2, .9, .3, 1.15);
  scroll-margin: 12px;
}
@keyframes pt-in { from { opacity: 0; transform: scale(.9); } }
.pt-head { max-width: 0; min-width: 100%; margin: 0 0 2px; text-align: center; }   /* 字再长也不把弹层撑宽：宽度跟着下面的格子走 */
.pt-now { display: block; font-size: 30px; font-weight: 900; line-height: 1.15; letter-spacing: .01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pt-now.none { font-size: 21px; line-height: 1.65; }
.pt-now.bump { animation: pt-bump .22s ease-out; }
@keyframes pt-bump { 40% { transform: scale(1.09); } }
.pt-head p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pt-segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 16px; background: var(--soft); }
.pt-seg {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 38px; margin: 0; padding: 0;
  border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1;
  transition: background-color .12s, color .12s;
}
.pt-seg.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--pt-c), 0 1px 3px rgba(30, 20, 70, .1); }
.pt-line { display: grid; grid-template-columns: repeat(6, minmax(0, 48px)); gap: 6px; align-items: center; }
.pt-chip {
  height: 42px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 13px;
  background: color-mix(in srgb, var(--pt-c) 15%, var(--card)); color: var(--ink); font-size: 16.5px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; transition: transform .08s, background-color .12s, color .12s;
}
.pt-chip small { margin-left: 1px; font-size: 11px; font-weight: 700; opacity: .7; }
.pt-chip:active { transform: scale(.92); }
.pt-chip.on { background: var(--pt-c); color: var(--pt-ink); }
.pt-mins .pt-chip { height: 36px; background: var(--soft); font-size: 14px; font-weight: 700; color: var(--muted); }
.pt-mins .pt-chip.on { background: var(--pt-c); color: var(--pt-ink); }
.pt-chip:disabled { opacity: .45; cursor: default; }
.pt-seg:disabled { opacity: .4; cursor: default; }
.pt-chip:disabled:active { transform: none; }
.pt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.pt-none { min-height: 38px; margin: 0; padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.pt-none[hidden] { display: block; visibility: hidden; }
.pt-ok { min-height: 38px; margin: 0 0 0 auto; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 14.5px; font-weight: 800; }
.pt-ok:active { transform: scale(.96); }
:is(.pt-chip, .pt-seg, .pt-ok, .pt-none, .pt-cap):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pt-pop, .pt-now.bump { animation: none; } }
.plan-row:not(.ed) .plan-time.set .pt-cap { cursor: pointer; }
/* 做完 = 盖一个红色的「済」章（日本手帐里那种）：没做是一圈虚线，做完盖上去、歪一点，每行歪得不一样 */
:root { --stamp: #e2574c; }
[data-theme="galaxy"], [data-theme="night"], [data-theme="custom"][data-cc="dark"] { --stamp: #ff7b70; }
.check {
  width: 30px; height: 30px; flex: none; padding: 0; border-radius: 50%; border: 2px dashed var(--zero);
  background: transparent; color: var(--stamp); font-weight: 900; font-size: 15px; line-height: 1;
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
}
.check.on { border: 2.5px solid var(--stamp); opacity: .92; transform: rotate(-12deg); }
.plan-row:nth-child(even) .check.on { transform: rotate(-5deg); }
.plan-row:nth-child(3n) .check.on { transform: rotate(-17deg); }
.plan-input {
  border-color: transparent; background: var(--bg);
  resize: none; overflow: hidden; min-height: 46px; line-height: 1.5;
  overflow-wrap: anywhere; field-sizing: content;
}
.plan-input.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent-2); text-decoration-thickness: 2px; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* 打分 */
.score-block { margin-bottom: 10px; }
.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.score-label { width: 84px; flex: none; display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.score-label .emo { font-size: 16px; }
.score-seg { flex: 1; gap: 6px; }
.score-seg .seg-btn { min-height: 44px; font-size: 13.5px; padding: 0 2px; }
.tip-btn {
  width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--soft);
  color: var(--accent); font-size: 11px; font-weight: 800; padding: 0; flex: none;
}
.tip-btn.on { background: var(--accent); color: var(--accent-ink); }
.tip-panel {
  background: var(--soft); border-radius: 14px; padding: 10px 12px; margin: 4px 0 10px 82px;
  font-size: 13px; display: grid; gap: 4px;
  margin-left: 0;
}
.tip-panel b { display: inline-block; min-width: 48px; color: var(--accent); }
.score-desc { margin: 0 0 6px 94px; font-size: 12.5px; color: var(--accent); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.score-hint { color: var(--muted); }
.score-hint::before { content: '· '; }

/* 打分：每项一行，分段胶囊，颜色随分数由浅到深 */
.score-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "name pill" ". sub";
  align-items: center; column-gap: 12px; row-gap: 4px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.score-item:first-of-type { padding-top: 2px; }
.score-name { display: contents; }
.score-name b { grid-area: name; display: flex; align-items: center; gap: 6px; font-size: 15px; white-space: nowrap; }
.score-name .emo { font-size: 16px; }
.score-sub { grid-area: sub; font-size: 12px; color: var(--muted); line-height: 1.4; padding-left: 4px; }
.score-sub.set { color: var(--ink); opacity: .75; }
.score-sub.is-hint { color: var(--accent); opacity: 1; }
.pill-seg {
  grid-area: pill; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  background: var(--bg); border-radius: 14px; padding: 4px;
}
.pill {
  height: 38px; border: 0; border-radius: 11px; background: transparent;
  color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.pill.on { font-weight: 800; }
.lv0 .pill.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.lv1 .pill.on { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--accent); }
.lv2 .pill.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); }


/* 分数圆环 + 达成印章 */
.summary {
  position: relative; display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px 16px;
  border-radius: 18px; background: var(--bg); overflow: hidden;
}
.ring { width: 66px; height: 66px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--empty); stroke-width: 7; }
.ring .bar { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.ring .total { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; line-height: 1; }
.ring .total b { font-size: 22px; font-weight: 900; }
.ring .total span { font-size: 10px; color: var(--muted); }
.badge-wrap { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.badge { font-weight: 700; }
.stamp {
  display: inline-block; align-self: flex-start; font-weight: 900; font-size: 17px; letter-spacing: 1px;
  color: var(--accent-2); border: 2.5px solid var(--accent-2); border-radius: 10px; padding: 2px 12px;
  transform: rotate(-6deg);
}
.summary.ok { background: var(--soft); }
.summary.celebrate .stamp { animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stamp { from { transform: scale(2.2) rotate(-18deg); opacity: 0; } to { transform: scale(1) rotate(-6deg); opacity: 1; } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  animation: fall 1.4s ease-out forwards;
}
@keyframes fall {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(130px) rotate(540deg); }
}

/* 结果区：今天的贴纸是主角，分数退到角落 */
.today-sticker {
  width: 62px; height: 62px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; line-height: 1; color: var(--zero); background: var(--card);
  border: 2px dashed var(--zero);
}
.today-sticker.got {
  color: #fff; border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.summary.celebrate .today-sticker.got { animation: pop .5s; }
.mini-score { flex: none; align-self: flex-start; font-size: 13px; font-weight: 800; color: var(--muted); font-family: Nunito, ui-rounded, sans-serif; }
.mini-score small { font-size: 10px; font-weight: 700; }

/* 本月星星数 */
.star-chip {
  margin-top: 6px; border: 0; border-radius: 99px; padding: 4px 12px;
  background: color-mix(in srgb, var(--accent-2) 18%, var(--card)); color: var(--accent-2);
  font-size: 12.5px; font-weight: 800;
}
.star-hero {
  display: flex; align-items: center; gap: 14px; margin: -4px 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow);
}
.star-hero b { font-size: 34px; font-weight: 900; font-family: Nunito, ui-rounded, sans-serif; color: var(--accent); }
.star-big {
  width: 54px; height: 54px; border-radius: 50%; flex: none; color: #fff; font-size: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* 宽限提醒、爸爸的回复 */
.today-tag.grace { background: color-mix(in srgb, var(--partial) 25%, var(--card)); color: var(--partial-ink); white-space: nowrap; }
.nudge {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin-bottom: 14px;
  border: 0; border-radius: 16px; padding: 11px 16px; font-weight: 700; font-size: 14px;
  background: color-mix(in srgb, var(--partial) 25%, var(--card)); color: var(--partial-ink);
}
.nudge span { margin-left: auto; font-size: 18px; }
.reply-card { transform: rotate(.6deg); background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--ink); }
.reply-card::before { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.reply-actions { display: flex; gap: 16px; margin-top: 6px; }
.reply-actions .muted { color: var(--muted); }

/* 首屏：一行状态条 + 最多一张提醒 */
.greet-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.greet-sub .link { padding: 2px 0; }
.week-stars { border: 0; background: none; padding: 2px 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.week-stars b { color: var(--accent); font-size: 15px; font-weight: 900; font-family: Nunito, ui-rounded, sans-serif; }
.cash-nudge { display: inline-block; border: 0; white-space: nowrap; border-radius: 99px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; background: var(--soft); color: var(--accent); }
.type-chip { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.type-chip .emo { font-size: 13px; margin-right: 2px; }
.rest-card .type-chip { margin-left: auto; align-self: flex-start; }
.wall-days { margin: -8px 0 12px; }
.yesterday-note {
  margin: 0 0 10px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere;
}
.yesterday-note b { font-weight: 700; color: var(--ink); }
.dad-turn { position: relative; padding: 0; }
.dad-turn-main { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 12px 44px 12px 16px; }
.dad-turn-main > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.nudge-wrap { position: relative; }
.nudge-wrap .nudge { padding-right: 44px; }
.notice-x {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 16px;
}
.reply-card { position: relative; }

/* 每周拿满 6 颗的额外奖励 */
.week-line { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.week-line.done { color: var(--accent-2); }
.unlock.bonus { border-color: var(--partial); }
.cal-cell { position: relative; }
.cal-bonus {
  position: absolute; top: 3px; right: 4px; font-size: 10px; font-weight: 900; line-height: 1;
  color: #fff; background: var(--accent-2); border-radius: 99px; padding: 2px 4px;
}

/* 贴纸墙 */
.wall { padding: 16px 14px 14px; }
.wall-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.wall-title { flex: 1; text-align: center; display: flex; flex-direction: column; }
.wall-title b { font-size: 18px; font-weight: 900; }
.wall-title span { font-size: 13px; color: var(--muted); font-weight: 600; }
.wall-title em { font-style: normal; font-size: 20px; font-weight: 900; color: var(--accent); font-family: Nunito, ui-rounded, sans-serif; }
.wall-back { display: block; margin: 0 auto 4px; }
.wall-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(40px, .9fr); gap: 6px; margin-top: 10px; }
.wall-h { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding-bottom: 2px; }
.wall-cell {
  position: relative; aspect-ratio: 1; min-width: 0; border: 0; padding: 0; border-radius: 14px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
}
.wall-cell.out { background: transparent; }
.wall-cell.quiet { background: transparent; }
.wall-cell.quiet .wall-d { opacity: .45; }
.wall-cell.today { box-shadow: inset 0 0 0 2px var(--accent-2); }
.wall-d { position: absolute; top: 3px; left: 6px; font-size: 10.5px; font-weight: 800; color: var(--muted); font-family: Nunito, ui-rounded, sans-serif; }
.wall-sticker {
  width: 66%; height: 66%; margin-top: 10%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: clamp(15px, 4.6vw, 32px); line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .14), 0 0 0 2.5px #fff;
}
.wall-cell.done { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.wall-mark { font-size: clamp(14px, 3.2vw, 26px); line-height: 1; margin-top: 10%; }
.wall-mark.rest { color: var(--rest); }
.wall-mark.partial { color: var(--partial); }
.wall-bonus {
  position: absolute; right: 2px; bottom: 2px; font-size: 9.5px; font-weight: 900; line-height: 1;
  color: #fff; background: var(--accent-2); border-radius: 99px; padding: 2px 4px;
}
.wall-week {
  border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; min-width: 0;
}
.wall-week { position: relative; }
.wall-week b { font-size: 15px; color: var(--ink); font-family: Nunito, ui-rounded, sans-serif; }
.wall-week .wk-stars { font-size: 13px; color: var(--accent); }
.wall-week .wk-bonus { color: var(--accent-2); font-weight: 900; font-size: 12px; }
.wk-ring { width: 78%; max-width: 46px; transform: rotate(-90deg); }
.wk-ring .track { fill: none; stroke: var(--empty); stroke-width: 4; }
.wk-ring .bar { fill: none; stroke: var(--accent-2); stroke-width: 4; stroke-linecap: round; }
.wk-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: var(--ink); font-family: Nunito, ui-rounded, sans-serif; }
.wk-num small { font-size: 9px; color: var(--muted); }
.wall-week.blank { background: transparent; }
.wall-week.now { background: color-mix(in srgb, var(--accent-2) 10%, var(--bg)); }
.wall-week b small { font-size: 10px; color: var(--muted); }
.wall-week i { font-style: normal; font-size: 9.5px; color: var(--accent); font-weight: 700; }
.wall-week.done { background: linear-gradient(160deg, color-mix(in srgb, var(--accent-2) 25%, var(--card)), var(--card)); }
.wall-set { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.set-item { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .28; transition: all .2s; }
.set-item.got { filter: none; opacity: 1; }
.next-goals { display: grid; gap: 8px; margin: -4px 0 14px; }
.next-goal {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px 14px; font-size: 14px; box-shadow: var(--shadow);
}
.next-goal b { color: var(--accent); font-size: 16px; font-family: Nunito, ui-rounded, sans-serif; }
.ng-icon { font-size: 20px; }
@media (min-width: 768px) { .next-goals { grid-template-columns: 1fr 1fr; } }
.progress-card h3 { margin-bottom: 4px; }
.pg-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 14.5px; }
.pg-row:first-child { border-top: 0; }
.pg-icon { font-size: 22px; width: 28px; text-align: center; flex: none; }
.pg-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pg-text b { color: var(--accent); font-size: 18px; font-family: Nunito, ui-rounded, sans-serif; margin: 0 1px; }
.pg-sub {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
@media (min-width: 768px) {
  .pg-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
  .pg-row { border: 0; background: var(--soft); border-radius: 16px; padding: 12px 14px; align-items: flex-start; }
  .pg-row .pg-sub { background: var(--card); }
}
.cash-how { font-size: 13px; }
.cash-how summary { cursor: pointer; color: var(--accent); font-weight: 700; list-style: none; }
.cash-how summary::-webkit-details-marker { display: none; }
.cash-how summary::before { content: '› '; }
.cash-how[open] summary::before { content: '⌄ '; }
.cash-how .cash-steps { margin-top: 6px; }
@media (min-width: 1024px) {
  /* 电脑：左边贴纸墙，右边零花钱账本（跟着滚动） */
  .wall-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
  .wall-side { position: sticky; top: 96px; }
  .wall { padding: 20px 22px; }
  .wall-grid { gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(64px, .9fr); }
  .wall-sticker { width: 66%; height: 66%; margin-top: 8%; }
  .wall-d { font-size: 12px; top: 6px; left: 9px; }
  .wall-sticker { font-size: 34px; }
  .wall-mark { font-size: 28px; }
  .wall-week { font-size: 12px; }
  .wall-week b { font-size: 22px; }
}

/* 星星换零花钱 */
.cash-locked { display: grid; gap: 8px; }
.cash-progress { height: 8px; border-radius: 99px; background: var(--empty); overflow: hidden; }
.cash-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.cash-locked-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.cash-locked-row b { font-size: 18px; color: var(--accent); font-family: Nunito, ui-rounded, sans-serif; }
.cash-locked-row .btn:disabled { opacity: .5; cursor: not-allowed; }
.cash-why { margin: 0; font-size: 13px; color: var(--ink); }
.cash-why b { color: var(--accent); }
.cash-steps { margin: 0; padding: 10px 12px 10px 30px; background: var(--bg); border-radius: 12px; font-size: 12.5px; color: var(--muted); display: grid; gap: 2px; }
.cash-frozen { flex-basis: 100%; font-size: 12.5px; font-weight: 700; color: var(--rest); }
.pill.blocked { opacity: .35; cursor: not-allowed; }
.pill.blocked:active { transform: none; }
.cash-balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cash-balance > div { background: var(--bg); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.cash-balance > div.cash-main {
  grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--soft); padding: 12px 14px;
}
.cash-balance b { font-size: 17px; font-weight: 900; color: var(--ink); font-family: Nunito, ui-rounded, sans-serif; }
.cash-balance .cash-main b { font-size: 30px; color: var(--accent); }
.cash-list-title { margin: 14px 0 0; }
.cash-list { max-height: 320px; overflow-y: auto; }
.cash-no { flex: none; width: 28px; color: var(--muted); font-size: 12px; font-weight: 700; }
.cash-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cash-pick .mini-seg { margin: 0; flex: 1; min-width: 180px; }
.cash-hint { margin: 8px 0 0; }
.btn.danger { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.cash-list { margin-top: 6px; border-top: 1px solid var(--line); }
.cash-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cash-date { flex: none; width: 64px; color: var(--muted); }
.cash-amt { flex: 1; font-weight: 700; }
.cash-st { flex: none; font-size: 12.5px; font-weight: 700; color: var(--accent-2); }
.cash-st.done { color: var(--muted); }
.cash-total { margin: 10px 0 0; }

/* 星星愿望单 */
.wish-line {
  display: block; margin-top: 6px; border: 0; background: none; padding: 0;
  font-size: 12.5px; font-weight: 700; color: var(--accent); text-align: left;
}
.wish-line.ready { color: var(--accent-2); }
.wish-head { margin-bottom: 10px; }
.wish-head h3 { margin: 0; }
.wish { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wish-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wish-main b { font-size: 14.5px; overflow-wrap: anywhere; }
.wish-bar { height: 8px; border-radius: 99px; background: var(--empty); overflow: hidden; }
.wish-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }
.wish.waiting { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 12px; padding-inline: 10px; }
.wish-balance { font-size: 13px; font-weight: 700; color: var(--muted); }
.wish-balance b { font-size: 20px; color: var(--accent); font-family: Nunito, ui-rounded, sans-serif; }
.wish.ready { background: color-mix(in srgb, var(--accent-2) 10%, transparent); border-radius: 12px; padding-inline: 10px; }
.wish-right { flex: none; display: flex; align-items: center; gap: 6px; }
.wish-status { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.wish-form { margin-top: 14px; display: grid; gap: 8px; }
.wish-form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wish-form-row .mini-seg { margin: 0; flex: 1; min-width: 200px; }
.wish-form p { margin: 0; }
.wish-done-list { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.wish-emoji { font-size: 26px; }

/* 周末：轮到她给爸爸打分 */
.dad-turn {
  display: block; width: 100%; text-align: left;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: var(--card);
  border-radius: 18px; padding: 0; margin-bottom: 14px; position: relative;
}
.dad-turn-emo { font-size: 26px; }
.dad-turn-go { font-size: 22px; color: var(--accent); font-weight: 800; }

/* 达成后：顶部金色贴纸 + 打分卡里的一行 */
.day-star {
  display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; margin-left: 4px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 0;
  color: #5a3d00; background: linear-gradient(135deg, #ffe08a, #ffc04d); border-radius: 99px; padding: 2px 10px;
  box-shadow: 0 2px 8px rgba(255, 176, 40, .35);
}
.summary-done {
  display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 14px; border-radius: 14px;
  background: var(--soft);
}
.summary-done .mini-star { color: var(--accent-2); font-size: 20px; line-height: 1; }
.summary-done b { font-size: 14px; }
.summary-done .mini-score { margin-left: auto; align-self: center; }
/* 今日达成卡：贴纸是主角，印章盖下去 */
.done-card {
  position: relative; overflow: hidden; width: 100%; margin-top: 14px; padding: 16px 16px 14px;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 16px; align-items: center;
  text-align: left; color: #fff; border: 0; border-radius: 22px; cursor: pointer; font: inherit;
  background: linear-gradient(125deg, var(--accent), color-mix(in srgb, var(--accent) 45%, var(--accent-2)) 55%, var(--accent-2));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent);
  text-shadow: 0 1px 3px rgba(30, 10, 60, .28);
}
.done-card::before {   /* 角落里淡淡的星星 */
  content: '★'; position: absolute; right: -10px; top: -22px; font-size: 110px; line-height: 1;
  color: rgba(255, 255, 255, .13); text-shadow: none; transform: rotate(14deg); pointer-events: none;
}
.done-shine {          /* 一道慢慢扫过的光 */
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 4.5s ease-in-out 1s infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
.done-sticker {
  grid-row: 1 / span 2; width: 78px; height: 78px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 44px; line-height: 1;
  background: #fff; border: 4px solid rgba(255, 255, 255, .55); background-clip: padding-box;
  box-shadow: 0 6px 16px rgba(30, 10, 60, .22);
}
.done-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.done-title { font-size: 19px; font-weight: 900; line-height: 1.3; text-wrap: balance; text-shadow: 0 2px 6px rgba(30, 10, 60, .18); }
.done-line { font-size: 13px; font-weight: 600; opacity: .95; }
.done-line b { font-size: 15px; font-family: Nunito, ui-rounded, sans-serif; }
.done-go { grid-column: 2; justify-self: end; font-size: 12.5px; font-weight: 700; opacity: .85; }
.done-card:active { transform: scale(.985); }
.done-card.fresh { animation: pop-in .55s cubic-bezier(.2, 1.6, .4, 1); }
.done-card.fresh .done-sticker { animation: star-in .8s cubic-bezier(.2, 1.7, .4, 1) .1s both; }
@media (prefers-reduced-motion: reduce) { .done-shine, .done-card.fresh, .done-card.fresh * { animation: none !important; } }
.bump { animation: bump .6s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes bump { 40% { transform: scale(1.18); } }

/* 全屏庆祝 */
.celebrate-mask {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, rgba(20, 12, 40, .55));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade .25s ease-out;
}
.celebrate-mask .confetti { position: fixed; }
.celebrate-mask .confetti i { top: -16px; height: 14px; animation-name: fall-far; }
@keyframes fall-far {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(105vh) rotate(720deg); }
}
.celebrate-box {
  position: relative; width: min(320px, 100%); text-align: center; padding: 34px 24px 20px;
  background: var(--card); border-radius: 28px; box-shadow: 0 20px 60px rgba(40, 20, 90, .35);
  animation: pop-in .55s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.burst {
  position: absolute; left: 50%; top: 74px; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--accent-2) 35%, transparent) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: spin 6s linear infinite;
}
.big-star {
  position: relative; width: 104px; height: 104px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 60px; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #ffd25e, var(--accent-2));
  box-shadow: 0 8px 30px color-mix(in srgb, var(--accent-2) 55%, transparent);
  animation: star-in .8s cubic-bezier(.2, 1.7, .4, 1) .1s both;
}
@keyframes star-in { from { transform: scale(0) rotate(-180deg); } to { transform: scale(1) rotate(0); } }
.celebrate-box h2 { position: relative; margin: 0; font-size: 26px; font-weight: 900; letter-spacing: 1px; }
.celebrate-sub { position: relative; margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.celebrate-extra { position: relative; margin: 10px 0 0; font-weight: 800; color: var(--accent-2); }
.celebrate-tap { position: relative; display: block; margin-top: 16px; font-size: 12px; color: var(--muted); }

/* 我的目标 */
/* 今天页顶部那一行小字里的一项：和“本周 ★”同一个样子，只有数字带颜色；名字太长就省略 */
.goal-line {
  display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; max-width: 100%; border: 0; background: none; padding: 2px 0;
  font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.goal-line span { overflow: hidden; text-overflow: ellipsis; max-width: 9em; }
.goal-line b { color: var(--accent-2); font-family: Nunito, ui-rounded, sans-serif; font-size: 15px; font-weight: 900; }
.goal-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-main b { overflow-wrap: anywhere; }
.goal-date {
  position: relative; justify-self: start; max-width: 100%; min-width: 0;
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer;
}
.goal-date.set { background: var(--soft); }
.goal-date:focus-within { box-shadow: 0 0 0 1.5px var(--accent); }
.goal-date-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 原生日期框透明地盖在胶囊上：点哪儿都弹系统日历，但看不到 yyyy/mm/dd */
.goal-date input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.goal-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.goal-add { min-height: 40px; padding: 0 20px; border-radius: 999px; font-size: 14px; transition: opacity .15s; }
.goal-add.dim { opacity: .45; }

/* 待攻克清单 */
.due-block { border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.due-block h4 { margin-bottom: 8px; }
.due-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.due-item + .due-item { border-top: 1px solid var(--line); }
.due-text { flex: 1 1 160px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.due-text small { font-weight: 400; font-size: 12px; }
.abc { display: flex; gap: 6px; flex: none; }
.abc-btn {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 5px 10px;
  font-size: 12.5px; display: flex; align-items: center; gap: 4px; color: var(--ink);
}
.abc-btn.abc-A { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--accent); }
.abc-btn.abc-B { border-color: color-mix(in srgb, var(--partial) 70%, var(--line)); color: var(--partial-ink); }
.abc-btn.abc-C { border-color: color-mix(in srgb, var(--rest) 70%, var(--line)); color: var(--rest); }
.struggle-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.struggle-label { flex-basis: 100%; font-size: 14px; font-weight: 700; }
.struggle-label .small { color: var(--muted); font-weight: 400; }
.struggle-chip {
  display: inline-flex; align-items: center; gap: 4px; background: var(--note); color: var(--note-ink);
  border-radius: 99px; padding: 3px 4px 3px 12px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere;
}
.struggle-chip button { border: 0; background: none; color: inherit; opacity: .6; font-size: 14px; padding: 0 6px; }
/* 攻克页：不太懂的事是一颗蛋 */
.cq-head { margin: 4px 0 14px; }
.cq-head .page-title { margin: 0; }
.cq-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cq-card h3 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.cq-card h3 small { font-size: 13px; font-weight: 600; color: var(--muted); }
.cq-egg { flex: none; overflow: visible; }
.cq-crack { fill: none; stroke: #6b5a7a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cq-due { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cq-due:last-child { border-bottom: 0; padding-bottom: 2px; }
.cq-due .cq-egg { width: 52px; height: 62px; }
.cq-due-main { flex: 1; min-width: 0; }
.cq-due-main b { display: block; font-size: 17px; overflow-wrap: anywhere; }
.cq-due-main small { color: var(--muted); font-size: 12.5px; }
.cq-ans { display: flex; gap: 6px; flex: none; }
.cq-ans button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 8px 15px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.cq-ans button.a { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cq-ans button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cq-due.said { background: var(--soft); margin: 6px -10px; padding: 12px 10px; border-radius: 16px; border-bottom: 0; }
.cq-due.said .cq-due-main b { font-size: 15.5px; }
.cq-due.said .cq-due-main small { font-size: 13.5px; color: var(--ink); }
.cq-due.hatched .cq-due-main small { color: var(--accent); font-weight: 800; }
.cq-none { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14.5px; margin: 8px 0 2px; }
.cq-none .cq-egg { width: 34px; height: 40px; opacity: .8; }
.cq-nest { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 10px 0 0; }
.cq-nest-egg { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 12px 8px 10px; border-radius: 16px; background: var(--bg); text-align: center; }
.cq-nest-egg .cq-egg { width: 44px; height: 52px; }
.cq-nest-egg b { font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cq-nest-egg small { font-size: 11.5px; color: var(--muted); }
.cq-x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border: 0; background: none; color: var(--muted); font-size: 14px; opacity: .55; }
.cq-x:hover, .cq-x:focus-visible { opacity: 1; }
.cq-put { display: flex; gap: 8px; margin-top: 14px; }
.cq-put input { flex: 1; min-width: 0; }
.cq-put .btn { flex: none; }
.cq-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.cq-steps span { display: inline-flex; align-items: center; gap: 6px; }
.cq-steps i { font-style: normal; opacity: .6; }
.cq-steps .cq-egg { width: 20px; height: 24px; }
.cq-hatch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px 8px; margin-top: 8px; }
.cq-hatch { display: grid; justify-items: center; align-content: start; gap: 2px; text-align: center; padding: 6px 4px; }
.cq-hatch .cq-egg { width: 50px; height: 54px; }
.cq-hatch span { font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cq-more { margin: 8px 0 0; }
@media (max-width: 640px) {
  .cq-due { flex-wrap: wrap; }
  .cq-ans { width: 100%; padding-left: 66px; box-sizing: border-box; }
  .cq-ans button { flex: 1; padding: 8px 4px; }
  .cq-steps i { display: none; }
  .cq-steps span { flex-basis: 100%; }
}
.struggle-add { display: flex; gap: 8px; flex-basis: 100%; }
.struggle-add input { flex: 1; }
.mastered { display: flex; flex-wrap: wrap; gap: 6px; }
/* 我学会的：按周的小笔记本 */
.nb-week { padding: 10px 0 4px; border-top: 1px solid var(--line); }
.notebook h3 + .nb-week { border-top: 0; padding-top: 2px; }
.nb-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.nb-row { display: flex; gap: 10px; padding: 5px 0; font-size: 14.5px; line-height: 1.5; }
.nb-day { flex: none; width: 42px; color: var(--muted); font-size: 12.5px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.nb-text { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
/* 📌 考前要看：没点是灰的，点了才有颜色 */
.nb-pin { flex: none; align-self: flex-start; width: 34px; height: 30px; margin: -3px -6px 0 0; padding: 0; border: 0; border-radius: 10px; background: none; font-size: 15px; line-height: 30px; text-align: center; }
button.nb-pin { cursor: pointer; }
.nb-pin:not(.on) { filter: grayscale(1); opacity: .28; }
.nb-pin.on { background: var(--soft); }
.nb-hint { margin: 2px 0 6px; }
.nb-tag { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--soft); border-radius: 99px; padding: 1px 8px; margin-right: 6px; white-space: nowrap; }
/* 月份胶囊：一排横着滑，不换行；滚动条藏起来 */
.nb-chips { display: flex; gap: 6px; margin: 2px -4px 6px; padding: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nb-chips::-webkit-scrollbar { display: none; }
.nb-chip { flex: none; min-height: 34px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 99px; padding: 4px 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.nb-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nb-chips + .nb-week, .nb-hint + .nb-week { border-top: 0; padding-top: 2px; }
.mastered-chip { background: var(--soft); color: var(--accent); border-radius: 99px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.conquer-sum { background: var(--soft); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; margin-top: 10px; }

/* 反思：便利贴风格 */
.reflect-grid { display: grid; gap: 4px 14px; }

/* 今天页：窄屏一列 ①②③；宽屏左右两栏（见 1000px 断点） */
.day-grid { display: flex; flex-direction: column; }
.col-a, .col-b { display: contents; }
.slot-plan { order: 1; }
.slot-reflect { order: 2; }
.slot-score { order: 3; }
.plan-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.reflect label { color: var(--ink); font-size: 14px; font-weight: 700; }
.reflect label .small { color: var(--muted); }
.reflect textarea { background: var(--bg); color: var(--ink); }
.reflect textarea:focus { border-color: var(--accent); }

/* ================= 日历 ================= */
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-nav b { flex: 1; text-align: center; font-size: 17px; font-weight: 800; }
.cal-nav .link { flex: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-h { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.cal-cell {
  aspect-ratio: 1; border-radius: 14px; border: 0; background: var(--bg); padding: 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.cal-cell.out { background: transparent; }
.cal-d { font-size: 13px; font-weight: 800; color: var(--muted); }
.cal-t { font-size: 11px; color: var(--muted); font-weight: 700; }
.cal-cell .sticker { font-size: 18px; height: 20px; }
.calendar.compact .cal-cell .sticker { font-size: 14px; height: 15px; }
.calendar.compact .cal-grid { gap: 4px; }
.calendar.compact .cal-cell { border-radius: 10px; }
.cal-cell.st-done { background: var(--soft); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--accent-2); }
.cal-cell.sel { background: var(--accent); }
.cal-cell.sel .cal-d, .cal-cell.sel .cal-t, .cal-cell.sel .sticker { color: var(--accent-ink); }
.cal-cell.future { opacity: .55; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin: -4px 4px 14px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend .sticker { font-size: 14px; height: 15px; }

.record-side { display: none; }

/* ================= 标题 + 翻页胶囊 ================= */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.page-head .page-title { margin: 0; }
.pager { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-head .pager { margin: 0; }
.pill-pager {
  display: flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px; box-shadow: var(--shadow); min-width: 0;
}
.pp-btn {
  width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--soft);
  color: var(--accent); font-size: 18px; font-weight: 800; line-height: 1;
}
.pager-title { display: flex; flex-direction: column; align-items: center; padding: 0 12px; min-width: 0; line-height: 1.25; }
.pager-title b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.pager-title span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.today-btn { flex: none; }
/* 手机：标题一行，翻页胶囊撑满下一行（右上角留给“我的”按钮） */
/* iPad：右上角“我的”圆按钮是浮动的，给它让出位置 */
@media (min-width: 768px) and (max-width: 1023px) { .page-head { padding-right: 56px; } }
@media (max-width: 767px) {
  .page-head { padding-right: 52px; }
  .page-head .pager { flex-basis: calc(100% + 52px); margin-right: -52px; }
  .page-head .pill-pager { flex: 1; justify-content: space-between; }
}

/* ================= 复盘 / 统计 ================= */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 28px; font-weight: 900; }
.kpi small { font-size: 13px; color: var(--muted); font-weight: 600; }

.rate-bar { position: relative; height: 14px; background: var(--empty); border-radius: 99px; margin: 20px 0 14px; }
.rate-fill { height: 100%; border-radius: 99px; background: var(--partial); transition: width .4s; }
.rate-fill.ok { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rate-ref { position: absolute; top: -6px; bottom: -6px; border-left: 2px dashed var(--muted); }
.rate-ref span { position: absolute; top: -19px; left: -14px; font-size: 11px; color: var(--muted); font-weight: 700; }

.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.step-no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.notes { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.note { background: var(--note); color: var(--note-ink); border-radius: 6px 14px 14px 14px; padding: 8px 12px; font-size: 13.5px; }
.note .muted { color: inherit; opacity: .7; }
.know-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.small-seg { flex: none; gap: 4px; }
.small-seg .seg-btn { width: 40px; min-height: 40px; flex: none; }
.seg-btn.lv-A.on { background: var(--accent); border-color: var(--accent); }
.seg-btn.lv-B.on { background: var(--partial); border-color: var(--partial); color: var(--partial-ink); }
.seg-btn.lv-C.on { background: var(--rest); border-color: var(--rest); color: #fff; }
.lv { display: inline-flex; width: 24px; height: 24px; border-radius: 8px; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.lv-A { background: var(--accent); } .lv-B { background: var(--partial); color: var(--partial-ink); } .lv-C { background: var(--rest); }

/* 复盘：本周完成率 */
.week-sum .ws-main { display: flex; align-items: baseline; gap: 10px; }
.week-sum .ws-main b { font-size: 34px; font-weight: 900; color: var(--accent); font-family: Nunito, ui-rounded, sans-serif; }
.week-sum .ws-main span { font-size: 14px; font-weight: 700; color: var(--muted); }
.week-sum .ws-detail { margin: 4px 0 0; font-size: 13.5px; }
.week-sum .ws-detail b { font-family: Nunito, ui-rounded, sans-serif; }
.week-sum .ws-note { margin: 4px 0 0; }

/* 复盘：进度 + 一张记录卡 */
.rv-progress h3 { margin-bottom: 8px; }
.rv-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.rv-step {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 8px; border-radius: 12px; font-size: 14px; color: var(--ink);
}
.rv-step:hover { background: var(--bg); }
.rv-dot {
  width: 24px; height: 24px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; border: 1.5px solid var(--line); color: var(--muted); font-family: Nunito, ui-rounded, sans-serif;
}
.rv-step.done { color: var(--muted); }
.rv-step.done .rv-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rv-done { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0; min-height: 52px; }
.rv-done small { font-size: 12px; font-weight: 600; opacity: .8; }
.rv-done.confirm { border-color: var(--accent-2) !important; color: var(--accent-2) !important; background: color-mix(in srgb, var(--accent-2) 10%, var(--card)) !important; }
.rv-done:not(.primary) { border: 1.5px solid var(--accent); color: var(--accent); background: var(--soft); }
.rv-record h3 { margin-bottom: 4px; }
.rv-block { padding: 14px 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.rv-block:first-of-type { border-top: 0; }
.rv-block h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 15px; }
.rv-block textarea.grow { resize: none; overflow: hidden; min-height: 64px; }
.rv-notes { display: grid; gap: 6px; max-height: 240px; overflow: auto; margin-bottom: 10px; }
.rv-note { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13.5px; background: var(--note); color: var(--note-ink); border-radius: 6px 12px 12px 12px; padding: 7px 12px; }
.rv-note b { font-size: 12.5px; }
.rv-note .muted { color: inherit; opacity: .7; }
.rv-sub { margin: 14px 0 8px; font-weight: 700; font-size: 14px; }
.rv-dad { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg); border-radius: 14px; padding: 10px 14px; }
.rv-dad-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.rv-dad-main b { font-size: 24px; font-weight: 900; color: var(--accent); font-family: Nunito, ui-rounded, sans-serif; }
.rv-dad-main small { color: var(--muted); margin-left: -8px; }

/* 上周定的改进 */
.rv-last { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 6px 0 4px; }
.rv-last-label { font-size: 13px; font-weight: 700; color: var(--accent); }
.rv-last-text { margin: 4px 0 10px; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.rv-last .mini-seg { margin: 0; }

/* 手机：先看数据和做复盘，最后才是进度和“标记已复盘” */
@media (max-width: 1023px) {
  .review-layout { display: flex; flex-direction: column; }
  .review-left, .review-right { display: contents; }
  .week-sum { order: 1; }
  .week-table { order: 2; }
  .rv-record { order: 3; }
  .rv-progress { order: 4; }
}

/* 复盘：本周一览 */
.wt { width: 100%; border-collapse: collapse; font-size: 13px; }
.wt th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wt th span { display: inline-block; width: 22px; text-align: center; }
.wt td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wt tbody tr[data-act] { cursor: pointer; }
.wt tbody tr[data-act]:hover { background: var(--bg); }
.wt tr.wt-future td { opacity: .45; }
.wt tr.wt-empty td, .wt tr.wt-future td { padding-top: 5px; padding-bottom: 5px; font-size: 12.5px; }
.wt tr.wt-empty .wt-day b, .wt tr.wt-future .wt-day b { display: inline; margin-right: 6px; font-size: 12.5px; }
.wt-day { white-space: nowrap; }
.wt-day b { display: block; font-size: 13.5px; }
.wt-day span { font-size: 11.5px; color: var(--muted); margin-right: 4px; }
.wt-type { display: inline-block; font-size: 10.5px !important; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--soft); color: var(--accent) !important; }
.wt-type.t-繁忙 { background: color-mix(in srgb, var(--partial) 35%, var(--card)); color: var(--partial-ink) !important; }
.wt-type.t-休息 { color: var(--rest) !important; }
.wt-plans { min-width: 140px; }
.wt-plan { display: block; overflow-wrap: anywhere; line-height: 1.45; }
.wt-plan.done { color: var(--muted); }
.wt-scores { white-space: nowrap; }
.wt-s {
  display: inline-flex; width: 20px; height: 20px; margin-right: 2px; border-radius: 6px; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 800; font-family: Nunito, ui-rounded, sans-serif;
}
.wt-s.s0 { background: var(--empty); color: var(--muted); }
.wt-s.s1 { background: color-mix(in srgb, var(--accent) 25%, var(--card)); color: var(--accent); }
.wt-s.s2 { background: var(--accent); color: var(--accent-ink); }
.wt-s.sx { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.wt-total { white-space: nowrap; font-weight: 800; font-family: Nunito, ui-rounded, sans-serif; }
.wt-star { color: var(--accent-2); }
.wt-legend { margin: 8px 0 0; }
/* 手机：每天两行——上面计划，下面五项 + 总分 */
@media (max-width: 599px) {
  .wt thead { display: none; }
  .wt, .wt tbody { display: block; }
  .wt tr { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "day plans plans" "day scores total"; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .wt td { border: 0; padding: 2px 4px; }
  .wt-day { grid-area: day; }
  .wt-plans { grid-area: plans; min-width: 0; }
  .wt-scores { grid-area: scores; padding-top: 6px !important; }
  .wt-total { grid-area: total; padding-top: 6px !important; align-self: center; }
  .wt td[colspan] { grid-column: 2 / -1; }
  .wt-s { width: 22px; height: 22px; }
  .wt-day .wt-type { display: block; width: fit-content; margin-top: 3px; }
  .wt tr.wt-empty, .wt tr.wt-future { grid-template-columns: auto 1fr; grid-template-areas: none; column-gap: 12px; padding: 4px 0; align-items: center; }
  .wt tr.wt-empty .wt-day, .wt tr.wt-future .wt-day { grid-area: auto; grid-column: 1; grid-row: 1; }
  .wt tr.wt-empty td[colspan], .wt tr.wt-future td[colspan] { grid-column: 2; grid-row: 1; }
}

/* ================= 爸爸 ================= */
/* 每页标题下面的一句话：这一页是干什么的 */
.page-intro { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.page-intro b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.ov-now + .page-intro { margin-top: -4px; }

/* 现在要做的事 */
.todo-card h3 { margin-bottom: 4px; }
.todo-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin-top: 8px;
  border: 0; border-radius: 14px; padding: 11px 14px; font: inherit; cursor: pointer;
  background: color-mix(in srgb, var(--partial) 25%, var(--card)); color: var(--partial-ink);
}
.todo-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.todo-text b { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.todo-text small { font-size: 12.5px; opacity: .8; line-height: 1.45; }
.todo-go { flex: none; font-size: 18px; font-weight: 700; }
.todo-none { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* 爸爸怎么用 */
.guide-link { padding: 0 2px; font-size: inherit; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.6; }
.guide-steps b { flex: none; width: 44px; text-align: center; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 2px 0; margin-top: 1px; background: var(--soft); color: var(--accent); }
.guide-h { margin: 16px 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.guide-terms { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; line-height: 1.55; }
.guide-terms dt { font-weight: 800; white-space: nowrap; }
.guide-terms dd { margin: 0; color: var(--muted); }

/* 女儿反馈（爸爸看）：她打的分是只读的一行一句，不是按钮 */
.dad-card h3 .step-no, .reflect h3 .step-no { flex: none; }
.fb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14.5px; }
.dad-card header + .fb-row { border-top: 0; }
.fb-name { flex: none; width: 76px; font-weight: 700; white-space: nowrap; }
.fb-dots { flex: none; display: flex; gap: 4px; }
.fb-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); }
.fb-dots i.on { background: var(--accent); border-color: var(--accent); }
.fb-say { flex: 1; min-width: 0; font-weight: 600; }
.fb-say small { margin-left: 4px; color: var(--muted); font-weight: 600; font-size: 12px; }
.fb-row.v0 .fb-say { color: var(--partial-ink); }
.fb-row.none .fb-say { color: var(--muted); font-weight: 400; }
.fb-empty { margin: 0 0 4px; font-size: 14px; line-height: 1.6; }
.fb-note { margin: 8px 0 0; }
.fb-words { margin-top: 14px; background: var(--note); color: var(--note-ink); border-radius: 6px 16px 16px 16px; padding: 12px 14px; }
.fb-words-label { font-size: 12.5px; font-weight: 700; opacity: .7; }
.fb-words p { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-words p.muted { color: inherit; opacity: .6; font-weight: 400; }
.fb-next { display: block; font-size: 14px; font-weight: 700; }
.fb-next textarea { margin-top: 6px; }
.wk-todo { font-size: 12.5px; color: var(--partial-ink); font-weight: 700; }

.dad-card header { margin-bottom: 14px; }
.dad-total b { font-size: 26px; font-weight: 900; }
.dad-total span { color: var(--muted); }
.prev-fb { background: var(--note); color: var(--note-ink); border-radius: 6px 14px 14px 14px; padding: 8px 12px; margin-bottom: 14px; font-size: 13.5px; }
.prev-fb .muted { color: inherit; opacity: .7; }
.promise { background: var(--note); color: var(--note-ink); border-radius: 6px 16px 16px 16px; padding: 12px 14px; margin: 0 0 16px; }
.promise-label { font-size: 12.5px; font-weight: 700; opacity: .7; }
.promise-edit .promise-label { display: block; opacity: 1; }
.promise-edit .promise-label span { font-weight: 600; opacity: .7; margin-left: 4px; }
.promise-edit textarea { margin: 6px 0 8px; }
.promise-text { margin: 4px 0 10px; font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.promise-q { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.kept-seg { background: color-mix(in srgb, var(--card) 70%, transparent); }
.kept-seg .seg-btn.on.kept-done { background: var(--accent); color: var(--accent-ink, #fff); }
.kept-seg .seg-btn.on.kept-partial { background: var(--partial); color: var(--partial-ink, #3a2a00); }
.kept-seg .seg-btn.on.kept-not { background: var(--zero); color: var(--ink); }
.promise-result { display: inline-block; font-size: 13.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card); color: var(--muted); }
.promise-result.kept-done, .rv-kept .kept-done { color: var(--accent); }
.promise-result.kept-partial, .rv-kept .kept-partial { color: #c98a00; }
.promise-result.kept-not, .rv-kept .kept-not { color: var(--muted); }
.rv-kept { flex-basis: 100%; margin: 0; font-size: 13px; }
.hist-kept { position: relative; font-style: normal; font-size: 12px; font-weight: 800; height: 14px; line-height: 14px; }
.hist-kept.done { color: var(--accent); }
.hist-kept.partial { color: #c98a00; }
.hist-kept.not { color: var(--muted); }
.kept-sum { margin: 10px 0 0; }
.kept-sum b { color: var(--ink); }
.pact-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px dashed var(--line); }
.pact-row:first-of-type { border-top: 0; }
.pact-who {
  flex: none; width: 96px; text-align: center; font-size: 13px; font-weight: 800; border-radius: 999px; padding: 4px 0; margin-top: 4px;
  background: var(--soft); color: var(--accent);
}
.pact-who.dad { background: var(--note); color: var(--note-ink); }
/* 手机上标签放在内容上面，输入框能占满一行 */
@media (max-width: 599px) {
  .pact-row { flex-direction: column; gap: 6px; }
  .pact-who { width: auto; padding: 4px 12px; margin-top: 0; }
  .pact-row .pact-body { flex: none; width: 100%; }
}
.pact-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pact-body input { margin: 0; }
.pact-text { font-size: 15px; font-weight: 600; line-height: 1.5; padding-top: 4px; }
.pact-kept { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pact-kept .kept-seg { flex: 1 1 220px; }

/* 爸爸想对你说（周计划页） */
.words-card h3 { margin-bottom: 6px; }
.words-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px dashed var(--line); }
.words-row:first-of-type { border-top: 0; }
.words-row p { flex: 1; min-width: 0; margin: 0; padding-top: 3px; font-size: 15px; font-weight: 600; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.words-tag { flex: none; width: 64px; text-align: center; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 4px 0; margin-top: 2px; background: var(--soft); color: var(--muted); }
.words-tag.good { color: var(--accent); }
.words-tag.try { background: var(--note); color: var(--note-ink); }
.note-more { margin-top: 8px; font-size: 13px; font-weight: 600; opacity: .85; }
.advice-tip { background: var(--note); color: var(--note-ink); border-radius: 6px 16px 16px 16px; padding: 12px 14px; margin-bottom: 14px; }
.advice-tip b { display: block; font-size: 12.5px; font-weight: 700; }
.advice-tip b span { font-weight: 400; opacity: .7; margin-left: 4px; }
.advice-tip p { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.words-row p.words-know { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 0; }
.know-chip { font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 10px; border: 1.5px solid var(--accent); color: var(--accent); }
.rv-share { margin: 0 0 4px; }
.pact-mark { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--bg); }
.pact-mark.kept-done { color: var(--accent); }
.pact-mark.kept-partial { color: #c98a00; }
.pact-mark.kept-not { color: var(--muted); }
.pact-next { display: block; margin: 6px 0 0 auto; }
.rv-chal { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.rv-where { margin: 8px 0 0; line-height: 1.6; }
.rv-chal small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.rv-chal.empty { background: var(--bg); color: var(--muted); font-weight: 400; font-size: 13.5px; }
.dad-card .score-label { width: 76px; }
.score-seg .seg-btn { white-space: nowrap; }
.hist { display: flex; gap: 6px; align-items: stretch; height: 150px; }
.hist-bar {
  flex: 1; min-width: 0; position: relative; border: 0; border-radius: 14px; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 0 4px; overflow: hidden;
}
.hist-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, var(--accent), var(--accent-2)); opacity: .35; }
.hist-bar b, .hist-bar small { position: relative; }
.hist-bar small { font-size: 10.5px; color: var(--muted); }
.hist-bar.sel { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ================= 总览 ================= */
.ov-now { margin: -6px 0 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.ov-range { margin-bottom: 14px; max-width: 420px; }
.ov-range .seg-btn { min-height: 38px; font-size: 14px; border-radius: 12px; }
.trend, .items { display: grid; gap: 10px; }
.tr-row { display: grid; grid-template-columns: 84px 1fr 64px; gap: 10px; align-items: center; }
.tr-label b, .tr-val b { display: block; font-size: 14px; }
.tr-label small, .tr-val small { display: block; font-size: 11.5px; color: var(--muted); }
.tr-val { text-align: right; }
.tr-bar { position: relative; height: 12px; background: var(--empty); border-radius: 99px; }
.tr-fill { height: 100%; border-radius: 99px; background: var(--partial); }
.tr-fill.ok { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tr-fill.it { background: var(--accent); opacity: .75; }
.tr-ref { position: absolute; left: 80%; top: -4px; bottom: -4px; border-left: 2px dashed var(--muted); opacity: .6; }
.it-row { display: grid; grid-template-columns: 92px 1fr 104px; gap: 10px; align-items: center; font-size: 14px; }
.it-val { display: flex; gap: 6px; align-items: baseline; justify-content: flex-end; white-space: nowrap; }
.it-val .up { color: var(--accent); font-size: 12px; font-weight: 700; }
.it-val .down { color: var(--partial-ink); font-size: 12px; font-weight: 700; }
.it-val .same { color: var(--muted); font-size: 12px; }
.it-val em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--partial) 35%, var(--card)); color: var(--partial-ink); }
.it-row.weak .tr-fill.it { background: var(--partial); opacity: 1; }
.ov-cash { font-size: 13.5px; font-weight: 600; background: var(--bg); border-radius: 12px; padding: 8px 12px; margin: 0 0 6px; }
.wk-tbl td { white-space: nowrap; }
.wk-range { display: block; font-size: 11.5px; }
.wk-tbl + .btn, .table-wrap + .btn { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 700; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.tbl tbody tr[data-act] { cursor: pointer; }
.tbl tbody tr[data-act]:hover { background: var(--bg); }
.tbl.rules td { min-width: 120px; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.timeline b { display: inline-block; min-width: 64px; }
.timeline li.past { color: var(--muted); }
.boundary { background: var(--bg); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; }

/* 手机：非“今天”页右上角的“我的”按钮（电脑上用导航栏里的昵称） */
.me-float {
  position: fixed; z-index: 15; top: calc(14px + env(safe-area-inset-top, 0px)); right: 16px;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: conic-gradient(var(--accent) 0 50%, var(--accent-2) 50% 100%);
  box-shadow: 0 0 0 3px var(--card), var(--shadow);
}
@media (min-width: 1024px) { .me-float { display: none; } }
.dad-ro-note { margin: 8px 0 0; }
textarea[readonly] { background: var(--bg); color: var(--muted); }

/* ================= 主题与昵称面板 ================= */
.sheet-mask {
  position: fixed; inset: 0; z-index: 30; background: rgba(20, 16, 40, .35);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s;
}
.sheet {
  width: 100%; max-width: 460px; background: var(--card); color: var(--ink);
  border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: up .25s ease-out;
}
@media (min-width: 768px) { .sheet-mask { align-items: center; } .sheet { border-radius: 26px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
/* 7 个风格排成 4 + 3 两行 */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.theme-opt {
  border: 2px solid var(--line); background: var(--card); border-radius: 16px; padding: 8px 2px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.theme-opt.on { border-color: var(--accent); color: var(--accent); }
.swatch { width: 34px; height: 34px; border-radius: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.swatch i { font-style: normal; font-size: 16px; }
/* 调色盘：预览 + 三条色谱（主色、点缀色、底色；底色那条前一半浅、后一半深，颜色由 app.js 画） */
.cc { display: grid; gap: 14px; margin: 0 0 18px; padding: 14px 12px 12px; border-radius: 18px; background: var(--bg); }
.cc-preview {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cc-preview .pv-check { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 900; }
.cc-preview .pv-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-preview .pv-chip { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.cc-preview .pv-star { flex: none; color: var(--accent-2); font-size: 20px; line-height: 1; }
.cc-row { display: grid; gap: 6px; }
.cc-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.cc-hue {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 34px; margin: 0; padding: 0; border: 0;
  border-radius: 99px; cursor: pointer; touch-action: none;
}
/* 色谱画的就是主色本身（同一个明度和鲜艳度），拖到哪儿就是哪个颜色。
   两头各留半个滑块的纯色，滑块圆心才正好对着它下面的颜色。:focus 也写上，不然会被输入框聚焦时的底色盖掉 */
/* 色谱写成 #rrggbb（每 15° 一格，由 oklch(.62 .15 色相) 算出来）：旧 iPhone 不认识 oklch()，直接写会整条不显示 */
.cc-hue, .cc-hue:focus { background: linear-gradient(to right, #cc5a82 17px, #d05a69, #d15d4d, #cd632d, #c66c00, #b97600, #a98000, #958900, #7b9200, #5c9932, #2e9e52, #00a16f, #00a28a, #00a0a2, #009cb7, #0096c9, #008fd6, #4087de, #647ee0, #7f76dc, #956ed2, #a867c3, #b761b1, #c35c9b, #cc5a82 calc(100% - 17px)); }
.cc-hue:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc-hue::-webkit-slider-runnable-track { height: 34px; background: transparent; border: 0; }
.cc-hue::-moz-range-track { height: 34px; background: transparent; border: 0; }
.cc-hue::-webkit-slider-thumb {
  -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--cc-main, var(--accent)); border: 4px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.cc-hue::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--cc-main, var(--accent)); border: 4px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
/* 第三条色谱的滑块是底色 */
.cc-hueb::-webkit-slider-thumb { background: var(--cc-bg, var(--accent)); }
.cc-hueb::-moz-range-thumb { background: var(--cc-bg, var(--accent)); }
/* 第二条色谱的滑块是点缀色 */
.cc-hue2::-webkit-slider-thumb { background: var(--cc-second, var(--accent-2)); }
.cc-hue2::-moz-range-thumb { background: var(--cc-second, var(--accent-2)); }
/* 面板变高以后小屏幕装不下：自己滚动 */
.sheet { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* 不认识 dvh 的旧 iPhone：100vh 比看得见的区域高，面板顶部会顶出屏幕，改成跟着遮罩（就是看得见的区域）算 */
@supports not (height: 100dvh) { .sheet { max-height: calc(100% - 24px); } }
.unlock {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 12px;
  border: 1.5px solid var(--accent-2); background: var(--card); border-radius: 16px; padding: 10px 14px;
  animation: pop .5s;
}
.unlock > span:last-child { display: flex; flex-direction: column; }

/* ================= 登录 ================= */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; padding: 30px 26px; text-align: center; }
.login-card h1 { font-size: 24px; font-weight: 900; margin: 10px 0 4px; }
.login-card label { text-align: left; margin-top: 14px; }
.login-card .btn { width: 100%; margin-top: 18px; }
.login-card .btn + .btn { margin-top: 10px; }
.login-card code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.demo-note { margin: 14px 0 0; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--partial) 30%, var(--card)); color: var(--partial-ink); }
.demo-hint { margin: 8px 0 0; text-align: left; }
.demo-days { margin-top: 16px; padding: 10px 12px; border: 1.5px dashed var(--zero); border-radius: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.demo-days p { flex: 1 0 100%; margin: 0; text-align: left; }
.login-card .demo-days .btn { width: auto; flex: 1 1 auto; margin-top: 0; }
.demo-days input { flex: 1 1 130px; min-width: 0; min-height: 38px; padding: 4px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; }
.test-tag {
  display: inline-block; margin: 4px 0 8px; padding: 3px 12px; border-radius: 99px;
  background: var(--note); color: var(--note-ink); font-size: 12.5px; font-weight: 700;
}
.err { color: #d0567a; font-size: 13.5px; min-height: 1em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px; color: #fff; font-size: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center; font-weight: 900;
}
.brand.big { display: block; }
.brand.big .brand-mark { width: 60px; height: 60px; font-size: 28px; border-radius: 20px; }

.save-status {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 20; white-space: nowrap;
  padding: 6px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: var(--card); color: var(--muted); box-shadow: var(--shadow); border: 1px solid var(--line);
}
/* 电脑上顶部是导航栏：保存提示放到右下角 */
@media (min-width: 1024px) {
  .save-status { top: auto; bottom: 20px; left: auto; right: 24px; transform: none; }
}
.save-status.saved { color: var(--accent); }
.save-status.error { color: #d0567a; }
.save-status.warn { color: var(--partial-ink); background: color-mix(in srgb, var(--partial) 30%, var(--card)); }

/* ================= iPad 竖屏起：内容加宽 ================= */
@media (min-width: 768px) {
  .narrow-only { display: none; }
  .main { padding-inline: 28px; }
  .page-title { font-size: 30px; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .record-main { max-width: 720px; margin: 0 auto; }
  .reflect-grid { grid-template-columns: 1fr 1fr; }
  .dad-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 14px; align-items: start; }
}

/* ================= iPad 横屏 / 电脑：顶部悬浮导航条 ================= */
@media (min-width: 1024px) {
  .nav {
    top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto;
    width: min(1560px, calc(100% - 32px)); height: 62px;
    justify-content: space-between; gap: 12px; padding: 0 10px 0 14px;
  }
  .brand { display: flex; align-items: center; gap: 10px; flex: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }
  .brand-text { font-weight: 800; font-size: 15px; }
  .tabs { flex: none; gap: 4px; }
  .nav-btn { flex: none; flex-direction: row; gap: 7px; height: 44px; padding: 0 16px; font-size: 15px; border-radius: 14px; }
  .nav-btn svg { width: 20px; height: 20px; }
  .nav-me { display: flex; align-items: center; gap: 8px; flex: none; }
  .me-chip { display: flex; flex: none; }
  .theme-btn, .msg-btn.in-greet { display: none; }
  .main { padding: calc(100px + env(safe-area-inset-top, 0px)) 32px 48px; max-width: 1560px; }
  .review-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
  .review-left { position: sticky; top: 96px; }
  .review-left .kpis { grid-template-columns: repeat(2, 1fr); }
  .cal-page { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 22px; align-items: start; }
  .cal-page-side .kpis { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 14px; align-items: start; }
}

/* iPad 12.9 竖屏（1024）起：今天页排成两栏，打分卡在右侧固定；整页用满（最宽 1560），不在两边留空 */
@media (min-width: 1000px) {
  .record-main { max-width: none; }
  /* 日期 | 本周贴纸条 | 翻页，合成一行 */
  .day-head {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "greet strip"; gap: 28px; align-items: center; margin-bottom: 16px;
  }
  .day-head .greet { grid-area: greet; margin: 0; max-width: 400px; }
  .day-head .rec-strip { grid-area: strip; margin: 0; }
  .day-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(390px, 40%, 460px); gap: 0 18px; align-items: start; }
  .col-a, .col-b { display: block; }
  .col-b { position: sticky; top: 96px; }
}
/* 再宽也不把右栏加宽、不把小伙伴和杯子画大：③ 是做完之后的回头看，不能比 ① 今天要做的事更抢眼 */

@media (min-width: 1280px) {
}

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

/* “今天的我”瘦身：问句 + ○◐● 三个圆点，说明收进 ⓘ */
.score-item {
  grid-template-columns: minmax(0, 1fr) 132px; grid-template-areas: "name pill" "sub sub" "tip tip";
  padding: 8px 0; row-gap: 2px;
}
.score-name b { white-space: normal; font-size: 14.5px; gap: 6px; }
.score-sub { padding-left: 26px; font-size: 12px; }
.pill-seg { padding: 3px; border-radius: 12px; }
.pill { height: 32px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.lv0 .pill.on { color: var(--ink); }
.lv1 .pill.on { color: var(--accent); }
.lv2 .pill.on { color: var(--accent-ink); }
.dot {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; box-sizing: border-box; vertical-align: -2px;
}
.dot.d1 { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.dot.d2 { background: currentColor; }
.pill .dot { width: 17px; height: 17px; }
.info-btn {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent;
  color: var(--muted); font: italic 700 11px/1 Georgia, serif; padding: 0; flex: none; cursor: pointer;
}
.info-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.score-tip {
  grid-area: tip; display: grid; gap: 4px; margin: 4px 0 2px; padding: 8px 12px;
  background: var(--soft); border-radius: 12px; font-size: 12.5px;
}
.score-tip span { display: flex; align-items: center; gap: 8px; }
.score-tip .dot { width: 12px; height: 12px; color: var(--accent); }
.star-step { font-size: 13px; color: var(--accent); }
.star-step::before { content: '→ '; }

/* 只读的日子：输入框看起来像“记录”，不像能写的格子 */
fieldset.plain:disabled textarea, fieldset.plain:disabled input { background: transparent; border-style: dashed; resize: none; }
fieldset.plain:disabled textarea::placeholder { font-style: normal; }
.type-chip.ro { cursor: default; }

/* ================= 周计划：可收起的卡片（目标 / 约定） ================= */
.fold-card { padding-top: 0; padding-bottom: 0; }
.fold-card.open { padding-bottom: 18px; }
.fold-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0; border: 0; background: none;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.fold-title { font-size: 16px; font-weight: 700; flex: none; }
.fold-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-arrow { margin-left: auto; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 14px; transition: transform .2s; }
.fold-card.open .fold-arrow { transform: rotate(180deg); }
.fold-card.open .fold-head { padding-bottom: 6px; }
.goal-sub { margin: 0 0 10px; }
.fold-card:not(.open) .pact-next { margin: -4px 0 14px auto; }

/* ================= 今天页 ①：清单而不是表单 ================= */
.plan-card .plan-head { align-items: center; margin-bottom: 6px; }
.plan-card .plan-head h3 { margin: 0; font-size: 18px; }
.p-prog { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
.p-prog i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); transition: background .25s; }
.p-prog i.on { background: var(--accent-2); }
.p-count { font-size: 13px; font-weight: 700; color: var(--muted); }
/* 昨天的话：清单上面的一行小字（引语），不再是一个带底色的框 —— 卡片里带底色的条只留给信 */
.plan-card .yesterday-note { margin: 2px 0 8px; padding: 0 0 0 10px; border-left: 3px solid var(--line); }
/* 一件事一行大字；点字才出现编辑框和 × */
.plan-card .plan-row { align-items: center; gap: 12px; margin: 0; padding: 7px 0; }
.plan-card .plan-row + .plan-row { border-top: 1px solid var(--line); }
.plan-card .check { width: 34px; height: 34px; margin: 0; font-size: 17px; }
.plan-card .plan-row.fresh .check.on { animation: seal-in .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes seal-in { from { transform: scale(2.2) rotate(-28deg); opacity: 0; } }
.plan-card .plan-input { background: transparent; border-color: transparent; padding: 8px; min-height: 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
.plan-card .plan-input:focus { background: var(--bg); border-color: var(--accent); }
.plan-card .plan-input.done { font-weight: 500; }
/* × 离开输入框后多留一小会儿：iOS 上点按钮不会让按钮得到焦点，立刻藏起来就点不到了 */
.plan-card .icon-btn { margin: 0; width: 34px; height: 34px; font-size: 16px; background: transparent; color: var(--muted); visibility: hidden; transition: visibility 0s .35s; }
.plan-card .plan-row:focus-within .icon-btn { visibility: visible; transition-delay: 0s; }
/* 加一件：像清单里空着的一行 */
.plan-card .plan-actions { gap: 12px; padding-top: 7px; justify-content: space-between; flex-wrap: nowrap; }
.plan-card .plan-row + .plan-actions { border-top: 1px solid var(--line); }
.plan-add { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); text-align: left; cursor: pointer; }
.plan-add::before { content: '+'; flex: none; width: 34px; height: 34px; box-sizing: border-box; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 18px; color: var(--accent); }
fieldset.plain:disabled .plan-card .plan-input { border-color: transparent; }
/* 电脑两栏：① 是白天要做的事，是这一页的主角——今天这几件事要第一眼看到（字大一号、圆圈是主题色的实线、行距拉开） */
@media (min-width: 1000px) {
  .plan-card .plan-head h3 { font-size: 22px; }
  .plan-card .plan-row { gap: 14px; padding: 11px 0; }
  .plan-card .check { width: 40px; height: 40px; font-size: 19px; }
  .plan-card .check:not(.on):not(:disabled) { border: 2.5px solid var(--accent); }
  .plan-card .plan-input { font-size: 20px; font-weight: 700; }
  .plan-card .plan-actions { padding-top: 11px; }
  .plan-add { gap: 14px; font-size: 16px; }
  .plan-add::before { width: 40px; height: 40px; }
}

/* ① 做完的一件：荧光笔（代替删除线）。一笔画在这一行上，比字长出一截，两头是斜的、毛的，整体微微歪一点；刚勾掉时从左划过去 */
.plan-card { position: relative; }
.plan-card .plan-row { position: relative; isolation: isolate; --hl: color-mix(in srgb, var(--accent-2) 58%, transparent); }
.plan-card .plan-input.done { text-decoration: none; }
.plan-card .plan-row[data-hl="line"]::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(var(--tx, 54px) - 12px); top: 50%; width: calc(var(--tw, 0px) + 40px); max-width: calc(100% - var(--tx, 54px) + 12px);
  height: 15px; margin-top: -3px; background: var(--hl); border-radius: 3px 6px 4px 7px;
  clip-path: polygon(0 34%, 1.2% 10%, 3.5% 0, 31% 6%, 58% 1%, 96.5% 7%, 99% 0, 100% 46%, 98.6% 80%, 99.6% 100%, 71% 94%, 40% 100%, 2.6% 95%, 1% 100%, .4% 66%);
  transform: rotate(-.7deg); transform-origin: 0 50%;
}
.plan-card .plan-row:nth-child(even)[data-hl="line"]::before { transform: rotate(.5deg); margin-top: -2px; }
.plan-card .plan-row:focus-within::before { display: none; }
/* 折行的：每一行下半截都划上 */
.plan-card .plan-row[data-hl="wrap"] .plan-input.done:not(:focus) {
  background: linear-gradient(transparent 50%, var(--hl) 50%, var(--hl) 92%, transparent 92%) 0 0 / 100% 1.45em repeat-y content-box;
}
.plan-card .plan-row.fresh[data-hl="line"]::before { animation: hl-sweep .45s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes hl-sweep { from { clip-path: polygon(0 34%, 1.2% 10%, 3.5% 0, 3.5% 0, 3.5% 0, 3.5% 0, 3.5% 0, 3.5% 46%, 3.5% 80%, 3.5% 100%, 3.5% 100%, 3.5% 100%, 2.6% 95%, 1% 100%, .4% 66%); } }
/* ① 刚勾掉一件的那一下（一直留着的状态都在标题行：进度小段和几分之几）。
   下面这些放完就退回平常的样子（不留粗边、不留底色）：
   卡片的边亮起做完的那几分之几，顺时针走到位再淡掉；全做完时卡片暖一下、外面一圈光晕、一道光扫过 */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.plan-card { overflow: hidden; }
.plan-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3px; pointer-events: none;
  background: conic-gradient(from -45deg, var(--accent-2) calc(var(--p, 0) * 360deg), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
}
.plan-card.pfx { animation: p-grow .7s cubic-bezier(.4, 0, .2, 1) backwards; }
.plan-card.pfx::before { animation: p-edge 1.9s ease-out; }
@keyframes p-grow { from { --p: var(--p0, 0); } }
@keyframes p-edge { 0%, 68% { opacity: 1; } 100% { opacity: 0; } }
.plan-card.pfx-all { animation: p-grow .7s cubic-bezier(.4, 0, .2, 1) backwards, p-glow 2.2s ease-out; }
@keyframes p-glow {
  22%, 62% {
    background: color-mix(in srgb, var(--accent-2) 9%, var(--card));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent), 0 10px 30px color-mix(in srgb, var(--accent-2) 28%, transparent);
  }
}
.plan-card.pfx-all::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, #ffc94d 38%, transparent) 50%, transparent 65%);
  animation: p-shine 1.1s ease-out .5s;
}
@keyframes p-shine { to { transform: translateX(120%); } }
/* 给小伙伴 +1：从这一行飘上去 */
.feed-pop {
  position: absolute; left: 46px; top: -6px; z-index: 2; pointer-events: none; white-space: nowrap;
  padding: 3px 10px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 800; color: var(--accent);
  animation: feed-pop 1.5s ease-out both;
}
@keyframes feed-pop { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 18% { opacity: 1; transform: translateY(0) scale(1); } 75% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-16px); } }
/* 全部做完：小伙伴从卡片下沿探一下头 */
.pet-peek { position: absolute; right: 226px; bottom: 0; width: 70px; height: 46px; overflow: hidden; pointer-events: none; }
.pet-peek svg { display: block; width: 70px; animation: pet-peek 2.4s ease-in-out both; }
@keyframes pet-peek { 0% { transform: translateY(100%); } 18%, 78% { transform: translateY(0); } 100% { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .plan-card .plan-row.fresh[data-hl="line"]::before { animation: none; }
  /* 不做位移，只淡入淡出 */
  .feed-pop, .pet-peek svg { animation: fx-fade 2s ease-out both; }
}
@keyframes fx-fade { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* ================= 今天页 ②：手帐的一页，一句话一张便签 ================= */
.slot-reflect h3 { margin-bottom: 10px; font-size: 18px; }
.rf-done { display: none; color: var(--accent); font-weight: 800; }
.slot-reflect.any .rf-done { display: inline; }
/* 点点纸：纸面本身可以点（贴一张新的） */
.rf-page {
  position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 14px; min-height: 96px; padding: 16px 14px 16px; border-radius: 14px;
  background: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.4px) 0 0 / 16px 16px, var(--bg);
}
.rf-page[data-act] { cursor: copy; }
.rf-more {
  position: absolute; right: 8px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; padding: 0; line-height: 1; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--ink) 22%, transparent); background: none; color: var(--muted); font-size: 16px; font-weight: 800;
}
/* 便签：按内容定宽（最宽 280，长句子在里面折行）；三种纸色分三类，不贴胶带（彩条会和上面"划掉任务"的线撞）；每张歪得不一样 */
.rf-note {
  --tone: var(--accent-2);
  position: relative; flex: 0 1 auto; box-sizing: border-box; min-width: 124px; max-width: min(100%, 280px); padding: 11px 12px 10px; border-radius: 3px; cursor: auto;
  background: color-mix(in srgb, var(--tone) 22%, var(--card)); box-shadow: 0 3px 9px color-mix(in srgb, var(--ink) 14%, transparent); transform: rotate(-1.4deg);
}
.rf-note.n-st { --tone: #8fc7e8; }
.rf-note.n-next { --tone: #b7d98b; }
.rf-note:nth-child(even) { transform: rotate(1.2deg); }
.rf-note:nth-child(3n) { transform: rotate(-2.2deg); }
.rf-note.draft.fresh { animation: rf-new .32s cubic-bezier(.2, 1.3, .4, 1); }
.rf-note.stuck { animation: rf-stick .38s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes rf-new { from { transform: scale(.4) rotate(14deg); opacity: 0; } }
@keyframes rf-stick { from { transform: scale(1.3) rotate(9deg); } }
.rf-label { display: block; font-size: 11.5px; font-weight: 800; color: color-mix(in srgb, var(--tone) 55%, var(--ink)); letter-spacing: .5px; }
.rf-text { display: block; font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; padding-right: 14px; }
.rf-note textarea {
  display: block; box-sizing: border-box; width: 100%; min-width: 7em; max-width: 100%; margin: 0; padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent;
  font-size: 16px; font-weight: 700; line-height: 1.45; color: var(--ink); resize: none; overflow: hidden; field-sizing: content;
}
.rf-note textarea::placeholder { font-weight: 600; color: var(--muted); }
.rf-note textarea:focus { outline: 0; background: transparent; }
.rf-note:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.rf-x { position: absolute; right: 2px; top: 2px; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.rf-pin { display: inline-block; margin: 7px 0 0 -2px; padding: 3px 9px; min-height: 26px; border: 1px dashed color-mix(in srgb, var(--ink) 26%, transparent); border-radius: 99px; background: none; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
button.rf-pin { cursor: pointer; position: relative; }
button.rf-pin::after { content: ""; position: absolute; inset: -8px -6px; }
.rf-pin:not(.on) { filter: grayscale(1); opacity: .75; }
.rf-pin.on { border-style: solid; border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.rf-none { margin: auto; font-size: 14px; color: var(--muted); }

/* ================= 今天页 ③：小伙伴 + 五个泡泡 ================= */
.slot-score h3 { font-size: 18px; }
.sc5 { display: block; width: 100%; max-width: 400px; margin: 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.sc5 .bub[data-act] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sc5 .bub:focus { outline: 0; }
.sc5 .bub:focus-visible .ring { stroke-width: 4; }
/* 玻璃杯：不亮 = 空杯（淡一点）；亮一点 = 杯底一点点；全亮 = 满杯（留一点杯口），右上角一颗小闪光。每杯饮料的颜色在 app.js 的 CUP_DRINK */
.sc5 .bub { --glass: color-mix(in srgb, var(--ink) 30%, var(--card)); }                    /* 玻璃的颜色：中性的，不跟主题色，也不跟饮料 */
.sc5 .bub .bg { fill: color-mix(in srgb, var(--ink) 5%, var(--card)); }
.sc5 .bub .water { fill: var(--drink, var(--accent)); transform: translateY(58px); }
.sc5 .bub[data-v="1"] .water { transform: translateY(39px); }
.sc5 .bub[data-v="2"] .water { transform: translateY(5px); }
.sc5 .bub .water.fx { animation: sc-fill .5s cubic-bezier(.3, 1.3, .5, 1) backwards; }   /* 刚点的那个：从原来那一档涨 / 落过来 */
@keyframes sc-fill { from { transform: translateY(var(--from)); } }
.sc5 .bub:not([data-v="0"]) .wave { animation: sc-wave 2.6s linear infinite; }           /* 水面一直轻轻晃 */
@keyframes sc-wave { from { translate: -27px 0; } to { translate: 27px 0; } }
.sc5 .bub .fizz circle { fill: #ffffff; opacity: .65; animation: sc-fizz 2.2s ease-in-out infinite alternate; }   /* 饮料里的小气泡，慢慢上下浮 */
.sc5 .bub .fizz circle:nth-child(2) { animation-delay: -.8s; }
.sc5 .bub .fizz circle:nth-child(3) { animation-delay: -1.5s; }
@keyframes sc-fizz { from { translate: 0 2px; } to { translate: 0 -3px; } }
.sc5 .bub .shine { fill: none; stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; opacity: .55; }
.sc5 .bub .base { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linecap: round; opacity: .5; }              /* 厚杯底 */
.sc5 .bub .ring { fill: none; stroke: var(--glass); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc5 .bub .rim { fill: color-mix(in srgb, var(--card) 70%, transparent); stroke: var(--glass); stroke-width: 1.6; }  /* 杯口 */
.sc5 .bub[data-v="0"] .ring, .sc5 .bub[data-v="0"] .rim { opacity: .55; }                                            /* 空杯子：淡一点 */
.sc5 .bub .spark { fill: #ffc94d; stroke: var(--card); stroke-width: 1.5; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.sc5 .bub .spark.fx { animation: sc-pop .4s .2s cubic-bezier(.2, 1.7, .4, 1) backwards; }
.sc5 .bub[data-act]:active { opacity: .8; }
.sc5 text { font-family: inherit; font-weight: 700; fill: var(--ink); }
.sc5 text.emo { font-size: 18px; }
.sc5 text.lb { font-size: 12.5px; }
.sc5 .bub[data-v="0"] text.emo { opacity: .45; filter: grayscale(1); }
.sc5 .bub[data-v="0"] text.lb { fill: var(--muted); }
.sc5 .sc-hold { animation: sc-pop .5s cubic-bezier(.2, 1.6, .4, 1); transform-origin: center; transform-box: fill-box; }
@keyframes sc-pop { from { scale: .4; } to { scale: 1; } }
.sc5 .sc-bigstar { fill: var(--bg); stroke: var(--line); stroke-width: 1.2; stroke-linejoin: round; }
.sc5 .sc-bigstar.got { fill: #ffc94d; stroke: #fff; }
.sc-tip { margin: 2px 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--bg); font-size: 13px; color: var(--ink); }
.sc-tip .is-hint { display: block; margin-top: 2px; color: var(--accent); font-size: 12.5px; }
.sc-say { margin: 4px 0 2px; text-align: center; font-size: 14px; font-weight: 700; }
.sc-say .star-step { display: block; font-weight: 500; }
.sc-say .star-step b { font-weight: 700; }
.sc-free { margin: 6px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
/* 还没点亮的泡泡慢慢飘着，各飘各的 */
.sc5 .bub[data-act][data-v="0"] { animation: bub-float 3.4s ease-in-out infinite alternate; }
.sc5 .bub:nth-of-type(2) { animation-delay: -1.1s; }
.sc5 .bub:nth-of-type(3) { animation-delay: -2.3s; }
.sc5 .bub:nth-of-type(4) { animation-delay: -.6s; }
.sc5 .bub:nth-of-type(5) { animation-delay: -1.8s; }
@keyframes bub-float { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sc5 .sc-hold, .sc5 .bub, .sc5 .bub .water.fx, .sc5 .bub .wave, .sc5 .bub .fizz circle, .sc5 .bub .spark.fx { animation: none; } }

/* ================= 今天页：走进来的那一下（只放一次） ================= */
.arrive .greet-text > * { animation: in-up .45s ease-out backwards; }
.arrive .greet-text > :nth-child(2) { animation-delay: .06s; }
.arrive .greet-text > :nth-child(n+3) { animation-delay: .12s; }
.arrive .strip-day { animation: in-pop .4s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.arrive .strip-day:nth-child(1) { animation-delay: .10s; } .arrive .strip-day:nth-child(2) { animation-delay: .14s; }
.arrive .strip-day:nth-child(3) { animation-delay: .18s; } .arrive .strip-day:nth-child(4) { animation-delay: .22s; }
.arrive .strip-day:nth-child(5) { animation-delay: .26s; } .arrive .strip-day:nth-child(6) { animation-delay: .30s; }
.arrive .strip-day:nth-child(7) { animation-delay: .34s; }
.arrive .record-main .card { animation: in-up .5s cubic-bezier(.2, .9, .3, 1) .3s backwards; }
.arrive .record-main .slot-reflect, .arrive .record-main .card.reflect { animation-delay: .4s; }
.arrive .record-main .slot-score { animation-delay: .5s; }
@keyframes in-up { from { transform: translateY(16px); opacity: 0; } }
@keyframes in-pop { from { transform: scale(.7); opacity: 0; } }

/* ================= 给爸爸打分（女儿这边）：漫画爸爸 ================= */
.dt-toon { display: block; width: 100%; max-width: 380px; margin: 0 auto 8px; }
.dt-say { font-size: 12.5px; font-weight: 800; fill: #3b3340; font-family: inherit; }
.dt-say-b { fill: #fff; stroke: #3b3340; stroke-width: 1.8; }
.dt-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dt-tile {
  display: grid; justify-items: center; align-content: start; gap: 3px; padding: 10px 4px 8px; border-radius: 18px;
  border: 2px dashed var(--line); background: var(--card); color: var(--ink); text-align: center;
  touch-action: manipulation; transition: background .15s, border-color .15s;
}
.dt-tile .dt-ic { font-size: 22px; line-height: 1.15; }
.dt-tile b { font-size: 13.5px; }
.dt-tile small { font-size: 11.5px; color: var(--muted); line-height: 1.3; min-height: 30px; }
.dt-tile:not([data-v="n"]) { border-style: solid; border-color: transparent; }
.dt-tile[data-v="2"] { background: var(--accent); color: var(--accent-ink); }
.dt-tile[data-v="2"] small { color: var(--accent-ink); opacity: .9; }
.dt-tile[data-v="1"] { background: var(--soft); }
.dt-tile[data-v="0"] { background: var(--zero); }
.dt-tile[data-v="0"] small { color: var(--ink); opacity: .75; }
.dt-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dt-sum { margin: 12px 0 0; text-align: center; font-size: 15.5px; font-weight: 800; }
.dt-sum b { color: var(--accent); font-size: 21px; }
.dt-sum small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
.dt-msg label { margin: 0; }
.dt-msg .reply-card { margin-top: 12px; }
.dt-foot { margin: 8px 0 0; }
.dt-change { margin-top: 10px; padding: 10px 14px; border-radius: 16px; border: 1.5px dashed var(--line); font-size: 14.5px; overflow-wrap: anywhere; }
.dt-change small { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.dt-weeks { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; overflow-x: auto; padding: 6px 0 2px; }
.dt-week { flex: none; width: 68px; display: grid; justify-items: center; border: 0; background: none; padding: 4px 0 6px; border-radius: 14px; color: var(--muted); font-size: 11.5px; }
.dt-week svg { width: 60px; height: 71px; }
.dt-week.sel { background: var(--soft); color: var(--accent); font-weight: 800; }
@media (max-width: 560px) { .dt-tiles { grid-template-columns: repeat(3, 1fr); } }

/* ================= 头像 ================= */
/* 有头像时，原来画主题色的那几个圆点（导航栏、右上角、面板里）改成铺照片 */
.av-row { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.av-pick { position: relative; flex: none; width: 72px; height: 72px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.av-big {
  display: block; width: 72px; height: 72px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 50%, var(--accent-2) 50% 100%);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line);
}
.av-cam {
  position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; background: var(--card); box-shadow: var(--shadow);
}
/* 圆圈是个按钮：点它打开相册 */
.av-pick:focus-visible { outline: none; }
.av-pick:focus-visible .av-big { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.av-side { display: grid; gap: 2px; justify-items: start; min-width: 0; color: var(--ink); }
.av-side b { font-size: 15px; }
.av-side .link { padding: 2px 0; }
/* 写在各个圆点自己的 background 后面（包括上面的 .av-big）：不然 background 简写会把“铺满”冲掉，只露出照片左上角 */
.me-swatch[data-av], .me-float[data-av], .theme-btn[data-av], .av-big[data-av] { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* 裁剪弹层：方框里拖照片，圆圈里的是头像，圈外压暗 */
.av-crop-mask { z-index: 40; }
.av-crop h3 { margin-bottom: 2px; }
.av-stage {
  position: relative; width: min(300px, 100%); margin: 12px auto; overflow: hidden; border-radius: 20px; background: #111;
  touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.av-stage:active { cursor: grabbing; }
.av-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.av-src { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
.av-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 999px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .9); }
.av-zoom { display: flex; align-items: center; gap: 10px; margin: 0 4px 16px; color: var(--muted); font-weight: 800; }
.av-zoom input { flex: 1; min-width: 0; height: 28px; margin: 0; padding: 0; border: 0; background: none; accent-color: var(--accent); }
.av-crop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 给爸爸打分页：回到周计划 */
.dad-back { display: inline-block; margin: 0 0 4px -4px; }
