/* ─── Base Reset & Typography ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  overflow-x: hidden;
}

/* Screen transitions */
.screen {
  display: none;
  animation: fadeIn 0.15s ease;
}
.screen.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollable screen body */
.screen-body {
  padding: var(--space-lg);
  padding-bottom: 80px;
}

/* Typography scale */
h1 { font-size: 22px; font-weight: 500; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 500; line-height: 1.3; }
h3 { font-size: 15px; font-weight: 500; line-height: 1.4; }
p  { line-height: 1.6; }

/* Section label */
.section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

/* Dividers */
.divider {
  height: 0.5px;
  background: var(--border);
  margin: var(--space-md) 0;
}

/* Utility */
.text-muted   { color: var(--muted); }
.text-small   { font-size: 12px; }
.text-tiny    { font-size: 11px; }
.text-danger  { color: var(--red-dark); }
.text-success { color: var(--green-dark); }
.text-accent  { color: var(--accent); }
.fw-500       { font-weight: 500; }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.flex   { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, .screen { animation: none !important; transition: none !important; }
}
