:root {
  /* Noki dark theme tokens (mirrors nokii.pages.dev dark mode). */
  --bg: #1e1a15;
  --text: #f4ecdd;
  --text-muted: #b8a88d;
  --surface: #2a251d;
  --surface-2: #342d23;
  --accent: #f2b32e;
  --primary: #d2a15f;
  --primary-hover: #e2b273;
  --border: #463c2e;
  --danger: #e27777;
  --danger-soft: #3a2323;
  --success: #6fc87f;
  --success-soft: #203526;
  --warning: #d9a24a;
  --warning-soft: #3a2f1e;
  --primary-soft: #3a2f20;
  --primary-soft-border: #5a4528;
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Safe-area insets so content never underlaps the notch/home indicator. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.5;
  /* Remove the blue tap-highlight flash on iOS/Android. */
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg);
}

.container {
  width: 100%;
  max-width: 720px;
  padding: 0 16px;
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  margin-top: -40px;
  z-index: 2;
}

.footer {
  margin-top: auto;
  padding: 24px 16px;
  padding-bottom: calc(24px + var(--safe-bottom));
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Screen-reader-only text (visually hidden, still announced). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visible, accessible focus ring for keyboard users. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
