:root {
  --surface-page: #fff;
  --surface-raised: #f6f6f8;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b70;
  --border-subtle: #e2e2e6;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-page: #121214;
    --surface-raised: #1c1c1f;
    --text-primary: #f2f2f3;
    --text-secondary: #a0a0a6;
    --border-subtle: #2c2c30;
    --accent: #60a5fa;
    --accent-soft: #1e3a5f;
  }
}

* { box-sizing: border-box; touch-action: manipulation; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, system-ui, sans-serif;
  background: var(--surface-page);
  color: var(--text-primary);
  padding-bottom: 72px;
}
.page { max-width: 480px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 1.4rem; }
label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin: 16px 0 4px; }
input, select {
  width: 100%; padding: 12px; min-height: 44px;
  border: 1px solid var(--border-subtle); border-radius: 8px;
  background: var(--surface-raised); color: var(--text-primary); font-size: 1rem;
}
button {
  min-height: 44px; padding: 12px 20px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-size: 1rem; font-weight: 600;
  margin-top: 20px; width: 100%; cursor: pointer;
}
.card {
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 14px; margin-bottom: 10px;
}
.balance-positive { color: #16a34a; }
.balance-negative { color: #dc2626; }
.error { color: #dc2626; font-size: 0.85rem; margin-top: 8px; }

.bottom-nav {
  display: none;
}
@media (max-width: 860px) {
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: 60px; background: var(--surface-raised);
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a {
    flex: 1; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none; font-size: 0.85rem;
  }
}
