/* 记账：鲨鱼记账风精致移动端优先界面（暖亮黄沉浸顶栏 + 圆底双色手绘图标 + 左滑珊瑚红删除 + 底部中央凸起记账钮）。 */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2329;
  --muted: #8a9099;
  --line: #eff1f4;
  --line-strong: #e2e5ea;
  --brand: #ffd946;
  --brand-deep: #f5c618;
  --brand-soft: #fff7d1;
  --accent: #b76e00;
  --accent-strong: #8f5400;
  --accent-soft: #fff6cf;
  --coral: #ff5e5e;
  --coral-deep: #eb4848;
  --danger: #d93025;
  --danger-soft: #feefef;
  --warn: #b45309;
  --warn-soft: #fff4e0;
  --ok: #15803d;
  --income: #15803d;
  --radius: 14px;
  --tabbar-h: 58px;
  --topbar-h: 52px;
  --shell: 760px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; font-weight: 500; }
.boot { text-align: center; color: var(--muted); padding: 40vh 16px 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ——— 整体应用外壳与常规页暖黄顶栏 ——— */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  padding-right: 14px;
  background: linear-gradient(180deg, #ffde55 0%, var(--brand) 100%);
  color: #1f1f1f;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .05);
}
.topbar h1 {
  margin: 0;
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: .01em;
}
.topbar-center-title {
  margin-left: auto !important;
  margin-right: auto !important;
}
.back-btn {
  border: 0;
  background: rgba(255, 255, 255, .45);
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.back-btn:active { background: rgba(255, 255, 255, .72); }
.ledger-pill {
  width: auto;
  min-height: 32px;
  max-width: 150px;
  padding: 3px 26px 3px 11px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(31, 31, 31, .16);
  background-color: rgba(255, 255, 255, .58);
  color: #1f1f1f;
}
.page {
  padding: 14px 14px calc(var(--tabbar-h) + var(--safe-bottom) + 32px);
}

/* ——— 明细页：鲨鱼记账风暖亮黄沉浸式大顶栏 ——— */
.records-shell {
  min-height: 100vh;
}
.shark-header {
  background: linear-gradient(180deg, #ffdf59 0%, #ffd73b 100%);
  color: #1f1f1f;
  padding: calc(var(--safe-top) + 10px) 16px 40px;
}
.shark-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 36px;
  margin-bottom: 12px;
}
.shark-mascot {
  display: inline-flex;
  width: 30px;
  height: 30px;
}
.shark-mascot svg {
  width: 30px;
  height: 30px;
}
.shark-brand {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #222;
}
.shark-brand span {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.shark-brand span::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: #222;
  opacity: .78;
}
.shark-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shark-metrics {
  display: grid;
  grid-template-columns: auto 1px 1fr 1fr;
  align-items: end;
  column-gap: 16px;
  padding: 2px 2px 0;
}
.shark-label {
  display: block;
  font-size: 12px;
  color: rgba(31, 31, 31, .64);
  margin-bottom: 2px;
}
.shark-month-btn {
  border: 0;
  background: none;
  padding: 0 4px 0 0;
  text-align: left;
  cursor: pointer;
  color: #1f1f1f;
}
.shark-month-main {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.shark-month-num {
  font-size: 27px;
  font-weight: 650;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}
.shark-month-unit {
  font-size: 13.5px;
  font-weight: 600;
  margin-left: 1px;
}
.shark-caret {
  display: inline-flex;
  width: 11px;
  height: 11px;
  margin-left: 3px;
  transform: translateY(-1px);
}
.shark-caret svg { width: 11px; height: 11px; }
.shark-divider {
  width: 1px;
  height: 28px;
  background: rgba(31, 31, 31, .18);
  align-self: end;
  margin-bottom: 4px;
}
.shark-stat-col {
  min-width: 0;
}
.shark-num-wrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
}
.shark-num-int {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.shark-num-dec {
  font-size: 13.5px;
  font-weight: 500;
  opacity: .88;
}

/* ——— 压界白色悬浮五宫格快捷卡（金刚区） ——— */
.quick-card {
  position: relative;
  z-index: 10;
  margin: -26px 12px 6px;
  padding: 13px 6px 11px;
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(24, 28, 36, .06);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
.quick-item {
  border: 0;
  background: none;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: #333740;
}
.quick-item:active { opacity: .7; }
.quick-icon-wrap {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
}
.quick-svg, .quick-svg svg {
  width: 32px;
  height: 32px;
  display: block;
}
.quick-badge {
  position: absolute;
  top: -5px;
  left: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6255, #ff4545);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(255, 70, 70, .32);
}
.quick-label {
  font-size: 12px;
  color: #4b5059;
  white-space: nowrap;
}

/* ——— 明细页主体与筛选工具栏 ——— */
.records-body {
  padding-top: 4px;
}
.records-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 6px;
}
.tool-pill {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #4b5059;
  font-size: 12.5px;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.tool-pill.active {
  background: var(--brand-soft);
  border-color: #ebc22d;
  color: #1f1f1f;
  font-weight: 600;
}
.tool-pill:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.filter-card {
  margin-top: 4px;
  margin-bottom: 10px;
  padding: 12px;
}

/* ——— 底部 5 栏对称式导航 + 中央凸起暖黄大圆「＋」 ——— */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eceef2;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .03);
}
.tabbar-inner {
  max-width: var(--shell);
  margin: 0 auto;
  height: var(--tabbar-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}
.tab {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11.5px;
  color: #6f747e;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.tab-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}
.tab-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-icon svg .tab-fill {
  fill: none;
}
.tab.active {
  color: #1f1f1f;
  font-weight: 600;
}
.tab.active .tab-icon svg .tab-fill {
  fill: var(--brand);
}
.tab-center {
  justify-content: flex-end;
  padding-bottom: 6px;
}
.tab-plus-halo {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 -3px 10px rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-plus-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffdf52 0%, #ffd32b 100%);
  box-shadow: 0 4px 12px rgba(245, 194, 24, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .14s ease;
}
.tab-center:active .tab-plus-btn {
  transform: scale(.93);
}
.tab-plus-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #222;
  stroke-width: 2.15;
  stroke-linecap: round;
}

/* ——— 圆底双色手绘感分类小图标 ——— */
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.cat-icon svg {
  width: 25px;
  height: 25px;
  display: block;
}
.cat-icon.small-icon {
  width: 32px;
  height: 32px;
}
.cat-icon.small-icon svg {
  width: 20px;
  height: 20px;
}

/* ——— 每日分组与左滑珊瑚红删除组件 (<SwipeItem>) ——— */
.day-section {
  margin-bottom: 10px;
}
.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 6px;
  font-size: 12.5px;
  color: #9398a3;
  font-variant-numeric: tabular-nums;
}
.tx-list {
  border-radius: 14px;
}
.tx-row {
  padding: 12px 14px;
  min-height: 62px;
}
.tx-row .title {
  font-size: 15.5px;
  font-weight: 500;
  color: #1f2329;
}
.tx-row .sub {
  font-size: 12px;
  color: #9499a3;
  margin-top: 1px;
}
.tx-amount {
  font-size: 16px;
  font-weight: 550;
  color: #22262c;
  letter-spacing: -.01em;
}
.swipe-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  max-height: 120px;
}
.swipe-wrap:last-child {
  border-bottom: 0;
}
.swipe-wrap.open {
  background: var(--coral);
}
.swipe-wrap.removing {
  max-height: 0 !important;
  opacity: 0;
  border-bottom-width: 0;
  transition: max-height .16s ease, opacity .14s ease;
}
.swipe-track {
  position: relative;
  z-index: 2;
  background: var(--surface);
  will-change: transform;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.swipe-track.dragging {
  transition: none;
}
.swipe-track > .item {
  border-bottom: 0;
}
.swipe-del-btn {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 76px;
  border: 0;
  background: var(--coral);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
}
.swipe-wrap.open .swipe-del-btn {
  opacity: 1;
  pointer-events: auto;
}
.swipe-del-btn:active {
  background: var(--coral-deep);
}

/* ——— 年月选择网格面板 & 分类图标选择器网格 ——— */
.year-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 6px;
}
.year-current {
  font-size: 18px;
  font-weight: 700;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.month-cell {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.month-cell.on {
  background: var(--brand);
  border-color: #e6bc1f;
  color: #1f1f1f;
  font-weight: 700;
}
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 248px;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.icon-pick-cell {
  border: 1.5px solid transparent;
  background: none;
  border-radius: 12px;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.icon-pick-cell.selected {
  background: var(--brand-soft);
  border-color: #ebb914;
}
.icon-pick-cell.selected .cat-icon {
  background: var(--brand);
}
.icon-pick-name {
  font-size: 11px;
  color: #555b66;
  white-space: nowrap;
}

/* ——— 通用卡片、列表、按钮 ——— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(20, 28, 36, .04);
}
.card h2 { margin: 0 0 8px; font-size: 16px; }
.overview-hero-card {
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 65%);
  border: 1px solid #f5e7ad;
}
.section-title { margin: 18px 4px 8px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.list {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(20, 28, 36, .04);
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item:active { background: #f8f9fb; }
.item .title { font-weight: 500; }
.item .sub { font-size: 12.5px; color: var(--muted); }
.item .amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.amount.income { color: var(--income); }
.amount.neutral { color: var(--muted); }
a.item { color: inherit; font-weight: inherit; }
a.btn { text-decoration: none; }

.dropzone {
  border: 2px dashed #d6dbe3;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 34px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: #e0b100; background: var(--brand-soft); }
.dropzone.busy { opacity: .7; cursor: progress; }
.dropzone p { margin: 0; }
.dropzone .big { margin-bottom: 4px; font-size: 18px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--muted); }
.stat b { margin-left: 6px; font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.recon { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.recon li { padding: 3px 0; }
.mark { display: inline-block; width: 1.3em; color: var(--ok); font-weight: 700; }
.mark.bad { color: var(--danger); }
.chart { width: 100%; }
.bar { height: 8px; background: var(--line); border-radius: 4px; margin: 8px 0 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: #f2be1a; transition: width .25s; }
.bar.warn > span { background: #d97706; }
.bar.over > span { background: var(--danger); }
details > summary { list-style: revert; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.row > .ellipsis { min-width: 0; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; }
.summary b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.summary b.income { color: var(--income); }

.bubble {
  display: block;
  width: fit-content;
  max-width: 85%;
  margin-left: auto;
  padding: 9px 14px;
  background: var(--brand);
  color: #1f1f1f;
  font-weight: 500;
  border-radius: 16px 16px 4px 16px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-reply {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.55;
}
.diff-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 9px 12px;
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.55;
}
.diff-arrow { color: var(--accent); font-weight: 700; margin: 0 5px; }
.prompt-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.prompt-chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.prompt-chip:hover { border-color: #e5b81b; background: var(--brand-soft); }
.card.done { background: #f2fbf5; border: 1px solid #ccebd6; }
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--bg) 52%);
}
.login .card { width: 100%; max-width: 360px; margin: 0; }
.chatbar input { flex: 1; min-width: 0; }
.bulkbar, .chatbar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 32;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -4px 14px rgba(20, 28, 36, .07);
}
.bulkbar select { flex: 1; min-width: 0; }

/* ——— 按钮与胶囊标签 ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}
.btn, .link-btn { white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: var(--brand);
  border-color: #edc01c;
  color: #1f1f1f;
  font-weight: 650;
}
.btn.primary:active:not(:disabled) { background: var(--brand-deep); }
.btn.danger { color: var(--danger); border-color: #f5c6c6; background: var(--danger-soft); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; }
.btn.voice { padding: 0 12px; color: #5c4300; border-color: #ebd073; background: #fff9df; }
.btn.voice svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.voice.recording { background: var(--coral); border-color: var(--coral); color: #fff; animation: voice-pulse 1.4s ease-in-out infinite; }
.btn.voice.busy { background: var(--brand-soft); border-color: #e6bc1f; color: #1f1f1f; }
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 94, 94, .38); }
  50% { box-shadow: 0 0 0 6px rgba(255, 94, 94, 0); }
}
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 4px; font-size: 13.5px; font-weight: 500; }

.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--brand-soft);
  color: #7c5200;
  font-weight: 500;
  vertical-align: middle;
}
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.gray { background: #eef0f4; color: #6c727f; }
.chip.danger { background: var(--danger-soft); color: var(--danger); }

/* ——— 表单控件 ——— */
.field { display: block; }
.field > span.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  outline: none;
  font-size: 16px; /* 16px：iOS 不会因为字号小而自动放大视口 */
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: #e0b100;
  box-shadow: 0 0 0 3px rgba(255, 217, 70, .28);
}
input[type="checkbox"], input[type="radio"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: #e5b300;
}
.check { display: flex; align-items: center; gap: 8px; }
.seg { display: flex; background: #eceef2; border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1;
  min-height: 36px;
  border: 0;
  background: none;
  border-radius: 9.5px;
  cursor: pointer;
  font-weight: 500;
  color: #676d78;
}
.seg button.on {
  background: var(--brand);
  color: #1f1f1f;
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.error-text { color: var(--danger); font-size: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.notice.ok { background: #edf9f0; color: #166534; }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; line-height: 1.7; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.filters .wide { grid-column: 1 / -1; }
.filters > * { min-width: 0; }
.month-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.month-nav input { flex: 1; min-width: 0; text-align: center; }
.month-nav .btn { flex: none; }

/* ——— 底部弹层 ——— */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(18, 22, 28, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: var(--shell);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(22px + var(--safe-bottom));
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font-size: 17.5px; }

/* ——— 顶部轻提示（支持「撤销」交互按钮） ——— */
.toasts {
  position: fixed;
  z-index: 95;
  left: 0;
  right: 0;
  top: calc(var(--safe-top) + 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  background: rgba(31, 35, 41, .94);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  max-width: 520px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.toast.actionable {
  pointer-events: auto;
  padding-right: 10px;
}
.toast.error { background: var(--danger); }
.toast.ok { background: #1f2329; }
.toast-action {
  border: 0;
  background: var(--brand);
  color: #1f1f1f;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.toast-action:active {
  background: var(--brand-deep);
}

@media (min-width: 640px) {
  .icon-picker-grid { grid-template-columns: repeat(7, 1fr); }
}

@media (min-width: 900px) {
  .page { padding-top: 18px; }
  .records-body { padding-top: 8px; }
  .filters { grid-template-columns: 1fr 1fr 2fr; }
  .filters .wide { grid-column: auto; }
}
