/* MyRemind365 PWA — 颜色全部来自 app.js 里的配色，写在 :root 的 CSS 变量上 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px; line-height: 1.3; overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }
.nosel, .row, .card, .tabbar, .fab, .note-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ---------- 页面框架 ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.page {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 12px) 20px 150px;
}
.page-head { display: flex; align-items: flex-end; gap: 4px; }
.page-head .grow { flex: 1; min-width: 0; }
.kicker { font-size: 14px; color: var(--sub); }
.title { font-size: 32px; font-weight: 700; letter-spacing: -0.3px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subline { font-size: 14px; color: var(--sub); margin-top: 2px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 19px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.icon-btn.active { color: var(--accent); }

.section-label { font-size: 12px; letter-spacing: 1px; color: var(--sub); padding: 16px 4px 6px; }
.section-label.overdue { color: var(--overdue); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.compact .stack { gap: 4px; }

/* ---------- 行 ---------- */
.row {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 14px;
  background: var(--card); border-radius: 16px; position: relative;
  transition: transform .15s ease, opacity .2s;
}
.row:active { transform: scale(.985); }
button.row { text-align: left; }
.row.overdue { background: color-mix(in srgb, var(--overdue) 12%, var(--card)); }
.compact .row { min-height: 42px; padding: 4px 14px; }
.row .body { flex: 1; min-width: 0; }
.row .t { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 12px; color: var(--sub); margin-top: 2px; }
.row .s.overdue { color: var(--overdue); }
.compact .row .body { display: flex; align-items: baseline; gap: 6px; }
.compact .row .t { font-size: 15px; }
.compact .row .s { font-size: 11px; margin: 0; white-space: nowrap; }
.row.done .t { text-decoration: line-through; color: var(--struck); }
.row .days { font-size: 15px; font-weight: 700; min-width: 48px; text-align: right; white-space: nowrap; }
.pin-mark { color: var(--accent); font-size: 11px; margin-right: 4px; }

.check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--checkBorder); flex: none;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background .15s, border-color .15s;
}
.check svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.check.on { background: var(--done); border-color: var(--done); }
.check.on svg { opacity: 1; }
.compact .check { width: 20px; height: 20px; }
.check:active { transform: scale(.88); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill {
  height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 500; white-space: nowrap; flex: none;
}
.pill.filled { background: var(--accent); color: #fff; font-weight: 700; }
.chip-done {
  height: 36px; padding: 0 14px; border-radius: 18px; color: var(--done); font-size: 14px; font-weight: 500;
  background: color-mix(in srgb, var(--done) 12%, transparent); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.chip-done svg { width: 16px; height: 16px; }

/* ---------- 今日汇总卡 ---------- */
.hero {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-top: 14px;
  background: var(--heroBg); color: var(--heroText); border-radius: 24px;
}
.hero b { font-size: 18px; display: block; }
.hero span { font-size: 13px; color: var(--heroSub); }

.empty-card { color: var(--sub); }
.empty-card svg { color: var(--accent); }
.empty { text-align: center; color: var(--sub); font-size: 14px; padding: 40px 10px; }
.empty h3 { color: var(--ink); font-size: 17px; margin: 10px 0 6px; }

.activity { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.activity .body { flex: 1; min-width: 0; font-size: 14px; }
.activity .when { font-size: 12px; color: var(--sub); }
.like { height: 32px; padding: 0 12px; border-radius: 16px; color: var(--accent); background: var(--card); font-size: 13px; font-weight: 700; }
.like.on { background: var(--accent); color: #fff; }

/* ---------- 搜索 / 筛选 ---------- */
.search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin-top: 12px;
  background: var(--card); border-radius: 12px; color: var(--sub);
}
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 17px; background: var(--card); font-size: 14px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1.5px solid transparent;
}
.chip.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip .avatar { width: 22px; height: 22px; font-size: 11px; }

/* ---------- 记事 ---------- */
.note-card { display: flex; gap: 12px; padding: 14px; background: var(--card); border-radius: 16px; align-items: stretch; }
.compact .note-card { padding: 10px 14px; }
.note-card .bar { width: 4px; border-radius: 2px; background: var(--line); flex: none; }
.note-card .body { flex: 1; min-width: 0; }
.note-card .nt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-card .np { font-size: 14px; color: var(--sub); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.compact .note-card .np { -webkit-line-clamp: 1; }
.note-card .ns { font-size: 11px; color: var(--sub); opacity: .8; margin-top: 5px; }
.note-card .avatar { align-self: center; }

/* ---------- 底部导航 ---------- */
.tabbar {
  display: flex; padding: 8px 8px calc(env(safe-area-inset-bottom) + 6px); background: var(--tab);
  border-top: 1px solid var(--line); flex: none;
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--sub); font-size: 11px; min-height: 44px; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--accent); font-weight: 700; }
.tabbar button.on svg { stroke-width: 2.2; }

.fab { position: fixed; right: 20px; bottom: calc(env(safe-area-inset-bottom) + 80px); display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 5; }
.fab .mic { width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.fab .add { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.fab .add svg { width: 28px; height: 28px; stroke-width: 2; }
.fab button:active { transform: scale(.92); }

/* ---------- 弹出页（sheet） ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; background: var(--bg); border-radius: 14px 14px 0 0; max-height: calc(100% - env(safe-area-inset-top) - 10px);
  height: calc(100% - env(safe-area-inset-top) - 10px); display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); overflow: hidden;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; min-height: 52px; gap: 8px; }
.sheet-bar h2 { font-size: 17px; margin: 0; font-weight: 700; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-bar .side { min-width: 64px; display: flex; gap: 4px; align-items: center; }
.sheet-bar .side.r { justify-content: flex-end; }
.txt-btn { font-size: 16px; color: var(--sub); min-height: 44px; padding: 0 4px; }
.txt-btn.b { color: var(--accent); font-weight: 700; }
.txt-btn:disabled { color: var(--checkBorder); }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 20px calc(env(safe-area-inset-bottom) + 24px); -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 20px calc(env(safe-area-inset-bottom) + 12px); }

/* 行动菜单（长按） */
.action-sheet .sheet { height: auto; border-radius: 18px; margin: 0 10px calc(env(safe-area-inset-bottom) + 10px); background: none; }
.action-group { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.action-group .cap { font-size: 13px; color: var(--sub); text-align: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.action-group button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; font-size: 18px; color: var(--accent); border-bottom: 1px solid var(--line); }
.action-group button:last-child { border-bottom: 0; }
.action-group button.danger { color: #D92D20; }
.action-group button.cancel { font-weight: 700; }

/* ---------- 表单 ---------- */
.field-label { font-size: 12px; color: var(--sub); margin: 14px 4px 6px; }
.field {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 0 16px;
  background: var(--card); border-radius: 16px; margin-bottom: 12px;
}
.field input[type=date], .field input[type=time], .field input[type=datetime-local], .field select {
  border: 0; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 8px; padding: 6px 10px; font-size: 16px; outline: 0;
  -webkit-appearance: none; appearance: none; min-height: 34px; text-align: right;
}
.title-input { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 6px 0 16px; background: var(--card); border-radius: 16px; }
.title-input input { flex: 1; border: 0; outline: 0; background: none; font-size: 20px; font-weight: 500; min-width: 0; }
.mic-btn { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.mic-btn.on { background: var(--accent); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.hint { font-size: 13px; color: var(--sub); margin: 8px 4px 0; display: flex; align-items: center; gap: 6px; }
.hint button { color: var(--accent); font-weight: 600; font-size: 13px; }
.parse-chip { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); font-size: 14px; width: 100%; text-align: left; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: color-mix(in srgb, var(--ink) 16%, transparent); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.owner-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 8px; border-radius: 22px; background: var(--card); border: 2px solid transparent; flex: none; font-size: 15px; }
.primary { width: 100%; height: 52px; border-radius: 26px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; }
.primary:disabled { opacity: .4; }
.secondary { width: 100%; height: 48px; border-radius: 24px; border: 1px solid var(--accent); color: var(--accent); font-size: 16px; font-weight: 600; margin-top: 10px; }
.danger-btn { width: 100%; height: 48px; border-radius: 16px; background: var(--card); color: #D92D20; font-size: 16px; margin-top: 16px; }
.plain-input { width: 100%; border: 0; outline: 0; background: none; }
textarea.plain-input { resize: none; font-size: 17px; line-height: 1.45; min-height: 240px; }
.note-title { font-size: 22px; font-weight: 700; margin: 6px 0 4px; }
.colors { display: flex; gap: 12px; padding: 12px 2px; flex-wrap: wrap; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; outline: 2px solid transparent; outline-offset: 2px; }
.color-dot.on { outline-color: var(--ink); }
.color-dot.none { border-color: var(--checkBorder); background: var(--card); }

/* ---------- 详情 ---------- */
.detail-hero { background: var(--accent); color: var(--heroText); padding: 20px; border-radius: 28px; }
.detail-hero .dl { font-size: 14px; opacity: .92; }
.detail-hero h1 { font-size: 28px; margin: 2px 0 0; line-height: 1.2; word-break: break-word; }
.detail-hero .st { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 14px; font-size: 15px; }
.detail-hero .people { display: flex; }
.detail-hero .people .avatar { width: 30px; height: 30px; margin-left: -6px; box-shadow: 0 0 0 2px var(--accent); }
.week { display: flex; justify-content: space-between; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); }
.week i { width: 36px; height: 36px; border-radius: 12px; display: block; }
.week i.done { background: var(--accent); }
.week i.today { border: 2px solid var(--accent); }
.week i.future { border: 2px dashed var(--checkBorder); }
.week i.missed { background: var(--line); }
.box { background: var(--card); border-radius: 20px; padding: 16px; }
.msg { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.msg.mine { justify-content: flex-end; }
.msg p { margin: 0; padding: 8px 12px; border-radius: 16px; background: var(--card); font-size: 14px; max-width: 75%; word-break: break-word; }
.msg.mine p { background: var(--accent); color: #fff; }
.msg-bar { display: flex; gap: 10px; padding: 10px 20px calc(env(safe-area-inset-bottom) + 10px); background: var(--bg); border-top: 1px solid var(--line); }
.msg-bar input { flex: 1; height: 44px; border-radius: 22px; border: 0; background: var(--card); padding: 0 16px; outline: 0; font-size: 15px; min-width: 0; }
.send { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.add-sub { display: flex; align-items: center; gap: 12px; }
.add-sub input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; min-width: 0; }

/* ---------- 设置 ---------- */
.group { background: var(--card); border-radius: 16px; overflow: hidden; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 16px; text-align: left; position: relative; }
.set-row + .set-row::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; height: 1px; background: var(--line); }
.set-row > svg { color: var(--accent); width: 20px; height: 20px; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .grow small { display: block; color: var(--sub); font-size: 12px; margin-top: 2px; }
.set-row .detail { color: var(--sub); font-size: 15px; }
.set-row .chev { color: var(--checkBorder); width: 16px; height: 16px; }
.foot-note { font-size: 12px; color: var(--sub); padding: 6px 4px 0; line-height: 1.45; }
.seg { display: flex; background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 10px; padding: 2px; }
.seg button { flex: 1; height: 34px; border-radius: 8px; font-size: 14px; }
.seg button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.palette-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.palette { border-radius: 16px; padding: 12px; text-align: left; border: 2px solid transparent; }
.palette.on { border-color: var(--accent); }
.palette .sw { display: flex; gap: 6px; margin-bottom: 10px; }
.palette .sw i { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.palette b { font-size: 15px; }
.status-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; text-align: left; position: relative; }
.status-row + .status-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.status-row .sw { display: flex; gap: 4px; }
.status-row .sw i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.status-row .grow { flex: 1; }
.tick { color: var(--accent); }
.install-card { background: var(--heroBg); color: var(--heroText); border-radius: 20px; padding: 16px 18px; margin-top: 16px; }
.install-card b { display: block; font-size: 16px; margin-bottom: 4px; }
.install-card p { margin: 0; font-size: 13px; color: var(--heroSub); line-height: 1.5; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translateX(-50%); z-index: 50;
  background: var(--heroBg); color: var(--heroText); padding: 10px 16px; border-radius: 20px; font-size: 14px; font-weight: 500;
  max-width: 88vw; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.undo-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 15;
  background: var(--heroBg); color: var(--heroText); border-radius: 16px; padding: 0 8px 0 16px; height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
  animation: rise .25s ease;
}
.undo-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo-bar button { color: var(--heroText); font-weight: 700; padding: 0 12px; height: 40px; background: rgba(255,255,255,.14); border-radius: 12px; flex: none; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.inline-select { border: none; background: transparent; color: var(--sub); font-size: 15px; text-align: right; padding: 4px 0; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* ---------- 连不上服务器（登录后不显示可能过期的数据） ---------- */
#net-gate {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#net-gate .net-box { width: 100%; max-width: 320px; text-align: center; }
#net-gate p { font-size: 16px; line-height: 1.5; margin: 0 0 18px; color: var(--ink); }
#net-gate .net-spin {
  width: 28px; height: 28px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line, rgba(0,0,0,.12)); border-top-color: var(--accent); animation: netspin .8s linear infinite;
}
@keyframes netspin { to { transform: rotate(360deg); } }

/* =========================================================
 * 主题：A 纸笺 paper（默认）/ B 软糖 pop / C 晨光 glow / D 极简 minimal（= 上面的基础样式）
 * 颜色由 app.js 的 THEMES 写到 :root；这里只放每个主题的形状、字体、质感
 * ========================================================= */
.hero .cal, .hero .hero-bar { display: none; }
.hero-txt { min-width: 0; }
.days .dp, .days .du { font-weight: inherit; }
.empty-art { padding: 36px 16px 20px; }
.empty-art svg { width: 120px; height: 104px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.empty-art svg .ea-fill { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.empty-art p { margin: 0 auto; max-width: 280px; line-height: 1.55; }
.empty-art .secondary { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; }
.empty-art .secondary svg { width: 18px; height: 18px; }

/* 主题选择卡片 */
.theme-list { display: flex; flex-direction: column; gap: 12px; }
.theme-card { display: block; width: 100%; text-align: left; border-radius: 20px; padding: 14px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.theme-card.on { border-color: var(--tc-accent); box-shadow: none; }
.tc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.tc-title { font-size: 18px; }
.tc-desc { font-size: 12px; flex: 1; }
.tc-tick { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.tc-tick svg { width: 14px; height: 14px; stroke-width: 3; }
.tc-row { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 12px; margin-top: 6px; font-size: 14px; }
.tc-check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid; flex: none; }
.tc-t { flex: 1; }
.tc-d { font-weight: 700; font-size: 13px; }
.theme-card[data-t=paper] { background-image: radial-gradient(rgba(120,90,60,.08) .6px, transparent .7px) !important; background-size: 6px 6px !important; }
.theme-card[data-t=paper] .tc-title, .theme-card[data-t=paper] .tc-d { font-family: "New York", ui-serif, "Songti SC", Georgia, serif; }
.theme-card[data-t=paper] .tc-row { border-radius: 4px; margin-top: 0; border-bottom: 1px dashed rgba(150,120,90,.25); }
.theme-card[data-t=paper] .tc-check { border-radius: 5px; }
.theme-card[data-t=pop] { font-family: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC", sans-serif; }
.theme-card[data-t=pop] .tc-title { font-weight: 800; }
.theme-card[data-t=pop] .tc-row { border-radius: 16px; }
.theme-card[data-t=pop] .tc-check { border-radius: 6px; }
.theme-card[data-t=pop] .tc-d { padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); }
.theme-card[data-t=glow] { background-image: radial-gradient(70% 60% at 0% 0%, rgba(120,180,255,.35), transparent 70%), radial-gradient(60% 60% at 100% 20%, rgba(255,170,140,.3), transparent 70%), radial-gradient(60% 60% at 70% 100%, rgba(170,140,255,.3), transparent 70%) !important; }
.theme-card[data-t=glow] .tc-title { font-weight: 300; font-size: 20px; }
.theme-card[data-t=glow] .tc-row { opacity: .92; border-radius: 14px; }
.theme-card[data-t=glow] .tc-d { font-weight: 300; font-size: 17px; }

/* 完成动画（所有主题） */
@keyframes check-pop { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes title-fade { from { opacity: .3; transform: translateX(6px); } }
.row.celebrate .check { animation: check-pop .45s cubic-bezier(.3,1.6,.5,1); }
.row.celebrate .t { animation: title-fade .5s ease; }
@media (prefers-reduced-motion: reduce) { .row.celebrate .check, .row.celebrate .t { animation: none; } }

/* ---------- A 纸笺 ---------- */
[data-theme=paper] { --serif: "New York", ui-serif, "Songti SC", "STSong", Georgia, serif; }
[data-theme=paper] body { background-image: radial-gradient(color-mix(in srgb, var(--ink) 6%, transparent) .6px, transparent .7px); background-size: 6px 6px; }
[data-theme=paper] .title { font-family: var(--serif); font-weight: 600; letter-spacing: .5px; }
[data-theme=paper] .kicker { font-family: var(--serif); font-style: italic; letter-spacing: .3px; }
[data-theme=paper] .section-label { font-family: var(--serif); font-size: 14px; letter-spacing: 2px; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 20px 2px 8px; }
[data-theme=paper] .section-label::after { content: ""; flex: 1; border-top: 1px dashed var(--checkBorder); }
[data-theme=paper] .section-label.overdue { color: var(--overdue); }
[data-theme=paper] .stack { gap: 0; background: var(--card); border-radius: 18px; box-shadow: 0 1px 0 var(--line), 0 8px 24px -14px rgba(90,60,30,.28); overflow: hidden; }
[data-theme=paper][data-dark="1"] .stack, [data-theme=paper][data-dark="1"] .hero { box-shadow: 0 0 0 1px var(--line); }
[data-theme=paper] .stack > .row, [data-theme=paper] .stack > .note-card { background: none; border-radius: 0; box-shadow: none; }
[data-theme=paper] .stack > .row + .row, [data-theme=paper] .stack > .note-card + .note-card { border-top: 1px dashed var(--line); }
[data-theme=paper] .stack > .row.overdue { background: color-mix(in srgb, var(--overdue) 7%, transparent); }
[data-theme=paper] .row:active { transform: none; background: color-mix(in srgb, var(--ink) 4%, transparent); }
[data-theme=paper] .row .days, [data-theme=paper] .note-card .nt, [data-theme=paper] .note-title, [data-theme=paper] .sheet-bar h2, [data-theme=paper] .detail-hero h1 { font-family: var(--serif); }
[data-theme=paper] .row .days { font-weight: 600; }
[data-theme=paper] .check { border-width: 1.6px; border-radius: 9px; width: 24px; height: 24px; }
[data-theme=paper] .check.on { transform: rotate(-4deg); }
[data-theme=paper] .row.celebrate .check { animation: stamp .5s cubic-bezier(.3,1.4,.5,1); }
@keyframes stamp { 0% { transform: scale(1.7) rotate(-18deg); opacity: 0; } 60% { transform: scale(.92) rotate(-2deg); opacity: 1; } 100% { transform: rotate(-4deg); } }
[data-theme=paper] .compact .check { width: 20px; height: 20px; border-radius: 7px; }
[data-theme=paper] .chip-done { background: none; border: 1px solid var(--line); color: var(--sub); }
[data-theme=paper] .pill { border-radius: 10px; border-color: var(--checkBorder); color: var(--ink); }
[data-theme=paper] .pill.filled { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme=paper] .hero { background: var(--card); color: var(--ink); border-radius: 20px; box-shadow: 0 1px 0 var(--line), 0 10px 28px -16px rgba(90,60,30,.32); padding: 0; overflow: hidden; gap: 0; }
[data-theme=paper] .hero svg { display: none; }
[data-theme=paper] .hero .cal { width: 92px; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px dashed var(--line); padding: 12px 0; flex: none; }
[data-theme=paper] .hero .cal .m { background: var(--accent); color: #fff; font-size: 11px; letter-spacing: 1px; padding: 2px 10px; border-radius: 6px; }
[data-theme=paper] .hero .cal .d { font-family: var(--serif); font-size: 44px; font-weight: 600; line-height: 1; margin-top: 6px; color: var(--ink); }
[data-theme=paper] .hero .cal .w { font-size: 11px; color: var(--sub); margin-top: 3px; }
[data-theme=paper] .hero-txt { padding: 16px 18px; flex: 1; }
[data-theme=paper] .hero b { font-family: var(--serif); font-size: 19px; }
[data-theme=paper] .hero-txt > span { color: var(--sub); }
[data-theme=paper] .hero .hero-bar { display: block; height: 6px; border-radius: 3px; background: var(--ringTrack); margin-top: 10px; overflow: hidden; }
[data-theme=paper] .hero .hero-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .6s ease; }
[data-theme=paper] .hero.all-done .hero-bar i { background: var(--done); }
[data-theme=paper] .tabbar { background: color-mix(in srgb, var(--bg) 94%, transparent); }
[data-theme=paper] .tabbar button { position: relative; }
[data-theme=paper] .tabbar button.on span { font-family: var(--serif); }
[data-theme=paper] .tabbar button.on::after { content: ""; position: absolute; bottom: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
[data-theme=paper] .fab .add { border-radius: 20px; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
[data-theme=paper] .fab .mic { border-radius: 14px; box-shadow: 0 1px 0 var(--line), 0 4px 12px -6px rgba(90,60,30,.3); }
[data-theme=paper] .group { box-shadow: 0 1px 0 var(--line); }
[data-theme=paper] .empty-art h3 { font-family: var(--serif); font-size: 19px; }
[data-theme=paper] .detail-hero { border-radius: 20px; }

/* ---------- B 软糖 ---------- */
[data-theme=pop] { --g1: #FF9A76; --g2: #FF6F91; --g3: #A77BFF; }
[data-theme=pop][data-dark="1"] { --g1: #E8735A; --g2: #D9507A; --g3: #8A5FE0; }
[data-theme=pop] body { font-family: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC", sans-serif;
  background-image: radial-gradient(60% 40% at 100% 0%, color-mix(in srgb, var(--g2) 18%, transparent), transparent), radial-gradient(50% 35% at 0% 10%, color-mix(in srgb, var(--g1) 16%, transparent), transparent); }
[data-theme=pop] .title { font-weight: 800; }
[data-theme=pop] .kicker { font-weight: 600; color: var(--accent); }
[data-theme=pop] .section-label { font-size: 13px; font-weight: 700; letter-spacing: .3px; padding: 18px 6px 8px; }
[data-theme=pop] .stack { gap: 10px; }
[data-theme=pop] .compact .stack { gap: 6px; }
[data-theme=pop] .row, [data-theme=pop] .note-card { border-radius: 22px; box-shadow: 0 6px 18px -10px rgba(120,60,90,.28); }
[data-theme=pop][data-dark="1"] .row, [data-theme=pop][data-dark="1"] .note-card { box-shadow: none; }
[data-theme=pop] .compact .row { border-radius: 16px; }
[data-theme=pop] .row.overdue { background: var(--card); box-shadow: 0 6px 18px -10px rgba(120,60,90,.28), inset 4px 0 0 var(--overdue); }
[data-theme=pop][data-dark="1"] .row.overdue { box-shadow: inset 4px 0 0 var(--overdue); }
[data-theme=pop] .row .t { font-weight: 700; }
[data-theme=pop] .row .days { font-size: 13px; font-weight: 800; min-width: 0; padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); }
[data-theme=pop] .check { width: 28px; height: 28px; border-width: 2.5px; border-radius: 10px; }
[data-theme=pop] .compact .check { width: 22px; height: 22px; border-radius: 8px; }
[data-theme=pop] .check.on { background: linear-gradient(135deg, #4BD6A0, #2BB58A); border-color: transparent; box-shadow: 0 4px 10px -3px rgba(43,181,138,.6); }
[data-theme=pop] .chip-done { border-radius: 99px; font-weight: 700; background: var(--card); box-shadow: 0 4px 12px -6px rgba(120,60,90,.3); }
[data-theme=pop] .pill { border: 0; background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 700; }
[data-theme=pop] .pill.filled { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; }
[data-theme=pop] .hero { background: linear-gradient(135deg, var(--g1), var(--g2) 55%, var(--g3)); color: #fff; border-radius: 28px; padding: 18px 20px; box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--g2) 70%, transparent); position: relative; overflow: hidden; }
[data-theme=pop] .hero::after { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.14); pointer-events: none; }
[data-theme=pop] .hero b { font-size: 22px; font-weight: 800; }
[data-theme=pop] .hero-txt > span { color: rgba(255,255,255,.88); }
[data-theme=pop] .hero.all-done b::after { content: " 🎉"; }
[data-theme=pop] .tabbar, [data-theme=glow] .tabbar { position: fixed; z-index: 6; bottom: calc(max(env(safe-area-inset-bottom), 12px) + 2px); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
[data-theme=pop] .tabbar { left: 14px; right: 14px; border: 0; border-radius: 28px; padding: 6px; background: color-mix(in srgb, var(--tab) 96%, transparent); box-shadow: 0 12px 30px -12px rgba(90,40,70,.35); }
[data-theme=pop] .tabbar button { font-weight: 600; border-radius: 22px; padding: 4px 0; }
[data-theme=pop] .tabbar button.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
[data-theme=pop] .page, [data-theme=glow] .page { padding-bottom: 190px; }
[data-theme=pop] .fab, [data-theme=glow] .fab { bottom: calc(max(env(safe-area-inset-bottom), 12px) + 88px); }
[data-theme=pop] .undo-bar, [data-theme=glow] .undo-bar { bottom: calc(max(env(safe-area-inset-bottom), 12px) + 84px); }
[data-theme=pop] .fab .add { background: linear-gradient(135deg, var(--g1), var(--g2)); border-radius: 22px; width: 60px; height: 60px; }
[data-theme=pop] .fab .mic { border-radius: 16px; }
[data-theme=pop] .activity { background: var(--card); border-radius: 18px; padding: 10px 12px; margin-bottom: 8px; }
[data-theme=pop] .like { background: color-mix(in srgb, var(--accent) 12%, transparent); }
[data-theme=pop] .note-card .bar { width: 8px; border-radius: 4px; }
[data-theme=pop] .group, [data-theme=pop] .field, [data-theme=pop] .title-input { border-radius: 20px; }
[data-theme=pop] .primary { background: linear-gradient(135deg, var(--g1), var(--g2)); }
[data-theme=pop] .detail-hero { background: linear-gradient(135deg, var(--g1), var(--g2) 55%, var(--g3)); color: #fff; }
[data-theme=pop] .empty-art h3 { font-weight: 800; }
.confetti { position: absolute; width: 7px; height: 7px; border-radius: 2px; pointer-events: none; z-index: 2; margin: -3.5px 0 0 -3.5px; animation: confetti .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes confetti { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 24px)) rotate(var(--r)); opacity: 0; } }

/* ---------- C 晨光 ---------- */
[data-theme=glow] { --a1: #BFE3FF; --a2: #FFD9C7; --a3: #D7F5E6; --a4: #E5DBFF; --glass-edge: rgba(255,255,255,.6); }
[data-theme=glow][data-dark="1"] { --a1: #1D3A6B; --a2: #4A2440; --a3: #123F3A; --a4: #2D2560; --glass-edge: rgba(255,255,255,.08); }
[data-theme=glow] body { background-image: radial-gradient(70% 45% at 10% 0%, var(--a1), transparent 70%), radial-gradient(60% 40% at 95% 12%, var(--a2), transparent 70%), radial-gradient(70% 45% at 80% 85%, var(--a4), transparent 70%), radial-gradient(60% 40% at 0% 70%, var(--a3), transparent 70%); }
[data-theme=glow] .title { font-weight: 300; font-size: 34px; letter-spacing: -.5px; }
[data-theme=glow] .kicker { font-size: 13px; letter-spacing: .5px; font-weight: 600; }
[data-theme=glow] .section-label { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; padding: 20px 6px 8px; }
[data-theme=glow] .row, [data-theme=glow] .hero, [data-theme=glow] .note-card, [data-theme=glow] .chip-done, [data-theme=glow] .fab .mic, [data-theme=glow] .activity, [data-theme=glow] .group, [data-theme=glow] .search, [data-theme=glow] .chip {
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: inset 0 0 0 1px var(--glass-edge); }
[data-theme=glow] .row { border-radius: 20px; min-height: 64px; }
[data-theme=glow] .compact .row { min-height: 44px; border-radius: 14px; }
[data-theme=glow] .row.overdue { background: color-mix(in srgb, var(--overdue) 12%, var(--card)); }
[data-theme=glow] .row .t { font-weight: 600; }
[data-theme=glow] .row .days { font-size: 15px; font-weight: 600; min-width: 56px; line-height: 1; }
[data-theme=glow] .row .days .dn { font-size: 28px; font-weight: 200; letter-spacing: -1px; }
[data-theme=glow] .compact .row .days .dn { font-size: 20px; }
[data-theme=glow] .row .days .dp, [data-theme=glow] .row .days .du { font-size: 11px; font-weight: 500; }
[data-theme=glow] .check { border-width: 1.5px; }
[data-theme=glow] .check.on { box-shadow: 0 0 0 4px color-mix(in srgb, var(--done) 20%, transparent); }
[data-theme=glow] .row.celebrate { animation: glow-ring .9s ease-out; }
@keyframes glow-ring { 0% { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 0 color-mix(in srgb, var(--done) 55%, transparent); } 100% { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 16px transparent; } }
[data-theme=glow] .chip-done { border-radius: 99px; }
[data-theme=glow] .hero { background: var(--card); color: var(--ink); border-radius: 26px; padding: 18px 20px; }
[data-theme=glow] .hero b { font-size: 20px; font-weight: 600; }
[data-theme=glow] .hero-txt > span { color: var(--sub); }
[data-theme=glow] .tabbar { left: 24px; right: 24px; border: 0; border-radius: 30px; padding: 6px; background: var(--tab); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 10px 30px -10px rgba(20,40,80,.28); }
[data-theme=glow] .tabbar button { min-height: 46px; justify-content: center; border-radius: 24px; gap: 0; }
[data-theme=glow] .tabbar button span { display: none; }
[data-theme=glow] .tabbar button.on { background: var(--accent); color: #fff; }
[data-theme=glow][data-dark="1"] .tabbar button.on { color: #0B1220; }
[data-theme=glow] .fab .add { background: var(--ink); color: var(--bg); box-shadow: 0 10px 24px -8px rgba(0,0,0,.4); }
[data-theme=glow] .activity { border-radius: 18px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
[data-theme=glow] .note-card { border-radius: 20px; }
[data-theme=glow] .action-group { background: var(--cardSolid); }
[data-theme=glow] .sheet .field, [data-theme=glow] .sheet .title-input, [data-theme=glow] .sheet .group, [data-theme=glow] .sheet .box { background: var(--cardSolid); }
[data-theme=glow] .empty-art h3 { font-weight: 400; font-size: 20px; }

/* ---------- E 时间线：一整块底色，事项挂在一条竖线上，不分格子 ---------- */
[data-theme=line] .title { font-weight: 600; }
[data-theme=line] .section-label { font-size: 14px; letter-spacing: .5px; padding: 14px 0 4px 42px; position: relative; }
[data-theme=line] .stack { gap: 0; position: relative; }
[data-theme=line] .stack > .row, [data-theme=line] .stack > .note-card { background: none; border-radius: 0; box-shadow: none; min-height: 48px; padding: 6px 0 6px 0; gap: 16px; position: relative; }
[data-theme=line] .compact .stack > .row { min-height: 40px; padding: 2px 0; }
/* 竖线：每一行画一段，接在分组标题之间也画上，看起来是一条线 */
[data-theme=line] .stack > .row::before, [data-theme=line] .stack > .note-card::before, [data-theme=line] .stack + .section-label::before {
  content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--line); }
[data-theme=line] .stack > :first-child::before { top: 50%; }
[data-theme=line] .stack:last-child > :last-child::before, [data-theme=line] .stack:not(:has(+ .section-label)) > :last-child::before { bottom: 50%; }
[data-theme=line] .stack > :only-child::before { display: none; }
[data-theme=line] .stack:has(+ .section-label) > :last-child::before { bottom: 0; }
[data-theme=line] .stack + .section-label:has(+ .stack) ~ * { }
[data-theme=line] .row.overdue { background: none; }
[data-theme=line] .row:active { transform: none; opacity: .7; }
[data-theme=line] .row .body { display: flex; align-items: baseline; gap: 10px; }
[data-theme=line] .row .t { font-size: 17px; font-weight: 400; flex: 0 1 auto; min-width: 0; }
[data-theme=line] .row .s { font-size: 14px; margin: 0; white-space: nowrap; flex: none; }
[data-theme=line] .row .days { font-size: 17px; font-weight: 700; }
[data-theme=line] .row .days .du, [data-theme=line] .row .days .dp { font-weight: 500; }
[data-theme=line] .row .avatar { width: 22px !important; height: 22px !important; font-size: 11px !important; }
/* 勾选按钮画成线上的圆点（左 1/3 点击完成的逻辑不变） */
[data-theme=line] .check { width: 26px; height: 26px; border: 0 !important; background: none; position: relative; z-index: 1; }
[data-theme=line] .check::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--u, var(--checkBorder)); box-shadow: 0 0 0 4px var(--bg); transition: transform .2s; }
[data-theme=line] .row.overdue .check::before { background: var(--overdue); }
[data-theme=line] .check svg { position: relative; z-index: 1; width: 11px; height: 11px; color: var(--bg); }
[data-theme=line] .check.on::before { background: var(--done); inset: 3px; }
[data-theme=line] .compact .check { width: 26px; height: 26px; }
[data-theme=line] .row.done .t { color: var(--struck); }
[data-theme=line] .row.celebrate .check::before { animation: dot-pulse .6s ease-out; }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 4px var(--bg), 0 0 0 4px color-mix(in srgb, var(--done) 60%, transparent); } 100% { box-shadow: 0 0 0 4px var(--bg), 0 0 0 16px transparent; } }
[data-theme=line] .stack > .row > span:first-child { position: relative; z-index: 1; background: var(--bg); border-radius: 50%; }
[data-theme=line] .note-card .bar { width: 12px; height: 12px; border-radius: 50%; align-self: center; margin: 0 7px; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--bg); background: var(--checkBorder); }
[data-theme=line] .note-card .body { padding: 4px 0; }
[data-theme=line] .note-card .nt { font-weight: 500; }
[data-theme=line] .pill { height: 28px; border-color: var(--line); color: var(--sub); }
[data-theme=line] .pill.filled { background: var(--accent); border-color: var(--accent); color: var(--bg); }
[data-theme=line] .chip-done { background: none; border: 1px solid var(--line); color: var(--sub); }
[data-theme=line] .hero { background: var(--card); color: var(--ink); border-radius: 22px; }
[data-theme=line] .hero-txt > span { color: var(--sub); }
[data-theme=line] .tabbar { border-top-color: var(--line); }
[data-theme=line] .fab .add { color: var(--bg); }
[data-theme=line] .activity { padding-left: 0; }
.theme-card[data-t=line] .tc-row { background: none !important; margin-top: 0; height: 34px; position: relative; padding-left: 4px; }
.theme-card[data-t=line] .tc-row::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: currentColor; opacity: .15; }
.theme-card[data-t=line] .tc-check { border: 0 !important; width: 16px; height: 16px; background: currentColor !important; opacity: .45; position: relative; z-index: 1; }
.theme-card[data-t=line] .tc-d { font-size: 14px; }
[data-theme=line] .stack + .section-label + .stack > :first-child::before { top: 0; }
[data-theme=line] .stack + .section-label + .stack > :only-child::before { display: block; bottom: 50%; }
[data-theme=line] .stack + .section-label + .stack:has(+ .section-label) > :only-child::before { bottom: 0; }
[data-theme=line] .stack + .section-label:not(:has(+ .stack))::before { display: none; }
/* iOS Safari 只把「看起来可点」的元素的点按当作 click 发出去；行是 div，点击由 document 统一处理，所以标成可点 */
.row, .note-card, [data-open], [data-menu] { cursor: pointer; touch-action: manipulation; }
/* 时间线：圆点的点击区域放大，并盖在竖线之上 */
[data-theme=line] .stack > .row > .check { width: 34px; height: 34px; margin: -4px -4px -4px -4px; z-index: 2; }
[data-theme=line] .stack > .row > .check::before { inset: 9px; }
[data-theme=line] .stack > .row > .check.on::before { inset: 7px; }
[data-theme=line] .stack > .row::before, [data-theme=line] .stack + .section-label::before { pointer-events: none; }

/* 清单页右上角「成员动态」按钮：有新动态时一个小圆点 */
.act-btn { position: relative; }
.act-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--overdue); box-shadow: 0 0 0 2px var(--bg); }
.activity-list .activity { padding: 10px 2px; }
.activity-list .activity + .activity { border-top: 1px solid var(--line); }
.section-label.today { color: var(--accent); font-weight: 700; }
[data-theme=pop] .activity-list .activity, [data-theme=glow] .activity-list .activity { border-top: 0; }
/* 首页（清单）顶部：问候和日期一行，右边是动态 / 搜索 / 筛选按钮；大标题单独一行 */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px -8px 0 0; }
.home-head .kicker { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-head .btns { display: flex; flex: none; }
.home-head + .title { margin-top: 2px; }

/* ---------- 成员聊天 ---------- */
.chat-box { background: var(--card); border-radius: 18px; padding: 12px 12px 10px; }
.chat-more { display: block; margin: 0 auto 8px; font-size: 13px; color: var(--accent); padding: 4px 10px; }
.chat-day { text-align: center; font-size: 11px; color: var(--sub); margin: 10px 0 6px; }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; margin: 6px 0; }
.chat-msg.mine { justify-content: flex-end; }
.chat-msg .avatar { flex: none; margin-bottom: 16px; }
.chat-col { display: flex; flex-direction: column; align-items: flex-start; max-width: 76%; min-width: 0; }
.chat-msg.mine .chat-col { align-items: flex-end; }
.chat-name { font-size: 11px; color: var(--sub); margin: 0 0 2px 4px; }
.chat-bubble { padding: 8px 12px; border-radius: 18px 18px 18px 6px; background: color-mix(in srgb, var(--ink) 7%, var(--card)); font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.chat-msg.mine .chat-bubble { background: var(--accent); color: #fff; border-radius: 18px 18px 6px 18px; }
.chat-time { font-size: 10px; color: var(--sub); margin: 2px 6px 0; }
.chat-bar { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.chat-bar input { flex: 1; min-width: 0; height: 42px; border-radius: 21px; border: 0; outline: 0; padding: 0 16px; font-size: 16px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.chat-bar .send { width: 42px; height: 42px; }
.tabbar button { position: relative; }
.tab-dot { position: absolute; top: 2px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--overdue); box-shadow: 0 0 0 2px var(--tab); }
[data-theme=pop] .chat-msg.mine .chat-bubble { background: linear-gradient(135deg, var(--g1), var(--g2)); }
[data-theme=paper] .chat-box { box-shadow: 0 1px 0 var(--line), 0 8px 24px -14px rgba(90,60,30,.28); }
[data-theme=glow] .chat-box { -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: inset 0 0 0 1px var(--glass-edge); }
[data-theme=glow][data-dark="1"] .chat-msg.mine .chat-bubble, [data-theme=line][data-dark="1"] .chat-msg.mine .chat-bubble { color: var(--bg); }
[data-theme=line] .chat-box { background: none; padding: 4px 0; }
[data-theme=line] .section-label:has(+ .chat-box) { padding-left: 2px; }
.chat-note { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: var(--sub); padding: 0 4px 4px; text-align: center; }
.chat-note svg { width: 13px; height: 13px; flex: none; }
