:root {
  --bg-0: #0b0d12;
  --bg-1: #14171f;
  --bg-2: #1c2029;
  --fg-0: #f2f3f5;
  --fg-1: #9aa0ac;
  --accent: #5ee6c8;
  --accent-2: #ff5d8f;
  --warn: #ffb020;
  --success: #3ddc84;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-body: 16px;
  --font-size-h1: clamp(28px, 6vw, 40px);
  --font-size-h2: clamp(20px, 5vw, 26px);

  --touch-target-min: 44px;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  overscroll-behavior: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

p {
  margin: 0;
  color: var(--fg-1);
}

a {
  color: inherit;
  text-decoration: none;
}

.safe-area {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

/* Game pages: fixed full-screen viewport, no page scroll/bounce.
   The hub page does NOT use this class so it scrolls normally. */
body.game-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
