/* 行星记账网页版。配色跟手机端的"液态玻璃"外观一致，随系统深浅色切换。 */
/* 数字用 Inter（SIL OFL，授权写在字体文件里），和手机端一样 */
@font-face { font-family: "Inter Num"; src: url("fonts/inter_regular.otf") format("opentype"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Inter Num"; src: url("fonts/inter_semibold.otf") format("opentype"); font-weight: 600 900; font-display: swap; }
:root {
  --num-font: "Inter Num", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --card-tint: #6c5ce7; --on-card-soft: rgba(255, 255, 255, .75); --on-card-out: #FFD0D0; --on-card-in: #C9FFE3;
  --bg: #e4e8fb; --blob1: #9e88ff; --blob2: #63c2ff; --blob3: #ff9ccb;
  --card: rgba(255, 255, 255, .34); --stroke: rgba(255, 255, 255, .9);
  --text: #1b1f33; --muted: #5d6480; --primary: #6c5ce7; --on-primary: #fff;
  --income: #22a66e; --expense: #e5484d; --amber: #e08a00; --field: rgba(255, 255, 255, .7); --line: #d6daea;
  --edge1: rgba(255, 255, 255, .95); --edge2: rgba(255, 255, 255, .2); --edge3: rgba(255, 255, 255, .6); --shine: rgba(255, 255, 255, .7); --shine2: rgba(255, 255, 255, .22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f1e; --blob1: #4b3ca8; --blob2: #1d5c8f; --blob3: #7a2e63;
    --card: rgba(255, 255, 255, .08); --stroke: rgba(255, 255, 255, .14);
    --text: #f1f2f8; --muted: #a6abc4; --primary: #a394ff; --on-primary: #14102e;
    --income: #3ddc97; --expense: #ff7b80; --amber: #f0a93a; --field: rgba(255, 255, 255, .06); --line: #34384f;
    --edge1: rgba(255, 255, 255, .34); --edge2: rgba(255, 255, 255, .05); --edge3: rgba(255, 255, 255, .18); --shine: rgba(255, 255, 255, .16); --shine2: rgba(255, 255, 255, .05);
    /* 深色下主题色很浅，彩色卡片用深一点的同色，白字才看得清 */
    --card-tint: #6a5ad8;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); background-attachment: fixed;
  background-image:
    radial-gradient(60vw 60vw at 5% 0%, color-mix(in srgb, var(--blob1) 75%, transparent), transparent 70%),
    radial-gradient(55vw 55vw at 100% 35%, color-mix(in srgb, var(--blob2) 70%, transparent), transparent 70%),
    radial-gradient(60vw 60vw at 10% 100%, color-mix(in srgb, var(--blob3) 70%, transparent), transparent 70%);
}
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 80px; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.top h1 { font-size: 24px; margin: 0; flex: 1; min-width: 140px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); }
.tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
/* 液态玻璃：半透明的面、一圈由亮到暗再到亮的边、上沿一道反光，背后的颜色被模糊并提亮 */
.card {
  position: relative; border-radius: 24px; padding: 18px; border: 1px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, var(--edge1), var(--edge2) 42%, var(--edge3)) border-box;
  backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--shine), 0 10px 30px -12px rgba(40, 30, 110, .28);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .25s;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, var(--shine2), transparent 42%); }
.card > * { position: relative; }
.card.click { cursor: pointer; }
.card.click:hover { transform: translateY(-3px) scale(1.01); box-shadow: inset 0 1px 0 var(--shine), 0 18px 40px -14px rgba(40, 30, 110, .4); }
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
/* 网格里的每一块都不许被一行不换行的长文字撑宽，否则整列会冲出屏幕，金额被挤到外面 */
.grid > *, .cols > * { min-width: 0; }
.cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .cols { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } .sticky { position: sticky; top: 16px; } }
.btn { border: 1px solid var(--stroke); background: var(--card); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; font-weight: 600; }
.btn.link { border: 0; background: none; color: var(--primary); padding: 4px 6px; }
.btn.danger { color: var(--expense); }
.btn:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; }
.num { font-family: var(--num-font); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.big { font-family: var(--num-font); font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.in { color: var(--income); } .out { color: var(--expense); } .amber { color: var(--amber); }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.row.click { cursor: pointer; border-radius: 12px; margin: 0 -8px; padding: 8px; }
.row.click:hover { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; overflow: hidden; color: #fff; font-weight: 700; font-size: 13px; }
.tile svg { width: 60%; height: 60%; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; }
.badge { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); margin-left: 6px; }
.badge.gray { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.dayhead { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 500; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month b { font-size: 16px; }
.round { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--card); cursor: pointer; }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
input, select, textarea { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; width: 100%; color: var(--text); }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.seg { display: flex; padding: 4px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.seg button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.modal { position: fixed; inset: 0; background: rgba(10, 12, 30, .45); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal .card { width: min(520px, 100%); max-height: 92vh; overflow: auto; background: var(--bg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.login { max-width: 420px; margin: 8vh auto 0; }
.err { color: var(--expense); font-size: 13px; }
.fab { position: fixed; right: 24px; bottom: 24px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 8px 22px rgba(60, 40, 160, .35); }
.ok { color: var(--income); font-size: 14px; font-weight: 600; margin: 0; }
.open-app { color: var(--text); text-align: center; text-decoration: none; display: block; }

/* 背景的三团光慢慢游动，玻璃后面的颜色一直在变 */
body::before, body::after { content: ""; position: fixed; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
body::before { left: -20vmax; top: -22vmax; background: var(--blob1); animation: drift1 28s ease-in-out infinite alternate; }
body::after { right: -24vmax; bottom: -26vmax; background: var(--blob2); animation: drift2 34s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -14vmax) scale(.9); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } .card { transition: none; } }
.tabs { backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: inset 0 1px 0 var(--shine); flex-wrap: wrap; }
.tabs button { transition: background .25s, color .25s, transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.tabs button:active, .btn:active, .seg button:active { transform: scale(.94); }
.btn, .seg button { transition: transform .2s cubic-bezier(.2, .9, .3, 1.4), background .2s; }
.search { width: 190px; border-radius: 999px; padding: 8px 14px; }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 6px 0; font-size: 14px; }
.kv span:last-child { white-space: pre-wrap; word-break: break-word; user-select: text; }
.indent { padding-left: 14px; } .indent2 { padding-left: 28px; }
.row.indent { padding: 5px 8px 5px 14px; margin: 0; }
.three { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (min-width: 860px) { .cols.wide { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calgrid.head i { font-style: normal; text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal { border: 1px solid transparent; background: none; border-radius: 12px; min-height: 58px; padding: 5px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text); font-size: 10px; line-height: 1.25; }
.cal b { font-size: 14px; font-weight: 500; font-family: var(--num-font); }
.cal span { font-family: var(--num-font); }
.cal:hover { outline: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: -1px; }
/* 热力：底色是支出色，深浅按当天花了多少；选中的那天实心主题色 */
.cal.today { border: 1.5px solid var(--primary); } .cal.today b { color: var(--primary); font-weight: 700; }
.cal.on { background: var(--primary) !important; border-color: transparent; color: var(--on-primary); }
.cal.on b, .cal.on span { color: var(--on-primary) !important; font-weight: 700; }
.cal .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--primary); margin-top: 3px; }
.cal.on .dot { background: var(--on-primary); }
.calgrid.head i.we { color: var(--primary); }
.legend { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
select.mini { width: auto; padding: 4px 8px; font-size: 12px; border-radius: 999px; }

/* 一句话记账的输入条和对话气泡 */
.quick { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--edge1), var(--edge2) 42%, var(--edge3)) border-box;
  backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); box-shadow: inset 0 1px 0 var(--shine); }
.quick input { flex: 1; border: 0; background: none; padding: 6px 0; outline: none !important; }
.quick .spark { color: var(--primary); }
.quick .send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); font-size: 20px; line-height: 1; cursor: pointer; }
.quick .send:disabled { opacity: .5; }
.bubble.me { align-self: flex-end; justify-self: end; max-width: 80%; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 20px; }
.seg { flex-wrap: wrap; }

/* 浅色下的磨砂：卡片更透，上面撒一层极细的颗粒；深色不变 */
@media (prefers-color-scheme: light) {
  .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
  .modal .card { background: linear-gradient(rgba(244, 245, 253, .92), rgba(244, 245, 253, .92)) padding-box, linear-gradient(135deg, var(--edge1), var(--edge2) 42%, var(--edge3)) border-box; }
}

/* 彩色卡片：渐变底（浅 → 本色 → 深）、白字。--cc 是卡片的颜色。上面的星环装饰在 css/cosmos.css（原来是两团半透明的圆） */
.card.cc, .face {
  --cc: var(--card-tint); color: #fff; border: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 45%),
    linear-gradient(135deg, color-mix(in oklab, var(--cc) 85%, #fff), var(--cc) 50%, color-mix(in oklab, var(--cc) 70%, #000));
  backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--cc) 80%, transparent);
}
.cc .muted, .face .muted { color: var(--on-card-soft); }
.cc .out { color: var(--on-card-out); } .cc .in { color: var(--on-card-in); } .cc .amber { color: #FFE2A8; }
.cc .round { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cc .pill, .face .pill { border: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; }
.cc .pill:hover { background: rgba(255, 255, 255, .28); }
.cc .bar { background: rgba(255, 255, 255, .22); }

/* 账户列表：每个账户一张迷你卡面 */
.faces { display: grid; gap: 8px; margin-top: 8px; }
.face { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px; cursor: pointer; transition: transform .2s cubic-bezier(.2, .9, .3, 1.3), filter .2s; }
.face > * { position: relative; }
.face:hover { transform: translateY(-2px); filter: brightness(1.05); }
.face .name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face .num { font-size: 16px; font-weight: 700; }
.face .small { color: rgba(255, 255, 255, .72); }
.logo-w { flex: none; background: rgba(255, 255, 255, .9); border-radius: 11px; padding: 1.5px; display: grid; }
.logo-w .tile { width: 32px; height: 32px; border-radius: 10px; }
.logo-w.lg { border-radius: 14px; padding: 2px; } .logo-w.lg .tile { width: 38px; height: 38px; border-radius: 12px; }

/* 资产 / 负债占比条 */
.ratio { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.ratio i { display: block; height: 100%; min-width: 2px; }

/* 账户详情：一张银行卡 */
.acard { border-radius: 26px; padding: 20px; }
.acard .bal { font-size: 32px; }
.acard .stats3 { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.acard .stats3 > div:nth-child(2) { text-align: center; } .acard .stats3 > div:last-child { text-align: right; }
.acard .stats3 .num { font-size: 14px; }
.flag { font-size: 16px; line-height: 1; }

/* 统计分类：排名、细进度条、和上期比 */
.crow { gap: 10px; padding: 6px 8px !important; }
.crow .rank { width: 22px; flex: none; display: grid; place-items: center; font-size: 12px; color: var(--muted); font-family: var(--num-font); }
.crow .rank b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.crow .tile { width: 34px; height: 34px; border-radius: 11px; }
.crow .line1 { display: flex; align-items: center; gap: 8px; }
.crow .line1 .title { flex: 1; min-width: 0; }
.crow .line2 { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; line-height: 13px; color: var(--muted); }
.crow .line2 .chg { font-weight: 500; }
.bar.thin { height: 5px; margin: 3px 0 2px; }

/* 搜索页 */
.sbox { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 16px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--primary) 50%, transparent); background: var(--field); flex: 1; }
.sbox svg { width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; flex: none; }
.sbox input { flex: 1; border: 0; background: none; padding: 6px 0; outline: none !important; font-size: 15px; }
.sbox .x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; }
.search { display: inline-flex; align-items: center; gap: 8px; width: 190px; border-radius: 999px; padding: 8px 14px; border: 1px solid var(--line); background: var(--field); color: var(--muted); cursor: text; text-align: left; }
.search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--card); cursor: pointer; font-size: 13px; }
.chip.lead { padding-left: 5px; }
.chip .tile { width: 24px; height: 24px; border-radius: 8px; font-size: 9px; }
.sum3 { display: flex; justify-content: space-between; gap: 8px; }
.sum3 > div:nth-child(2) { text-align: center; } .sum3 > div:last-child { text-align: right; }
.sum3 .num { font-size: 17px; font-weight: 700; }

/* 账单详情 */
.hero { text-align: center; padding: 22px; }
.hero .halo { width: 78px; height: 78px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; margin: 0 auto 10px; }
.hero .halo .tile { width: 56px; height: 56px; border-radius: 17px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.hero .amt { font-size: 38px; }
.hero .x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; z-index: 1; }
.hero .tags { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hero .tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; }
.cell { border-radius: 16px; padding: 12px; background: color-mix(in srgb, var(--text) 5%, transparent); min-width: 0; }
.cell > .muted { font-size: 11px; margin-bottom: 4px; }
.cell .v { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
.cell .note { font-size: 15px; line-height: 22px; white-space: pre-wrap; word-break: break-word; user-select: text; }
.cell .tile { width: 22px; height: 22px; border-radius: 7px; font-size: 8px; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btns3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
.btns3 .btn { height: 44px; }
/* 账单详情：和 App 一样是一整页。顶上返回栏，底下三个按钮贴着屏幕底边，中间的内容从按钮下面滑过去 */
.pg.dt { max-width: 640px; width: 100%; margin: 0 auto; grid-template-rows: auto 1fr auto; }
.dt-body { display: grid; gap: 12px; align-content: start; }
.dt-foot { position: sticky; bottom: 0; z-index: 20; margin: 0 -12px; padding: 14px 12px calc(env(safe-area-inset-bottom) + 12px);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  -webkit-mask-image: linear-gradient(transparent, #000 14px); mask-image: linear-gradient(transparent, #000 14px); }
.dt-foot .btns3 .btn { height: 48px; }
.wrap.dt-on { padding-bottom: 0; }
@keyframes dt-in { from { opacity: 0; transform: translateX(32px); } }
@keyframes dt-back { from { opacity: 0; transform: translateX(-24px); } }
.wrap.dt-enter > .pg.dt { animation: dt-in .3s cubic-bezier(.2, .9, .3, 1); }
.wrap.dt-leave > :not(.top) { animation: dt-back .26s cubic-bezier(.2, .9, .3, 1); }
@media (max-width: 720px) { .pg.dt { min-height: 100dvh; } }
@media (prefers-reduced-motion: reduce) { .wrap.dt-enter > .pg.dt, .wrap.dt-leave > :not(.top) { animation: none; } }

/* 报销项目：进度环 */
.ring { flex: none; position: relative; width: 62px; height: 62px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring b { font-family: var(--num-font); font-size: 13px; }

/* 账单行里的付款账户小签：小标志 + 名字，铺一层这家银行的颜色 */
.payer { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 2px; margin-right: 6px; border-radius: 99px; font-size: 11px; font-weight: 500; vertical-align: middle;
  background: color-mix(in srgb, var(--pc) 14%, transparent); color: color-mix(in srgb, var(--pc) 65%, var(--text, currentColor)); }
.tile.mini { width: 15px; height: 15px; border-radius: 5px; font-size: 7px; }
.tile.mini svg { stroke-width: 2.4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .payer { background: color-mix(in srgb, color-mix(in srgb, var(--pc) 75%, #fff) 28%, transparent); color: color-mix(in srgb, var(--pc) 28%, #fff); } }
:root[data-theme="dark"] .payer { background: color-mix(in srgb, color-mix(in srgb, var(--pc) 75%, #fff) 28%, transparent); color: color-mix(in srgb, var(--pc) 28%, #fff); }

/* 彩色卡片动效：一道淡淡的光每隔几秒扫过（星环、小月亮、小星的动画在 css/cosmos.css） */
@keyframes sheen { 0%, 55% { background-position: 160% 0, 0 0, 0 0; } 100% { background-position: -60% 0, 0 0, 0 0; } }
.card.cc {
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .11) 50%, transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 45%),
    linear-gradient(135deg, color-mix(in oklab, var(--cc) 85%, #fff), var(--cc) 50%, color-mix(in oklab, var(--cc) 70%, #000));
  background-size: 250% 100%, auto, auto; background-repeat: no-repeat;
  animation: sheen 9s ease-in-out infinite;
}
.card.cc:nth-child(2n) { animation-delay: -3s; }
@media (prefers-reduced-motion: reduce) { .card.cc { animation: none; } }

/* ---------------------------------------------------------------- 手机上（主屏幕 App）：底部导航栏、"我的"页 */
.bottom-nav { display: none; }
.me-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.me-item { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; cursor: pointer; font-size: 12.5px; color: var(--text); text-align: center; }
.me-item:active { transform: scale(.94); }
@media (max-width: 720px) {
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  .wrap { padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 96px); }
  .top { gap: 8px; margin-bottom: 12px; }
  .top h1 { font-size: 22px; }
  .top .tabs, .top > .btn, .top > label.btn { display: none; }
  .top .search { order: 5; flex: 1 1 100%; }
  .fab { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; z-index: 30;
    left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 8px); height: 62px; padding: 0 6px; border-radius: 26px;
    background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid var(--stroke);
    backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 10px 30px -10px rgba(40, 30, 120, .35), inset 0 1px 0 var(--shine);
  }
  .bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); cursor: pointer; padding: 6px 0; }
  .bottom-nav button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.2, .9, .3, 1.5); }
  .bottom-nav button.on { color: var(--primary); font-weight: 600; }
  .bottom-nav button.on svg { transform: translateY(-2px) scale(1.08); }
  .bottom-nav .nav-add { justify-self: center; width: 52px; height: 52px; border-radius: 50%; color: var(--on-primary); font-size: 30px; line-height: 1; padding: 0; justify-content: center;
    background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 80%, #fff), var(--primary)); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
  .bottom-nav .nav-add:active { transform: scale(.9); }
  .modal { align-items: flex-end; }
  .modal .card { border-radius: 24px 24px 0 0; max-height: 94vh; padding-bottom: calc(env(safe-area-inset-bottom) + 18px); }
}

/* budget & loans module */
.modal.bl-modal { z-index: 40; }
.bl-back { position: absolute; inset: 0; }
.bud-ring { position: relative; width: 190px; height: 190px; margin: 4px auto 0; display: grid; place-items: center; }
.bud-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.bud-ring .in-ring { text-align: center; line-height: 1.3; }
.bud-ring .bud-left { font-size: 26px; font-weight: 700; }
.bud-stats { display: flex; justify-content: space-between; gap: 8px; }
.bud-stats > div:nth-child(2) { text-align: center; } .bud-stats > div:last-child { text-align: right; }
.bud-chart { display: block; width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; }
.bud-chart.grow .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: bud-draw .8s ease-out forwards; }
.bud-chart.grow .area, .bud-chart.grow .dot { opacity: 0; animation: bud-fade .4s ease-out .6s forwards; }
@keyframes bud-draw { to { stroke-dashoffset: 0; } }
@keyframes bud-fade { to { opacity: 1; } }
.bar.bud-bar { height: 7px; margin: 5px 0 3px; }
.bud-home .bar { height: 10px; }
.ln-av { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.ln-ring { position: relative; width: 84px; height: 84px; flex: none; display: grid; place-items: center; text-align: center; line-height: 1.15; }
.ln-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ln-ring b { font-size: 15px; }
.ln-card { padding: 14px; border-radius: 20px; }
.bar.ln-bar { height: 5px; margin: 4px 10px 3px 0; background: color-mix(in srgb, var(--income) 14%, transparent); }
.bar.ln-bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--income) 60%, transparent), var(--income)); }
.ln-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ln-due { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ln-due input { width: auto; padding: 5px 10px; }
.ln-done { justify-self: start; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .bud-chart.grow .line, .bud-chart.grow .area, .bud-chart.grow .dot { animation: none; stroke-dashoffset: 0; opacity: 1; } }

/* schedules, backup & manage modules */
.sc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.sc-check input { width: 18px; height: 18px; padding: 0; accent-color: var(--primary); }
.sc-pause { padding: 0 !important; font-size: 12px; }
.bk-danger { background: var(--expense) !important; color: #fff !important; }
.mg-item + .mg-item { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.mg-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 240px; overflow: auto; padding: 2px; }
.mg-icons button { border: 0; background: none; border-radius: 13px; padding: 3px; cursor: pointer; display: grid; place-items: center; }
.mg-icons button.on { background: color-mix(in srgb, var(--primary) 24%, transparent); outline: 2px solid var(--primary); }
.mg-icons .tile { width: 34px; height: 34px; border-radius: 11px; }
.mg-ltile { border: 1.5px solid transparent; cursor: pointer; padding: 0; }
.mg-ltile:not(.set) { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: var(--line); }
.mg-ltile:not(.set) svg { stroke: var(--primary); }
.mg-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0 12px 52px; }
.mg-colors button[style] { width: 30px; height: 30px; border-radius: 10px; border: 0; cursor: pointer; }
.mg-colors button.on { outline: 2px solid var(--text); outline-offset: 2px; }
.modal[data-bg="sc"], .modal[data-bg="bk"], .modal[data-bg="mg"] { z-index: 40; }

/* editor module */
/* 记账页：标题栏、大金额、分类格、小胶囊、备注、自带数字键盘；盖在底部导航上面 */
.modal.ed-modal { z-index: 40; }
.ed-modal .card.ed-sheet { display: flex; flex-direction: column; gap: 10px; padding: 14px; width: min(520px, 100%); height: min(800px, calc(100vh - 32px)); max-height: none; overflow: hidden; }
.ed-head { flex: none; display: flex; align-items: center; gap: 8px; }
.ed-head b { font-size: 17px; white-space: nowrap; }
.ed-head .seg { margin-left: auto; flex: 0 1 210px; flex-wrap: nowrap; }
.ed-head .seg button { padding: 5px 4px; white-space: nowrap; }
.ed-x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); cursor: pointer; font-size: 13px; }
.ed-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ed-amount { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 20px; background: var(--field); border: 1px solid var(--line); }
.ed-cur { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, transparent); font-size: 13px; font-weight: 600; }
.ed-amt-w { flex: 1; min-width: 0; text-align: right; }
.ed-amt { font-size: 34px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.ed-amt.long { font-size: 26px; } .ed-amt.zero { color: var(--muted); opacity: .55; } .ed-amt.bad { color: var(--amber); }
.ed-amt-sub { font-size: 13px; color: var(--muted); font-family: var(--num-font); }
.ed-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; gap: 10px; align-content: start; margin: 0 -4px; padding: 2px 4px; }
.ed-box { border-radius: 20px; padding: 8px; background: var(--card); border: 1px solid var(--stroke); }
.ed-move { padding: 12px; display: grid; gap: 8px; }
.ed-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px 0; }
.ed-cat { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 4px; border-radius: 14px; cursor: pointer; color: var(--text); font-size: 10.5px; min-width: 0; touch-action: manipulation; }
.ed-cat .tile { width: 34px; height: 34px; border-radius: 11px; }
.ed-cat span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-cat.on { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); font-weight: 600; }
.ed-subs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 4px 2px; scrollbar-width: none; }
.ed-subs::-webkit-scrollbar { display: none; }
.ed-sub { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--stroke); background: var(--field); border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: var(--text); touch-action: manipulation; }
.ed-sub .ed-ic { width: 14px; height: 14px; }
.ed-sub.on { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.ed-sub.on .ed-ic { stroke: var(--on-primary); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-chips .chip { color: var(--text); touch-action: manipulation; max-width: 100%; }
.ed-chips .chip > span:not(.tile) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.on { background: color-mix(in srgb, var(--primary) 14%, transparent); border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.chip.danger { color: var(--expense); border-color: color-mix(in srgb, var(--expense) 45%, transparent); }
.ed-datechip { position: relative; overflow: hidden; }
.ed-datechip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; border: 0; font-size: 16px; cursor: pointer; }
.ed-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); cursor: text; }
.ed-note .ed-ic { margin-top: 3px; }
.ed-note textarea { flex: 1; border: 0; background: none; padding: 0; min-height: 0; resize: none; outline: none !important; font-size: 16px; line-height: 22px; border-radius: 0; field-sizing: content; max-height: 110px; }
.ed-keys { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.ed-key { height: 48px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); font: 400 22px var(--num-font); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: background .12s, transform .12s; }
.ed-key:active { background: color-mix(in srgb, var(--primary) 24%, transparent); transform: scale(.96); }
.ed-key.op { background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary); font-weight: 500; }
.ed-key.txt { font: 500 15px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.ed-key.save { background: var(--primary); color: var(--on-primary); font: 600 17px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.ed-key.save.dim { opacity: .45; }
.ed-sheet.typing .ed-keys { display: none; }
.ed-sheet > .ed-pop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(10, 12, 30, .35); border-radius: inherit; }
.ed-popcard { width: 100%; max-height: 72%; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 22px; padding: 14px; display: grid; gap: 10px; align-content: start; box-shadow: 0 -10px 30px -12px rgba(20, 16, 60, .4); }
.ed-opts { display: grid; gap: 2px; }
.ed-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--text); text-align: left; font-size: 15px; cursor: pointer; }
.ed-opt > span:not(.tile) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-opt.on { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 600; }
.ed-opt .tile { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.ed-opt .tile.sm { width: 26px; height: 26px; border-radius: 8px; }
.ed-indent { padding-left: 22px; }
.ed-grp { padding: 8px 10px 2px; }
.ed-new { display: flex; gap: 8px; margin-top: 6px; }
.ed-new input { flex: 1; min-width: 0; font-size: 16px; }
.ed-new .btn { flex: none; white-space: nowrap; }
/* 账单行：多选的勾、侧滑露出的那一截 */
.ed-check { display: none; }
body.ed-selecting .row.click .ed-check { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 60%, transparent); }
body.ed-selecting .row.click.sel-on .ed-check { background: var(--primary); border-color: var(--primary); }
body.ed-selecting .row.click.sel-on .ed-check::after { content: "✓"; color: var(--on-primary); font-size: 13px; font-weight: 700; line-height: 1; }
body.ed-selecting .row.click.sel-on { background: color-mix(in srgb, var(--primary) 9%, transparent); }
.row.click.ed-tx { position: relative; }
@media (hover: none) { .row.click.ed-tx { touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }
.ed-clip { overflow: hidden; }
.ed-swstrip { position: absolute; top: 2px; bottom: 2px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: .45; transition: opacity .15s; }
.ed-swstrip.del { left: 100%; background: var(--expense); }
.ed-swstrip.copy { right: 100%; background: #5B8DEF; }
.ed-swstrip.armed { opacity: 1; }
.ed-swstrip.armed span { animation: ed-pop .22s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ed-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* #app 外面那一层：多选操作条、选项面板、删除确认、撤销提示 */
#ed-layer .modal.ed-lmodal { z-index: 45; }
.ed-bcard { display: grid; gap: 10px; align-content: start; }
.ed-cfrow { border-radius: 14px; padding: 0 10px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.ed-redbtn { background: var(--expense); color: #fff; border-color: transparent; font-weight: 600; }
.ed-selbar { position: fixed; z-index: 35; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(560px, calc(100% - 20px)); display: grid; gap: 10px; padding: 12px 14px; border-radius: 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid var(--stroke); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 10px 30px -10px rgba(40, 30, 120, .35), inset 0 1px 0 var(--shine); }
.ed-selhead { display: flex; align-items: center; gap: 10px; }
.ed-selhead b { flex: 1; }
.ed-selbar .chip { color: var(--text); }
.ed-selbtns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.ed-selbtns .btn { height: 42px; }
body.ed-selecting .wrap { padding-bottom: 260px; }
body.ed-selecting .fab { display: none; }
.ed-toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 9px 10px 9px 18px; border-radius: 999px;
  background: rgba(28, 30, 48, .92); color: #fff; font-size: 14px; box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .45); animation: ed-up .25s cubic-bezier(.2, .9, .3, 1.2); }
.ed-toast:not(:has(button)) { padding-right: 18px; }
.ed-toast button { border: 0; background: none; color: #b9adff; font-weight: 700; font-size: 14px; padding: 4px 8px; cursor: pointer; }
.ed-toast.top { bottom: auto; top: calc(env(safe-area-inset-top) + 14px); }
body.ed-selecting .ed-toast:not(.top) { bottom: 210px; }
@keyframes ed-up { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 720px) {
  .modal.ed-modal { padding: calc(env(safe-area-inset-top) + 6px) 0 0; }
  .ed-modal .card.ed-sheet { width: 100%; height: 100%; border-radius: 24px 24px 0 0; padding: 12px 12px calc(env(safe-area-inset-bottom) + 8px); }
  .ed-selbar { bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .ed-toast:not(.top) { bottom: calc(env(safe-area-inset-bottom) + 82px); }
  body.ed-selecting .ed-toast:not(.top) { bottom: calc(env(safe-area-inset-bottom) + 200px); }
}

/* 弹窗盖在手机底栏上面 */
.modal { z-index: 40; }
.subbar { display: none; }
@media (max-width: 720px) {
  .subbar { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; }
  .subbar b { font-size: 19px; }
  .subbar .round { width: 36px; height: 36px; font-size: 22px; line-height: 1; display: grid; place-items: center; }
}

/* 左上角标题：主题色 → 粉 → 蓝 的流光渐变字，慢慢来回流动 */
@keyframes titleFlow { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.top h1 {
  background: linear-gradient(100deg, var(--primary), #ff5c9a, #4fa8f0, var(--primary));
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleFlow 6s linear infinite alternate; font-weight: 800; letter-spacing: .5px;
}
@media (prefers-color-scheme: dark) { .top h1 { background-image: linear-gradient(100deg, #c4b8ff, #ff9cc4, #8fcaff, #c4b8ff); } }
@media (prefers-reduced-motion: reduce) { .top h1 { animation: none; } }

/* 语言切换：中 / EN 小胶囊 */
.lang-sw { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--stroke); }
.lang-sw button { border: 0; background: none; padding: 4px 11px; border-radius: 999px; font-size: 13px; color: var(--muted); cursor: pointer; }
.lang-sw button.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.login .lang-sw { position: absolute; top: 14px; right: 14px; }
.pw { position: relative; }
.pw .eye { position: absolute; right: 8px; bottom: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.login .hint { font-size: 13px; color: var(--muted); margin: -4px 0 0; }
/* 分段按钮：文字多（英文）时缩小内边距、不换行 */
.seg { min-width: 0; }
.seg button { padding: 7px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 420px) { .seg button { font-size: 13.5px; } }

/* ---------------------------------------------------------------- 全面屏适配（iPhone 装成桌面 App 时底部不留白）
   背景改画在一层固定的底板上，上下都伸出屏幕外，盖住刘海和底部横条区域；页面高度用动态视口单位。 */
html { background: var(--bg); min-height: 100%; height: -webkit-fill-available; }
html::before {
  content: ""; position: fixed; z-index: -2; pointer-events: none;
  left: 0; right: 0; top: calc(-1 * env(safe-area-inset-top) - 60px); bottom: calc(-1 * env(safe-area-inset-bottom) - 60px);
  background: var(--bg);
  background-image:
    radial-gradient(60vw 60vw at 5% 0%, color-mix(in srgb, var(--blob1) 75%, transparent), transparent 70%),
    radial-gradient(55vw 55vw at 100% 35%, color-mix(in srgb, var(--blob2) 70%, transparent), transparent 70%),
    radial-gradient(60vw 60vw at 10% 100%, color-mix(in srgb, var(--blob3) 70%, transparent), transparent 70%);
}
body { background: transparent; min-height: 100vh; min-height: 100dvh; }
@supports (height: 100lvh) { html::before { min-height: calc(100lvh + 120px); } }
/* 左右也留出安全区（横屏、灵动岛） */
@media (max-width: 720px) {
  .wrap { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .bottom-nav { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); }
}

/* iPhone：输入框文字小于 16px 时，一点输入 Safari 就会自动放大页面。输入框统一用 16px，页面不再跳。 */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, [contenteditable] { font-size: max(16px, 1em) !important; }
}
/* 点按时不要出现灰色高亮、文字不被意外选中；输入框里仍可选字 */
@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  button, .row, .me-item, .bottom-nav { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}
.ui-confirm { z-index: 60; }
.ui-confirm .card { width: min(360px, 100%); }
.btn.danger-fill { background: var(--expense); color: #fff; border-color: transparent; }
