/* ============================================================================
   LURDIQ Website — shared styles
   Pulls colour palette + visual language directly from the in-app design.
   ============================================================================ */

:root {
  /* Surfaces — near-black, matches the in-game canvas */
  --bg:           #050507;
  --surface:      #0a0a0c;
  --surface-2:    #101014;
  --card:         #131318;
  --border:       rgba(255,255,255,0.06);
  --border-soft:  rgba(255,255,255,0.04);
  --border-mid:   rgba(255,255,255,0.10);

  /* Type */
  --text:         #ffffff;
  --text-dim:     rgba(255,255,255,0.78);
  --text-mute:    rgba(255,255,255,0.5);
  --text-faint:   rgba(255,255,255,0.32);

  /* Brand accent — the IQ in LURDIQ. Blue, matching the app default. */
  --accent:       #3b82f6;
  --accent-2:     #60a5fa;
  --accent-bg:    rgba(59,130,246,0.13);
  --accent-soft:  rgba(59,130,246,0.45);
  --accent-faint: rgba(59,130,246,0.08);
  --accent-glow:  rgba(59,130,246,0.25);

  /* The 5 in-app category colours — used directly in the worlds preview */
  --c-intro:    #3b82f6;  /* INTRO            — blue   */
  --c-daily:    #10b981;  /* DAILY            — emerald */
  --c-relic:    #8b5cf6;  /* RELIC HUNTER     — violet */
  --c-wonders:  #f59e0b;  /* WONDERS OF WORLD — amber  */
  --c-metro:    #f43f5e;  /* METROPOLIS TOURS — rose   */

  /* In-app board look — for the animated demo */
  --board-bg:       #0a0a0c;
  --cell-border:    rgba(16,185,129,0.30);
  --cell-empty-bg:  rgba(16,185,129,0.025);
  /* 1:1 port of the Flutter board: a dark panel (#040404), WALLS are the faintly
     accent-outlined dark rounded squares, FLOOR is not drawn, a progress ring
     fills around the panel as boxes reach targets. */
  --board-surface:      #040404;               /* the dark board panel */
  --board-surface-line: rgba(255,255,255,0.02);
  --board-shadow:       0 26px 60px -20px rgba(0,0,0,0.85);  /* app uses a black shadow, not a coloured glow */
  --wall-fill:          #0F0F0F;               /* wall square fill (dark mode) */
  --board-cell-line:    rgba(16,185,129,0.25); /* wall outline = accent @ 25% */
  --player-color:       #10b981;

  /* Board accent — the app's brand emerald. JS overrides these live when an
     accent world is picked in Settings (each world has its own colour). */
  --board-accent:        #10b981;
  --board-accent-mid:    rgba(16,185,129,0.30);
  --board-accent-faint:  rgba(16,185,129,0.12);
  --board-accent-soft:   rgba(16,185,129,0.45);
  --board-accent-glow:   rgba(16,185,129,0.55);

  --container:    680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* overflow-x: clip contains the off-canvas settings drawer without creating a
   scroll container (so position: sticky on the nav keeps working). */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }

body {
  font-family: 'Urbanist', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  /* Ambient glows now follow the chosen accent (JS updates --accent-* live). */
  background:
    radial-gradient(ellipse 900px 700px at 50% -10%, var(--accent-glow) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 100% 40%, var(--accent-faint) 0%, transparent 50%),
    radial-gradient(ellipse 600px 500px at 0% 60%, var(--accent-faint) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Barely-visible 40px grid texture — echoes the puzzle's tile rhythm */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
main, .topbar, .site-footer { position: relative; z-index: 1; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s, color 0.15s;
}
a:hover { opacity: 0.85; }

img, svg { display: block; max-width: 100%; }

/* ============ Layout primitives ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
main {
  flex: 1;
  /* User-tunable brightness/contrast (Settings). Applied to content only so
     the nav and settings drawer stay crisp. */
  filter: brightness(var(--ui-bright, 1)) contrast(var(--ui-contrast, 1));
}

/* ============ Top brand bar (on legal pages) ============ */
.topbar {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0;
  background: rgba(5,5,7,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}
.brand .iq { color: var(--accent); }
.topbar-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-mute);
}
.topbar-link:hover { color: var(--text); opacity: 1; }

/* ============ HERO ============ */
.hero {
  text-align: center;
  padding: 64px 0 24px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50px; left: 50%;
  width: 420px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 22px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-2);
  text-transform: uppercase;
}

.hero-logo {
  font-size: 80px;
  font-weight: 900;
  letter-spacing: 12px;
  line-height: 0.95;
  padding-left: 12px;
  margin-bottom: 24px;
  text-shadow: 0 4px 40px rgba(59,130,246,0.18);
}
.hero-logo .iq { color: var(--accent); }

.hero-tagline {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 32px;
}
.hero-tagline .sep { color: var(--accent); margin: 0 6px; }

.hero-lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.55;
  letter-spacing: -0.2px;
}
.hero-lede strong { color: var(--text); font-weight: 800; }
.hero-lede em { font-style: normal; color: var(--accent-2); }

/* ============ Store badges ============ */
.stores {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.store-btn.soon { opacity: 0.65; cursor: default; }
.store-btn .store-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 1.8px;
  color: var(--text-mute); text-transform: uppercase;
}
.store-btn .store-name {
  font-size: 15px; font-weight: 800; letter-spacing: -0.2px;
}
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }

.hero-launch-note {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
}
.hero-launch-note a {
  color: var(--text-dim);
  border-bottom: 1px dashed var(--text-faint);
  padding-bottom: 1px;
}
.hero-launch-note a:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }

/* ============================================================================
   DEMO BOARD — recreates the in-app puzzle look 1:1
   Rounded green-outlined cells, glowing green player, gray boxes, target dots.
   ============================================================================ */
.demo-section {
  padding: 32px 0 64px;
  text-align: center;
}
.demo-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
/* Title block above the live demo, mirrors the in-game header */
.demo-meta {
  margin-bottom: 18px;
}
.demo-meta-pack {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-mute);
}
.demo-meta-name {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.4px;
  margin-top: 2px;
}
.demo-frame {
  display: inline-block;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   Real-level board — 1:1 port of the in-app rendering.
   App reference: --wall #0F0F0F, --accent (the brand green), targets are
   FILLED 10px dots with a triple glow + pulse, walls have a soft accent
   ring, boxes are 88% with a 16px radius and an inner outlined ring,
   the player is 78% with a dark stroke and a white eye.
   ───────────────────────────────────────────────────────────────────────── */
.game-board {
  /* --ct is inherited from .game-wrap so the panel padding + the grid scale
     together. */
  position: relative;
  outline: none;
  touch-action: none;              /* Swipe steuert das Spiel, nicht den Scroll */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  width: calc(9 * var(--ct));
  height: calc(8 * var(--ct));
  display: grid;
  grid-template-columns: repeat(9, var(--ct));
  grid-template-rows: repeat(8, var(--ct));
  gap: 0;
}
/* Progress ring — glowing accent stroke around the board panel, drawn partially
   by progress (boxes on target). Geometry + dash handled in JS. */
.game-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
  opacity: 0;                 /* hidden until play starts (overlay covers it) */
  transition: opacity 0.25s ease;
}
.game-ring path {
  fill: none;
  stroke: var(--board-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px var(--board-accent-soft));
  transition: stroke-dashoffset 0.55s ease-in-out;
}

/* FLOOR (empty) renders nothing — the app draws only walls, targets + sprites. */
.game-cell {
  position: relative;
  display: grid;
  place-items: center;
}

/* WALL — 94% dark rounded square with a faint accent outline + small accent
   glow. (Flutter: size*0.94, #0F0F0F, radius 12/50, border 2px accent@25%.) */
.game-cell.wall::after {
  content: '';
  width: 88%;
  height: 88%;
  background: var(--wall-fill);
  border: calc(var(--ct) * 0.04) solid var(--board-cell-line);
  border-radius: 24%;
}

/* TARGET — small glowing accent dot (Flutter: 10px on a 50px tile = 20%). */
.game-cell.target::after {
  content: '';
  width: 20%; height: 20%;
  border-radius: 50%;
  background: var(--board-accent);
  box-shadow: 0 0 calc(var(--ct) * 0.4) var(--board-accent-soft);
  animation: target-pulse 1.4s ease-in-out infinite alternate;
}
@keyframes target-pulse {
  from { transform: scale(0.85); opacity: 0.85; }
  to   { transform: scale(1.10); opacity: 1; }
}

/* Sprites — absolutely positioned, transformed by JS to the right tile.
   .game-box itself draws the crate body; the ::after pseudo draws the
   inner handle ring centered inside it via grid place-items. */
.game-box, .game-player {
  position: absolute;
  top: 0; left: 0;
  will-change: transform;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition:
    transform 240ms cubic-bezier(0.4, 0, 0.2, 1),
    background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
/* Crate — Flutter BoxSprite: 88% rounded square (radius 16/50), white/5 fill,
   2px white/30 edge, inner ring (white/5 + 2px white/20). On a target it turns
   accent with a 40px glow and the inner ring lights up. */
.game-box {
  width: calc(var(--ct) * 0.88);
  height: calc(var(--ct) * 0.88);
  margin: calc(var(--ct) * 0.06);   /* centers inside the cell */
  background: rgba(255,255,255,0.05);
  border: calc(var(--ct) * 0.04) solid rgba(255,255,255,0.30);
  border-radius: 32%;
  box-shadow: 0 calc(var(--ct) * 0.06) calc(var(--ct) * 0.16) rgba(0,0,0,0.40);
}
.game-box::after {
  /* inner ring */
  content: '';
  display: block;
  width: 21%; height: 21%;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: calc(var(--ct) * 0.04) solid rgba(255,255,255,0.20);
  transition: background 0.25s, border-color 0.25s;
}
.game-box.on-target {
  background: var(--board-accent-mid);
  border-color: var(--board-accent);
  box-shadow: 0 0 calc(var(--ct) * 0.36) var(--board-accent-soft);
}
.game-box.on-target::after {
  background: rgba(255,255,255,0.30);
  border-color: var(--board-accent-soft);
}
.game-player {
  width: calc(var(--ct) * 0.78);
  height: calc(var(--ct) * 0.78);
  margin: calc(var(--ct) * 0.11);
  background: var(--board-accent);
  /* Flutter PlayerSprite: 78% disc, dark ring (~4px/50), NO glow (clean). */
  border: calc(var(--ct) * 0.08) solid rgba(0,0,0,0.30);
  border-radius: 50%;
  /* Direction-driven eye offset — JS sets --eye-x / --eye-y based on the
     last move so the eye drifts opposite the travel direction (inertia look) */
  --eye-x: 0px;
  --eye-y: 0px;
}
.game-player::after {
  content: '';
  width: 30%; height: 30%;
  border-radius: 50%;
  background: rgba(255,255,255,0.96);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
  transform: translate(0, 0);   /* at rest the eye is centred */
}
/* On each move the eye kicks OPPOSITE the travel direction and springs back to
   centre — mirrors the app's PlayerSprite (offset * sin(pi*t) envelope). */
.game-player.eye-kick::after {
  animation: eyeKick 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes eyeKick {
  0%   { transform: translate(0, 0); }
  42%  { transform: translate(var(--eye-x), var(--eye-y)); }
  100% { transform: translate(0, 0); }
}

/* Old single-board fallback — only retained because some older
   variants of the page may still reference .demo-board */
.demo-board {
  --ct: 44px;
  position: relative;
  width: calc(5 * var(--ct));
  height: calc(3 * var(--ct));
  display: grid;
  grid-template-columns: repeat(5, var(--ct));
  grid-template-rows: repeat(3, var(--ct));
  gap: 3px;
}
/* Walls: rounded green-outlined cells, matching the in-app wall style */
.demo-board .cell {
  background: var(--cell-empty-bg);
  border: 1.5px solid var(--cell-border);
  border-radius: 7px;
}
/* Floor: invisible — the dark board background shows through, exactly
   like in the actual game where only walls have a visible frame */
.demo-board .cell.floor {
  background: transparent;
  border: none;
}
/* Target: small white-outlined dot rendered onto its floor cell */
.demo-board .cell.target {
  position: relative;
}
.demo-board .cell.target::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 12px;
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Box — rounded square with subtle inner dot. Starts at col 2 of the
   middle row; animation slides it ONE cell right so it lands exactly on
   the target at col 3. */
.demo-board .box {
  position: absolute;
  width: calc(var(--ct) - 10px);
  height: calc(var(--ct) - 10px);
  top: calc(var(--ct) + 5px);
  left: calc(2 * (var(--ct) + 3px) + 5px);
  background: var(--box-fill);
  border: 1.5px solid var(--box-border);
  border-radius: 6px;
  animation: demo-box 3.2s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.demo-board .box::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Player — glowing emerald disc with a soft white spec highlight */
.demo-board .player {
  position: absolute;
  width: calc(var(--ct) * 0.55);
  height: calc(var(--ct) * 0.55);
  top: calc(var(--ct) + (var(--ct) - var(--ct) * 0.55) / 2);
  left: calc(1 * (var(--ct) + 3px) + (var(--ct) - var(--ct) * 0.55) / 2);
  background: var(--player-color);
  border-radius: 50%;
  box-shadow:
    0 0 18px var(--player-glow),
    inset 0 0 0 2px rgba(255,255,255,0.15);
  animation: demo-player 3.2s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.demo-board .player::after {
  content: '';
  position: absolute;
  top: 22%; left: 22%;
  width: 30%; height: 30%;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  filter: blur(1px);
}

/* Single-cell push: pause → push → hold → loop.
   Player moves col 1 → col 2 (one tile = ct + gap).
   Box moves col 2 → col 3, landing on the target. */
@keyframes demo-player {
  0%, 28%    { transform: translateX(0); }
  55%, 100%  { transform: translateX(calc(var(--ct) + 3px)); }
}
@keyframes demo-box {
  0%, 28%    { transform: translateX(0); }
  55%, 100%  { transform: translateX(calc(var(--ct) + 3px)); }
}
.demo-caption {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
}

/* ============ Section wrapper ============ */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border-soft);
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 36px;
}

/* ============================================================================
   WORLDS — preview of the 5 in-app categories using their real colours.
   Mirrors the .cat-card layout from the game so the visual cues transfer.
   ============================================================================ */
.worlds {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.world {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, var(--world-bg) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.2s;
}
.world:hover { border-color: var(--world-border); }
.world-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--world-bg);
  border: 1px solid var(--world-border);
  color: var(--world-color);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.world-icon svg { width: 18px; height: 18px; }
.world-body { flex: 1; min-width: 0; }
.world-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.2;
}
.world-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 4px;
}
.world-count {
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
  color: var(--world-color);
  flex-shrink: 0;
}

/* Per-world colour vars */
.world.intro    { --world-color: var(--c-intro);   --world-bg: rgba(59,130,246,0.10);  --world-border: rgba(59,130,246,0.30); }
.world.daily    { --world-color: var(--c-daily);   --world-bg: rgba(16,185,129,0.10);  --world-border: rgba(16,185,129,0.30); }
.world.relic    { --world-color: var(--c-relic);   --world-bg: rgba(139,92,246,0.10);  --world-border: rgba(139,92,246,0.30); }
.world.wonders  { --world-color: var(--c-wonders); --world-bg: rgba(245,158,11,0.10);  --world-border: rgba(245,158,11,0.30); }
.world.metro    { --world-color: var(--c-metro);   --world-bg: rgba(244,63,94,0.10);   --world-border: rgba(244,63,94,0.30); }

/* ============ Feature grid (4-up) ============ */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.feature {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--border-mid); }
.feature-icon {
  width: 38px; height: 38px;
  background: var(--feat-bg, var(--accent-bg));
  border: 1px solid var(--feat-border, var(--accent-soft));
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--feat-color, var(--accent-2));
  margin-bottom: 14px;
  box-shadow: 0 0 18px -4px var(--feat-glow, var(--accent-glow));
}
.feature-icon svg { width: 18px; height: 18px; }
.feature-title {
  font-size: 15px; font-weight: 800; letter-spacing: -0.2px;
  margin-bottom: 4px;
}
.feature-desc {
  font-size: 13px; color: var(--text-mute); line-height: 1.55;
}
.feature.f-daily   { --feat-color: var(--c-daily);   --feat-bg: rgba(16,185,129,0.10);  --feat-border: rgba(16,185,129,0.30); --feat-glow: rgba(16,185,129,0.25); }
.feature.f-relic   { --feat-color: var(--c-relic);   --feat-bg: rgba(139,92,246,0.10);  --feat-border: rgba(139,92,246,0.30); --feat-glow: rgba(139,92,246,0.25); }
.feature.f-wonders { --feat-color: var(--c-wonders); --feat-bg: rgba(245,158,11,0.10);  --feat-border: rgba(245,158,11,0.30); --feat-glow: rgba(245,158,11,0.25); }
.feature.f-metro   { --feat-color: var(--c-metro);   --feat-bg: rgba(244,63,94,0.10);   --feat-border: rgba(244,63,94,0.30);  --feat-glow: rgba(244,63,94,0.25); }
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

/* ============ Three modes block ============ */
.modes-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mode-card {
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.mode-letter {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--accent-2);
  margin-bottom: 6px;
  line-height: 1;
}
.mode-name {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mode-desc {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.45;
}
@media (max-width: 700px) {
  .modes-strip {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============ Numbers row ============ */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 8px 0 24px;
}
.number {
  text-align: center;
  padding: 22px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.number-v {
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  color: var(--accent-2);
  line-height: 1;
}
.number-l {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 8px;
}

/* ============ Pre-launch CTA card ============ */
.cta-card {
  text-align: center;
  background:
    linear-gradient(135deg, var(--accent-faint) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  padding: 36px 28px;
  margin: 40px 0 24px;
}
.cta-card-title {
  font-size: 20px; font-weight: 900;
  letter-spacing: -0.5px; margin-bottom: 10px;
}
.cta-card-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 auto 22px;
  max-width: 380px;
  line-height: 1.55;
}
.cta-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: transform 0.12s, background 0.2s;
}
.cta-card-btn:hover { background: var(--accent-2); opacity: 1; }
.cta-card-btn:active { transform: scale(0.98); }
.cta-card-btn svg { width: 14px; height: 14px; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 40px;
  margin-top: 64px;
  font-size: 12px;
  color: var(--text-mute);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: var(--text-mute);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 11px;
}
.footer-links a:hover { color: var(--text); opacity: 1; }
.footer-copy { font-size: 11px; }
.footer-credit {
  font-size: 10px;
  color: var(--text-faint);
}
.footer-credit a { color: var(--text-faint); }

/* ============ Legal pages — long-form text ============ */
.legal { padding: 48px 0 32px; }
.legal h1 {
  font-size: 36px; font-weight: 900;
  letter-spacing: -1px; margin-bottom: 8px;
}
.legal .eyebrow {
  font-size: 11px; font-weight: 800;
  letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.legal h2 {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.3px;
  margin: 40px 0 12px; padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 32px; }
.legal h3 {
  font-size: 14px; font-weight: 800;
  margin: 22px 0 8px;
}
.legal p, .legal li {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { margin: 8px 0 12px 22px; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--text); font-weight: 700; }
.legal .last-updated {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
}
.legal address {
  font-style: normal;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}
.legal .placeholder {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  font-weight: 700;
  font-size: 13px;
}

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

/* ============ Mobile breakpoint ============ */
@media (max-width: 480px) {
  .hero-logo { font-size: 54px; letter-spacing: 8px; }
  .hero-lede { font-size: 17px; }
  .hero { padding: 60px 0 24px; }
  .section { padding: 44px 0; }
  .section-title { font-size: 26px; }
  .number-v { font-size: 24px; }
  .demo-board { --ct: 38px; }
}

/* ============================================================================
   ADDED: sticky nav, hero CTAs, playable board UI, settings drawer, reveals
   ============================================================================ */

/* ---- Sticky nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}
.nav.scrolled {
  background: rgba(5,5,7,0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border-soft);
}
/* This element carries both .container and .nav-inner; keep the container's
   24px horizontal padding so the logo + CTA line up with the body text. */
.nav-inner { display: flex; align-items: center; gap: 18px; padding: 12px 24px; }
.nav-brand {
  font-size: 17px; font-weight: 900; letter-spacing: 2px; color: var(--text);
}
.nav-brand .iq { color: var(--accent); }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a {
  font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-mute);
}
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-cta {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent-2); padding: 8px 14px; border: 1px solid var(--accent-soft);
  border-radius: 10px; background: var(--accent-bg); white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); color: #fff; opacity: 1; }

/* ---- Language switcher ---- */
.nav-end { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border-mid);
  border-radius: 10px; color: var(--text-mute);
  background: rgba(255,255,255,0.03); cursor: pointer;
}
.lang-switch:hover { color: var(--text); border-color: var(--accent-soft); }
.lang-switch svg { width: 15px; height: 15px; flex: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border: 0; outline: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 800;
  letter-spacing: 0.6px; color: inherit; padding-right: 2px;
}
.lang-switch select option { color: #14161c; background: #fff; }
@media (max-width: 560px) {
  .nav-links { display: none; }
  .lang-switch { padding: 6px 8px; }
}

/* ---- Hero action buttons ---- */
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 28px;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; background: var(--accent); color: #fff;
  border-radius: 12px; font-size: 14px; font-weight: 800; letter-spacing: 0.4px;
  box-shadow: 0 12px 30px -10px var(--accent-glow);
  transition: transform 0.12s, background 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { background: var(--accent-2); opacity: 1; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 14px 22px; border-radius: 12px;
  border: 1px solid var(--border-mid); color: var(--text-dim);
  font-size: 14px; font-weight: 800; letter-spacing: 0.4px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent-soft); color: var(--text); opacity: 1; }

/* ---- Playable board wrap + overlays ---- */
.game-wrap {
  /* Tile size lives here so BOTH the panel padding and the board grid (a child,
     which inherits it) scale together. Desktop tiers below raise the cap. */
  --ct: clamp(26px, calc((100vw - 72px) / 9), 36px);
  position: relative;
  display: inline-block;
  line-height: 0;
  padding: calc(var(--ct) * 0.28);
  background: var(--board-surface);
  border: none;
  border-radius: 30px;
  box-shadow: var(--board-shadow);
}
.game-board.is-won { filter: saturate(1.15); }

.game-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  background: rgba(5,5,7,0.72);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border-radius: 24px;
  opacity: 1; transition: opacity 0.25s;
  line-height: 1.4;
}
.game-overlay.hide { opacity: 0; pointer-events: none; }
.game-overlay[data-state="win"] { opacity: 0; pointer-events: none; }
.game-overlay[data-state="win"].show { opacity: 1; pointer-events: auto; }
.overlay-card { text-align: center; padding: 18px 22px; max-width: 84%; }
.overlay-badge {
  display: inline-block; margin-bottom: 10px; padding: 4px 12px;
  font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--board-accent); background: var(--board-accent-faint);
  border: 1px solid var(--board-accent-soft); border-radius: 999px;
}
.overlay-title { font-size: 19px; font-weight: 900; letter-spacing: -0.3px; margin-bottom: 6px; }
.overlay-sub { font-size: 13px; color: var(--text-mute); margin-bottom: 16px; }
.overlay-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border: none; cursor: pointer;
  background: var(--board-accent); color: #04150e;
  border-radius: 11px; font-family: inherit; font-size: 14px; font-weight: 800;
  letter-spacing: 0.4px; box-shadow: 0 8px 24px -8px var(--board-accent-soft);
  transition: transform 0.12s, filter 0.2s;
}
.overlay-btn:hover { filter: brightness(1.08); }
.overlay-btn:active { transform: scale(0.97); }
.overlay-btn svg { width: 15px; height: 15px; }
.overlay-keys {
  margin-top: 14px; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-faint);
}
.overlay-link {
  display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.6px; color: var(--text-dim);
  border-bottom: 1px dashed var(--text-faint); padding-bottom: 1px;
}
.overlay-link:hover { color: var(--board-accent); border-color: var(--board-accent); opacity: 1; }

/* ---- HUD (move/box counters + actions) ---- */
.game-hud {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px;
  line-height: 1.3;
}
.hud-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.hud-stat-l { font-size: 9px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-faint); }
.hud-stat-v { font-size: 18px; font-weight: 900; font-style: italic; color: var(--text); line-height: 1; }
.hud-actions { display: flex; gap: 8px; margin-left: auto; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 14px; font-family: inherit;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-mid);
  border-radius: 10px; color: var(--text-dim);
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.1s;
}
.hud-btn svg { width: 14px; height: 14px; }
.hud-btn:hover:not(:disabled) { border-color: var(--accent-soft); color: var(--text); background: rgba(255,255,255,0.07); }
.hud-btn:active:not(:disabled) { transform: scale(0.96); }
.hud-btn:disabled { opacity: 0.4; cursor: default; }
.hud-btn-icon { padding: 9px; }
.hud-btn-icon svg { width: 16px; height: 16px; }

/* ---- D-pad (touch) ---- */
/* D-Pad entfernt — Steuerung per Swipe/Drag wie in der App */

.demo-foot {
  margin-top: 20px; font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.3px;
}

/* ---- Settings drawer ---- */
.settings-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.settings-panel {
  position: fixed; top: 0; right: 0; z-index: 100;
  width: 340px; max-width: 88vw; height: 100%;
  background: var(--surface-2); border-left: 1px solid var(--border-mid);
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  transform: translateX(102%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.settings-panel.open { transform: translateX(0); }
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.settings-title { font-size: 18px; font-weight: 900; letter-spacing: -0.3px; }
.settings-close {
  display: grid; place-items: center; cursor: pointer;
  width: 34px; height: 34px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mid); border-radius: 9px; color: var(--text-mute);
  transition: color 0.18s, border-color 0.18s;
}
.settings-close:hover { color: var(--text); border-color: var(--accent-soft); }
.settings-close svg { width: 16px; height: 16px; }
.settings-group {
  padding: 16px 0; border-top: 1px solid var(--border-soft);
}
.settings-group:first-of-type { border-top: none; padding-top: 0; }
.settings-label { display: block; font-size: 14px; font-weight: 800; letter-spacing: -0.1px; }
.settings-desc { display: block; font-size: 12px; color: var(--text-mute); margin-top: 3px; line-height: 1.4; }
.swatches { display: flex; gap: 12px; margin-top: 14px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
  transition: transform 0.12s, box-shadow 0.18s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--sw); }
.settings-toggle {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  cursor: pointer;
}
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  flex-shrink: 0; position: relative; width: 44px; height: 26px; margin-top: 2px;
  background: rgba(255,255,255,0.10); border: 1px solid var(--border-mid);
  border-radius: 999px; transition: background 0.2s, border-color 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.toggle-input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle-input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px var(--accent-glow); }
.settings-foot { margin-top: 18px; font-size: 11px; color: var(--text-faint); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Reduce-motion class (toggled from Settings) ---- */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  transition: none !important; animation: none !important;
}
html.reduce-motion .reveal { opacity: 1; transform: none; }

/* ---- Responsive board scaling on small screens ---- */
@media (max-width: 420px) {
  /* --ct is fluid (clamp) so the board auto-fits; just tighten chrome */
  .demo-frame { padding: 10px; }
  .hud-btn { padding: 8px 10px; letter-spacing: 0.4px; }
}

/* Default (brand) swatch shows a split blue/emerald chip; its active ring
   can't use the gradient as a colour, so fall back to the brand blue. */
.swatch[data-accent="default"].active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #3b82f6; }

/* ============================================================================
   ADDED: desktop widening tiers — the page is fluid up to wider maxima on
   large screens, and grids spread out to use the extra room. Text blocks stay
   width-capped so line length remains readable.
   ============================================================================ */
@media (min-width: 1024px) {
  :root { --container: 1040px; }
  .hero { padding: 76px 0 32px; }
  .hero-logo { font-size: 96px; letter-spacing: 14px; }
  .hero-lede { font-size: 20px; }
  .section { padding: 72px 0; }
  .section-title { font-size: 38px; }
  /* Spread the feature + world grids across the wider canvas */
  .features { grid-template-columns: repeat(4, 1fr); }
  /* Bigger, more inviting play board on desktop */
  .game-wrap { --ct: 42px; }
}
@media (min-width: 1440px) {
  :root { --container: 1160px; }
  .game-wrap { --ct: 48px; }
}

/* ============================================================================
   ADDED: appearance controls — range sliders + light theme
   ============================================================================ */

/* ---- Range sliders in settings ---- */
.settings-val {
  float: right; font-weight: 800; font-size: 12px; color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.settings-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin-top: 14px; cursor: pointer;
  background: var(--border-mid); border-radius: 999px; outline: none;
}
.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.settings-range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg);
  background: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft);
}
.settings-range:focus-visible { box-shadow: 0 0 0 3px var(--accent-glow); }

/* ============================================================================
   LIGHT THEME — html.theme-light overrides the palette. Accent vars are left
   to JS so the chosen accent world still applies in both themes.
   ============================================================================ */
html.theme-light {
  --bg:          #eef0f4;
  --surface:     #ffffff;
  --surface-2:   #f5f6f9;
  --card:        #ffffff;
  --border:      rgba(0,0,0,0.10);
  --border-soft: rgba(0,0,0,0.06);
  --border-mid:  rgba(0,0,0,0.16);
  --text:        #0b0c10;
  --text-dim:    rgba(0,0,0,0.78);
  --text-mute:   rgba(0,0,0,0.55);
  --text-faint:  rgba(0,0,0,0.40);
  /* Board (light): white panel, light-grey wall squares, accent outline. */
  --board-bg:           #ffffff;
  --board-surface:      #ffffff;
  --board-surface-line: rgba(0,0,0,0.08);
  --board-shadow:       0 24px 60px -30px rgba(15,23,42,0.30), 0 4px 18px rgba(15,23,42,0.05);
  --wall-fill:          #D9DCE3;
  --board-cell-line:    rgba(16,185,129,0.25);
}
/* Subtle light grid texture instead of the white-on-black one */
html.theme-light body::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
}
/* Sticky nav + overlays need light backgrounds in light mode */
html.theme-light .nav.scrolled { background: rgba(255,255,255,0.82); }
html.theme-light .game-overlay { background: rgba(245,246,249,0.78); }
html.theme-light .demo-frame { box-shadow: none; }
/* Light board crates — grey-outlined rounded square + dark centre dot, the
   same model as dark mode (accent when on a target). */
html.theme-light .game-box {
  background: #ffffff;
  border-color: rgba(0,0,0,0.22);
}
html.theme-light .game-box::after {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.20);
}
html.theme-light .game-box.on-target {
  background: var(--board-accent-mid);
  border-color: var(--board-accent);
}
html.theme-light .game-box.on-target::after {
  background: rgba(255,255,255,0.30);
  border-color: var(--board-accent-soft);
}
/* Player ring reads on white */
html.theme-light .game-player { border-color: rgba(255,255,255,0.7); }
/* Store badges + cards read better with a hairline in light mode */
html.theme-light .store-btn,
html.theme-light .feature,
html.theme-light .world,
html.theme-light .number,

/* ============ Mode screenshots (real app captures) ============ */
.mode-shot {
  margin-top: auto;
  padding-top: 14px;
}
.mode-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #050507;
}

/* ============ Footer social links ============ */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 14px 0 4px;
}
.footer-social a {
  color: var(--text-mute);
  display: inline-flex;
  padding: 4px;
  transition: color .15s ease;
}
.footer-social a:hover { color: var(--text); }
.footer-social svg { width: 20px; height: 20px; }

/* ============ CTA social buttons ============ */
.cta-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.social-btn:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.social-btn svg { width: 18px; height: 18px; }

/* ============ Zentrierte Modul-Köpfe & einheitliche Textgrößen ============ */
.section-eyebrow,
.section-title,
.section-sub { text-align: center; }
.section-sub { margin-left: auto; margin-right: auto; }
.demo-foot { text-align: center; }
.number { text-align: center; }

/* Welten-Liste: schmaler & zentriert auf Desktop */
.worlds {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Beschreibungstexte vereinheitlicht (Karten: 13px / 1.55) */
.mode-desc {
  font-size: 13px;
  line-height: 1.55;
}

/* Nav: Sprachwähler & Folgen-Button auf gleiche Höhe bringen */
.nav-cta,
.lang-switch {
  box-sizing: border-box;
  height: 36px;
  display: inline-flex;
  align-items: center;
}
.nav-cta { padding: 0 16px; }
.lang-switch { padding: 0 12px; }

/* Light Mode: Mode-Karten bleiben bewusst dunkel (App-Preview mit dunklen Screenshots) */
html.theme-light .mode-card {
  background: #0b0c10;
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html.theme-light .mode-card .mode-desc { color: rgba(255, 255, 255, 0.62); }
html.theme-light .mode-shot img { border-color: rgba(255, 255, 255, 0.10); }

/* ============ Cards: einheitliche Höhen ============ */
.features { align-items: stretch; }
.feature {
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.numbers { align-items: stretch; }
.number { height: 100%; box-sizing: border-box; }

/* ============ Welten-Karten: farbige Ränder wie in der App (beide Themes) ============ */
.world { border-color: var(--world-border); }

/* ============ Light Mode: an die helle App angelehnt ============ */
html.theme-light .world,
html.theme-light .feature,
html.theme-light .number,
html.theme-light .cta-card {
  background: #ffffff;
  box-shadow: 0 2px 10px -4px rgba(15, 23, 42, 0.10);
}
html.theme-light .world { border-width: 1.5px; }
html.theme-light .feature { border-color: rgba(15, 23, 42, 0.08); }
html.theme-light .number { border-color: rgba(15, 23, 42, 0.08); }

/* ============ Light Mode Board: Wände neutral grau wie in der App ============ */
/* In der App tragen im Light Mode nur Targets, Kisten & Player die Akzentfarbe —
   die Wall-Tiles bleiben neutral. Überschreibt die per JS gesetzte Accent-Border. */
html.theme-light .game-cell.wall::after {
  background: #DCDFE6;
  border-color: rgba(20, 25, 40, 0.10);
}


/* ============ Player auf Ziel: Punkt darunter ausblenden (wie in der App) ============ */
.game-cell.target.player-here::after {
  opacity: 0;
  animation: none;
  transition: opacity 0.18s ease;
}

/* ============ Light Mode: softere Schatten (Board-Panel & Kisten) ============ */
html.theme-light .game-box {
  box-shadow: 0 calc(var(--ct) * 0.04) calc(var(--ct) * 0.10) rgba(15, 23, 42, 0.12);
}
html.theme-light .game-box.on-target {
  box-shadow: 0 0 calc(var(--ct) * 0.3) var(--board-accent-glow);
}
/* Player im Light Mode: Accent-Ring + weicher Accent-Halo wie in der App */
html.theme-light .game-player {
  border-color: var(--board-accent-mid);
  box-shadow: 0 0 0 calc(var(--ct) * 0.10) var(--board-accent-faint),
              0 calc(var(--ct) * 0.05) calc(var(--ct) * 0.14) rgba(15, 23, 42, 0.14);
}


/* ============ Player auf Ziel: Auge wird dunkel (wie in der App) ============ */
.game-player.on-goal::after {
  background: #0b0c10;
  box-shadow: none;
}


/* ============ Mobile: HUD stabil + fluessigere Bewegung ============ */
.game-hud { font-variant-numeric: tabular-nums; }
.hud-stat { min-width: 56px; }
.hud-stat-v { font-variant-numeric: tabular-nums; }
@media (hover: none) and (pointer: coarse) {
  /* Dauerlauf: Schrittdauer exakt = 120-ms-Takt und LINEAR, damit die
     Einzelschritte zu einer durchgehend fluessigen Bewegung verschmelzen
     (Easing pro Schritt ergaebe Stop-and-Go). */
  .game-box, .game-player {
    transition-duration: 120ms;
    transition-timing-function: linear;
  }
}
