:root {
  --bg: #f4f6f5; --card: #fff; --text: #14201a; --muted: #66756d; --line: #e3e9e6;
  --accent: #1f9d62; --accent-text: #fff; --danger: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1411; --card: #17201b; --text: #e8efeb; --muted: #8fa097; --line: #26322b; --accent: #2fb877; --accent-text: #07140d; --danger: #ef6a5b; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.screen { max-width: 480px; margin: 0 auto; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.center { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
h1 { margin: 0; font-size: 1.5rem; letter-spacing: -.01em; }
h2 { margin: 0 0 10px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 0; color: var(--muted); }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
header { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.balance { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.tag { font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: 99px; padding: 2px 10px; }
.tx .amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.tx .amount.pos { color: var(--accent); }
input, button { font: inherit; border-radius: 12px; }
input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
button { border: 0; padding: 12px 16px; background: var(--accent); color: var(--accent-text); font-weight: 600; cursor: pointer; }
button.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); padding: 8px 14px; position: relative; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.badge.hidden { display: none; }
.error { color: var(--danger); min-height: 1.4em; font-size: .9rem; }
