/* Groot en duidelijk: knoppen van minstens 56px hoog en letters vanaf 18px,
   zodat het ook met minder scherpe ogen of minder vaste vingers goed speelt. */

:root {
  --achtergrond: #2b3038;
  --paneel: #ffffff;
  --tekst: #1d2228;
  --zacht: #5d6670;
  --licht: #f4f1e8;
  --accent: #f2b705;
  --accent-tekst: #2b2100;
  --knop: #3a414b;
  --knop-tekst: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--achtergrond);
  color: var(--licht);
  font: 18px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.kop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.titel {
  flex: 1;
  text-align: center;
}

#levelNaam {
  font-size: 22px;
  font-weight: 700;
}

.teller {
  font-size: 17px;
  color: #c9ced4;
}

.speelveld {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
}

canvas {
  display: block;
  touch-action: none;
  border-radius: 14px;
}

.melding {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin: 0 auto;
  max-width: 420px;
  background: var(--paneel);
  color: var(--tekst);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.melding.vast {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.melding[hidden] { display: none; }

.balk {
  display: flex;
  gap: 10px;
  padding: 10px 16px 16px;
  justify-content: center;
}

.knop {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: var(--knop);
  color: var(--knop-tekst);
  font: inherit;
  font-weight: 600;
  min-height: 56px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.balk .knop {
  flex: 1;
  max-width: 150px;
}

.balk .knop span { font-size: 22px; }

.knop.klein {
  width: 56px;
  font-size: 24px;
  padding: 0;
}

.knop.groot {
  background: var(--accent);
  color: var(--accent-tekst);
  font-size: 20px;
}

.knop:active { transform: scale(0.97); }
.knop:disabled { opacity: 0.4; cursor: default; }
.knop:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.melding .knop {
  background: var(--accent);
  color: var(--accent-tekst);
}

.laag {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}

.laag[hidden] { display: none; }

.kaart {
  background: var(--paneel);
  color: var(--tekst);
  border-radius: 20px;
  padding: 24px 20px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 100%;
}

.kaart.breed { max-width: 520px; }

.kaart h2 {
  margin: 0;
  font-size: 28px;
}

.kaart p { margin: 0; color: var(--zacht); }

.kaart .knop:not(.groot) {
  background: #e7e9ec;
  color: var(--tekst);
}

.sterren {
  font-size: 52px;
  letter-spacing: 6px;
  color: var(--accent);
  line-height: 1;
}

.sterren .uit { color: #d5d9de; }

.raster {
  overflow-y: auto;
  padding: 4px;
  text-align: left;
}

.raster h3 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.raster h3:first-child { margin-top: 0; }

.blok {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
}

.vakje {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #e7e9ec;
  color: var(--tekst);
  font: inherit;
  font-weight: 700;
  min-height: 64px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.vakje small {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
}

.vakje.nu { outline: 3px solid var(--accent); }

.kaart p.bron {
  font-size: 13px;
  line-height: 1.4;
}

.bron a { color: inherit; }
