:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1f23;
  --muted: #7a828c;
  --line: #e6e8eb;
  --brand: #12a37b;
  --brand-soft: #e3f5ef;
  --danger: #d9443a;
  --chip: #f0f1f3;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  --radius: 14px;
  --tabbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --card: #1b1e21;
    --text: #e8eaed;
    --muted: #8d959f;
    --line: #2a2e33;
    --brand: #2bc193;
    --brand-soft: #173a30;
    --danger: #ef6a60;
    --chip: #262a2f;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top) + 10px) 16px 8px;
}
.topbar h1 { margin: 0; font-size: 22px; }

main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.view { display: none; }
.view.active { display: block; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin: 12px 0;
}
.card h3 { margin: 0 0 10px; font-size: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.card-head b { color: var(--text); }
.empty { color: var(--muted); text-align: center; padding: 18px 8px; list-style: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.center { text-align: center; }
.grow { flex: 1; }

/* 按钮 */
.btn {
  border: 0; border-radius: 12px;
  background: var(--chip);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
}
.btn:active { opacity: .75; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn.full { width: 100%; margin-top: 10px; }
.btn.huge {
  display: block; width: 100%;
  padding: 20px; margin-top: 4px;
  font-size: 22px; font-weight: 600;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(18, 163, 123, .3);
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.link { background: none; border: 0; color: var(--brand); padding: 8px 4px; cursor: pointer; font-size: 16px; }
.link.strong { font-weight: 600; }
.danger-text { color: var(--danger); }

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.input:focus { border-color: var(--brand); }
.input.inline { width: auto; padding: 6px 8px; }
textarea.input { resize: vertical; margin-top: 10px; }
#search { margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  border: 1px solid transparent;
  background: var(--chip);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.tag { font-size: 11px; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 1px 6px; margin-left: 4px; font-weight: 500; }

/* 正在做的事 */
.act-form { display: flex; gap: 8px; }
.act-run { text-align: center; }
.act-name { font-size: 20px; font-weight: 600; margin-top: 2px; word-break: break-all; }
.act-clock { font-size: 34px; font-variant-numeric: tabular-nums; font-weight: 300; margin: 4px 0; }

/* 记录列表 */
.rec-list { list-style: none; margin: 0; padding: 0; }
.rec { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.rec:first-child { border-top: 0; }
.rec-icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 10px; overflow: hidden;
  background: var(--chip);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.rec-icon img { width: 100%; height: 100%; object-fit: cover; }
.rec-main { flex: 1; min-width: 0; }
.rec-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.month-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.month-nav .btn { font-size: 22px; line-height: 1; padding: 4px 14px; }
.list-summary { color: var(--muted); font-size: 14px; margin: 10px 2px 0; }
.list-summary b { color: var(--text); }

/* 统计 */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.kpi .muted { font-size: 13px; }
.kpi b { font-size: 20px; font-variant-numeric: tabular-nums; }
.bar-row { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.bar { height: 10px; background: var(--chip); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.bar-value { font-variant-numeric: tabular-nums; text-align: right; }
.bar-value small { color: var(--muted); margin-left: 6px; display: inline-block; min-width: 30px; }
.daybars { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.daybar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.daybar i { display: block; width: 100%; background: var(--brand); border-radius: 2px 2px 0 0; }
.daybar-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; }
.act-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.act-row:first-of-type { border-top: 0; }

/* 设置 */
.switch-row, .setting-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--brand); }

/* 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; height: var(--tabbar-h);
  border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); cursor: pointer;
}
.tabbar button span { font-size: 20px; line-height: 1.2; filter: grayscale(1); opacity: .7; }
.tabbar button.active { color: var(--brand); font-weight: 600; }
.tabbar button.active span { filter: none; opacity: 1; }

/* 提醒横幅 */
.banner {
  position: sticky; top: calc(env(safe-area-inset-top) + 48px); z-index: 6;
  max-width: 528px; margin: 0 auto 4px;
  background: var(--brand); color: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  margin-inline: 16px;
}
@media (min-width: 560px) { .banner { margin-inline: auto; } }
.banner-text { display: flex; flex-direction: column; font-size: 14px; }
.banner-text b { font-size: 15px; }
.banner-actions { display: flex; gap: 4px; flex: none; }
.banner .btn.primary { background: #fff; color: var(--brand); }
.banner .btn.ghost { color: #fff; }

/* 记一笔弹层 */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel {
  background: var(--bg);
  width: 100%; max-width: 560px;
  height: 100%; max-height: 100%;
  display: flex; flex-direction: column;
}
@media (min-width: 600px) {
  .sheet { align-items: center; }
  .sheet-panel { height: auto; max-height: 92vh; border-radius: 18px; overflow: hidden; }
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top) + 6px) 12px 6px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 17px; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 8px 16px calc(env(safe-area-inset-bottom) + 24px); -webkit-overflow-scrolling: touch; }
.field { background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.field > label, .field.two label { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.field.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.field.two > div { display: flex; align-items: center; gap: 12px; }
.field.two label { flex: none; width: 6.5em; white-space: nowrap; }
.field.two .input { flex: 1; min-width: 0; width: auto; }
.field > .input { margin-top: 6px; }
.input.amount { font-size: 22px; font-weight: 600; padding: 6px 10px; }

.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos:not(:empty) { margin-top: 10px; }
.photo { position: relative; width: 76px; height: 76px; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.photo button {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .65); color: #fff;
  font-size: 15px; line-height: 22px; padding: 0; cursor: pointer;
}

.voice { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.mic {
  width: 84px; height: 84px; border-radius: 50%;
  border: 0; background: var(--brand); color: #fff;
  font-size: 36px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(18, 163, 123, .35);
  transition: transform .15s;
}
.mic:active { transform: scale(.94); }
.mic.recording { background: var(--danger); box-shadow: 0 0 0 0 rgba(217, 68, 58, .5); animation: pulse 1.3s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 68, 58, .5); }
  100% { box-shadow: 0 0 0 22px rgba(217, 68, 58, 0); }
}
.voice .hint { margin-top: 10px; }
.live { margin-top: 8px; background: var(--brand-soft); border-radius: 10px; padding: 8px 12px; width: 100%; min-height: 40px; }
.audio-box { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; }
.audio-box audio { flex: 1; min-width: 0; height: 40px; }

.viewer { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 20px); z-index: 40;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, .9); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; max-width: calc(100% - 32px); text-align: center;
}

/* ---------- 首页：说一句 ---------- */
.hero { text-align: center; padding: 22px 16px 14px; }
.mic.big { width: 124px; height: 124px; font-size: 52px; }
.mic.small { width: 44px; height: 44px; font-size: 20px; flex: none; box-shadow: none; }
.mic:disabled { opacity: .6; }
.hero-hint { margin-top: 12px; font-size: 17px; font-weight: 500; }
.hero .live { text-align: left; }
.ask-row { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.ask-row .input { flex: 1; min-width: 0; }
#view-review .ask-row { margin-top: 4px; }
.examples { text-align: left; }
.examples .chips { justify-content: center; }
.quick-row { display: flex; gap: 10px; }
.quick-row .btn { flex: 1; background: var(--card); box-shadow: var(--shadow); }
.follow .btn-row { margin-top: 10px; }

/* ---------- 回顾 ---------- */
.answer .q { color: var(--muted); font-size: 14px; }
.answer .a { font-size: 17px; line-height: 1.7; margin-top: 6px; }
.answer .btn-row { align-items: center; }
h4 { margin: 14px 0 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpill { background: var(--chip); border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.tagpill b { color: var(--brand); font-weight: 600; margin-left: 2px; }
.device-line { color: var(--muted); font-size: 12px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; }
.rec-note { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-amount.income { color: var(--brand); }
.month-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.month-row:first-of-type { border-top: 0; }
.month-label { flex: none; width: 82px; font-weight: 600; font-size: 14px; }
.month-main { flex: 1; min-width: 0; font-size: 14px; }

/* ---------- 时间 / 财富 ---------- */
.principle { font-size: 14px; line-height: 1.7; background: var(--brand-soft); box-shadow: none; }
.principle ol { padding-left: 20px; margin: 8px 0 0; line-height: 1.8; }
.principle summary { cursor: pointer; }
.callout { background: var(--chip); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.diag-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.diag-row:first-of-type { border-top: 0; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 2px; flex: none; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.seg.small button { padding: 4px 8px; font-size: 12px; }
.diag-row .seg button.active[data-tag="drop"] { color: var(--danger); }
.diag-row .seg button.active[data-tag="delegate"] { color: #b7791f; }
.check { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.check:first-of-type { border-top: 0; }
.check.na { opacity: .6; }
.networth { text-align: center; }
.big-number { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.nw-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 14px; }
.nw-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: 10px; color: var(--muted); }
.nw-bar i { display: block; width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; }
.nw-bar i.neg { background: var(--danger); }
.acct-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.acct-row:first-of-type { border-top: 0; }
.acct-icon { font-size: 22px; width: 32px; text-align: center; }
.neg-text { color: var(--danger); }
.card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid2 label, .grid3 label { font-size: 13px; color: var(--muted); display: block; }
.grid2 .input, .grid3 .input { margin-top: 4px; }
.fv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fv .kpi { background: var(--chip); box-shadow: none; padding: 10px; }
.fv .kpi b { font-size: 17px; }
.decision { border-top: 1px solid var(--line); padding: 10px 0; cursor: pointer; }
.decision .card-head { margin: 0; color: var(--text); }
.app-list { margin-top: 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
details summary { cursor: pointer; padding: 6px 0; }
.money-row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.money-row .input { flex: 1; min-width: 0; }
.field .grid2 { margin-top: 6px; }
.field > select.input, .field > textarea.input { margin-top: 6px; }
.field label + .input { margin-bottom: 4px; }
.toast-action { background: none; border: 0; color: #7ee2bf; font-weight: 600; margin-left: 8px; cursor: pointer; padding: 0; }
.card-head > span:first-child { flex: none; margin-right: 10px; }
.card-head > span:last-child { text-align: right; }

/* ---------- 多币种 / 报销 ---------- */
.money-row .input.currency { flex: none; width: auto; padding: 8px; }
.seg.reimb { margin-top: 10px; }
.badge { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; border-radius: 6px; background: #fdf0d5; color: #9a6400; }
.badge.done { background: var(--chip); color: var(--muted); }
.rec-amount.reimb { color: #b7791f; }
.cur-switch { text-align: center; margin-top: 10px; }
.cur-switch .chip { background: var(--brand-soft); color: var(--brand); }
.input.rate { width: 110px; }
@media (prefers-color-scheme: dark) {
  .badge { background: #3d2f12; color: #f0c56c; }
  .rec-amount.reimb { color: #f0c56c; }
}

/* ================= 折叠屏适配（Galaxy Z Fold 等） ================= */

/* 外屏：很窄（约 345–412px） */
@media (max-width: 400px) {
  main { padding: 0 10px; }
  .topbar { padding-inline: 12px; }
  .topbar h1 { font-size: 20px; }
  .card { padding: 12px; margin: 10px 0; }
  .hero { padding: 16px 12px 12px; }
  .mic.big { width: 100px; height: 100px; font-size: 42px; }
  .quick-row { gap: 8px; }
  .quick-row .btn { padding: 10px 6px; font-size: 14px; }
  .ask-row .btn { padding: 10px 12px; }
  .kpis { gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi b { font-size: 17px; }
  .big-number { font-size: 30px; }
  .bar-row { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; font-size: 13px; }
  .diag-row { flex-wrap: wrap; }
  .diag-row .seg { width: 100%; }
  .diag-row .seg button { flex: 1; }
  .grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid3 label:last-child { grid-column: 1 / -1; }
  .fv { grid-template-columns: minmax(0, 1fr); }
  .fv .kpi { display: flex; align-items: baseline; gap: 10px; }
  .fv .kpi b { margin-left: auto; }
  .month-label { width: 64px; font-size: 13px; }
  .tabbar button { font-size: 11px; }
  .chip { padding: 5px 10px; font-size: 13px; }
  .banner { margin-inline: 10px; flex-wrap: wrap; }
}

/* 内屏展开（约 700–900px，接近正方形）、平板、电脑：两栏 */
@media (min-width: 640px) {
  main { max-width: 1100px; padding: 0 24px; }
  .topbar { padding-inline: max(24px, calc((100% - 1100px) / 2 + 24px)); }
  .banner { max-width: 1052px; }
  #view-home.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
  }
  #view-home > :not(.today) { grid-column: 1; }
  #view-home > .today { grid-column: 2; grid-row: 1 / span 4; }
  #view-home > .quick-row { margin-bottom: 12px; }
  /* 卡片按两列瀑布流排列 */
  #review-body, #time-body, #wealth-body, #view-settings.active { columns: 2; column-gap: 20px; }
  #review-body > *, #time-body > *, #wealth-body > *, #view-settings > * { break-inside: avoid; }
  #review-body > :first-child, #time-body > :first-child, #wealth-body > :first-child, #view-settings > :first-child { margin-top: 12px; }
  .tabbar { justify-content: center; }
  .tabbar button { flex: 0 1 150px; }
  /* 记录编辑：更宽，字段两列 */
  .sheet-panel { max-width: 760px; }
  #sheet .sheet-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; align-content: start; }
  #sheet .sheet-body > .field:first-child, #sheet .sheet-body > #btn-delete { grid-column: 1 / -1; }
}

/* 横屏宽屏（电脑、平板横放）回顾和设置用三列 */
@media (min-width: 1200px) {
  #review-body, #view-settings.active { columns: 3; }
}

/* 半折叠·书本姿势（铰链竖着，左右两块屏）：两列正好落在铰链两边 */
@media (horizontal-viewport-segments: 2) {
  :root {
    --hinge: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px));
    --seg-w: env(viewport-segment-width 0 0, 50vw);
  }
  main, .topbar { max-width: none; padding-inline: 16px; }
  #view-home.active { column-gap: calc(var(--hinge) + 32px); }
  #review-body, #time-body, #wealth-body, #view-settings.active { columns: 2; column-gap: calc(var(--hinge) + 32px); }
  .tabbar { justify-content: space-around; }
  /* 编辑弹层放在右半屏，不压在铰链上 */
  .sheet { justify-content: flex-end; align-items: stretch; }
  .sheet-panel { width: env(viewport-segment-width 1 0, 50vw); max-width: none; height: 100%; max-height: 100%; border-radius: 0; }
  #sheet .sheet-body { display: block; }
}

/* 半折叠·笔记本姿势（铰链横着，上下两块屏）：首页上半屏看今天，下半屏放话筒 */
@media (vertical-viewport-segments: 2) {
  body:has(#view-home.active) { height: 100dvh; overflow: hidden; padding-bottom: 0; }
  body:has(#view-home.active) main {
    max-width: none;
    height: calc(env(viewport-segment-bottom 0 0, 50vh) - 56px - env(safe-area-inset-top));
    overflow-y: auto;
  }
  #view-home.active { display: block; }
  #view-home .hero {
    position: fixed; z-index: 4; margin: 0;
    left: 16px; right: 16px;
    top: calc(env(viewport-segment-top 0 1, 50vh) + 12px);
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    overflow: hidden;
  }
  #view-home .hero .examples > :not(.cur-switch) { display: none; }
  #view-home .hero .ask-row { width: min(560px, 100%); }
  .mic.big { width: 88px; height: 88px; font-size: 38px; }
  .sheet-panel { height: 100%; max-height: 100%; border-radius: 0; }
}

/* ---------- 凭证识别 ---------- */
.receipt-status { margin-top: 10px; background: var(--brand-soft); border-radius: 10px; padding: 8px 12px; font-size: 14px; line-height: 1.6; }
.receipt-status.busy { background: var(--chip); color: var(--muted); }
.receipt-field > label small { font-weight: 400; margin-left: 4px; }
.quick-row .btn { white-space: nowrap; }
@media (max-width: 400px) {
  .quick-row .btn { font-size: 13px; padding: 10px 4px; }
}

/* ---------- 账户 ---------- */
.acct-pick { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.acct-pick .input { flex: 1; min-width: 0; width: auto; }
.acct-pick > span { flex: none; width: 4.5em; }
#f-to-amount { flex-basis: 100%; }
.badge.company { background: #e3ecfb; color: #2f5fb3; }
.acct-balance { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.acct-balance b { font-size: 24px; font-variant-numeric: tabular-nums; }
.pos-text { color: var(--brand); }
.rec-amount.muted { color: var(--muted); }
@media (prefers-color-scheme: dark) { .badge.company { background: #1d2c47; color: #8db3f5; } }
.money-row { flex-wrap: wrap; }
#f-direction { flex-basis: 100%; display: flex; }
#f-direction button { flex: 1; }

/* ---------- 报销单预览 ---------- */
.report { position: fixed; inset: 0; z-index: 25; background: var(--bg); display: flex; flex-direction: column; }
.report-bar { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 6px) 12px 4px; background: var(--card); }
.report-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 12px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
#report-frame { flex: 1; width: 100%; border: 0; background: #e9ebee; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }

/* ---------- 多笔核对 ---------- */
.batch-summary { position: sticky; top: -8px; z-index: 1; background: var(--brand-soft); color: var(--text); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; margin-top: 8px; }
.batch-item { background: var(--card); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.batch-item.skipped { opacity: .45; }
.batch-top, .batch-row { display: flex; gap: 8px; align-items: center; }
.batch-row { margin-top: 8px; }
.batch-row .input { flex: 1; min-width: 0; width: auto; padding: 8px 10px; }
.batch-row .input.inline { flex: none; }
.batch-title { flex: 1; min-width: 0; font-weight: 600; }
.batch-amount { font-weight: 600; font-size: 17px; }
.batch-dur { max-width: 96px; }
.batch-reimb { flex: none; display: flex; align-items: center; gap: 4px; font-size: 14px; white-space: nowrap; }
.batch-reimb input { width: 18px; height: 18px; accent-color: var(--brand); }
.batch-photo { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.batch-note { margin-top: 6px; }

/* ---------- 拖入凭证 ---------- */
.drop-hint { position: fixed; inset: 0; z-index: 50; background: rgba(18, 163, 123, .88); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 24px; font-weight: 600; pointer-events: none; }
.drop-hint > div { border: 3px dashed rgba(255, 255, 255, .8); border-radius: 24px; padding: 40px 48px; line-height: 1.8; }
.drop-hint small { font-size: 15px; font-weight: 400; }
.desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) { .desktop-only { display: block; } }
