:root {
  --bg: #050608;
  --ink: #f4f7f6;
  --muted: #6a736e;
  --accent: #39ffb0;
  --amber: #ffcc33;
}

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

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Press Start 2P", "Trebuchet MS", system-ui, sans-serif;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#veld {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(8, 16, 12, 0.08) 3px
  );
  box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.38);
}

#laag {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#bord {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  display: none;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
body.speelt #bord {
  display: flex;
}
.kol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.kol span {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--amber);
}
.kol strong {
  font-size: clamp(10px, 3.2vw, 14px);
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(57, 255, 176, 0.35);
}
.kol:nth-child(2) strong { color: var(--amber); }

#score.pop { animation: pop 0.22s ease-out; }
#score.level { animation: level 0.4s ease-out; }
@keyframes pop {
  0% { transform: scale(1.25); color: var(--accent); }
  100% { transform: scale(1); }
}
@keyframes level {
  0% { transform: scale(1.4); color: #fff; }
  100% { transform: scale(1); }
}

#banner {
  position: absolute;
  top: 22%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 5.2vw, 36px);
  color: var(--amber);
  letter-spacing: 0.16em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 204, 51, 0.65);
  z-index: 3;
  pointer-events: none;
}

.scherm {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.scherm.verborgen { display: none !important; }
#af:not(.verborgen) { animation: opkomen 0.18s ease; }
@keyframes opkomen {
  from { opacity: 0; }
  to { opacity: 1; }
}

#mute {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 8;
  pointer-events: auto;
  appearance: none;
  border: 0;
  background: transparent;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 2.4vw, 16px);
  letter-spacing: 0.16em;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(57, 255, 176, 0.4);
  cursor: pointer;
  padding: 10px 12px;
}
#mute.uit {
  color: var(--muted);
  text-shadow: none;
}

#credit {
  position: static;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-align: center;
  width: 100%;
}

body.attract #veld,
body.attract #crt,
body.attract #bord {
  visibility: hidden;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.2vh;
  background: #000;
  pointer-events: auto;
  touch-action: none;
}
#boot-hit {
  position: relative;
  width: min(100vw, 86dvh);
  height: min(100vw, 86dvh);
  flex: 0 0 auto;
  touch-action: none;
  transform: translateZ(0);
}
#boot-hit img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: block;
}
#boot-ring {
  position: absolute;
  inset: 3%;
  width: 94%;
  height: 94%;
  pointer-events: none;
  transform: rotate(-90deg);
}
#boot-ring circle {
  fill: none;
  stroke-linecap: round;
}
#boot-ring .boot-track {
  stroke: rgba(57, 255, 176, 0.2);
  stroke-width: 1.7;
}
#boot-ring .boot-fill {
  stroke: #39ffb0;
  stroke-width: 2.4;
  stroke-dasharray: 295.31;
  stroke-dashoffset: 295.31;
  filter: drop-shadow(0 0 7px #39ffb0);
}
#boot-txt {
  margin: 0;
  text-align: center;
  color: #39ffb0;
  text-shadow: 0 0 14px rgba(57, 255, 176, 0.55);
  pointer-events: none;
  padding: 0 6vw max(16px, env(safe-area-inset-bottom));
}
#boot-txt strong {
  display: block;
  font-size: clamp(13px, 4.4vw, 20px);
  letter-spacing: 0.14em;
  font-weight: 400;
}
#boot-txt span {
  display: block;
  margin-top: 0.6em;
  font-size: clamp(10px, 3.1vw, 13px);
  letter-spacing: 0.2em;
  opacity: 0.88;
}
#boot.houd #boot-ring {
  filter: drop-shadow(0 0 12px rgba(57, 255, 176, 0.5));
}
#boot.weg {
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
#boot.uit {
  display: none;
}

#start.scherm,
#af.scherm.kast {
  position: absolute;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  background: #050608;
  overflow: hidden;
  padding: max(20px, calc(env(safe-area-inset-top) + 12px)) 6vw max(20px, env(safe-area-inset-bottom)) 7vw;
}
#start.scherm::before,
#af.scherm.kast::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: url("splash.jpg") center / cover no-repeat;
  animation: splashReis 52s linear infinite;
  pointer-events: none;
}
#start.scherm::after,
#af.scherm.kast::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 6, 8, 0.86) 0%, rgba(5, 6, 8, 0.58) 40%, rgba(5, 6, 8, 0.22) 100%);
  pointer-events: none;
}
.splash-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.splash-fx::before {
  content: "";
  position: absolute;
  width: 78%;
  height: 62%;
  left: 8%;
  top: 12%;
  background: radial-gradient(ellipse at center, rgba(57, 255, 176, 0.16), rgba(57, 255, 176, 0.05) 42%, transparent 70%);
  animation: zoeklicht 22s ease-in-out infinite;
}
.splash-fx::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse 80% 55% at 50% 40%, rgba(210, 230, 220, 0.07), transparent 62%);
  animation: splashMist 38s ease-in-out infinite;
}
#start.scherm > *:not(.splash-fx),
#af.scherm.kast > *:not(.splash-fx) {
  position: relative;
  z-index: 1;
}
#start.scherm > .splash-fx,
#af.scherm.kast > .splash-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
}
@keyframes splashReis {
  0% { transform: scale(1.06) translate(1.8%, 0.6%); }
  38% { transform: scale(1.14) translate(-3.4%, 1.5%); }
  72% { transform: scale(1.11) translate(-0.8%, -2.6%); }
  100% { transform: scale(1.06) translate(1.8%, 0.6%); }
}
@keyframes zoeklicht {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  40% { transform: translate(18%, 10%) scale(1.12); opacity: 0.9; }
  70% { transform: translate(-8%, 16%) scale(0.94); opacity: 0.65; }
}
@keyframes splashMist {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(-4%, 3%) scale(1.08); opacity: 1; }
}

.merk {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  grid-row: 2;
  min-height: clamp(64px, 12vh, 112px);
}
.merk-tekst {
  position: relative;
  z-index: 1;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(52px, 11vw, 96px);
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  color: var(--accent);
  animation: merkAdem 3.4s ease-in-out infinite;
}
@keyframes merkAdem {
  0%, 100% {
    text-shadow:
      0 3px 0 rgba(0, 0, 0, 0.45),
      0 0 8px rgba(57, 255, 176, 0.28),
      0 0 18px rgba(57, 255, 176, 0.12);
  }
  50% {
    text-shadow:
      0 3px 0 rgba(0, 0, 0, 0.45),
      0 0 14px rgba(57, 255, 176, 0.7),
      0 0 32px rgba(57, 255, 176, 0.38),
      0 0 56px rgba(57, 255, 176, 0.18);
  }
}
.merk::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: clamp(118px, 22vw, 188px);
  height: clamp(46px, 8.4vw, 76px);
  border: 2px solid rgba(57, 255, 176, 0.72);
  border-radius: 50%;
  pointer-events: none;
  animation: hoepelAdem 3.4s ease-in-out infinite;
}
@keyframes hoepelAdem {
  0%, 100% {
    transform: rotate(-22deg) scale(0.9);
    opacity: 0.42;
    box-shadow:
      0 0 6px rgba(57, 255, 176, 0.25),
      inset 0 0 6px rgba(57, 255, 176, 0.12);
  }
  50% {
    transform: rotate(-22deg) scale(1.12);
    opacity: 1;
    box-shadow:
      0 0 12px rgba(57, 255, 176, 0.65),
      0 0 28px rgba(57, 255, 176, 0.35),
      inset 0 0 10px rgba(57, 255, 176, 0.28);
  }
}

.go {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 204, 51, 0.7);
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 3.4vw, 22px);
  letter-spacing: 0.14em;
  padding: 12px 16px;
  cursor: pointer;
  animation: knipper 2.2s ease-in-out infinite;
}
.go:focus { outline: none; color: var(--amber); }

#dash-titel,
#dash-titel-af {
  margin: clamp(8px, 1.8vh, 16px) 0 4px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 2.8vw, 26px);
  letter-spacing: 0.14em;
  color: var(--amber);
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 204, 51, 0.55);
}
#dash-modus {
  margin: 0 0 8px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 2.2vw, 18px);
  letter-spacing: 0.18em;
  color: var(--accent);
  text-align: center;
}
#speler-blok {
  position: relative;
  z-index: 6;
  width: 100%;
  margin: 0 0 12px;
  pointer-events: auto;
  text-align: center;
}
#speler-kies {
  margin: 0 0 8px;
  width: 100%;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.12em;
  color: var(--amber);
  text-align: center;
  white-space: nowrap;
}
#speler-naam {
  display: block;
  width: 100%;
  max-width: 16em;
  margin: 0 auto 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: none;
}
#speler-nu {
  margin: 0 0 10px;
  width: 100%;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.1em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(57, 255, 176, 0.4);
  text-align: center;
  text-transform: uppercase;
}
#speler-aan {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  width: 100%;
}
#speler-nieuw {
  flex: 0 0 auto;
  max-width: none;
  white-space: nowrap;
  animation: none;
  letter-spacing: 0.1em;
  font-size: clamp(12px, 2.6vw, 16px);
  padding: 8px 10px;
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 12px rgba(57, 255, 176, 0.5);
}
#speler-in {
  flex: 1 1 0;
  min-width: 0;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 3.2vw, 18px);
  letter-spacing: 0.08em;
  color: #f4f7f6;
  background: rgba(5, 8, 8, 0.4);
  border: 2px solid var(--amber);
  padding: 8px 12px;
  pointer-events: auto;
}
#speler-in:focus { outline: none; color: #fff; }
.kast-lijst {
  list-style: none;
  width: max-content;
  max-width: 94vw;
  margin: 6px auto 0;
  display: grid;
  grid-template-columns: 3.4em 6.4em 1.25em 5em;
  column-gap: 0.28em;
  row-gap: 0.4vh;
  align-items: center;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-size: clamp(20px, 3.6vh, 32px);
  font-weight: 700;
  color: #b8ffe0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 12px rgba(57, 255, 176, 0.28);
  letter-spacing: 0.02em;
}
.kast-lijst li {
  display: contents;
}
.kast-lijst .nr {
  color: #ffe08a;
  letter-spacing: 0;
  white-space: nowrap;
}
.kast-lijst .tag {
  color: #f4f7f6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.kast-lijst .land {
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: none;
}
.kast-lijst .land .vlag {
  display: block;
  width: 1.2em;
  height: 0.82em;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.kast-lijst .sc {
  color: #39ffb0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: right;
}
.kast-lijst li.top .nr,
.kast-lijst li.top .tag,
.kast-lijst li.top .sc {
  color: var(--amber);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 14px rgba(255, 204, 51, 0.45);
}

#start-rij {
  grid-row: 4;
  flex: none;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
#start-scores {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
#start #hiscore.kast-lijst {
  font-size: clamp(14px, 2.5vh, 26px);
  row-gap: 0.32vh;
}
#start-onder {
  grid-row: 6;
  flex: none;
  width: min(88vw, 380px);
  margin-top: 0;
  padding-top: 0;
  justify-self: center;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#schip-blok {
  width: 100%;
  margin: 0;
}
#schepen-veld {
  display: block;
  width: 100%;
  height: 12vh;
  min-height: 76px;
  max-height: 114px;
  pointer-events: auto;
  cursor: pointer;
}

#keuze {
  flex-shrink: 0;
  margin-top: 0;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  pointer-events: auto;
}

#schip-kies {
  margin: 0 0 4px;
  width: 100%;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.12em;
  color: var(--amber);
  text-align: center;
}

#schip-namen {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  margin: 2px 0 18px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(13px, 2.4vw, 18px);
  letter-spacing: 0.12em;
  color: rgba(244, 247, 246, 0.45);
  text-align: center;
  pointer-events: auto;
}
#schip-namen span {
  cursor: pointer;
}
#schip-namen span.aan {
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 204, 51, 0.45);
}

#sterkte {
  margin: 0 0 8px;
  width: 100%;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.12em;
  color: var(--amber);
  text-align: center;
  white-space: nowrap;
}

#modi {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 24px);
  width: 100%;
  pointer-events: auto;
}
.go.modus {
  flex: 1 1 0;
  max-width: 8.5em;
  font-size: clamp(14px, 3.2vw, 18px);
  letter-spacing: 0.22em;
  padding: 8px 12px;
  animation: none;
  color: rgba(255, 204, 51, 0.38);
  border: 2px solid rgba(255, 204, 51, 0.22);
  background: rgba(5, 8, 8, 0.4);
}
.go.modus.aan {
  color: var(--amber);
  border-color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 204, 51, 0.45);
}
@media (hover: hover) and (pointer: fine) {
  #modus-tap,
  #modus-fly,
  #speler-nieuw {
    transition: transform 0.14s ease;
  }
  #modus-tap:hover,
  #modus-fly:hover,
  #speler-nieuw:hover {
    transform: scale(1.07);
  }
}
#ga,
#cont-go {
  margin-top: 2px;
  font-size: clamp(24px, 5.2vw, 36px);
  letter-spacing: 0.22em;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(57, 255, 176, 0.7);
  padding: 6px 22px;
}
#ga:focus,
#cont-go:focus { color: #fff; }

@keyframes knipper {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.9; }
}

#start.scherm.kast:not(.verborgen) {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto 1fr auto 1fr auto;
  justify-content: stretch;
  justify-items: stretch;
  align-items: stretch;
}
#af.scherm.kast:not(.verborgen) {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto 1fr auto 1fr auto 1fr;
  justify-items: center;
  align-items: center;
  padding-top: max(16px, calc(env(safe-area-inset-top) + 8px));
  padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 22px));
}
#af-kop,
#af-bord {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#af-kop { grid-row: 2; }
#af-bord { grid-row: 4; }
#opnieuw { grid-row: 6; }
.play-again {
  appearance: none;
  margin-top: 0;
  border: 2px solid var(--accent);
  border-radius: 14px;
  background: rgba(5, 16, 12, 0.78);
  color: var(--accent);
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 3.8vw, 26px);
  letter-spacing: 0.22em;
  padding: 10px 28px;
  cursor: pointer;
  text-shadow: 0 0 14px rgba(57, 255, 176, 0.75);
  box-shadow:
    0 0 12px rgba(57, 255, 176, 0.32),
    inset 0 0 16px rgba(57, 255, 176, 0.08);
  animation: playAgain 2.2s ease-in-out infinite;
  pointer-events: auto;
}
.play-again:focus { outline: none; color: #fff; }
@keyframes playAgain {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(57, 255, 176, 0.22),
      inset 0 0 12px rgba(57, 255, 176, 0.05);
  }
  50% {
    box-shadow:
      0 0 22px rgba(57, 255, 176, 0.55),
      inset 0 0 22px rgba(57, 255, 176, 0.14);
  }
}
@media (hover: hover) and (pointer: fine) {
  .play-again {
    transition: transform 0.14s ease;
  }
  .play-again:hover {
    transform: scale(1.06);
    color: #fff;
  }
}
#af-kicker {
  margin: 0 0 8px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 4.4vw, 36px);
  letter-spacing: 0.12em;
  color: #ff4d6d;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 77, 109, 0.45);
  text-align: center;
  width: 100%;
}
#af-score {
  margin: 0 0 6px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 6.2vw, 48px);
  color: var(--amber);
  letter-spacing: 0.06em;
  text-align: center;
  width: 100%;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 204, 51, 0.35);
}
#af-reden {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: clamp(10px, 2.2vw, 15px);
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
  max-width: 92vw;
  padding: 0 4vw;
  line-height: 1.25;
}
#af-reden.record {
  color: var(--amber);
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 3.2vw, 20px);
  letter-spacing: 0.14em;
  text-shadow: 0 0 12px rgba(255, 204, 51, 0.4);
}
#af-sub {
  margin-bottom: 12px;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}
#af-sub.record { color: var(--amber); }
.bord-label {
  margin: 2px 0 6px;
  font-size: 7px;
  letter-spacing: 0.22em;
  color: var(--amber);
}
#af-lijst,
#af-world {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 7px;
  max-width: 92vw;
}
#af-lijst li.top,
#af-world li.top { color: var(--accent); }
#af-world { margin-bottom: 16px; }

#levens {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
#combo {
  margin-top: 6px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--amber);
}
#cont.scherm {
  justify-content: center;
  align-items: center;
  background: transparent;
  padding: 0;
  transform: translateY(5.5vh);
}
#cont-n {
  visibility: hidden;
  display: block;
  width: 1px;
  height: 22vh;
  min-height: 148px;
  max-height: 196px;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

#schip-hint {
  margin: 0 0 10px;
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.16em;
  color: var(--muted);
  text-align: left;
}

#af-naam,
#af-naam.verborgen {
  display: none !important;
}
#af-speler {
  animation: none;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#naam-in.verborgen,
#af-speler.verborgen {
  display: none !important;
}
#naam-in {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: min(78vw, 380px);
  border: 2px solid var(--accent);
  background: rgba(5, 8, 8, 0.72);
  color: var(--amber);
  font-family: Fredoka, "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 4.4vw, 30px);
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-radius: 14px;
  outline: none;
  pointer-events: auto;
}
#naam-in:focus {
  box-shadow: 0 0 18px rgba(57, 255, 176, 0.45);
  border-color: #fff;
}

@keyframes splashReisGsm {
  0% { transform: scale(1.13) translate(5.4%, 0.12%); }
  25% { transform: scale(1.16) translate(0.3%, 0.5%); }
  50% { transform: scale(1.13) translate(-5.4%, 0.12%); }
  75% { transform: scale(1.16) translate(0.3%, -0.28%); }
  100% { transform: scale(1.13) translate(5.4%, 0.12%); }
}
@keyframes zoeklichtGsm {
  0% { transform: translate(10%, 0) scale(1); opacity: 0.58; }
  25% { transform: translate(18%, 1.5%) scale(1.08); opacity: 0.88; }
  50% { transform: translate(-8%, 0.4%) scale(1); opacity: 0.58; }
  75% { transform: translate(-16%, -1%) scale(1.06); opacity: 0.82; }
  100% { transform: translate(10%, 0) scale(1); opacity: 0.58; }
}
@keyframes splashMistGsm {
  0% { transform: translate(3%, 0) scale(1); opacity: 0.75; }
  50% { transform: translate(-3%, 0.6%) scale(1.05); opacity: 1; }
  100% { transform: translate(3%, 0) scale(1); opacity: 0.75; }
}

@media (orientation: portrait) and (max-width: 900px) {
  #start.scherm,
  #af.scherm.kast {
    padding: max(14px, calc(env(safe-area-inset-top) + 6px)) 5vw max(16px, env(safe-area-inset-bottom)) 5vw;
    overflow-x: hidden;
    overflow-y: auto;
  }
  #start.scherm::before,
  #af.scherm.kast::before {
    animation: splashReisGsm 26s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
  }
  .splash-fx::before {
    animation: zoeklichtGsm 22s linear infinite;
  }
  .splash-fx::after {
    animation: splashMistGsm 28s linear infinite;
  }
  #start.naam-bezig #start-rij,
  #start.naam-bezig #schip-blok,
  #start.naam-bezig #keuze {
    display: none;
  }
  #start.naam-bezig #start-onder {
    grid-row: 4;
  }
  #start.scherm.kast:not(.verborgen) {
    grid-template-rows: minmax(8px, 0.45fr) auto minmax(8px, 0.55fr) auto minmax(8px, 0.4fr) auto;
  }
  #af.scherm.kast:not(.verborgen) {
    grid-template-rows: minmax(8px, 0.35fr) auto minmax(8px, 0.45fr) auto minmax(8px, 0.3fr) auto minmax(8px, 0.28fr);
  }
  .merk {
    min-height: clamp(48px, 9.5vh, 84px);
  }
  .merk-tekst {
    font-size: clamp(40px, 10vw, 64px);
    letter-spacing: 0.26em;
    padding-left: 0.26em;
  }
  .merk::before {
    width: clamp(92px, 22vw, 140px);
    height: clamp(36px, 7.6vw, 58px);
  }
  #start-onder {
    width: min(92vw, 380px);
  }
  #dash-titel,
  #dash-titel-af {
    margin: 6px 0 4px;
    font-size: clamp(15px, 3.8vw, 22px);
  }
  #dash-modus {
    margin: 0 0 6px;
    font-size: clamp(12px, 3.1vw, 16px);
  }
  .kast-lijst {
    width: max-content;
    max-width: 94vw;
    margin: 4px auto 0;
    grid-template-columns: 3.4em 6.4em 1.25em 5em;
    column-gap: 0.28em;
    row-gap: 0.28vh;
    font-size: clamp(14px, 3.5vw, 18px);
  }
  #start #hiscore.kast-lijst {
    font-size: clamp(13px, 3.3vw, 16px);
    row-gap: 0.22vh;
  }
  #speler-blok { margin: 0 0 10px; }
  #speler-kies,
  #schip-kies,
  #sterkte {
    margin: 0 0 6px;
    font-size: clamp(11px, 2.9vw, 14px);
    letter-spacing: 0.1em;
  }
  #speler-nu {
    margin: 0 0 8px;
    font-size: clamp(12px, 3.1vw, 15px);
  }
  #speler-in {
    font-size: clamp(14px, 3.5vw, 17px);
    padding: 8px 12px;
  }
  #speler-nieuw {
    font-size: clamp(12px, 3.1vw, 15px);
    padding: 8px 10px;
  }
  #schepen-veld {
    height: 10vh;
    min-height: 64px;
    max-height: 92px;
  }
  #schip-namen {
    margin: 2px 0 12px;
    font-size: clamp(12px, 3.3vw, 16px);
  }
  .go.modus {
    font-size: clamp(14px, 3.7vw, 17px);
    padding: 8px 12px;
  }
  #ga,
  #cont-go {
    font-size: clamp(22px, 6.2vw, 30px);
    padding: 6px 18px;
  }
  #credit { margin-top: 2px; font-size: 9px; }
  #af-kicker { font-size: clamp(20px, 5.6vw, 30px); margin-bottom: 6px; }
  #af-score { font-size: clamp(28px, 7.2vw, 38px); }
  #af-reden.record { font-size: clamp(13px, 3.5vw, 17px); }
  .play-again {
    font-size: clamp(15px, 4.4vw, 22px);
    padding: 10px 22px;
  }
  #mute { font-size: clamp(12px, 3.3vw, 15px); padding: 10px 12px; }
}

@media (orientation: portrait) and (max-height: 700px) {
  .merk { min-height: 42px; }
  .merk-tekst { font-size: clamp(32px, 8.5vw, 44px); }
  #schepen-veld {
    height: 8vh;
    min-height: 54px;
    max-height: 72px;
  }
  #start #hiscore.kast-lijst { font-size: 13px; }
  .kast-lijst { font-size: 13px; }
}
