/* Muntstad v2 — chunky toy-town game UI: outlined type, glossy 3D buttons, thick ink edges. No web fonts. */
:root {
  --ink: #1b1f3b;
  --ink-soft: rgba(27, 31, 59, 0.35);
  --paper: #ffffff;
  --cream: #fff7d0;
  --sky: #5cc9f7;
  --sky-deep: #1479cf;
  --grass: #6fd35b;
  --gold: #ffc21c;
  --gold-d: #e08a00;
  --gold-l: #ffe58a;
  --green: #45d65c;
  --green-d: #1d9a37;
  --blue: #45b6ff;
  --blue-d: #1a7ad6;
  --orange: #ff9f2e;
  --orange-d: #d96a00;
  --purple: #b76cff;
  --purple-d: #7b3fd1;
  --pink: #ff6fae;
  --red: #ff5f5f;
  --red-d: #c93a3a;
  --grey: #c5ccd8;
  --grey-d: #8a93a3;
  --font: "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  --topbar-h: 92px;
  --bottombar-h: 132px;
  --edge: 0 6px 0 var(--ink), 0 12px 14px rgba(10, 20, 60, 0.32);
  --edge-sm: 0 4px 0 var(--ink), 0 8px 10px rgba(10, 20, 60, 0.28);
  --gloss: inset 0 3px 0 rgba(255, 255, 255, 0.55), inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  --outline: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 0 0 var(--ink), 2px 0 0 var(--ink), 0 -2px 0 var(--ink), 0 2px 0 var(--ink);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #0b1a33;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  font-weight: 800;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

.app {
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-size: 22px;
  line-height: 1.2;
  background: var(--sky);
}

button, input, textarea {
  touch-action: manipulation;
  font-family: inherit;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

[hidden] { display: none !important; }

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}
.screen.active { display: flex; animation: screenIn 0.3s var(--pop); }
@keyframes screenIn {
  from { transform: scale(0.965); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------- outlined game type ---------- */
.gt, .btn {
  color: #fff;
  text-shadow: var(--outline), 0 4px 0 var(--ink);
  letter-spacing: 0.03em;
}

/* ---------- panels ---------- */
.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--edge), inset 0 4px 0 #fff, inset 0 0 0 6px #eef3fb;
}
.panel-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(#ffffff, #e9eef7);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--edge-sm), inset 0 3px 0 #fff;
  padding: 8px 20px;
  font-size: 28px;
}

/* ---------- 3D glossy buttons ---------- */
.btn {
  --c: var(--blue);
  --cd: var(--blue-d);
  --cl: #b8e2ff;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 64px;
  min-height: 66px;
  padding: 0 24px;
  margin: 0;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--cl) 0%, var(--c) 42%, var(--cd) 100%);
  font-family: inherit;
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink), 0 10px 12px rgba(10, 20, 60, 0.32), var(--gloss);
  transition: transform 0.12s var(--pop), box-shadow 0.12s, filter 0.12s;
}
.btn::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 4px;
  height: 36%;
  border-radius: 12px 12px 26px 26px;
  background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn:active, .btn.pressed {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--ink), 0 3px 6px rgba(10, 20, 60, 0.3), var(--gloss);
}
.btn:focus { outline: none; }
.btn:focus-visible { outline: 4px solid #fff; outline-offset: 2px; }
.btn > * { position: relative; }
.btn-icon { font-size: 1.1em; line-height: 1; }
img.btn-icon { width: 1.5em; height: 1.5em; object-fit: contain; }
.btn-primary { --c: var(--gold); --cd: var(--gold-d); --cl: #fff2b3; }
.btn-secondary { --c: var(--blue); --cd: var(--blue-d); --cl: #c4e8ff; }
.btn-success { --c: var(--green); --cd: var(--green-d); --cl: #c6f7cf; }
.btn-danger { --c: var(--red); --cd: var(--red-d); --cl: #ffc9c9; }
.btn-purple { --c: var(--purple); --cd: var(--purple-d); --cl: #e6d0ff; }
.btn-orange { --c: var(--orange); --cd: var(--orange-d); --cl: #ffd9a8; }
.btn-grey, .btn.off { --c: var(--grey); --cd: var(--grey-d); --cl: #eef2f8; }
.btn-lg { min-height: 82px; font-size: 28px; border-radius: 22px; }
.btn-xl { min-height: 98px; font-size: 34px; padding: 0 38px; border-radius: 26px; }
.btn-nav { min-height: 94px; min-width: 214px; font-size: 30px; border-radius: 24px; }
.btn-round { width: 64px; height: 64px; min-width: 64px; padding: 0; border-radius: 50%; font-size: 26px; }
.btn-arrow { width: 96px; height: 96px; min-width: 96px; padding: 0; font-size: 34px; border-radius: 50%; border-width: 4px; }   /* V7.3: round like the picture buttons */
.btn.dim { --cl: #fbf5df; --c: #ecdfae; --cd: #c9b57a; filter: none; } /* "not yet": pale sand, not grey (grey means off) */
.btn.glow { animation: glow 1.1s ease-in-out infinite; }
/* ---------- V7.2 UI kit (PLAN-V7 §C): round picture buttons, ring meters, tiles ---------- */
/* a round button: the picture on top, one word under it; four sizes (64 / 84 / 110 / 130). The emoji never gets the outlined text shadow. */
.btn-ico { flex-direction: column; gap: 0; padding: 0; border-radius: 50%; --d: 84px; width: var(--d); height: var(--d); min-width: var(--d); min-height: var(--d); border-width: 4px; }
.btn-ico::before { left: 10%; right: 10%; top: 6%; height: 34%; border-radius: 50% 50% 40% 40%; }
.btn-ico .ico { font-style: normal; text-shadow: none; line-height: 1; font-size: 34px; display: block; }
.btn-ico .lbl { font-size: 24px; line-height: 1; margin-top: 2px; }
.btn-ico-s { --d: 64px; }
.btn-ico-s .ico { font-size: 34px; }
.btn-ico-m { --d: 96px; }
.btn-ico-m .ico { font-size: 34px; }
.btn-ico-l { --d: 110px; }
.btn-ico-l .ico { font-size: 46px; }
.btn-ico-l .lbl { font-size: 26px; margin-top: 4px; }
.btn-ico-xl { --d: 130px; }
.btn-ico-xl .ico { font-size: 52px; }
.btn-ico-xl .lbl { font-size: 26px; margin-top: 4px; }
/* a stadium for a long word (AVONTUUR): same height, wider, still picture over word */
.btn-ico.wide { width: auto; min-width: var(--d); padding: 0 18px; border-radius: 999px; }
/* the 3D-rendered nav pictures (thumbs.js) inside a picture button */
.btn-ico img.btn-icon { width: 50px; height: 50px; }
.btn-ico-m img.btn-icon { width: 42px; height: 42px; }
.btn-ico-xl img.btn-icon { width: 60px; height: 60px; }
/* a ring meter: the picture in the middle, the value as a coloured ring (--p = 0..100, --rc = ring colour), a small badge bottom-right */
.ring { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--ink); background: conic-gradient(var(--rc, var(--green)) calc(var(--p, 0) * 1%), #e4e9f2 0); box-shadow: var(--edge-sm); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: linear-gradient(#ffffff, #eef2f8); border: 2px solid rgba(27, 31, 59, 0.25); }
.ring .ico { position: relative; font-style: normal; font-size: 26px; line-height: 1; }
.ring b { position: absolute; right: -8px; bottom: -8px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 20px; line-height: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.ring.low { --rc: var(--red); animation: ringlow 1s ease-in-out infinite; }
@keyframes ringlow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
/* a tile: a picture with a number badge, for the backpack */
.tile { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; border: 3px solid var(--ink); background: linear-gradient(#ffffff, #e9eef7); box-shadow: 0 4px 0 var(--ink); font-size: 26px; line-height: 1; }
.tile .n { position: absolute; right: -8px; bottom: -8px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 20px; line-height: 26px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .n.full { background: var(--red); }
@keyframes glow {
  0%, 100% { box-shadow: 0 6px 0 var(--ink), 0 10px 12px rgba(10, 20, 60, 0.32), 0 0 0 0 rgba(255, 194, 28, 0.6), var(--gloss); }
  50% { box-shadow: 0 6px 0 var(--ink), 0 10px 12px rgba(10, 20, 60, 0.32), 0 0 0 10px rgba(255, 194, 28, 0), var(--gloss); }
}

.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- 3D coin ---------- */
.coin3 {
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff3b0 0, #ffd93d 34%, #f0a80f 70%, #c97a00 100%);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 3px 0 var(--ink);
  position: relative;
  flex: none;
}
.coin3::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 3px solid rgba(201, 122, 0, 0.55);
}
.coin3.sm { width: 28px; height: 28px; border-width: 2px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 2px 0 var(--ink); }
.coin3.sm::after { inset: 5px; border-width: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  padding: 14px 18px 0 18px;
  padding-top: calc(14px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 20;
  pointer-events: none;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 0 12px;
  min-height: 68px;
  background: linear-gradient(180deg, #fff7d0 0%, #ffd766 100%);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--edge), inset 0 3px 0 #fff;
}
.wallet-icon { display: none; }
.wallet-amount { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.income {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 14px;
  min-height: 68px;
  background: linear-gradient(180deg, #ecffee 0%, #a8f0b0 100%);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--edge), inset 0 3px 0 #fff;
  font-size: 25px;
}
.income #income-amount { font-size: 30px; font-variant-numeric: tabular-nums; }
.income img { width: 40px; height: 40px; }
.bump { animation: bump 0.35s var(--pop); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px) rotate(-2deg); }
  40% { transform: translateX(12px) rotate(2deg); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

/* ---------- START ---------- */
.screen-start { align-items: center; justify-content: flex-end; padding-bottom: 5vh; background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); }
.start-panel.returning { grid-template-columns: 1fr; width: min(640px, 80vw); }
.start-panel.returning .start-left { flex-direction: row; gap: 28px; }
.start-panel.returning .start-title { margin: 0; }
.start-sky { position: absolute; inset: 0; pointer-events: none; }
.start-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.start-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 20, 60, 0) 30%, rgba(0, 20, 60, 0.45) 100%);
}
.start-panel {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px 28px;
  align-items: center;
  padding: 24px 32px 28px 32px;
  width: min(900px, 92vw);
}
.start-title {
  margin: 0 0 6px 0;
  font-size: 62px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: #ffd93d;
  text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 6px 0 var(--ink), 0 10px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.04em;
}
.start-left { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.start-avatar { display: flex; justify-content: center; }
.start-avatar img, .start-avatar canvas { width: 200px; height: 200px; }
.start-avatar.wave img { animation: wave 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes wave {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg) translateY(-6px); }
}
.start-new { display: flex; flex-direction: column; gap: 10px; }
.start-label { margin: 0; font-size: 24px; }
.color-row { display: flex; gap: 14px; flex-wrap: wrap; }
.color-btn {
  --c: #3b82f6;
  width: 68px;
  height: 68px;
  min-width: 68px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0) 38%), var(--c);
  box-shadow: 0 5px 0 var(--ink), 0 8px 8px rgba(10, 20, 60, 0.25);
  cursor: pointer;
  transition: transform 0.15s var(--pop);
}
.color-btn.selected { outline: 5px solid #fff; outline-offset: -9px; box-shadow: 0 5px 0 var(--ink), 0 0 0 4px var(--gold), 0 8px 8px rgba(10, 20, 60, 0.25); }
.name-input, .code-in {
  height: 72px;
  width: 100%;
  max-width: 440px;
  padding: 0 20px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.08);
}
.name-input::placeholder, .code-in::placeholder { color: #9ca3af; font-weight: 800; }
.start-panel .btn-xl { grid-column: 1 / -1; justify-self: center; min-width: 340px; }

/* ---------- STAD ---------- */
.screen-stad { background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); }
.town { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.gl-host { position: absolute; inset: 0; overflow: hidden; }
.gl-host canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottombar-h);
  padding: 0 100px 14px 136px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  z-index: 20;
  pointer-events: none;
}
.bottombar .btn { pointer-events: auto; }
.btn-werk { --c: var(--blue); --cd: var(--blue-d); --cl: #c4e8ff; }
.btn-winkel { --c: var(--gold); --cd: var(--gold-d); --cl: #fff2b3; }
.btn-huis { --c: var(--green); --cd: var(--green-d); --cl: #c6f7cf; }
.btn-papa {
  position: absolute;
  right: 14px;
  bottom: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  padding: 0;
  border-radius: 50%;
  --c: var(--grey); --cd: var(--grey-d); --cl: #eef2f8;
  font-size: 22px;
  overflow: hidden;
}
.btn-papa::before { display: none; }
.papa-label { position: relative; z-index: 1; }
.papa-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), transparent 0);
  opacity: 0.9;
}

/* ---------- WERK ---------- */
.screen-werk { background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); }
.werk-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.werk-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
.werk-car {
  position: absolute;
  left: 0;
  top: 0;
  width: 600px;
  height: 340px;
  pointer-events: none;
  z-index: 2;
}
.werk-car > * { pointer-events: auto; }
.werk-car.in { animation: carIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.werk-car.out { animation: carOut 0.6s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
@keyframes carIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes carOut { from { opacity: 1; } to { opacity: 0; } }
.dirt {
  position: absolute;
  width: 92px;
  height: 76px;
  margin: -38px 0 0 -46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 90'%3E%3Cpath d='M30 22 C36 8 58 6 64 18 C72 10 92 14 90 30 C104 34 104 54 92 58 C98 72 80 84 68 76 C60 90 40 88 34 76 C18 82 6 68 12 56 C2 46 8 30 22 30 Z' fill='%237a4a22' stroke='%23432610' stroke-width='4' stroke-linejoin='round'/%3E%3Cpath d='M30 22 C36 8 58 6 64 18 C72 10 92 14 90 30 C104 34 104 54 92 58 C98 72 80 84 68 76 C60 90 40 88 34 76 C18 82 6 68 12 56 C2 46 8 30 22 30 Z' fill='none' stroke='rgba(0,0,0,0.18)' stroke-width='14' transform='translate(4 6)' clip-path='none'/%3E%3Ccircle cx='38' cy='36' r='7' fill='%23a06a35'/%3E%3Ccircle cx='62' cy='30' r='5' fill='%23a06a35'/%3E%3Ccircle cx='72' cy='58' r='8' fill='%23583417'/%3E%3Ccircle cx='46' cy='62' r='6' fill='%23583417'/%3E%3Ccircle cx='24' cy='50' r='4' fill='%23583417'/%3E%3Ccircle cx='58' cy='46' r='3' fill='%23c48a4a'/%3E%3Ccircle cx='100' cy='24' r='5' fill='%237a4a22' stroke='%23432610' stroke-width='3'/%3E%3Ccircle cx='10' cy='76' r='6' fill='%237a4a22' stroke='%23432610' stroke-width='3'/%3E%3Ccircle cx='86' cy='80' r='4' fill='%237a4a22' stroke='%23432610' stroke-width='3'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.3));
  transform: rotate(var(--rot, 0deg));
  touch-action: none;
}
/* v3: the mud is a 3D blob on the car; the DOM element is only the (transparent) tap area */
.dirt { background: none; filter: none; }
.dirt i { display: none; }
.dirt.gone { animation: dirtGone 0.25s ease forwards; pointer-events: none; }
@keyframes dirtGone { to { transform: scale(0) rotate(40deg); opacity: 0; } }
.bubble-fx {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #bfe6ff 60%, #7dd3fc);
  border: 2px solid #fff;
  pointer-events: none;
  animation: bubbleUp 0.7s ease-out forwards;
}
@keyframes bubbleUp {
  0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, -80px)) scale(1.3); opacity: 0; }
}
.sparkle-fx {
  position: absolute;
  font-size: 52px;
  pointer-events: none;
  animation: sparkle 0.6s ease-out forwards;
}
@keyframes sparkle {
  0% { transform: scale(0.4) rotate(0); opacity: 1; }
  100% { transform: scale(1.4) rotate(40deg); opacity: 0; }
}
.float-fx {
  position: absolute;
  font-size: 40px;
  color: #fff;
  text-shadow: var(--outline), 0 4px 0 var(--ink);
  pointer-events: none;
  animation: floatUp 0.9s ease-out forwards;
  z-index: 5;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  100% { transform: translateY(-90px) scale(1); opacity: 0; }
}
/* V7.6: the conveyor wash. KLAAR alone bottom-right, the truck ring top-right under the top bar, the middle free */
.werk-hud {
  position: absolute;
  right: 20px;
  bottom: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  z-index: 20;
}
.werk-ring { position: absolute; right: 22px; top: calc(var(--topbar-h) + 16px); width: 96px; height: 96px; border-width: 4px; z-index: 20; }
.werk-ring::before { inset: 8px; }
.werk-ring .ico { font-size: 44px; }
.werk-ring b { right: -12px; bottom: -10px; min-width: 56px; height: 32px; line-height: 32px; font-size: 22px; font-weight: 800; }
.werk-ring.bump { animation: ringbump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes ringbump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
/* side view: the mud spots sit closer together than on the old three-quarter car, so the hit areas are a little smaller (still ≥ 64 px) */
.screen-werk .dirt { width: 78px; height: 70px; margin: -35px 0 0 -39px; }

/* ---------- WINKEL ---------- */
.screen-winkel {
  background: linear-gradient(180deg, #5cc9f7 0%, #a8e4ff 100%);
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top));
}
.screen-winkel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-55deg, rgba(255, 255, 255, 0.08) 0 26px, rgba(255, 255, 255, 0) 26px 52px);
  pointer-events: none;
}
.tabs {
  display: flex;
  gap: 14px;
  padding: 0 20px;
  position: relative;
}
.btn-tab {
  flex: 1;
  min-height: 84px;
  font-size: 30px;
  --c: var(--grey); --cd: var(--grey-d); --cl: #eef2f8;
  opacity: 0.9;
}
.btn-tab.active { opacity: 1; --c: var(--gold); --cd: var(--gold-d); --cl: #fff2b3; transform: translateY(-2px); }
#tab-fun.active { --c: var(--purple); --cd: var(--purple-d); --cl: #e6d0ff; }
.tab-hint {
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  margin-left: 12px;
  background: #fff;
  color: var(--ink);
  text-shadow: none;
  border-radius: 999px;
  padding: 6px 12px;
  border: 3px solid var(--ink);
}
.tab-hint:empty { display: none; }
.tab-hint img { width: 30px; height: 30px; }
.shop-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  padding: 14px 20px 14px 20px;
  position: relative;
}
.shop-grid.makers {
  grid-template-columns: repeat(4, 1fr);   /* V5.5: seven coin-makers, four per page */
  grid-template-rows: minmax(0, 380px);
  align-content: center;
}
.shop-grid.makers .card .btn { font-size: 24px; padding: 4px 6px; gap: 2px; flex-direction: column; min-height: 78px; white-space: normal; }
.shop-grid .card { min-width: 0; }
.card .btn { max-width: 100%; }
.btn-price { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-variant-numeric: tabular-nums; }
.card-price.wrap { white-space: normal; font-size: 23px; line-height: 1.1; text-align: center; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 0;
  padding: 10px 12px 12px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5fb 100%);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--edge-sm), inset 0 3px 0 #fff;
  text-align: center;
  transition: transform 0.15s var(--pop);
}
.card.owned { background: linear-gradient(180deg, #f3fff4 0%, #d7f8dc 100%); }
.card.dim { background: linear-gradient(180deg, #f6f7fa 0%, #e5e9f1 100%); }
.card.dim .card-icon { filter: saturate(0.35) brightness(0.95); opacity: 0.75; }
.card.locked { background: repeating-linear-gradient(45deg, #e9edf4 0 14px, #dde3ec 14px 28px); }
.card.locked .card-icon { filter: grayscale(0.7) brightness(0.9); opacity: 0.6; }
.card.can { box-shadow: var(--edge-sm), 0 0 0 4px var(--gold-l), inset 0 3px 0 #fff; }
.card.off .card-icon { filter: grayscale(0.8); opacity: 0.55; }
.card .btn { margin-top: auto; }
.card-icon {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, #ffffff 0, #e4ecf7 75%);
  box-shadow: inset 0 0 0 3px rgba(27, 31, 59, 0.08);
  font-size: 54px;
  line-height: 84px;
}
.shop-grid.makers .card-icon { width: 128px; height: 128px; }
.card-name { font-size: 23px; line-height: 1.1; }
.card-sub { font-size: 21px; color: #4b5470; }
.card-sub:empty { display: none; }
.card-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.card-price img, .card-sub img { width: 28px; height: 28px; vertical-align: middle; }
.card-check {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-shadow: var(--outline);
}
.stars { font-size: 22px; letter-spacing: 1px; color: var(--gold); }
.progress { width: 100%; height: 16px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.08); }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-l), var(--gold)); transition: width 0.3s; }
.card .btn { width: 100%; min-height: 66px; font-size: 26px; padding: 0 10px; }
.card .btn-icon { font-size: 1em; }
.shop-footer {
  height: 104px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px 12px 140px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  position: relative;
}
.shop-dots { display: flex; gap: 10px; align-items: center; }
.shop-dots i { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.shop-dots i.on { background: var(--gold); }
#shop-stad { margin-left: auto; }

/* ---------- HUIS ---------- */
.screen-huis { background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); }
.huis-scene { position: absolute; inset: 0; overflow: hidden; }
.huis-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.huis-scene .hits { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.huis-scene .hit { position: absolute; translate: -50% -100%; background: transparent; pointer-events: auto; }
.huis-scene .firework { z-index: 3; }
.huis-scene .zzz { position: absolute; font-size: 30px; translate: -50% -100%; animation: zzz 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes zzz { 0% { transform: translateY(0); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
.sticker-wall {
  position: absolute;
  right: 18px;
  top: calc(var(--topbar-h) + 10px + env(safe-area-inset-top));
  width: 256px;
  padding: 10px 14px 14px 14px;
  z-index: 5;
  background: linear-gradient(180deg, #ffe7b3 0%, #f7c877 100%);
}
.sticker-title { font-size: 24px; text-align: center; margin-bottom: 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sticker {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px dashed rgba(27, 31, 59, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.45);
}
.sticker.got {
  border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff 0, #ffe58a 60%, #ffc21c 100%);
  box-shadow: 0 4px 0 var(--ink);
  animation: bump 0.4s;
}
.huis-actions {
  position: absolute;
  left: 20px;
  top: calc(var(--topbar-h) + 10px + env(safe-area-inset-top));
  display: flex;
  gap: 12px;
  z-index: 6;
}
/* V7.3: the yard's emotes are round picture buttons (96 px) */
.huis-actions { gap: 14px; }
.huis-footer {
  position: absolute;
  right: 18px;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 14px;
  z-index: 6;
}
.firework {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  animation: firework 1s ease-out forwards;
  box-shadow: 0 0 8px currentColor;
}
@keyframes firework {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* ---------- GATE ---------- */
.screen-gate { align-items: center; justify-content: center; background: linear-gradient(#dbeeff, #a8d8f5); }
.gate-panel { padding: 22px 34px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gate-text { margin: 0; font-size: 24px; }
.gate-sum { margin: 0; font-size: 46px; }
.gate-answer { margin: 0; font-size: 40px; min-height: 48px; color: var(--blue-d); font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(3, 90px); gap: 12px; justify-content: center; }
.keypad .btn { width: 90px; height: 72px; min-height: 72px; padding: 0; font-size: 30px; --c: #ffffff; --cd: #cfd6e2; --cl: #ffffff; color: var(--ink); text-shadow: none; }
.keypad .btn-primary { --c: var(--gold); --cd: var(--gold-d); --cl: #fff2b3; color: #fff; text-shadow: var(--outline), 0 4px 0 var(--ink); }
.keypad .btn-secondary { --c: var(--blue); --cd: var(--blue-d); --cl: #c4e8ff; color: #fff; text-shadow: var(--outline), 0 4px 0 var(--ink); }
.gate-back { margin-top: 6px; }

/* ---------- PAPA ---------- */
.screen-papa { background: linear-gradient(#e6f3ff, #f4f9ff); }
.papa-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 18px 20px 30px 20px;
  padding-top: calc(18px + env(safe-area-inset-top));
}
.papa-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.papa-title { margin: 0; font-size: 34px; }
.papa-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.papa-panel { padding: 16px 18px; box-shadow: var(--edge-sm); border-radius: 22px; }
.papa-panel h3 { margin: 0 0 8px 0; font-size: 24px; color: var(--blue-d); }
.papa-panel h3 + h3, .papa-panel .toggles + h3, .papa-panel .papa-status + h3, .papa-panel .starters + h3 { margin-top: 18px; }
.papa-help { margin: 0 0 10px 0; font-size: 20px; font-weight: 600; color: #3f475f; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 21px; }
.stats dt { margin: 0; font-weight: 600; color: #3f475f; }
.stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.starters { margin: 0; padding-left: 26px; font-size: 21px; font-weight: 600; color: #3f475f; display: flex; flex-direction: column; gap: 8px; }
.toggles { display: flex; flex-direction: column; gap: 14px; }
.toggles .btn { justify-content: space-between; width: 100%; }
.code-out {
  width: 100%;
  min-height: 176px;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  background: #f5f8fc;
  resize: none;
  word-break: break-all;
  margin-bottom: 10px;
}
.code-in { max-width: none; margin: 12px 0 10px 0; font-size: 22px; height: 64px; }
.papa-status { margin: 10px 0 0 0; font-size: 20px; min-height: 26px; color: var(--green-d); }
.papa-status.bad { color: var(--red-d); }
.reset-confirm { margin-top: 12px; }

/* ---------- mentor ---------- */
.mentor {
  position: absolute;
  left: 12px;
  bottom: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  pointer-events: none;
  width: 118px;
  height: 118px;
}
.muntje { width: 118px; height: 118px; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; pointer-events: auto; cursor: pointer; }
.muntje svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 0 rgba(10, 20, 60, 0.35)); }
.muntje.talk { animation: talk 0.5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes talk { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06, 0.95); } }
/* V7.7 (PLAN-V7 §C.2 rule 6): the bubble sits at the top in the middle, out of the way of the hands, and shows a
   picture plus at most three words (.kort); Muntje himself stays bottom-left and repeats the line when tapped */
.bubble {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--topbar-h) + 10px);
  margin: 0 auto;
  width: max-content;
  max-width: min(640px, 60vw);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--edge-sm);
  font-size: 24px;
  line-height: 1.25;
  pointer-events: auto;
  animation: pop 0.3s var(--pop);
  transform-origin: 50% 0%;
  z-index: 31;
}
.bubble.kort { font-size: 34px; font-weight: 800; padding: 10px 12px 10px 18px; }
.bubble.kort .bubble-text { white-space: nowrap; }
.bubble.hidden { display: none; }
/* on the island the free strip is right of the bag and left of the map: centre the bubble at about two thirds */
.app[data-screen="avontuur"] .bubble { left: 46%; right: 8%; top: calc(var(--topbar-h) + 150px); }
/* on WINKEL the tabs sit at the top and on HUIS the sticker wall: there the bubble stays low, beside Muntje */
.app[data-screen="winkel"] .bubble, .app[data-screen="huis"] .bubble, .app[data-screen="start"] .bubble, .app[data-screen="gate"] .bubble, .app[data-screen="papa"] .bubble { left: 122px; right: auto; top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0; transform-origin: 0% 100%; }
/* on the shop Muntje shrinks a little so he never sits on the bottom-left card's button */
.app[data-screen="winkel"] .mentor, .app[data-screen="winkel"] .muntje { width: 92px; height: 92px; }
.app[data-screen="winkel"] .bubble { left: 100px; bottom: calc(104px + env(safe-area-inset-bottom)); }
.bubble-text { flex: 1; }
.bubble .btn-round { --c: var(--blue); --cd: var(--blue-d); --cl: #c4e8ff; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- popups ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 60, 0.5);
}
.popup {
  min-width: 480px;
  max-width: min(780px, 90vw);
  max-height: 90vh;
  padding: 20px 30px 24px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: pop 0.35s var(--pop);
}
.popup-title { margin: 0; font-size: 34px; }
.popup-big {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 66px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--gold-d);
}
.popup-icon { font-size: 96px; line-height: 1; }
.popup-icon img, img.popup-icon { width: 140px; height: 140px; object-fit: contain; }
.popup-text { margin: 0; font-size: 24px; font-weight: 600; color: #3f475f; }
.popup .btn-xl { min-width: 280px; }
.popup > .btn + .btn { margin-top: 6px; } /* two stacked buttons stay ≥ 12 px apart (SPEC §4) */
.popup .row { justify-content: center; }
.bcard-stars { font-size: 30px; color: var(--gold); text-shadow: 0 2px 0 var(--ink); }
.bcard-income { font-size: 28px; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- effects canvas ---------- */
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.coin-fly {
  position: absolute;
  z-index: 61;
  width: 36px;
  height: 36px;
  pointer-events: none;
  will-change: transform;
}

/* ---------- portrait ---------- */
.rotate {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--sky-deep);
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-shadow: var(--outline), 0 5px 0 var(--ink);
}
.rotate-icon {
  width: 150px;
  height: 210px;
  border: 8px solid #fff;
  border-radius: 22px;
  background: #0b1a33;
  box-shadow: 0 8px 0 var(--ink), 0 14px 18px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  animation: rotateHint 2.2s ease-in-out infinite;
  text-shadow: none;
}
.rotate-icon img { width: 110px; height: 110px; border-radius: 24px; }
.rotate-text { font-size: 44px; }
@keyframes rotateHint { 0%, 15% { transform: rotate(0); } 50%, 65% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: portrait) {
  .rotate { display: flex; }
}

/* ---------- small landscape heights ---------- */
@media (max-height: 780px) {
  .app { font-size: 21px; }
  .card-icon { width: 64px; height: 64px; }
  .shop-grid.makers .card-icon { width: 100px; height: 100px; }
  .card { padding: 8px 10px 10px 10px; }
  .card .btn { min-height: 64px; }
  .shop-grid { padding-bottom: 16px; }
  .popup img.popup-icon, .popup .popup-icon img { width: 120px; height: 120px; }
  .btn-nav { min-height: 90px; }
  .papa-panel { padding: 12px 14px; }
  .papa-panel .btn-lg { min-height: 64px; font-size: 24px; }
  .code-out { min-height: 70px; }
  .papa-scroll { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.15s !important; animation-iteration-count: 1 !important; transition-duration: 0.1s !important; }
  .muntje, .rotate-icon, .btn.glow { animation: none !important; }
}

/* ---------- AVONTUUR (PLAN-V4 round 1): walk around yourself ---------- */
/* V7.3: AVONTUUR (stadium) and DORP (round) under the wallet row, at the right edge */
.btn-avontuur { position: absolute; right: 14px; top: calc(var(--topbar-h) + 12px); z-index: 20; }
.btn-dorp { position: absolute; right: 14px; top: calc(var(--topbar-h) + 136px); z-index: 20; }
/* ---------- DORP (V6.3): walking through the town ---------- */
.screen-dorp { background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); touch-action: none; user-select: none; -webkit-user-select: none; }
.dp-kaart { min-height: 58px; font-size: 22px; }
.btn-nav-sm { min-height: 82px; min-width: 150px; font-size: 26px; }
.overtocht { position: fixed; inset: 0; z-index: 60; opacity: 0; transition: opacity 0.45s; pointer-events: none; overflow: hidden; background: #1f8ee0; }
.overtocht.on { opacity: 1; pointer-events: auto; }
.overtocht-sky { position: absolute; inset: 0 0 45% 0; background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 100%); }
.overtocht-sea { position: absolute; inset: 55% 0 0 0; background: repeating-linear-gradient(180deg, #2a9df0 0 18px, #1f8ee0 18px 36px); animation: golven 1.2s linear infinite; }
.overtocht-boot { position: absolute; left: -12%; top: 40%; font-size: 120px; line-height: 1; animation: varen 2.6s ease-in-out forwards, deinen 0.9s ease-in-out infinite; }
.overtocht-dolfijn { position: absolute; left: 20%; top: 58%; font-size: 64px; animation: springen 1.3s ease-in-out infinite; }
.overtocht-tekst { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); margin: 0; color: #fff; font-size: 40px; font-weight: 900; text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(0, 0, 0, 0.35); white-space: nowrap; }
@keyframes varen { from { left: -12%; } to { left: 78%; } }
@keyframes deinen { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes springen { 0%, 100% { transform: translateY(24px) scaleX(-1); opacity: 0; } 50% { transform: translateY(-30px) scaleX(-1); opacity: 1; } }
@keyframes golven { from { background-position: 0 0; } to { background-position: 0 36px; } }
.screen-avontuur { background: linear-gradient(180deg, #a6e4ff 0%, #5fc4ff 38%, #1f8ee0 70%, #1479cf 100%); touch-action: none; user-select: none; -webkit-user-select: none; }
.stick {
  position: absolute;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 4px solid rgba(255, 255, 255, 0.75);
  display: none;
  pointer-events: none;
  z-index: 15;
}
.stick.on { display: block; }
.stick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0 0, #ffd93d 45%, #f0a80f 100%);
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
}
/* V7.2: the one big action, STOOK and SPRING in a row at the bottom-right corner (PLAN-V7 §C.2: buttons at the edges) */
.av-buttons {
  position: absolute;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 14px;
  z-index: 20;
}
/* while the stick is active the buttons that are not the action step back (PLAN-V7 §C.2 rule 3) */
.screen-avontuur.moving .av-dim, .screen-avontuur.moving .av-left, .screen-avontuur.moving .av-map, .screen-avontuur.moving .av-peers { opacity: 0.55; }
.av-dim, .av-left, .av-map, .av-peers { transition: opacity 0.25s; }
/* Muntje's bubble on the island: narrower and no touch target, so it never blocks the stick (rule 6) */
.app[data-screen="avontuur"] .bubble { max-width: min(460px, 42vw); pointer-events: none; }
.app[data-screen="avontuur"] .bubble .btn-round { pointer-events: auto; }


/* ---------- AVONTUUR round 3: backpack, quest, action button, campfire panel ---------- */
/* V7.0: the HUD stays in the top-left corner (bag max 56 % of the width, cards 30-40 %) and the cards start folded to one line, so the island stays visible */
.av-left { position: absolute; left: 14px; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; z-index: 20; pointer-events: none; max-width: 56vw; }
/* V7.2: the bag as tiles, the fire / food / warmth as rings; one row, pictures only */
.av-hud { display: flex; align-items: center; gap: 22px; margin-left: 2px; }
.av-tiles { display: flex; gap: 16px; }
.av-rings { display: flex; gap: 20px; }
.av-quest { padding: 6px 14px; font-size: 19px; font-weight: 700; color: #2f3650; max-width: 100%; display: flex; flex-direction: column; gap: 3px; pointer-events: auto; cursor: pointer; border-radius: 22px; }
.av-quest .kt, .av-quest .st.done, .av-quest .st.todo { display: none; }
.av-quest.open .kt, .av-quest.open .st.done, .av-quest.open .st.todo { display: block; }
.av-quest.open { min-width: 250px; }
.av-quest b { color: var(--ink); }
.av-quest .kt { font-size: 22px; margin-bottom: 2px; }
.av-quest .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.av-quest .st.done { color: #2a9d3a; text-decoration: line-through; opacity: 0.8; }
.av-quest .st.now { color: var(--ink); }
.av-quest .st.now i { font-style: normal; color: #d9541c; }
.av-quest .st.todo { opacity: 0.45; }
#av-actie.pulse { animation: glow 0.9s ease-in-out infinite; }
/* the village (DORP, V6.3) still uses the wide action / jump / emote buttons */
.btn-actie { min-height: 98px; min-width: 214px; font-size: 32px; border-radius: 26px; }
.btn-actie.pulse { animation: glow 0.9s ease-in-out infinite; }
.btn-jump { width: 150px; height: 150px; min-width: 150px; min-height: 150px; border-radius: 50%; font-size: 30px; padding: 0; }
.btn-emote { min-height: 82px; min-width: 150px; font-size: 26px; }


/* ---------- SAMEN SPELEN (R5) ---------- */
.btn-samen { grid-column: 1 / -1; justify-self: center; min-width: 220px; }
.samen-overlay { z-index: 45; }
.samen-panel { text-align: center; }
.samen-slots { display: flex; justify-content: center; gap: 16px; margin: 10px 0 16px; }
.samen-slot { width: 84px; height: 84px; border: 3px solid var(--ink); border-radius: 20px; background: #fff; font-size: 48px; line-height: 78px; }
.samen-keys { display: grid; grid-template-columns: repeat(4, 96px); gap: 12px; justify-content: center; margin-bottom: 12px; }
.btn-pic { width: 96px; height: 84px; min-height: 84px; padding: 0; font-size: 44px; --c: #ffffff; --cd: #cfd6e2; --cl: #ffffff; text-shadow: none; }
.samen-code { font-size: 44px; letter-spacing: 6px; }
/* V7.2: SAMEN and DORP sit in the empty right half of the top bar (88 px, so two of them stay inside the right 20 % on the iPad mini) */
.av-top-right { position: absolute; right: 14px; top: calc(12px + env(safe-area-inset-top)); display: flex; gap: 14px; align-items: center; z-index: 21; }
.av-top-right .btn-ico-m { --d: 88px; }
.av-peers { padding: 8px 16px; font-size: 26px; font-weight: 800; pointer-events: none; }
.av-samen-code { display: block; min-height: 52px; margin: 4px 0 8px; }
.av-flauw-tekst { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; color: #fff; font-size: 30px; font-weight: 800; text-align: center; max-width: 70%; text-shadow: 0 2px 8px #000; }
.av-flauw.down { background: rgba(5, 6, 15, 0.72); }
.av-map { position: absolute; right: 14px; top: calc(var(--topbar-h) + 22px); width: 144px; height: 144px; border: 3px solid var(--ink); border-radius: 18px; background: #3f9de0; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); z-index: 19; pointer-events: none; }
/* V9.2: the banner at dusk that says what tonight brings; five seconds, no touch target */
.av-banner { position: absolute; left: 0; right: 0; top: 30%; margin: 0 auto; width: max-content; max-width: 80vw; padding: 14px 34px; font-size: 44px; font-weight: 900; color: #fff; text-shadow: var(--outline), 0 6px 0 var(--ink); background: rgba(20, 24, 50, 0.78); border: 4px solid var(--ink); border-radius: 30px; z-index: 25; pointer-events: none; animation: pop 0.35s var(--pop); }
.av-banner.hidden { display: none; }
.av-banner.baas { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); font-size: 30px; padding: 8px 22px; animation: none; }   /* V9.5: the boss's lives, out of the way of the middle */
.av-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 18; opacity: 0; transition: opacity 0.8s; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 48%, var(--vig, rgba(30, 60, 160, 0.9)) 100%); }
.av-vignette.on { opacity: 1; }
.av-emotes { position: absolute; left: 146px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 14px; z-index: 20; }
.av-emote-row { display: flex; gap: 14px; }
/* V9.4: the gadget button carries a count badge; the row buttons too */
.av-emotes .btn { position: relative; }
.av-emotes .btn .n { position: absolute; right: -8px; bottom: -8px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 20px; line-height: 26px; text-align: center; font-weight: 800; text-shadow: none; }
.av-emote-row[hidden] { display: none; }

/* V5.3: the faint fade, two columns of tools at the fire (the hunger and warmth bars became rings in V7.2) */
.av-row { display: flex; gap: 10px; align-items: center; }
.av-nacht { padding: 5px 14px; font-size: 22px; font-weight: 900; color: #3f475f; white-space: nowrap; }
.av-nacht.night { background: #1d2144; color: #fff; }
.av-campagne { padding: 5px 14px; font-size: 17px; font-weight: 700; color: #3f475f; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; max-width: 30vw; pointer-events: auto; cursor: pointer; }
.av-campagne span { display: none; flex-basis: 100%; }
.av-campagne.open span { display: block; }
.av-campagne b { color: var(--ink); font-size: 18px; }
.av-campagne span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-campagne i { font-style: normal; letter-spacing: 1px; font-size: 15px; }
.av-flauw { position: absolute; inset: 0; background: #05060f; z-index: 30; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.av-flauw.on { opacity: 1; }
/* ---------- the campfire screen (V6.1): a full layer in AVONTUUR, same bones as WINKEL ---------- */
.kamp-screen { position: absolute; top: var(--topbar-h); left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(20, 26, 68, 0.92) 0%, rgba(10, 13, 44, 0.96) 100%); padding-top: 8px; }
.kamp-tabs { flex: none; }
.kamp-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.kamp-grid .card { justify-content: flex-start; }
.card-emoji { font-size: 72px; line-height: 1.1; height: 84px; display: flex; align-items: center; justify-content: center; }
.kamp-grid .card-sub { font-size: 20px; line-height: 1.15; text-align: center; }
.kamp-empty { grid-column: 1 / -1; align-self: center; text-align: center; color: #fff; font-size: 26px; font-weight: 700; padding: 30px; }
.kamp-screen .shop-footer .btn-lg { min-width: 180px; }

/* V11.1a: the language button on START: the other language as one word, top-right of the screen, clear of the panel (audit: 12 px between buttons, text >= 20 px) */
.screen-start .btn-taal { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); box-sizing: border-box; min-width: 64px; height: 66px; font-size: 24px; padding: 0 22px; z-index: 3; }

/* ---------- V11.1b: telefoon (PLAN-V11 §A.1): a phone lying down is under 480 CSS px tall; the same kit, compact ----------
   Rules: touch targets ≥ 48 px and ≥ 8 px apart, the one big action ≥ 56 px, labels ≥ 16 px, text ≥ 14 px (tests/e2e/audits.spec.js).
   The middle of the screen stays free (PLAN-V7 §C.2); everything hangs on the four corners and the bottom edge. */
@media (max-height: 480px) {
  :root { --topbar-h: 56px; --bottombar-h: 80px; --edge: 0 4px 0 var(--ink), 0 8px 10px rgba(10, 20, 60, 0.3); --edge-sm: 0 3px 0 var(--ink), 0 6px 8px rgba(10, 20, 60, 0.26); }
  .app { font-size: 16px; }
  .panel { border-radius: 18px; border-width: 2px; box-shadow: var(--edge), inset 0 3px 0 #fff, inset 0 0 0 4px #eef3fb; }
  .panel-mini { padding: 4px 12px; font-size: 16px; border-width: 2px; }
  /* buttons */
  .btn { min-width: 48px; min-height: 48px; padding: 0 14px; border-width: 2px; border-radius: 14px; font-size: 18px; box-shadow: 0 4px 0 var(--ink), 0 7px 9px rgba(10, 20, 60, 0.3), var(--gloss); }
  .btn:active, .btn.pressed { transform: translateY(3px); }
  .btn-lg { min-height: 52px; font-size: 19px; border-radius: 16px; }
  .btn-xl { min-height: 58px; font-size: 22px; padding: 0 24px; border-radius: 18px; }
  .btn-nav { min-height: 58px; min-width: 130px; font-size: 20px; border-radius: 16px; }
  .btn-round { width: 48px; height: 48px; min-width: 48px; font-size: 20px; }
  .btn-arrow { width: 56px; height: 56px; min-width: 56px; font-size: 24px; border-width: 3px; }
  .btn-ico { --d: 60px; border-width: 3px; }
  .btn-ico .ico { font-size: 22px; }
  .btn-ico .lbl { font-size: 16px; margin-top: 1px; }
  .btn-ico-s { --d: 52px; }
  .btn-ico-s .ico { font-size: 22px; }
  .btn-ico-m { --d: 60px; }
  .btn-ico-m .ico { font-size: 22px; }
  .btn-ico-l { --d: 70px; }
  .btn-ico-l .ico { font-size: 26px; }
  .btn-ico-l .lbl { font-size: 16px; margin-top: 2px; }
  .btn-ico-xl { --d: 84px; }
  .btn-ico-xl .ico { font-size: 30px; }
  .btn-ico-xl .lbl { font-size: 16px; margin-top: 2px; }
  .btn-ico.wide { padding: 0 12px; }
  .btn-ico img.btn-icon { width: 30px; height: 30px; }
  .btn-ico-m img.btn-icon { width: 28px; height: 28px; }
  .btn-ico-xl img.btn-icon { width: 38px; height: 38px; }
  .ring { width: 42px; height: 42px; border-width: 2px; }
  .ring::before { inset: 4px; }
  .ring .ico { font-size: 17px; }
  .ring b, .tile .n, .av-emotes .btn .n { min-width: 20px; height: 20px; font-size: 14px; line-height: 20px; right: -6px; bottom: -6px; padding: 0 4px; }
  .tile { width: 38px; height: 38px; border-width: 2px; border-radius: 10px; font-size: 19px; box-shadow: 0 3px 0 var(--ink); }
  .coin3 { width: 30px; height: 30px; border-width: 2px; }
  .coin3::after { inset: 5px; border-width: 2px; }
  /* top bar */
  .topbar { padding: 6px 10px 0 10px; padding-top: calc(6px + env(safe-area-inset-top)); gap: 8px; padding-left: max(10px, env(safe-area-inset-left)); }
  .wallet { min-height: 44px; padding: 0 14px 0 8px; gap: 8px; border-width: 2px; }
  .wallet-amount { font-size: 24px; }
  .income { min-height: 44px; padding: 0 14px 0 10px; gap: 6px; font-size: 15px; border-width: 2px; }
  .income #income-amount { font-size: 19px; }
  .income img { width: 26px; height: 26px; }
  /* START */
  .screen-start { justify-content: center; padding-bottom: 0; }
  .start-panel { grid-template-columns: 150px 1fr; gap: 9px 16px; padding: 10px 16px 12px 16px; width: min(640px, 94vw); }
  .start-panel.returning { width: min(520px, 90vw); }
  .start-panel.returning .start-left { gap: 16px; }
  .start-title { font-size: 32px; margin: 0 0 4px 0; text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 4px 0 var(--ink), 0 6px 8px rgba(0, 0, 0, 0.3); }
  .start-avatar img, .start-avatar canvas { width: 96px; height: 96px; }
  .start-new { gap: 4px; }
  .start-label { font-size: 15px; }
  .color-row { gap: 8px; }
  .color-btn { width: 50px; height: 50px; min-width: 50px; border-width: 2px; box-shadow: 0 3px 0 var(--ink), 0 6px 6px rgba(10, 20, 60, 0.25); }
  .color-btn.selected { outline-width: 4px; outline-offset: -7px; box-shadow: 0 3px 0 var(--ink), 0 0 0 3px var(--gold), 0 6px 6px rgba(10, 20, 60, 0.25); }
  .name-input { height: 48px; font-size: 18px; border-width: 2px; border-radius: 14px; max-width: 360px; }
  .start-panel .btn-xl { min-width: 220px; }
  .btn-samen { min-width: 150px; }
  .screen-start .btn-taal { top: max(8px, env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); height: 50px; min-width: 48px; font-size: 17px; padding: 0 14px; }
  /* STAD */
  .bottombar { padding: 0 64px 8px 76px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); gap: 10px; }
  .btn-papa { width: 52px; height: 52px; min-width: 52px; min-height: 52px; font-size: 15px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .btn-avontuur { right: 8px; top: calc(var(--topbar-h) + 4px); }
  .btn-dorp { right: 8px; top: calc(var(--topbar-h) + 84px); }
  /* DORP */
  .dp-kaart { min-height: 48px; font-size: 17px; }
  .btn-nav-sm { min-height: 52px; min-width: 104px; font-size: 18px; }
  .btn-actie { min-height: 56px; min-width: 130px; font-size: 20px; border-radius: 16px; }
  .btn-jump { width: 84px; height: 84px; min-width: 84px; min-height: 84px; font-size: 18px; }
  .btn-emote { min-height: 52px; min-width: 100px; font-size: 17px; }
  .overtocht-tekst { font-size: 24px; }
  .overtocht-boot { font-size: 70px; }
  .overtocht-dolfijn { font-size: 40px; }
  /* WERK */
  .werk-ring { width: 64px; height: 64px; border-width: 3px; right: 10px; top: calc(var(--topbar-h) + 8px); }
  .werk-ring .ico { font-size: 24px; }
  /* WINKEL */
  .tabs { gap: 8px; padding: 0 10px; }
  .btn-tab { min-height: 48px; font-size: 18px; }
  .tab-hint { font-size: 14px; padding: 2px 8px; margin-left: 8px; border-width: 2px; gap: 4px; }
  .tab-hint img { width: 20px; height: 20px; }
  .shop-grid { grid-template-rows: minmax(0, 1fr); gap: 8px; padding: 6px 10px 6px 10px; }
  .shop-grid.makers { grid-template-rows: minmax(0, 1fr); }
  .card { padding: 5px 8px 7px 8px; gap: 2px; border-width: 2px; border-radius: 16px; }
  .card-icon, .shop-grid.makers .card-icon { width: 44px; height: 44px; font-size: 28px; line-height: 44px; border-radius: 12px; }
  .card-name { font-size: 15px; }
  .card-sub { font-size: 14px; }
  .card-price { font-size: 15px; gap: 5px; }
  .card-price.wrap { font-size: 14px; }
  .card-price img, .card-sub img { width: 18px; height: 18px; }
  .card .btn, .shop-grid.makers .card .btn { min-height: 48px; font-size: 17px; padding: 0 8px; }
  .shop-grid.makers .card .btn { flex-direction: row; gap: 6px; }
  .btn-price { font-size: 15px; }
  .card-check { width: 28px; height: 28px; font-size: 16px; top: -6px; right: -6px; border-width: 2px; }
  .stars { font-size: 14px; }
  .progress { height: 10px; border-width: 2px; }
  .shop-footer { height: 62px; gap: 10px; padding: 0 10px 6px 86px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .shop-dots i { width: 12px; height: 12px; border-width: 2px; }
  /* HUIS */
  .sticker-wall { width: 156px; padding: 6px 8px 8px 8px; right: 8px; top: calc(var(--topbar-h) + 4px + env(safe-area-inset-top)); }
  .sticker-title { font-size: 15px; margin-bottom: 4px; }
  .sticker-grid { gap: 6px; }
  .sticker { width: 40px; height: 40px; font-size: 20px; border-width: 2px; }
  .huis-actions { left: 8px; top: calc(var(--topbar-h) + 4px + env(safe-area-inset-top)); gap: 8px; }
  .huis-footer { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  /* GATE: the sum on the left, the keypad on the right, so it fits under 342 px */
  .gate-panel { display: grid; grid-template-columns: auto auto; grid-template-areas: "t k" "s k" "a k" "b k"; gap: 4px 20px; align-items: center; justify-items: center; padding: 10px 18px; }
  .gate-text { grid-area: t; font-size: 15px; }
  .gate-sum { grid-area: s; font-size: 28px; }
  .gate-answer { grid-area: a; font-size: 24px; min-height: 28px; }
  .keypad { grid-area: k; grid-template-columns: repeat(3, 64px); gap: 9px; }
  .keypad .btn { width: 64px; height: 48px; min-height: 48px; font-size: 20px; }
  .gate-back { grid-area: b; margin-top: 2px; }
  /* PAPA */
  .papa-scroll { padding: 8px 12px 20px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .papa-head { margin-bottom: 6px; }
  .papa-title { font-size: 22px; }
  .papa-columns { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .papa-panel { padding: 10px 12px; border-radius: 16px; }
  .papa-panel h3 { font-size: 17px; margin-bottom: 4px; }
  .papa-panel h3 + h3, .papa-panel .toggles + h3, .papa-panel .papa-status + h3, .papa-panel .starters + h3 { margin-top: 10px; }
  .papa-panel .btn-lg { min-height: 48px; font-size: 17px; }
  .papa-help { font-size: 14px; margin-bottom: 6px; }
  .stats { font-size: 14px; gap: 4px 8px; }
  .starters { font-size: 14px; padding-left: 18px; gap: 4px; }
  .toggles { gap: 8px; }
  .code-out { min-height: 88px; font-size: 14px; padding: 6px 8px; border-width: 2px; border-radius: 12px; }
  .code-in { height: 48px; font-size: 16px; margin: 8px 0 6px 0; }
  .papa-status { font-size: 14px; min-height: 18px; }
  /* mentor and bubble */
  .mentor, .muntje { width: 72px; height: 72px; }
  .mentor { left: 8px; bottom: calc(6px + env(safe-area-inset-bottom)); }
  .bubble { top: calc(var(--topbar-h) + 6px); max-width: min(520px, 62vw); padding: 7px 8px 7px 14px; gap: 8px; font-size: 16px; border-width: 2px; border-radius: 18px; }
  .bubble.kort { font-size: 22px; padding: 6px 8px 6px 12px; }
  /* on the island the bubble sits low in the middle, between the emotes and the action buttons: the HUD and the map own the top */
  .app[data-screen="avontuur"] .bubble { left: 25%; right: 25%; top: auto; bottom: calc(6px + env(safe-area-inset-bottom)); width: auto; max-width: none; font-size: 15px; transform-origin: 50% 100%; }
  .app[data-screen="winkel"] .bubble, .app[data-screen="huis"] .bubble, .app[data-screen="start"] .bubble, .app[data-screen="gate"] .bubble, .app[data-screen="papa"] .bubble { left: 84px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .app[data-screen="winkel"] .mentor, .app[data-screen="winkel"] .muntje { width: 60px; height: 60px; }
  .app[data-screen="winkel"] .bubble { left: 72px; bottom: calc(66px + env(safe-area-inset-bottom)); }
  /* popups */
  .popup { min-width: 320px; max-width: 92vw; max-height: 94vh; padding: 10px 16px 12px 16px; gap: 4px; overflow-y: auto; }
  .popup-title { font-size: 22px; }
  .popup-big { font-size: 36px; gap: 8px; }
  .popup-icon { font-size: 52px; }
  .popup-icon img, img.popup-icon, .popup img.popup-icon, .popup .popup-icon img { width: 76px; height: 76px; }   /* beats the 780 px rule */
  .popup-text { font-size: 15px; }
  .popup .btn-xl { min-width: 180px; }
  .bcard-stars { font-size: 18px; }
  .bcard-income { font-size: 17px; }
  /* AVONTUUR */
  .av-left { left: 8px; top: calc(var(--topbar-h) + 4px); gap: 5px; max-width: 60vw; }
  .av-hud { gap: 10px; }
  .av-tiles { gap: 9px; }
  .av-rings { gap: 10px; }
  .av-row { gap: 6px; }
  .av-quest { font-size: 14px; padding: 3px 10px; border-radius: 14px; }
  .av-quest .kt { font-size: 15px; }
  .av-nacht { font-size: 15px; padding: 3px 10px; }
  .av-campagne { font-size: 14px; padding: 3px 10px; }
  .av-campagne b { font-size: 14px; }
  .av-campagne i { font-size: 12px; }
  .av-top-right { right: 8px; top: calc(4px + env(safe-area-inset-top)); gap: 8px; }
  .av-top-right .btn-ico-m { --d: 60px; }
  .av-peers { padding: 4px 10px; font-size: 16px; }
  .av-map { width: 84px; height: 84px; right: 8px; top: calc(var(--topbar-h) + 14px); border-width: 2px; border-radius: 12px; }
  .av-buttons { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .av-emotes { left: 86px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .av-emote-row { gap: 8px; }
  .av-banner { font-size: 24px; padding: 8px 20px; border-width: 3px; border-radius: 18px; }
  .av-banner.baas { font-size: 17px; padding: 5px 14px; bottom: calc(96px + env(safe-area-inset-bottom)); }
  .av-flauw-tekst { font-size: 18px; }
  .stick { width: 110px; height: 110px; margin: -55px 0 0 -55px; border-width: 3px; }
  .stick-knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  /* the campfire screen */
  .kamp-screen { padding-top: 4px; }
  /* V11.1f: at 342 px tall the four cards can run taller than their row (CI's fonts wrap the subtitle); then they slid under
     the footer and its arrow swallowed the MAAK tap. The grid scrolls inside its own box instead, the footer stays clear. */
  .kamp-grid { overflow-y: auto; overscroll-behavior: contain; }
  .card-emoji { font-size: 32px; height: 36px; }
  .kamp-grid .card-sub { font-size: 13px; }
  .kamp-empty { font-size: 17px; padding: 14px; }
  .kamp-screen .shop-footer .btn-lg { min-width: 110px; }
  /* SAMEN */
  .samen-slots { gap: 8px; margin: 6px 0 8px; }
  .samen-slot { width: 52px; height: 52px; font-size: 28px; line-height: 46px; border-width: 2px; border-radius: 12px; }
  .samen-keys { grid-template-columns: repeat(4, 64px); gap: 8px; margin-bottom: 8px; }
  .btn-pic { width: 64px; height: 52px; min-height: 52px; font-size: 28px; }
  .samen-code { font-size: 26px; letter-spacing: 4px; }
  .av-samen-code { min-height: 34px; margin: 2px 0 4px; }
  .popup-title + .samen-code { margin-top: 0; }
  /* portrait hint */
  .rotate-text { font-size: 28px; }
  .rotate-icon { width: 96px; height: 136px; border-width: 5px; }
  .rotate-icon img { width: 70px; height: 70px; }
}

/* ---------- V11.1c: de knoppenlaag 2.0 (PLAN-V11 V11.2 "knoppenlaag", the first visible piece of the make-over) ----------
   The same pieces as the V7.2 kit (round picture buttons, rings, tiles, cards), restyled after the key art and the style
   sheet of 18 October: toy-plastic picture icons (docs/iconen/, docs/js/iconen.js) instead of emoji, a cream label pill
   under the picture (dark text on cream reads better than outlined white on a colour), a softer ink, rounder type. */
:root {
  --ink: #243055;
  --ink-soft: rgba(36, 48, 85, 0.32);
  --paper: #fffdf7;
  --cream: #fff4d6;
  --edge: 0 5px 0 var(--ink), 0 10px 14px rgba(20, 30, 70, 0.22);
  --edge-sm: 0 3px 0 var(--ink), 0 7px 10px rgba(20, 30, 70, 0.2);
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}
img.ico { width: 1.2em; height: 1.2em; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; }
.btn-ico img.ico { width: 44px; height: 44px; filter: drop-shadow(0 2px 0 rgba(20, 30, 70, 0.25)); }
.btn-ico-s img.ico { width: 36px; height: 36px; }
.btn-ico-m img.ico { width: 42px; height: 42px; }
.btn-ico-l img.ico { width: 54px; height: 54px; }
.btn-ico-xl img.ico { width: 64px; height: 64px; }
/* the word under the picture: a cream pill with dark text */
.btn-ico .lbl { background: linear-gradient(#fffaf0, #ffecc2); color: var(--ink); text-shadow: none; border-radius: 999px; padding: 2px 9px; margin-top: 3px; line-height: 1.05; box-shadow: inset 0 -2px 0 rgba(20, 30, 70, 0.12), 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-ico-l .lbl, .btn-ico-xl .lbl { padding: 2px 10px; margin-top: 2px; }
.btn-ico.wide .lbl { padding: 2px 12px; }
/* the nav pictures in the bottom bar and the tabs */
.btn-ico img.btn-icon { width: 46px; height: 46px; }
.btn-tab img.btn-icon { width: 40px; height: 40px; }
.income img { width: 34px; height: 34px; }
/* rings and tiles carry the same pictures */
.ring img.ico { width: 30px; height: 30px; position: relative; }
.tile img.ico { width: 34px; height: 34px; }
.av-emotes .btn img.ico { position: relative; }
.card-emoji img.ico { width: 76px; height: 76px; }
.gate-back img.btn-icon, .papa-head img.btn-icon { width: 36px; height: 36px; }
/* the big action: the picture swaps with the action */
#av-actie-ico { transition: transform 0.15s var(--pop); }
#av-actie.pulse #av-actie-ico { transform: scale(1.08); }
@media (max-height: 480px) {
  .btn-ico img.ico { width: 26px; height: 26px; }
  .btn-ico-s img.ico { width: 24px; height: 24px; }
  .btn-ico-m img.ico { width: 26px; height: 26px; }
  .btn-ico-l img.ico { width: 32px; height: 32px; }
  .btn-ico-xl img.ico { width: 38px; height: 38px; }
  .btn-ico .lbl { padding: 1px 6px; margin-top: 1px; }
  .btn-ico img.btn-icon { width: 28px; height: 28px; }
  .btn-tab img.btn-icon { width: 24px; height: 24px; }
  .income img { width: 24px; height: 24px; }
  .ring img.ico { width: 20px; height: 20px; }
  .tile img.ico { width: 24px; height: 24px; }
  .card-emoji img.ico { width: 40px; height: 40px; }
  .gate-back img.btn-icon, .papa-head img.btn-icon { width: 26px; height: 26px; }
}

/* ---------- V11.1e: toegankelijkheid en twee profielen ---------- */
/* less motion: the setting on PAPA or the device's wish; no slides, no shakes, no bobbing, no glow */
.app.minder-beweging .screen.active, .app.minder-beweging .shake, .app.minder-beweging .bump, .app.minder-beweging .muntje, .app.minder-beweging .btn.glow, .app.minder-beweging .start-avatar.wave img, .app.minder-beweging .popup, .app.minder-beweging .bubble, .app.minder-beweging .ring.low, .app.minder-beweging .rotate-icon { animation: none !important; }
.app.minder-beweging .btn, .app.minder-beweging .card, .app.minder-beweging .color-btn { transition: none; }
/* large text: the reading parts grow; the buttons keep their size */
.app.tekst-groot .bubble { font-size: 30px; max-width: min(760px, 70vw); }
.app.tekst-groot .bubble.kort { font-size: 40px; }
.app.tekst-groot .popup-text, .app.tekst-groot .papa-help, .app.tekst-groot .stats, .app.tekst-groot .starters, .app.tekst-groot .card-sub, .app.tekst-groot .av-quest, .app.tekst-groot .gate-text { font-size: 25px; }
.app.tekst-groot .card-name, .app.tekst-groot .card-price, .app.tekst-groot .popup-title { font-size: 28px; }
.app.tekst-groot .av-quest .kt, .app.tekst-groot .av-nacht { font-size: 26px; }
.app.tekst-groot .papa-panel h3 { font-size: 28px; }
/* a full bag says so with a mark as well as with red */
.tile .n.full::after { content: "!"; margin-left: 1px; }
/* the language button: 70 px, so the audit never catches it at 64 × 0.965 while the screen slides in */
.screen-start .btn-taal { height: 70px; }
/* the two profiles on START, top-left, clear of the panel and the language button */
.profielen { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); left: max(14px, env(safe-area-inset-left, 0px)); display: flex; gap: 14px; z-index: 3; }
.btn-profiel.aan { box-shadow: 0 0 0 5px var(--gold), 0 6px 0 var(--ink), 0 10px 12px rgba(10, 20, 60, 0.32), var(--gloss); }
.btn-profiel img.ico { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
@media (max-height: 480px) {
  /* on a phone the two profiles stand on top of each other at the left edge, round and without the word (the name is in
     the aria-label): a wide KAPITEIN pill would run into the colour buttons of the panel */
  .profielen { top: max(8px, env(safe-area-inset-top, 0px)); left: max(8px, env(safe-area-inset-left, 0px)); gap: 8px; flex-direction: column; }
  .btn-profiel.wide { width: var(--d); min-width: var(--d); padding: 0; border-radius: 50%; }
  .btn-profiel .lbl { display: none; }
  .btn-profiel img.ico { width: 34px; height: 34px; }
  .app.tekst-groot .bubble { font-size: 19px; }
  .app.tekst-groot .bubble.kort { font-size: 26px; }
  .app.tekst-groot .popup-text, .app.tekst-groot .papa-help, .app.tekst-groot .stats, .app.tekst-groot .starters, .app.tekst-groot .card-sub, .app.tekst-groot .av-quest, .app.tekst-groot .gate-text { font-size: 17px; }
  .app.tekst-groot .card-name, .app.tekst-groot .card-price, .app.tekst-groot .popup-title { font-size: 18px; }
  .app.tekst-groot .av-quest .kt, .app.tekst-groot .av-nacht, .app.tekst-groot .papa-panel h3 { font-size: 18px; }
}
