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

html, body {
  height: 100%;
  overflow: hidden;
  background: #2b2150;
  font-family: ui-rounded, "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, system-ui, sans-serif;
  color: #2b2150;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

canvas { display: block; width: 100vw; height: 100vh; }

#hud {
  position: fixed; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none; z-index: 2;
}

#geld {
  background: #fff; border: 4px solid #2b2150; border-radius: 14px;
  box-shadow: 0 5px 0 #2b2150;
  padding: 6px 18px; font-size: 2rem; font-weight: 800; min-width: 120px;
}
.links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#verdieping {
  background: #fff; border: 3px solid #2b2150; border-radius: 10px;
  padding: 2px 12px; font-size: 1rem; font-weight: 800;
}
#verdieping[hidden] { display: none; }
#geld.plop { animation: plop .25s ease; }
@keyframes plop { 50% { transform: scale(1.18); } }
.munt { color: #ffb300; -webkit-text-stroke: 2px #2b2150; }

.knoppen { display: flex; gap: 8px; pointer-events: auto; }
.knoppen button, .knoppen a {
  width: 52px; height: 52px; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; text-decoration: none; color: #2b2150;
  background: #fff; border: 4px solid #2b2150; border-radius: 14px;
  box-shadow: 0 4px 0 #2b2150; cursor: pointer;
}
.knoppen button:active, .knoppen a:active { transform: translateY(3px); box-shadow: 0 1px 0 #2b2150; }

.paneel {
  position: fixed; inset: 0; z-index: 5;
  display: grid; place-items: center; background: rgba(43, 33, 80, .55);
  padding: 16px;
}
.paneel[hidden] { display: none; }
.kaart {
  background: #fdf6e3; border: 5px solid #2b2150; border-radius: 26px;
  box-shadow: 0 10px 0 #2b2150; padding: 28px 30px; text-align: center; max-width: 460px;
}
.kaart h1 { font-size: 2rem; margin-bottom: 8px; }
.kaart p { font-size: 1.15rem; margin-bottom: 20px; }
.groot { font-size: 80px; }
.rij { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rij button {
  font: inherit; font-weight: 800; font-size: 1.15rem; color: #fff;
  background: #35c46a; border: 4px solid #2b2150; border-radius: 999px;
  box-shadow: 0 5px 0 #2b2150; padding: 10px 22px; cursor: pointer;
}
.rij button:last-child { background: #ff5f6d; }

/* Telefoon rechtop: het veld is breed, dus vragen om te draaien. */
#draai { display: none; }
@media (orientation: portrait) and (max-width: 700px) {
  #draai {
    display: block; position: fixed; left: 16px; right: 16px; bottom: 24px; z-index: 3;
    background: #fff8d6; border: 4px solid #2b2150; border-radius: 18px;
    padding: 12px 16px; text-align: center; font-weight: 800; font-size: 1.1rem; pointer-events: none;
  }
}
