/* Klukla design tokens + reset. A dark game-portal look in the logo's colours: the controller red, the mascot's coral and the controller's teal,
   on deep blue-black, with quiet hairline edges. Self-hosted fonts: no third-party requests. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  /* the page and the surfaces on it (darkest to lightest) */
  --bg: #0f0e17; --bg2: #141320; --surface: #1b1a29; --surface2: #222033; --surface3: #2a2840;
  /* text, and the edge of anything you can tap */
  --ink: #f4f2fb; --ink2: #d8d4ea; --muted: #a39fbd; --faint: #6f6a8c; --edge: #33304a;
  /* hairlines and translucent fills that work on any surface */
  --line: #24223a; --line2: #34314c; --fill: rgba(255, 255, 255, .05); --fill2: rgba(255, 255, 255, .09);
  /* brand colours: the logo's red (main), coral and teal, plus a few bright accents; the "soft" ones are tints for dark backgrounds */
  --coral: #fe504b; --sun: #ffc531; --mint: #2fd4a3; --sky: #4aa8ff; --grape: #8f6bff; --pink: #ff6fc6; --orange: #ff8a3d; --teal: #5fc9c3; --peach: #fe9589;
  --coral-soft: rgba(254, 80, 75, .16); --sun-soft: rgba(255, 197, 49, .14); --mint-soft: rgba(47, 212, 163, .14); --sky-soft: rgba(74, 168, 255, .14);
  --grape-soft: rgba(143, 107, 255, .16); --pink-soft: rgba(255, 111, 198, .14); --orange-soft: rgba(255, 138, 61, .14);
  --good: #36d39a; --bad: #ff5c6c; --warn: #ffb547;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --pop: 0 2px 0 rgba(0, 0, 0, .35);                       /* a slight lift under tappable things */
  --shadow: 0 18px 44px -16px rgba(0, 0, 0, .7);
  --soft: 0 12px 30px -16px rgba(0, 0, 0, .6);
  --topbar-h: 68px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.2, 1.5, .4, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; touch-action: manipulation; }
/* overflow-x: clip on html (as well as hidden on body): iPhones let the whole page slide sideways if anything is a pixel too wide, and while the page can slide,
   a tap that moves a little is taken as the start of a slide and is lost (a game needed two taps to open). clip (unlike hidden) keeps the sticky top bar working.
   touch-action: manipulation: a tap is a tap straight away (no waiting to see if it is a double-tap zoom). */
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  overflow-x: hidden;
}
body.in-game { position: fixed; inset: 0; width: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; background: #000; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.1; letter-spacing: .005em; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--coral); color: #fff; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.link { color: var(--sky); font-weight: 800; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
