/* =========================================================
   Kesley's Eenhoornland 2 — vrolijk, zacht en groot voor kleine vingers
   ========================================================= */
@font-face { font-family: "Baloo 2"; src: url("fonts/baloo2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --ink: #5b3a8c;
  --ink2: #8c6bbb;
  --hud: clamp(66px, 11vmin, 100px);
  --hot: clamp(66px, 11.2vmin, 104px);
  --rb: linear-gradient(90deg, #ff5fa2, #ff9f43, #ffd93d, #4cd97b, #45b7ff, #a77bff);
  --pop: cubic-bezier(.3, 1.6, .5, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: #bfe6ff; }
body {
  position: fixed; inset: 0;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  font-family: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 600; color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
img { pointer-events: none; -webkit-user-drag: none; user-select: none; }
svg { display: block; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none;
}
input { font: inherit; touch-action: manipulation; -webkit-user-select: text; user-select: text; }
#app { position: absolute; inset: 0; overflow: hidden; }
.scroll { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.side, .panel.set { overscroll-behavior: contain; }

/* ---------- De wereld ---------- */
#scene { position: absolute; inset: 0; overflow: hidden; }
#sky { position: absolute; inset: 0; background: linear-gradient(180deg, #7fcbff 0%, #ade0ff 20%, #dff1ff 32%, #ffe4f3 44%, #fff2df 56%); transition: background .6s; }
#scene[data-world="bos"] #sky { background: linear-gradient(180deg, #8fd3ff 0%, #b9e6e6 22%, #def5dc 36%, #f0fbe6 50%); }
#scene[data-world="strand"] #sky { background: linear-gradient(180deg, #4fc0ff 0%, #9fe0ff 26%, #e2f7ff 36%, #fff6d9 48%); }
#scene[data-world="sneeuw"] #sky { background: linear-gradient(180deg, #9db6ff 0%, #c7d4ff 24%, #eaeeff 38%, #ffffff 52%); }
#rainbow { position: absolute; right: -9%; width: 66%; top: calc(var(--hud) + 4%); opacity: .5; z-index: 1; pointer-events: none; }
#scene:not([data-world="wei"]) #rainbow { display: none; }
#sun { position: absolute; left: 3vmin; top: calc(var(--hud) + 1vmin); width: 16vmin; height: 16vmin; z-index: 2; }
#sun .rays {
  position: absolute; inset: -42%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 214, 80, .6) 0 9deg, rgba(255, 214, 80, 0) 9deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 40%, transparent 100%); mask: radial-gradient(closest-side, #000 40%, transparent 100%);
  animation: spin 40s linear infinite;
}
#sun img { position: relative; width: 100%; height: 100%; }
#scene[data-world="sneeuw"] #sun { filter: saturate(.6) brightness(1.1); }
.cloud { position: absolute; left: 0; top: calc(var(--hud) + var(--top)); width: 20vmin; z-index: 3; animation: drift linear infinite; }
.cloud img { width: 100%; display: block; }
.layer { position: absolute; left: 0; will-change: transform; }
#far { z-index: 4; } #mid { z-index: 5; }
#far svg, #mid svg, #gsvg svg { display: block; }
#ground { position: absolute; left: 0; top: 0; height: 100%; z-index: 6; will-change: transform; }
#gsvg { position: absolute; left: 0; }
#objs { position: absolute; inset: 0; }
#snow { position: absolute; inset: 0; z-index: 40; pointer-events: none; display: none; }
#scene[data-world="sneeuw"] #snow { display: block; }
#snow i { position: absolute; top: -3%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(150, 180, 255, .8); animation: snowfall linear infinite; }
#bflies { position: absolute; inset: 0; z-index: 41; pointer-events: none; }
.bfly { position: absolute; left: 0; top: 0; width: 8vmin; height: 8vmin; pointer-events: none; transition: transform 4.5s ease-in-out; }
.bfly img { width: 100%; height: 100%; animation: flapB .22s ease-in-out infinite alternate; }
.wave { animation: waveMove 5s ease-in-out infinite alternate; }
.foam { animation: foamMove 3.4s ease-in-out infinite alternate; }

/* Dingen in de wereld */
.wobj { position: absolute; transform: translate(-50%, -100%); }
.deco img, .bld > img { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; }
.wobj.deco, .wobj.bld { transition: opacity .35s; }
.wobj.see-through { opacity: .42; }
body:not(.building) .wobj.see-through { pointer-events: none; }
.deco.frost img { filter: saturate(.5) brightness(1.18) hue-rotate(-10deg); }
.place { display: block; }
.place > svg, .place > img { width: 100%; height: 100%; display: block; transform-origin: 50% 100%; }
.place .ripe { position: absolute; inset: 0; pointer-events: none; }
.place .ripe img, .bld .ripe img { position: absolute; width: 22%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); animation: ripeBob 1.6s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.bld .ripe { position: absolute; inset: 0; pointer-events: none; }
.place.bush .ripe img { width: 20%; }
.place.hive .ripe img { width: 36%; }
.place .ripe img.bee { width: 22%; animation: beeFly 2.6s linear infinite; }
.place.tree .ripe img { width: 20%; }
.place.garden { }
.place.garden .soilbed { position: absolute; left: 4%; right: 4%; bottom: 9%; height: 50%; border-radius: 46% 46% 16% 16% / 60% 60% 18% 18%; background: repeating-linear-gradient(90deg, rgba(60, 30, 10, .16) 0 3%, rgba(0, 0, 0, 0) 3% 12.5%), linear-gradient(#b98250, #7d5230); box-shadow: inset 0 .8vmin 0 rgba(255, 255, 255, .14), 0 .5vmin 0 rgba(60, 40, 20, .25); }
.place.garden .beds { position: absolute; left: 8%; right: 8%; bottom: 20%; height: 74%; display: flex; flex-wrap: wrap-reverse; align-content: flex-start; }
.place.garden .bed { position: relative; width: 25%; height: 48%; display: flex; align-items: flex-end; justify-content: center; }
.place.garden .bed.empty::after { content: ""; width: 56%; height: 20%; margin-bottom: 8%; border-radius: 50%; background: #6b4425; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12); }
.place.garden .bed img { width: 86%; height: 86%; object-fit: contain; transform-origin: 50% 95%; }
.place.garden .bed img.wd { position: absolute; right: 0; top: 0; width: 38%; height: 38%; animation: dropBob 1s ease-in-out infinite; }
.place.garden .fence { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; display: flex; }
.place.garden .fence svg { flex: 1; height: 100%; }

/* Dieren en de eenhoorn */
.cr { touch-action: none; }
.cr.uni { pointer-events: none; }
.cr.uni .unisvg path, .cr.uni .unisvg ellipse, .cr.uni .unisvg circle, .cr.uni .unisvg rect, .cr.uni .unisvg image, .cr.uni .need { pointer-events: auto; }
.cr .jump { position: absolute; inset: 0; transform-origin: 50% 100%; }
.cr .body { position: absolute; inset: 0; transform-origin: 50% 100%; animation: bob 2.8s ease-in-out infinite; transition: filter .6s; }
.cr .body > img, .cr .body > svg { width: 100%; height: 100%; display: block; }
.cr.walking .body { animation: walkbob .42s ease-in-out infinite; }
.cr.float .body { animation: floaty 3.4s ease-in-out infinite; }
.cr.sea .body { animation: swim 3s ease-in-out infinite; }
.cr.ani .shadow { position: absolute; left: 14%; right: 14%; bottom: -5%; height: 13%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 110, 40, .33), rgba(40, 110, 40, 0)); }
.cr.sad .body { filter: grayscale(.65) brightness(.96); animation-duration: 4.5s; }
.cr .rain { position: absolute; left: 10%; right: 10%; top: -34%; height: 40%; pointer-events: none; }
.cr .rain img { width: 100%; height: 100%; object-fit: contain; animation: rainBob 2s ease-in-out infinite; }
.cr.uni .rain { left: 55%; right: -5%; top: -20%; }
.cr.dirty .body::after {
  content: ""; position: absolute; inset: 16% 14% 8%;
  background:
    radial-gradient(circle at 28% 44%, #8a5a2e 0 9%, transparent 10%),
    radial-gradient(circle at 66% 62%, #7d4f25 0 12%, transparent 13%),
    radial-gradient(circle at 46% 80%, #8a5a2e 0 8%, transparent 9%),
    radial-gradient(circle at 74% 30%, #7d4f25 0 6%, transparent 7%);
  opacity: .9;
}
.need {
  position: absolute; right: -30%; top: -34%; width: 56%; min-width: 46px; aspect-ratio: 1; border-radius: 50%;
  background: #fff; display: none; place-items: center; z-index: 2;
  box-shadow: 0 .6vmin 0 rgba(150, 105, 210, .35), 0 .8vmin 2vmin rgba(90, 50, 150, .18);
}
.need::after { content: ""; position: absolute; left: 14%; bottom: -4%; width: 22%; height: 22%; background: #fff; border-radius: 0 0 0 100%; transform: rotate(-12deg); }
.need.on { display: grid; animation: popIn .5s var(--pop) both, wobble 1.6s ease-in-out .5s infinite; }
.need img { width: 70%; height: 70%; position: relative; z-index: 1; }
.need .cnt { position: absolute; right: -10%; top: -10%; min-width: 44%; height: 44%; border-radius: 999px; background: #ff4f8a; color: #fff; display: grid; place-items: center; font-size: clamp(12px, 2.2vmin, 20px); font-weight: 800; z-index: 2; border: 2px solid #fff; padding: 0 .2em; }
.cr.sad .need { background: #ffe1ea; }
.cr.uni .need { right: auto; left: 70%; top: -6%; width: 30%; }
.cr.uni.flip .need { left: 0; }
.cr.float .need { top: -8%; right: -24%; width: 46%; }
.unisvg { overflow: visible; }
.unisvg .eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s infinite; }
.unisvg .happyeye, .unisvg .sleepeye, .unisvg .brow, .unisvg .sadmouth { display: none; }
.unisvg.happy .eye, .unisvg.sleepy .eye, .unisvg.happy .lash { display: none; }
.unisvg.happy .happyeye, .unisvg.sleepy .sleepeye { display: inline; }
.unisvg.sad .brow, .unisvg.sad .sadmouth { display: inline; }
.unisvg.sad .mouth { display: none; }
.unisvg .tail { transform-box: fill-box; transform-origin: 92% 12%; animation: swish 2.6s ease-in-out infinite; }
.unisvg .wing { transform-box: fill-box; transform-origin: 96% 96%; animation: flap 1.5s ease-in-out infinite; }
.unisvg .wing.far { animation-delay: -.2s; }
.unisvg.glow .horn { animation: hornGlow 2s ease-in-out infinite; }
.flipx { transform: scaleX(-1); }

.drop { z-index: 2; }
.drop img { width: 100%; height: 100%; animation: dropBob 1.2s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(120, 220, 255, .9)); }
.dig svg { width: 100%; height: 100%; }
.dig { animation: digPulse 1.4s ease-in-out infinite; }
.bld .del { display: none; position: absolute; right: -6%; top: -6%; width: clamp(36px, 6vmin, 52px); height: clamp(36px, 6vmin, 52px); border-radius: 50%; background: #ff5c8a; color: #fff; font-weight: 800; font-size: clamp(18px, 3vmin, 26px); box-shadow: 0 3px 0 #c93a66; z-index: 3; }
body.building .bld .del { display: grid; place-items: center; }
body.building .bld { outline: 3px dashed rgba(255, 255, 255, .8); outline-offset: 4px; border-radius: 12px; }
.bld.moving { filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .3)); }
.bld.t-hek svg { width: 100%; height: 100%; }

#nest .glowball { position: absolute; left: -20%; right: -20%; top: -10%; bottom: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 220, 245, .55) 45%, rgba(255, 220, 245, 0)); animation: pulse 1.6s ease-in-out infinite; }
#nest svg { position: relative; width: 100%; height: 100%; overflow: visible; }
#nest .shell { transform-box: fill-box; transform-origin: 50% 92%; animation: eggIdle 3.2s ease-in-out infinite; }
#nest .egg-top { transform-box: fill-box; transform-origin: 50% 100%; }
#nest .crack, #nest .crack2 { transition: stroke-dashoffset .3s ease-out, opacity .3s; }

/* Pijltjes aan de rand */
#edges { position: absolute; inset: 0; z-index: 42; pointer-events: none; }
.edge { position: absolute; width: clamp(58px, 9vmin, 84px); height: clamp(58px, 9vmin, 84px); border-radius: 50%; background: #fff; box-shadow: 0 .6vmin 0 rgba(150, 105, 210, .35); display: grid; place-items: center; pointer-events: auto; animation: edgePulse 1.2s ease-in-out infinite; }
.edge img { width: 62%; height: 62%; }
.edge.l { left: 1.4vmin; } .edge.r { right: 1.4vmin; }
.edge .arr { position: absolute; top: 50%; width: 0; height: 0; border: 9px solid transparent; transform: translateY(-50%); }
.edge.l .arr { left: -12px; border-right-color: #fff; } .edge.r .arr { right: -12px; border-left-color: #fff; }
.edge.sad { background: #ffe1ea; }

/* ---------- Bovenbalk ---------- */
#hud {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--hud) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(2.2vmin, env(safe-area-inset-right)) 0 max(2.2vmin, env(safe-area-inset-left));
  z-index: 20; display: none; align-items: center; gap: 2vmin; pointer-events: none;
}
body.playing #hud { display: flex; }
#hud > * { pointer-events: auto; }
.chip { background: rgba(255, 255, 255, .92); border-radius: 999px; box-shadow: 0 .6vmin 0 rgba(155, 108, 220, .35); padding: .3em 1.1em .2em; line-height: 1.02; }
.namechip { max-width: 30vw; }
.namechip b { display: block; font-size: clamp(20px, 3.7vmin, 34px); font-weight: 800; color: #ff4fa0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.namechip small { display: block; font-size: clamp(13px, 2.2vmin, 20px); color: var(--ink2); font-weight: 700; white-space: nowrap; }
.chip.gems, .gemcount { display: inline-flex; align-items: center; gap: .3em; padding: .15em .9em .1em .4em; font-size: clamp(22px, 3.8vmin, 34px); font-weight: 800; color: #2f86d6; }
.chip.gems img, .gemcount img { width: 1.4em; height: 1.4em; }
#grow {
  position: relative; flex: 1; max-width: 52vmin; height: clamp(44px, 6.8vmin, 62px); margin: 0 1vmin 0 auto;
  background: rgba(255, 255, 255, .92); border-radius: 999px; box-shadow: 0 .6vmin 0 rgba(155, 108, 220, .35); padding: .7vmin;
  --p: 0;
}
#grow .fill { height: 100%; border-radius: 999px; background: var(--rb); width: calc(2.6em + (100% - 2.6em) * var(--p)); transition: width .9s var(--pop); }
#grow .heart { position: absolute; left: -2vmin; top: 50%; width: clamp(50px, 8.6vmin, 80px); transform: translateY(-50%); filter: drop-shadow(0 3px 2px rgba(150, 30, 90, .25)); }
#grow .count { position: absolute; left: -2vmin; top: 50%; width: clamp(50px, 8.6vmin, 80px); transform: translateY(-46%); text-align: center; font-weight: 800; font-size: clamp(20px, 3.4vmin, 31px); line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(170, 20, 80, .55), 0 0 5px rgba(170, 20, 80, .45); pointer-events: none; }
#grow .next { position: absolute; right: -1.6vmin; top: 50%; width: clamp(42px, 7.4vmin, 68px); transform: translateY(-50%); }
#grow .next.mystery { filter: brightness(0) opacity(.28); }
.rbtn {
  position: relative; flex: none; width: clamp(60px, 9.6vmin, 88px); height: clamp(60px, 9.6vmin, 88px); border-radius: 50%;
  background: #fff; box-shadow: 0 .7vmin 0 #dcc3f5, 0 1vmin 2vmin rgba(90, 50, 150, .15); display: grid; place-items: center; transition: transform .08s;
}
.rbtn img { width: 64%; height: 64%; }

/* ---------- Hotbar ---------- */
#hotbar {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.2vmin); transform: translateX(-50%); z-index: 22;
  display: none; gap: 1.2vmin; padding: 1vmin 1.4vmin; border-radius: 3.4vmin;
  background: rgba(70, 40, 120, .32); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45);
}
body.playing #hotbar { display: flex; }
body.building #hotbar { display: none; }
.hb { position: relative; width: var(--hot); height: var(--hot); border-radius: 2.4vmin; background: linear-gradient(#fff, #f3ebff); box-shadow: 0 .7vmin 0 #c9b0ec; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .08s; }
.hb img { width: 58%; height: 58%; }
.hb span { font-size: clamp(11px, 1.9vmin, 17px); font-weight: 800; color: var(--ink2); line-height: 1; margin-top: .2em; white-space: nowrap; }
.hb .cnt { position: absolute; right: -6%; top: -8%; min-width: 34%; height: 30%; padding: 0 .3em; border-radius: 999px; background: #4cd97b; color: #fff; font-size: clamp(12px, 2vmin, 18px); font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.hb.low .cnt { background: #ff9f43; }
.hb .dot { position: absolute; right: 4%; top: 4%; width: 24%; height: 24%; border-radius: 50%; background: #ff3f8e; border: 3px solid #fff; display: none; }
.hb.new .dot { display: block; animation: pulse 1s ease-in-out infinite; }
.rbtn.pressed, .btn.pressed, .item.pressed, .sw.pressed, .nm.pressed, .acc.pressed, .tg.pressed, .row.pressed, .x-btn.pressed, .hb.pressed, .plot.pressed, .ware.pressed, .wcard.pressed, .gcard.pressed, .seed.pressed, .mrow.pressed, .owner.pressed, .edge.pressed, .slot.pressed { transform: translateY(.5vmin) scale(.96); }

/* ---------- Bouwbalk ---------- */
#palette { position: absolute; left: 0; right: 0; bottom: 0; z-index: 23; display: none; align-items: center; gap: 1.6vmin; padding: 1.4vmin 2vmin calc(env(safe-area-inset-bottom) + 1.4vmin); background: linear-gradient(rgba(255, 255, 255, .0), rgba(255, 255, 255, .85) 30%); }
body.building #palette { display: flex; }
#palette .cards { flex: 1; display: flex; gap: 1.4vmin; padding: 1vmin .4vmin 1.2vmin; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; }
.bcard { position: relative; flex: none; width: clamp(80px, 13vmin, 120px); height: clamp(80px, 13vmin, 120px); border-radius: 2.4vmin; background: #fff; box-shadow: 0 .7vmin 0 #c9b0ec; display: grid; place-items: center; touch-action: pan-x; }
.bcard > img, .bcard > svg { width: 64%; height: 64%; object-fit: contain; }
.bcard .price, .ware .price, .plot .price { position: absolute; left: 50%; bottom: -10%; transform: translateX(-50%); display: flex; align-items: center; gap: .15em; background: #2f86d6; color: #fff; border-radius: 999px; padding: 0 .55em 0 .25em; font-size: clamp(14px, 2.4vmin, 21px); font-weight: 800; white-space: nowrap; border: 2px solid #fff; }
.price img { width: 1.15em; height: 1.15em; }
.bcard.poor, .ware.poor { filter: grayscale(.7) opacity(.6); }
#build-done { flex: none; }

/* ---------- Knoppen en panelen ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  min-height: clamp(62px, 10vmin, 92px); padding: .12em 1.25em 0; border-radius: 999px;
  font-size: clamp(26px, 4.8vmin, 46px); font-weight: 800; color: #fff; letter-spacing: .01em;
  background: linear-gradient(180deg, #ff8fd0, #ff4fa6);
  box-shadow: 0 .9vmin 0 #d2368c, 0 1.6vmin 3vmin rgba(210, 54, 140, .35);
  text-shadow: 0 .06em 0 rgba(160, 20, 90, .35); transition: transform .08s, box-shadow .08s, filter .2s;
}
.btn.small { min-height: clamp(52px, 8vmin, 74px); font-size: clamp(20px, 3.6vmin, 34px); padding: .1em 1em 0; }
.btn img { width: 1.2em; height: 1.2em; }
.btn.pressed { box-shadow: 0 .2vmin 0 #d2368c; }
.btn.green { background: linear-gradient(180deg, #74e8ae, #22c17d); box-shadow: 0 .9vmin 0 #169660, 0 1.6vmin 3vmin rgba(22, 150, 96, .3); text-shadow: 0 .06em 0 rgba(10, 100, 60, .35); }
.btn.purple { background: linear-gradient(180deg, #bb9bff, #8a5cf6); box-shadow: 0 .9vmin 0 #6a3dd6, 0 1.6vmin 3vmin rgba(106, 61, 214, .3); text-shadow: 0 .06em 0 rgba(60, 20, 140, .35); }
.btn[disabled] { filter: grayscale(.8) opacity(.5); }
.panel { position: relative; background: rgba(255, 255, 255, .95); border-radius: 4.5vmin; box-shadow: 0 1.2vmin 0 rgba(160, 110, 220, .35), 0 2vmin 5vmin rgba(90, 40, 140, .25); padding: 3.4vmin; }
.x-btn {
  position: absolute; right: max(2.6vmin, env(safe-area-inset-right)); top: calc(env(safe-area-inset-top) + 2.2vmin); z-index: 8;
  width: clamp(58px, 9vmin, 84px); height: clamp(58px, 9vmin, 84px); border-radius: 50%; background: #fff;
  box-shadow: 0 .7vmin 0 #dcc3f5; font-size: clamp(26px, 4.6vmin, 42px); font-weight: 800; color: #b86ee6; display: grid; place-items: center; line-height: 1;
}
.otitle { position: relative; margin: 0 0 2vmin; display: flex; align-items: center; justify-content: center; gap: .4em; font-size: clamp(28px, 5.4vmin, 50px); font-weight: 800; color: #ff4fa0; text-shadow: 0 .05em 0 #fff; z-index: 2; }
.otitle > img { width: 1.4em; height: 1.4em; }
.otitle .gemcount { margin-left: .6em; font-size: .7em; }

/* ---------- Overlays ---------- */
.ov { position: absolute; inset: 0; z-index: 50; display: none; flex-direction: column; align-items: center; justify-content: center; }
.ov.on { display: flex; }
.ov .bg { position: absolute; inset: 0; }
.ov .bg.soft { background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .92), rgba(255, 226, 245, .94) 55%, rgba(220, 198, 255, .97)); }
.ov .bg.dim { background: rgba(70, 35, 120, .45); }
.ov.on > .bg, .ov.on > .panel { animation: fadeIn .25s ease-out; }

/* Titel */
#title { z-index: 45; }
#title .glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); }
.logo { position: relative; margin: -24vmin 0 0; text-align: center; line-height: .86; font-weight: 800; }
.logo span { display: block; font-size: clamp(32px, 7vmin, 70px); color: #ff4fa0; text-shadow: 0 0 .12em #fff, 0 0 .12em #fff, 0 .05em 0 #fff, 0 -.05em 0 #fff, .05em 0 0 #fff, -.05em 0 0 #fff; transform: rotate(-4deg); }
.logo b { position: relative; display: block; font-size: clamp(56px, 13vmin, 136px); }
.logo i { font-style: normal; display: block; }
.logo .o { position: absolute; left: 0; right: 0; top: 0; color: #fff; -webkit-text-stroke: .2em #fff; text-shadow: 0 .14em .18em rgba(120, 60, 180, .35); }
.logo .f { position: relative; background: var(--rb); -webkit-background-clip: text; background-clip: text; color: transparent; }
#title .btn { margin-top: 5vmin; animation: pulse 1.6s ease-in-out infinite; }
#title .btn svg { width: 1em; height: 1em; }

/* Kiezen + verkleden */
.split { position: relative; display: flex; align-items: center; justify-content: center; gap: 4vmin; width: 100%; height: 100%; padding: calc(var(--hud) + 3vmin) 4vmin 3vmin; }
.split .preview { position: relative; flex: 1 1 0; max-width: 60vmin; height: 100%; max-height: 64vmin; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.split .pv { width: 100%; flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.split .pv svg { width: 100%; height: 100%; }
.pv-name { margin-top: 1vmin; min-height: 1.2em; font-size: clamp(30px, 6vmin, 58px); font-weight: 800; color: #ff4fa0; text-shadow: 0 .05em 0 #fff, 0 0 .2em #fff; }
.split .side { position: relative; flex: 1 1 0; max-width: min(70vmin, 640px); background: rgba(255, 255, 255, .94); border-radius: 4.5vmin; padding: 3vmin; box-shadow: 0 1.2vmin 0 rgba(160, 110, 220, .3), 0 2vmin 5vmin rgba(90, 40, 140, .2); max-height: 100%; overflow: auto; touch-action: pan-y; }
.side button { touch-action: pan-y; }
.side h3 { margin: 0 0 1.6vmin; font-size: clamp(24px, 4.6vmin, 42px); font-weight: 800; color: #ff4fa0; text-align: center; line-height: 1.1; }
.side h3 + * + h3 { margin-top: 3vmin; }
.step { display: none; }
.step.on { display: block; animation: fadeIn .3s; }
.act { display: flex; justify-content: center; margin-top: 3vmin; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 17vmin)); justify-content: center; gap: 2.6vmin; }
.sw { position: relative; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 .8vmin 0 rgba(120, 70, 180, .25), inset 0 0 0 .9vmin #fff; transition: transform .1s; }
.sw.sel { outline: 1vmin solid #ffcd3c; outline-offset: .3vmin; }
.sw.sel::after { content: "✔"; position: absolute; right: -4%; bottom: -4%; width: 34%; height: 34%; border-radius: 50%; background: #ffcd3c; color: #fff; display: grid; place-items: center; font-size: clamp(16px, 3vmin, 28px); font-weight: 800; }
.names { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8vmin; }
.nm { display: flex; align-items: center; gap: .35em; min-height: clamp(56px, 8.6vmin, 80px); padding: 0 .6em; border-radius: 999px; background: #f4ecff; box-shadow: 0 .6vmin 0 #dcc3f5; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 800; color: var(--ink); text-align: left; line-height: 1; }
.nm img { width: 1.5em; height: 1.5em; flex: none; }
.nm.sel { background: #ffd8ee; box-shadow: 0 .6vmin 0 #ff8fc8, inset 0 0 0 .5vmin #ff5fa8; }
.typebox { margin-top: 2vmin; }
.typebox input { width: 100%; min-height: clamp(56px, 8.6vmin, 80px); border-radius: 999px; border: .6vmin solid #e7d6ff; background: #fff; padding: 0 .8em; font-size: clamp(22px, 3.8vmin, 34px); font-weight: 800; color: var(--ink); outline: none; text-align: center; }
.typebox input:focus { border-color: #ff8fc8; }
.accs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2vmin; }
#dress .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.6vmin; }
#dress .sw { box-shadow: 0 .6vmin 0 rgba(120, 70, 180, .25), inset 0 0 0 .6vmin #fff; }
#dress .sw.sel { outline-width: .7vmin; }
#dress .side h3 { margin-bottom: 1.2vmin; }
.acc { position: relative; aspect-ratio: 1; border-radius: 26%; background: #f4ecff; box-shadow: 0 .6vmin 0 #dcc3f5; display: grid; place-items: center; }
.acc img { width: 68%; height: 68%; }
.acc.on { background: #fff3b8; box-shadow: 0 .6vmin 0 #f0c330, inset 0 0 0 .5vmin #ffcd3c; }
.acc.locked img.it { filter: grayscale(1) opacity(.3); }
.acc .lk { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: clamp(14px, 2.6vmin, 24px); font-weight: 800; color: #b38ad6; }
.acc .lk img { width: 42%; height: 42%; }

/* Verzorgen */
#care .bg { background: radial-gradient(ellipse at 50% 42%, #fff, #ffe6f6 50%, #dcc8ff); }
#care .nightsky {
  position: absolute; inset: 0; opacity: 0; transition: opacity .9s; pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 22%, #fff, transparent), radial-gradient(3px 3px at 28% 12%, #fff8c4, transparent),
    radial-gradient(2px 2px at 44% 30%, #fff, transparent), radial-gradient(3px 3px at 62% 16%, #fff, transparent),
    radial-gradient(2px 2px at 78% 34%, #fff8c4, transparent), radial-gradient(3px 3px at 90% 10%, #fff, transparent),
    radial-gradient(2px 2px at 8% 62%, #fff, transparent), radial-gradient(3px 3px at 92% 58%, #fff8c4, transparent),
    linear-gradient(#20235f, #3b2f86 60%, #5a3a9a);
}
#care.night .nightsky { opacity: 1; }
#care .moon { position: absolute; right: 12%; top: calc(var(--hud) + 2vmin); width: 15vmin; opacity: 0; transform: translateY(-30%) rotate(-20deg); transition: opacity .8s, transform .8s; }
#care.night .moon { opacity: 1; transform: none; }
.care-main { position: relative; display: flex; align-items: center; justify-content: center; gap: 4vmin; margin-top: calc(var(--hud) * .55); width: 100%; padding: 0 4vmin; }
#care .stage { position: relative; width: min(46vmin, 50vw); height: min(44vmin, 40vh); }
#care .who { position: absolute; inset: 0; transform-origin: 50% 100%; }
#care .who > img, #care .who > svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .6s, filter .6s; transform-origin: 50% 90%; }
#care .who.target > img, #care .who.target > svg { filter: drop-shadow(0 0 2.4vmin rgba(255, 210, 60, .95)); }
#care .who.sleeping > img, #care .who.sleeping > svg { transform: rotate(-7deg) translateY(4%) scale(.96); filter: brightness(.86) saturate(.85); }
#care .who.sadwho > img { filter: grayscale(.5); }
#care .blanket { position: absolute; left: -8%; right: -8%; bottom: -6%; height: 50%; transform: translateY(130%); opacity: 0; transition: transform .7s var(--pop), opacity .4s; pointer-events: none; z-index: 2; }
#care .blanket svg { width: 100%; height: 100%; }
#care.night .blanket { transform: none; opacity: 1; }
#care .meter { position: absolute; left: -22%; top: 18%; width: 20%; aspect-ratio: 1; display: none; --p: 0; }
#care .meter.on { display: block; animation: popIn .4s var(--pop); }
#care .meter img { position: absolute; inset: 0; width: 100%; height: 100%; }
#care .meter .bgh { filter: grayscale(1) opacity(.3); }
#care .meter .fgh { clip-path: inset(calc(100% - var(--p) * 100%) 0 0 0); }
.meters { display: flex; flex-direction: column; gap: 1.2vmin; width: min(42vmin, 40vw); }
.mrow { display: flex; align-items: center; gap: 1.2vmin; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: .6vmin 1.4vmin .6vmin .6vmin; box-shadow: 0 .5vmin 0 rgba(155, 108, 220, .25); }
.mrow img { width: clamp(34px, 5.6vmin, 52px); height: clamp(34px, 5.6vmin, 52px); flex: none; }
.mrow .bar { flex: 1; height: clamp(16px, 2.8vmin, 26px); border-radius: 999px; background: #eee6f7; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .08); }
.mrow .bar i { display: block; height: 100%; border-radius: 999px; transition: width .8s var(--pop), background .4s; }
.mrow.low { background: #fff2e0; }
.mrow.crit { background: #ffe1e8; animation: critPulse 1s ease-in-out infinite; }
.mrow.pain { background: #ffe1e8; justify-content: center; font-size: clamp(20px, 3.6vmin, 32px); color: #e0457a; font-weight: 800; }
.tray { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 2vmin; margin-top: 3.4vmin; padding: 1.2vmin 3vmin 2.4vmin; max-width: min(100%, 1180px); }
.tray.many { gap: 1.5vmin; margin-top: 2vmin; }
.tray.many .item { width: clamp(64px, 11vmin, 112px); }
.item {
  position: relative; flex: none; width: clamp(80px, 14vmin, 136px); aspect-ratio: 1; border-radius: 28%; background: #fff;
  box-shadow: 0 1vmin 0 #dcc3f5, 0 1.4vmin 3vmin rgba(120, 70, 190, .2); display: grid; place-items: center;
  transition: transform .12s, opacity .25s;
}
.item img { width: 72%; height: 72%; }
.item .cnt { position: absolute; right: 4%; bottom: 4%; min-width: 30%; height: 28%; border-radius: 999px; background: #8a5cf6; color: #fff; display: grid; place-items: center; font-size: clamp(14px, 2.6vmin, 22px); font-weight: 800; padding: 0 .3em; border: 2px solid #fff; }
.item.fav { box-shadow: 0 1vmin 0 #ffb3d6, 0 1.4vmin 3vmin rgba(255, 80, 160, .2); }
.item.empty { opacity: .45; }
.item.empty .cnt { background: #ff5c8a; }
.item.lifted { opacity: .35; transform: scale(.9); }
.item.used { opacity: .25; pointer-events: none; }
.item.hint { animation: hintGlow 1s ease-in-out infinite; }
.ghost { position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none; will-change: transform; filter: drop-shadow(0 1vmin 1vmin rgba(80, 40, 120, .28)); }
.dirt { position: absolute; transform: translate(-50%, -50%); pointer-events: none; border-radius: 46% 54% 60% 40% / 50% 42% 58% 50%; background: radial-gradient(circle at 38% 36%, #b07a45, #7a4b22 72%); box-shadow: inset -.4vmin -.4vmin 0 rgba(0, 0, 0, .12); z-index: 1; }
.tangle { position: absolute; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; }
.tangle svg { width: 100%; height: 100%; }
.sticker { position: absolute; transform: translate(-50%, -50%) rotate(-24deg); pointer-events: none; z-index: 1; }
.ballcount { position: absolute; left: 50%; top: -14%; transform: translateX(-50%); background: #fff; border-radius: 999px; padding: .1em .8em; font-size: clamp(24px, 4.6vmin, 42px); font-weight: 800; color: #ff4fa0; box-shadow: 0 .6vmin 0 rgba(155, 108, 220, .3); z-index: 3; }

/* Feestje */
#cele { z-index: 70; }
#cele .bg { background: radial-gradient(circle at 50% 42%, #ffe0f3, #ffaedf 45%, #c39bff); }
#cele .rays { position: absolute; left: 50%; top: 42%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax; background: repeating-conic-gradient(rgba(255, 255, 255, .32) 0 9deg, rgba(255, 255, 255, 0) 9deg 18deg); animation: spin 36s linear infinite; pointer-events: none; }
#cele .vis { position: relative; width: min(58vmin, 82vw); height: min(46vmin, 42vh); display: flex; align-items: flex-end; justify-content: center; }
#cele .vis > svg, #cele .vis > img { width: 100%; height: 100%; }
#cele .vis img.floaty { animation: floaty 3s ease-in-out infinite; }
#cele .vis .gift { width: 72%; height: 100%; display: grid; place-items: center; animation: giftShake 1.2s ease-in-out infinite; }
#cele .vis .gift img { width: 100%; height: 100%; }
#cele h2 { position: relative; margin: 2vmin 5vmin 0; text-align: center; font-size: clamp(32px, 6.8vmin, 66px); line-height: 1.04; font-weight: 800; color: #fff; text-shadow: 0 .07em 0 #e0479a, 0 .12em .3em rgba(150, 40, 120, .4); }
#cele p { position: relative; margin: .8vmin 5vmin 2.8vmin; text-align: center; font-size: clamp(21px, 4vmin, 38px); line-height: 1.15; font-weight: 700; color: #7a3fa8; min-height: 1.15em; }
.cbtns { position: relative; display: flex; gap: 3vmin; }
.cbtns .btn { display: none; }
.cbtns .btn.on { display: inline-flex; animation: popIn .45s var(--pop); }
.wpreview { position: relative; width: 100%; height: 100%; border-radius: 6vmin; box-shadow: 0 1.2vmin 0 rgba(120, 60, 180, .25); overflow: hidden; }
.wpreview .wdeco { position: absolute; left: 6%; bottom: 8%; width: 40%; height: 70%; object-fit: contain; }
.wpreview .wani1 { position: absolute; right: 8%; bottom: 8%; width: 46%; height: 60%; object-fit: contain; animation: bob 2s ease-in-out infinite; }
.w-wei { background: linear-gradient(#ade0ff, #e6f8ff 50%, #8fdc78 50%, #6fd06a); }
.w-bos { background: linear-gradient(#bfe8e0, #e3f5d8 50%, #6dbb7e 50%, #4fae58); }
.w-strand { background: linear-gradient(#5ec8ff, #c9f0ff 46%, #4db5f5 46%, #86d4ff 60%, #ffe8ad 60%, #f4cd7c); }
.w-sneeuw { background: linear-gradient(#a9c0ff, #e9eeff 50%, #fff 50%, #dfe9ff); }

/* Rugzak */
.bagp { width: min(92vw, 860px); max-height: 82vh; display: flex; flex-direction: column; }
.bagp .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(78px, 12vmin, 112px), 1fr)); gap: 2vmin; padding: 1vmin .4vmin 2vmin; touch-action: pan-y; }
.bagp .slots .empty { grid-column: 1 / -1; text-align: center; font-size: clamp(20px, 3.4vmin, 30px); color: var(--ink2); }
.bagp h4 { margin: 1vmin 0; font-size: clamp(18px, 3vmin, 26px); color: var(--ink2); text-align: center; }
.bagp .tools { display: flex; justify-content: center; gap: 1.6vmin; }
.slot { position: relative; aspect-ratio: 1; border-radius: 24%; background: #f6f0ff; box-shadow: inset 0 0 0 3px #e3d4fb, 0 .5vmin 0 #dcc3f5; display: grid; place-items: center; touch-action: pan-y; }
.slot img { width: 70%; height: 70%; }
.slot .cnt { position: absolute; right: 6%; bottom: 4%; font-size: clamp(16px, 2.8vmin, 24px); font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(90, 40, 140, .7), 0 0 4px rgba(90, 40, 140, .7); }
.slot.tool { width: clamp(56px, 9vmin, 80px); }

/* Wereldkaart */
#map .mapbg { background: radial-gradient(circle at 50% 40%, #bfe8ff, #7cc6f2 60%, #5aa9e0); }
#map .mapbg::after { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 30% 70%, rgba(255, 255, 255, .12) 0 2px, transparent 2px 26px); }
.worlds { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3vmin; width: min(92vw, 980px); padding: 0 2vmin; }
.wcard { position: relative; height: min(30vh, 34vmin); border-radius: 4vmin; box-shadow: 0 1.2vmin 0 rgba(30, 60, 120, .3), inset 0 0 0 .6vmin rgba(255, 255, 255, .8); overflow: hidden; text-align: left; }
.wcard b { position: absolute; left: 4%; top: 6%; font-size: clamp(22px, 4.4vmin, 40px); font-weight: 800; color: #fff; text-shadow: 0 .06em 0 rgba(60, 30, 120, .6), 0 0 .3em rgba(60, 30, 120, .4); }
.wcard .wdeco { position: absolute; right: 4%; bottom: 8%; height: 60%; width: auto; }
.wcard .wani { position: absolute; left: 4%; bottom: 8%; display: flex; gap: .6vmin; }
.wcard .wani img { width: clamp(34px, 6.5vmin, 60px); height: clamp(34px, 6.5vmin, 60px); }
.wcard .wstat { position: absolute; right: 4%; top: 6%; display: flex; gap: .8vmin; }
.wcard .wstat span { display: flex; align-items: center; gap: .1em; background: #fff; border-radius: 999px; padding: .05em .5em .05em .2em; font-size: clamp(16px, 3vmin, 26px); font-weight: 800; color: #ff7a3c; }
.wcard .wstat span.sad { color: #5a7bd8; }
.wcard .wstat img { width: 1.3em; height: 1.3em; }
.wcard .wstat .ok { padding: .1em .3em; }
.wcard.locked { filter: grayscale(.6); }
.wcard .lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(60, 40, 110, .35); }
.wcard .lock > img { width: 26%; height: auto; aspect-ratio: 1; }
.wcard .lock span { display: flex; align-items: center; gap: .2em; color: #fff; font-size: clamp(20px, 3.8vmin, 34px); font-weight: 800; text-shadow: 0 2px 0 rgba(60, 30, 120, .6); }
.wcard .lock span img { width: 1.3em; }
.wcard.here { box-shadow: 0 1.2vmin 0 rgba(30, 60, 120, .3), inset 0 0 0 1vmin #ffd23f; }
.here-tag { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); background: #ffd23f; color: #7a4b00; font-style: normal; font-weight: 800; border-radius: 999px; padding: .1em .8em; font-size: clamp(14px, 2.6vmin, 22px); white-space: nowrap; }

/* Moestuin */
.gardenbg { background: linear-gradient(#bfe9ff, #e8f7ff 22%, #9fe58c 22%, #6fd06a) !important; }
#garden .plots { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, clamp(96px, 19vmin, 180px))); gap: 2.6vmin; padding: 2vmin; background: rgba(140, 90, 46, .25); border-radius: 4vmin; box-shadow: inset 0 0 0 .6vmin rgba(255, 255, 255, .5); }
.plot { position: relative; aspect-ratio: 1; border-radius: 22%; display: grid; place-items: center; }
.plot .soil { position: absolute; inset: 0; border-radius: 22%; background: radial-gradient(ellipse at 50% 38%, #b98250, #7d5230); box-shadow: inset 0 -.8vmin 0 rgba(0, 0, 0, .2), 0 .8vmin 0 #5b3a1e; }
.plot.dry .soil, .plot.dry2 .soil { background: radial-gradient(ellipse at 50% 38%, #d8aa75, #a77845); }
.plot .plus { position: relative; font-size: clamp(40px, 8vmin, 76px); font-weight: 800; color: rgba(255, 255, 255, .75); line-height: 1; }
.plot .plant { position: relative; width: 78%; height: 78%; transform-origin: 50% 90%; transition: transform .5s; }
.plot.ripe .plant { animation: ripeBob 1.3s ease-in-out infinite; }
.plot .drop-badge { position: absolute; right: -6%; top: -8%; width: 38%; height: 38%; animation: dropBob 1s ease-in-out infinite; }
.plot .ring { position: absolute; left: -5%; top: -5%; width: 36%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#4cd97b calc(var(--p) * 360deg), rgba(255, 255, 255, .7) 0); box-shadow: 0 0 0 3px #fff; }
.plot .goal { position: absolute; left: 1%; top: 1%; width: 24%; height: 24%; }
.plot .spark { position: absolute; right: -4%; top: -6%; width: 34%; height: 34%; animation: spin 3s linear infinite; }
.plot.buy .soil { background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 .6vmin rgba(255, 255, 255, .7); }
.seeds { position: absolute; left: 50%; bottom: 6vmin; transform: translateX(-50%); display: none; z-index: 5; text-align: center; padding: 2vmin 3vmin 3vmin; }
.seeds.on { display: block; }
.seeds p { margin: 0 0 1.4vmin; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 800; color: #ff4fa0; }
.seeds .srow { display: flex; gap: 1.8vmin; }
.seed { width: clamp(76px, 12vmin, 112px); aspect-ratio: 1; border-radius: 26%; background: #f4ecff; box-shadow: 0 .6vmin 0 #dcc3f5; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.seed img { width: 62%; height: 62%; }
.seed small { font-size: clamp(11px, 1.8vmin, 16px); color: var(--ink2); font-weight: 800; }
.sclose { position: absolute; right: -2vmin; top: -2vmin; width: clamp(44px, 7vmin, 60px); height: clamp(44px, 7vmin, 60px); border-radius: 50%; background: #fff; box-shadow: 0 .5vmin 0 #dcc3f5; color: #b86ee6; font-weight: 800; font-size: clamp(20px, 3.4vmin, 30px); }
.gieter { position: absolute; z-index: 6; transform-origin: 30% 70%; pointer-events: none; }

/* Vissen */
#fish .bg { background: linear-gradient(#bfe9ff, #e8f7ff 30%, #8fdc78 30%, #6fd06a); }
#fish.stream .bg { background: linear-gradient(#c6ecd9, #e3f5d8 30%, #6dbb7e 30%, #4fae58); }
#fish.sea .bg { background: linear-gradient(#5ec8ff, #c9f0ff 30%, #ffe8ad 86%, #f4cd7c); }
#fish.ice .bg { background: linear-gradient(#a9c0ff, #e9eeff 30%, #ffffff 30%, #dfe9ff); }
#fish .water { position: absolute; left: 8%; right: 8%; top: 34%; height: 46%; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, #8fd8ff, #3fa5ec 70%); box-shadow: 0 0 0 1.4vmin #c8f0ff, inset 0 -2vmin 4vmin rgba(0, 60, 140, .2); }
#fish.sea .water { left: -10%; right: -10%; top: 30%; height: 54%; border-radius: 0 0 50% 50% / 0 0 30% 30%; background: linear-gradient(#3fa9ee, #6dc8ff); box-shadow: none; }
#fish.ice .water { left: 22%; right: 22%; top: 40%; height: 34%; background: radial-gradient(ellipse at 50% 45%, #4a96e0, #1f5fb0 75%); box-shadow: 0 0 0 4vmin #eaf7ff, 0 0 0 4.6vmin #b7dcff; }
#fish .rod { position: absolute; left: 2vmin; bottom: 4vmin; width: 26vmin; height: 26vmin; transform-origin: 20% 90%; z-index: 3; }
#fish .bob { position: absolute; width: 7vmin; height: 9.5vmin; transform: translate(-50%, -90%); display: none; z-index: 2; animation: bobber 1.6s ease-in-out infinite; }
#fish .bob.on { display: block; }
#fish .bob svg { width: 100%; height: 100%; }
#fish .bob b { position: absolute; left: 50%; top: -90%; transform: translateX(-50%); font-size: clamp(34px, 6vmin, 56px); font-weight: 800; color: #ff3f6b; text-shadow: 0 3px 0 #fff; display: none; }
#fish .bob.bite { animation: bite .25s ease-in-out infinite alternate; }
#fish .bob.bite b { display: block; animation: pulse .4s ease-in-out infinite; }
#fish .reel { position: absolute; left: 50%; top: calc(var(--hud) + 2vmin); transform: translateX(-50%); width: min(70vw, 600px); display: none; flex-direction: column; align-items: center; gap: 1vmin; z-index: 4; }
#fish .reel.on { display: flex; }
#fish .reel span { font-size: clamp(28px, 5.4vmin, 52px); font-weight: 800; color: #fff; text-shadow: 0 .06em 0 #e0479a, 0 0 .3em rgba(150, 40, 120, .5); animation: pulse .6s ease-in-out infinite; }
#fish .rbar { width: 100%; height: clamp(26px, 4.6vmin, 44px); border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 4px #fff; overflow: hidden; }
#fish .rbar i { display: block; height: 100%; width: 35%; background: var(--rb); border-radius: 999px; }
#fish .catch { position: absolute; left: 50%; top: 52%; width: 30vmin; height: 30vmin; transform: translate(-50%, -50%); display: none; z-index: 5; filter: drop-shadow(0 1vmin 1.4vmin rgba(0, 0, 0, .25)); }
#fish .catch.on { display: block; }
#fish .catch img { width: 100%; height: 100%; }
#fish-cast { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 5vmin); left: 50%; transform: translateX(-50%); display: none; z-index: 4; }
#fish-cast.on { display: inline-flex; animation: popIn .4s var(--pop); }

/* Winkeltje */
.wares { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(88px, 14vmin, 130px), 1fr)); gap: 3vmin 2.2vmin; width: min(94vw, 1000px); max-height: 72vh; padding: 1vmin 2vmin 4vmin; touch-action: pan-y; }
.ware { position: relative; aspect-ratio: 1; border-radius: 26%; background: #fff; box-shadow: 0 .8vmin 0 #dcc3f5, 0 1.4vmin 3vmin rgba(120, 70, 190, .15); display: grid; place-items: center; touch-action: pan-y; }
.ware > img { width: 66%; height: 66%; }
.ware .n { position: absolute; right: 8%; top: 6%; font-style: normal; font-weight: 800; color: #8a5cf6; font-size: clamp(14px, 2.4vmin, 22px); }

/* Werkbank */
.recipes { position: relative; display: flex; flex-direction: column; gap: 2.4vmin; width: min(94vw, 900px); max-height: 74vh; padding: 1vmin 2vmin 3vmin; touch-action: pan-y; }
.recipe { display: flex; align-items: center; gap: 1.6vmin; background: rgba(255, 255, 255, .85); border-radius: 3vmin; padding: 1.4vmin 2vmin; box-shadow: 0 .7vmin 0 rgba(155, 108, 220, .3); }
.recipe .ing { display: flex; align-items: center; gap: 1vmin; flex: 1; flex-wrap: wrap; }
.recipe .slot { width: clamp(60px, 10vmin, 92px); }
.recipe .slot:not(.have):not(.out) img { filter: grayscale(1) opacity(.35); }
.recipe .slot.have { box-shadow: inset 0 0 0 3px #7fe0a8, 0 .5vmin 0 #b6ecc9; background: #ecfff3; }
.recipe .slot.out { background: #fff6cf; box-shadow: inset 0 0 0 3px #ffd23f, 0 .5vmin 0 #f0c330; }
.recipe .op { font-size: clamp(26px, 4.6vmin, 42px); font-weight: 800; color: var(--ink2); }
.recipe .btn { flex: none; }

/* Opdrachten */
.qlist { position: relative; display: flex; flex-direction: column; gap: 2.4vmin; width: min(94vw, 860px); }
.quest { display: flex; align-items: center; gap: 2vmin; background: rgba(255, 255, 255, .9); border-radius: 3vmin; padding: 1.6vmin 2vmin; box-shadow: 0 .7vmin 0 rgba(155, 108, 220, .3); }
.quest .qi { width: clamp(52px, 9vmin, 84px); height: clamp(52px, 9vmin, 84px); flex: none; }
.quest .qt { flex: 1; }
.quest .qt b { display: block; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 800; line-height: 1.1; }
.quest .qbar { height: clamp(14px, 2.4vmin, 22px); border-radius: 999px; background: #eee6f7; overflow: hidden; margin: .8vmin 0 .3vmin; }
.quest .qbar i { display: block; height: 100%; background: var(--rb); border-radius: 999px; }
.quest small { font-size: clamp(14px, 2.4vmin, 20px); color: var(--ink2); font-weight: 800; }
.qclaim { flex: none; display: flex; flex-direction: column; align-items: center; gap: .3vmin; min-width: clamp(70px, 12vmin, 110px); padding: 1vmin; border-radius: 2.4vmin; background: #f4ecff; color: #2f86d6; font-weight: 800; font-size: clamp(18px, 3.2vmin, 28px); }
.qclaim span { display: flex; align-items: center; gap: .1em; }
.qclaim span img { width: 1.2em; height: 1.2em; }
.qclaim > img { width: clamp(44px, 8vmin, 72px); height: clamp(44px, 8vmin, 72px); animation: giftShake 1.2s ease-in-out infinite; }
.qclaim.ready { background: #fff3b8; box-shadow: 0 .6vmin 0 #f0c330; }
.quest.done { background: #fffbe6; }

/* Spelletjes-menu */
.gcards { position: relative; display: flex; gap: 4vmin; }
.gcard { position: relative; width: min(38vmin, 40vw); aspect-ratio: 1; border-radius: 5vmin; background: linear-gradient(#fff, #f3ebff); box-shadow: 0 1.2vmin 0 #c9b0ec, 0 2vmin 4vmin rgba(120, 70, 190, .2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vmin; }
.gcard > img { width: 48%; height: 48%; }
.gcard b { font-size: clamp(22px, 4.2vmin, 40px); font-weight: 800; }
.gcard .lvl { font-size: clamp(16px, 3vmin, 26px); color: #fff; background: #8a5cf6; border-radius: 999px; padding: .05em .9em; font-weight: 800; }
.gcard .lk { display: none; position: absolute; right: 6%; top: 6%; width: 22%; height: 22%; }
.gcard.locked { filter: grayscale(.6); }
.gcard.locked .lk { display: block; }
.ghint { position: relative; margin: 4vmin 4vmin 0; text-align: center; font-size: clamp(18px, 3.2vmin, 28px); color: var(--ink2); font-weight: 700; }

/* ---------- Leren ---------- */
#learn { z-index: 58; }
#learn .learnbg { background: radial-gradient(ellipse at 50% 30%, #fffdf2, #ffeef8 55%, #e6dcff); }
.back-btn {
  position: absolute; left: max(2.6vmin, env(safe-area-inset-left)); top: calc(env(safe-area-inset-top) + 2.2vmin); z-index: 8;
  width: clamp(58px, 9vmin, 84px); height: clamp(58px, 9vmin, 84px); border-radius: 50%; background: #fff;
  box-shadow: 0 .7vmin 0 #dcc3f5; font-size: clamp(40px, 7vmin, 64px); font-weight: 800; color: #b86ee6; display: grid; place-items: center; line-height: 1; padding-bottom: .12em;
}
#learn[data-view="menu"] .back-btn { display: none; }
.lv { display: none; position: relative; flex-direction: column; align-items: center; width: 100%; max-height: 100%; }
.lv.on { display: flex; }
.lbig { margin: 0 0 3vmin; font-size: clamp(28px, 5.4vmin, 50px); font-weight: 800; color: var(--ink); }
.ages { display: flex; gap: 2.6vmin; flex-wrap: wrap; justify-content: center; }
.agebtn { width: clamp(90px, 15vmin, 140px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(#fff, #f3ebff); box-shadow: 0 1vmin 0 #c9b0ec; font-size: clamp(40px, 8vmin, 72px); font-weight: 800; color: #ff4fa0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: .9; }
.agebtn small { font-size: .3em; color: var(--ink2); }
.agebtn.sel { box-shadow: 0 1vmin 0 #f0c330, inset 0 0 0 .7vmin #ffcd3c; }
.lnote { max-width: min(82vw, 720px); margin: 4vmin 0 0; text-align: center; font-size: clamp(14px, 2.4vmin, 20px); line-height: 1.3; color: var(--ink2); font-weight: 700; }
.subjs { display: flex; gap: 5vmin; }
.subj { position: relative; width: min(40vmin, 42vw); aspect-ratio: 1; border-radius: 6vmin; background: linear-gradient(#fff, #f3ebff); box-shadow: 0 1.2vmin 0 #c9b0ec, 0 2vmin 4vmin rgba(120, 70, 190, .2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4vmin; }
.subj > img { width: 40%; height: 40%; }
.subj b { font-size: clamp(26px, 5vmin, 46px); font-weight: 800; line-height: 1.1; }
.subj small { font-size: clamp(14px, 2.4vmin, 22px); color: var(--ink2); font-weight: 700; }
.subj .lvl { position: absolute; left: 50%; bottom: -3vmin; transform: translateX(-50%); background: #8a5cf6; color: #fff; border-radius: 999px; padding: .1em 1em; font-weight: 800; font-size: clamp(16px, 2.8vmin, 26px); white-space: nowrap; box-shadow: 0 .5vmin 0 #6a3dd6; }
.subj .tot { position: absolute; right: 7%; top: 6%; display: flex; align-items: center; gap: .15em; font-weight: 800; color: #d99a00; font-size: clamp(16px, 3vmin, 28px); }
.subj .tot img { width: 1.3em; height: 1.3em; }
.agechip { margin-top: 7vmin; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: .3em 1.2em; font-size: clamp(16px, 2.6vmin, 24px); color: var(--ink2); font-weight: 700; box-shadow: 0 .5vmin 0 #dcc3f5; }
.levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2vmin; width: min(94vw, 1040px); max-height: 72vh; padding: 1vmin 2vmin 3vmin; touch-action: pan-y; }
.lvlbtn { position: relative; display: flex; align-items: center; gap: 2vmin; min-height: clamp(70px, 12vmin, 112px); padding: 1vmin 2vmin; border-radius: 3vmin; background: #fff; box-shadow: 0 .7vmin 0 #dcc3f5; text-align: left; touch-action: pan-y; }
.lvlbtn .n { flex: none; width: clamp(46px, 8vmin, 72px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(#ff8fd0, #ff4fa6); color: #fff; display: grid; place-items: center; font-size: clamp(22px, 4.4vmin, 40px); font-weight: 800; }
.lvlbtn .t { flex: 1; font-size: clamp(18px, 3.2vmin, 30px); font-weight: 800; line-height: 1.05; }
.lvlbtn .t small { display: block; margin-top: .25em; font-size: .6em; color: var(--ink2); font-weight: 700; }
.lvlbtn .stars { display: flex; gap: .3vmin; flex: none; }
.lvlbtn .stars img { width: clamp(22px, 4.2vmin, 38px); height: auto; filter: grayscale(1) opacity(.25); }
.lvlbtn .stars img.on, .bigstars img.on { filter: none; }
.lvlbtn.locked { opacity: .55; }
.lvlbtn.locked .n { background: #c9bde0; }
.lvlbtn.locked .stars { visibility: hidden; }
.lvlbtn .lk { position: absolute; right: 2.4vmin; top: 50%; width: clamp(30px, 5.4vmin, 48px); transform: translateY(-50%); }
.lvlbtn.next { box-shadow: 0 .7vmin 0 #f0c330, inset 0 0 0 .6vmin #ffcd3c; }
.lvlbtn.next .n { animation: pulse 1.4s ease-in-out infinite; }
.lvlbtn.pressed, .subj.pressed, .agebtn.pressed, .lopt.pressed, .tile.pressed, .keypad button.pressed, .lq-say.pressed, .back-btn.pressed, .agechip.pressed { transform: translateY(.5vmin) scale(.96); }

.lv-quiz { position: absolute; inset: 0; padding: calc(var(--hud) + env(safe-area-inset-top) + 1vmin) 4vmin calc(env(safe-area-inset-bottom) + 3vmin); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 2vmin; justify-items: center; align-items: center; }
.lv-quiz .lq-top { grid-row: 1; } .lv-quiz .lq-prompt { grid-row: 2; } .lv-quiz .lq-answer, .lv-quiz .lq-explain { grid-row: 3; grid-column: 1; }
.lv-quiz.revealed .lq-answer { visibility: hidden; }
.lv-quiz.on { display: grid; }
.lq-top { display: flex; align-items: center; gap: 2.4vmin; width: min(94vw, 1100px); }
.lq-say { flex: none; width: clamp(56px, 9vmin, 84px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 .7vmin 0 #dcc3f5; display: grid; place-items: center; transition: opacity .2s; }
.lq-say img { width: 62%; height: 62%; }
.lq-say.dim { opacity: .35; }
.lq-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .8vmin; padding-right: clamp(56px, 9vmin, 84px); }
.lq-title { font-size: clamp(18px, 3.2vmin, 30px); color: #ff4fa0; font-weight: 800; text-align: center; }
.lq-dots { display: flex; gap: 1.2vmin; }
.lq-dots i { width: clamp(16px, 2.8vmin, 26px); aspect-ratio: 1; border-radius: 50%; background: #e8ddf7; transition: background .3s; }
.lq-dots i.cur { background: #fff; box-shadow: inset 0 0 0 .5vmin #ff8fc8; }
.lq-dots i.r2 { background: #4cd97b; }
.lq-dots i.r1 { background: #ffd23f; }
.lq-dots i.r0 { background: #ff9f43; }
.lq-prompt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vmin; min-height: 0; max-height: 100%; text-align: center; }
.lp { display: block; width: clamp(56px, 10vmin, 96px); height: auto; aspect-ratio: 1; }
.lp.xl { width: min(30vmin, 32vh); }
.lp.sm { width: min(16vmin, 20vh); }
.lq { margin: 0; font-size: clamp(20px, 3.8vmin, 34px); font-weight: 800; color: var(--ink); }
.lread { margin: 0; padding: .06em .6em 0; border-radius: 4vmin; background: #fff; box-shadow: 0 1vmin 0 #dcc3f5; font-size: clamp(60px, 13vmin, 136px); font-weight: 800; letter-spacing: .04em; line-height: 1.05; color: #5b3a8c; }
.lstory { margin: 0; max-width: min(88vw, 940px); padding: .5em .9em; border-radius: 4vmin; background: #fff; box-shadow: 0 1vmin 0 #dcc3f5; font-size: clamp(24px, 4.6vmin, 44px); font-weight: 800; line-height: 1.22; color: var(--ink); }
.lstory .gap { display: inline-block; min-width: 2.6em; border-bottom: .12em dashed #ff8fc8; color: #ff8fc8; text-align: center; }
.lsum { margin: 0; font-size: clamp(40px, 8vmin, 80px); font-weight: 800; line-height: 1.1; color: #5b3a8c; }
.lsum.xl { padding: .08em .5em 0; border-radius: 4vmin; background: #fff; box-shadow: 0 1vmin 0 #dcc3f5; font-size: clamp(54px, 12vmin, 120px); }
.lw { font-size: clamp(30px, 6vmin, 56px); color: #5b3a8c; }
.lw u { color: #ff4fa0; text-decoration-thickness: .1em; }
.lw.sm { font-size: clamp(22px, 4vmin, 36px); }
.objs { display: flex; flex-direction: column; align-items: center; gap: 1vmin; }
.orow { display: flex; gap: 1vmin; }
.ob { position: relative; }
.ob .lp { width: clamp(44px, 9vmin, 84px); }
.ob.x .lp { opacity: .5; }
.ob.x::after { content: ""; position: absolute; left: -6%; right: -6%; top: 44%; height: 12%; border-radius: 99px; background: #ff4f6b; box-shadow: 0 0 0 2px #fff; transform: rotate(-35deg); }
.sumpics { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2vmin; }
.sumpics .ob .lp { width: clamp(36px, 7vmin, 66px); }
.sumpics .op { font-size: clamp(40px, 8vmin, 72px); color: #ff4fa0; }
.duo { display: flex; gap: 2vmin; }
.duo .lp { width: min(18vmin, 22vh); }
.clock { width: min(36vmin, 36vh); height: auto; filter: drop-shadow(0 1vmin 0 rgba(155, 108, 220, .3)); }
.lq-answer { display: flex; justify-content: center; align-items: center; gap: 3vmin; flex-wrap: wrap; }
.lopt { min-width: clamp(96px, 18vmin, 170px); min-height: clamp(86px, 15vmin, 140px); padding: 0 .5em; border-radius: 4vmin; background: #fff; box-shadow: 0 1vmin 0 #dcc3f5, 0 1.6vmin 3vmin rgba(120, 70, 190, .15); display: grid; place-items: center; font-size: clamp(30px, 6vmin, 56px); font-weight: 800; color: var(--ink); transition: transform .1s, opacity .2s; }
.lopt.big { min-width: clamp(110px, 19vmin, 180px); font-size: clamp(48px, 10vmin, 96px); }
.lopt.word { padding: 0 .7em; font-size: clamp(26px, 5vmin, 48px); }
.lopt.pic img { width: clamp(80px, 15vmin, 140px); height: auto; }
.lopt.right { background: #d8ffe6; box-shadow: 0 1vmin 0 #4cd97b, inset 0 0 0 .7vmin #4cd97b; animation: popIn .4s var(--pop); }
.lopt.wrong { opacity: .4; filter: grayscale(.6); transform: scale(.94); }
.lq-answer.pad { flex-direction: column; flex-wrap: nowrap; gap: 1.6vmin; }
.padshow { min-width: clamp(180px, 34vmin, 320px); height: clamp(64px, 11vmin, 100px); border-radius: 3vmin; background: #fff; box-shadow: inset 0 0 0 .6vmin #e3d4fb, 0 .7vmin 0 #dcc3f5; display: grid; place-items: center; font-size: clamp(40px, 8vmin, 76px); font-weight: 800; color: #5b3a8c; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4vmin; }
.keypad button { width: clamp(64px, 11vmin, 104px); height: clamp(54px, 9vmin, 88px); border-radius: 2.6vmin; background: #fff; box-shadow: 0 .7vmin 0 #dcc3f5; font-size: clamp(28px, 5.4vmin, 50px); font-weight: 800; color: var(--ink); }
.keypad .ok { background: linear-gradient(#74e8ae, #22c17d); color: #fff; box-shadow: 0 .7vmin 0 #169660; }
.keypad .back { background: #ffeef3; color: #e0457a; }
.lq-answer.tiles { flex-direction: column; gap: 3vmin; }
.lslots { display: flex; gap: 1.4vmin; }
.lslot { width: clamp(58px, 10.5vmin, 100px); height: clamp(68px, 12vmin, 116px); border-radius: 2.4vmin; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 .5vmin #d8c8f2; display: grid; place-items: center; font-size: clamp(36px, 7vmin, 66px); font-weight: 800; color: #5b3a8c; }
.lslot.on { background: #fff; box-shadow: inset 0 0 0 .5vmin #4cd97b; }
.tilerow { display: flex; gap: 1.6vmin; flex-wrap: wrap; justify-content: center; }
.tile { width: clamp(62px, 11vmin, 104px); aspect-ratio: 1; border-radius: 2.6vmin; background: linear-gradient(#fff6c8, #ffe27a); box-shadow: 0 .8vmin 0 #e0b23c; font-size: clamp(36px, 7vmin, 66px); font-weight: 800; color: #6b4210; }
.tile.used { visibility: hidden; }
.tile.hint { animation: hintGlow 1s ease-in-out infinite; }
.lq-explain { position: relative; z-index: 5; display: none; flex-direction: column; align-items: center; gap: 1.4vmin; width: min(90vw, 780px); max-width: 100%; padding: 2.2vmin 3vmin 2.6vmin; border-radius: 4vmin; background: #fff; box-shadow: 0 1vmin 0 #ffd23f, 0 2vmin 5vmin rgba(90, 40, 140, .2); text-align: center; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 700; line-height: 1.25; }
.lv-quiz.revealed .lq-explain { display: flex; }
.lq-explain .ans { display: grid; place-items: center; min-width: 2.4em; padding: .1em .7em 0; border-radius: 3vmin; background: #d8ffe6; box-shadow: inset 0 0 0 .6vmin #4cd97b; font-size: clamp(28px, 5.4vmin, 50px); font-weight: 800; color: var(--ink); }
.lq-explain .ans.big { font-size: clamp(40px, 8vmin, 76px); line-height: 1.1; }
.lq-explain .ans.pic { padding: 1vmin; }
.lq-explain .ans img { width: clamp(64px, 12vmin, 112px); height: auto; }
.lv-end { min-width: min(72vmin, 90vw); text-align: center; }
.bigstars { display: flex; justify-content: center; gap: 1.6vmin; }
.bigstars img { width: clamp(60px, 13vmin, 120px); height: auto; filter: grayscale(1) opacity(.25); }
.lv-end h2 { margin: 1vmin 0 0; font-size: clamp(32px, 6.4vmin, 60px); font-weight: 800; color: #ff4fa0; line-height: 1.05; }
.lv-end p { margin: .6vmin 0; font-size: clamp(18px, 3.2vmin, 30px); font-weight: 700; color: var(--ink2); }
.lv-end .rew { display: flex; justify-content: center; gap: 3vmin; margin: 1vmin 0 2vmin; min-height: 1em; }
.lv-end .rew span { display: flex; align-items: center; gap: .2em; font-size: clamp(26px, 5vmin, 46px); font-weight: 800; color: #2f86d6; }
.lv-end .rew img { width: 1.4em; height: 1.4em; }
.lv-end .unl { display: flex; align-items: center; justify-content: center; gap: .3em; color: #8a5cf6; font-weight: 800; }
.lv-end .unl img { width: 1.4em; height: 1.4em; }
.lv-end .row2 { display: flex; gap: 2vmin; justify-content: center; flex-wrap: wrap; margin-top: 1.4vmin; }
@media (orientation: landscape) {
  .lv-quiz.k-pad { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: 4vmin; }
  .lv-quiz.k-pad .lq-top { grid-column: 1 / -1; }
  .lv-quiz.k-pad .lq-prompt { grid-column: 1; grid-row: 2; }
  .lv-quiz.k-pad .lq-answer, .lv-quiz.k-pad .lq-explain { grid-column: 2; grid-row: 2; }
  .lv-quiz.k-pad .lq-explain { width: min(44vw, 520px); }
}

/* Huisje-bewoner kiezen */
#owner { z-index: 72; }
.ownerp { text-align: center; max-width: 92vw; }
.ownerp h3 { margin: 0 0 2vmin; font-size: clamp(26px, 4.8vmin, 44px); color: #ff4fa0; }
.who-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2vmin; margin-bottom: 3vmin; }
.owner { position: relative; width: clamp(80px, 14vmin, 128px); aspect-ratio: 1; border-radius: 26%; background: #f4ecff; box-shadow: 0 .6vmin 0 #dcc3f5; display: grid; place-items: center; }
.owner > img { width: 74%; height: 74%; }
.owner .hasHouse { position: absolute; right: -6%; bottom: -6%; width: 40%; height: 40%; }
.owner.sel { background: #fff3b8; box-shadow: 0 .6vmin 0 #f0c330, inset 0 0 0 .5vmin #ffcd3c; }

/* Spelletjes: sterren en vliegen */
#stars, #fly { z-index: 60; }
#stars .bg { background: linear-gradient(#2a1660, #5d2fa6 52%, #ff94cf); }
#stars .twinkle {
  position: absolute; inset: 0; pointer-events: none; animation: twinkle 3s ease-in-out infinite alternate;
  background:
    radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(3px 3px at 25% 40%, #fff6b0, transparent),
    radial-gradient(2px 2px at 40% 15%, #fff, transparent), radial-gradient(3px 3px at 60% 35%, #fff, transparent),
    radial-gradient(2px 2px at 75% 22%, #fff6b0, transparent), radial-gradient(3px 3px at 88% 45%, #fff, transparent);
}
#fly .bg { background: linear-gradient(#6ec6ff, #bfe8ff 55%, #ffe3f3); }
.flyclouds img { position: absolute; width: 22vmin; opacity: .9; animation: flyCloud linear infinite; }
.flyclouds img:nth-child(1) { top: 18%; animation-duration: 9s; }
.flyclouds img:nth-child(2) { top: 44%; animation-duration: 13s; animation-delay: -5s; width: 16vmin; }
.flyclouds img:nth-child(3) { top: 70%; animation-duration: 11s; animation-delay: -2s; }
.flyclouds img:nth-child(4) { top: 8%; animation-duration: 15s; animation-delay: -9s; width: 28vmin; }
#sg-field, #fg-field { position: absolute; inset: 0; overflow: hidden; }
.fall { position: absolute; left: 0; top: 0; will-change: transform; }
.fall img, .fall svg { width: 100%; height: 100%; display: block; }
.fall.storm img { filter: drop-shadow(0 0 8px rgba(255, 230, 80, .7)); }
.fall.ring.done { opacity: .35; }
.sg-uni { position: absolute; left: 0; bottom: max(3vmin, env(safe-area-inset-bottom)); will-change: transform; }
.fg-uni { position: absolute; left: 0; top: 0; will-change: transform; }
.sg-uni svg, .fg-uni svg { width: 100%; height: 100%; }
.sg-uni.blink, .fg-uni.blink { animation: hurtBlink .2s steps(2) infinite; }
.gtop { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 2.2vmin); display: flex; align-items: center; gap: 2vmin; padding: 0 calc(clamp(58px, 9vmin, 84px) + 5vmin) 0 3vmin; z-index: 3; pointer-events: none; }
.gscore { display: flex; align-items: center; gap: .25em; background: #fff; border-radius: 999px; padding: .05em .8em 0 .3em; font-size: clamp(26px, 4.8vmin, 46px); font-weight: 800; color: #ff4fa0; box-shadow: 0 .7vmin 0 rgba(255, 255, 255, .35); white-space: nowrap; }
.gscore img { width: 1.3em; height: 1.3em; }
.lives { display: flex; gap: .4vmin; }
.lives img { width: clamp(32px, 5.6vmin, 52px); height: clamp(32px, 5.6vmin, 52px); }
.lives img.gone { filter: grayscale(1) opacity(.35); }
.gtime { flex: 1; height: clamp(16px, 2.6vmin, 26px); border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.gtime i { display: block; height: 100%; width: 100%; background: var(--rb); transform-origin: left center; border-radius: 999px; }
.count { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(90px, 30vmin, 300px); font-weight: 800; color: #fff; text-shadow: 0 .05em 0 #ff4fa0, 0 0 .3em rgba(255, 120, 200, .6); pointer-events: none; z-index: 4; }
.count.small { font-size: clamp(56px, 14vmin, 150px); }
.gend { display: none; z-index: 5; text-align: center; min-width: min(70vmin, 90vw); }
.gend.on { display: block; animation: popIn .5s var(--pop); }
.gend .trophy { width: 20vmin; height: 20vmin; }
.gend h2 { margin: 0; font-size: clamp(34px, 7vmin, 68px); font-weight: 800; color: #ff4fa0; line-height: 1.05; }
.gend p { margin: .4vmin 0; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 700; color: var(--ink2); }
.gend .hrow { display: flex; justify-content: center; gap: 1vmin; margin: 1.5vmin 0 3vmin; min-height: 8vmin; }
.gend .hrow img { width: 8vmin; height: 8vmin; animation: popIn .5s var(--pop) both; }
.gend .row2 { display: flex; gap: 2.4vmin; justify-content: center; flex-wrap: wrap; }

/* Instellingen */
#settings { z-index: 80; }
.panel.set { width: min(92vw, 640px); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 1.6vmin; touch-action: pan-y; }
.panel.set h3 { margin: 0 0 1vmin; text-align: center; font-size: clamp(26px, 4.8vmin, 44px); font-weight: 800; color: #8a5cf6; }
.tg, .row { position: relative; display: flex; align-items: center; gap: .6em; min-height: clamp(58px, 9vmin, 82px); padding: 0 1em; border-radius: 3vmin; background: #f5efff; font-size: clamp(20px, 3.4vmin, 30px); font-weight: 800; color: var(--ink); text-align: left; overflow: hidden; touch-action: pan-y; }
.tg img, .row img { width: 1.6em; height: 1.6em; flex: none; position: relative; }
.tg span, .row span { flex: 1; position: relative; line-height: 1.05; }
.row small { display: block; font-size: .62em; font-weight: 700; color: var(--ink2); }
.tg i { position: relative; width: 2.6em; height: 1.5em; border-radius: 999px; background: #d9cbe8; transition: background .2s; flex: none; }
.tg i::after { content: ""; position: absolute; left: .15em; top: .15em; width: 1.2em; height: 1.2em; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s var(--pop); }
.tg.on i { background: #3fd08c; }
.tg.on i::after { transform: translateX(1.1em); }
.row.danger { background: #ffeef3; touch-action: none; }
.row .hold { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 90, 140, .3); }
#gate { position: absolute; inset: 0; z-index: 5; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vmin; padding: 4vmin; border-radius: inherit; background: rgba(255, 238, 243, .98); text-align: center; }
#gate.on { display: flex; }
#gate b { font-size: clamp(18px, 3vmin, 26px); }
#gate .q { font-size: clamp(32px, 6vmin, 56px); font-weight: 800; color: #e0457a; }
#gate .opts { display: flex; gap: 1.6vmin; flex-wrap: wrap; justify-content: center; }
.credits { margin: .4vmin 0 0; text-align: center; font-size: clamp(12px, 2vmin, 16px); color: var(--ink2); font-weight: 600; }
.panel.set .btn { align-self: center; margin-top: 1vmin; }

/* Reizen: wolken schuiven over het scherm */
#travel { position: absolute; inset: 0; z-index: 75; pointer-events: none; display: none; }
#travel.on { display: block; pointer-events: auto; }
#travel i { position: absolute; width: 90vmax; height: 60vmax; border-radius: 50%; background: radial-gradient(closest-side, #fff 60%, rgba(255, 255, 255, 0)); }
#travel i:nth-child(1) { left: -30vmax; top: -20vmax; } #travel i:nth-child(2) { right: -30vmax; top: -10vmax; } #travel i:nth-child(3) { left: -20vmax; bottom: -25vmax; } #travel i:nth-child(4) { right: -25vmax; bottom: -20vmax; }
#travel.in i { animation: cloudIn .7s ease-in both; }
#travel.out i { animation: cloudOut .7s ease-out both; }

/* Praatwolk en wijsvinger */
#talk {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 1.6vmin); z-index: 90; transform: translateX(-50%);
  display: none; align-items: center; gap: .45em; width: max-content; max-width: min(72vw, 820px);
  background: #fff; border-radius: 3vmin; padding: .35em 1em .25em .45em;
  font-size: clamp(20px, 3.6vmin, 34px); font-weight: 700; line-height: 1.15; color: var(--ink);
  box-shadow: 0 .7vmin 0 rgba(155, 108, 220, .35), 0 1vmin 3vmin rgba(90, 50, 150, .2); pointer-events: auto;
}
#talk.low { top: calc(var(--hud) + env(safe-area-inset-top) + 1vmin); max-width: min(84vw, 840px); }
#talk.on { display: flex; animation: talkIn .35s var(--pop); }
#talk img { width: 1.7em; height: 1.7em; flex: none; }
#hand { position: absolute; z-index: 95; width: clamp(64px, 11vmin, 110px); margin-left: calc(clamp(64px, 11vmin, 110px) * -.36); pointer-events: none; display: none; filter: drop-shadow(0 .5vmin .5vmin rgba(0, 0, 0, .22)); }
#hand.on { display: block; animation: handTap 1.1s ease-in-out infinite; }
#hand.on.rub { animation: handRub 1.3s ease-in-out infinite; }
#fx { position: absolute; inset: 0; z-index: 110; pointer-events: none; overflow: hidden; }
.pt { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; }
.pt.plus { display: grid; place-items: center; font-size: clamp(26px, 4.6vmin, 44px); font-weight: 800; color: #fff; text-shadow: 0 2px 0 #e0479a, 0 0 6px rgba(224, 71, 154, .6); width: auto !important; white-space: nowrap; }
.cf { position: absolute; top: -3vmin; border-radius: 2px; pointer-events: none; will-change: transform; }
.bub { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 32% 30%, #fff 0 18%, rgba(190, 230, 255, .55) 40%, rgba(150, 200, 255, .25) 70%); border: 2px solid rgba(255, 255, 255, .9); }
.flash { position: absolute; inset: 0; background: #fff; pointer-events: none; }

/* ---------- Bewegingen ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-32vmin); } to { transform: translateX(calc(100vw + 4vmin)); } }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-2.2%) scale(1.015, .985); } }
@keyframes walkbob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5%) rotate(1.5deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7%); } }
@keyframes swim { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6%) rotate(3deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes popIn { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes talkIn { 0% { transform: translateX(-50%) scale(.4); opacity: 0; } 70% { transform: translateX(-50%) scale(1.05); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wobble { 0%, 100% { transform: rotate(-5deg) scale(1); } 50% { transform: rotate(5deg) scale(1.06); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes swish { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(7deg); } }
@keyframes flap { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes flapB { from { transform: scaleX(1); } to { transform: scaleX(.5); } }
@keyframes hornGlow { 0%, 100% { filter: drop-shadow(0 0 1px rgba(255, 230, 120, .6)); } 50% { filter: drop-shadow(0 0 6px rgba(255, 230, 120, 1)); } }
@keyframes hintGlow { 0%, 100% { box-shadow: 0 1vmin 0 #dcc3f5, 0 0 0 0 rgba(255, 205, 60, 0); transform: scale(1); } 50% { box-shadow: 0 1vmin 0 #dcc3f5, 0 0 0 1.8vmin rgba(255, 205, 60, .8); transform: scale(1.08); } }
@keyframes handTap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-24%); } }
@keyframes handRub { 0%, 100% { transform: translateX(-45%) rotate(-12deg); } 50% { transform: translateX(45%) rotate(12deg); } }
@keyframes giftShake { 0%, 60%, 100% { transform: rotate(0) scale(1); } 70% { transform: rotate(-8deg) scale(1.05); } 80% { transform: rotate(8deg) scale(1.05); } 90% { transform: rotate(-4deg); } }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
@keyframes eggIdle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-4deg); } 88% { transform: rotate(4deg); } 92% { transform: rotate(-2deg); } }
@keyframes snowfall { from { transform: translate(0, 0); } to { transform: translate(6vmin, 105vh); } }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(-30px); } }
@keyframes foamMove { from { transform: translateY(0); } to { transform: translateY(5px); } }
@keyframes ripeBob { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -58%) scale(1.06); } }
.plot .plant, .place.garden .bed img { animation-name: none; }
.plot.ripe .plant, .place.garden .bed.ripe img { animation: ripeBob2 1.3s ease-in-out infinite; }
@keyframes ripeBob2 { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6%) scale(1.05); } }
@keyframes beeFly { 0% { transform: translate(-50%, -50%) rotate(0deg) translateX(30%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg) translateX(30%) rotate(-360deg); } }
@keyframes dropBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14%) scale(1.06); } }
@keyframes digPulse { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); } 50% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, .95)); } }
@keyframes edgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes rainBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8%); } }
@keyframes critPulse { 0%, 100% { box-shadow: 0 .5vmin 0 rgba(255, 92, 122, .35); } 50% { box-shadow: 0 .5vmin 0 rgba(255, 92, 122, .35), 0 0 0 .8vmin rgba(255, 92, 122, .3); } }
@keyframes bobber { 0%, 100% { transform: translate(-50%, -90%) rotate(-4deg); } 50% { transform: translate(-50%, -82%) rotate(4deg); } }
@keyframes bite { from { transform: translate(-50%, -60%) rotate(-10deg); } to { transform: translate(-50%, -30%) rotate(10deg); } }
@keyframes hurtBlink { 0% { opacity: 1; } 50% { opacity: .3; } }
@keyframes flyCloud { from { transform: translateX(105vw); } to { transform: translateX(-30vmin); } }
@keyframes cloudIn { from { transform: scale(.2); opacity: 0; } to { transform: scale(1.4); opacity: 1; } }
@keyframes cloudOut { from { transform: scale(1.4); opacity: 1; } to { transform: scale(.2); opacity: 0; } }

@media (orientation: portrait) {
  .split { flex-direction: column; padding-top: calc(var(--hud) + 4vmin); }
  .split .preview { flex: 0 1 auto; width: 100%; height: 34vh; max-height: none; }
  .split .side { flex: 0 1 auto; width: 100%; max-width: 720px; }
  #rainbow { width: 90%; right: -20%; }
  .care-main { flex-direction: column; gap: 2vmin; }
  #care .stage { width: min(56vmin, 70vw); height: min(56vmin, 32vh); }
  .meters { width: min(80vw, 560px); display: grid; grid-template-columns: 1fr 1fr; }
  .namechip { display: none; }
  .worlds { grid-template-columns: minmax(0, 1fr); }
  .wcard { height: 17vh; }
  #garden .plots { grid-template-columns: repeat(3, minmax(0, clamp(96px, 24vmin, 180px))); }
  .gcards { flex-direction: column; }
  .subjs { flex-direction: column; gap: 7vmin; }
  .subj { width: min(44vmin, 34vh); }
  .levels { grid-template-columns: minmax(0, 1fr); max-height: 76vh; }
  .gcard { width: min(40vmin, 60vw); }
}
@media (prefers-reduced-motion: reduce) {
  .cloud, #sun .rays, #snow i { animation: none; }
}
