@font-face { font-family: 'DM Sans'; src: url('dm-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('instrument-serif.woff2') format('woff2'); font-weight: 400; font-display: swap; }

body { margin: 0; }
#capari-budget-preview {
  --ink: light-dark(#19243e, #f1f3ff);
  --muted: light-dark(#65718a, #aab6d0);
  --paper: light-dark(#f4f5fb, #101525);
  --panel: light-dark(#ffffff, #1b2338);
  --line: light-dark(#e5e8f2, #313c55);
  --soft: light-dark(#edf0fc, #273450);
  --accent: light-dark(#3f56bd, #b7c6ff);
  --action: light-dark(#4259c9, #bac8ff);
  --action-text: light-dark(#ffffff, #17224b);
  --warm: light-dark(#945316, #ffd09b);
  --warm-bg: light-dark(#fff0dd, #473624);
  --error: light-dark(#b23840, #ffb7bf);
  --error-bg: light-dark(#fff0f0, #462c3b);
  --cat: light-dark(#4b61be, #adc2ff);
  --cat-bg: light-dark(#eaf0ff, #293956);
  --shadow: light-dark(0 6px 22px #283a6810, 0 6px 22px #00000012);
  font: 400 14px/1.45 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--ink); background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}
#capari-budget-preview[data-theme="light"] { color-scheme: light; }
#capari-budget-preview[data-theme="dark"] { color-scheme: dark; }
#capari-budget-preview *, #capari-budget-preview *::before, #capari-budget-preview *::after { box-sizing: border-box; }
#capari-budget-preview [hidden] { display: none !important; }
:is(h1,h2,h3,p,ul,dl,dd) { margin: 0; }
button,input,textarea,select { font: inherit; }
button { color: inherit; cursor: pointer; }
:is(button,input,textarea,select,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
svg { display: block; inline-size: 20px; block-size: 20px; flex: none; stroke-width: 1.8; }
.phone { min-block-size: 100dvh; display: flex; flex-direction: column; background: var(--paper); overflow-anchor: none; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 20px 20px; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark { inline-size: 40px; block-size: 40px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg,#283e88,#6970db); font: 400 31px/1 'Instrument Serif',Georgia,serif; box-shadow: 0 4px 10px #4555a526; }
.brand h1 { font-size: 23px; font-weight: 700; line-height: 1.1; letter-spacing: -.05em; }
.brand .support { font-size: 10px; letter-spacing: .05em; margin-top: 3px; }
.support { font-size: 12px; color: var(--muted); }
.eyebrow { display: block; font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--muted); line-height: 1.6; }
.head-actions { display: grid; justify-items: end; }
.theme-button { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); font-size: 11px; font-weight: 600; }
.theme-button svg { inline-size: 17px; block-size: 17px; color: var(--accent); }
.screen { padding: 0 20px 24px; display: grid; align-content: start; gap: 18px; flex: 1; animation: screen-in 200ms ease-out both; min-inline-size: 0; }
.global-message { margin: 0 20px 14px; }
.global-message[data-tone="success"] { position: fixed; z-index: 4; inset-inline: 16px; inset-block-end: calc(86px + env(safe-area-inset-bottom)); inline-size: fit-content; margin: 0 auto; border: 1px solid var(--line); box-shadow: var(--shadow); pointer-events: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-inline-size: 0; }
.inline { display: inline-flex; align-items: center; gap: 8px; min-inline-size: 0; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.035em; }
h3 { font-size: 14px; font-weight: 700; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.page-title h2 { font-size: 29px; line-height: 1.25; margin: 3px 0 4px; letter-spacing: -.045em; }
.page-title .support { font-size: 12px; }
.page-symbol { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 18px; color: var(--accent); background: var(--soft); transform: rotate(7deg); }
.page-symbol svg { width: 24px; height: 24px; transform: rotate(-7deg); }
.page-symbol.lilac { color: light-dark(#7651aa,#d3b8ff); background: light-dark(#e9def9,#3d2e57); }
.page-symbol.coral { color: light-dark(#b85c50,#ffb7a7); background: light-dark(#fce4dc,#47313a); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 17px; box-shadow: var(--shadow); }
.sections { display: grid; gap: 12px; min-inline-size: 0; }
.budget-overview { min-inline-size: 0; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 15px 19px 0; color: #fff; border: 1px solid #ffffff14; border-radius: 25px; background: radial-gradient(ellipse at 105% -10%,#8189ee88,transparent 65%),linear-gradient(120deg,#182650,#344fae); box-shadow: 0 9px 24px #273d8626; }
.hero::before { content: ''; position: absolute; z-index: -1; pointer-events: none; width: 180px; height: 180px; right: -77px; top: 4px; border: 1px solid #c3ccff20; border-radius: 50%; box-shadow: 0 0 0 22px #c3ccff08,0 0 0 46px #c3ccff06; }
.hero .period { font-size: 10px; font-weight: 500; color: #e0e6ff; }
.hero .period svg { width: 14px; height: 14px; }
.hero .plain { color: #e0e6ff; font-size: 11px; }
.hero .plain svg { width: 14px; height: 14px; }
.hero .plain:focus-visible { outline-color: #fff; }
.hero-label { margin-top: 4px; color: #e3e9ff; font-size: 12px; }
.balance { display: block; font-size: clamp(31px,10vw,43px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.045em; overflow-wrap: anywhere; margin: 5px 0 11px; }
.hero-countdown { gap: 5px; border-radius: 20px; background: #ffffff12; padding: 5px 9px; }
.hero-countdown svg { width: 12px; height: 12px; color: #dddcff; }
.hero-meta { color: #e2e8ff; font-size: 10px; }
.hero .coverage-note { padding: 8px 10px; margin-top: 12px; border: 1px solid #ffddaa50; border-radius: 10px; color: #fff1d7; background: #ffe1aa16; font-size: 11px; }
.budget-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border-top: 1px solid #c7d0ff30; margin-top: 15px; padding: 11px 0 14px; }
.budget-metric { min-width: 0; }
.budget-metric .support { color: #d6defa; font-size: 10px; }
.budget-metric .inline { gap: 4px; }
.budget-metric svg { width: 12px; height: 12px; }
.budget-metric strong { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: 4px; }
[data-kind="food"],[data-kind="parking"],[data-kind="electricity"],[data-kind="gold"] { --cat: light-dark(#a85a2b,#ffc69b); --cat-bg: light-dark(#ffead7,#48342d); }
[data-kind="snack"],[data-kind="gift"] { --cat: light-dark(#9b4678,#efb1da); --cat-bg: light-dark(#f7e1ef,#462d49); }
[data-kind="fuel"],[data-kind="laundry"],[data-kind="data"] { --cat: light-dark(#326b9c,#a1d2ff); --cat-bg: light-dark(#e0f0fc,#233c54); }
[data-kind="rent"],[data-kind="subscription"] { --cat: light-dark(#7351ad,#ceb8ff); --cat-bg: light-dark(#eee4ff,#3a2f56); }
[data-kind="shopping"] { --cat: light-dark(#aa554e,#ffb9b1); --cat-bg: light-dark(#ffe6e0,#4b313b); }
.icon { display: grid; place-items: center; inline-size: 40px; block-size: 40px; flex: 0 0 40px; color: var(--cat); background: var(--cat-bg); border-radius: 14px; }
.icon svg { width: 20px; height: 20px; }
.food { display: grid; gap: 8px; padding-block: 14px 8px; background: light-dark(#fff7ee,#302938); border-color: light-dark(#f5e4d5,#493c46); box-shadow: none; }
.food .eyebrow { color: light-dark(#925b3e,#d3b8a5); font-size: 8px; }
.food h2 { font-size: 15px; }
.food .inline { gap: 9px; }
.food .icon { --cat: light-dark(#a3512b,#ffc49b); --cat-bg: light-dark(#ffe2ca,#513b36); }
.food-amount { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.food-amount strong { font-size: 16px; }
.food .plain { font-size: 12px; flex: none; }
.status { border-radius: 9px; padding: 5px 8px; background: var(--soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.food .status { background: light-dark(#fff,#413647); color: var(--ink); max-width: 48%; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
[data-tone="near"] { color: var(--warm) !important; background: var(--warm-bg) !important; }
[data-tone="over"] { color: var(--error) !important; background: var(--error-bg) !important; }
.track { background: light-dark(#e9edf5,#313b53); border-radius: 20px; overflow: hidden; block-size: 6px; }
.track span { display: block; block-size: 100%; background: var(--accent); border-radius: inherit; transition: width 250ms ease-out; }
.food .track { background: light-dark(#f2dfce,#4b3d46); }
.food .track span { background: light-dark(#bc784e,#ebac7f); }
.track[data-tone="near"] span { background: var(--warm); }
.track[data-tone="over"] span { background: var(--error); }
:is(.plain,.segment,.nav-button,.category) { border: 0; background: transparent; transition: background 150ms,transform 150ms; }
.plain { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-block-size: 44px; padding: 4px; color: var(--accent); font-size: 12px; font-weight: 600; }
.plain svg { width: 16px; height: 16px; }
button:disabled { opacity: .4; cursor: default; }
.segments { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: light-dark(#eaeef8,#171f33); }
.segment { flex: 1; min-width: 0; border-radius: 12px; padding: 8px 5px; min-block-size: 40px; font-weight: 600; font-size: 12px; color: var(--muted); }
.segment[aria-pressed="true"] { color: var(--ink); background: light-dark(#fff,#2b3751); box-shadow: 0 2px 8px #18233a0c; }
.segment .inline { justify-content: center; gap: 6px; }
.segment svg { width: 16px; height: 16px; }
.records { display: grid; list-style: none; padding: 0; min-inline-size: 0; }
.records:not(:empty) { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 3px 13px; }
.records li { padding: 12px 0; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); min-inline-size: 0; }
.records li:last-child { border-bottom: 0; }
.record-text { min-inline-size: 0; flex: 1; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.record-text small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 3px; }
.record-amount { white-space: nowrap; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
[data-flow="income"] { color: light-dark(#14724d, #91dfb5); }
[data-flow="expense"], .plain.danger { color: var(--error); }
.hero [data-flow="expense"] { color: #ffc0c9; }
.budget-actions { flex-wrap: wrap; }
.budget-actions .danger { margin-inline-start: auto; }
.pocket-icons { display: grid; grid-template-columns: repeat(auto-fit,minmax(42px,1fr)); gap: 6px; }
.pocket-icon { display: grid; place-items: center; min-width: 0; min-height: 44px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.pocket-icon[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--soft); }
.pocket-total { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.2; margin-block: 4px; overflow-wrap: anywhere; }
.records li.pocket-item { padding: 0; }
.pocket-row { display: flex; align-items: center; gap: 10px; min-inline-size: 0; inline-size: 100%; min-block-size: 68px; border: 0; padding: 10px 0; background: transparent; text-align: left; }
.pocket-row > svg { inline-size: 12px; color: var(--muted); }
.period-switch { text-align: center; margin-top: -10px; margin-bottom: -9px; }
.period-switch .plain { min-width: 44px; }
.period-switch .eyebrow { font-size: 8px; }
.period-date { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-block-size: 48px; padding: 6px 9px; border-radius: 13px; background: var(--soft); color: var(--accent); font-size: 12px; }
.period-date strong { font-weight: 600; }
.period-date svg { width: 15px; height: 15px; }
.period-date:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.period-date input { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; opacity: 0; cursor: pointer; }
.period-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; cursor: pointer; }
.pocket-summary { background: light-dark(#e4e8fc,#263251); color: var(--ink); padding: 14px 17px; border-radius: 20px; overflow: hidden; }
.pocket-summary .support { color: light-dark(#4d5b84,#c0cbed); font-size: 11px; }
.pocket-summary .pocket-total { font-size: 27px; margin-bottom: 0; }
.summary-symbol { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid light-dark(#c6cfee,#4a5884); border-radius: 18px; transform: rotate(-8deg); color: var(--accent); }
.summary-symbol svg { width: 28px; height: 28px; }
.budget-limit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.limit-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; box-shadow: none; }
.limit-empty .plain { flex: none; }
.week-summary { background: var(--soft); box-shadow: none; }
.week-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.week-comparison dt { color: var(--muted); font-size: 11px; }
.week-comparison dd { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#cb-week-leader { justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 11px; background: var(--panel); text-align: start; overflow-wrap: anywhere; }
.budget-limit-card { --limit-tone: var(--cat); min-width: 0; display: grid; align-content: start; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-align: start; box-shadow: var(--shadow); }
.budget-limit-card[data-level="near"] { --limit-tone: var(--warm); }
.budget-limit-card[data-level="over"] { --limit-tone: var(--error); border-color: light-dark(#efc2c6,#75444f); background: linear-gradient(145deg,var(--panel) 50%,var(--error-bg)); }
.budget-limit-head { color: var(--limit-tone); font-size: 10px; font-weight: 700; }
.budget-limit-head .icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; }
.budget-limit-head .icon svg { width: 17px; height: 17px; }
.limit-percent { padding: 3px 5px; background: var(--soft); border-radius: 7px; color: var(--accent); }
[data-level="over"] .limit-percent { color: var(--error); background: var(--error-bg); }
[data-level="near"] .limit-percent { color: var(--warm); background: var(--warm-bg); }
.budget-limit-name { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.budget-limit-card .track span { background: var(--limit-tone); }
.budget-limit-card[data-level="unset"] .track { background: transparent; border: 1px dashed var(--line); }
.budget-limit-amount { display: grid; gap: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.budget-limit-amount strong { font-size: 21px; letter-spacing: -.04em; font-weight: 700; }
.budget-limit-amount .support { font-size: 11px; }
.budget-limit-status { color: var(--limit-tone); font-size: 11px; font-weight: 600; }
.nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: end; gap: 3px; position: sticky; bottom: 0; z-index: 3; padding: 6px 12px max(6px,env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px #26386607; }
.nav-button { display: grid; place-items: center; align-content: center; gap: 4px; min-block-size: 48px; padding: 5px 2px; color: var(--muted); font-size: 10px; font-weight: 500; border-radius: 14px; }
.nav-button > svg { width: 21px; height: 21px; }
.nav-button[aria-current="page"] { color: var(--accent); font-weight: 700; background: var(--soft); }
.nav-button.nav-add { color: var(--accent); font-weight: 700; padding-top: 0; margin-top: -20px; background: transparent; gap: 3px; }
.nav-add .nav-symbol { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 19px; background: linear-gradient(140deg,#3c50b1,#6b68d5); color: #fff; border: 4px solid var(--panel); box-shadow: 0 3px 9px #2b3d8d30; }
.nav-symbol svg { width: 25px; height: 25px; stroke-width: 2; }
:is(.nav-button,.category,.primary,.budget-limit-card):active { transform: scale(.97); }
@media (hover:hover) { :is(.plain,.category,.pocket-row):hover { filter: brightness(.94); } }
.form { display: grid; gap: 14px; min-inline-size: 0; }
.form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.form label.check { display: flex; align-items: center; gap: 10px; min-block-size: 44px; }
.date-entry { gap: 6px; }
.date-shortcuts { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px; }
.date-shortcuts .plain { padding-inline: 8px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.date-shortcuts .plain[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); }
.date-shortcuts input[type="date"] { padding-inline: 7px; font-size: 13px; }
.entry-action { flex: none; }
.daily-check { background: var(--soft); box-shadow: none; }
.daily-check .records:not(:empty) { max-block-size: 192px; overflow: auto; }
.daily-check strong { font-variant-numeric: tabular-nums; }
:is(input,select,textarea) { inline-size: 100%; min-inline-size: 0; min-block-size: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: light-dark(#f8f9fd,#151e32); color: var(--ink); font-size: 16px; }
textarea { resize: vertical; line-height: 1.6; }
::placeholder { color: var(--muted); opacity: .9; }
input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--accent); }
dialog { inline-size: min(340px,calc(100% - 32px)); color: var(--ink); }
dialog::backdrop { background: #0c1425aa; backdrop-filter: blur(4px); }
.amount-box { display: flex; align-items: center; gap: 10px; padding: 8px 15px; border-radius: 16px; background: var(--soft); color: var(--accent); }
.amount-box > span { font-size: 22px; font-weight: 600; }
.amount-box input { border: 0; background: transparent; padding-inline: 0; font-size: 35px; font-weight: 700; letter-spacing: -.04em; }
fieldset { min-inline-size: 0; padding: 0; border: 0; margin: 0; }
legend { font-size: 12px; font-weight: 600; padding: 0; margin-bottom: 9px; }
.categories { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.category { display: grid; gap: 6px; justify-items: center; align-content: center; border: 1px solid var(--line); border-radius: 14px; font-size: 10px; min-block-size: 78px; padding: 9px 4px; overflow-wrap: anywhere; }
.category svg { box-sizing: content-box !important; padding: 8px; width: 19px; height: 19px; background: var(--cat-bg); color: var(--cat); border-radius: 11px; }
.category[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 700; }
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 15px; color: var(--action-text); background: var(--action); padding: 13px 15px; min-block-size: 48px; font-weight: 600; transition: transform 150ms; }
.hint { border-radius: 13px; padding: 11px 13px; color: var(--accent); background: var(--soft); font-size: 12px; }
.error { color: var(--error); font-size: 12px; }
.entry-welcome { position: relative; overflow: hidden; text-align: center; border-radius: 24px; background: radial-gradient(ellipse at 80% 10%,light-dark(#e5dcfc,#433860),transparent 70%),light-dark(#eeecfb,#2c2b49); padding: 23px 15px 18px; }
.entry-art { display: flex; justify-content: center; align-items: center; gap: 13px; height: 63px; margin-bottom: 10px; }
.entry-art span { display: grid; place-items: center; width: 43px; height: 43px; background: light-dark(#fff4ed,#4d3540); border: 1px solid light-dark(#fff,#645067); color: light-dark(#b06c46,#efb79c); border-radius: 14px; transform: rotate(-13deg); }
.entry-art span:nth-child(2) { width: 55px; height: 62px; background: light-dark(#fff,#e1dcfa); color: #6f59ab; transform: rotate(7deg); box-shadow: 0 7px 15px #4d377c18; }
.entry-art span:nth-child(2) svg { width: 29px; height: 29px; }
.entry-art span:nth-child(3) { transform: rotate(13deg); background: light-dark(#e7f2ff,#273f5d); color: light-dark(#4b73a5,#b6d2ff); }
.entry-welcome h3 { font-size: 24px; line-height: 1.16; letter-spacing: -.04em; margin-bottom: 10px; }
.entry-welcome p { font-size: 11px; color: var(--muted); line-height: 1.6; }
.offline-note { font-size: 9px; margin-top: 12px; gap: 4px; color: var(--muted); }
.offline-note svg { width: 12px; height: 12px; }
.compose { padding: 15px; }
.compose .row label { font-size: 12px; }
.compose .plain { font-size: 10px; }
.compose textarea { font-size: 14px; }
.screen:has(#cb-text-form:focus-within, #cb-daily-check:not([hidden])) .entry-welcome { display: none; }
.review .bubble { min-inline-size: 0; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 17px 17px 4px 17px; background: var(--soft); color: var(--ink); font-size: 12px; }
#cb-edit-text { flex: none; }
#cb-drafts { display: grid; gap: 9px; }
.draft { border: 1px solid var(--line); border-radius: 17px; background: var(--panel); padding: 7px 13px; }
.draft summary { min-block-size: 48px; align-content: center; font-size: 13px; cursor: pointer; }
.draft .form { margin: 12px 0; }
.allocation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.allocation { min-width: 0; display: grid; gap: 7px; padding: 16px 13px; border-radius: 21px; }
.allocation.savings { background: light-dark(#eae2fa,#332b4b); }
.allocation.available { background: light-dark(#dfeafb,#253b53); }
.allocation .icon { margin-bottom: 3px; background: light-dark(#ffffff99,#ffffff0d); width: 34px; height: 34px; flex-basis: 34px; border-radius: 12px; }
.allocation p { font-size: 11px; font-weight: 500; }
.allocation strong { font-size: clamp(18px,5.1vw,23px); font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; }
.allocation .support { font-size: 9px; }
.details { display: grid; gap: 12px; box-shadow: none; }
.details dt { color: var(--muted); font-size: 11px; max-width: 60%; }
.details dd { font-weight: 600; text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.details-total { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 1px; }
.details-total dt { color: var(--ink); font-weight: 600; max-width: 45%; }
.details-total dd { color: var(--accent); font-size: 17px; letter-spacing: -.03em; }
.settings { padding-block: 7px; box-shadow: none; }
.settings summary { min-height: 48px; align-content: center; font-weight: 600; font-size: 13px; cursor: pointer; }
.settings summary .inline { vertical-align: middle; }
.settings summary svg { width: 17px; height: 17px; color: var(--accent); }
.settings .form { padding-block: 12px; }
#cb-plan input { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.history-summary { padding: 20px; border-radius: 24px; background: radial-gradient(ellipse at 100% 0,light-dark(#eee3fc,#423455),transparent 75%),light-dark(#e7ecfc,#27314c); }
.history-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.history-tools #cb-history-reset { grid-column: 1 / -1; justify-self: start; }
.history-scope { background: var(--soft); border-radius: 16px; padding: 7px 13px; }
.history-scope strong { overflow-wrap: anywhere; }
.history-scope .plain { flex: none; }
.pocket-detail .row { margin-top: 4px; }
.history-summary .pocket-total { font-size: 34px; margin: 6px 0 15px; }
.history-summary .eyebrow { color: light-dark(#59658d,#bbc6e7); }
.history-summary .status { font-size: 9px; background: light-dark(#ffffffa1,#ffffff0d); color: var(--ink); }
#cb-history:not(:empty) { border: 0; background: transparent; padding: 0; }
#cb-history .history-day { border: 0; padding: 7px 0 9px; margin-top: 4px; }
.history-day h3 { font-size: 11px; color: var(--muted); font-weight: 600; }
#cb-history .pocket-item { background: var(--panel); padding: 0 13px; border-inline: 1px solid var(--line); }
#cb-history .history-day + .pocket-item { border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; }
#cb-history .pocket-item:has(+ .history-day),#cb-history .pocket-item:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 18px 18px; }
#cb-history .history-day + .pocket-item:has(+ .history-day),#cb-history .history-day + .pocket-item:last-child { border-radius: 18px; }
.money-updated { animation: balance-in 200ms ease-out; }
@keyframes screen-in { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes balance-in { from { opacity: .6; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:360px) {
  .screen { padding-inline: 15px; gap: 15px; }
  .app-head { padding-inline: 15px; }
  .hero { padding-inline: 15px; }
  .budget-limit-grid { grid-template-columns: 1fr; }
  .budget-limit-card { grid-template-columns: 1fr 1fr; align-items: center; }
  .budget-limit-head,.budget-limit-card .track { grid-column: 1/-1; }
  .budget-limit-status { grid-column: 1/-1; }
  .budget-limit-amount { text-align: right; }
  .food .row:first-child { flex-wrap: wrap; }
  .food .status { max-width: 100%; }
  .record-amount { font-size: 11px; }
  .date-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-shortcuts input { grid-column: 1 / -1; }
  .allocation-grid { gap: 8px; }
  .allocation { padding: 13px 10px; }
}
@media(prefers-reduced-motion:reduce) {
  #capari-budget-preview *,#capari-budget-preview *::before { animation: none !important; transition: none !important; }
}

