/* Rekenmaster – ontwerp: een archipel op zee. Rustige lagen, één speels signatuur: de eilandenkaart met de route. */
:root {
  --zee: #0e6ba8; --zee-diep: #08497a; --zee-licht: #4fc3f7; --lucht: #bfeaff;
  --zand: #ffe9b8; --papier: #fffdf7; --inkt: #1d2b53; --inkt-zacht: #4a5680; --lijn: rgba(29, 43, 83, .12);
  --koraal: #ff6b57; --koraal-donker: #d94c39; --zon: #ffc93c; --zon-donker: #d9a21b; --blad: #35b56a; --blad-donker: #268a4f;
  --fout: #e0523f; --goed: #2e9e6b;
  --radius: 22px; --radius-sm: 14px;
  --schaduw: 0 10px 30px rgba(8, 73, 122, .18);
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font-body); font-weight: 700; font-size: 17px; line-height: 1.45; color: var(--inkt);
  background: linear-gradient(180deg, #d8f3ff 0%, var(--lucht) 30%, var(--zee-licht) 70%, var(--zee) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .35em; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
a { color: var(--zee); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 4px solid var(--zon); outline-offset: 3px; border-radius: 8px; }
.hidden { display: none !important; }
.muted { color: var(--inkt-zacht); font-weight: 600; }
.small { font-size: .9rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.flex { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.right { margin-left: auto; }

/* Zee onderaan */
.golven { position: fixed; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; z-index: 0; overflow: hidden; }
.wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; animation: drift 14s linear infinite; }
.wave-2 { animation-duration: 22s; animation-direction: reverse; opacity: .8; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.fish-swim { position: absolute; bottom: 18px; width: 54px; height: 27px; opacity: .85; animation: swim 26s linear infinite; }
.fish-swim.f2 { bottom: 44px; width: 40px; animation-duration: 38s; animation-delay: -14s; }
@keyframes swim { 0% { left: -80px; transform: scaleX(1); } 49% { left: calc(100% + 40px); transform: scaleX(1); } 50% { left: calc(100% + 40px); transform: scaleX(-1); } 99% { left: -80px; transform: scaleX(-1); } 100% { left: -80px; transform: scaleX(1); } }

.boot { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--inkt); }
.boot-logo { font-size: 64px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }

/* ---------- Schil ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 253, 247, .92); backdrop-filter: blur(10px); border-bottom: 2px solid rgba(29, 43, 83, .08); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--inkt); font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.brand span { font-size: 1.5rem; }
.nav { display: none; gap: 4px; margin-left: 10px; }
.nav a { text-decoration: none; color: var(--inkt-zacht); padding: 8px 12px; border-radius: 12px; font-weight: 800; }
.nav a:hover { background: rgba(14, 107, 168, .08); color: var(--inkt); }
.nav a.active { background: var(--inkt); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--zand); font-weight: 800; white-space: nowrap; }
.chip.points { background: linear-gradient(180deg, #fff2c2, #ffd970); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08); }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--lijn); background: #fff; border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 800; }
.avatar-btn .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lucht); font-size: 20px; }
.menu { position: absolute; right: 16px; top: calc(100% + 6px); background: var(--papier); border-radius: 16px; box-shadow: var(--schaduw); padding: 8px; min-width: 240px; display: flex; flex-direction: column; border: 2px solid var(--lijn); }
.menu button, .menu a { text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--inkt); font-weight: 700; display: flex; gap: 10px; align-items: center; }
.menu button:hover, .menu a:hover { background: rgba(14, 107, 168, .08); }
.menu hr { border: 0; border-top: 2px solid var(--lijn); margin: 6px 4px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--papier); border-top: 2px solid var(--lijn); display: flex; box-shadow: 0 -6px 20px rgba(8, 73, 122, .12); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--inkt-zacht); font-size: .72rem; font-weight: 800; position: relative; }
.tabbar a .ico { font-size: 22px; line-height: 1; }
.tabbar a.active { color: var(--zee); }
.tabbar a.active .ico { transform: translateY(-2px) scale(1.12); }
.badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--koraal); color: #fff; border-radius: 999px; font-size: .68rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.badge.inline { position: static; display: inline-grid; margin-left: 6px; }

main.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px 16px 120px; }
.has-tabbar main.view { padding-bottom: calc(var(--tabbar-h) + 60px); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  .has-tabbar main.view { padding-bottom: 120px; }
  main.view { padding: 28px 24px 140px; }
}

/* ---------- Kaarten & knoppen ---------- */
.card { background: var(--papier); border-radius: var(--radius); box-shadow: var(--schaduw); border: 2px solid rgba(255, 255, 255, .7); }
.card-pad { padding: 22px; }
.card.soft { box-shadow: 0 4px 14px rgba(8, 73, 122, .1); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; padding: 12px 20px; min-height: 50px; border-radius: 16px;
  background: var(--koraal); color: #fff; box-shadow: 0 5px 0 var(--koraal-donker); transition: transform .08s, box-shadow .08s, filter .15s; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--koraal-donker); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.sun { background: var(--zon); color: var(--inkt); box-shadow: 0 5px 0 var(--zon-donker); }
.btn.sun:active { box-shadow: 0 1px 0 var(--zon-donker); }
.btn.sea { background: var(--zee); box-shadow: 0 5px 0 var(--zee-diep); }
.btn.sea:active { box-shadow: 0 1px 0 var(--zee-diep); }
.btn.leaf { background: var(--blad); box-shadow: 0 5px 0 var(--blad-donker); }
.btn.leaf:active { box-shadow: 0 1px 0 var(--blad-donker); }
.btn.ghost { background: #fff; color: var(--inkt); box-shadow: 0 5px 0 rgba(29, 43, 83, .18); border: 2px solid var(--lijn); }
.btn.ghost:active { box-shadow: 0 1px 0 rgba(29, 43, 83, .18); }
.btn.danger { background: var(--fout); box-shadow: 0 5px 0 #a8341f; }
.btn.lg { font-size: 1.25rem; padding: 16px 28px; min-height: 60px; border-radius: 20px; }
.btn.sm { font-size: .95rem; padding: 8px 14px; min-height: 40px; border-radius: 12px; box-shadow: 0 3px 0 var(--koraal-donker); }
.btn.sm.ghost { box-shadow: 0 3px 0 rgba(29, 43, 83, .18); }
.btn.sm.sea { box-shadow: 0 3px 0 var(--zee-diep); }
.btn.sm.sun { box-shadow: 0 3px 0 var(--zon-donker); }
.btn.sm.leaf { box-shadow: 0 3px 0 var(--blad-donker); }
.btn.sm.danger { box-shadow: 0 3px 0 #a8341f; }
.btn.block { width: 100%; }
.btn.link { background: none; box-shadow: none; color: var(--zee); text-decoration: underline; padding: 6px 8px; min-height: 0; font-family: var(--font-body); font-weight: 800; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 800; font-size: .95rem; }
.field .help { font-size: .85rem; color: var(--inkt-zacht); font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(29, 43, 83, .18); background: #fff; min-height: 50px; font-weight: 700;
}
input:focus, select:focus, textarea:focus { border-color: var(--zee); outline: none; box-shadow: 0 0 0 4px rgba(79, 195, 247, .35); }
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.form-error { background: #ffe5e0; color: #8a2417; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 700; }
.form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.check input { width: 22px; height: 22px; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-pick button { width: 48px; height: 48px; border-radius: 14px; border: 3px solid transparent; background: #fff; font-size: 26px; cursor: pointer; box-shadow: 0 2px 0 var(--lijn); }
.avatar-pick button.on { border-color: var(--koraal); transform: scale(1.08); }
.tabs { display: flex; gap: 6px; background: rgba(29, 43, 83, .06); padding: 5px; border-radius: 16px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 12px; padding: 10px; font-weight: 800; cursor: pointer; color: var(--inkt-zacht); }
.tabs button.on { background: #fff; color: var(--inkt); box-shadow: 0 2px 8px rgba(8, 73, 122, .15); }

/* ---------- Welkom & inloggen ---------- */
.hero { text-align: center; padding: 30px 8px 10px; }
.hero-logo { font-size: 74px; line-height: 1; animation: bob 3s ease-in-out infinite; display: inline-block; }
.hero-scene { width: 100%; max-width: 1000px; height: auto; display: block; margin: 0 auto 10px; filter: drop-shadow(0 14px 22px rgba(8, 73, 122, .28)); }
.hero-scene .drift { animation: drift-cloud linear infinite; transform-box: fill-box; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); color: var(--inkt); margin: 8px 0 4px; }
.hero h1 em { font-style: normal; color: var(--koraal); }
.hero-sub { font-size: 1.15rem; color: var(--inkt-zacht); max-width: 560px; margin: 0 auto 22px; }
.archipel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 10px; max-width: 980px; margin: 4px auto 22px; }
.archipel a { text-decoration: none; color: var(--inkt); text-align: center; font-weight: 800; font-size: .92rem; transition: transform .15s; }
.archipel a:hover { transform: translateY(-4px); }
.archipel .isle { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 10px rgba(8, 73, 122, .18)); }
.archipel span { display: inline-block; background: rgba(255, 253, 247, .85); border-radius: 999px; padding: 3px 10px; margin-top: -8px; }
.isle { display: block; }
.auth-card { max-width: 520px; margin: 0 auto; }
.account-types { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 20px; }
.account-type { background: rgba(255, 255, 255, .75); border-radius: 18px; padding: 16px; text-align: left; }
.account-type strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-pad button { min-height: 62px; font-size: 1.5rem; border-radius: 16px; border: 2px solid var(--lijn); background: #fff; cursor: pointer; font-family: var(--font-display); box-shadow: 0 4px 0 var(--lijn); }
.pin-pad button:active { transform: translateY(3px); box-shadow: none; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--inkt); }
.pin-dots span.on { background: var(--inkt); }

/* ---------- Profielen ---------- */
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.profile { border: 0; background: linear-gradient(180deg, var(--papier) 0 58%, var(--zand) 58% 100%); border-radius: 24px; padding: 20px 12px; cursor: pointer; box-shadow: var(--schaduw); text-align: center; transition: transform .12s; position: relative; overflow: hidden; }
.profile::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: -6px; height: 18px; background: radial-gradient(circle at 10px 12px, rgba(79, 195, 247, .55) 10px, transparent 11px) 0 0 / 20px 18px repeat-x; }
.profile:hover { transform: translateY(-4px); }
.profile .av { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.profile strong { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.profile.parent .av { font-size: 44px; }

/* ---------- Home / kaart ---------- */
.player-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.player-head .av { width: 64px; height: 64px; border-radius: 22px; background: var(--papier); display: grid; place-items: center; font-size: 38px; box-shadow: var(--schaduw); }
.player-head h1 { margin: 0; }
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.goal { background: var(--papier); border-radius: 16px; padding: 12px 14px; box-shadow: 0 4px 14px rgba(8, 73, 122, .1); }
.goal .flex { margin-bottom: 6px; }
.bar { height: 14px; border-radius: 999px; background: rgba(29, 43, 83, .1); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--zee-licht), var(--zee)); transition: width .6s ease; }
.bar.done > i { background: linear-gradient(90deg, #7be29a, var(--blad)); }
.islands { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.island-card { position: relative; text-decoration: none; color: var(--inkt); transition: transform .2s; display: flex; flex-direction: column; }
.island-card:hover { transform: translateY(-6px); }
.island-card .isle { width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(8, 73, 122, .22)); animation: float 5s ease-in-out infinite; }
.island-card:nth-child(2n) .isle { animation-delay: -1.7s; }
.island-card:nth-child(3n) .isle { animation-delay: -3.1s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.island-card .plate { background: var(--papier); border-radius: 18px; padding: 12px 14px 12px; margin-top: -14px; box-shadow: 0 6px 16px rgba(8, 73, 122, .16); border-top: 5px solid var(--c); }
.island-card h3 { margin-bottom: 2px; font-size: 1.15rem; }
.island-card .desc { font-size: .85rem; color: var(--inkt-zacht); margin: 0 0 8px; line-height: 1.3; }
.island-card .bar > i { background: var(--c); }
.island-card .meta { display: flex; justify-content: space-between; font-size: .82rem; margin-top: 6px; }
.island-card.done .plate { border-top-color: var(--zon); }
.quick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 22px; }
.quick a { text-decoration: none; color: var(--inkt); background: var(--papier); border-radius: 18px; padding: 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 14px rgba(8, 73, 122, .12); font-weight: 800; }
.quick a .ico { font-size: 28px; }
.quick a small { display: block; color: var(--inkt-zacht); font-weight: 600; }
.announce { background: var(--zand); border-radius: 16px; padding: 12px 16px; margin-bottom: 18px; }

/* ---------- Eiland met route (signatuur) ---------- */
.island-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 20px; border-radius: 24px; background: var(--papier); box-shadow: var(--schaduw); border-left: 10px solid var(--c); margin-bottom: 18px; }
.island-hero .emoji { font-size: 54px; }
.island-hero .isle { width: 150px; height: auto; flex-shrink: 0; filter: drop-shadow(0 6px 8px rgba(8, 73, 122, .2)); }
.island-hero .banner { width: min(100%, 420px); height: auto; display: block; margin: -6px 0 2px -12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.island-hero h1 { margin: 0; }
.island-hero .tip { background: rgba(255, 201, 60, .25); border-radius: 12px; padding: 8px 12px; font-size: .95rem; }
.path { position: relative; margin: 0 auto; max-width: 720px; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 16px 20px rgba(8, 73, 122, .2)); }
.node { position: absolute; transform: translate(-50%, -50%); width: 100px; text-align: center; border: 0; background: none; cursor: pointer; padding: 0; }
.node .disc { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; background: #9aa5b8; box-shadow: 0 6px 0 rgba(0, 0, 0, .18), 0 8px 18px rgba(8, 73, 122, .22); transition: transform .12s; border: 5px solid #fff; }
.node .disc svg { width: 46px; height: 46px; }
.node:hover .disc { transform: scale(1.07); }
.node.open .disc { background: #fff; color: var(--c); border-color: var(--c); }
.node.done .disc { background: var(--c); }
.node.current .disc { background: var(--koraal); border-color: #fff; animation: buoy 2.2s ease-in-out infinite; }
.node.locked { cursor: not-allowed; }
.node.locked .disc { background: #b7bfcf; color: rgba(255, 255, 255, .85); font-size: 1.3rem; }
.node .lbl { display: block; margin-top: 6px; font-size: .78rem; font-weight: 800; line-height: 1.15; color: var(--inkt); background: rgba(255, 253, 247, .9); border-radius: 8px; padding: 2px 5px; }
.node .st { display: block; font-size: .85rem; letter-spacing: 1px; }
.node .who { position: absolute; left: 50%; top: -70px; width: 84px; transform: translateX(-50%); animation: bob 2s ease-in-out infinite; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
.node .who svg { width: 100%; height: auto; }
@keyframes buoy { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
.stars { color: var(--zon); letter-spacing: 1px; }
.stars .off { color: rgba(29, 43, 83, .18); }

/* ---------- Wereldkaart & lucht ---------- */
.world-wrap { margin: 0 -6px; }
.world { width: 100%; height: auto; display: block; filter: drop-shadow(0 16px 24px rgba(8, 73, 122, .28)); }
.world a.island-card { cursor: pointer; }
.world a.island-card:hover rect:first-of-type { stroke-width: 5; }
.isle-float { animation: float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.boat-bob { animation: buoy 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sun-rays { animation: spin 40s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.sky { position: fixed; top: 0; left: 0; width: 100%; height: 300px; z-index: 0; pointer-events: none; }
.sky .drift { animation: drift-cloud linear infinite; transform-box: fill-box; }
@keyframes drift-cloud { from { transform: translateX(-30%); } to { transform: translateX(110%); } }
.hero-mascot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px auto 16px; max-width: 520px; }
.hero-mascot svg { width: 96px; height: auto; flex-shrink: 0; animation: bob 3s ease-in-out infinite; }
.hero-mascot .bubble { background: var(--papier); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font-weight: 800; box-shadow: 0 6px 16px rgba(8, 73, 122, .15); text-align: left; }
@media (prefers-reduced-motion: reduce) { .isle-float, .boat-bob, .sun-rays, .sky .drift { animation: none !important; } }

/* ---------- Spelen ---------- */
.play { max-width: 760px; margin: 0 auto; }
.play-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.play-top .counter { font-family: var(--font-display); font-size: 1.1rem; }
.timer { position: relative; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .6); margin: 8px 0 22px; }
.timer > i { overflow: hidden; }
.timer-boat { position: absolute; top: -18px; left: 100%; transform: translateX(-50%); font-size: 24px; line-height: 1; transition: left .25s linear; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.timer > i { display: block; height: 100%; background: var(--blad); border-radius: 999px; transition: width .25s linear, background .3s; }
.timer > i.warn { background: var(--zon); }
.timer > i.late { background: var(--koraal); }
.q-card { position: relative; background: var(--papier); border-radius: 28px; box-shadow: var(--schaduw); padding: 30px 20px 22px; text-align: center; min-height: 300px; display: flex; flex-direction: column; justify-content: center; border-top: 10px solid var(--c, var(--zee)); overflow: hidden; }
.q-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 18px, transparent 18px 36px); opacity: .7; }
.start-art { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: -10px 0 4px; }
.start-art .isle { width: 220px; height: auto; }
.start-art .crab { width: 90px; height: 90px; margin-left: -50px; animation: bob 3s ease-in-out infinite; }
.crab { width: 54px; height: 54px; vertical-align: middle; flex-shrink: 0; }
.feedback { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.feedback:empty { display: block; }
.crab.jump { animation: jump .6s ease-out; }
.crab.wobble { animation: wobble .6s ease-in-out; }
@keyframes jump { 0% { transform: translateY(0); } 40% { transform: translateY(-16px) rotate(-6deg); } 70% { transform: translateY(0); } 85% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.result-art { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-bottom: 4px; }
.result-chest { width: 120px; height: auto; animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
.result-art .crab { width: 80px; height: 80px; }
.game-icon { width: 92px; height: 92px; margin: 0 auto 4px; filter: drop-shadow(0 6px 8px rgba(8, 73, 122, .18)); }
.q-visual { margin-bottom: 12px; }
.visual-clock, .visual-pie { width: 160px; height: 160px; }
.visual-rect { width: 220px; }
.visual-coins { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.visual-coins .coin { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff1a8, #e0a800); border: 3px solid #b17f00; font-family: var(--font-display); font-weight: 700; }
.visual-coins .bill { padding: 14px 16px; border-radius: 8px; background: linear-gradient(135deg, #cfe8ff, #7cb8ff); border: 3px solid #3a6fb0; font-family: var(--font-display); font-weight: 700; }
.visual-count { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 34px; max-width: 420px; margin: 0 auto; }
.q-text { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 8vw, 3.6rem); line-height: 1.15; margin: 4px 0 6px; overflow-wrap: anywhere; }
.q-text.long { font-size: clamp(1.25rem, 4.2vw, 1.8rem); font-family: var(--font-body); font-weight: 800; line-height: 1.4; }
.q-sub { color: var(--inkt-zacht); margin-bottom: 10px; }
.answer-row { display: flex; gap: 10px; max-width: 420px; margin: 8px auto 0; }
.answer-row input { text-align: center; font-family: var(--font-display); font-size: 1.9rem; min-height: 64px; border-radius: 18px; border-width: 3px; }
.answer-row .btn { min-height: 64px; border-radius: 18px; }
.choices { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); max-width: 520px; margin: 10px auto 0; }
.choices .btn { min-height: 66px; font-size: 1.2rem; background: #fff; color: var(--inkt); border: 3px solid var(--lijn); box-shadow: 0 5px 0 rgba(29, 43, 83, .15); white-space: normal; }
.choices .btn.right { background: #d9f7e6; border-color: var(--goed); }
.choices .btn.wrongpick { background: #ffe5e0; border-color: var(--fout); }
.feedback { min-height: 58px; margin-top: 14px; font-family: var(--font-display); font-size: 1.35rem; }
.feedback.ok { color: var(--goed); }
.feedback.no { color: var(--fout); }
.feedback small { display: block; font-family: var(--font-body); font-size: .95rem; color: var(--inkt-zacht); font-weight: 700; }
.q-dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.q-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(29, 43, 83, .15); }
.q-dots i.good { background: var(--goed); }
.q-dots i.bad { background: var(--fout); }
.q-dots i.now { background: var(--zee); transform: scale(1.3); }
.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.result { text-align: center; max-width: 620px; margin: 0 auto; }
.stars-big { font-size: 64px; letter-spacing: 6px; margin: 4px 0 10px; }
.stars-big span { display: inline-block; animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.stars-big span:nth-child(2) { animation-delay: .15s; }
.stars-big span:nth-child(3) { animation-delay: .3s; }
.stars-big .off { color: rgba(29, 43, 83, .18); }
.points-list { list-style: none; padding: 0; margin: 14px auto; max-width: 380px; text-align: left; }
.points-list li { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 2px dashed var(--lijn); }
.points-list li.total { font-family: var(--font-display); font-size: 1.25rem; border: 0; }

/* ---------- Winkel, uitdagingen, foutenlijst ---------- */
.shop-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.shop-item { background: var(--papier); border-radius: 22px; padding: 18px; box-shadow: var(--schaduw); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.shop-item .emoji { font-size: 48px; }
.shop-item .cost { font-family: var(--font-display); font-size: 1.3rem; }
.shop-item .desc { font-size: .9rem; color: var(--inkt-zacht); flex: 1; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { background: var(--papier); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 4px 14px rgba(8, 73, 122, .1); flex-wrap: wrap; }
.list-item .big { font-size: 30px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: rgba(29, 43, 83, .08); }
.pill.pending { background: #fff2c2; }
.pill.delivered, .pill.won { background: #d9f7e6; color: var(--blad-donker); }
.pill.rejected, .pill.lost { background: #ffe5e0; color: #8a2417; }
.vs { font-family: var(--font-display); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.vs .who { font-size: 1.05rem; }
.vs .who .av { font-size: 34px; display: block; }
.vs .mid { color: var(--koraal); font-size: 1.4rem; }
.code { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 4px; background: var(--zand); padding: 6px 14px; border-radius: 12px; display: inline-block; }
.mistake { background: var(--papier); border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.mistake .q { font-family: var(--font-display); font-size: 1.15rem; flex: 1; }

/* ---------- Minigames ---------- */
.games-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.game-card { background: var(--papier); border-radius: 24px; padding: 20px; box-shadow: var(--schaduw); display: flex; flex-direction: column; gap: 8px; }
.game-card .emoji { font-size: 48px; }
.stage { position: relative; background: linear-gradient(180deg, #0b1a3a, #1b3a72); border-radius: 26px; height: 420px; overflow: hidden; box-shadow: var(--schaduw); }
.stage.sky { background: linear-gradient(180deg, #7fd0ff, #d6f0ff); }
.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; justify-content: space-between; z-index: 2; }
.hud span { background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 6px 12px; font-weight: 800; }
.rocket { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); font-size: 58px; transition: bottom .4s ease-out; filter: drop-shadow(0 0 12px rgba(255, 200, 80, .7)); }
.star-bg { position: absolute; color: #fff; opacity: .6; animation: twinkle 2s infinite alternate; }
@keyframes twinkle { from { opacity: .2; } to { opacity: .9; } }
.stage-q { position: absolute; left: 0; right: 0; top: 60px; text-align: center; color: #fff; font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3.2rem); text-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.stage.sky .stage-q { color: var(--inkt); text-shadow: none; }
.stage-input { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 10px; padding: 0 16px; }
.stage-input input { max-width: 220px; text-align: center; font-family: var(--font-display); font-size: 1.7rem; min-height: 60px; border-radius: 16px; }
.balloon { position: absolute; bottom: -120px; width: 92px; height: 112px; border-radius: 50% 50% 48% 48%; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-size: 1.6rem; border: 0; cursor: pointer; box-shadow: inset -10px -12px 0 rgba(0, 0, 0, .12); animation: rise linear forwards; }
.balloon::after { content: ''; position: absolute; bottom: -22px; left: 50%; width: 3px; height: 24px; background: rgba(0, 0, 0, .3); }
@keyframes rise { to { transform: translateY(-560px); } }
.balloon.pop { animation: burst .35s forwards; }
@keyframes burst { to { transform: scale(1.6); opacity: 0; } }
.memory-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); max-width: 520px; margin: 0 auto; }
.mem-card { aspect-ratio: 1; border: 0; border-radius: 16px; background: var(--zee); color: #fff; font-family: var(--font-display); font-size: clamp(1rem, 4vw, 1.5rem); cursor: pointer; box-shadow: 0 4px 0 var(--zee-diep); transition: transform .2s; }
.mem-card.open { background: var(--papier); color: var(--inkt); box-shadow: 0 4px 0 var(--lijn); }
.mem-card.found { background: var(--blad); color: #fff; box-shadow: 0 4px 0 var(--blad-donker); cursor: default; }
.mem-card:disabled { opacity: 1; }

/* ---------- Ouder / beheer ---------- */
.panel { display: grid; gap: 18px; }
@media (min-width: 900px) { .panel { grid-template-columns: 230px 1fr; align-items: start; } }
.side-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.side-tabs a { text-decoration: none; color: var(--inkt); background: rgba(255, 255, 255, .7); padding: 10px 14px; border-radius: 14px; white-space: nowrap; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.side-tabs a.active { background: var(--inkt); color: #fff; }
@media (min-width: 900px) { .side-tabs { flex-direction: column; position: sticky; top: 80px; } }
.stat { background: var(--papier); border-radius: 18px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(8, 73, 122, .1); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.8rem; }
.stat span { color: var(--inkt-zacht); font-size: .85rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--lijn); vertical-align: middle; }
.table th { font-size: .82rem; color: var(--inkt-zacht); text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.kid-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.kid-row .av { font-size: 40px; }
.island-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.island-mini span { font-size: .78rem; background: rgba(29, 43, 83, .06); border-radius: 999px; padding: 3px 9px; }
details { background: rgba(255, 255, 255, .6); border-radius: 14px; padding: 8px 14px; }
details summary { cursor: pointer; font-weight: 800; }

/* ---------- Toasts & modals ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 860px) { #toasts { bottom: 24px; } }
.toast { background: var(--inkt); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--schaduw); font-weight: 700; animation: pop .3s; }
.toast.ok { background: var(--blad); }
.toast.err { background: var(--fout); }
.overlay { position: fixed; inset: 0; background: rgba(8, 40, 70, .55); z-index: 90; display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: var(--papier); border-radius: 26px; width: min(100%, 520px); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: var(--schaduw); animation: pop .25s; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 95; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }
.empty { text-align: center; padding: 30px 16px; color: var(--inkt-zacht); }
.empty .ico { font-size: 44px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
@media (max-width: 480px) {
  .card-pad { padding: 16px; }
  .start-art .isle { width: 160px; }
  .start-art .crab { width: 70px; height: 70px; margin-left: -36px; }
  .crab { width: 44px; height: 44px; }
  .result-chest { width: 90px; }
  .hero-scene { border-radius: 18px; }
  .hero-mascot .bubble { font-size: .9rem; }
  .archipel { grid-template-columns: repeat(3, 1fr); gap: 2px 6px; }
  .archipel a { font-size: .72rem; }
  .islands { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .island-card .desc { display: none; }
  .island-hero .isle { width: 110px; }
  .choices { grid-template-columns: 1fr 1fr; }
  .visual-clock, .visual-pie { width: 130px; height: 130px; }
  .btn.lg { font-size: 1.1rem; }
}

/* ---------- Advertenties, cookiebanner, voettekst ---------- */
.ad-box { margin: 28px auto 0; max-width: 760px; background: rgba(255, 253, 247, .7); border-radius: 18px; padding: 10px 12px 12px; text-align: center; border: 2px dashed rgba(29, 43, 83, .12); }
.ad-box .ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--inkt-zacht); margin-bottom: 6px; }
.ad-box .ad-inner { min-height: 90px; display: flex; justify-content: center; align-items: center; }
.ad-box .ad-inner img { max-width: 100%; height: auto; border-radius: 10px; }
.ad-box.ad-waiting .ad-inner { min-height: 0; }
.ad-box:has(.ad-inner:empty) { display: none; }
.cookie-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 12px); z-index: 80; width: min(94vw, 560px); background: var(--papier); border-radius: 20px; box-shadow: var(--schaduw); padding: 16px 18px; border: 2px solid var(--lijn); }
.cookie-banner p { font-size: .95rem; margin-bottom: 12px; }
@media (min-width: 860px) { .cookie-banner { bottom: 20px; } }
.footer { text-align: center; padding: 10px 16px 30px; font-size: .8rem; color: rgba(29, 43, 83, .75); position: relative; z-index: 1; }
.has-tabbar .footer { padding-bottom: calc(var(--tabbar-h) + 20px); }
.footer a { color: inherit; }
