:root {
  --ink: #1f1a12;
  --honey: #ffc93c;
  --honey-2: #ffe49a;
  --paper: #fffbf0;
  --white: #fff;
  --line: #eadfc4;
  --muted: #6f6650;
  --green: #2f8f4e;
  --red: #c0392b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--paper); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: #8a5a00; }
h1 { font-size: 26px; margin: 8px 0 12px; line-height: 1.15; }
h2 { font-size: 18px; margin: 26px 0 10px; }
h3 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }

.top { position: sticky; top: 0; z-index: 5; background: var(--ink); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 900; font-size: 22px; letter-spacing: -.5px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { color: var(--honey); }

main { max-width: 720px; margin: 0 auto; padding: 14px 16px 30px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: var(--white); border-top: 1.5px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a span { font-size: 21px; line-height: 1; }
.tabs a.on { color: var(--ink); background: var(--honey-2); }

.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 0; }
.hero.small { flex-direction: row; text-align: left; gap: 14px; }
.hero-bee { width: 92px; height: 92px; border-radius: 22px; }
.hero.small .hero-bee { width: 64px; height: 64px; border-radius: 16px; }
.hero h1 { margin: 2px 0; }

.card { display: block; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; color: inherit; text-decoration: none; }
.card p { margin: 4px 0; }
.card.alert { background: var(--honey-2); border-color: var(--honey); }
.card.alert span { display: block; font-size: 14px; margin-top: 2px; }
.card.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card.inline input { flex: 1 1 120px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat b { font-size: 19px; }
.stat.warn { background: var(--honey-2); border-color: var(--honey); }

.deadline { display: flex; gap: 14px; align-items: flex-start; }
.deadline .when { flex: none; width: 92px; display: flex; flex-direction: column; font-size: 14px; }
.deadline .when span { color: var(--muted); font-size: 13px; }
.deadline.soon { border-color: var(--honey); box-shadow: inset 4px 0 0 var(--honey); }

.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font: 700 15px system-ui, sans-serif; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.primary { background: var(--honey); }
.btn.big { width: 100%; min-height: 52px; font-size: 17px; margin-top: 8px; }

form label { display: block; font-weight: 600; margin: 10px 0; }
form input:not([type=radio]):not([type=checkbox]), form select { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: var(--white); }
fieldset { border: 0; padding: 0; margin: 10px 0; }
legend { font-weight: 600; }
label.opt { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
label.opt input { width: 20px; height: 20px; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.chip { flex: none; padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--white); font: 600 14px system-ui, sans-serif; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--white); border-color: var(--ink); }

.txlist { list-style: none; margin: 0; padding: 0; }
.txlist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.tx-main { display: flex; flex-direction: column; min-width: 0; }
.tx-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { font-variant-numeric: tabular-nums; }
.amt.in { color: var(--green); }
select.cat { grid-column: 1 / -1; min-height: 38px; border: 1.5px solid var(--line); border-radius: 9px; padding: 4px 8px; font: 14px system-ui, sans-serif; background: var(--paper); }
select.cat.review { background: var(--honey-2); border-color: var(--honey); font-weight: 700; }
.x { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }

.tbl { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--line); }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl td:last-child, .tbl th:last-child { text-align: right; }
.tbl tr.past td { color: var(--muted); }
.tbl tr.total td { font-weight: 800; background: var(--honey-2); }

.progress { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.progress i { display: block; height: 100%; background: var(--honey); }
.card.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.card.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--green); }
.card.check.on { background: #f2fbf3; border-color: #bfe5c7; }
.card.check .info { font-size: 20px; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; background: #d8f2dd; color: var(--green); padding: 1px 7px; border-radius: 99px; vertical-align: middle; }
.acct span { display: block; }

#toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; z-index: 9; }
#toast.on { opacity: 1; transform: translateX(-50%); }
