:root {
  --cream: #fff6e3;
  --paper: #fffdf7;
  --ink: #2a1a12;
  --red: #e8362b;
  --red-dark: #b81e16;
  --green: #3aa845;
  --blue: #2f7df0;
  --yellow: #ffd93b;
  --pink: #ff5fb0;
  --shadow: 5px 5px 0 var(--ink);
  --radius: 22px;
  --font: "Fredoka", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(42, 26, 18, 0.08) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.1; font-weight: 700; }
h3 { font-size: 1.35rem; line-height: 1.15; font-weight: 700; }
a { color: inherit; }
img, canvas { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Kop ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(255, 246, 227, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 1.35rem; font-weight: 600; white-space: nowrap; }
.brand b { color: var(--red); font-weight: 700; }
.brand-char { width: 44px; height: 44px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; padding: 6px 12px; border-radius: 999px; }
.nav a:hover { background: var(--yellow); }
.lang { display: flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.lang button { font: inherit; font-weight: 600; font-size: 0.95rem; border: 0; background: transparent; color: var(--ink); padding: 4px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1.1rem; text-decoration: none; text-align: center;
  color: var(--ink); background: var(--paper);
  border: 3px solid var(--ink); border-radius: 999px; padding: 10px 24px;
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-white { background: var(--paper); }
.btn-big { font-size: 1.4rem; padding: 12px 36px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-row.center { justify-content: center; }

/* ---------- Held bovenaan ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px;
  max-width: 1160px; margin: 0 auto; padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 40px) 24px;
}
.kicker {
  display: inline-block; font-weight: 600; background: var(--yellow);
  border: 3px solid var(--ink); border-radius: 999px; padding: 4px 16px; transform: rotate(-2deg);
}
h1 { font-size: clamp(3.4rem, 10vw, 6.6rem); line-height: 0.92; font-weight: 700; margin: 18px 0 20px; letter-spacing: -0.01em; }
.h1-super { display: block; color: var(--blue); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--ink); }
.h1-aardbei { display: block; color: var(--red); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--ink); }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 34em; margin-bottom: 26px; }
.hero-art canvas { display: block; width: 100%; aspect-ratio: 560 / 460; height: auto; }

/* ---------- Secties ---------- */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(36px, 7vw, 72px) clamp(16px, 4vw, 40px); }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head p { font-size: 1.15rem; margin-top: 8px; }

/* ---------- Het spel ---------- */
.game-box {
  position: relative; max-width: 980px; margin: 0 auto;
  border: 4px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 8px 8px 0 var(--ink); background: #7ecdff;
  aspect-ratio: 16 / 9;
}
.game-box canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.game-box:fullscreen { border: 0; border-radius: 0; max-width: none; width: 100vw; height: 100vh; aspect-ratio: auto; display: grid; place-items: center; background: #1b120c; }
.game-box:fullscreen canvas { width: min(100vw, calc(100vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; }

.game-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; z-index: 3; }
.tool {
  width: 40px; height: 40px; padding: 7px; cursor: pointer; color: var(--ink);
  background: rgba(255, 253, 247, 0.9); border: 3px solid var(--ink); border-radius: 12px;
}
.tool svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.tool.is-off .wave { display: none; }
.tool.is-off { background: rgba(255, 200, 200, 0.9); }
.tool[aria-pressed="true"]#btn-pause { background: var(--yellow); }

.overlay {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 12px;
  background: rgba(42, 26, 18, 0.16); overflow: auto;
}
.panel {
  width: min(100%, 640px); text-align: center;
  background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(14px, 2.6vw, 26px);
}
.panel h3 { font-size: clamp(1.4rem, 3.6vw, 2.2rem); margin-bottom: 14px; }
.diffs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.diff {
  font: inherit; color: var(--ink); cursor: pointer; padding: 10px 6px;
  border: 3px solid var(--ink); border-radius: 16px; background: #fff;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  transition: transform 0.08s ease;
}
.diff b { font-size: 1.1rem; font-weight: 700; }
.diff small { font-size: 0.8rem; line-height: 1.2; }
.diff-easy { background: #d5f5c4; }
.diff-normal { background: #fff1a8; }
.diff-hard { background: #ffd0a6; }
.diff-super { background: #ffc0d9; }
.diff[aria-pressed="true"] { transform: translateY(-4px) rotate(-1.5deg); box-shadow: 4px 5px 0 var(--ink); outline: 3px solid var(--ink); outline-offset: 0; }
.hint { font-size: 0.92rem; margin-top: 14px; opacity: 0.85; }
.end-text { font-size: 1.1rem; margin-bottom: 10px; }
.badge { display: inline-block; font-weight: 700; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 16px; transform: rotate(-2deg); margin-bottom: 8px; }
.scores { display: flex; justify-content: center; gap: 14px; margin: 10px 0 18px; }
.scores > div { border: 3px solid var(--ink); border-radius: 16px; padding: 8px 18px; background: #fff; min-width: 130px; }
.scores dt { font-size: 0.85rem; }
.scores dd { margin: 0; font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
#ov-end.is-win .panel h3 { color: var(--green); }
#ov-end:not(.is-win) .panel h3 { color: var(--red); }

/* ---------- Heldenkaarten ---------- */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.card {
  grid-column: span 2;
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px 20px; background: var(--paper); text-align: center;
}
.card canvas { display: block; width: 100%; max-width: 220px; aspect-ratio: 1; height: auto; margin: 0 auto 4px; }
.card-wide { grid-column: span 6; display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 12px; text-align: left; }
.card-wide h3 { font-size: 2rem; }
.card:not(.card-wide) { grid-column: span 3; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 12px; text-align: left; }
.card-red { background: #ffd9d4; }
.card-yellow { background: #fff3b0; }
.card-green { background: #d8f3c8; }
.card-blue { background: #d3e4ff; }
.card-white { background: #ffffff; }
.card-purple { background: #eadcff; }
.cards .card.card-full { grid-column: span 6; grid-template-columns: 240px 1fr; }
.card:nth-child(odd) { transform: rotate(-0.6deg); }
.card:nth-child(even) { transform: rotate(0.6deg); }
.role { display: inline-block; font-size: 0.85rem; font-weight: 600; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 1px 12px; margin-bottom: 6px; }
.card h3 { margin-bottom: 6px; }

/* ---------- Uitleg ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { position: relative; background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 20px 20px; }
.num {
  position: absolute; top: -22px; left: 18px; width: 46px; height: 46px; display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 700; color: #fff; background: var(--red); border: 4px solid var(--ink); border-radius: 50%;
}
.steps h3 { margin-bottom: 6px; }
.keys { margin-top: 12px; display: flex; gap: 8px; }
kbd {
  font: inherit; font-weight: 700; min-width: 42px; text-align: center; padding: 4px 10px;
  background: #fff; border: 3px solid var(--ink); border-bottom-width: 6px; border-radius: 10px;
}
kbd.wide { min-width: 150px; }

/* ---------- De tekening ---------- */
.drawing { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.drawing h2 { margin-bottom: 12px; }
.drawing p { font-size: 1.15rem; margin-bottom: 22px; }
.polaroid { margin: 0; background: #fff; border: 4px solid var(--ink); padding: 14px 14px 18px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-2.5deg); border-radius: 6px; }
.polaroid img { display: block; width: 100%; height: auto; border-radius: 2px; }

/* ---------- Ideeënformulier ---------- */
.idea-form {
  max-width: 640px; margin: 0 auto; display: grid; gap: 8px;
  background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 28px);
}
.idea-form label { font-weight: 600; margin-top: 6px; }
.idea-form input[type="text"], .idea-form textarea {
  font: inherit; color: var(--ink); width: 100%; padding: 10px 14px;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; resize: vertical;
}
.idea-form .btn { justify-self: start; margin-top: 12px; }
.idea-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.idea-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.idea-status { font-weight: 600; margin-top: 8px; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #d8f3c8; }
.idea-status.is-err { background: #ffd9d4; }
.makers { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }

.foot { text-align: center; padding: 28px 16px 40px; border-top: 3px solid var(--ink); background: var(--yellow); font-weight: 500; }
/* Verwijzing naar Karel Zonderling (logo in de stijl van die site) */
.kz { display: flex; align-items: center; gap: 18px; max-width: 620px; margin: 22px auto 0; padding: 16px 22px; text-align: left; text-decoration: none; color: #fff; background: #7b68ee; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.kz:hover, .kz:focus-visible { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.kz-logo { flex: none; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: #ffd700; border: 4px solid #000; color: #000; font: italic 44px/1 'Bangers', 'Fredoka', sans-serif; padding-right: 4px; }
.kz-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.kz-also { font-weight: 600; font-size: 1rem; }
.kz-name { font: italic 2.3rem/1.05 'Bangers', 'Fredoka', sans-serif; letter-spacing: 1px; text-transform: uppercase; text-shadow: 2px 2px 0 var(--ink); }
.kz-url { font-weight: 600; font-size: 0.95rem; opacity: .95; }
.kz-go { flex: none; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 999px; }
@media (max-width: 560px) {
  .kz { flex-wrap: wrap; justify-content: center; text-align: center; gap: 10px 14px; }
  .kz-text { flex: 1 1 100%; order: 2; }
  .kz-go { order: 3; }
  .kz-name { font-size: 2rem; }
}
@media print { .kz { display: none; } }

/* ---------- Kleine schermen ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .cta-row { justify-content: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cards { grid-template-columns: 1fr; }
  .card, .card-wide, .card:not(.card-wide), .cards .card.card-full { grid-column: auto; display: grid; grid-template-columns: 120px 1fr; text-align: left; align-items: center; gap: 10px; }
  .card-wide h3 { font-size: 1.5rem; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .drawing { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding-left: 10px; padding-right: 10px; }
  .game-box { aspect-ratio: auto; border-width: 3px; box-shadow: 4px 4px 0 var(--ink); border-radius: 14px; display: flex; flex-direction: column; overflow: visible; background: var(--paper); }
  .game-box canvas { height: auto; aspect-ratio: 16 / 9; border-radius: 10px 10px 0 0; }
  .overlay { position: relative; inset: auto; background: transparent; padding: 10px; }
  .panel { border: 0; box-shadow: none; padding: 8px 4px; }
  .diffs { grid-template-columns: repeat(2, 1fr); }
  .game-tools { position: static; justify-content: center; padding: 8px; order: 3; }
  /* springknoppen in een eigen rij onder het spel, anders vallen ze over pauze en geluid */
  .game-tools-top ~ .pad { position: static; order: 2; padding: 10px 10px 2px; }
  .scores > div { min-width: 0; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .diff { transition: none; }
}

/* Ideeënbus (geheime pagina met alle ingestuurde ideeën) */
.inbox { max-width: 760px; }
.inbox-tools { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.inbox-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.inbox-item { background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.inbox-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.inbox-meta span { opacity: 0.7; font-size: 0.95rem; }
.inbox-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Oproep om een idee te sturen */
.btn-yellow { background: var(--yellow); }
.nav a.nav-idea { background: var(--yellow); border: 3px solid var(--ink); font-weight: 600; padding: 3px 14px; }
.nav a.nav-idea:hover { background: var(--pink); }
.idea-box {
  background: var(--yellow); border: 4px solid var(--ink); border-radius: calc(var(--radius) + 8px); box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 44px) clamp(12px, 3vw, 32px);
}
.idea-box .kicker { background: var(--pink); color: #fff; margin-bottom: 10px; }
.idea-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.95rem; margin-bottom: 4px; }
.chip {
  font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; padding: 4px 14px;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 999px;
}
.chip:hover, .chip:focus-visible { background: var(--yellow); }
.idea-nudge {
  display: inline-block; margin-top: 16px; font-weight: 600; color: var(--ink);
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 6px 18px; text-decoration: none;
}
.idea-nudge:hover { background: var(--pink); color: #fff; }
.idea-form .btn { justify-self: stretch; text-align: center; }

/* Spelletjeskeuze en het parcours */
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px 22px; max-width: 1080px; margin: 0 auto; }
.game-card-green { background: #d5f5c4; }
.game-card {
  position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.game-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.game-card-red { background: #ffd9d4; }
.game-card-yellow { background: #fff1a8; }
.game-card-purple { background: #e6dbff; }
.game-card-blue { background: #d4ecff; }
.game-card canvas { width: 130px; height: 130px; flex: none; }
.game-card-text { display: grid; gap: 6px; justify-items: start; }
.game-card-text b { font-size: 1.35rem; line-height: 1.15; }
.game-card-new { position: absolute; top: -18px; left: 14px; background: var(--pink); color: #fff; }
.h1-small { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; margin: 0 0 8px; }
.game-tools.game-tools-top { top: 10px; bottom: auto; right: 10px; }
.game-tools-top ~ .pad { z-index: 3; }
.pad { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.pad-btn {
  pointer-events: auto; font: inherit; font-weight: 700; font-size: clamp(1rem, 2.6vw, 1.4rem); color: var(--ink); cursor: pointer;
  min-width: clamp(84px, 16vw, 150px); padding: clamp(10px, 2vw, 18px) 14px; touch-action: none; -webkit-user-select: none; user-select: none;
  border: 4px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); opacity: 0.92;
}
.pad-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.pad-jump { background: var(--yellow); }
.pad-dive { background: #9fd0ff; }
.pad-group { display: flex; gap: 10px; }
.pad-arrow { background: #9fd0ff; min-width: clamp(64px, 12vw, 110px); display: grid; place-items: center; }
.pad-arrow svg { width: 1.5em; height: 1.5em; fill: var(--ink); }
/* Met muis en toetsenbord zijn de schermknoppen van het stampspel en het lavaspel niet nodig; ze zouden de grond bedekken */
@media (hover: hover) and (pointer: fine) { #sm-pad, #lv-pad, #bf-pad, #kk-pad, #dc-pad { display: none; } }
.pad-group[hidden] { display: none; }
.diffs.diffs-3 { grid-template-columns: repeat(3, 1fr); }
.after-game { margin-top: 26px; }
@media (max-width: 720px) {
  .game-cards { grid-template-columns: minmax(0, 1fr); }
  .game-card canvas { width: 96px; height: 96px; }
}

/* Eigen groot-schermstand voor aanraakschermen (zie js/fullscreen.js) */
html.game-big, html.game-big body { overflow: hidden; overscroll-behavior: none; height: 100%; touch-action: none; }
.game-box.is-big {
  position: fixed; inset: 0; z-index: 1000; margin: 0; max-width: none; width: 100vw; height: 100vh; height: 100dvh;
  border: 0; border-radius: 0; box-shadow: none; aspect-ratio: auto; display: grid; place-items: center; background: #1b120c;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.game-box.is-big canvas { width: min(100vw, calc(100vh * 16 / 9)); width: min(100vw, calc(100dvh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; }
.game-box.is-big .game-tools { position: absolute; padding: 0; top: max(10px, env(safe-area-inset-top)); bottom: auto; right: max(10px, env(safe-area-inset-right)); left: auto; }
.game-box.is-big .pad { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); padding: 0 max(16px, env(safe-area-inset-left)); }
.game-box:fullscreen .pad { position: absolute; }

/* Knoppen naar de spellen op de heldenkaarten */
.card-games { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; }
.btn-small { font-size: 0.92rem; padding: 4px 14px; box-shadow: 3px 3px 0 var(--ink); }

/* Knutselen */
.craft-home { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(20px, 5vw, 56px); align-items: center; }
.craft-home-pic { display: block; text-align: center; }
.craft-home-pic img, .craft-pic img { width: auto; max-width: 100%; height: auto; max-height: 420px; transform: rotate(-4deg); filter: drop-shadow(6px 8px 0 rgba(42, 26, 18, 0.9)); }
.craft-home h2 { margin: 10px 0 12px; }
.craft-home p { font-size: 1.15rem; margin-bottom: 22px; }
.craft-home .badge { margin: 0; }
.btn-green { background: #8fd94a; }
.craft { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); padding: clamp(18px, 4vw, 40px); }
.craft-top { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(20px, 5vw, 48px); align-items: center; margin-bottom: 34px; }
.craft-pic { margin: 0; text-align: center; }
.craft-info h2 { margin-bottom: 8px; }
.craft-intro { font-size: 1.15rem; margin-bottom: 18px; }
.craft-info h3 { margin-bottom: 10px; }
.needs { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.needs li { background: #e9f8c9; border: 3px solid var(--ink); border-radius: 999px; padding: 5px 16px; font-weight: 500; }
.craft-tip { background: var(--yellow); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; display: inline-block; font-weight: 500; }
.craft-steps-title { text-align: center; font-size: 1.6rem; margin-bottom: 30px; }
.steps-craft { grid-template-columns: repeat(4, 1fr); row-gap: 38px; }
.steps-craft li { background: var(--cream); }
.craft-more { text-align: center; margin-top: 48px; }
.craft-more p { font-size: 1.15rem; margin: 8px 0 20px; }
@media (max-width: 980px) { .steps-craft { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .craft-home, .craft-top { grid-template-columns: 1fr; text-align: center; }
  .craft-home-pic img, .craft-pic img { max-height: 300px; }
  .needs { justify-content: center; }
}
@media (max-width: 560px) { .steps-craft { grid-template-columns: 1fr; } }
.craft-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.craft-jump .chip { text-decoration: none; color: var(--ink); }
.craft + .craft { margin-top: 44px; }
.craft { scroll-margin-top: 90px; }
.kn-send { max-width: 640px; margin: 0 auto; text-align: left; scroll-margin-top: 90px; }
.kn-send h2, .kn-send > p { text-align: center; }
.kn-pick { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 14px 0 6px; }
.kn-pick .btn { margin-top: 0; cursor: pointer; justify-self: auto; }
.kn-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kn-pick .btn:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.kn-preview { display: grid; justify-items: center; gap: 10px; margin: 8px 0; }
.kn-preview img { max-width: 100%; max-height: 320px; border: 4px solid var(--ink); border-radius: 14px; background: #fff; }
.kn-note { font-size: 0.95rem; margin-top: 10px; text-align: center; }
.kn-after { margin-top: 30px; }
.chip-photo { background: var(--yellow); }
.inbox-photo { display: block; max-width: 100%; max-height: 520px; margin-top: 12px; border: 3px solid var(--ink); border-radius: 12px; }
.inbox-film { display: grid; gap: 8px; justify-items: start; margin-top: 12px; }
.inbox-film-note { margin: 0; font-size: 0.9rem; opacity: 0.8; }
.inbox-video { display: block; width: 100%; max-height: 520px; background: #000; border: 3px solid var(--ink); border-radius: 12px; }

/* Kleurplaten */
.kp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.kp-card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; gap: 10px; text-align: center; }
.kp-thumb { padding: 0; border: 3px solid var(--ink); border-radius: 12px; background: #fff; cursor: pointer; overflow: hidden; }
.kp-thumb canvas { display: block; width: 100%; height: auto; }
.kp-card b { font-size: 1.1rem; }
.kp-card-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-bottom: 6px; }
.kp-editor { max-width: 1400px; padding-top: 18px; }
.kp-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.kp-name { font-size: clamp(1.3rem, 3.500vw, 2rem); margin: 0; }
.kp-work { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; align-items: start; }
.kp-stage { position: relative; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); background: #fff; overflow: hidden; aspect-ratio: 1280 / 905; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); margin: 0 auto; width: 100%; max-width: calc((100dvh - 150px) * 1280 / 905); }
.kp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#kp-paint { touch-action: none; cursor: crosshair; }
#kp-lines { pointer-events: none; }
.kp-tools { display: grid; gap: 14px; }
.kp-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kp-tool { flex: 1; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; padding: 6px 4px; cursor: pointer; display: grid; justify-items: center; gap: 2px; }
.kp-tool svg { width: 26px; height: 26px; }
.kp-tool[aria-pressed="true"], .kp-size[aria-pressed="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.kp-size { flex: 1; height: 44px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; cursor: pointer; display: grid; place-items: center; }
.kp-size i { display: block; border-radius: 50%; background: var(--ink); }
.kp-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kp-color { aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 50%; cursor: pointer; padding: 0; }
.kp-color[aria-pressed="true"] { outline: 4px solid var(--ink); outline-offset: 3px; transform: scale(0.88); }
.kp-tools .btn { flex: 1; text-align: center; padding-left: 8px; padding-right: 8px; }
.kp-tools .btn[disabled] { opacity: 0.45; cursor: default; }
.kp-home { grid-template-columns: 1.2fr 1fr; }
.kp-home-pic img { display: block; width: 100%; height: auto; background: #fff; border: 4px solid var(--ink); border-radius: 10px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(2deg); }
.print-sheet { display: none; }
@media (max-width: 900px) {
  .kp-work { grid-template-columns: 1fr; }
  .kp-stage { max-height: none; max-width: none; }
  .kp-colors { grid-template-columns: repeat(8, 1fr); }
  .kp-home { grid-template-columns: 1fr; }
}
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body > *:not(.print-sheet) { display: none !important; }
  body { background: #fff !important; }
  .print-sheet { display: block; }
  .print-sheet img { display: block; width: 100%; max-height: 188mm; object-fit: contain; }
}
.nav a { white-space: nowrap; }
@media (max-width: 1340px) {
  .nav { gap: 2px; }
  .nav a { padding: 6px 8px; font-size: 0.95rem; }
  .nav a.nav-idea { padding: 3px 10px; }
  .nav .nav-extra { display: none; }
}
@media (max-width: 1100px) {
  .top { gap: 10px; }
  .nav a { padding: 5px 6px; font-size: 0.9rem; }
  .lang, .brand { flex: none; }
}
@media (max-width: 990px) {
  .brand { font-size: 1.1rem; }
  .brand-char { width: 34px; height: 34px; }
  .nav a { padding: 4px 5px; font-size: 0.86rem; }
  .nav a.nav-idea { padding: 2px 8px; }
}

/* ---------- Maak je eigen held (poppetjesbouwer) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pp-main { max-width: 1400px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 28px) 34px; }
.pp-nogl { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); padding: 24px; font-weight: 600; text-align: center; }
.pp-work { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr); gap: 20px; align-items: stretch; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 560px; max-height: 900px; }
.pp-stage { position: relative; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; background: radial-gradient(circle at 50% 38%, #8fd0ff 0%, #4aa3f0 55%, #2f7df0 100%); }
.pp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.pp-canvas:active { cursor: grabbing; }
.pp-turn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(255, 253, 247, 0.92); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 6px; }
.pp-turn-label { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.pp-round { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow); color: var(--ink); cursor: pointer; padding: 0; }
.pp-round svg { width: 22px; height: 22px; }
.pp-round:hover { background: var(--pink); }
.pp-box-top, .pp-box-name { display: none; }
.pp-stage.is-box { background: linear-gradient(#8fd0ff, #dff2ff); border-color: var(--ink); box-shadow: 0 0 0 10px var(--yellow), 0 0 0 14px var(--ink), 12px 12px 0 14px var(--ink); margin: 14px; }
.pp-stage.is-box .pp-box-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: absolute; z-index: 2; top: 0; left: 0; right: 0; background: var(--red); color: #fff; border-bottom: 4px solid var(--ink); padding: 8px 18px; font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.5rem); }
.pp-box-tag { font-size: 0.8em; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 0 12px; }
.pp-stage.is-box .pp-box-name { display: block; position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 70px; background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; padding: 6px 12px; text-align: center; font-weight: 700; font-size: clamp(1.3rem, 3vw, 2.2rem); text-transform: uppercase; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-side { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--ink); }
.pp-step { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: #fff; background: var(--red); border: 3px solid #fff; border-radius: 12px; padding: 2px 12px 2px 16px; transform: rotate(-2deg); cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-step svg { width: 22px; height: 22px; }
.pp-count { color: #fff; font-weight: 600; white-space: nowrap; }
.pp-panel { flex: 1; overflow-y: auto; padding: 14px 16px 18px; overscroll-behavior: contain; }
.pp-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 12px; }
.pp-colors-label { font-weight: 600; margin-right: 4px; min-width: 64px; }
.pp-sw { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; padding: 0; }
.pp-sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.pp-sw-own { background-image: linear-gradient(135deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%) !important; }
.pp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.pp-tile { width: 100%; font: inherit; color: var(--ink); background: #cfe8ff; border: 3px solid var(--ink); border-radius: 16px; padding: 6px 6px 8px; cursor: pointer; display: grid; gap: 4px; justify-items: center; transition: transform 0.1s; }
.pp-tile:hover { transform: translateY(-2px); }
.pp-tile[aria-pressed="true"] { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.pp-pic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.pp-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pp-none::before { content: ""; width: 56%; aspect-ratio: 1; border: 7px solid var(--ink); border-radius: 50%; background: linear-gradient(135deg, transparent 45%, var(--ink) 45%, var(--ink) 55%, transparent 55%); opacity: 0.35; }
.pp-lab { font-weight: 600; font-size: 0.92rem; line-height: 1.15; text-align: center; }
.pp-bar { display: flex; gap: 10px; padding: 12px 16px; border-top: 4px solid var(--ink); background: var(--cream); }
.pp-bar .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
.pp-bar .btn[disabled] { opacity: 0.4; cursor: default; }
.pp-bar .btn[hidden] { display: none; }
.pp-final { display: grid; gap: 14px; }
.pp-label { font-weight: 700; font-size: 1.4rem; }
.pp-input { font: inherit; font-size: 1.4rem; font-weight: 600; border: 4px solid var(--ink); border-radius: 14px; padding: 10px 14px; background: #fff; color: var(--ink); width: 100%; }
.pp-final-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pp-msg { min-height: 1.4em; margin: 0; font-weight: 600; color: var(--green); }
.pp-tip { margin: 0; font-size: 0.95rem; opacity: 0.85; }
.pp-menu { position: fixed; inset: 0; z-index: 50; background: rgba(42, 26, 18, 0.55); display: grid; place-items: center; padding: 16px; }
.pp-menu[hidden] { display: none; }
.pp-menu-card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); padding: 16px 18px 20px; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.pp-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pp-menu-head h2 { margin: 0; font-size: 1.5rem; }
.pp-menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pp-menu-list button { width: 100%; text-align: left; font: inherit; font-weight: 700; font-size: 1.15rem; color: #fff; background: var(--red); border: 3px solid var(--ink); border-radius: 12px; padding: 6px 14px; cursor: pointer; text-transform: uppercase; }
.pp-menu-list li:nth-child(odd) button { transform: rotate(-1deg); }
.pp-menu-list li:nth-child(even) button { transform: rotate(1deg); }
.pp-menu-list button[aria-current="step"] { background: var(--yellow); color: var(--ink); }
.pp-home-pic img { display: block; width: 100%; height: auto; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); transform: rotate(-2deg); background: #8fd0ff; }
@media (max-width: 860px) {
  .pp-work { grid-template-columns: 1fr; height: auto; max-height: none; min-height: 0; }
  .pp-stage { height: min(44vh, 420px); position: sticky; top: 8px; z-index: 3; }
  .pp-stage.is-box { margin: 14px 14px 22px; }
  .pp-side { max-height: none; }
  .pp-panel { max-height: none; overflow: visible; }
  .pp-side { overflow: visible; }
  .pp-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
  .pp-lab { font-size: 0.82rem; }
  .pp-bar { position: sticky; bottom: 0; z-index: 2; border-radius: 0 0 18px 18px; }
}

/* ---------- Rekenen met Meneer Rupsje ---------- */
.rk-box { max-width: 1080px; margin: 0 auto; background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.rk-box [hidden] { display: none !important; }
.rk-setup { padding: clamp(16px, 3vw, 30px); text-align: center; }
.rk-setup-head { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 760px; margin: 0 auto 14px; text-align: left; }
.rk-setup-head .end-text { margin: 0; }
.rk-setup-char { width: 130px; height: 130px; flex: none; }
.rk-group { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.rk-group legend { font-weight: 700; font-size: 1.3rem; margin: 0 auto 8px; padding: 0; }
.rk-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 640px; margin: 0 auto; }
.rk-op { font: inherit; color: var(--ink); cursor: pointer; border: 3px solid var(--ink); border-radius: 16px; background: #fff; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform 0.08s ease; }
.rk-op b { font-size: 1.05rem; }
.rk-op-sign { font-size: 2rem; font-weight: 700; line-height: 1; width: 50px; height: 50px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: #eee; }
.rk-op[aria-pressed="true"] { background: #d5f5c4; transform: translateY(-3px) rotate(-1deg); box-shadow: 4px 5px 0 var(--ink); }
.rk-op[aria-pressed="true"] .rk-op-sign { background: var(--yellow); }
.rk-op[aria-pressed="false"] { opacity: 0.75; }
.rk-tables { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; max-width: 640px; margin: 0 auto 10px; }
.rk-t { font: inherit; font-weight: 700; font-size: 1.35rem; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); padding: 0; }
.rk-t[aria-pressed="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: translateY(-2px); }
.rk-table-btns { display: flex; justify-content: center; gap: 10px; }
.rk-setup .diffs { max-width: 780px; margin: 0 auto; }
.rk-warn { min-height: 1.4em; color: var(--red); font-weight: 700; margin: 4px 0 8px; }

.rk-game { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.rk-stage { position: relative; min-height: 470px; background: #ffd99a; border-right: 4px solid var(--ink); }
.rk-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rk-caption { position: absolute; left: 0; right: 0; top: 12px; margin: 0 auto; width: max-content; max-width: calc(100% - 24px); transform: rotate(-2deg); background: var(--red); color: #fff; font-weight: 700; font-size: clamp(1.05rem, 2.3vw, 1.55rem); text-align: center; border: 3px solid var(--ink); border-radius: 14px; padding: 3px 16px; box-shadow: 4px 4px 0 var(--ink); pointer-events: none; }
.rk-caption:empty { display: none; }
.rk-stage .tool { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.rk-side { padding: clamp(12px, 2vw, 22px); display: flex; flex-direction: column; justify-content: center; }
.rk-play { display: flex; flex-direction: column; gap: 10px; }
.rk-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1.1rem; min-height: 1.9em; }
.rk-streak { background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 0 12px; transform: rotate(2deg); }
.rk-streak:empty { display: none; }
.rk-dots { list-style: none; display: flex; gap: 5px; padding: 0; margin: 0; }
.rk-dots li { flex: 1; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.rk-dots li.is-now { background: var(--yellow); }
.rk-dots li.is-good { background: var(--green); }
.rk-dots li.is-bad { background: var(--red); }
.rk-timer { height: 16px; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.rk-timer span { display: block; height: 100%; width: 100%; background: var(--blue); }
.rk-timer.is-low span { background: var(--red); }
.rk-sum { display: flex; justify-content: center; align-items: center; gap: 0.22em; flex-wrap: wrap; font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 14px 8px; min-height: 2.3em; }
.rk-o { color: var(--red); }
.rk-in { min-width: 1.7em; padding: 0 0.18em; text-align: center; border: 4px dashed var(--ink); border-radius: 12px; background: #fff7c9; color: var(--blue); }
.rk-in.is-empty { color: rgba(42, 26, 18, 0.35); }
.rk-in.is-good { border-style: solid; background: #d5f5c4; color: var(--green); }
.rk-in.is-bad, .rk-in.is-late { border-style: solid; background: #ffd6d2; color: var(--red); text-decoration: line-through; text-decoration-thickness: 4px; }
.rk-sum.is-shake { animation: rk-shake 0.3s; }
@keyframes rk-shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.rk-msg { min-height: 1.5em; margin: 0; text-align: center; font-weight: 700; font-size: 1.3rem; }
.rk-msg.is-good { color: var(--green); }
.rk-msg.is-bad { color: var(--red); }
.rk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rk-key { font: inherit; font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); padding: 10px 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; display: grid; place-items: center; }
.rk-key svg { width: 1.2em; height: 1.2em; }
.rk-key:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.rk-key-ok { background: var(--green); color: #fff; }
.rk-key-del { background: #ffd0a6; }
.rk-key:disabled { opacity: 0.45; cursor: default; }
.rk-next { align-self: center; margin: 8px 0; }
.rk-quit { align-self: center; font: inherit; font-size: 0.95rem; background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--ink); opacity: 0.75; padding: 4px 8px; }
.rk-end { text-align: center; }
.rk-end h3 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 0 8px; }
.rk-stars { margin: 0 0 4px; display: flex; justify-content: center; gap: 6px; }
.rk-stars span { font-size: 3rem; line-height: 1; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.rk-stars span:nth-child(2) { transform: translateY(-8px); }
.rk-stars span.off { color: #f1e6cf; }
/* de eindbaas: het speelveld over de hele breedte, de uitleg eronder */
.rk-game.is-boss { grid-template-columns: minmax(0, 1fr); }
.rk-game.is-boss .rk-stage { min-height: 0; aspect-ratio: 16 / 9; max-height: 74vh; border-right: 0; border-bottom: 4px solid var(--ink); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.rk-game.is-boss .rk-caption { top: auto; bottom: 12px; }
.rk-boss { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 18px; text-align: center; }
.rk-boss-title { margin: 0; font-weight: 700; font-size: 1.3rem; }
.rk-boss-tip { margin: 0; flex: 1 1 320px; max-width: 560px; }
.rk-boss-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rk-boss-done { font-weight: 700; font-size: 1.2rem; color: var(--red); margin: -4px 0 12px; }
@media (max-width: 860px) {
  .rk-game { grid-template-columns: minmax(0, 1fr); }
  .rk-stage { min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 4px solid var(--ink); }
  .rk-tables { grid-template-columns: repeat(5, 1fr); max-width: 380px; }
  .rk-game.is-boss .rk-stage { aspect-ratio: 3 / 2; }
}
@media (max-width: 640px) {
  .rk-box { border-width: 3px; box-shadow: 4px 4px 0 var(--ink); border-radius: 14px; }
  .rk-setup-head { flex-direction: column; text-align: center; gap: 4px; }
  .rk-setup-char { width: 104px; height: 104px; }
  .rk-op { padding: 8px 2px; }
  .rk-op b { font-size: 0.9rem; }
  .rk-op-sign { width: 42px; height: 42px; font-size: 1.7rem; }
  .rk-stage { aspect-ratio: 3 / 2; }
  .rk-game.is-boss .rk-stage { aspect-ratio: 4 / 3; max-height: none; }
  .rk-key { padding: 8px 0; }
  .rk-sum { padding: 10px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .rk-op, .rk-sum.is-shake { transition: none; animation: none; }
}

/* ---------- Winkel ---------- */
.shop-how { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1000px; margin: 0 auto 30px; padding: 0; }
.shop-how li { background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 14px 18px 16px; box-shadow: 4px 4px 0 var(--ink); }
.shop-how b { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.shop-box { max-width: 1200px; margin: 0 auto; }
.sa-shop { background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); padding: clamp(10px, 3vw, 28px); font-family: var(--font); }
.shop-open { text-align: center; padding: 26px 10px 18px; }
.shop-open h2 { margin: 6px 0 8px; }
.shop-open p { font-size: 1.1rem; max-width: 560px; margin: 0 auto 20px; }
.shop-open .shop-url { font-size: 0.95rem; opacity: 0.7; margin: 14px auto 0; }
.shop-kids { text-align: center; font-weight: 700; font-size: 1.1rem; margin: 26px 0 6px; }
.shop-parents { text-align: center; max-width: 720px; margin: 0 auto; opacity: 0.8; }
.shop-home-pic { display: block; text-align: center; }
.shop-home-pic img { width: auto; max-width: 100%; height: auto; max-height: 300px; transform: rotate(-3deg); filter: drop-shadow(6px 8px 0 rgba(42, 26, 18, 0.25)); }
@media (max-width: 760px) {
  .shop-how { grid-template-columns: 1fr; }
}

/* Productoverzicht in de winkel */
.shop-grid-title { text-align: center; margin: 0 0 6px; }
.shop-tip { text-align: center; margin: 0 auto 22px; max-width: 640px; opacity: 0.85; }
.prods { list-style: none; margin: 0 auto 34px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; max-width: 1200px; }
.prod { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); padding: 14px 14px 16px; text-align: center; display: flex; flex-direction: column; }
.prod-pic { width: 100%; max-width: 210px; height: auto; margin: 0 auto 4px; display: block; }
.prod-shirt { fill: #9ccbf2; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.prod-line { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.prod-mug { fill: #1d1d22; stroke: var(--ink); stroke-width: 4; }
.prod-mug-ear { fill: none; stroke: #1d1d22; stroke-width: 12; }
.prod-bottle { fill: url(#fles); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.prod-cap { fill: #1d1d22; stroke: var(--ink); stroke-width: 4; }
.prod-lunch-base { fill: #f2a7a0; stroke: var(--ink); stroke-width: 4; }
.prod-lunch-lid { fill: #d9a35f; stroke: var(--ink); stroke-width: 4; }
.prod-teddy { fill: #9fd3b0; stroke: var(--ink); stroke-width: 4; }
.prod-teddy-shirt { fill: #c9beb6; stroke: var(--ink); stroke-width: 4; }
.prod-teddy-snout { fill: #f4efe6; stroke: var(--ink); stroke-width: 3; }
.prod-teddy-eye { fill: var(--ink); }
.prod-frame { fill: #1d1d22; stroke: var(--ink); stroke-width: 4; }
.prod-mat { fill: #fff; }
.prod h3 { margin: 4px 0 2px; font-size: 1.25rem; }
.prod-kind { margin: 12px 0 8px; font-weight: 700; font-size: 1.05rem; }
.prod-kind b { font-family: "Bangers", system-ui, sans-serif; font-weight: 400; font-size: 1.25rem; letter-spacing: 0.5px; margin-right: 4px; }
.prod-kind + .prod-btns { margin-top: 0; }
.prod-price small { font-weight: 500; opacity: 0.8; }
.prod-price { margin: 0 0 12px; font-weight: 700; font-size: 1.05rem; }
.prod-btns { display: grid; gap: 8px; margin-top: auto; }
.prod-btns .btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; }
.prod-btns .btn small { font-weight: 500; font-size: 0.85rem; opacity: 0.9; }
.prod-btns .btn:only-child { justify-content: center; }
.shop-open .char { width: 150px; height: 150px; }

/* ---------- Gratis poster ---------- */
.poster-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 5vw, 56px); align-items: center; max-width: 1060px; margin: 0 auto; }
.poster-pic { display: block; text-align: center; }
.poster-pic img { width: 100%; max-width: 420px; height: auto; transform: rotate(-2deg); border-radius: 6px; box-shadow: 8px 10px 0 rgba(42, 26, 18, 0.9); }
.poster-steps { list-style: none; counter-reset: stap; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.poster-steps li { counter-increment: stap; position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 12px 16px 14px 72px; box-shadow: 4px 4px 0 var(--ink); }
.poster-steps li::before { content: counter(stap); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); display: grid; place-items: center; font: 1.6rem/1 "Bangers", var(--font); }
.poster-steps b { display: block; font-size: 1.15rem; }
.poster-btns { align-items: center; }
.poster-btns .btn small { font-size: 0.9rem; font-weight: 500; opacity: 0.9; margin-left: 4px; }
.poster-free { margin: 16px 0 0; font-weight: 600; }
.poster-more { text-align: center; margin: 44px 0 12px; font-size: 1.1rem; }
.poster-sheet img { max-height: none; width: 100%; height: auto; }
/* Knop naar de poster, onder de winkel (voorpagina en winkelpagina) */
.poster-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; }
.poster-btn img { width: 30px; height: auto; border: 2px solid var(--ink); border-radius: 3px; background: #fff; transform: rotate(-5deg); }
.poster-cta { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 40px); align-items: center; max-width: 900px; margin: 36px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); padding: 22px clamp(16px, 4vw, 34px); }
.poster-cta-pic img { display: block; width: 150px; height: auto; border-radius: 4px; transform: rotate(-3deg); box-shadow: 5px 6px 0 rgba(42, 26, 18, 0.9); }
.poster-cta h2 { margin: 6px 0; }
.poster-cta p { margin: 0 0 6px; font-size: 1.1rem; }
.poster-cta .poster-btn { margin-top: 10px; }
@media (max-width: 760px) {
  .poster-wrap { grid-template-columns: 1fr; }
  .poster-pic img { max-width: 300px; }
  .poster-btns { justify-content: center; }
  .poster-free { text-align: center; }
}
@media (max-width: 640px) {
  .poster-cta { grid-template-columns: 1fr; text-align: center; }
  .poster-cta-pic img { margin: 0 auto; width: 120px; }
}
@media print {
  .poster-sheet img { width: 210mm; height: 297mm; max-height: none; object-fit: contain; }
}

/* ---------- Glijrace: 1 of 2 spelers ---------- */
.gl-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.gl-mode-1 { background: #d4ecff; }
.gl-mode-2 { background: #e6dbff; }

/* ---------- Discofeest: vier knopjes op de telefoon ---------- */
.pad.pad-center { justify-content: center; }
.dc-key { min-width: clamp(56px, 18vw, 90px); }
.dc-key-0 { background: #d9bcff; }
.dc-key-1 { background: #a9d8ff; }
.dc-key-2 { background: #b4f0bf; }
.dc-key-3 { background: #ffb4ad; }
/* Op een tablet tik je in de banen zelf; de knopjes staan alleen onder het spel op een telefoon. */
@media (min-width: 641px) { #dc-pad { display: none; } }

/* ---------- Luchtsnaren op de voorpagina ---------- */
.ls-home { grid-template-columns: 1.3fr 1fr; }
.ls-home-pic { display: block; text-align: center; }
.ls-home-pic img { width: 100%; max-width: 480px; height: auto; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); transform: rotate(2deg); }
@media (max-width: 760px) { .ls-home { grid-template-columns: 1fr; } }

/* ---------- Tijdelijke banner bovenaan: Luchtsnaren is nieuw (issue #55) ---------- */
.new-banner-wrap { max-width: 1160px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 0; }
.new-banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 20px;
  padding: 14px 24px 14px 14px; color: #fff; text-decoration: none;
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  background:
    radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 48% 14%, #fff 50%, transparent 51%),
    radial-gradient(3px 3px at 64% 80%, #ffd93b 50%, transparent 51%), radial-gradient(2px 2px at 30% 82%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 22%, #fff 50%, transparent 51%), radial-gradient(3px 3px at 40% 50%, #ff9fd0 50%, transparent 51%),
    linear-gradient(160deg, #2b1055, #0f2a5a);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.new-banner:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.new-banner:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
/* regenboogsnaren op de achtergrond, die af en toe even trillen alsof iemand ze aanslaat */
.new-banner::before {
  content: ""; position: absolute; inset: -12% -4%; z-index: -1; opacity: 0.45;
  background: linear-gradient(98deg, transparent 52%, #ff5a4d 52% 52.5%, transparent 52.5% 58%, #ff9d3b 58% 58.5%, transparent 58.5% 64%,
    #ffd93b 64% 64.5%, transparent 64.5% 70%, #4fd36a 70% 70.5%, transparent 70.5% 76%, #3fa9ff 76% 76.5%, transparent 76.5% 82%, #b46cff 82% 82.5%, transparent 82.5%);
  animation: nb-tril 2.6s ease-in-out infinite;
}
@keyframes nb-tril { 0%, 70%, 100% { transform: none; } 74% { transform: translateY(3px); } 78% { transform: translateY(-3px); } 82% { transform: translateY(2px); } 86% { transform: translateY(-1px); } }
.new-banner-pic img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 14px; transform: rotate(-3deg); }
.new-banner-text { display: grid; gap: 4px; justify-items: start; }
.new-banner-tag { color: var(--ink); margin-bottom: 2px; animation: nb-wiebel 1.8s ease-in-out infinite; }
@keyframes nb-wiebel { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(3deg) scale(1.08); } }
.new-banner-text b { font-size: clamp(1.35rem, 2.8vw, 1.9rem); line-height: 1.1; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); }
.new-banner-sub { font-size: 1.05rem; line-height: 1.35; max-width: 38em; text-shadow: 0 2px 3px rgba(15, 10, 40, 0.9); }
.new-banner-btn { white-space: nowrap; }
@media (max-width: 680px) {
  .new-banner { grid-template-columns: 92px 1fr; gap: 12px; padding: 12px; }
  .new-banner-btn { grid-column: 1 / -1; justify-self: stretch; }
  .new-banner-sub { font-size: 0.98rem; }
  .new-banner::before { opacity: 0.22; } /* op een smal scherm lopen de snaren door de tekst: zachter */
}
@media (prefers-reduced-motion: reduce) { .new-banner::before, .new-banner-tag { animation: none; } }

/* Spelen met een controller, bijvoorbeeld op de tv (zie js/pad.js) */
html.pad-mode, html.pad-mode * { cursor: none !important; }
html.pad-mode .pad-focus, html.pad-mode .pad-focus:focus-visible {
  outline: 6px solid var(--yellow); outline-offset: 5px; box-shadow: 0 0 0 5px var(--ink);
  position: relative; z-index: 6; animation: pad-glow 1.4s ease-in-out infinite;
}
@keyframes pad-glow { 50% { outline-offset: 8px; outline-color: #fff27a; } }
html.pad-mode .pad-bump { animation: pad-bump 0.25s ease-in-out; }
@keyframes pad-bump { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
.pad-home { display: none; }
html.pad-mode .pad-home { display: inline-flex; margin-top: 14px; }
.pad-legend {
  display: none; position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 1001; gap: 18px; align-items: center;
  padding: 8px 16px; border-radius: 999px; background: rgba(42, 26, 18, 0.88); color: #fff; font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  pointer-events: none;
}
html.pad-mode .pad-legend { display: flex; }
html.pad-mode.pad-playing .pad-legend { display: none; }
.pad-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pad-legend kbd, .pad-toast kbd {
  font: 700 0.8rem Fredoka, "Trebuchet MS", sans-serif; min-width: 1.9em; padding: 2px 7px; text-align: center;
  border-radius: 8px; background: #fff; color: var(--ink); border: 2px solid var(--yellow);
}
.pad-toast {
  position: fixed; left: 50%; top: 18px; z-index: 1002; display: flex; align-items: center; gap: 12px; max-width: min(92vw, 640px);
  padding: 12px 20px; border: 4px solid var(--ink); border-radius: 18px; background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 1.15rem; box-shadow: var(--shadow);
  translate: -50% -160%; transition: translate 0.35s ease; pointer-events: none;
}
.pad-toast.is-on { translate: -50% 0; }
.pad-toast-icon { font-size: 1.8rem; line-height: 1; }
/* op een groot scherm (tv) de menu's van de spelletjes wat groter */
@media (min-width: 1400px) and (min-height: 820px) {
  html.pad-mode .game-box.is-big .panel { zoom: 1.3; }
  html.pad-mode .pad-legend { font-size: 1.15rem; }
}
@media (max-width: 640px) { .pad-legend { gap: 10px; font-size: 0.8rem; } }
@media (prefers-reduced-motion: reduce) { html.pad-mode .pad-focus, html.pad-mode .pad-bump { animation: none; } .pad-toast { transition: none; } }
