/* ═══════════════════════════════════════════
   不抽了 · 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;

  --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;
  --gold: #C89B3C;
  --gold-soft: #F7EFDC;
  --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);
}

* { 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; }
strong, b { font-weight: 800; }
em { font-style: normal; }

.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-rank {
  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; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink2);
  transition: background .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) + 30px);
}
.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: 20px 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: 13px 0 11px; 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;
  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: 24px 0 20px;
  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; 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; }

/* ── 身家条 ─────────────────────────────── */
.stake {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.stake-k { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.stake-v { font-size: 14px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stake-r {
  flex: 0 0 auto; text-align: right;
  font-size: 11px; font-weight: 700; color: var(--danger);
  background: var(--danger-soft); padding: 7px 11px; border-radius: 999px;
  line-height: 1.4;
}

/* ── 大按钮 ─────────────────────────────── */
.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 rgba(183,91,34,.3);
  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 rgba(183,91,34,.26); }
.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: .82; margin-top: 5px; letter-spacing: .04em; }

.won-line {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 16px 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: 28px; }
.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; }
.cnt { font-size: 12px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.link-btn { font-size: 12.5px; font-weight: 700; color: var(--accent); padding: 3px 2px; }
.link-btn:active { opacity: .55; }
.prose { font-size: 13.5px; color: var(--ink2); line-height: 1.8; }
.prose b { color: var(--ink); }
.prose em { color: var(--accent-ink); font-weight: 800; }
.fineprint { font-size: 11.5px; color: var(--ink3); margin-top: 12px; line-height: 1.7; }
.fineprint strong { color: var(--ink2); }

.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; }

/* 说明 / 警告卡 */
.note-card {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line-2);
}
.note-card.warn { background: var(--gold-soft); border-color: #EBDCBB; }
.note-card-t { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--gold); margin-bottom: 7px; }
.note-card-b { font-size: 12.5px; color: var(--ink2); line-height: 1.75; }
.note-card-b b { color: var(--ink); }
.note-card-b ul { list-style: none; }
.note-card-b li { position: relative; padding-left: 14px; margin-top: 5px; }
.note-card-b li::before { content: "—"; position: absolute; left: 0; color: var(--ink3); }

/* ── 页面头 ─────────────────────────────── */
.page-head { padding: 16px 0 18px; }
.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; }
.page-head .em { color: var(--danger); font-weight: 800; }

/* ═══ 成就页 ═══ */
.rank-card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 20px; box-shadow: var(--shadow);
}
.rank-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.rank-k { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.rank-name { font-family: var(--serif); font-size: 27px; font-weight: 700; letter-spacing: .04em; margin-top: 5px; line-height: 1.2; }
.rank-note { font-size: 12px; color: var(--ink2); margin-top: 5px; }
.rank-right { text-align: right; flex: 0 0 auto; }
.rank-streak { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1; }
.rank-streak small { font-size: 13px; font-weight: 700; color: var(--ink3); margin-left: 2px; }
.rank-bar { height: 6px; border-radius: 999px; background: var(--line); margin: 16px 0 9px; overflow: hidden; }
.rank-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); }
.rank-next { font-size: 11.5px; font-weight: 700; color: var(--ink3); font-variant-numeric: tabular-nums; }

.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.badge { text-align: center; }
.badge-medal {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #F0D9A8, var(--gold));
  color: #5C4310; font-weight: 800; letter-spacing: -.02em; line-height: 1;
  box-shadow: 0 2px 6px rgba(160,120,40,.22);
}
.badge-medal b { font-size: 19px; font-variant-numeric: tabular-nums; }
.badge-medal small { font-size: 9.5px; font-weight: 700; opacity: .78; margin-top: 3px; letter-spacing: .04em; }
.badge.locked .badge-medal { background: none; border: 1.5px dashed var(--line); color: var(--ink3); box-shadow: none; }
.badge.locked .badge-medal b { font-size: 15px; font-weight: 800; }
.badge.locked .badge-medal small { font-size: 9px; opacity: .9; }
.badge-name { font-size: 10.5px; font-weight: 700; color: var(--ink2); margin-top: 7px; line-height: 1.3; }
.badge.locked .badge-name { color: var(--ink3); }
.badge.on .badge-medal { animation: medalIn .5s cubic-bezier(.3,1.6,.6,1) both; }
@keyframes medalIn { from { transform: scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }

.rec-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; background: var(--line); gap: 1px;
}
.rec-cell { background: var(--card); padding: 15px 10px; text-align: center; }
.rec-n { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rec-n small { font-size: 11px; font-weight: 700; color: var(--ink3); margin-left: 1px; }
.rec-c { font-size: 10.5px; font-weight: 600; color: var(--ink3); margin-top: 4px; line-height: 1.35; }

.rule-list { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-2); }
.rule-tag { flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; margin-top: 1px; }
.rule-tag.plus { background: var(--green-soft); color: var(--green); }
.rule-tag.minus { background: var(--danger-soft); color: var(--danger); }
.rule-txt { font-size: 12.5px; color: var(--ink2); line-height: 1.7; }
.rule-txt b { color: var(--ink); }

/* ═══ 身体页 ═══ */
.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); }
.ms-dot::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: transparent; }
.ms.done .ms-dot { border-color: var(--accent); background: var(--accent-soft); animation: popIn .4s cubic-bezier(.3,1.6,.6,1) both; }
.ms.done .ms-dot::after { background: var(--accent); }
@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); }
.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-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); }

/* ═══ 账本页 ═══ */
.money-card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px 20px; box-shadow: var(--shadow); text-align: center; }
.mc-k { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--ink3); }
.mc-v {
  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;
}
.mc-eq { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.mc-split { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.mc-split span { font-size: 11.5px; font-weight: 700; color: var(--ink3); }
.mc-split span b { color: var(--ink2); font-variant-numeric: tabular-nums; }
.mc-split span.fine b { color: var(--danger); }

.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; }

.tp-wrap { display: flex; flex-direction: column; gap: 18px; }
.tp-sec-t { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink3); margin-bottom: 10px; }
.tp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tp-n { flex: 0 0 70px; font-size: 12.5px; font-weight: 700; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.tp-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.tp-c { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--ink2); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.tp-tip { font-size: 12.5px; color: var(--ink2); line-height: 1.75; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); border-left: 2px solid var(--accent-2); }
.tp-tip b { color: var(--accent-ink); }

.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-item.bad { border-color: #EEDAD4; background: #FEFAF9; }
.log-when { font-size: 11px; font-weight: 700; color: var(--ink3); font-variant-numeric: tabular-nums; flex: 0 0 auto; min-width: 60px; 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; }

/* ── 底部导航 ───────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  height: calc(var(--tabs) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(247,243,235,.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; max-width: 120px;
  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) + 20px);
  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; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; max-width: var(--maxw); margin: 0 auto; width: 100%;
  text-align: center; padding: 12px 0;
}
/* 内容少时垂直居中，内容多时可滚动 */
.rescue-body > :first-child { margin-top: auto; }
.rescue-body > :last-child { margin-bottom: auto; }
.rescue-foot { max-width: var(--maxw); margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 9px; }

.rs-step-tag { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--ink3); }
.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: 330px; }
.rs-sub b { color: var(--ink); }
.rs-round { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--ink3); font-variant-numeric: tabular-nums; }

.breath { width: min(56vw, 210px); aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center; }
.breath-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--line); }
.breath-ring2 { position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed var(--line-2); }
.breath-core {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--accent-2), var(--accent) 72%);
  opacity: .16; 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: 32px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1; }
.breath-txt small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--ink3); margin-top: 5px; }

.acc { width: 100%; text-align: left; }
.acc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-xs);
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--ink2);
}
.acc-head .arw { transition: transform .25s; color: var(--ink3); font-size: 11px; }
.acc.open .acc-head .arw { transform: rotate(90deg); }
.acc-body { display: none; padding: 13px 4px 2px; font-size: 12.5px; color: var(--ink2); line-height: 1.8; }
.acc.open .acc-body { display: block; }
.acc.warn-acc .acc-head { background: var(--gold-soft); border-color: #EBDCBB; color: var(--gold); font-weight: 800; }
.acc-body b { color: var(--ink); }
.acc-body ul { list-style: none; }
.acc-body li { position: relative; padding-left: 15px; margin-top: 6px; }
.acc-body li::before { content: "—"; position: absolute; left: 0; color: var(--ink3); }
.acc-body .hot { color: var(--danger); font-weight: 700; }

.scale { width: 100%; }
.scale-t { font-size: 12.5px; font-weight: 700; color: var(--ink2); margin-bottom: 11px; }
.scale-t b { color: var(--ink); }
.intensity { display: flex; gap: 8px; justify-content: center; }
.inten-dot {
  width: 46px; height: 46px; 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); }
.inten-lbls { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: var(--ink3); margin-top: 8px; padding: 0 2px; }

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: 100%; }
.pick {
  padding: 13px 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; }

.drop-card {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.drop-side { text-align: center; }
.drop-n { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.drop-n.before { color: var(--ink3); }
.drop-n.after { color: var(--green); }
.drop-l { font-size: 10.5px; font-weight: 700; color: var(--ink3); margin-top: 6px; letter-spacing: .06em; }
.drop-arrow { font-size: 20px; color: var(--accent); }

.gain-card { width: 100%; padding: 15px 18px; border-radius: var(--r-sm); background: var(--green-soft); border: 1px solid #D3E0D4; text-align: left; }
.gain-t { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--green); margin-bottom: 8px; }
.gain-row { font-size: 13px; color: #3B5743; font-weight: 700; line-height: 1.85; }
.gain-row b { font-variant-numeric: tabular-nums; }
.lose-card { width: 100%; padding: 15px 18px; border-radius: var(--r-sm); background: var(--danger-soft); border: 1px solid #EBD3CD; text-align: left; }
.lose-card .gain-t { color: var(--danger); }
.lose-card .gain-row { color: #7A3226; }

.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: 330px;
  background: var(--accent-soft); border-left: 2px solid var(--accent-2);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}

.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;
}

.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 rgba(183,91,34,.26);
  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 #E5CBC4; 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); 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; 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; }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .inten-dot { width: 40px; height: 40px; }
}
@media (min-width: 700px) {
  .hero { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .06ms !important; }
}
