/* ==========================================================================
   My Finance — styles. Light + dark themes, desktop sidebar, phone tab bar.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-3: #f0efec;
  --hover: rgba(11, 11, 11, 0.045);
  --border: rgba(11, 11, 11, 0.085);
  --border-2: rgba(11, 11, 11, 0.16);
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7c7a74;
  --accent: #2a78d6;
  --accent-2: #256abf;
  --accent-soft: #e8f1fc;
  --accent-ink: #ffffff;
  --pos: #006300;
  --pos-bg: #e5f3e5;
  --neg: #b42323;
  --neg-bg: #fcecec;
  --warn-ink: #7a4f00;
  --warn-bg: #fdf1d6;
  --gift-ink: #8a2f5c;
  --gift-bg: #fbe9f1;
  --grid: #e9e8e2;
  --axis: #c3c2b7;
  --s1: #2a78d6;
  --s2: #eb6834;
  --meter-track: #e3edf9;
  --meter-fill: #2a78d6;
  --meter-warn: #fab219;
  --meter-over: #d03b3b;
  --alloc-free: #dcdbd5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 16, 15, 0.04), 0 1px 6px rgba(16, 16, 15, 0.03);
  --shadow-lg: 0 18px 50px rgba(16, 16, 15, 0.22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 240px;
  --tabbar-h: 62px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f0e; --surface: #1a1a19; --surface-2: #1f1f1e; --surface-3: #2a2a28; --hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08); --border-2: rgba(255, 255, 255, 0.15);
    --text: #f0efec; --text-2: #c3c2b7; --text-3: #918f88;
    --accent: #3987e5; --accent-2: #5598e7; --accent-soft: #19304b; --accent-ink: #ffffff;
    --pos: #46c346; --pos-bg: #14301a; --neg: #f07a7a; --neg-bg: #3b1d1d;
    --warn-ink: #f3c35a; --warn-bg: #3a2d10; --gift-ink: #f0a3c6; --gift-bg: #3c1f2e;
    --grid: #2c2c2a; --axis: #3e3e3b; --s1: #3987e5; --s2: #d95926;
    --meter-track: #1c3250; --meter-fill: #3987e5; --alloc-free: #3a3a37;
    --shadow: none; --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0e; --surface: #1a1a19; --surface-2: #1f1f1e; --surface-3: #2a2a28; --hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08); --border-2: rgba(255, 255, 255, 0.15);
  --text: #f0efec; --text-2: #c3c2b7; --text-3: #918f88;
  --accent: #3987e5; --accent-2: #5598e7; --accent-soft: #19304b; --accent-ink: #ffffff;
  --pos: #46c346; --pos-bg: #14301a; --neg: #f07a7a; --neg-bg: #3b1d1d;
  --warn-ink: #f3c35a; --warn-bg: #3a2d10; --gift-ink: #f0a3c6; --gift-bg: #3c1f2e;
  --grid: #2c2c2a; --axis: #3e3e3b; --s1: #3987e5; --s2: #d95926;
  --meter-track: #1c3250; --meter-fill: #3987e5; --alloc-free: #3a3a37;
  --shadow: none; --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
code { font-size: 0.92em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
small { font-size: 12.5px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; }
.i.inline { width: 14px; height: 14px; vertical-align: -2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn .i { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--neg); }
.btn.danger-solid { background: var(--neg); color: #fff; border-color: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.mr-auto { margin-right: auto; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none;
  border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.link { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; }
.link .i { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px 14px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 550; font-size: 14.5px;
}
.side-nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.side-nav a.on { background: var(--accent-soft); color: var(--accent); }
.side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 4px 0 10px; border-top: 1px solid var(--border); }
.who { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .i { width: 16px; height: 16px; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 32px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar h1 { font-size: 24px; font-weight: 700; margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions .slot { display: flex; gap: 8px; }
.top-actions .slot:empty { display: none; }
.month-switch { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2px; }
.month-label { min-width: 128px; text-align: center; font-weight: 650; font-size: 14px; }
#view { padding: 4px 32px 48px; max-width: 1280px; transition: opacity 0.15s; }
#view.loading { opacity: 0.55; pointer-events: none; }
.page { display: flex; flex-direction: column; gap: 18px; }

.tabbar, .fab { display: none; }

/* ---------------------------------------------------------------- cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head.spaced { margin-top: 20px; }
.card h2, .section-head h2 { font-size: 15.5px; font-weight: 650; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; padding: 22px 24px; }
.hero-main { flex: 1 1 320px; min-width: 0; }
.hero-label, .tile-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hero-value { font-size: clamp(32px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin: 4px 0 6px; white-space: nowrap; }
.hero-value.muted { color: var(--text-3); }
.hero-sub { font-size: 13.5px; color: var(--text-2); }
.hero-split { flex: 1.3 1 440px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.split {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); min-width: 0;
}
.split:hover { text-decoration: none; border-color: var(--border-2); }
.split-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.split-label .i { width: 16px; height: 16px; }
.split-value { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-note { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12.5px; color: var(--text-2); }
.muted-tile .tile-value { color: var(--text-3); }
.warn-tile { border-color: color-mix(in srgb, var(--meter-over) 45%, transparent); }

/* meter */
.meter { height: 8px; border-radius: 999px; background: var(--meter-track); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--meter-fill); transition: width 0.4s; }
.meter[data-state="warn"] > span { background: var(--meter-warn); }
.meter[data-state="over"] > span { background: var(--meter-over); }

/* bar list (spending by category) */
.barlist { display: flex; flex-direction: column; gap: 4px; }
.bl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 7px 8px; border-radius: 10px; color: var(--text); }
a.bl-row:hover { background: var(--hover); text-decoration: none; }
.bl-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 550; font-size: 14px; }
.bl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-icon { width: 22px; text-align: center; flex: none; }
.bl-value { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; }
.bl-share { color: var(--text-3); font-weight: 550; font-size: 12px; margin-left: 8px; display: inline-block; min-width: 32px; }
.bl-track { grid-column: 1 / -1; height: 8px; }
.bl-bar { display: block; height: 100%; min-width: 3px; background: var(--s1); border-radius: 0 4px 4px 0; }

/* chart */
.chart { position: relative; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.chart-plot { width: 100%; min-height: 210px; }
.chart-plot svg { display: block; overflow: visible; }
.chart-plot .grid { stroke: var(--grid); stroke-width: 1; }
.chart-plot .axis { stroke: var(--axis); stroke-width: 1; }
.chart-plot .tick { fill: var(--text-3); font-size: 11.5px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-plot .hit { fill: transparent; cursor: pointer; }
.chart-plot .hit.on { fill: var(--hover); }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 180px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 10px 12px; font-size: 13px;
}
.tip-title { font-weight: 650; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.tip-row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.tip-row.net { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.chart-table { margin-top: 8px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.chart-table th:first-child, .chart-table td:first-child { text-align: left; }
.chart-table th { color: var(--text-2); font-weight: 600; }

/* ---------------------------------------------------------------- transaction list */
.tx-list { display: flex; flex-direction: column; }
.tx-day { display: flex; justify-content: space-between; padding: 14px 8px 4px; font-size: 12.5px; font-weight: 650; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tx-day:first-child { padding-top: 0; }
.tx-row, .owed-main, .owed-mini-row, .up-row, .rec-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 9px 8px; border: 0; border-radius: 12px; background: none;
  color: inherit; font: inherit; text-align: left;
}
.tx-row, .owed-main, .owed-mini-row { cursor: pointer; }
.tx-row:hover, .owed-main:hover, .owed-mini-row:hover { background: var(--hover); text-decoration: none; }
.tx-icon {
  width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3);
  display: grid; place-items: center; font-size: 19px; line-height: 1; color: var(--text-2); flex: none;
}
.tx-icon.income { background: var(--pos-bg); }
.tx-icon.transfer { background: var(--accent-soft); color: var(--accent); }
.tx-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.tx-main.as-btn { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.tx-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tx-amt.pos { color: var(--pos); }
.tx-amt.neutral { color: var(--text-2); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge .i { width: 12px; height: 12px; }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.good { background: var(--pos-bg); color: var(--pos); }
.badge.gift { background: var(--gift-bg); color: var(--gift-ink); }

.up-list, .rec-list, .owed-mini { display: flex; flex-direction: column; gap: 2px; }
.up-right { display: flex; align-items: center; gap: 10px; }
.up-row.late .tx-icon, .rec-row.late .tx-icon { box-shadow: inset 0 0 0 2px var(--meter-warn); }

/* empty state */
.empty { text-align: center; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-title { font-weight: 650; }
.empty-text { color: var(--text-2); font-size: 13.5px; max-width: 420px; }
.empty .btn { margin-top: 8px; }
.empty.boot { min-height: 80vh; justify-content: center; }

/* ---------------------------------------------------------------- welcome */
.welcome { text-align: center; padding: 34px 24px; }
.welcome h2 { font-size: 22px; margin: 10px 0 6px; }
.welcome-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.welcome-icon .i { width: 28px; height: 28px; }
.welcome-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 16px; }
.step {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px;
  border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer;
}
.step:hover { border-color: var(--accent); }
.step .i { color: var(--accent); width: 24px; height: 24px; margin-bottom: 4px; }
.step span { font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- accounts */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.acct-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px 20px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); overflow: hidden; min-width: 0;
}
.acct-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acct); }
.acct-card:hover { text-decoration: none; border-color: var(--border-2); }
.acct-card.archived { opacity: 0.6; }
.acct-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.acct-glyph { color: var(--acct); display: grid; }
.acct-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-last4 { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-inst { font-size: 12.5px; color: var(--text-3); margin-top: -4px; }
.acct-bal { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-note { font-size: 12.5px; color: var(--text-2); }
.acct-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.acct-meta .due { display: inline-flex; align-items: center; gap: 5px; }
.acct-meta .i { width: 14px; height: 14px; }
.acct-section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head .i { color: var(--text-2); }
.section-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.add-tile {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border-radius: 14px;
  border: 1.5px dashed var(--border-2); background: transparent; color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer;
}
.add-tile:hover { border-color: var(--accent); color: var(--accent); }
.archived-list summary { cursor: pointer; color: var(--text-2); font-weight: 600; margin-bottom: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.detail-grid .acct-card { padding: 22px 24px; }
.detail-grid .acct-bal { font-size: 34px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-actions .notes { grid-column: 1 / -1; margin: 4px 0 0; white-space: pre-wrap; }

/* ---------------------------------------------------------------- transactions page */
.filters { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 0 12px; }
.search .i { color: var(--text-3); }
.search input { border: 0; background: transparent; padding: 10px 0; min-height: 42px; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row select { width: auto; min-height: 36px; padding: 6px 30px 6px 10px; font-size: 14px; border-radius: 10px; }
.list-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0 4px; font-size: 13.5px; color: var(--text-2); }
.list-summary b { color: var(--text); font-variant-numeric: tabular-nums; }
.list-summary b.pos { color: var(--pos); }
.list-summary .btn { margin-left: auto; }
.list-card { padding: 10px 12px; }
.more-wrap:not(:empty) { padding: 8px; }

/* ---------------------------------------------------------------- budget */
.bs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bs-grid > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* Four money figures side by side need room; go 2×2 when the card is narrow (tablet, small laptop). */
.card:has(> .bs-grid) { container-type: inline-size; }
@container (max-width: 840px) { .bs-grid { grid-template-columns: 1fr 1fr; } }
.alloc { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.alloc-bar { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; }
.alloc-bar span { background: var(--s1); min-width: 2px; }
.alloc-bar span:nth-child(even) { background: color-mix(in srgb, var(--s1) 65%, var(--surface)); }
.alloc-bar span.free { background: var(--alloc-free); }
.budget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.blines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.bline { display: flex; flex-direction: column; gap: 7px; padding: 12px 4px; border-bottom: 1px solid var(--border); min-width: 0; }
.bline-top, .bline-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bline-name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bline-left { font-weight: 650; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bline-name .bl-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bline-act { display: flex; align-items: center; gap: 8px; flex: none; }
.bline-act .btn.sm { height: 34px; }
.bill-link { align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; font-weight: 550; }
.bill-link input { margin-top: 1px; }
.bline-input input { width: 120px; min-height: 34px; padding: 5px 10px; font-size: 14px; text-align: right; border-radius: 9px; font-variant-numeric: tabular-nums; }
.others summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.others summary::-webkit-details-marker { display: none; }
.others summary h2::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--text-3); transition: transform 0.15s; }
.others[open] summary h2::before { transform: rotate(90deg); }
.others[open] summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- owed */
.owed-hero { padding: 22px 24px; }
.party-card .card-head { margin-bottom: 10px; }
.party-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.party-amt { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.owed-items { display: flex; flex-direction: column; margin-top: 8px; }
.owed-item { border-bottom: 1px solid var(--border); padding: 4px 0 8px; }
.owed-item:last-child { border-bottom: 0; }
.owed-actions { display: flex; gap: 8px; padding-left: 60px; }
.party-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.tx-amt small { font-weight: 500; font-size: 12px; }

/* ---------------------------------------------------------------- settings / more */
.settings { columns: 2; column-gap: 18px; }
.settings > .card { break-inside: avoid; margin-bottom: 18px; display: inline-block; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip .i { width: 15px; height: 15px; color: var(--text-2); }
.chip.archived { opacity: 0.5; text-decoration: line-through; }
.more-list { display: flex; flex-direction: column; padding: 6px; }
.more-list a, .more-list button {
  display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 12px; border: 0; background: none;
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.more-list a:hover, .more-list button:hover { background: var(--hover); text-decoration: none; }
.more-list span { flex: 1; }
.more-list .i { color: var(--text-2); }
.more-list .chev { color: var(--text-3); }

/* ---------------------------------------------------------------- forms */
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { resize: vertical; min-height: 64px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
input[type="date"] { min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend, .group > legend { font-size: 13px; font-weight: 650; color: var(--text-2); }
.field > legend { margin-bottom: 6px; padding: 0; }
.field small { font-weight: 500; color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field-row.icon-name { grid-template-columns: 90px 1fr; }
.field-row.fluid { display: flex; }
.field-row.fluid > * { flex: 1 1 0; }

/* Tap-to-pick account buttons */
.acct-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 54px;
  padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface-2);
  cursor: pointer; transition: border-color 0.12s, background-color 0.12s; -webkit-tap-highlight-color: transparent;
}
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.pick:hover { border-color: var(--accent); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick:has(input:disabled) { opacity: 0.4; cursor: not-allowed; border-color: var(--border-2); }
.pick:has(input:disabled) input { cursor: not-allowed; }
.pick-glyph { color: var(--acct); display: grid; flex: none; }
.pick-glyph .i { width: 20px; height: 20px; }
.pick-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pick-name {
  font-weight: 650; font-size: 14px; color: var(--text); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.pick-text small { font-size: 12px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pick-bal { white-space: nowrap; }
.emoji-input { text-align: center; font-size: 22px; }
.hint { font-size: 12.5px; color: var(--text-2); margin: 0; font-weight: 500; }
.group { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.group > legend { padding: 0 6px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check.compact { font-size: 13.5px; color: var(--text-2); padding: 0 6px; }
.check.compact .i { width: 15px; height: 15px; vertical-align: -3px; }
.check.row { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.check.row:last-child { border-bottom: 0; }
.check .grow { flex: 1; min-width: 0; }
.checklist { display: flex; flex-direction: column; max-height: 220px; overflow: auto; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--neg-bg); color: var(--neg); font-weight: 600; font-size: 14px; }

.seg { display: flex; background: var(--surface-3); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  border: 0; background: transparent; border-radius: 9px; padding: 8px 8px; min-height: 36px;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.seg button .i { width: 16px; height: 16px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
:root[data-theme="dark"] .seg button.on { background: var(--surface-2); }

.amount-field { display: flex; align-items: baseline; gap: 10px; padding: 4px 2px 8px; border-bottom: 2px solid var(--border-2); }
.amount-field:focus-within { border-color: var(--accent); }
.amount-field .cur { font-weight: 650; color: var(--text-3); font-size: 18px; }
.amount-field input {
  border: 0; background: transparent; padding: 0; min-height: 0; border-radius: 0;
  font-size: 38px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.amount-field input:focus { outline: none; }
.party-row { display: flex; gap: 8px; }
.party-row select { flex: 1; }
.party-row .btn { height: 44px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }

.attach { display: flex; flex-direction: column; gap: 10px; }
.attach-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 650; color: var(--text-2); }
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.att { display: flex; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.att.pending { border-style: dashed; }
.att-thumb { width: 52px; height: 52px; border-radius: 9px; overflow: hidden; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb.file { display: flex; flex-direction: column; gap: 0; font-size: 10px; font-weight: 700; }
.att-thumb:hover { text-decoration: none; }
.att-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; flex-direction: column; }
.att-name small { color: var(--text-3); font-weight: 500; }
.linked { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 10px 12px; font-size: 13.5px; }
.linked-title { font-weight: 650; color: var(--text-2); margin: 2px 0 4px; }
.linked-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }

/* ---------------------------------------------------------------- modal */
dialog.modal {
  padding: 0; border: 0; background: transparent; color: var(--text);
  width: calc(100vw - 32px); max-width: 580px; max-height: calc(100dvh - 40px); overflow: visible;
}
dialog.modal.sm { max-width: 420px; }
dialog.modal::backdrop { background: rgba(8, 8, 8, 0.48); }
dialog.modal[open] { animation: pop 0.18s ease-out; }
dialog.modal.closing { animation: pop-out 0.16s ease-in forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
.modal-card {
  display: flex; flex-direction: column; max-height: calc(100dvh - 40px); overflow: hidden;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); }
.confirm-text { margin: 0; line-height: 1.5; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 30px 26px; box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 22px; }
.auth-card p { margin: -6px 0 4px; }
.auth-logo { border-radius: 14px; }
.boot-splash { min-height: 100vh; }
.auth-card.wide { max-width: 480px; }
.auth-card .center, .center { text-align: center; }
.auth-card > .boot-splash { min-height: 200px; }

/* Setup wizard */
.wiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wiz-dots { display: flex; gap: 6px; }
.wiz-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.wiz-dots span.done { background: var(--accent); opacity: 0.45; }
.wiz-dots span.on { background: var(--accent); width: 22px; border-radius: 4px; }
.wiz-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.wiz-actions .btn.primary { min-width: 130px; }
.wiz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wiz-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.wiz-list .i { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 1px; }
.wiz-warn { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; }
.wiz-done { display: grid; place-items: center; }
.wiz-done .i { width: 56px; height: 56px; color: var(--pos); }
.pw-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: -6px; }
.pw-meter span { height: 5px; border-radius: 3px; background: var(--surface-3); }
.pw-meter[data-level="1"] span:nth-child(-n+1) { background: var(--warn-ink); }
.pw-meter[data-level="2"] span:nth-child(-n+2) { background: var(--accent); }
.pw-meter[data-level="3"] span { background: var(--pos); }

/* Two-step verification */
.tfa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; }
.tfa-steps li::marker { font-weight: 700; color: var(--text-2); }
.tfa-steps b { font-weight: 650; }
.qr-box { margin: 10px 0 6px; width: 200px; max-width: 100%; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--border-2); }
.qr-box svg { display: block; width: 100%; height: auto; }
.tfa-manual { margin-top: 4px; }
.tfa-manual summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.tfa-manual[open] { display: flex; flex-direction: column; gap: 8px; }
.tfa-manual[open] summary { margin-bottom: 2px; }
.secret-row { display: flex; align-items: center; gap: 6px; }
.secret-key { font-size: 14px; letter-spacing: 0.04em; padding: 8px 10px; word-spacing: 0.2em; word-break: normal; overflow-wrap: break-word; flex: 1; user-select: all; }
.code-input { margin-top: 8px; font-size: 26px; font-weight: 650; letter-spacing: 0.18em; text-align: center; font-variant-numeric: tabular-nums; min-height: 54px; }
.code-input.recovery { font-size: 20px; letter-spacing: 0.08em; }
.code-input::placeholder { color: var(--text-3); opacity: 0.6; }
.rc-box { display: flex; flex-direction: column; gap: 12px; }
.rc-box p { margin: 0; }
.rc-grid { margin: 0; padding: 12px 14px 12px 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.rc-grid li { font-size: 12px; color: var(--text-3); }
.rc-grid code { font-size: 15px; color: var(--text); background: none; padding: 0; letter-spacing: 0.04em; }
.tfa-status { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--pos-bg); margin-bottom: 12px; }
.tfa-status .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tfa-icon .i { width: 24px; height: 24px; color: var(--pos); }
.card > .row-actions + .stack { margin-top: 18px; }
@media print {
  body * { visibility: hidden; }
  .rc-grid, .rc-grid * { visibility: visible; }
  .rc-grid { position: absolute; inset: 0 auto auto 0; background: #fff; border: 0; }
  .rc-grid code { color: #000; }
}

/* ---------------------------------------------------------------- toasts */
#toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: #1d1d1c; color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity 0.2s, transform 0.2s; text-align: center;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #b42323; }
:root[data-theme="dark"] .toast:not(.error) { background: #f0efec; color: #0b0b0b; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .blines { grid-template-columns: 1fr; }
  .settings { columns: 1; }
}

/* phones & small tablets: bottom tab bar + floating add button */
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: calc(env(safe-area-inset-top) + 12px) 16px 10px; gap: 8px; }
  .topbar h1 { font-size: 22px; }
  #view { padding: 2px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 92px); }
  .page { gap: 14px; }
  .grid { gap: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .tiles { gap: 12px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; font-weight: 600; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .i { width: 23px; height: 23px; }
  .fab {
    display: grid; place-items: center; position: fixed; z-index: 41; right: 16px;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
    width: 58px; height: 58px; border-radius: 18px; border: 0; cursor: pointer;
    background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .fab .i { width: 28px; height: 28px; stroke-width: 2.2; }
  #toasts { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 86px); }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .card { padding: 16px; border-radius: 14px; }
  .hero { padding: 18px 16px; }
  .hero-value { font-size: 34px; }
  .hero-split { flex-basis: 100%; grid-template-columns: 1fr 1fr; gap: 8px; }
  .split { padding: 10px 12px; }
  .split-value { font-size: 16.5px; }
  .tile { padding: 13px 14px; border-radius: 14px; }
  .tile-value { font-size: 19px; }
  .tile-label { font-size: 12.5px; }
  .bs-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .welcome-steps { grid-template-columns: 1fr; }
  .month-label { min-width: 0; font-size: 13.5px; padding: 0 2px; }
  .topbar .month-switch .btn { display: none; }
  .acct-grid { grid-template-columns: 1fr; }
  .owed-actions { padding-left: 0; }
  .party-foot .btn { width: 100%; }
  .detail-actions { grid-template-columns: 1fr 1fr; }
  .detail-actions .btn { padding: 0 10px; }
  .list-card { padding: 6px; }
  .tx-row { padding: 9px 6px; gap: 10px; }
  .up-row, .rec-row { gap: 10px; padding: 9px 4px; }
  .up-right { flex-direction: column; align-items: flex-end; gap: 5px; }
  .up-right .btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row select, .filter-row .check { flex: none; }
  .field-row.three { grid-template-columns: 1fr 1fr; }
  .field-row.three > :first-child { grid-column: 1 / -1; }

  /* bottom sheet */
  dialog.modal, dialog.modal.sm { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 94dvh; }
  .modal-card { border-radius: 22px 22px 0 0; max-height: 94dvh; border-bottom: 0; }
  .modal-card::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--border-2); margin: 8px auto -4px; }
  .modal-body { padding: 16px; }
  .modal-head { padding: 10px 10px 10px 16px; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .btn.mr-auto { flex: 0 0 auto; }
  .modal-foot .btn.mr-auto span { display: none; }
  dialog.modal[open] { animation: sheet 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
  dialog.modal.closing { animation: sheet-out 0.16s ease-in forwards; }
  @keyframes sheet { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
}

@media (max-width: 380px) {
  .seg button { font-size: 13px; padding: 8px 4px; }
  .seg button .i { display: none; }
  .split-value { font-size: 15px; }
  .tile-value { font-size: 17px; }
}
@media (max-width: 330px) {
  .hero-split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
