/* ═══════════════════════════════════════════
   不抽了 · styles
   暖纸质感 / 杂志编辑感 / 克制
   ═══════════════════════════════════════════ */

:root {
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --r: 20px;
  --r-sm: 14px;
  --r-xs: 10px;
  --maxw: 520px;
  --tabs: 74px;
}

html[data-theme="light"] {
  --bg: #F7F3EB;
  --bg-grad: radial-gradient(120% 70% at 50% 0%, #FDF9F2 0%, #F7F3EB 55%, #F2ECE1 100%);
  --card: #FFFDFA;
  --card-2: #FBF7F0;
  --ink: #1C1815;
  --ink2: #6E655D;
  --ink3: #A79C91;
  --line: #E7DDD0;
  --line-2: #F0E8DC;
  --accent: #B75B22;
  --accent-2: #D98A4F;
  --accent-soft: #F7E8D9;
  --accent-ink: #8E4416;
  --green: #4C6B55;
  --green-soft: #E4EBE3;
  --danger: #A33A2A;
  --danger-soft: #F6E3DE;
  --shadow: 0 1px 2px rgba(74,48,24,.04), 0 12px 32px rgba(74,48,24,.07);
  --shadow-lg: 0 2px 4px rgba(74,48,24,.05), 0 20px 50px rgba(74,48,24,.12);
}

html[data-theme="dark"] {
  --bg: #131110;
  --bg-grad: radial-gradient(120% 70% at 50% 0%, #1D1815 0%, #131110 55%, #100E0D 100%);
  --card: #1E1A17;
  --card-2: #262120;
  --ink: #F1E9DD;
  --ink2: #A0958A;
  --ink3: #6B625A;
  --line: #322B26;
  --line-2: #272220;
  --accent: #E08A4C;
  --accent-2: #C97A42;
  --accent-soft: #3B2A1C;
  --accent-ink: #F0A468;
  --green: #86AE93;
  --green-soft: #23302A;
  --danger: #E0785F;
  --danger-soft: #3A241F;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 20px 50px rgba(0,0,0,.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }

.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ── 顶栏 ───────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 16px) 20px 12px;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  background: linear-gradient(to bottom, var(--bg) 62%, transparent);
}
.brand { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-size: 21px; font-weight: 700; letter-spacing: .06em;
}
.brand-day {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.top-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink2);
  transition: background .16s, color .16s, transform .12s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:active { transform: scale(.9); background: var(--line-2); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

/* ── 主区 ───────────────────────────────── */
.main {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 20px calc(var(--tabs) + env(safe-area-inset-bottom) + 28px);
}
.view { display: none; animation: viewIn .34s cubic-bezier(.22,.9,.28,1) both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* ── 现在 · Hero ────────────────────────── */
.hero { padding: 22px 0 4px; text-align: center; }
.hero-label {
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink3);
}
.hero-label #startLabel { color: var(--ink2); }
.hero-clock {
  margin: 14px 0 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.clock-main {
  font-size: clamp(52px, 16.5vw, 82px);
  font-weight: 800; letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  background: linear-gradient(178deg, var(--ink) 32%, var(--accent) 128%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.clock-main.long { font-size: clamp(34px, 10.8vw, 60px); letter-spacing: -.045em; }
.clock-sub {
  font-size: 15px; font-weight: 700; letter-spacing: .12em;
  color: var(--ink3); font-variant-numeric: tabular-nums;
}
.hero-note {
  font-size: 13px; color: var(--ink2); line-height: 1.6;
  max-width: 300px; margin: 0 auto;
}

/* ── 三格统计 ───────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 15px 4px 14px; text-align: center;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 21px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink);
  line-height: 1.2;
}
.stat-num small { font-size: 12px; font-weight: 700; color: var(--ink3); margin-left: 1px; }
.stat-cap { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: var(--ink3); margin-top: 5px; }

/* ── 大按钮 ─────────────────────────────── */
.urge-btn {
  display: block; width: 100%;
  padding: 20px 18px;
  border-radius: var(--r);
  background: linear-gradient(168deg, var(--accent-2), var(--accent) 62%);
  color: #FFF8F1;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset,
              0 10px 26px color-mix(in srgb, var(--accent) 34%, transparent);
  text-align: center;
  transition: transform .13s cubic-bezier(.3,1.5,.6,1), box-shadow .2s;
}
.urge-btn:active {
  transform: scale(.975);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 5px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.urge-btn-main { display: block; font-size: 20px; font-weight: 800; letter-spacing: .1em; }
.urge-btn-sub { display: block; font-size: 12px; font-weight: 600; opacity: .8; margin-top: 5px; letter-spacing: .04em; }

.won-line {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 18px 0 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink2);
}
.won-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px var(--green-soft);
}

/* ── 通用块 ─────────────────────────────── */
.block { margin-top: 30px; }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 13px;
}
.block-head h2 {
  font-family: var(--serif);
  font-size: 16px; font-weight: 700; letter-spacing: .03em;
}
.link-btn {
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  padding: 3px 2px; letter-spacing: .02em;
}
.link-btn:active { opacity: .55; }
.prose { font-size: 13.5px; color: var(--ink2); line-height: 1.78; }
.prose b { color: var(--ink); font-weight: 700; }
.prose em { font-style: normal; color: var(--accent-ink); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  background: var(--card); color: var(--ink2);
  border: 1px solid var(--line);
  transition: transform .12s, background .16s, color .16s;
}
.chip:active { transform: scale(.95); background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* ── 页面头 ─────────────────────────────── */
.page-head { padding: 18px 0 20px; }
.page-head h1 {
  font-family: var(--serif);
  font-size: 26px; font-weight: 700; letter-spacing: .03em; line-height: 1.3;
}
.page-head p { font-size: 13px; color: var(--ink2); margin-top: 8px; line-height: 1.7; }

/* ── 身体 · 进度 ────────────────────────── */
.progress-card {
  background: var(--card); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow);
  border: 1px solid var(--line-2);
}
.pc-row { display: flex; align-items: baseline; justify-content: space-between; }
.pc-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink3); }
.pc-val { font-size: 13px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.pc-val b { font-size: 19px; color: var(--accent); }
.pc-bar {
  height: 5px; border-radius: 999px; background: var(--line);
  margin-top: 12px; overflow: hidden;
}
.pc-bar i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width .7s cubic-bezier(.22,.9,.28,1);
}

/* ── 时间轴 ─────────────────────────────── */
.timeline { list-style: none; margin-top: 22px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 6.5px; top: 10px; bottom: 14px;
  width: 1px; background: var(--line);
}
.ms { position: relative; padding: 0 0 20px 30px; }
.ms:last-child { padding-bottom: 0; }
.ms-dot {
  position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--line);
  display: grid; place-items: center;
}
.ms-dot::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: transparent;
}
.ms.done .ms-dot { border-color: var(--accent); background: var(--accent-soft); }
.ms.done .ms-dot::after { background: var(--accent); }
.ms.done .ms-dot { animation: popIn .4s cubic-bezier(.3,1.6,.6,1) both; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.ms-time {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--ink3); text-transform: uppercase;
}
.ms.done .ms-time { color: var(--accent); }
.ms-title { font-size: 14.5px; font-weight: 700; margin-top: 3px; color: var(--ink2); }
.ms.done .ms-title { color: var(--ink); }
.ms-desc { font-size: 12.5px; color: var(--ink2); margin-top: 4px; line-height: 1.68; }
.ms.done .ms-desc { color: var(--ink2); }
.ms-eta {
  display: inline-block; margin-top: 7px;
  font-size: 11px; font-weight: 700;
  color: var(--ink3); background: var(--card-2);
  padding: 3px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.ms.done .ms-eta { color: var(--green); background: var(--green-soft); }

/* ── 账本 ───────────────────────────────── */
.ledger-money {
  background: var(--card); border-radius: var(--r);
  padding: 24px 20px; box-shadow: var(--shadow);
  border: 1px solid var(--line-2);
  text-align: center;
}
.lm-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--ink3); }
.lm-val {
  font-size: clamp(38px, 12vw, 54px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.1; margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(178deg, var(--ink) 40%, var(--accent) 135%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lm-equiv { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }

.ledger-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; margin-top: 14px;
}
.lg-cell { background: var(--card); padding: 15px 16px; }
.lg-num {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.lg-cap { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; color: var(--ink3); margin-top: 4px; }

.log-list { display: flex; flex-direction: column; gap: 9px; }
.log-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.log-when {
  font-size: 11px; font-weight: 700; color: var(--ink3);
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
  min-width: 62px; line-height: 1.35;
}
.log-mid { flex: 1; min-width: 0; }
.log-trig { font-size: 13.5px; font-weight: 700; }
.log-note { font-size: 11.5px; color: var(--ink3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-badge {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px; letter-spacing: .04em;
}
.log-badge.won { background: var(--green-soft); color: var(--green); }
.log-badge.lost { background: var(--danger-soft); color: var(--danger); }
.empty {
  text-align: center; font-size: 12.5px; color: var(--ink3);
  padding: 26px 12px; line-height: 1.7;
}

.btn-row { display: flex; gap: 10px; }
.ghost-btn {
  flex: 1; padding: 12px 14px; border-radius: var(--r-xs);
  border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 700; color: var(--ink2);
  transition: transform .12s, background .16s;
}
.ghost-btn:active { transform: scale(.975); background: var(--card-2); }
.ghost-btn.on { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.card-quote {
  font-family: var(--serif);
  font-size: 15px; line-height: 1.85; letter-spacing: .02em;
  color: var(--ink2); text-align: left;
  padding: 16px 20px; max-width: 320px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent-2);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.fineprint { font-size: 11.5px; color: var(--ink3); margin-top: 12px; line-height: 1.7; }

/* ── 底部导航 ───────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center; gap: 2px;
  height: calc(var(--tabs) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; max-width: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--ink3); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  transition: color .18s;
}
.tab svg { width: 21px; height: 21px; transition: transform .22s cubic-bezier(.3,1.5,.6,1); }
.tab.is-active { color: var(--accent); }
.tab.is-active svg { transform: translateY(-1px) scale(1.07); }
.tab:active svg { transform: scale(.88); }

/* ═══ 急救流程 ═══ */
.rescue {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg); background-image: var(--bg-grad);
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 14px) 20px calc(env(safe-area-inset-bottom) + 22px);
  opacity: 0; pointer-events: none; transform: scale(.985);
  transition: opacity .28s, transform .34s cubic-bezier(.22,.9,.28,1);
}
.rescue.is-open { opacity: 1; pointer-events: auto; transform: none; }
.rescue-top {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.rescue-steps { display: flex; gap: 5px; flex: 1; }
.rs-bar {
  flex: 1; height: 3px; border-radius: 999px; background: var(--line);
  transition: background .4s;
}
.rs-bar.done { background: var(--accent-2); }
.rs-bar.cur { background: var(--accent); }
.rescue-close {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--ink3);
  transition: background .16s, transform .12s;
}
.rescue-close svg { width: 17px; height: 17px; }
.rescue-close:active { transform: scale(.9); background: var(--line-2); }

.rescue-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  text-align: center; padding: 16px 0;
}
.rescue-foot {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 10px;
}

.rs-step-tag {
  font-size: 11px; font-weight: 800; letter-spacing: .16em;
  color: var(--ink3); text-transform: uppercase;
}
.rs-title {
  font-family: var(--serif);
  font-size: 24px; font-weight: 700; letter-spacing: .03em; line-height: 1.35;
}
.rs-sub { font-size: 13.5px; color: var(--ink2); line-height: 1.75; max-width: 320px; }
.rs-sub b { color: var(--ink); font-weight: 700; }

/* 呼吸圈 */
.breath {
  width: min(60vw, 236px); aspect-ratio: 1; border-radius: 50%;
  position: relative; display: grid; place-items: center;
  margin: 4px 0;
}
.breath-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--line);
}
.breath-core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--accent-2), var(--accent) 72%);
  opacity: .17;
  transform: scale(.62);
  transition: transform 4s linear;
}
.breath-core.inhale { transform: scale(1); }
.breath-core.hold { transform: scale(1); transition: none; }
.breath-core.exhale { transform: scale(.62); transition: transform 8s linear; }
.breath-txt {
  position: relative; z-index: 2;
  font-size: 30px; font-weight: 800; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.breath-txt small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink3); margin-top: 3px; }

/* 大倒数 */
.countdown {
  font-size: clamp(58px, 20vw, 92px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(178deg, var(--ink) 35%, var(--accent) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.countdown-cap { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink3); }

.pick-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: 100%;
}
.pick {
  padding: 14px 10px; border-radius: var(--r-xs);
  border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 700; color: var(--ink2);
  transition: transform .12s, background .16s, color .16s, border-color .16s;
}
.pick:active { transform: scale(.97); }
.pick.on { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

.intensity { display: flex; gap: 9px; justify-content: center; }
.inten-dot {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 800; color: var(--ink3);
  display: grid; place-items: center;
  transition: transform .12s, background .16s, color .16s, border-color .16s;
}
.inten-dot.on { background: var(--accent); color: #FFF6EE; border-color: transparent; transform: scale(1.06); }

.field { text-align: left; width: 100%; }
.field label {
  display: block; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; color: var(--ink3); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15px;
  padding: 12px 14px; border-radius: var(--r-xs);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  appearance: none; -webkit-appearance: none;
  transition: border-color .16s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent-2);
}
.field + .field { margin-top: 14px; }

.primary-btn {
  width: 100%; padding: 16px;
  border-radius: var(--r-sm);
  background: linear-gradient(168deg, var(--accent-2), var(--accent) 62%);
  color: #FFF8F1; font-size: 15.5px; font-weight: 800; letter-spacing: .06em;
  box-shadow: 0 1px 0 rgba(255,255,255,.26) inset, 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform .12s;
}
.primary-btn:active { transform: scale(.975); }
.soft-btn {
  width: 100%; padding: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 700; color: var(--ink2);
  transition: transform .12s, background .16s;
}
.soft-btn:active { transform: scale(.975); background: var(--card-2); }
.weak-btn {
  width: 100%; padding: 13px;
  font-size: 13px; font-weight: 700; color: var(--ink3);
  border-radius: var(--r-sm);
  transition: color .16s, background .16s;
}
.weak-btn:active { color: var(--ink2); background: var(--line-2); }
.danger-btn {
  width: 100%; padding: 14px;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: var(--danger-soft); color: var(--danger);
  font-size: 14px; font-weight: 700;
  transition: transform .12s;
}
.danger-btn:active { transform: scale(.975); }

/* ── 抽屉 ───────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.sheet-wrap.is-open { pointer-events: auto; }
.sheet-mask {
  position: absolute; inset: 0; background: rgba(30,20,12,.42);
  opacity: 0; transition: opacity .28s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.sheet-wrap.is-open .sheet-mask { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: var(--maxw); margin: 0 auto;
  max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(101%);
  transition: transform .36s cubic-bezier(.22,.9,.28,1);
  overflow: hidden;
}
.sheet-wrap.is-open .sheet { transform: none; }
.sheet-grip {
  width: 38px; height: 4px; border-radius: 999px;
  background: var(--line); margin: 10px auto 0;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px 10px;
}
.sheet-head h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: .03em; }
.sheet-body {
  padding: 4px 18px calc(env(safe-area-inset-bottom) + 26px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2);
}
.set-row:last-of-type { border-bottom: none; }
.set-label { font-size: 14px; font-weight: 700; }
.set-hint { font-size: 11.5px; color: var(--ink3); margin-top: 2px; line-height: 1.55; }
.set-row .field { flex: 0 0 118px; }
.set-row .field input { text-align: right; padding: 9px 11px; font-size: 14.5px; }
.set-group { margin: 22px 0 10px; }
.set-group-title {
  font-size: 11px; font-weight: 800; letter-spacing: .14em;
  color: var(--ink3); text-transform: uppercase; margin-bottom: 4px;
}
.chip-edit { display: flex; align-items: center; gap: 9px; padding: 9px 0; }
.chip-edit span { flex: 1; font-size: 14px; font-weight: 600; }
.chip-del {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: var(--ink3);
  border: 1px solid var(--line);
}
.chip-del svg { width: 13px; height: 13px; }
.chip-del:active { background: var(--danger-soft); color: var(--danger); }

/* ── Toast ──────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 22px);
  transform: translate(-50%, 14px);
  z-index: 200;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 11px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s cubic-bezier(.22,.9,.28,1);
  max-width: 82vw; text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── 适配 ───────────────────────────────── */
@media (max-width: 340px) {
  .stat-num { font-size: 18px; }
  .clock-sub { font-size: 13px; }
}
@media (min-width: 700px) {
  .main { padding-top: 6px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .06ms !important; }
}
