/* De Salarisrun, Nmbrs browser-game
   UI volgt het ECHTE Nmbrs design system (nmbrs.com): witte cards, zachte schaduwen,
   blauw #1C98EB (accent/links) + navy #1D364F (koppen) + groen #5EBF4D (ALLEEN CTA-buttons),
   Ubuntu 700 (headings) + Source Sans Pro (body), geen italic. Zie reference-nmbrs-design-tokens. */
:root {
  /* tokens uit de ECHTE nmbrs.com (template_main.min.css): Ubuntu 700 headings in
     navy #1D364F, Source Sans Pro body, groene CTA #5EBF4D met radius 1rem, geen italic */
  --blue: #1C98EB;
  --accent: #1C98EB;       /* accentwoord in koppen = blauw (NOOIT groen) */
  --blue-deep: #1278C2;
  --green: #5EBF4D;        /* alleen CTA-buttons */
  --green-hover: #4AA53E;
  --dark-teal: #003435;
  --text-dark: #1D364F;
  --text-body: #3D556C;
  --text-caption: #7E8CA0;
  --radius-card: 24px;
  --radius-pill: 999px;
  --radius-btn: 16px;
  --font-heading: 'Ubuntu', system-ui, sans-serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  --shadow-card: 0 2px 14px rgba(29, 54, 79, 0.10);
  --shadow-float: 0 6px 22px rgba(29, 54, 79, 0.16);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: radial-gradient(120% 90% at 50% 8%, #2AA4F2 0%, #1C98EB 26%, #5FB4F0 52%, #BCE0F8 78%, #EAF6FE 100%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* graden-rondje (°) van het Nmbrs-merk, schaalt mee met font-size */
.deg {
  display: inline-block;
  width: 0.3em; height: 0.3em;
  border: 0.1em solid currentColor;
  border-radius: 50%;
  vertical-align: 0.66em;
  margin-left: 0.04em;
}

/* ====== HUD ====== */
#hud {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 10;
}

/* --- Logo (links boven) --- */
.hud-logo {
  position: absolute;
  top: clamp(14px, 3vw, 24px);
  left: clamp(14px, 3vw, 26px);
  display: flex; align-items: center; gap: 11px;
  animation: fade-down .55s ease both;
}
.hud-logo .mark {
  width: clamp(38px, 8.5vw, 48px);
  height: clamp(38px, 8.5vw, 48px);
  border-radius: 18%;
  background: var(--blue);
  box-shadow: var(--shadow-float);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(20px, 4.6vw, 26px); line-height: 1;
}
.hud-logo .wordmark { display: flex; flex-direction: column; line-height: 1.04; }
.hud-logo .wordmark b {
  color: #fff; font-family: var(--font-heading); font-size: clamp(16px, 4vw, 20px);
  font-weight: 700; letter-spacing: .2px; text-shadow: 0 1px 4px rgba(0, 52, 53, .28);
}
.hud-logo .wordmark small {
  color: rgba(255, 255, 255, .82); font-size: 10px; letter-spacing: 1.4px; font-weight: 600;
}

/* --- Wave-indicator (midden boven): schone witte card --- */
.hud-wave {
  position: absolute;
  top: clamp(14px, 3vw, 22px);
  left: 50%;
  text-align: center;
  animation: fade-down-center .55s ease .06s both;
}
.wave-badge {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  box-shadow: var(--shadow-card);
}
.wave-kicker {
  color: var(--blue);
  font-family: var(--font-body);
  font-size: clamp(11px, 2.7vw, 13px);
  font-weight: 600;
}
.wave-day {
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 700;
  line-height: 1;
}
.wave-day sup { font-size: .56em; font-weight: 700; }
.wave-sub {
  margin-top: 8px;
  font-size: clamp(11px, 2.8vw, 12.5px);
  color: #fff; font-weight: 600;
  text-shadow: 0 1px 5px rgba(0, 52, 53, .4);
}

/* --- Score (rechts boven): witte card --- */
.hud-score {
  position: absolute;
  top: clamp(14px, 3vw, 22px);
  right: clamp(14px, 3vw, 26px);
  animation: fade-down .55s ease .12s both;
}
.score-badge {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 7px;
  box-shadow: var(--shadow-card);
}
.score-badge .coin {
  width: clamp(28px, 6.6vw, 34px);
  height: clamp(28px, 6.6vw, 34px);
  border-radius: 50%;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(14px, 3.6vw, 17px);
  animation: coin-bob 2.6s ease-in-out infinite;
}
.score-badge .score-num {
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* --- Preview-tag (onder): groene pill, exact de btn-primary stijl --- */
.preview-tag {
  position: absolute;
  bottom: clamp(16px, 4vw, 24px);
  left: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  animation: fade-down-center .55s ease .18s both;
}

/* --- Mute-knop (links onder): onopvallende ronde geluid-toggle, klikbaar --- */
#btn-mute {
  position: absolute;
  bottom: clamp(14px, 3vw, 22px);
  left: clamp(14px, 3vw, 26px);
  width: clamp(38px, 8vw, 44px);
  height: clamp(38px, 8vw, 44px);
  border: none; padding: 0; cursor: pointer;
  pointer-events: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, background .2s ease, color .2s ease;
  animation: fade-down .55s ease .18s both;
}
#btn-mute:hover { background: #fff; transform: scale(1.06); }
#btn-mute:active { transform: scale(.94); }
#btn-mute.muted { color: var(--text-caption); }
#btn-mute svg { width: 56%; height: 56%; fill: currentColor; display: block; }

@keyframes fade-down { from { opacity: 0; transform: translateY(-10px); } }
@keyframes fade-down-center {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.hud-wave, .preview-tag { transform: translateX(-50%); }
@keyframes coin-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* ============================ Game-UI (overlays) ============================ */

/* HUD-gameplay pas tonen tijdens het spel; logo blijft altijd */
.hud-wave, .hud-score, #status { opacity: 0; transition: opacity .3s ease; }
#hud.playing .hud-wave, #hud.playing .hud-score, #hud.playing #status { opacity: 1; }

/* power-up status-chips (onder de score) */
#status {
  position: absolute; top: clamp(64px, 12vw, 80px); right: clamp(14px, 3vw, 26px);
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none;
}
#status .chip {
  font-family: var(--font-heading); font-size: 12px; font-weight: 700; color: #fff;
  background: var(--c, #1C98EB); padding: 5px 12px; border-radius: 999px;
  box-shadow: var(--shadow-card); animation: fade-down .3s ease both;
}

/* grote midden-flash ("Salaris uitbetaald!" etc.) */
#flash {
  position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; opacity: 0; color: #fff;
}
#flash.show { animation: flash-pop 1.8s ease forwards; }
#flash b { display: block; font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(30px, 8vw, 56px); text-shadow: 0 3px 16px rgba(0,52,53,.45); }
#flash span { display: block; margin-top: 6px; font-family: var(--font-body); font-weight: 600;
  font-size: clamp(14px, 3.4vw, 18px); text-shadow: 0 2px 8px rgba(0,52,53,.5); }
@keyframes flash-pop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1); }
}

/* volledige overlay-schermen */
.screen {
  position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(120% 90% at 50% 10%, rgba(28,152,235,.34), rgba(0,52,53,.5));
  backdrop-filter: blur(3px); animation: fade-in .35s ease both;
}
.screen.hidden { display: none; }
/* game-over = focus-moment: stevigere donkere backdrop zodat de kaart + confetti poppen (start-scherm blijft transparant) */
#screen-over { background: radial-gradient(120% 95% at 50% 8%, rgba(20,58,90,.58), rgba(6,24,38,.8)); backdrop-filter: blur(7px); }
@keyframes fade-in { from { opacity: 0; } }

.card {
  width: min(440px, 92vw); background: #fff; border-radius: 22px; padding: 30px 28px 26px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,52,53,.32); animation: card-in .4s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.logo-big { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.logo-big .mark { width: 40px; height: 40px; border-radius: 18%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: 22px; }
.logo-big span { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--text-dark); }

.card h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(30px, 8vw, 42px); color: var(--text-dark); line-height: 1.05; margin: 8px 0 4px; }
.card h1 em { color: var(--accent); font-style: normal; }
.card h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(24px, 6vw, 30px); color: var(--text-dark); margin-bottom: 6px; }
.card p { font-family: var(--font-body); font-size: 15px; color: var(--text-body); line-height: 1.55; margin: 10px 4px 20px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700; text-decoration: none;
  padding: 13px 30px; border-radius: var(--radius-btn); border: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease; box-shadow: var(--shadow-card); }
.btn span { transition: transform .2s ease; }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #1780C8; }
.btn-ghost { background: transparent; color: var(--text-caption); box-shadow: none; font-size: 14px; padding: 10px; }
.btn-ghost:hover { color: var(--blue); }

.hi { margin-top: 16px; font-family: var(--font-body); font-size: 14px; color: var(--text-caption); }
.hi b { color: var(--blue); font-weight: 700; }
.hint { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-caption); }
.hint b { color: var(--text-dark); }

.score-final { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 14px 0 2px; }
.score-final .big { font-family: var(--font-heading); font-weight: 700; font-size: clamp(54px, 16vw, 84px); color: var(--blue); line-height: 1; }
.score-final .unit { font-family: var(--font-body); font-weight: 600; color: var(--text-caption); }

#name-input { width: 100%; margin: 18px 0 6px; padding: 12px 16px; border: 2px solid #E2E9F0; border-radius: 14px;
  font-family: var(--font-body); font-size: 15px; color: var(--text-dark); text-align: center; outline: none; }
#name-input:focus { border-color: var(--blue); }
.row { display: flex; gap: 10px; margin-top: 12px; }
.row .btn { flex: 1; padding: 13px 14px; font-size: 14px; }

/* echt Nmbrs-logo (PNG met transparante hoeken) i.p.v. getekend mark */
.hud-logo .mark, .logo-big .mark, .score-badge .coin { background: none !important; box-shadow: none !important; }
.hud-logo .mark img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 8px rgba(0,52,53,.28)); }
.logo-big .mark img, .score-badge .coin img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* legenda op het startscherm: rood/groen/goud */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 16px;
  font-family: var(--font-body); font-size: 13px; color: var(--text-body); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ===== illustratieve toplaag: subtiele film-grain + vignette ===== */
#grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px; mix-blend-mode: overlay; opacity: 0.42;
}
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 26;
  background: radial-gradient(120% 115% at 50% 42%, transparent 56%, rgba(13,30,55,0.20) 100%);
}

/* ===== juice: crash-flash, record-celebration, score-pop ===== */
#crashflash { position: fixed; inset: 0; pointer-events: none; z-index: 28; background: #E5484D; opacity: 0; }
#crashflash.show { animation: crashfl .42s ease forwards; }
@keyframes crashfl { 0% { opacity: .5; } 100% { opacity: 0; } }

/* zachte randpuls in power-up-kleur (geen vlakke flash over het hele beeld) */
#pulse { position: fixed; inset: 0; pointer-events: none; z-index: 8; opacity: 0;
  background: radial-gradient(120% 100% at 50% 60%, transparent 52%, currentColor 140%); color: #5EBF4D; }
#pulse.show { animation: pulsefl .5s ease forwards; }
@keyframes pulsefl { 0% { opacity: 0; } 25% { opacity: .28; } 100% { opacity: 0; } }

/* ===== juice: snelheidslijnen bij hoog tempo (clean, geen glow) ===== */
/* Lichte radiale streaks vanuit het midden; opacity wordt aan S.speed gebonden in game.js. */
#speedlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9; opacity: 0;
  transition: opacity .25s ease;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(255,255,255,0) 0deg,
      rgba(255,255,255,0) 3.4deg,
      rgba(214,236,255,.55) 3.8deg,
      rgba(255,255,255,0) 4.2deg,
      rgba(255,255,255,0) 7deg);
  -webkit-mask-image: radial-gradient(closest-side, transparent 30%, #000 86%);
  mask-image: radial-gradient(closest-side, transparent 30%, #000 86%);
}

/* ===== juice: zwevende score-floaters (+12 / +120) bij munt-pickup ===== */
#floaters { position: fixed; inset: 0; pointer-events: none; z-index: 18; overflow: hidden; }
.floater {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-heading); font-weight: 700; white-space: nowrap;
  color: #fff; text-shadow: 0 2px 8px rgba(0,52,53,.5);
  animation: float-up .85s ease-out forwards;
}
.floater.coin { font-size: clamp(18px, 4vw, 26px); }
.floater.bonus { font-size: clamp(26px, 6vw, 40px); color: #FFC21A; }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  20% { opacity: 1; transform: translate(-50%, -64%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -112%) scale(1); }
}

/* ===== juice: game-over confetti (alleen bij record) ===== */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.conf {
  position: absolute; top: -6vh; width: 11px; height: 14px; border-radius: 2px;
  will-change: transform, opacity; animation: conf-fall linear forwards;
}
@keyframes conf-fall {
  0% { opacity: 0; transform: translateY(-10vh) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translateY(112vh) rotate(640deg); }
}

/* score-stempel bij record-onthulling */
.card.record .score-final .big { animation: score-stamp .5s cubic-bezier(.2,.9,.3,1.5) .12s both; }
@keyframes score-stamp { 0% { transform: scale(1.55); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: scale(1); } }

/* near-miss micro-cue */
#nearmiss {
  position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0; font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(15px, 3.4vw, 22px); color: #fff; text-shadow: 0 2px 8px rgba(0,52,53,.5);
}
#nearmiss.show { animation: nearmiss-pop .6s ease forwards; }
@keyframes nearmiss-pop {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(.9); }
  25% { opacity: .92; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1); }
}

.over-msg { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--blue); margin: 4px 0 2px; }
.card.record .over-msg { color: var(--green); }
.card.record { animation: record-pop .55s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes record-pop { from { transform: scale(.95); } 55% { transform: scale(1.03); } to { transform: scale(1); } }
.btn-retry { width: 100%; margin-top: 4px; }
.retry-hint { font-size: 12px; color: var(--text-caption); margin-top: 7px; }
.score-badge.pop { animation: score-pop .18s ease; }
@keyframes score-pop { 50% { transform: scale(1.13); } }

/* ===== how-to op startscherm (kleur+pijl, traint de reflex) ===== */
.howto-title { font-family: var(--font-heading); font-weight: 700; font-size: 13px; color: var(--text-dark); margin-top: 16px; }
.howto { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 9px; margin-top: 9px; }
.hk { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--text-body); background: #F1F5F9; padding: 5px 11px; border-radius: 999px; }
.hk b { color: var(--c); font-size: 14px; line-height: 1; }

/* ===== arcade-startscherm: de game blijft volledig zichtbaar ===== */
/* Geen dekkend paneel meer. Subtiele donkere vignette aan de randen voor leesbaarheid. */
#screen-start.arcade {
  background: radial-gradient(135% 110% at 50% 42%, transparent 38%, rgba(13,30,55,.30) 78%, rgba(13,30,55,.52) 100%);
  backdrop-filter: none;
  flex-direction: column; justify-content: space-between; align-items: center;
  padding: clamp(20px, 5vh, 44px) 18px; overflow: hidden;
}

/* titel + logo bovenaan, met lichte schaduw zodat het op de scène leesbaar blijft */
/* margin-top houdt de titel onder de HUD-wavebadge die in de menu-state nog zichtbaar is */
#screen-start .arcade-top { text-align: center; margin-top: clamp(48px, 9vh, 90px); }
#screen-start .arcade-top .logo-big { display: none; }
#screen-start .arcade-top .logo-big span { color: #fff; text-shadow: 0 2px 10px rgba(13,30,55,.6); }
#screen-start .arcade-top .logo-big .mark img { filter: drop-shadow(0 2px 8px rgba(13,30,55,.45)); }
#screen-start .arcade-title {
  font-family: var(--font-heading); font-weight: 700; color: #fff;
  font-size: clamp(24px, 7.5vw, 50px); line-height: 1.04; margin: 4px 0 0;
  white-space: nowrap; max-width: 96vw;
  text-shadow: 0 3px 18px rgba(13,30,55,.7), 0 1px 2px rgba(13,30,55,.5);
}
#screen-start .arcade-title em { color: #fff; font-style: normal; background: var(--green); padding: 0 .12em; border-radius: 8px; box-shadow: 0 4px 14px rgba(94,191,77,.45); }

/* compact arcade-paneel met naamveld + start, op een lichte leesbare balk */
#screen-start .arcade-panel {
  width: min(380px, 90vw); text-align: center;
  background: rgba(255,255,255,.92);
  border-radius: 18px; padding: 18px 20px 16px;
  box-shadow: 0 14px 44px rgba(0,52,53,.34), inset 0 0 0 2px rgba(28,152,235,.18);
  backdrop-filter: blur(6px);
}
#screen-start .arcade-label {
  font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 8px;
}
#name-start {
  width: 100%; margin: 0 0 12px; padding: 13px 16px;
  border: 2px solid #DCE6F0; border-radius: 12px;
  font-family: var(--font-heading); font-size: 18px; font-weight: 700; letter-spacing: .12em;
  color: var(--text-dark); text-align: center; text-transform: uppercase; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#name-start:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(28,152,235,.16); }
#name-start::placeholder { color: #AEBCCB; font-weight: 700; letter-spacing: .12em; }
#btn-play { font-size: 16px; padding: 14px 36px; width: 100%; animation: play-pulse 1.9s ease-in-out infinite; }
@keyframes play-pulse { 0%,100% { transform: scale(1); box-shadow: 0 4px 14px rgba(94,191,77,.28); } 50% { transform: scale(1.025); box-shadow: 0 10px 26px rgba(94,191,77,.42); } }
#screen-start .arcade-prompt {
  margin-top: 11px; font-family: var(--font-heading); font-weight: 700;
  font-size: 12.5px; letter-spacing: .06em; color: var(--text-caption);
  animation: arcade-blink 1.3s steps(1, end) infinite;
}
@keyframes arcade-blink { 0%,55% { opacity: 1; } 56%,100% { opacity: .25; } }

/* slanke voet: how-to + highscore, onopvallend zodat de scène rustig blijft */
#screen-start .arcade-foot { width: min(560px, 96vw); text-align: center; }
#screen-start .howto { justify-content: center; gap: 6px 7px; }
#screen-start .arcade-foot .hk {
  background: rgba(255,255,255,.86); color: var(--text-dark);
  font-size: 11.5px; padding: 4px 9px; box-shadow: 0 2px 6px rgba(0,52,53,.16);
}
#screen-start .arcade-meta {
  margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 14px; font-family: var(--font-body); font-size: 12px; color: #DCE9F4;
  text-shadow: 0 1px 4px rgba(13,30,55,.6);
}
#screen-start .arcade-meta .hi { margin: 0; color: #fff; }
#screen-start .arcade-meta .hi b { color: #BFE6B6; }
#screen-start .arcade-keys b { color: #fff; }

@media (max-width: 360px) {
  #screen-start .arcade-foot .howto { display: none; }
  #screen-start .arcade-title { font-size: 26px; }
  #screen-start .arcade-top { margin-top: 56px; }
  #screen-start .arcade-panel { padding: 14px 16px 13px; }
}

#board { margin: 14px 0 6px; text-align: left; }
.board-title { font-family: var(--font-heading); font-weight: 700; font-size: 13px; color: var(--text-dark); margin-bottom: 6px; text-align: center; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { display: flex; align-items: center; gap: 10px; padding: 5px 12px; border-radius: 10px; font-family: var(--font-body); font-size: 14px; color: var(--text-body); }
.board-list li:nth-child(even) { background: #F4F8FB; }
.board-list li.me { background: #E7F3FB; color: var(--text-dark); font-weight: 700; box-shadow: inset 0 0 0 2px var(--blue); }
.board-list li.gap { justify-content: center; color: #B6C2CF; padding: 2px; }
.board-list .rk { width: 22px; color: var(--text-caption); font-weight: 700; }
.board-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .sc { font-family: var(--font-heading); font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }

.over-secondary { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.btn-soft { background: #EAF3FB; color: var(--blue); border: none; border-radius: var(--radius-btn); font-family: var(--font-body); font-weight: 700; font-size: 14px; padding: 11px 18px; cursor: pointer; transition: background .15s ease; }
.btn-soft:hover { background: #DCEBF8; }
.link-soft { color: var(--text-caption); font-family: var(--font-body); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.link-soft:hover { color: var(--blue); }

/* ===== karakter-kiezer (Mario Kart-vibe: kaartjes, live swap in de wereld) ===== */
#char-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.char-card {
  position: relative; min-width: 0; border: 2px solid #DCE6F0; border-radius: 14px; background: #F7FAFD;
  padding: 6px 4px 7px; cursor: pointer; outline: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.char-card img { width: 100%; aspect-ratio: 34/42; object-fit: contain; pointer-events: none; }
.char-card .ph { width: 100%; aspect-ratio: 34/42; border-radius: 10px; background: #E8F0F8; }
.char-card b { font-family: var(--font-heading); font-weight: 700; font-size: 11.5px; color: var(--text-dark); letter-spacing: .02em; }
.char-card:hover { transform: translateY(-2px); border-color: #B9D7F0; }
.char-card.sel {
  border-color: var(--blue); background: #EAF5FE;
  box-shadow: 0 0 0 3px rgba(28,152,235,.18), 0 8px 18px rgba(28,152,235,.18);
}
.char-card.sel b { color: var(--blue); }
#char-tag { font-family: var(--font-body); font-size: 12.5px; color: var(--text-caption); margin: 0 0 12px; }
#char-tag b { color: var(--text-dark); }

/* bedrijfsveld: zelfde stijl als het naamveld, iets bescheidener */
#company-start {
  width: 100%; margin: 0 0 12px; padding: 11px 16px;
  border: 2px solid #DCE6F0; border-radius: 12px;
  font-family: var(--font-heading); font-size: 14px; font-weight: 700; letter-spacing: .10em;
  color: var(--text-dark); text-align: center; text-transform: uppercase; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#company-start:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(28,152,235,.16); }
#company-start::placeholder { color: #C2CEDA; font-weight: 700; letter-spacing: .10em; }

/* ===== toplijst-tabs: Iedereen vs jouw bedrijfs-league ===== */
.board-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.board-tab {
  border: none; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  background: #EFF4F9; color: var(--text-caption);
  max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.board-tab.on { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(28,152,235,.30); }
/* naam + bedrijfs-pill netjes op één lijn: .nm is flex, pill gecentreerd */
.board-list .nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.board-list .nm-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list .co {
  flex-shrink: 1; padding: 2px 8px; border-radius: 999px; line-height: 1.35;
  background: #EDF3F9; color: var(--text-caption); font-size: 10.5px; font-weight: 700;
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.board-foot {
  margin-top: 7px; text-align: center; font-family: var(--font-body);
  font-size: 12px; font-weight: 600; color: var(--text-caption);
}
.board-foot b { color: var(--blue); }
.board-list li.me .co { background: #D8ECFB; color: var(--blue-deep); }

/* ===== verplicht naamveld: shake + rode rand, label vertelt wat er mis is ===== */
#name-start.invalid {
  border-color: #E5484D;
  box-shadow: 0 0 0 4px rgba(229,72,77,.16);
  animation: name-shake .45s cubic-bezier(.36,.07,.19,.97);
}
@keyframes name-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
#label-name.error { color: #E5484D; }
.board-offline { font-size: 11px; opacity: .75; margin-top: 3px; }
