:root {
  color-scheme: light dark;
  --bg: #f4f3ef;
  --card: #ffffff;
  --text: #1d1f1c;
  --muted: #868a83;
  --line: #e6e5df;
  --line2: #c4c8bf;
  --tile: #e9e8e2;
  --key: #ffffff;
  --key-fn: #e9e8e2;
  --shade: rgba(244,243,239,.65);
  --accent: #1f8a5b;
  --accent-soft: #e2f1e9;
  --expense: #1d1f1c;
  --income: #1f8a5b;
  --warn-bg: #fdf1d6;
  --warn: #8a5a00;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121412;
    --card: #1d201d;
    --text: #eceee9;
    --muted: #8f958c;
    --line: #2c302b;
    --line2: #454a43;
    --tile: #2a2e29;
    --key: #2a2e29;
    --key-fn: #1d201d;
    --shade: rgba(18,20,18,.7);
    --accent: #3fb07f;
    --accent-soft: #1c3329;
    --expense: #eceee9;
    --income: #4cc08c;
    --warn-bg: #3a2f14;
    --warn: #e6b75a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121412;
  --card: #1d201d;
  --text: #eceee9;
  --muted: #8f958c;
  --line: #2c302b;
  --line2: #454a43;
  --tile: #2a2e29;
  --key: #2a2e29;
  --key-fn: #1d201d;
  --shade: rgba(18,20,18,.7);
  --accent: #3fb07f;
  --accent-soft: #1c3329;
  --expense: #eceee9;
  --income: #4cc08c;
  --warn-bg: #3a2f14;
  --warn: #e6b75a;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(90px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left, 0px));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
.file-input { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* 顶栏 */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: var(--bg);
}
.bar h1 { font-size: 17px; margin: 0; font-weight: 600; }
.link { color: var(--accent); padding: 8px 4px; min-height: 40px; }
.link.danger { color: #c8452f; }
.center { text-align: center; margin-top: 14px; }

/* 登录 */
.auth { padding-top: 18vh; }
.auth h1 { font-size: 28px; margin: 0 0 4px; }
.auth p { margin: 0 0 28px; color: var(--muted); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; outline: none;
}
.input:focus { border-color: var(--accent); }
.btn {
  width: 100%; height: 52px; border-radius: 14px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 17px;
}
.btn:disabled { opacity: .55; }

/* 顶部：月份 + 筛选，固定在上面 */
.head { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 0 16px 6px; background: var(--bg); }
.head .bar { position: static; margin: 0; padding-left: 0; padding-right: 0; }
.month { display: flex; align-items: center; }
.month button { width: 36px; height: 40px; font-size: 22px; color: var(--muted); }
.month strong { display: block; min-width: 104px; text-align: center; font-size: 18px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sep { flex: none; width: 1px; height: 18px; background: var(--line); }
.in { color: var(--income); }
.totals { font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.totals b { color: var(--text); font-size: 15px; }
.totals b.in { color: var(--income); }

/* 时间轴：左边时间，中间竖线和圆点，右边内容卡片 */
.tl { position: relative; }
.tl-day { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 18px 2px 10px; font-size: 12px; color: var(--muted); }
.tl-day b { color: var(--text); font-size: 15px; font-weight: 600; }
.item { position: relative; display: grid; grid-template-columns: 66px 1fr; padding-bottom: 12px; }
.item::before { content: ""; position: absolute; left: 52px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--c) 30%, var(--bg)); }
.rail { position: relative; padding-top: 12px; }
.rail time { display: block; width: 36px; text-align: right; font-size: 12px; color: var(--muted); line-height: 24px; }
.rail i {
  position: absolute; left: 41.5px; top: 12px; width: 24px; height: 24px; border-radius: 8px;
  background: var(--c); color: #fff; font-style: normal; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg);
}
.entry { display: block; width: 100%; min-width: 0; text-align: left; background: var(--card); border-radius: 16px; overflow: hidden; margin-left: 6px; width: calc(100% - 6px); }
.entry .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px 10px; }
.what { min-width: 0; }
.what span { display: block; font-size: 12px; font-weight: 600; color: var(--c); }
.what b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .amt { flex: none; font-size: 22px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.entry .amt.todo { font-size: 12px; font-weight: 600; letter-spacing: 0; background: var(--warn-bg); color: var(--warn); padding: 3px 9px; border-radius: 999px; }
.amt.income { color: var(--income); }
.mosaic { display: grid; gap: 3px; margin: 0 10px; border-radius: 12px; overflow: hidden; }
.mosaic.m1 { aspect-ratio: 16 / 10; }
.mosaic.m2 { aspect-ratio: 2 / 1; grid-template-columns: 1fr 1fr; }
.mosaic.m3 { aspect-ratio: 2 / 1; grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr; }
.mosaic.m3 > :first-child { grid-row: span 2; }
.tile { position: relative; overflow: hidden; background: var(--tile); display: grid; place-items: center; color: var(--muted); font-size: 13px; min-height: 0; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .more { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 600; }
.entry .s { padding: 8px 14px 10px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .top + .s { padding-top: 0; }
.tail { text-align: center; color: var(--muted); font-size: 12px; padding: 14px 0; min-height: 20px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* 底部居中的浮动「＋」 */
.fab {
  position: fixed; z-index: 8; left: 50%; margin-left: -26px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 26px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 0 0 4px var(--bg), 0 8px 18px rgba(31,138,91,.35); transition: transform .15s, background .15s;
}
.fab:active { transform: scale(.94); }
.fab.open { transform: rotate(45deg); background: var(--text); color: var(--bg); }
.fab-more {
  position: fixed; z-index: 8; left: 50%; margin-left: 38px; bottom: calc(27px + env(safe-area-inset-bottom));
  width: 40px; height: 34px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-weight: 700; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.fab-shade { position: fixed; inset: 0; z-index: 7; background: var(--shade); }
.fab-menu {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: calc(86px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 10px;
}
.fab-menu[hidden], .fab-shade[hidden] { display: none; }
.fab-menu > * {
  min-width: 84px; text-align: center; padding: 12px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.1);
}

/* 页面内相机：连续拍 */
.cam { position: fixed; inset: 0; z-index: 30; background: #000; color: #fff; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.on { animation: camflash .18s ease-out; }
@keyframes camflash { from { opacity: .7; } to { opacity: 0; } }
.cam-hint { position: absolute; left: 0; right: 0; top: 45%; text-align: center; color: rgba(255,255,255,.7); }
.cam-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.cam-top button { color: #fff; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.4); font-size: 15px; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 0 calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.7) 40%); }
.cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; min-height: 76px; scrollbar-width: none; }
.cam-strip::-webkit-scrollbar { display: none; }
.cam-strip > div { position: relative; flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 2px solid #fff; }
.cam-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-strip button { position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; border-bottom-left-radius: 8px; }
.cam-ctl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; }
.cam-shutter { width: 72px; height: 72px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #000, 0 0 0 7px #fff; }
.cam-shutter:active { transform: scale(.92); }
.cam-done { justify-self: end; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; padding: 12px 18px; border-radius: 999px; }
.cam-done:disabled { background: rgba(255,255,255,.2); color: rgba(255,255,255,.6); }

/* 设置 */
.opt { display: grid; width: 100%; text-align: left; padding: 12px 0; border-top: 1px solid var(--line); position: relative; }
.card > .opt:first-child, .card h2 + .opt { border-top: 0; }
.opt b { font-size: 16px; font-weight: 600; }
.opt span { font-size: 13px; color: var(--muted); }
.opt.on::after { content: "✓"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 20px; font-weight: 700; }
.opt.on b { color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin: -6px 4px 14px; }
.acts { display: flex; align-items: center; gap: 6px; }
.link.muted { color: var(--muted); }
.chip.add { border-style: dashed; color: var(--accent); background: none; }

/* 统计 */
.month.small strong { min-width: 84px; font-size: 15px; }
.month.small button { height: 32px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
.tiles > div { background: var(--card); border-radius: 14px; padding: 10px 10px 9px; min-width: 0; }
.tiles span, .tiles small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0; }
.card.chart { padding: 12px 14px; }
.ctitle { display: flex; justify-content: space-between; align-items: center; }
.ctitle h2 { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend i, .readout i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.ymax { font-size: 11px; color: var(--muted); border-bottom: 1px dashed var(--line); padding: 6px 0 2px; }
.bars { display: flex; align-items: stretch; height: 132px; }
.bars.scroll { overflow-x: auto; }
.bcol { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; border-radius: 6px; }
.bars.scroll .bcol { flex: 0 0 22px; }
.bcol.sel { background: var(--tile); }
.pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1px; border-bottom: 1px solid var(--line); }
.pair i { display: block; width: 42%; max-width: 9px; border-radius: 3px 3px 0 0; }
.bcol span { height: 18px; font-size: 10px; color: var(--muted); line-height: 18px; white-space: nowrap; overflow: visible; text-align: center; }
.readout { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); min-height: 24px; padding-top: 6px; }
.readout b { color: var(--text); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 2px; }
.seg2 .chip { padding: 9px 0; text-align: center; }
h3 { font-size: 16px; margin: 18px 2px 10px; display: flex; justify-content: space-between; align-items: baseline; }
h3 span { font-size: 12px; font-weight: 400; color: var(--muted); }
.catgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat { display: block; text-align: left; background: var(--card); border-radius: 16px; overflow: hidden; min-width: 0; }
.cover { position: relative; aspect-ratio: 4 / 3; display: grid; gap: 2px; background: color-mix(in srgb, var(--c) 16%, var(--card)); }
.cover.c2 { grid-template-columns: 1fr 1fr; }
.cover.c3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.cover.c3 > img:first-child { grid-row: span 2; }
.cover img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.cover em, .tphoto em { font-style: normal; font-size: 40px; font-weight: 700; color: var(--c); display: grid; place-items: center; }
.pct { position: absolute; right: 8px; top: 8px; background: rgba(20,22,20,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.cinfo { padding: 9px 12px 12px; }
.cname { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cname i { flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.cname b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cname span { flex: none; margin-left: auto; font-size: 11px; color: var(--muted); }
.camt { font-size: 18px; font-weight: 700; letter-spacing: -.3px; margin: 1px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.cbar i { display: block; height: 100%; border-radius: 2px; background: var(--c); }
.toprow { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.toprow::-webkit-scrollbar { display: none; }
.topcard { flex: none; width: 132px; text-align: left; }
.tphoto { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, var(--card)); display: grid; margin-bottom: 6px; }
.tphoto img { width: 100%; height: 100%; object-fit: cover; }
.rank { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(20,22,20,.72); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.topcard b { display: block; font-size: 16px; }
.topcard > span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; width: 100%; text-align: left; padding: 10px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow span { font-size: 13px; color: var(--muted); }
.prow .cbar { grid-column: span 2; }

/* 记一笔：照片 + 大数字 */
.shots { display: flex; gap: 8px; overflow-x: auto; margin: 4px -16px 6px; padding: 0 16px 4px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { position: relative; flex: none; height: 132px; min-width: 120px; border-radius: 14px; overflow: hidden; background: var(--tile); display: grid; place-items: center; color: var(--muted); font-size: 12px; padding: 0 12px; }
.shot img { height: 132px; width: auto; max-width: 220px; object-fit: cover; display: block; margin: 0 -12px; }
.shot button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; line-height: 1; }
.shots.small .shot, .shots.small .shot img { height: 96px; }
.shots.small .shot { min-width: 96px; }
.addshot { flex: none; background: none; width: 96px; border-radius: 14px; border: 1.5px dashed var(--line2); color: var(--accent); font-weight: 600; display: grid; place-items: center; text-align: center; cursor: pointer; min-height: 96px; }
.bigamt { display: flex; align-items: flex-start; justify-content: center; gap: 6px; padding: 8px 0 10px; text-align: center; }
.bigamt i { font-style: normal; font-size: 24px; font-weight: 600; color: var(--muted); line-height: 56px; }
.expr { font-size: 46px; font-weight: 700; letter-spacing: -1px; line-height: 56px; word-break: break-all; }
.expr.empty { color: var(--line2); }
.result { font-size: 15px; color: var(--muted); min-height: 20px; }
.form { padding-bottom: 250px; }

/* 自带数字键盘 */
.pad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
}
.pad[hidden] { display: none; }
.pad button {
  height: 50px; border-radius: 12px; background: var(--key); font-size: 22px; font-weight: 500;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.pad button:active { filter: brightness(.9); }
.pad .fn { background: var(--key-fn); color: var(--muted); }
.pad .again { font-size: 16px; font-weight: 600; color: var(--accent); }
.pad .ok { background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; }
.pad.busy { opacity: .6; pointer-events: none; }
.typesw { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.extra { display: grid; grid-template-columns: 150px 1fr; gap: 8px; margin: 10px 0 16px; }
.extra .input { height: 44px; min-width: 0; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* 详情 */
.hero { text-align: center; padding: 4px 0 14px; }
.hero .amt { font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.hero .amt.todo { font-size: 14px; letter-spacing: 0; color: var(--warn); background: var(--warn-bg); padding: 4px 12px; border-radius: 999px; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.files { display: grid; gap: 10px; margin-bottom: 12px; }
.files a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--card); color: inherit; text-decoration: none; }
.files img { width: 100%; display: block; max-height: 75vh; object-fit: contain; background: var(--tile); }
.files .doc { padding: 16px; display: flex; gap: 12px; align-items: center; }
.files .doc b { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; }
.files .meta { padding: 8px 14px 10px; font-size: 12px; color: var(--muted); word-break: break-all; }
.addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.addrow label, .addrow button { height: 48px; border-radius: 14px; border: 1.5px dashed var(--line2); color: var(--accent); font-weight: 600; display: grid; place-items: center; cursor: pointer; }
.card { background: var(--card); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 14px; }
.card h2 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 12px 0 4px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.card h2 + .row { border-top: 0; }
.row span:first-child { flex: none; color: var(--muted); }
.row span:last-child { text-align: right; word-break: break-all; }

#toast {
  position: fixed; left: 50%; top: 40%; transform: translateX(-50%);
  background: rgba(20,26,23,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; max-width: 80vw; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20;
}
#toast.show { opacity: 1; }

/* 时间轴图标 */
.rail i.emo { background: color-mix(in srgb, var(--c) 22%, var(--card)); font-size: 14px; }

/* 左滑：修改 / 删除 */
.swipe { position: relative; margin-left: 6px; border-radius: 16px; overflow: hidden; min-width: 0; }
.swipe .entry { margin-left: 0; width: 100%; position: relative; touch-action: pan-y; will-change: transform; }
.swipe-acts { visibility: hidden; position: absolute; top: 0; right: 0; bottom: 0; width: 132px; display: grid; grid-template-columns: 1fr 1fr; }
.swipe-acts button { color: #fff; font-size: 15px; font-weight: 600; }
.swipe-acts .edit { background: #5d6b7a; }
.swipe-acts .del { background: #cf4a35; }

/* 搜索、提示条、等待上传 */
.searchrow { display: flex; gap: 6px; align-items: center; padding-bottom: 8px; }
.search { height: 40px; border-radius: 999px; }
.banner { background: var(--warn-bg); color: var(--warn); font-size: 13px; padding: 10px 14px; border-radius: 12px; margin: 10px 0; }
.waitbox { margin-top: 12px; padding-bottom: 6px; }
.waitbox h2 { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.waitbox h2 .link { padding: 0; min-height: 0; }
.wrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.wthumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--tile); display: grid; place-items: center; }
.wthumb img { width: 100%; height: 100%; object-fit: cover; }
.wthumb i { font-style: normal; }
.wrow b { display: block; font-size: 16px; }
.wrow span { display: block; font-size: 12px; color: var(--muted); }
.wrow .link { padding: 0; min-height: 0; }

/* 提示条上的按钮（撤销） */
#toast.act { pointer-events: auto; display: flex; align-items: center; gap: 14px; top: auto; bottom: calc(92px + env(safe-area-inset-bottom)); }
#toast button { color: #7fe0b3; font-weight: 700; }

/* 全屏看照片 */
.viewer { position: fixed; inset: 0; z-index: 40; background: #000; }
.vtrack { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.vtrack::-webkit-scrollbar { display: none; }
.vslide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.vslide img { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.vbar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; color: #fff; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.vbar button { width: 40px; height: 40px; color: #fff; font-size: 28px; line-height: 1; }
.vbar a { color: #fff; font-size: 14px; padding: 8px; text-decoration: none; }

/* 轻微的进场过渡 */
.tl, .form, .card, .catgrid, .tiles { animation: fadein .18s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.swipe.show .swipe-acts { visibility: visible; }

/* 页面内的确认 / 输入框 */
.ask { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 24px; }
.askbox { width: 100%; max-width: 320px; background: var(--card); border-radius: 18px; padding: 20px 18px 12px; }
.askbox p { margin: 0 0 14px; font-size: 16px; font-weight: 600; text-align: center; }
.askbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.askbtns button { height: 46px; border-radius: 12px; background: var(--tile); font-weight: 600; }
.askbtns .primary { background: var(--accent); color: #fff; }
.askbtns .danger { background: #cf4a35; color: #fff; }

.trialnote { font-size: 12px; margin: 14px 0 0; }
