/* Street Smart — shared design tokens.
 *
 * Palette is deliberately not the playground deck's yellow-on-near-black.
 * These games sit in the world of phone screens and game UI, so the base is a
 * deep indigo that reads as backlit rather than as void, with magenta and
 * cyan doing the binary work (sus / safe, wrong / right) throughout.
 */

:root {
  --void: #12091f;
  --panel: #1d1033;
  --panel-lift: #2a1848;
  --line: #3a2560;

  --hot: #ff2d78;
  --volt: #00e5c0;
  --gold: #ffc531;

  --paper: #f4ecff;
  --dim: #9b86c4;

  --thumb: clamp(56px, 14vw, 72px);

  --ease-snap: cubic-bezier(0.2, 0.9, 0.3, 1.2);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
}

body {
  color: var(--paper);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* The backlit feel: two soft pools of colour behind everything, fixed so
   they do not travel while content scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 60vw at 15% 0%, rgba(255, 45, 120, 0.16), transparent 70%),
    radial-gradient(50vw 50vw at 90% 15%, rgba(0, 229, 192, 0.12), transparent 70%);
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.tnum { font-variant-numeric: tabular-nums; }

/* Back-to-hub, shared by every game.
 *
 * 44px minimum: this was 35px tall, which is under the size a thumb
 * reliably hits, and two separate playtests flagged it on every page in
 * the arcade. Fixed here rather than patched per game. */
.back {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: rgba(29, 16, 51, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.back:hover { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
