:root {
  color-scheme: light;
  --ink: #16231d;
  --muted: #718078;
  --line: #e0e8e1;
  --surface: #ffffff;
  --soft: #f4f8f4;
  --accent: #2f855a;
  --accent-dark: #1f6a46;
  --warn: #a15c23;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #eef4ef; color: var(--ink); }
.shell { max-width: 720px; margin: 0 auto; padding: 24px 18px 44px; }
.topbar, .panel-title, .form-row, .daily-pill, footer { display: flex; align-items: center; }
.topbar { justify-content: space-between; margin-bottom: 20px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.03em; }
h2 { margin-bottom: 0; font-size: 17px; }
.panel-title h2 { display: flex; align-items: center; gap: 8px; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--accent-dark); }
.button-icon { width: 17px; height: 17px; margin-right: 4px; vertical-align: -3px; }
.icon-button { border: 0; border-radius: 999px; background: var(--surface); width: 40px; height: 40px; font-size: 22px; color: var(--accent-dark); box-shadow: 0 3px 14px #17382412; }
.hero-card { padding: 28px 24px 22px; color: white; background: linear-gradient(135deg, #214a36, #10231b); border-radius: 24px; box-shadow: 0 10px 28px #17382420; }
.hero-card .muted { color: #bdd6c6; }
.muted { color: var(--muted); font-size: 13px; }
.hero-number { margin: 4px 0 6px; font-size: clamp(38px, 11vw, 66px); font-weight: 800; letter-spacing: -.055em; }
.daily-pill { justify-content: space-between; margin-top: 22px; padding: 12px 14px; border: 1px solid #ffffff24; border-radius: 14px; background: #ffffff12; color: #d8e9dd; }
.daily-pill strong { color: white; font-size: 19px; }
.grid { display: grid; gap: 10px; margin: 12px 0; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.metric, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.metric { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.metric span, .hint { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 18px; }
.panel { margin-top: 12px; padding: 18px; }
.panel-title { justify-content: space-between; margin-bottom: 14px; }
.panel-title a { color: var(--accent-dark); font-size: 13px; }
.setup-copy { margin-bottom: 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.form-row { gap: 8px; }
input { min-width: 0; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfdfb; font: inherit; }
.form-row input:first-child { max-width: 120px; }
button { cursor: pointer; font: inherit; font-weight: 700; }
.primary, .secondary { border: 0; border-radius: 10px; padding: 12px 16px; white-space: nowrap; }
.primary { color: white; background: var(--accent); }
.secondary { color: var(--accent-dark); background: #e6f2e9; }
.income-button { border: 0; border-radius: 10px; padding: 12px 16px; white-space: nowrap; color: #1f6a46; background: #e1f3e6; }
.settings-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: end; }
.settings-form button { min-height: 46px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.transactions { display: grid; gap: 2px; }
.transaction { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.transaction:last-child { border-bottom: 0; }
.transaction-main { min-width: 0; }
.transaction-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-label { display: flex !important; align-items: center; gap: 8px; }
.transaction-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent-dark); }
.transaction-main small { color: var(--muted); }
.expense { color: var(--warn); }
.income { color: var(--accent-dark); }
.notice { margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: #fff4dc; color: #83501f; font-size: 13px; }
.hidden { display: none; }
footer { justify-content: center; gap: 18px; padding: 22px 0 0; color: var(--muted); font-size: 12px; }
footer a { color: inherit; }
@media (max-width: 520px) { .form-row { flex-wrap: wrap; } .form-row input:first-child { max-width: none; } .form-row button { width: 100%; } .settings-form { grid-template-columns: 1fr; } .settings-form button { grid-column: auto; width: 100%; } }
