/* ============ 家庭理财 · 样式 ============ */
/* 视觉基调：暖白底 + 清新柔绿；深色为微暖中性灰，收支语义色保持不变。 */
:root {
  /* 暖调底色与文字 */
  --bg: #FAF8F5;
  --bg2: #F1ECE2;
  --card: #FFFFFF;
  --text: #35382F;
  --text2: #686B61;
  --muted: #76786E;
  --text3: #76786E;
  --line: #F0EBE1;
  --line2: #E4DDCE;
  /* 语义色：支出红 / 收入绿，一动就乱，保持原样 */
  --expense: #e5484d;
  --expense-bg: #fdecec;
  --income: #12a150;
  --income-bg: #e8f7ee;
  /* 操作绿：实心按钮与浅底文字分别定义，兼顾明暗主题下的清晰度。 */
  --accent: #52B16B;
  --accent-text: #327C48;
  --accent-bg: #ECF7EE;
  --accent-solid: #4DAE65;
  --accent-ink: #FFFFFF;
  --primary: #60B775;
  --primary-dark: #54AC6B;
  /* 梦想基金用金色（小狗钱钱的第二主色） */
  --gold: #B47800;
  --gold-solid: #F9A825;
  --warn: #e8a33d;
  --shadow: 0 2px 10px rgba(60,57,41,.07), 0 8px 24px -14px rgba(60,57,41,.18);
  --r: 20px;
  --r-sm: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabh: 58px;
}

:root[data-appearance="dark"] {
    --bg: #171916;
    --bg2: #242822;
    --card: #20231F;
    --text: #EBEEE7;
    --text2: #B8BDB3;
    --muted: #9DA596;
    --text3: #9DA596;
    --line: #30362D;
    --line2: #434B3E;
    --expense: #ff6b70;
    --expense-bg: #2C1A1B;
    --income: #35c46f;
    --income-bg: #122419;
    --accent: #8FD5A1;
    --accent-text: #9CD9AC;
    --accent-bg: #293E30;
    --accent-solid: #4FA96A;
    --accent-ink: #FFFFFF;
    --primary: #4A9461;
    --primary-dark: #43895A;
    --gold: #F9A825;
    --gold-solid: #F9A825;
    --shadow: 0 2px 10px rgba(0,0,0,.45), 0 10px 30px -16px rgba(0,0,0,.75);
  }


* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input, select, textarea { -webkit-appearance: none; appearance: none; }
b, strong { font-weight: 600; }

#app { min-height: 100vh; padding: 0 14px calc(var(--tabh) + var(--safe-b) + 12px); max-width: 560px; margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(var(--safe-t) + 13px) 14px 13px;
  background: var(--primary);
  color: #fff;
  margin: 0 -14px 12px;
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: #fff; }
.who { display: flex; align-items: center; gap: 6px; }
/* 顶栏是绿底，里面的徽标统一改半透明白。徽标底色是 app.js 内联写的，只能 !important 覆盖 */
.topbar .badge { background: rgba(255,255,255,.24) !important; color: #fff !important; }
.topbar .badge .spin { border-color: rgba(255,255,255,.45); border-top-color: #fff; }

/* ---------- 通用 ---------- */
.card {
  background: var(--card); border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.card.tight { padding: 12px 14px; }
.card h2 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text2); }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.hidden { display: none !important; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: var(--bg2); color: var(--text2); white-space: nowrap;
}
.badge.ok { background: var(--income-bg); color: var(--income); }
.badge.pending { background: #fdf3e3; color: #b47a1c; }
.badge.err { background: var(--expense-bg); color: var(--expense); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 18px; border-radius: 14px;
  background: var(--accent-solid); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; flex: 1;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.975); opacity: .9; }
.btn.ghost { background: var(--bg2); color: var(--text); }
.btn.line { background: transparent; border: 1.5px solid var(--line2); color: var(--text); }
.btn.danger { background: var(--expense-bg); color: var(--expense); }
.btn.sm { height: 38px; font-size: 14px; border-radius: 11px; padding: 0 14px; flex: 0 0 auto; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--bg2); color: var(--text2);
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--text); color: var(--bg); font-weight: 600; }

/* ---------- 账目明细的筛选条 ---------- */
/* 成员（全家 / 潘晓明 / 张蓉）用绿色高亮：未选是淡绿底 + 绿字，选中是实心绿 + 白字。
   这么排是为了跟中性的「分类 / 类型」拉开层级 —— 成员是主筛选，一眼就该看到。 */
.chip.mem { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.chip.mem.on {
  background: var(--accent-solid); color: var(--accent-ink);
  box-shadow: 0 2px 9px -3px rgba(76, 175, 80, .7);
}
/* 「分类 / 类型」平时保持中性，只有真的在筛时才点亮成绿色 */
.chip.act.on { background: var(--accent-solid); color: var(--accent-ink); font-weight: 600; }
.scroller { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }

.fld { margin-bottom: 10px; }
.fld > label { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
  width: 100%; height: 46px; padding: 0 13px; border-radius: 12px;
  background: var(--bg2); border: 1.5px solid transparent;
  font-size: 16px; outline: none;
}
textarea { height: auto; padding: 11px 13px; resize: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--card); }
select { background-image: none; }

/* ---------- 登录 / 初始化 ---------- */
.gate { padding: 8vh 0 20px; }
.gate-logo {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 16px;
  background: linear-gradient(145deg, #66BB6A, #388E3C);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 34px; font-weight: 700;
  box-shadow: 0 12px 30px -12px rgba(76,175,80,.55);
}
.gate-title { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.gate-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
/* v107：启动失败态，别再用转圈冒充「还在连接」 */
.gate-sub.gateErr { color: var(--warn); }

.whoCard {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 10px; text-align: left;
  transition: transform .12s ease;
}
.whoCard:active { transform: scale(.98); }
.whoCard .av {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: #fff;
}
.whoCard .nm { font-size: 17px; font-weight: 600; }
.whoCard .hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.whoCard .arw { color: var(--muted); font-size: 20px; }

.pinWrap { text-align: center; padding-top: 6px; }
.pinDots { display: flex; justify-content: center; gap: 14px; margin: 22px 0 8px; }
.pinDots i {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--line2); transition: transform .12s, background .12s;
}
.pinDots i.f { background: var(--text); transform: scale(1.12); }
.pinDots.shake { animation: shake .4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(6px); }
}

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.keypad button {
  height: 62px; border-radius: 16px; background: var(--card);
  font-size: 24px; font-weight: 500; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  /* v80：跟记账键盘（.nkey）同一套手感 —— 按压反馈改用 JS 的 .pressing（iOS :active 不可靠），
     长按不许选文字/弹系统菜单，双击缩放判定关掉 */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .05s ease, background .05s ease;
}
.keypad button.pressing,
.keypad button:active { transform: scale(.94); background: var(--bg2); }
.keypad button.fn { font-size: 17px; font-weight: 600; color: var(--text2); }

/* ---------- 首页概览 ---------- */
.hero {
  background: var(--card); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.hero .lab { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.hero .big { font-size: 33px; font-weight: 700; letter-spacing: -1px; margin-top: 2px; line-height: 1.1; }
.hero .big .cur { font-size: 20px; font-weight: 600; margin-right: 1px; }
.hero-sub { display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-sub > div { flex: 1; }
.hero-sub .v { font-size: 17px; font-weight: 700; margin-top: 3px; letter-spacing: -.3px; }
.exp { color: var(--expense); }
.inc { color: var(--income); }

.sect { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 8px; }
.sect h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text2); }
/* 首页「全部 ›」跳过来时要滚到这一段，让出吸顶顶栏的高度，别把标题压在下面 */
#detailSec { scroll-margin-top: 74px; }

/* ---------- 账目行 ---------- */
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.dayGroup { padding: 10px 14px 2px; font-size: 12px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
/* 向左滑删除：位移的是 .bill，「删除」固定在 .billWrap 右边、压在 .bill 下面，
   .bill 滑开才露出来。注意别去位移 .billWrap —— 那样删除按钮会跟着一起走。
   v33：大叔反馈「左滑看不到删除」，其实是红底上只有一行小字「删除」太不显眼。
   现在做成醒目的红色块：加深底色 + 左侧留白，一滑出来就是一块刺眼的红，绝不会看漏。
   v49：大叔要求去掉 🗑 只留「删除」，且滑动中红块要跟手 —— 见 app.js bindSwipe。
   v50：红底衬从 ::after 换成真实元素 .swipeBg，滑动/超拖全程逐帧铺红（就是「红色板块」
   跟随手指）；按钮超拖段钉住，所以「删除」两字不动。 */
/* overflow:hidden —— 行内容（含藏起来的删除按钮）不许溢出到卡片外，
   这是「一丝红边」的兜底防线：就算阴影/位移算得不完美，也会被裁掉。
   touch-action:pan-y —— v50 加：告诉 iOS「纵向滚动归浏览器、横向手势归 JS」，
   防止拖动中被系统仲裁取消触摸（大叔反馈「往回滑红块静止、松手才消失」的真机嫌疑）。 */
.billWrap, .dreamWrap { position: relative; overflow: hidden; touch-action: pan-y; }
/* 红底衬（账单/梦想共用）：平时宽度 0 藏起来，滑动时由 JS 逐帧设置宽度，
   铺满「行滑开后露出的区域」—— 行滑开多少红铺多少，超拖继续跟手。 */
.swipeBg {
  position: absolute; top: 0; bottom: 0; right: 0; width: 0; z-index: 0;
  background: linear-gradient(180deg, #E53935, #C62828);
  pointer-events: none; transition: width .18s ease-out;
}
/* 未滑开时，删除按钮要完全藏到屏幕右边外面去，否则 z-index 提到 .bill 之上
   会盖住行尾的金额 —— 平时那一列必须干净，.open（滑开了）才归位露出来。
   ★ v35 大叔反馈「右边还是有一点红色露出来」——两个原因都得堵：
     ① translateX(100%) 正好等于按钮宽度，边缘像素仍压在行边界上 → 改成 130% 推得更远；
     ② box-shadow(-4px …) 会往左溢出蹭到行尾 → 平时不给阴影，.open 时才挂上。 */
.billDel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88px; z-index: 2;
  transform: translateX(130%);
  transition: transform .18s ease-out;
  border: 0; color: #fff;
  background: linear-gradient(180deg, #E53935, #C62828);
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: none;
  /* v50：按在按钮上往回拖也要跟手 —— 交给我们处理横向手势，禁掉长按菜单/选中 */
  touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.billWrap.open .billDel {
  transform: translateX(0);
  box-shadow: -4px 0 10px -4px rgba(198,40,40,.5);
}
.billDel .dTxt { line-height: 1.1; }
.billDel:active { filter: brightness(1.15); }
.bill {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; text-align: left; position: relative;
  background: var(--card); z-index: 1;
}
.billWrap + .billWrap .bill::before { content: ""; position: absolute; left: 62px; right: 0; top: 0; height: 1px; background: var(--line); }
.bill:active { background: var(--bg2); }
.bic {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.bmain { flex: 1; min-width: 0; }
.bt { font-size: 15.5px; font-weight: 500; }
.bs { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
/* v75：账户标签在副行**末尾**、.ellip 外面——备注再长也挤不掉它；不收缩 */
.btagAcc { flex: 0 0 auto; color: var(--text3); }
.tagWho { font-size: 11px; padding: 1.5px 7px; border-radius: 999px; background: var(--bg2); color: var(--text2); font-weight: 500; }
.bamt { font-size: 16px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 34px 10px; }

/* ---------- 底部导航中间的「＋」 ----------
   v27.1：正中「记一笔」改成跟其它 tab 平齐一致的一项，不再浮起成圆形按钮。
   v55（大叔：「把三个汉字去掉，只保留一个加号，用一个有颜色的圈把加号框住」）：
   文字撤掉，加号放进一个**绿底白加号的圆**里（30px 圆）。aria-label 留着「记一笔」，
   屏幕阅读器和"可点区域"都不受影响（整格还是那个 flex:1 的按钮）。
   ★ 选择器仍写成 .tabbar button.tabAdd（保持和其他按钮同优先级，避免被 .tabbar button 压掉）。
   ★ 加号颜色靠 CSS 的 color（svg 是 stroke="currentColor"）——白字绿底对比度很高，
     别再出现 v28 那个"浅灰字压在浅底上、加号隐形"的事故。 */
.tabbar button.tabAdd { color: var(--accent-text); }
.tabbar button.tabAdd .addDot {
  display: flex; align-items: center; justify-content: center;
  /* v57：圆的直径 = 「图标 + 文字」整块的大小，不是光图标。
     大叔原话：「跟账单那些一样，图标跟文字两个加起来组成一个圆，直径要一样」——
     我 v56 理解成"跟图标（22px）一样"做小了。用 rect 量过账单那项：
     图标 22 + 间距 2 + 文字行高 15 = **39px**，所以圆取 39px（按钮高 58，上下各留 9.5px，
     跟其它 tab 那一整块的位置也对齐了）。 */
  width: 39px; height: 39px; border-radius: 50%;
  background: var(--accent-solid);
  color: #fff;
}
/* 加号 28px：图形本体 = 14/24×28 ≈ 16px + 线宽，占圆约 47%（主操作该有的分量）。
   stroke-width 1.8 —— svg 从 24 放到 28 是 1.17 倍，1.8×1.17≈2.1px 视觉线宽，
   跟其它图标（22px×1.9≈1.75px）同一档。 */
.tabbar button.tabAdd .addDot svg { width: 28px; height: 28px; stroke-width: 1.8; }
.tabbar button.tabAdd:active .addDot { transform: scale(.92); }
.tabbar button.tabAdd:active { transform: scale(.94); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .tabbar { background: var(--card); }
}
.tabbar nav { display: flex; max-width: 560px; margin: 0 auto; height: var(--tabh); }
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 10.5px; font-weight: 500; transition: color .15s;
}
.tabbar button.on { color: var(--accent-text); font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; }

/* ---------- 底部弹层 ---------- */
/* --kb = 手机键盘当前占的高度（watchKeyboard 实时写进 :root）。
   弹层用它把自己顶上去，不然键盘会盖住下面的保存按钮。
   backdrop-filter 在手机上很贵，每次重绘都要重算一遍模糊 —— 去掉，改用实心半透明。 */
.mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(28,26,20,.52);
  display: flex; align-items: flex-end; animation: fade .18s ease;
  padding-bottom: var(--kb, 0px);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px; margin: 0 auto;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 8px 14px calc(var(--safe-b) + 14px);
  max-height: calc(92vh - var(--kb, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: up .24s cubic-bezier(.2,.9,.3,1);
}
@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet .grab { width: 38px; height: 4px; border-radius: 99px; background: var(--line2); margin: 4px auto 14px; }
.sheet h2 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }

.seg { display: flex; background: var(--bg2); border-radius: 13px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; height: 38px; border-radius: 11px; font-size: 15px; font-weight: 600; color: var(--text2); transition: background .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(60,57,41,.13); }
.seg button.on.exp { color: var(--expense); }
.seg button.on.inc { color: var(--income); }

/* 金额输入：用手机自己的键盘（系统输入法），不再自己画九宫格 */
.amtLine { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 10px; }
.amtWrap { display: flex; align-items: baseline; gap: 5px; flex: 1; min-width: 0; }
.amtWrap .cur { font-size: 22px; font-weight: 600; color: var(--muted); flex: 0 0 auto; }
.amtIn {
  flex: 1; min-width: 0; height: 48px; padding: 0; border: 0; background: transparent;
  font-size: 34px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.15;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.amtIn:focus { outline: none; }
.amtIn::placeholder { color: var(--muted); font-weight: 700; }
.amtClr {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--bg2); color: var(--text2); font-size: 12.5px;
}
.amtClr:active { transform: scale(.94); }
.amtWho { flex: 0 0 auto; }

.catGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.catBtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 2px 8px; border-radius: 14px; background: var(--card);
  font-size: 12px; font-weight: 500; color: var(--text2);
  border: 1.5px solid transparent; transition: transform .12s;
}
.catBtn:active { transform: scale(.94); }
.catBtn .ci { font-size: 21px; line-height: 1; }
.catBtn.on { border-color: var(--text); color: var(--text); font-weight: 700; }

.metaRow { display: flex; gap: 8px; margin-bottom: 12px; }

/* ---------- 记账全屏页（v62）----------
   大叔发的鲨鱼记账截图：「点记账应该跳到记账的页面，一个大的页面」——
   不再是底部拉起的小弹层（背景还垫着账单页看着不舒服）。
   z-index 55：盖过 tabbar(40)、被日期滚轮等弹层(60)盖住。键盘仍用系统自带（0d 方案不翻）。 */
.recPage {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg);
  /* v71：改成 flex 纵向两段（滚动区 + 贴底区）——整页不再自己滚（overflow:hidden），
     滚动交给 .recScroll；这样金额/备注永远贴在键盘上方，分类多少都不影响（大叔截图：
     收入只有 6 个分类，金额行悬在半空跟键盘之间空一大片）。 */
  display: flex; flex-direction: column; overflow: hidden;
  /* v64：从下往上滑入（鲨鱼记账手感），不再是干巴巴的淡入。
     注意：transform 动画期间 .recFoot(fixed) 会改以本页为包含块 ——
     本页 inset:0 全屏，几何一致，且滑出时保存条跟着整页走（正确观感）。 */
  animation: recIn .26s cubic-bezier(.2,.75,.3,1);
  padding-bottom: var(--kb, 0px);   /* 系统键盘（备注）弹起时顶上去 */
}
/* v71：键盘弹起（自绘）——整页底部让出键盘高度，.recBottom 就贴在键盘正上方 */
.recPage.kb { padding-bottom: var(--kbH); }
/* v100.1：编辑态**永远**给底部保存条留位 —— 原来只在自绘键盘弹起时留（.recPage.kb.edit），
   键盘收起时保存条 fixed 在屏幕底，正好压住金额/备注行，且整页 overflow:hidden 滑不动
   （大叔改日期时「下面的内容看不到、往上滑不了」就是它）。72px ≈ 保存条高度，safe-b 补底部安全区 */
.recPage.edit { padding-bottom: calc(var(--kb, 0px) + 72px + var(--safe-b, 0px)); }
.recPage.kb.edit { padding-bottom: calc(var(--kbH) + 72px); }
@keyframes recIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
/* v64：点取消/保存后整页从上往下滑走 */
.recPage.recOut { animation: recOut .23s ease-in forwards; }
@keyframes recOut { from { transform: translateY(var(--rec-exit-from, 0px)); } to { transform: translateY(100%); } }
/* v64：切支出/收入分类网格左右滑动（切到收入从右进来，切回支出从左回来） */
.catGrid.slideL { animation: gridL .2s ease-out; }
.catGrid.slideR { animation: gridR .2s ease-out; }
@keyframes gridL { from { transform: translateX(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gridR { from { transform: translateX(-36px); opacity: 0; } to { transform: none; opacity: 1; } }
.recTop {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 8px) 12px 10px;
  background: var(--primary);
}
.recTop .recSeg { flex: 1; margin-bottom: 0; background: rgba(255,255,255,.24); }
.recTop .recSeg button { color: rgba(255,255,255,.88); height: 34px; font-size: 14px; }
.recTop .recSeg button.on { background: #fff; color: #3c3a2e; box-shadow: none; }
.recCancel {
  flex: 0 0 auto; border: 0; background: none; padding: 6px 4px;
  color: rgba(255,255,255,.95); font-size: 14.5px; font-weight: 600;
}
/* v71：上面是滚动区（AI 行 + 分类网格），分类多就这里滚 */
.recScroll {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  max-width: 560px; margin: 0 auto; width: 100%;
  padding: 14px 14px 4px;
}
/* v71：下面是贴底区（金额行 + 备注/日期）——永远贴在键盘正上方，不随上面滚动 */
.recBottom {
  flex: 0 0 auto;
  max-width: 560px; margin: 0 auto; width: 100%;
  padding: 6px 14px 10px;
}
.recTitle { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
/* 分类格子放大（参考图那种一屏大格、一指点完） */
.recPage .catGrid { gap: 10px; }
.recPage .catBtn { padding: 14px 2px 11px; border-radius: 16px; font-size: 12.5px; }
.recPage .catBtn .ci { font-size: 26px; }
/* 保存条吸底（键盘弹起时跟着 --kb 上移，不被盖住） */
.recFoot {
  position: fixed; bottom: var(--kb, 0px); left: 0; right: 0; z-index: 2;
  max-width: 560px; margin: 0 auto;
  padding: 10px 14px calc(var(--safe-b) + 10px);
  background: var(--bg); border-top: 1px solid var(--line);
}
/* ---------- v65：自绘数字键盘（鲨鱼记账同款，大叔拍板）----------
   大叔原话「数字键盘是自己画的，备注里要打字时才调用手机输入法」——金额框因此改成
   readonly，系统键盘（和 iOS 那条箭头+对勾辅助条）只会在点备注时出现。
   ⚠️ 血坑：按钮类名起过 `.kb`，撞上页面状态类 `.recPage.kb`（键盘弹出）——
   `.kb{height:50px}` 把整个记账页压成 50px 高，recBody 直接消失、截图只剩家底页背景。
   按钮类名一律 `nkey` 前缀，跟页面状态类严格分开。 */
/* 高度 = 240px（padding 8×2 + 4 行 ×50 + 3 gap ×8）**+ 底部安全区**。
   ★ v72 血坑：--kbH 原来写死 240px，没算 env(safe-area-inset-bottom)——刘海屏 iPhone
   （安全区 34px）自绘键盘实际高 274px，让位只让 240，差额 34px 正好把备注行盖住
   （大叔真机截图抓到；测试环境无安全区概念，每次都假过）。所有让位都从它算，
   一处含安全区，全部对齐。 */
:root { --kbH: calc(240px + env(safe-area-inset-bottom, 0px)); }
.numKB {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: none; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line);
  /* v66：manipulation 关掉双击缩放判定（iOS ~300ms 点击延迟的根源），
     tap-highlight 透明——用我们自己的 .pressing 反馈，不用系统灰块 */
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.recPage.kb .numKB { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* v102：自绘键盘弹起时，保存条**贴**在键盘正上方，只留键盘自己的按键间距（.numKB padding-top 8px）。
   ★ 原来 padding-bottom 是 calc(var(--safe-b) + 10px)——真机安全区 34px 时按钮行到键盘首键
     有 52px 空白（按键 gap 才 8px），且保存条总高 103px > .recPage.kb.edit 的 72px 留位，
     顶边反过来压住 .recBottom 的金额行 11px（大叔 2026-11-09 真机截图：¥300 输入框被压、
     「删除/保存修改」悬在半空）。安全区此时由 .numKB 的 padding-bottom 承担，保存条别再补一遍。
     诊断/回归：_family-finance-dev/diag-rec-gap.js、tests/verify-record-flow.js。 */
.recPage.kb .recFoot {
  bottom: var(--kbH);
  padding-bottom: 0;
  border-top: 0;   /* 键盘自带上边线，别叠成两条 */
}
.nkey {
  height: 50px; border: 0; border-radius: 12px;
  background: var(--card); color: var(--text);
  font-size: 21px; font-weight: 600; font-family: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: transform .05s ease, filter .05s ease;
}
/* v66：按下即时反馈（iOS :active 不可靠，改用 JS 加的 .pressing） */
.nkey.pressing { transform: scale(.94); filter: brightness(.9); }
.nkey:active { transform: scale(.94); }
.nkeyDate { font-size: 13.5px; font-weight: 500; color: var(--text2); }
.nkeyInc { font-size: 24px; color: var(--income); }
.nkeyExp { font-size: 24px; color: var(--expense); }
.nkeyDel { font-size: 19px; color: var(--text2); }
.nkeyDone { background: var(--accent-solid); color: #fff; font-size: 16px; }
.metaRow .chip { flex: 0 0 auto; }
/* ---------- v73：记账 × 家底账户打通 ---------- */
/* 账户行（金额行下面）：标签 + 横滑账户 chips，跟着 recBottom 贴键盘 */
.accRow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.accLbl { flex: 0 0 auto; font-size: 12.5px; color: var(--text2); }
.accChips { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 2px 0; }
.accChips::-webkit-scrollbar { display: none; }
.accChip {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1.5px solid var(--line2); border-radius: 999px;
  background: var(--card); color: var(--text2); font-size: 13px; font-weight: 500; font-family: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.accChip.on { border-color: var(--accent-solid); color: var(--accent-solid); font-weight: 600; background: var(--accent-bg, rgba(76,175,80,.1)); }
/* 转账态：recScroll 里的 from/to 面板（复用 #catGrid 位置） */
.trPanel { display: block; }
.trGrp { margin-bottom: 4px; }
.trGrp .accLbl { display: block; margin-bottom: 6px; }
.trGrp .accChips { flex-wrap: wrap; overflow: visible; }
.trArrow { text-align: center; color: var(--text3); font-size: 16px; line-height: 1; padding: 2px 0; }
/* 转账态隐藏 AI 行和账户行（from/to 在面板里选，没有分类也没有单选） */
.recPage.trMode .aiRow, .recPage.trMode #accRow { display: none; }
/* 明细行：转账金额中性灰（不是支出也不是收入） */
.bamt.tr { color: var(--text2); }
.metaRow input { flex: 1; min-width: 0; height: 34px; border-radius: 999px; background: var(--bg2); font-size: 14px; padding: 0 13px; }

/* ---------- AI 记账（v58）：「说一句就记」 ----------
   放在「支出/收入」开关**上面** —— 它是快速路径，优先级最高。
   低调处理：浅底 + 小字标题，不跟下面的分类网格抢视线。 */
.aiRow { background: var(--bg2); border-radius: 12px; padding: 10px 12px 11px; margin-bottom: 10px; }
.aiHead { font-size: 11.5px; color: var(--text2); margin-bottom: 7px; }
.aiIn { display: flex; gap: 8px; }
.aiIn input {
  flex: 1; min-width: 0; height: 34px; border-radius: 999px; background: var(--card);
  font-size: 14px; padding: 0 13px; border: 1px solid var(--line2);
}
.aiIn input:focus { outline: none; border-color: var(--accent-solid); }
.aiIn input:disabled { opacity: .6; }
.aiGo {
  flex: 0 0 auto; height: 34px; padding: 0 15px; border: 0; border-radius: 999px;
  background: var(--accent-solid); color: #fff; font-size: 13px; font-weight: 600;
}
.aiGo:disabled { opacity: .55; }
.aiGo:active { transform: scale(.95); }
.aiErr { font-size: 12px; color: var(--expense); margin-top: 7px; }
.aiOk { font-size: 12px; color: var(--income); margin-top: 7px; }
/* 多笔确认列表：一笔一行 */
.aiItem {
  display: flex; align-items: center; gap: 9px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.aiItem .aiCat {
  font-size: 12px; font-weight: 600; color: var(--text2); flex: 0 0 auto;
  min-width: 34px;
}
.aiItem .aiAmt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aiItem .aiDate { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.aiItem .aiNote {
  flex: 1; min-width: 0; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aiItem .aiDel {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--bg2); color: var(--text2); font-size: 15px; line-height: 1;
}

/* 记一笔的九宫格数字键盘已经作废了 —— 改用手机自己的键盘（见 .amtIn）。
   登录输口令那个还在，用的是 .keypad。 */

/* ---------- 账单页（汇总 + 分类占比 + 两人对比 + 逐笔明细）---------- */
.mnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mnav b { font-size: 16px; font-weight: 700; }
.mnav button { width: 38px; height: 38px; border-radius: 12px; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--text2); }
.mnav button[disabled] { opacity: .3; }

.donutRow { display: flex; align-items: center; gap: 14px; }
.donut { flex: 0 0 132px; }
.catRank { flex: 1; min-width: 0; }
.catRank .rk { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.catRank .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.catRank .rn { font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catRank .rp { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.catRank .rv { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

.bar { height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin-top: 7px; }
.bar > i { display: block; height: 100%; border-radius: 99px; }

/* 两人对比：v36 起压成两个并排小方框，嵌在分类占比卡底部（大叔要求，
   原来那一张独立大卡太占地方）。靠 .vsSplit 细线和 .vsLabel 小标题跟上面的排行榜隔开。 */
.vsSplit { height: 1px; background: var(--line); margin: 15px 0 12px; }
.vsLabel { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 9px; }
.vsInline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vsBox {
  min-width: 0; background: var(--bg2); border-radius: 12px; padding: 11px 12px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.vsBox .vsName { font-size: 13px; }
.vsBox .vsAv { width: 24px; height: 24px; font-size: 11.5px; }
.vsName { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.vsAv { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.vsBox > b { font-size: 19px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.vsBox .bar { margin-top: 0; }
.vsBox .muted.small { font-size: 11.5px; }

/* ---------- v91：统计页「点分类 / 点人」看明细 ----------
   分类行、成员卡加 .tapStat + role=button（data-act 走全局委托）。
   反馈用 :active —— 只换背景/轻微缩放，不动尺寸，避免点一下页面跳。 */
.tapStat { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.catRank .rk.tapStat { margin: 0 -4px; padding-left: 4px; padding-right: 4px; border-radius: 7px; }
.catRank .rk.tapStat:active { background: var(--bg2); }
.vsBox.tapStat { transition: transform .12s ease, filter .12s ease; }
.vsBox.tapStat:active { transform: scale(.985); filter: brightness(.96); }
/* 明细弹层：汇总行 + 只读账单列表 */
.statDetailSub {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 12.5px; color: var(--text2); margin: -4px 0 10px;
}
.statDetailSub b { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.statDetailSub b.exp { color: var(--expense); }
.statDetailSub b.inc { color: var(--income); }
.statBills .bill { background: transparent; padding: 10px 2px; }
.statBills .bill:active { background: transparent; }
.statBills .bill + .bill::before {
  content: ""; position: absolute; left: 50px; right: 2px; top: 0; height: 1px; background: var(--line);
}

.statCells { display: flex; gap: 10px; }
.statCells > div { flex: 1; background: var(--bg2); border-radius: var(--r-sm); padding: 11px 12px; }
.statCells .lab { font-size: 11.5px; color: var(--muted); }
.statCells .v { font-size: 18px; font-weight: 700; margin-top: 3px; letter-spacing: -.4px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabh) + var(--safe-b) + 78px); z-index: 90;
  background: rgba(40,38,30,.94); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  max-width: 84vw; text-align: center; animation: fade .18s;
  pointer-events: none;
}
.mask .toast { bottom: 50%; }

.spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line2); border-top-color: var(--muted);
  animation: sp .7s linear infinite; display: inline-block; vertical-align: -2px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- 矮屏（iPhone SE 等）：压缩记账弹层，保证「保存」不用滚动就能点到 ---------- */
@media (max-height: 740px) {
  .sheet { padding-top: 4px; }
  .sheet .grab { margin: 2px auto 8px; }
  .sheet h2 { font-size: 15px; margin-bottom: 7px; }
  .seg { margin-bottom: 8px; }
  .seg button { height: 33px; font-size: 14px; }
  .amtLine { padding: 2px 2px 6px; }
  .amtShow { font-size: 32px; letter-spacing: -1px; }
  .amtShow .cur { font-size: 18px; }
  .catGrid { gap: 6px; margin-bottom: 8px; }
  .catBtn { padding: 6px 2px 5px; border-radius: 12px; font-size: 11px; gap: 2px; }
  .catBtn .ci { font-size: 17px; }
  .metaRow { margin-bottom: 8px; }
  .metaRow input { height: 32px; }
  .kp { gap: 6px; }
  .kp button { height: 43px; font-size: 20px; border-radius: 12px; }
  .hidden-save { display: none; }
}

/* ---------- 期间条（账单页顶部）---------- */
/* 五个按钮要在一行里放得下，所以比普通 chip 收紧一点 */
.scroller.per { gap: 6px; }
.scroller.per .chip { height: 32px; padding: 0 12px; font-size: 13px; }
/* 「月份 / 季度」入口按钮：带边框，和普通快捷按钮区分开 */
.chip.pick {
  background: var(--card); color: var(--text); font-weight: 600;
  border: 1.5px solid var(--line2); padding: 0 9px 0 12px;
}
.chip.pick.on { background: var(--text); color: var(--bg); border-color: transparent; }
.pnow { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }

/* ---------- 选时间弹层：滚轮 ---------- */
/* 两列滚轮（年 / 月或季度）。用 scroll-snap 做「滚到中间就是选中」，
   中间那条高亮带是 .wheels::before 画的，靠 padding 让首尾项也能滚到正中 */
.wheels { position: relative; display: flex; gap: 10px; margin: 4px 0 2px; }
.wheels::before {
  content: ""; position: absolute; left: 0; right: 0; top: 80px; height: 40px;
  border-radius: 12px; background: var(--bg2); pointer-events: none;
}
.wheels::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 80px; height: 40px;
  border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2);
  pointer-events: none;
}
.wheel {
  flex: 1; height: 200px; padding: 80px 0;               /* (200-40)/2 = 80，首尾项也能居中 */
  overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  position: relative; z-index: 1;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel.gone { display: none; }
.wi {
  height: 40px; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center; font-size: 16px; color: var(--muted);
  font-variant-numeric: tabular-nums; transition: color .15s;
}
.wi.on { color: var(--text); font-weight: 700; }
.wprev {
  text-align: center; font-size: 14.5px; font-weight: 700; color: var(--accent-text);
  margin: 12px 0 2px; letter-spacing: -.2px;
}
.pnote {
  margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: var(--bg2); font-size: 13px; line-height: 1.6; color: var(--text2);
}
.pnote .muted { color: var(--muted); }

/* ============ 理财 ============ */

/* ---------- 家底（资产负债表）---------- */
.estNet {
  font-size: 40px; font-weight: 800; letter-spacing: -1.8px; line-height: 1.05;
  margin: 10px 0 3px; color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.estNet .cur { font-size: 21px; font-weight: 700; margin-right: 3px; }
/* v92：家底金额隐藏 —— 金鹅旁边的小眼睛。隐藏时显示「¥••••••」，点一下才给真数。
   状态只在内存里，刷新/重开 App 自动回到隐藏。 */
.estVal { letter-spacing: -1.2px; }
/* v92：小眼睛紧贴「金鹅」标题——标题和眼睛做成一排，图标不参与大数字排版 */
.estHead { display: flex; align-items: center; gap: 5px; margin: 0; }
.eyeBtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  color: var(--text2); background: transparent;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.eyeBtn:active { background: var(--bg2); }
.eyeBtn svg { display: block; pointer-events: none; }
.estSub { font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.estMiss { font-size: 12.5px; color: var(--warn); margin-top: 4px; }

/* v94：「我的」页的金鹅+梦想储蓄罐并列两卡整块删了（大叔要求），.mePair 样式一并撤掉。 */
/* 工具箱四格并成一行（大叔要求：并列一行）。每格很窄，图标和字都要收一收。 */
.toolGrid.oneRow { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.toolGrid.oneRow .toolBtn { gap: 3px; padding: 9px 2px 10px; min-width: 0; }
.toolGrid.oneRow .toolBtn .ti { font-size: 19px; }
/* 四格很窄，「房贷计算器」这类 5 字标题可能撑破格子 —— 允许换行，别顶到隔壁去 */
.toolGrid.oneRow .toolBtn b { font-size: 11.5px; margin-top: 3px; line-height: 1.25; word-break: keep-all; }
.toolGrid.oneRow .toolBtn i { font-size: 9.5px; line-height: 1.25; }
/* v52：资产分布条（.sbar）已删 —— 大叔嫌金鹅下面那条彩色条不好看、且信息跟明细重复 */
/* v53：这里换成「存钱目标」单色进度条。不用多色拼接（那条已被否过），一个颜色到底。
   未设目标时只留一行灰字入口，不占地方。 */
.goalSet { display: block; width: 100%; margin: 5px 0 1px; padding: 6px 0;
  border: 0; background: none; color: var(--muted); font-size: 12.5px; text-align: left; }
.goalSet:active { opacity: .6; }
.goalBox { margin: 9px 0 3px; }
.goalBox:active { opacity: .75; }
.goalT { font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.goalPct { font-size: 13px; font-weight: 700; color: var(--accent-solid); font-variant-numeric: tabular-nums; }
.goalPct.done { color: var(--gold); }
.goalBar { height: 7px; border-radius: 99px; background: var(--bg2); overflow: hidden; margin: 7px 0 6px; }
.goalBar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent-solid); }
.goalBar > i.done { background: var(--gold); }
.goalFoot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.accList { margin-top: 6px; }
/* v43→v44：横线放在「堆标题的上面」。
   v43 我写成 `.accGrp + .accList { border-top }` —— border-top 落在**列表顶部 = 标题下方**，
   等于三根线全在「活钱下面/投资下面/负债下面」，正是大叔不要的那种。
   v44 改成 `.accList + .accGrp`：紧跟在列表后面的那个**标题**才画线，也就是线在标题上面。
   活钱标题前面不是 .accList（v52 分布条已删），天然不命中 → 当时只剩两道线。
   ⚠️ v44 原话「只用两道横线，活钱这里不需要横线」**已于 v108 作废**：
   大叔 2026-11-11 发截图要求活钱上面也加一道，把金鹅大数字/目标进度跟账户明细隔开。
   现在三堆标题上方都有线，第一堆靠 app.js 给的 .accGrpFirst 命中。 */
.accLi { display: flex; align-items: center; gap: 9px; padding: 8px 0; }
/* v44：线在堆标题的上方，只两道（投资、负债），活钱上方没有。
   v45 教训：我以为「线离标题 7px、离上一行 14px」就加了 margin-top:21px —— **方向反了**。
   真实几何：线到标题文字 = padding-top(0) + 行内半行距(≈2.5px)，几乎贴着；
   线到上一个账户行 = margin-top + 账户行 padding-bottom(8px) + 半行距。
   所以加 margin-top 只会把上面的空白撑得更大，线更贴标题（大叔截图实锤）。
   v46 正解：上面 margin-top 收小到 2px，下面补 padding-top:10px 把标题往下推 ——
   两侧各 ≈12.5px，线落正中。 */
.accList + .accGrp,
.accGrp.accGrpFirst { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 10px; }
/* v108：第一堆上面是目标进度条（.goalBox / .goalSet），不是账户行，
   比 .accList 多一点留白，线才落在「上方内容」和「活钱标题」中间。
   v109：大叔要求这条线**顶到卡片两头**，把「上面的总」和「下面三个分」分开。
   用负左右 margin 抵消 .card 的 16px padding，让 border 贯穿整张卡片；
   再用 18px 左右 padding 把标题文字推回原位（16px 卡内边距 + 2px 原 margin）。
   ⚠️ 下面投资/负债两道线**仍内缩** —— 一贯通、两内缩，主次才看得出来，别一起拉通。 */
.accGrp.accGrpFirst {
  margin-top: 10px;
  margin-left: -16px; margin-right: -16px;
  padding-left: 18px; padding-right: 18px;
}
/* 金额可以直接点着改 —— 给个能按下去的手感 */
.accLi.tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.accLi.tap:active { opacity: .55; }
/* v106：长按拖动账户排序。禁掉 iOS 长按弹出的系统菜单/文字选择；
   被拖行浮起来跟着手指，其它行加 .accShift 做让位过渡。 */
.accLi[data-edit-acc] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.accLi.accDrag, .accLi.tap.accDrag:active {
  position: relative; z-index: 5; opacity: .97;
  background: var(--card); border-radius: 12px;
  /* 深色主题下黑色阴影几乎看不见，补一圈主题色描边保证两种主题都认得出「正在拖」 */
  box-shadow: 0 8px 22px rgba(0,0,0,.18), 0 0 0 1.5px var(--accent-solid);
  transition: none;
}
.accLi.accShift { transition: transform .16s ease; }
/* 标题行右侧的弹性空隙：把合计标签推到最右边 */
.grSp { flex: 1; }
/* v38：这一堆的合计金额，标在标题行右侧。
   v40：大叔看了「灰底小药丸」还是嫌别扭 —— 去掉「合计」二字和整个框，
   改成纯文字：灰色小字（负债红色带负号）。参照他发的「资产管家」截图，
   靠「字号更小 + 颜色更淡」跟下面的账户行（14px 深色）区分，不靠框。 */
.grSum {
  font-size: 12.5px; font-weight: 600; color: var(--text2);
  font-variant-numeric: tabular-nums; align-self: center;
}
.grSum.dbt { color: var(--expense); }
/* 加账户面板：类型 chip 要换行铺开 */
.pickRow { flex-wrap: wrap; gap: 7px; }
.chip.pick.done { opacity: .38; }
.chip.pick[disabled] { cursor: default; }
/* 账户名那一行（图标 + 可改名的输入框） */
.afRow { display: flex; align-items: center; gap: 9px; margin-top: 4px; }
.afRow .aic { font-size: 18px; width: 22px; text-align: center; flex: 0 0 auto; }
/* 「现在有多少钱」的输入框 —— 数字给足 prominence，手机上一个大拇指点得准 */
.afAmt {
  width: 100%; height: 52px; border-radius: 13px; border: 1.5px solid var(--line2);
  background: var(--bg2); color: var(--text); text-align: right;
  padding: 0 14px; font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.afAmt:focus { outline: none; border-color: var(--accent-solid); background: var(--card); }
/* 归属那一堆（活钱 / 投资 / 负债）的三个小按钮 */
.bkRow2 { display: flex; gap: 6px; margin-top: 11px; }
.bkRow2 .tiny { height: 32px; padding: 0 14px; font-size: 12.5px; }
.accLi .aic { font-size: 15px; flex: 0 0 auto; width: 20px; text-align: center; }
.accLi .anm { flex: 1; font-size: 13.5px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v51 账户归属小药丸：谁的账户一眼看到（成员色跟账单页两人头像一致：绿=大叔、紫=太太）。
   已标注 = 实底色 + 白字；没标注 = 灰底「谁的？」，点进账户就能标。 */
.accLi .aown { font-style: normal; font-size: 10.5px; font-weight: 600; color: #fff;
  padding: 1.5px 6px; border-radius: 999px; margin-left: 5px; vertical-align: 1.5px;
  letter-spacing: .3px; }
.accLi .aown.nf { background: var(--bg2); color: var(--muted); font-weight: 500; }
.accLi .avv { font-size: 14px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.accLi .avv.dbt { color: var(--expense); }
.accLi .avv.nf { color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---------- v110：信用卡还款日 ---------- */
/* 负债行卡名后面的小字：每月X日；7 天内的标红（按天数动态判断，不写死日期） */
.accLi .dueTag {
  font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted);
  margin-left: 7px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.accLi .dueTag.soon { color: var(--expense); font-weight: 600; }

/* 账单页顶部：单行滚动提醒。只收 7 天内要还的，没有就整条不渲染 */
.dueTicker {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px; margin-bottom: 12px;
  background: rgba(229,72,77,.10); border-radius: 11px; overflow: hidden;
}
.dueTicker .ico { font-size: 13px; line-height: 1; flex: 0 0 auto; display: flex; align-items: center; }
.tickWin {
  flex: 1; min-width: 0; overflow: hidden;
  display: flex; align-items: center;
  /* v111：必须撑满 36px 再居中。之前高度被内容压到 24.5px、文字在里侧贴顶，
     看着整体偏上 6px（大叔真机第二次反馈）。align-self:stretch 让它吃满条高。 */
  align-self: stretch;
  -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 5%,#000 93%,transparent 100%);
          mask-image: linear-gradient(90deg,transparent 0,#000 5%,#000 93%,transparent 100%);
}
.tickTrack {
  display: flex; align-items: center; white-space: nowrap;
  font-size: 12.5px; line-height: 1; font-weight: 600; color: var(--expense);
  font-variant-numeric: tabular-nums;
  animation: dueScroll 22s linear infinite;
}
.tickTrack.static { animation: none; }   /* 只有 1 条时不滚 */
.tickTrack .tickSeg { padding: 0 4px; line-height: 1; }
.tickTrack .tickSep { padding: 0 2px; line-height: 1; opacity: .45; }
@keyframes dueScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tickTrack { animation: none; } }

/* 账户编辑弹层里的「每月还款日」一行（只对负债账户显示） */
.dueRow {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 11px 12px; background: var(--bg2); border-radius: 12px;
}
.dueRow:active { opacity: .7; }
.dueRow .lb { font-size: 13px; color: var(--text2); }
.dueRow .val { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dueRow .val.unset { color: var(--muted); font-weight: 400; }
.dueRow .arr { color: var(--muted); font-size: 16px; line-height: 1; }
.dueHint { font-size: 11.5px; color: var(--muted); margin: 6px 2px 0; line-height: 1.55; }

/* 对账那一行：这是家底最有价值的一句，用左边框区分状态 */
.recLine {
  margin-top: 13px; padding: 10px 12px; border-radius: 12px;
  background: var(--bg2); border-left: 3px solid var(--muted);
  font-size: 12.5px; line-height: 1.65; color: var(--text2);
}
.recLine b { display: block; font-size: 12.5px; color: var(--text); margin-bottom: 3px; }
.recLine.ok { border-left-color: var(--accent-solid); }
.recLine.gap { border-left-color: var(--warn); }
.recLine.wait { border-left-color: var(--line2); }

/* ---------- 核实 / 管理账户弹层 ---------- */
.accGrp {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text2);
  margin: 14px 2px 7px;
}
.accGrp .muted { font-weight: 400; font-size: 12px; }
.chkRow { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.chkRow .aic { font-size: 15px; width: 20px; text-align: center; flex: 0 0 auto; }
.chkRow .anm {
  flex: 1; font-size: 13.5px; color: var(--text2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chkIn {
  flex: 0 0 128px; height: 40px; border-radius: 11px; border: 1.5px solid var(--line2);
  background: var(--bg2); color: var(--text); text-align: right;
  padding: 0 12px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.chkIn:focus { outline: none; border-color: var(--accent-solid); background: var(--card); }

.accMgrList { margin-top: 4px; }
.accMgrRow { display: flex; align-items: center; gap: 7px; padding: 5px 0; }
.accMgrRow .aic { font-size: 15px; width: 20px; text-align: center; flex: 0 0 auto; }
.nmIn {
  flex: 1; min-width: 0; height: 38px; border-radius: 10px;
  border: 1.5px solid var(--line2); background: var(--bg2); color: var(--text);
  padding: 0 10px; font-size: 13.5px;
}
.nmIn:focus { outline: none; border-color: var(--accent-solid); background: var(--card); }
.tiny {
  flex: 0 0 auto; height: 30px; padding: 0 9px; border-radius: 9px;
  background: var(--bg2); color: var(--text2); font-size: 12px; border: 0; white-space: nowrap;
}
.tiny.on { background: var(--accent-solid); color: var(--accent-ink); font-weight: 600; }
.tiny.on.dbt { background: var(--expense); color: #fff; }
.tiny.del { color: var(--expense); padding: 0 8px; }
.tiny:active { transform: scale(.94); }

/* 金鹅是涨了还是缩了（比上次核实） */
.estChg { font-size: 13px; font-weight: 600; margin-top: 3px; color: var(--text2); font-variant-numeric: tabular-nums; }
.estChg.up { color: var(--accent-text); }
.estChg.down { color: var(--expense); }

/* 分配规矩：三个比例并排 —— 规矩是规矩，不给它一个金额当主角 */
.ruleBar { display: flex; gap: 8px; margin: 13px 0 2px; }
.ruleBar > span { flex: 1; background: var(--bg2); border-radius: 12px; padding: 10px 4px; text-align: center; }
.ruleBar b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.ruleBar i { display: block; font-size: 11.5px; font-style: normal; color: var(--muted); margin-top: 3px; }

/* 管理账户：每个账户一块（上面名字、下面归哪一堆） */
.accMgrBox { padding: 8px 0; border-bottom: 1px solid var(--line); }
.accMgrBox:last-child { border-bottom: 0; }
.bkRow { display: flex; gap: 6px; margin: 7px 0 0 27px; }

/* v42：家底页「投资」那一堆不再折叠成「N 个账户 ›」入口，明细直接列出来（跟活钱/负债同一段）。
   大叔说的「关联」是数据同源 —— 理财页加的账户，这边自动就有，不用点进去看。
   那行跳转入口和 .anmMore 样式已一并撤掉。 */
/* 理财页账户行里的占比 */
.accLi .ipc { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }

/* v94：首页/「我的」的梦想储蓄罐总览（.hmDream）随卡片一起删了，样式一并撤掉。 */

/* 本月收入分配 */

/* 梦想储蓄罐 */
/* 每个梦想包一层 .dreamWrap，左滑删除跟账单明细同一套手势；分隔线挂到包裹层之间。
   .dreamWrap 的定位/裁切/红底衬 .swipeBg 与账单共用（见上面 .billWrap 段）。 */
.dreamWrap + .dreamWrap { border-top: 1px solid var(--line); }
/* 未滑开时删除按钮推到屏幕右边外面（130% 比按钮宽更保险），平时那列干净；.open 才归位 */
.dreamDel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88px; z-index: 2;
  transform: translateX(130%);
  transition: transform .18s ease-out;
  border: 0; color: #fff;
  background: linear-gradient(180deg, #E53935, #C62828);
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: none;
  touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.dreamWrap.open .dreamDel { transform: translateX(0); box-shadow: -4px 0 10px -4px rgba(198,40,40,.5); }
.dreamDel .dTxt { line-height: 1.1; }
.dreamDel:active { filter: brightness(1.15); }
.dreamRow { position: relative; background: var(--card); z-index: 1; }
.dream { padding: 13px 0; }
.dream .dt { font-size: 15.5px; font-weight: 600; }
.dream .dtag { font-size: 11px; font-weight: 600; color: var(--income); background: var(--income-bg); padding: 1.5px 8px; border-radius: 999px; margin-left: 7px; vertical-align: 1px; }
.dream .dsave { height: 30px; padding: 0 15px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-text); font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.dream .dsave:active { transform: scale(.95); }
.dream .dreamAmt { font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--gold); margin-top: 5px; font-variant-numeric: tabular-nums; }
.dream.done .bar > i { background: var(--income) !important; }

/* 比例变更记录卡已删（v47），.rlogRow 样式一并清掉 */
/* 比例弹层：生效月份选择 */
.mStep { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; }
.mStep b { font-size: 15px; font-weight: 700; min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }
.mBtn { width: 30px; height: 30px; border-radius: 9px; background: var(--bg2); color: var(--text2); font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center; border: 0; }
.mBtn:active { transform: scale(.92); }
.ratioRow.mRow > span:first-child { flex: 0 0 78px; }

/* 首页 · 本月生活预算 */
.budleft { font-size: 13px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; }
.budleft.over { color: var(--expense); }
.card .bar > i { background: var(--accent-solid); }
.card .bar.over > i { background: var(--expense); }
.card .bar.warn > i { background: var(--warn); }

/* 弹层 · 调整比例 */
.ratioRow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ratioRow > span { flex: 0 0 78px; font-size: 13.5px; color: var(--text2); font-weight: 500; }
.ratioRow > input { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.ratioRow > i { font-style: normal; color: var(--muted); font-size: 14px; flex: 0 0 auto; }

/* 账单里的储蓄记录 */
.bamt.sav { color: var(--accent-text); }

/* ===== 工具箱 / 快捷记账 / 房贷 / 汇率（新增） ===== */
.lab { font-size: 12px; color: var(--muted); }
.lbtn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 10px; border-radius: 9px;
  background: var(--bg2); color: var(--text2);
  font-size: 12.5px; font-weight: 600; border: 0; white-space: nowrap;
}
.lbtn:active { transform: scale(.95); }
.lbtn.danger { background: var(--expense-bg); color: var(--expense); }

/* 工具箱：四宫格 */
.toolGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.toolBtn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding: 13px 14px; border-radius: 14px; background: var(--bg2);
  border: 0; text-align: center; color: var(--text);
}
.toolBtn:active { transform: scale(.98); }
.toolBtn .ti { font-size: 24px; line-height: 1; }
.toolBtn b { font-size: 14.5px; margin-top: 4px; }
.toolBtn i { font-size: 11.5px; color: var(--muted); font-style: normal; }

/* 首页快捷记账：v29 已整块删除（记一笔只走底部中间那个平齐入口），
   这里原有一组 .quickBar / .qbRow / .qbBtn / .qbi / .qbn 样式，一并清掉了。 */

/* 发票助手列表 */
.invList { display: flex; flex-direction: column; gap: 9px; }
.invLi { background: var(--bg2); border-radius: 12px; padding: 11px 12px; }
.invTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.invTop b { font-size: 14px; color: var(--text); }
.invAct { display: flex; gap: 6px; flex: 0 0 auto; }
.invSub { margin-top: 4px; }

/* 房贷计算器 */
.seg.sm button { height: 32px; font-size: 13.5px; }
.loanGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.loanOut { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.lcell { background: var(--bg2); border-radius: 12px; padding: 10px 11px; }
.lcell .lab { margin-bottom: 4px; }
.lcell .lv { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.lcell .lv b { font-size: 16px; }
.lcell .lv.exp { color: var(--expense); }
.ltable { margin-top: 4px; border-radius: 12px; overflow: hidden; background: var(--bg2); }
/* v60：表头/年行/月行**全部用同一个 4 列 grid、同样的左右 padding** ——
   之前年行多一列「看月」、月行又缩进 22px，三层数字列对不齐（大叔截图圈出来「看着别扭」）。
   同模板 + 同 padding = 列宽完全一致，数字天然对齐。 */
.ltHead, .ltRow { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; padding: 8px 10px; font-size: 12px; gap: 4px; }
.ltHead { color: var(--muted); font-weight: 600; }
.ltRow { color: var(--text2); border-top: 1px solid var(--line); }
.ltRow span { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 点年行展开那 12 期（手风琴：点谁开谁、其他收起，默认展开第 1 年） */
.ltRowY { cursor: pointer; }
.ltRowY.open { color: var(--text); font-weight: 600; }
.ltMonth { background: var(--card); }
.ltM {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 4px;
  padding: 6px 10px; font-size: 11.5px; color: var(--muted);
  border-top: 1px solid var(--line);
}
.ltM span { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preBox { background: var(--accent-bg); border-radius: 12px; padding: 11px 12px; margin: 8px 0; }
.prow { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text2); padding: 2px 0; }
.prow b { color: var(--accent-text); font-size: 14px; }
.cbox {
  display: inline-block; width: 18px; height: 18px; border-radius: 6px; vertical-align: -4px;
  background: var(--bg2); border: 1.5px solid var(--line2); margin-right: 6px; position: relative;
}
.cbox.on { background: var(--accent-solid); border-color: var(--accent-solid); }
.cbox.on::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 汇率换算 */
.fxRow { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.fxRow input { flex: 1; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fxRow select { flex: 0 0 128px; height: 46px; border-radius: 12px; background: var(--bg2);
  border: 1.5px solid transparent; font-size: 14px; padding: 0 6px; }
.fxSwap { display: flex; justify-content: center; margin: 2px 0 8px; }
.fxSwap .lbtn { border-radius: 999px; }


/* ---------- 2026-10-13 第一轮视觉微调（不改布局） ---------- */
/* 保留原字号框架与行高；说明文字仅增加 0.5—1px，不调整模块尺寸/位置。 */
.note { font-size: 13px; line-height: 18.6px; }
.bs { font-size: 12px; line-height: 1.45; }
.dayGroup { font-size: 12.5px; line-height: 17.4px; }
.estSub { font-size: 13px; line-height: 18.125px; }
.card h2, .sect h3 { color: var(--text2); font-weight: 600; }
.brand, .recTitle { font-weight: 600; }
.vsBox > b, .dream .dreamAmt { font-weight: 700; }
.bamt { font-variant-numeric: tabular-nums; }
.tagWho, .vsLabel { font-weight: 500; }
.tagWho { line-height: 1.45; }
/* 语义收支颜色保持；账户选中态的文字用深/浅绿专用色，不共用实心底色。 */
.accChip.on { color: var(--accent-text); }
.chip.mem.on { box-shadow: 0 2px 9px -3px rgba(40,125,70,.35); }
.goalPct { color: var(--accent-text); }
:root[data-appearance="dark"] .chip.mem.on { box-shadow: none; }


/* ---------- 第二轮配色：大面积明亮柔绿，选中项浅底深字 ---------- */
.chip.mem.on, .chip.act.on, .tiny.on {
  background: var(--accent-bg); color: var(--accent-text); box-shadow: none;
}
.chip.mem.on, .chip.act.on {
  /* 内描边不参与盒模型，保留控件尺寸。 */
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.estNet { color: #3D9657; }
:root[data-appearance="dark"] .estNet { color: #9CD9AC; }


/* ---------- 2026-10-13 页面/弹层轻过渡（静态布局不变） ---------- */
.maskClosing { touch-action: none; }
.maskClosing .sheet { pointer-events: none; }
.recPage.recOut > * { pointer-events: none; }
.recPage.kbClosing .numKB { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; pointer-events: none; }
.motionClip { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .mask, .sheet, .recPage, .recPage.recOut,
  .catGrid.slideL, .catGrid.slideR, .toast { animation: none !important; }
  .btn, .chip, .nkey, .keypad button, .billRow, .dreamRow { transition: none !important; }
  .wheel { scroll-behavior: auto !important; }
}

/* 工具弹层：头部留在视口内；手势由 bind() 统一委托。 */
.toolSheet { overscroll-behavior-y: contain; }
.toolHead { position: sticky; top: -8px; z-index: 4; background: var(--bg); display: flow-root; }
.toolHead h2 { padding-right: 42px; touch-action: none; }
.toolHead .grab { touch-action: none; }
.toolClose { position: absolute; right: -2px; top: 4px; width: 40px; height: 40px; font-size: 27px; line-height: 1; color: var(--text2); border-radius: 50%; }
.toolClose:active { background: var(--bg2); }

.toolSheet .loanOut { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.toolSheet .lcell { min-width: 0; padding: 10px 8px; }
.toolSheet .lcell .lv { font-size: clamp(10px, 3.1vw, 13px); overflow-wrap: anywhere; }
.loanCalcNote, .fxMeta { font-size: 12px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }

.toolSheet .lcell .lv b { font-size: clamp(12px, 3.6vw, 16px); }

/* 顶栏与状态区固定成一体，只有卡片内容滚动，避免 iOS 根页面下拉露白。 */
html.appActive { height: 100%; overflow: hidden; background: var(--primary); overscroll-behavior-y: none; }
html.appActive body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; background: var(--primary); }
#app.appShell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; padding: 0; background: var(--bg); }
.appShell > .topbar {
  position: relative; flex: 0 0 auto; margin: 0; background: var(--primary);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px;
}
.appShell > .topbar .brand { grid-column: 2; grid-row: 1; text-align: center; white-space: nowrap; }
.appShell > .topbar > .syncb { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.appShell > .topbar .who { grid-column: 3; grid-row: 1; justify-self: end; min-width: 0; max-width: 100%; }
.appShell > .topbar .who .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block; }
.pageContent { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 12px 14px calc(var(--tabh) + var(--safe-b) + 12px); background: var(--bg); }

/* 记账：顶部可见保存，备注在金额前；手势与按钮统一委托。 */
.recTop { gap: 8px; }
.recTop .recSeg { min-width: 0; }
.recSave { flex: 0 0 auto; padding: 7px 11px; border: 1px solid rgba(255,255,255,.48); border-radius: 12px; background: rgba(255,255,255,.2); color: #fff; font-size: 15px; font-weight: 700; }
.recPage[aria-busy="true"] { pointer-events: none; }
.recBottom > .metaRow { margin-bottom: 8px; }

/* 记账支付账户：替代记账人，紧跟清空，与金额同行。 */
.recPage .amtLine { gap: 8px; }
.payAccount { flex: 0 1 108px; min-width: 0; max-width: 108px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg2); color: var(--text2); font-size: 12.5px; }
.payAccount > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payChevron { flex: 0 0 auto; }
.recPage.trMode .payAccount { display: none; }
.payPicker .wheel { overscroll-behavior-y: contain; }
.payPicker .wi { padding: 0 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media(max-width: 350px) { .payAccount { flex-basis: 88px; max-width: 88px; padding: 0 8px; } .recPage .amtClr { padding: 0 9px; } }

.payPicker .wheel:focus { outline: none; }
.payPicker .wheel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }

/* 金额光标独立于系统输入法；保留原生只读输入框的选区和复制能力。 */
.amtEdit { position: relative; display: flex; flex: 1; min-width: 0; overflow: hidden; border-radius: 12px; }
.amountMeasure { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; pointer-events: none; }
.amountCaret { display: none; position: absolute; top: 50%; width: 2px; border-radius: 1px; background: var(--accent-text); transform: translateY(-50%); pointer-events: none; animation: amountBlink 1.1s step-end infinite; }
.recPage.kb:not(.recOut) .amountCaret { display: block; }
.recPage input.amtIn { caret-color: transparent; }
@keyframes amountBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@media(prefers-reduced-motion: reduce) { .amountCaret { animation: none; } }
.payChevron { display: block; width: 14px; height: 14px; flex: 0 0 14px; }

/* INVESTMENT PRODUCTION V1 */
.idDraftLabel { display:flex; align-items:center; justify-content:space-between; margin:1px 2px 12px; font-size:15px; font-weight:650; }
.idDraftLabel span { padding:3px 9px; border-radius:999px; color:var(--accent-text); background:var(--accent-bg); font-size:11px; font-weight:500; }
.idOverview { padding:20px 18px 14px; }
.idTotal { font-size:34px; font-weight:720; line-height:1.3; letter-spacing:-1px; margin:10px 0 7px; font-variant-numeric:tabular-nums; }
.idTotal > span { font-size:20px; font-weight:500; color:var(--text2); margin-right:5px; }
.idOverviewMeta { display:flex; flex-wrap:wrap; gap:12px; color:var(--text2); font-size:13px; }
.idOverviewMeta > span { color:var(--accent-text); }
.idOverviewBottom { border-top:1px solid var(--line); margin-top:14px; padding-top:12px; }
.idActions { display:flex; gap:10px; margin:14px 0; }
.idActions > button { flex:1; min-width:0; min-height:44px; font-size:14px; }
.idActions .ghost { background:var(--card); border:1px solid var(--line2); color:var(--text2); }
.idTabs { margin:18px 0 12px; }
.idTabs button { min-height:40px; font-size:13px; }
.idHoldings { padding-bottom:6px; }
.idHoldings h3,.idSubhead h3,.card > .row h3 { margin:0; font-size:15px; }
.idText { color:var(--accent-text); font-size:12.5px; min-height:40px; white-space:nowrap; padding:0 0 0 8px; }
.idAccount { display:flex; align-items:center; gap:9px; width:100%; text-align:left; padding:14px 0; margin-top:6px; }
.idAccountIcon { width:34px; height:34px; border-radius:10px; background:var(--accent-bg); color:var(--accent-text); display:grid; place-items:center; font-size:22px; flex:none; }
.idGrow { flex:1; min-width:0; }
.idGrow > b,.idGrow > span { display:block; }
.idGrow > b { font-size:13.5px; font-weight:600; overflow-wrap:anywhere; }
.idGrow > span { margin-top:3px; font-size:11px; }
.idAccount > strong { font-size:14px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.idArrow { color:var(--muted); font-size:14px; transform:rotate(0); }
.idArrow.open { transform:rotate(180deg); }
.idPositions { border-top:1px solid var(--line); }
.idPosition { width:100%; display:flex; align-items:center; text-align:left; gap:9px; padding:14px 0; border-bottom:1px solid var(--line); }
.idPosition:last-child { border-bottom:0; }
.idType { flex:none; width:30px; height:30px; border-radius:9px; background:#e9f1fc; color:#547db4; display:grid; place-items:center; font-size:12px; }
.idType.stock { color:#9273ad; background:#f0eaf7; }
.idType.cash { color:var(--accent-text); background:var(--accent-bg); }
.idValue { font-size:14px; font-weight:650; white-space:nowrap; font-variant-numeric:tabular-nums; }
.idForward { color:var(--muted); font-size:20px; }
.idCash .idGrow > b { color:var(--text2); font-weight:500; }
.idRecord { display:flex; align-items:center; gap:9px; padding:14px 0; border-bottom:1px solid var(--line); }
.idRecord:last-child { border-bottom:0; }
.idKind { padding:4px 6px; font-size:11px; border-radius:7px; background:var(--bg2); color:var(--text2); white-space:nowrap; }
.idRecord strong { font-size:13px; white-space:nowrap; }
.idRecord .small { font-size:11px; overflow-wrap:anywhere; }
.idFootnote { padding-top:10px; border-top:1px solid var(--line); margin:8px 0 0; line-height:1.6; }
.idNote { display:block; width:100%; text-align:left; border-top:1px solid var(--line); padding:14px 0; }
.idNote:first-of-type { margin-top:8px; }
.idNote .row { gap:10px; flex-wrap:wrap; }
.idNote b { font-size:14px; }
.idNote p { margin:7px 0; font-size:13px; line-height:1.6; color:var(--text2); overflow-wrap:anywhere; white-space:pre-wrap; }
.idSheetBody { padding-top:8px; }
.idDetailValue { display:flex; flex-direction:column; gap:5px; margin:16px 0; }
.idDetailValue strong { font-size:29px; letter-spacing:-.5px; }
.idFacts { display:flex; gap:24px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.idFacts > div { display:flex; flex-direction:column; gap:4px; }
.idFacts span { font-size:12px; color:var(--muted); }
.idFacts b { font-size:14px; }
.idSubhead { margin-top:22px; }
.idFormGrid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.idFormGrid > * { min-width:0; }
.idSheetBody input,.idSheetBody select,.idSheetBody textarea { min-width:0; }
.idWide { width:100%; min-height:46px; }
.idError { color:var(--expense); font-size:12px; min-height:23px; line-height:1.5; margin:5px 0; }
.idReadOnly { padding:10px 0; color:var(--text2); }
@media(max-width:350px) { .idAccount > strong,.idValue { font-size:12px; } .idGrow > b { font-size:12.5px; } .idAccount { gap:7px; } .idPosition { gap:7px; } .idTotal { font-size:31px; } }
:root[data-appearance="dark"] .idType { background:#26374b; color:#a0bfdf; }:root[data-appearance="dark"] .idType.stock { background:#382d42; color:#ccb1dd; }

.itOverview .idText { min-height:24px; }
.itOverview .idTotal { margin-top:7px; margin-bottom:13px; font-size:31px; }
.itNumbers { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.itNumbers > div { display:flex; flex-direction:column; gap:5px; }
.itNumbers span { font-size:11px; color:var(--muted); }
.itNumbers b { font-size:16px; font-variant-numeric:tabular-nums; }
/* v99：理财页顶部三数（总本金/总市值/总盈亏）。盈亏单独占一行，数字不挤 */
.itTotals { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; margin:2px 0 4px; }
.itTotals > div { display:flex; flex-direction:column; gap:5px; min-width:0; }
.itTotals .wide { grid-column:1 / -1; }
.itTotals span { font-size:11px; color:var(--muted); }
.itTotals b { font-size:19px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.itTotals .wide b { font-size:22px; }
.itPositive { color:var(--income); } .itNegative { color:var(--expense); }
.itAsOf { font-size:10.5px; color:var(--muted); padding-top:11px; margin-top:13px; border-top:1px solid var(--line); }
.itPlan h3,.itAttention h3,.itSectionHead h3 { font-size:15px; margin:0; }
.itPlan .row .idText,.itAttention .row .idText { min-height:25px; }
.itGoal { font-size:13px; color:var(--text2); margin:10px 0 11px; }
.itMixBar { height:7px; display:flex; overflow:hidden; border-radius:999px; gap:2px; }
.itMixBar > span { min-width:0; }
.itLegend { display:flex; flex-wrap:wrap; gap:7px 12px; margin:10px 0; }
.itLegend > span { display:flex; align-items:center; gap:4px; font-size:10.5px; color:var(--text2); }
.itLegend i { width:6px; height:6px; border-radius:50%; }
.itPlanFoot { font-size:10.5px; color:var(--muted); }
.itCount { display:inline-grid; place-items:center; background:var(--bg2); color:var(--text2); font-size:10px; min-width:19px; height:19px; border-radius:999px; margin-left:4px; }
.itAlertRow { width:100%; display:flex; align-items:center; gap:9px; padding:13px 0; text-align:left; border-bottom:1px solid var(--line); }
.itAlertRow:last-of-type { border-bottom:0; }
.itAlertRow .idGrow b { font-size:13px; }
.itAlertRow .idGrow > span { font-size:11px; color:var(--muted); }
.itDot { width:7px; height:7px; border-radius:50%; background:#c4a166; flex:none; }
.itReview { color:var(--text2); font-size:10.5px; white-space:nowrap; }
.itRefresh { display:flex; align-items:center; justify-content:space-between; gap:8px; border-top:1px solid var(--line); }
.itRefresh > span { font-size:10px; color:var(--muted); }
.itRefresh .idText { font-size:10.5px; min-height:30px; }
.itSectionHead { margin:16px 2px 5px; }
.itSectionHead .idText { min-height:28px; }

/* ---------- v96：净投入明细 + 配比体检 + 板块标签 ---------- */
.itNetBreak { font-size:11px; color:var(--muted); line-height:1.7; margin-top:9px; padding-top:9px; border-top:1px solid var(--line); }
.itNetBreak b { color:var(--text2); font-variant-numeric:tabular-nums; }

/* v97：基金涨跌 —— A股习惯「涨红跌绿」，和记账的 .inc/.exp 不是一套，别混用。 */
.qUp { color:var(--expense); }
.qDown { color:var(--income); }
.qFlat { color:var(--muted); }
.itTotalTag { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); margin:-2px 0 12px; }
.itMiniBtn { border:1px solid var(--line2); background:transparent; color:var(--accent-text); font-size:11px; padding:3px 9px; border-radius:999px; }
.itMiniBtn:active { background:var(--accent-bg); }
.itDayLine { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; font-size:11.5px; color:var(--muted); margin-top:10px; }
.itDayLine b { font-size:13px; font-variant-numeric:tabular-nums; }
.itHeadActs { display:flex; align-items:center; gap:2px; }
.itAssetValue { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.itAssetValue em { font-style:normal; font-size:11px; font-variant-numeric:tabular-nums; }
/* 截图导入 */
.ipFilePick { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; position:relative; border:1.5px dashed var(--line2); border-radius:14px; padding:18px 12px; margin:12px 0; background:var(--bg2); cursor:pointer; }
.ipFilePick input { position:absolute; width:1px; height:1px; opacity:0; }
.ipFilePick b { font-size:14px; color:var(--accent-text); }
.ipFilePick span { font-size:11px; color:var(--muted); }
.ipImpState { font-size:12px; color:var(--muted); min-height:18px; margin:6px 0 10px; line-height:1.5; }
.ipImpList { max-height:52vh; overflow:auto; -webkit-overflow-scrolling:touch; margin:8px -2px 10px; padding:0 2px; }
.ipImpRow { display:flex; gap:10px; align-items:flex-start; padding:11px 0; border-bottom:1px solid var(--line); }
.ipImpPick { display:flex; gap:10px; align-items:flex-start; flex:1; min-width:0; }
/* 全局把 input 的 appearance 抹平了，复选框必须自己画，否则是 0×0 看不见 */
.ipImpPick input[type=checkbox] { width:19px; height:19px; flex:0 0 19px; margin-top:1px; border:1.5px solid var(--line2); border-radius:6px; background:var(--card); position:relative; }
.ipImpPick input[type=checkbox]:checked { background:var(--accent-solid); border-color:var(--accent-solid); }
.ipImpPick input[type=checkbox]:checked::after { content:""; position:absolute; left:5px; top:1.5px; width:5px; height:9px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.ipImpMain { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
.ipImpMain > b { font-size:13px; font-weight:600; line-height:1.35; }
.ipImpSub { font-size:10.5px; color:var(--muted); line-height:1.4; }
.ipImpWarn { font-size:10.5px; color:var(--warn); line-height:1.4; }
.ipImpNum { display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex:0 0 auto; font-variant-numeric:tabular-nums; }
.ipImpNum b { font-size:13px; }
.ipImpNum em { font-style:normal; font-size:11px; }
.ipImpSel { margin-top:6px; width:100%; font-size:12px; padding:7px 8px; border-radius:9px; border:1px solid var(--line2); background:var(--card); color:var(--text); }
.ipImpNo { font-size:10.5px; color:var(--muted); }
.itNetHint { font-size:11px; color:var(--warn); line-height:1.6; margin-top:9px; background:rgba(232,163,61,.1); border-radius:10px; padding:8px 10px; }
.itNetHint b { font-weight:700; }
.itQuoteHint { font-size:11px; color:var(--accent-text); line-height:1.6; margin-top:9px; background:var(--accent-bg); border-radius:10px; padding:8px 10px; }
.itMixTop { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--muted); margin:2px 0 12px; }
.itMixTop b { font-size:15px; color:var(--text); font-variant-numeric:tabular-nums; }
.itHotFlag { color:var(--expense); font-weight:600; background:var(--expense-bg); border-radius:999px; padding:2px 9px; font-size:11px; }
.itMixOk { color:var(--income); font-size:11px; }
.itMixRows { display:flex; flex-direction:column; gap:9px; }
.itMixRow { display:flex; align-items:center; gap:9px; }
.itMixName { flex:0 0 32%; min-width:0; font-size:12.5px; display:flex; align-items:baseline; gap:5px; }
.itMixName i { font-style:normal; font-size:10px; color:var(--muted); background:var(--bg2); border-radius:4px; padding:1px 4px; }
.itMixBar { flex:1; height:7px; border-radius:99px; background:var(--bg2); overflow:hidden; }
.itMixBar i { display:block; height:100%; border-radius:99px; }
.itMixPct { flex:0 0 42px; text-align:right; font-size:12.5px; font-weight:600; font-variant-numeric:tabular-nums; }
.itMixPct.hot { color:var(--expense); }
.ipSecTags { font-size:11.5px; color:var(--text2); margin:6px 0 2px; }
.ipSecTags .ipSecChip { margin-left:5px; }
.ipSecField { display:flex; flex-wrap:wrap; gap:5px; align-items:center; min-height:26px; margin-top:2px; }
.ipSecChip { display:inline-block; font-size:11.5px; background:var(--bg2); color:var(--text2); border-radius:999px; padding:2px 9px; }
.ipSecChip.main { background:var(--accent-bg); color:var(--accent-text); font-weight:600; }
.ipSecList { max-height:44vh; overflow-y:auto; margin-top:4px; -webkit-overflow-scrolling:touch; }
.ipSecItem { display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:10px 4px; border-bottom:1px solid var(--line); }
.ipSecItem span { flex:1; min-width:0; font-size:13.5px; }
.ipSecItem span i { display:block; font-style:normal; font-size:10.5px; color:var(--muted); margin-top:2px; }
.ipSecItem b { font-size:11px; color:var(--muted); }
.ipSecItem em { font-style:normal; font-size:10.5px; color:var(--accent-text); }
.ipSecItem.on { color:var(--accent-text); }
.ipSecItem.on em { font-weight:700; }
.ipSecPicked { margin-top:10px; display:flex; flex-wrap:wrap; gap:5px; align-items:center; font-size:11px; color:var(--muted); }
.itTabs { margin-bottom:10px; }
.itTabs button { font-size:13px; min-height:37px; }
.itAssets.card { padding:0 15px; }
.itAsset { display:flex; align-items:center; gap:9px; width:100%; text-align:left; padding:14px 0; border-bottom:1px solid var(--line); }
.itAsset:last-child { border-bottom:0; }
.itAsset .idGrow > b { font-size:13px; }
.itAsset .idGrow > span { font-size:10.5px; color:var(--muted); }
.itAssetIcon { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:#e9f1fc; color:#547db4; font-size:11px; flex:none; }
.itAssetIcon.bond { background:var(--accent-bg); color:var(--accent-text); }
.itAssetIcon.gold { background:#f7f0df; color:#a5853e; }
.itAssetIcon.cash,.itAssetIcon.other { background:var(--bg2); color:var(--text2); }
.itAssetValue { font-size:13px; font-weight:600; white-space:nowrap; }
.itChevron { width:12px; height:12px; flex:0 0 12px; color:var(--muted); }
.itQuiet { font-size:12px; color:var(--muted); margin:15px 0; }
.itFlowList > .row { padding:13px 0; border-bottom:1px solid var(--line); font-size:13px; gap:12px; }
.itProfile { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:8px 0 12px; }
.itProfile > div { display:flex; flex-direction:column; gap:4px; }
.itProfile span { font-size:11px; color:var(--muted); }
.itProfile b { font-size:19px; }
.itCompareHead,.itCompareRow { display:grid; grid-template-columns:1fr 55px 86px; gap:10px; align-items:center; padding:9px 0; }
.itCompareHead { font-size:11px; color:var(--muted); margin-top:12px; }
.itCompareRow { font-size:13px; border-bottom:1px solid var(--line); }
.itCompareRow input { min-width:0; font-size:16px; height:38px; padding:0 8px; }
.itDetailMetrics { display:flex; flex-wrap:wrap; gap:24px; margin:15px 0 12px; }
.itDetailMetrics > div { display:flex; flex-direction:column; gap:6px; }
.itDetailMetrics span { font-size:11px; color:var(--muted); }
.itDetailMetrics b { font-size:21px; }
.itRuleLine { font-size:13px; color:var(--text2); line-height:1.65; }
.itDetailActions { display:flex; flex-wrap:wrap; justify-content:space-between; margin-top:12px; }
.itAlertTitle { font-size:18px; margin:12px 0; }
@media(max-width:350px) { .itOverview .idTotal { font-size:29px; } .itAssetValue { font-size:11.5px; } .itAsset { gap:7px; } .itRefresh > span { font-size:9px; } .itCompareHead,.itCompareRow { grid-template-columns:1fr 44px 75px; } }
:root[data-appearance="dark"] .itAssetIcon.equity { background:#26374b; color:#a0bfdf; }:root[data-appearance="dark"] .itAssetIcon.gold { background:#3d3527; color:#dbc08c; }

/* 理财跟踪台正式版，沿用现有页面布局和浅绿色主题。 */
.ipLinks{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0}.ipLinks .btn{flex:1;min-width:90px;min-height:42px}
.ipError{color:var(--expense);font-size:13px;line-height:1.6;margin:10px 0;white-space:pre-wrap}
.ipPre,.ipAIResult{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:14px;color:var(--text2)}
.ipAIResult{margin:16px 0}.ipSource{font-size:12px;overflow-wrap:anywhere}.ipSource a{color:var(--accent-text)}
.ipPayload{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;max-height:230px;overflow:auto;background:var(--bg2);border-radius:12px;padding:12px}
.ipRule{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--line);padding:12px 0;font-size:13px;overflow-wrap:anywhere}
.ipRule .btn{flex:none}.ipNote{padding:14px 0;border-bottom:1px solid var(--line)}.ipNote p{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.ipCheck{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.7;margin:16px 0}.ipCheck input{width:19px;height:19px;flex:none;margin-top:2px}
.itAssets .empty{font-size:13px}.itPlanFoot{line-height:1.65}.itRefresh{flex-wrap:wrap;padding-top:8px}.itRefresh>span{flex:1;min-width:150px;line-height:1.6}
.itNumbers b{overflow-wrap:anywhere}.itAsOf{line-height:1.7}.sheet .fld textarea{width:100%;min-height:90px;resize:vertical;font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:12px;box-sizing:border-box}
.sheet .fld select{max-width:100%;width:100%;min-height:44px;font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line);border-radius:12px;padding:9px}
.sheet .ipNote .btn,.sheet .ipRule .btn{font-size:12px}.itTabs{display:flex}.itTabs button{flex:1}.itAttention .itAlertRow{background:transparent;color:var(--text);border-left:0;border-right:0;border-top:0}
.itAsset{background:transparent;color:var(--text);border-left:0;border-right:0;border-top:0}.sheet summary{font-size:13px;cursor:pointer;min-height:40px;display:flex;align-items:center}

/* 顶栏 / 金鹅等用的主题变量。v94 起配色固定「柔和绿」，只分亮/暗两套
   （apple/blue/warm 三套主题已随「主题外观」一起下线）。 */
:root{--header-text:#fff;--header-chip:rgba(255,255,255,.24);--header-border:rgba(255,255,255,.48);--header-active:#fff;--header-active-text:#3c3a2e;--net-text:#3D9657;--warn:#e8a33d}
:root[data-appearance=dark]{--header-text:#fff;--header-chip:rgba(255,255,255,.24);--header-border:rgba(255,255,255,.48);--header-active:#fff;--header-active-text:#3c3a2e;--net-text:#9CD9AC}
.topbar,.brand,.recCancel,.recTop .recSeg button,.recSave{color:var(--header-text)}
.topbar .badge{background:var(--header-chip)!important;color:var(--header-text)!important}
.topbar .badge .spin{border-color:var(--header-border);border-top-color:var(--header-text)}
.recTop .recSeg{background:var(--header-chip)}
.recTop .recSeg button.on{background:var(--header-active);color:var(--header-active-text)}
.recSave{background:var(--header-chip);border-color:var(--header-border)}
.estNet{color:var(--net-text)}
.gate-logo{background:var(--accent-solid);box-shadow:var(--shadow)}
/* v94：「主题外观」面板 + 设置入口整块下线（大叔：后面几个主题效果不好，不需要了）。
   配色固定「柔和绿」，只按亮/暗两套走 —— 相关样式一并撤掉。 */
/* 账单明细：分类后显示小字备注，同人账户省略重复归属。 */
.bmain>.bt{display:flex;align-items:baseline;gap:6px;min-width:0}
.bcategory{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bnote{font-size:12px;font-weight:400;color:var(--muted);min-width:0;flex:0 1 auto}
.bs .tagWho{flex:0 0 auto}
.btagAcc{display:inline-flex;align-items:baseline;gap:0;min-width:0;flex:0 1 auto;white-space:nowrap}
.baccountName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto}
.baccountOwner{flex:0 0 auto}
