/* 攒攒 — 界面样式
   视觉参照：银行存折。深绿封皮、纸面、细横线、红色印章只用来标记状态（超支 / 已还清 / 已存满）。 */
:root {
  --paper: #F7F8F5;
  --surface: #FFFFFF;
  --ink: #14211D;
  --ink-2: #4C5B55;
  --ink-3: #66756F;
  --line: #DDE2DC;
  --green: #0F5C4D;
  --green-2: #17866B;
  --green-tint: #E3EFEA;
  --red: #C8321F;
  --red-tint: #FBE9E6;
  --brass: #B67E14;
  --brass-tint: #F6EDD9;
  --sans: -apple-system, "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --num: "ZZ Num", "Barlow Condensed", "DIN Alternate", "Roboto Condensed", var(--sans);
  --tab-h: 58px;
  --safe-b: 0px;
  --safe-t: 0px;
}
@supports (padding: env(safe-area-inset-bottom)) { :root { --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top); } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-text-size-adjust: 100%; -webkit-user-select: none; user-select: none; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
.num { font-family: var(--num); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.hidden { display: none !important; }

#app { min-height: 100%; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 28px); }

/* ---------- 底部导航 ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: stretch;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); font-size: 11px; }
#tabs button svg { width: 22px; height: 22px; margin-bottom: 2px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#tabs button.on { color: var(--green); font-weight: 600; }
#tabs .add { flex: 0 0 72px; }
#tabs .add span {
  width: 50px; height: 50px; margin-top: -18px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; font-weight: 300;
  box-shadow: 0 0 0 5px var(--paper);
}
#tabs .add:active span { background: #0B4A3E; }

/* ---------- 首页：绿色封皮 ---------- */
.cover { background: var(--green); color: #F2F6F3; padding: 14px 20px 22px; }
.cover-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.cover-top button { color: #F2F6F3; opacity: .85; padding: 8px 0 8px 16px; font-size: 13px; }
.cover-label { margin-top: 18px; font-size: 14px; opacity: .82; }
.cover-amount { display: flex; align-items: flex-start; margin-top: 2px; position: relative; }
.cover-amount .yen { font-family: var(--num); font-size: 30px; font-weight: 500; margin: 9px 4px 0 0; opacity: .9; }
.cover-amount .big { font-family: var(--num); font-size: 76px; font-weight: 600; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cover-amount .cents { font-family: var(--num); font-size: 30px; font-weight: 500; margin: 9px 0 0 2px; opacity: .9; }
.stamp {
  font-family: var(--serif); font-weight: 700; color: var(--red); border: 2px solid var(--red); border-radius: 6px;
  padding: 1px 9px 2px; font-size: 15px; letter-spacing: .12em; transform: rotate(-8deg); display: inline-block; line-height: 1.5;
  background: rgba(255,255,255,.0);
}
.cover .stamp { position: absolute; right: 2px; top: 14px; background: #FBF4EF; font-size: 19px; padding: 2px 12px 3px; }
.stamp.green { color: var(--green-2); border-color: var(--green-2); }
.ruler { margin-top: 16px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.2); position: relative; overflow: hidden; }
.ruler i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: #F2F6F3; transition: width .7s cubic-bezier(.2,.7,.2,1); }
.ruler.over i { background: #F2A99C; }
.ruler b { position: absolute; left: 80%; top: 0; bottom: 0; width: 2px; background: var(--green); opacity: .55; }
.ruler-legend { display: flex; justify-content: space-between; margin-top: 7px; font-size: 13px; opacity: .88; }
.ruler-legend .num { font-size: 15px; }
.cover-facts { display: flex; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); }
.cover-facts div { flex: 1; font-size: 12px; opacity: .92; }
.cover-facts div + div { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); margin-left: 14px; }
.cover-facts .num { display: block; font-size: 22px; font-weight: 600; opacity: 1; line-height: 1.25; }
.cover-cta { margin-top: 22px; }
.cover-cta p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; opacity: .92; }
.btn-light { background: #F2F6F3; color: var(--green); font-weight: 600; padding: 11px 20px; border-radius: 24px; font-size: 15px; }

/* ---------- 通用版块 ---------- */
.page-head { background: var(--surface); padding: 14px 20px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.page-head h1 { font-family: var(--serif); font-size: 21px; margin: 0; font-weight: 700; }
.sec { margin-top: 14px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 20px 4px; }
.sec-head h2 { font-family: var(--serif); font-size: 17px; font-weight: 700; margin: 0; }
.sec-head button, .link { color: var(--green-2); font-size: 14px; padding: 4px 0 4px 12px; }
.sec-note { padding: 0 20px 12px; color: var(--ink-3); font-size: 13px; margin: 0; }
.empty { padding: 18px 20px 22px; color: var(--ink-3); font-size: 14px; }
.empty button { color: var(--green-2); font-weight: 600; }
.notice { margin: 14px 16px 0; padding: 12px 14px; border-radius: 10px; background: var(--brass-tint); color: #5B420B; font-size: 14px; display: flex; align-items: center; }
.notice span { flex: 1; }
.notice button { margin-left: 12px; background: var(--brass); color: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.notice.bad { background: var(--red-tint); color: #7A1D11; }

/* ---------- 账单行 ---------- */
.row { display: flex; align-items: center; padding: 11px 20px; position: relative; width: 100%; text-align: left; }
.row + .row::before, .day-head + .row::before { content: ""; position: absolute; left: 68px; right: 0; top: 0; border-top: 1px solid var(--line); }
.day-head + .row::before { display: none; }
.row:active { background: var(--paper); }
.glyph { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--green-tint); color: var(--green); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
.glyph.income { background: var(--brass-tint); color: #7A5408; }
.glyph.transfer { background: #ECEFEC; color: var(--ink-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta span + span { margin-left: 8px; }
.row-meta .tag { color: var(--brass); }
.row-amt { font-family: var(--num); font-size: 19px; font-weight: 500; margin-left: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-amt.income { color: var(--green-2); }
.row-amt.transfer { color: var(--ink-3); }
.day-head { display: flex; justify-content: space-between; padding: 14px 20px 4px; font-size: 13px; color: var(--ink-2); background: var(--surface); }
.day-head .num { font-size: 14px; }
.row + .day-head { border-top: 1px solid var(--line); }

/* ---------- 待确认 ---------- */
.pend { padding: 12px 20px 14px; }
.pend + .pend { border-top: 1px solid var(--line); }
.pend-text { font-size: 14px; color: var(--ink-2); -webkit-user-select: text; user-select: text; word-break: break-all; }
.pend-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.pend-top .num { font-size: 19px; color: var(--ink); }
.pend-actions { display: flex; margin-top: 10px; }
.pend-actions button { flex: 1; padding: 8px 0; border-radius: 8px; font-size: 14px; background: var(--green-tint); color: var(--green); font-weight: 600; }
.pend-actions button + button { margin-left: 8px; }
.pend-actions .ghost { background: none; color: var(--ink-3); font-weight: 400; flex: 0 0 64px; }

/* ---------- 计划 ---------- */
.plan { padding: 13px 20px 14px; position: relative; display: block; width: 100%; text-align: left; }
.plan + .plan { border-top: 1px solid var(--line); }
.plan-top { display: flex; align-items: baseline; justify-content: space-between; }
.plan-name { font-size: 16px; font-weight: 600; }
.plan-top .num { font-size: 17px; }
.plan-top .num small { color: var(--ink-3); font-size: 14px; font-weight: 500; }
.bar { height: 8px; border-radius: 4px; background: #E8ECE7; margin: 8px 0 7px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--brass); }
.bar.green i { background: var(--green-2); }
.plan-meta { font-size: 13px; color: var(--ink-2); }
.plan-meta .warn { color: var(--red); }
.plan-meta .num { font-size: 15px; color: var(--ink); }
.plan-actions { margin-top: 10px; display: flex; }
.chip-btn { padding: 6px 14px; border-radius: 16px; background: var(--green-tint); color: var(--green); font-size: 13px; font-weight: 600; margin-right: 8px; }
.chip-btn.plain { background: #ECEFEC; color: var(--ink-2); font-weight: 400; }
.plan .stamp { position: absolute; right: 18px; top: 34px; font-size: 13px; }
.formula { padding: 4px 20px 14px; }
.formula div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--ink-2); }
.formula div .num { font-size: 16px; color: var(--ink); }
.formula .total { border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 9px; color: var(--ink); font-weight: 600; }
.formula .total .num { font-size: 20px; font-weight: 600; }
.formula .neg .num { color: var(--red); }
.cmp { padding: 0 14px 12px; }
.cmp-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 11px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.cmp-row.best { border-color: var(--green-2); background: var(--green-tint); }
.cmp-main { flex: 1; min-width: 0; padding-right: 10px; }
.cmp-main b { font-size: 15px; font-weight: 600; }
.cmp-main .stamp { font-size: 11px; padding: 0 6px 1px; margin-left: 8px; border-width: 1.5px; }
.cmp-main small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.cmp-side { text-align: right; white-space: nowrap; }
.cmp-side .num { display: block; font-size: 21px; font-weight: 600; line-height: 1.15; }
.cmp-side em { font-style: normal; font-size: 12px; color: var(--ink-2); display: block; line-height: 1.4; }

/* ---------- 月份切换 / 分段 ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.month-nav button { width: 40px; height: 34px; font-size: 20px; color: var(--green); border-radius: 8px; }
.month-nav button:disabled { color: var(--line); }
.month-nav strong { font-family: var(--num); font-size: 22px; font-weight: 600; }
.month-nav strong small { font-family: var(--sans); font-size: 14px; font-weight: 400; margin: 0 2px; }
.totals { display: flex; margin-top: 8px; }
.totals div { flex: 1; font-size: 12px; color: var(--ink-3); }
.totals .num { display: block; font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.seg { display: flex; background: #ECEFEC; border-radius: 9px; padding: 3px; margin-top: 10px; }
.seg button { flex: 1; padding: 6px 0; border-radius: 7px; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,33,29,.12); }

/* ---------- 图表 ---------- */
.chart { padding: 6px 20px 16px; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 10px; fill: var(--ink-3); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ref { stroke: var(--ink-2); stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .mark { fill: var(--green-2); }
.chart .mark.inc { fill: var(--brass); }
.chart .mark.dim { opacity: .35; }
.chart-tip { margin: 0 20px; min-height: 22px; font-size: 13px; color: var(--ink-2); display: flex; align-items: baseline; }
.chart-tip .num { font-size: 17px; font-weight: 600; color: var(--ink); margin-right: 8px; }
.chart-tip i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin: 0 5px 3px 10px; background: var(--green-2); }
.chart-tip i.inc { background: var(--brass); }
.legend { display: flex; padding: 0 20px 4px; font-size: 12px; color: var(--ink-2); }
.legend span { display: flex; align-items: center; margin-right: 16px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--green-2); margin-right: 6px; }
.legend i.inc { background: var(--brass); }
.rank { padding: 9px 20px; }
.rank + .rank { border-top: 1px solid var(--line); }
.rank-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.rank-top .num { font-size: 17px; }
.rank-top small { color: var(--ink-3); font-size: 12px; margin-left: 8px; }
.rank .bar { margin: 5px 0 0; height: 6px; }

/* ---------- 弹层 ---------- */
#sheet-root { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 40; pointer-events: none; }
.layer { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.scrim { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: rgba(20,33,29,.45); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; background: var(--surface); border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); pointer-events: auto;
}
.sheet.full { top: 0; max-height: none; border-radius: 0; }
.open > .scrim { opacity: 1; }
.open > .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.sheet-head h3 { font-family: var(--serif); font-size: 18px; margin: 0; font-weight: 700; }
.sheet-head button { color: var(--ink-3); font-size: 15px; padding: 4px 0 4px 16px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 20px calc(18px + var(--safe-b)); flex: 1 1 auto; }
.sheet-body.flush { padding-left: 0; padding-right: 0; background: var(--paper); }
.dialog { position: absolute; left: 28px; right: 28px; top: 30%; background: var(--surface); border-radius: 14px; padding: 20px 20px 12px; opacity: 0; transition: opacity .15s; pointer-events: auto; }
.open > .dialog { opacity: 1; }
.dialog h3 { margin: 0 0 6px; font-size: 17px; }
.dialog p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.dialog-actions { display: flex; justify-content: flex-end; }
.dialog-actions button { padding: 9px 14px; font-size: 15px; color: var(--ink-2); }
.dialog-actions .primary { color: var(--green-2); font-weight: 600; }
.dialog-actions .danger { color: var(--red); font-weight: 600; }

/* ---------- 表单 ---------- */
.field { margin-top: 14px; }
.field > label, .field > .label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.hint, .field .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.45; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: var(--surface); outline: none; font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 84px; resize: vertical; font-size: 14px; line-height: 1.5; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; min-height: 140px; }
.input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-tint); }
.amount-field { display: flex; align-items: baseline; border-bottom: 2px solid var(--ink); padding: 6px 0 4px; margin-top: 12px; }
.amount-field span { font-family: var(--num); font-size: 28px; margin-right: 6px; }
.amount-field input { flex: 1; min-width: 0; border: 0; outline: none; font-family: var(--num); font-size: 44px; font-weight: 600; background: none; padding: 0; }
.two { display: flex; }
.two > .field { flex: 1; min-width: 0; }
.two > .field + .field { margin-left: 12px; }
.cats { display: flex; flex-wrap: wrap; margin: 0 -4px; }
.cats button { width: 20%; padding: 6px 0 4px; display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--ink-2); }
.cats .glyph { margin: 0 0 3px; background: #ECEFEC; color: var(--ink-2); }
.cats button.on { color: var(--green); font-weight: 600; }
.cats button.on .glyph { background: var(--green); color: #fff; }
.btn { display: block; width: 100%; margin-top: 20px; padding: 13px; border-radius: 12px; background: var(--green); color: #fff; font-size: 16px; font-weight: 600; text-align: center; }
.btn:active { background: #0B4A3E; }
.btn.secondary { background: var(--green-tint); color: var(--green); margin-top: 10px; }
.btn.danger { background: none; color: var(--red); margin-top: 6px; font-weight: 400; }
.raw { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: var(--paper); font-size: 12px; color: var(--ink-2); -webkit-user-select: text; user-select: text; word-break: break-all; }
.fixed-row { display: flex; align-items: center; margin-top: 8px; }
.fixed-row .input { flex: 1; min-width: 0; }
.fixed-row .input + .input { margin-left: 8px; flex: 0 0 110px; }
.fixed-row button { flex: 0 0 34px; color: var(--ink-3); font-size: 20px; }

/* ---------- 设置 ---------- */
.set { display: flex; align-items: center; padding: 13px 20px; width: 100%; text-align: left; background: var(--surface); }
.set + .set { border-top: 1px solid var(--line); }
.set-main { flex: 1; min-width: 0; }
.set-title { font-size: 15px; }
.set-desc { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin-top: 1px; }
.set-val { font-size: 14px; color: var(--ink-3); margin-left: 12px; white-space: nowrap; }
.set-val.ok { color: var(--green-2); }
.set-val.todo { color: var(--red); font-weight: 600; }
.switch { flex: 0 0 46px; width: 46px; height: 28px; border-radius: 14px; background: #CFD6D0; position: relative; margin-left: 12px; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--green-2); }
.switch.on::after { transform: translateX(18px); }
.group-title { padding: 18px 20px 6px; font-size: 13px; color: var(--ink-3); }
.prose { padding: 4px 20px 16px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.prose p { margin: 8px 0; }
.prose ol { margin: 6px 0; padding-left: 20px; }
.result { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--green-tint); font-size: 14px; line-height: 1.6; }
.result.warn { background: var(--brass-tint); }
.result.bad { background: var(--red-tint); }

/* ---------- 提示条 ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 34px); transform: translate(-50%, 12px); z-index: 60;
  background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; max-width: 84%; text-align: center;
}
#toast.show { opacity: .96; transform: translate(-50%, 0); }
#lock { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 80; background: var(--green); color: #F2F6F3; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#lock h1 { font-family: var(--serif); font-size: 34px; margin: 0 0 8px; }
#lock p { margin: 0 0 26px; opacity: .85; }

button:focus-visible, .input:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 560px) { #app, #tabs, .sheet { max-width: 520px; margin-left: auto; margin-right: auto; } #tabs, .sheet { left: 50%; right: auto; width: 520px; transform: translateX(-50%); } .sheet { transform: translate(-50%, 100%); } .open > .sheet { transform: translateX(-50%); } }

/* ---------- 返现退款、额度来源、关联 ---------- */
.row-amt.offset { color: var(--green-2); }
.glyph.offset { background: var(--green-tint); color: var(--green-2); }
.type-hint { margin-top: 6px; min-height: 0; }
.type-hint:empty { display: none; }
.link-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--green-tint); color: var(--green); font-size: 14px; display: flex; align-items: center; justify-content: space-between; }
.link-box div { flex: 1; padding-right: 10px; }
.fund-box { margin: 4px 20px 6px; padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.fund-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.fund-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.fund-line .num { font-size: 15px; color: var(--ink); }
.fund-box .chip-btn { margin-top: 10px; }
.formula .sub { margin-top: 6px; }
.formula .note-line { display: block; padding: 0 0 4px; font-size: 12px; color: var(--green-2); }
.pick-row { cursor: default; }
.pick-row.on { background: var(--green-tint); }
.fund-select { margin-top: 6px; padding: 7px 10px; font-size: 14px; }
.offset-rank .num { color: var(--green-2); font-size: 17px; }
.pend-actions button { font-size: 13px; }
.acct-row .row-amt { font-size: 18px; }
.fund-line .num.up { color: var(--green-2); }
.fixed-item { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.fixed-item .fixed-row { margin-top: 0; }
.fixed-row2 { display: flex; align-items: center; margin-top: 8px; }
.fixed-row2 .fixed-cycle { flex: 0 0 110px; padding: 8px 10px; font-size: 14px; }
.fixed-start-wrap { display: flex; align-items: center; margin-left: 10px; font-size: 14px; color: var(--ink-2); flex: 1; min-width: 0; }
.fixed-start-wrap .input { margin: 0 6px; padding: 8px 8px; font-size: 14px; flex: 1; min-width: 0; }
.formula .note-line.muted { color: var(--ink-3); }
.pocket-chips { display: flex; flex-wrap: wrap; }
.pocket-chips .chip-btn { margin: 0 8px 6px 0; }

/* ---------- 报表：资产 ---------- */
.assets-cover { padding-bottom: 18px; }
.assets-cover .cover-top button { margin-left: 4px; }
.assets-cover .cover-amount .big { font-size: 64px; }
.assets-sec { margin-top: 0; border-top: 0; }
.asset-chips { display: flex; flex-wrap: wrap; padding: 12px 16px 4px; }
.asset-chips .chip { padding: 6px 14px; margin: 0 6px 6px 0; border-radius: 16px; background: #ECEFEC; color: var(--ink-2); font-size: 14px; }
.asset-chips .chip.on { background: var(--green); color: #fff; font-weight: 600; }
.share-bar { display: flex; height: 12px; margin: 8px 20px 0; border-radius: 6px; overflow: hidden; background: var(--line); }
.share-bar i { display: block; height: 100%; }
.share-bar i + i { box-shadow: -2px 0 0 #fff; }
.share-legend { display: flex; flex-wrap: wrap; padding: 8px 14px 4px; }
.share-legend button { display: flex; align-items: center; font-size: 13px; color: var(--ink-2); margin: 0 12px 4px 6px; padding: 2px 0; }
.share-legend b { width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; display: inline-block; }
.share-legend .num { font-size: 15px; color: var(--ink); margin-left: 2px; }
.asset-row .swatch { flex: 0 0 4px; width: 4px; height: 34px; border-radius: 2px; margin-right: 14px; }
.asset-row.on { background: var(--green-tint); }
.asset-row .row-amt { font-size: 18px; }
.asset-row .row-amt.debt { color: var(--red); }
.asset-actions { display: flex; padding: 4px 20px 14px; }
.asset-actions .chip-btn { margin-right: 8px; }
.asset-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.asset-chips::-webkit-scrollbar { display: none; }
.asset-chips .chip { flex: 0 0 auto; white-space: nowrap; }
.chip-lock { font-size: 12px; opacity: .75; }

/* ---------- 账户余额变化（月初对比） ---------- */
.sec-sub { font-size: 13px; color: var(--ink-3); }
.month-row::before { left: 20px !important; }
.month-row .row-meta { white-space: normal; }
.month-total .row-title { font-weight: 600; }

/* ---------- 月度结余 ---------- */
.plan.reserve { background: var(--paper-2, #f4f7f5); }
.sheet-sub { font-size: 15px; margin: 18px 0 6px; }
.over-box { margin: 12px 0 4px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.over-head { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 6px; }
.over-title { font-weight: 600; }
.over-box .hint { padding: 0 20px 8px; }
.over-box .month-row .chip-btn { margin-left: 10px; }
.plan.reserve { background: var(--green-tint); }
.fee-label { display: block; margin-top: 12px; }
.fee-row { display: flex; gap: 10px; align-items: center; }
.fee-row input { flex: 1; }
.note-line.warn { color: var(--red); }

/* ---------- 封面上的按钮组 ---------- */
.cover-btns { display: inline-flex; gap: 14px; }
/* ---------- 粘贴记账 ---------- */
#paste-text { min-height: 132px; resize: vertical; font-size: 14px; line-height: 1.5; }
#paste-from-clip { margin-bottom: 4px; }
.paste-sum { padding: 14px 0 6px; color: var(--ink); font-weight: 600; font-size: 14px; }
.paste-row .row-meta { white-space: normal; }
.paste-row[data-status="ignore"] .row-title, .paste-row[data-status="dup"] .row-title { color: var(--ink-3); }
/* ---------- 使用教程 ---------- */
.sheet-body.tut { display: flex; flex-direction: column; padding-top: 18px; }
.tut-step { font-family: var(--num); font-size: 15px; color: var(--green-2); letter-spacing: .02em; }
.tut-title { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 6px 0 18px; color: var(--ink); }
.tut-items { display: flex; flex-direction: column; gap: 16px; }
.tut-item { border-left: 3px solid var(--green-tint); padding-left: 12px; }
.tut-k { font-weight: 700; font-size: 16px; color: var(--green); }
.tut-v { font-size: 15px; color: var(--ink-2); margin-top: 2px; max-width: 34em; }
.tut-note { margin: 20px 0 0; padding: 12px 14px; background: var(--green-tint); border-radius: 10px; color: var(--ink); font-size: 14px; }
#tut-action { margin-top: 18px; }
.tut-nav { display: flex; gap: 12px; margin-top: auto; padding-top: 24px; }
.tut-nav > * { flex: 1; }
.tut-nav .btn { margin-top: 0; }

/* ---------- 顶部安全区（刘海屏、在别的 App 里打开时的顶栏） ---------- */
.cover { padding-top: calc(14px + var(--safe-t)); }
.page-head { padding-top: calc(14px + var(--safe-t)); }
.sheet.full .sheet-head { padding-top: calc(14px + var(--safe-t)); }
/* ---------- 网页版：在预览框里打开时的提示 ---------- */
.preview-bar { background: #FFF4D6; color: #5C4300; font-size: 13px; line-height: 1.45; padding: calc(8px + var(--safe-t)) 16px 8px; border-bottom: 1px solid #EBD9A6; }
.preview-bar + #app .cover { padding-top: 14px; }
