/* Spielzimmer – Aufkleber-Look: dicke Pflaumen-Konturen, harte Schatten, Himmel & Wiese */
:root {
  --sky: #bfe3f2;
  --sky-deep: #8ccbe6;
  --ink: #3b2a63;
  --sun: #ffc93c;
  --tomato: #ff6b5b;
  --leaf: #6cc17a;
  --ocean: #3d8bd9;
  --berry: #b46bd9;
  --paper: #ffffff;
  --line: 4px;
  --pop: 6px 6px 0 var(--ink);
  --pop-sm: 4px 4px 0 var(--ink);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--ocean); outline-offset: 3px; }

/* Wiese am unteren Rand, auf jeder Seite */
.meadow {
  position: fixed; inset: auto 0 0 0; height: 22vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 100% at 15% 100%, #7fcf8b 60%, transparent 61%),
    radial-gradient(110% 90% at 85% 100%, var(--leaf) 60%, transparent 61%);
}
.cloud {
  position: fixed; z-index: 0; pointer-events: none; width: 160px; height: 54px; border-radius: 40px; background: #fff; opacity: .85;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 24px; top: -34px; }
.cloud::after { width: 54px; height: 54px; left: 82px; top: -22px; }
.cloud.c1 { top: 9vh; left: -30px; }
.cloud.c2 { top: 16vh; right: 6vw; transform: scale(.7); }

.screen {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  display: flex; flex-direction: column;
}

/* ---------- Bausteine ---------- */
.sticker {
  background: var(--paper); border: var(--line) solid var(--ink); border-radius: 26px; box-shadow: var(--pop);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 60px; padding: 0 1.4em; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--sun); box-shadow: var(--pop-sm); font-size: 1.25rem; font-weight: 800;
  transition: transform .08s, box-shadow .08s;
}
.btn:active, .btn.pressed { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.secondary { background: var(--paper); }
.btn.green { background: var(--leaf); }
.btn.small { min-height: 46px; font-size: 1rem; padding: 0 1em; }
.linkish { background: none; border: 0; text-decoration: underline; font-weight: 700; font-size: 1rem; padding: 8px; }

.icon-btn {
  width: 58px; height: 58px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--paper);
  box-shadow: var(--pop-sm); font-size: 1.7rem; display: grid; place-items: center; padding: 0; flex: none;
}
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Login ---------- */
.login { align-items: center; justify-content: center; text-align: center; }
.login-card { width: min(440px, 100%); padding: 34px 26px 28px; position: relative; }
.login-card h1 { font-size: clamp(2.2rem, 8vw, 3rem); margin: .1em 0 .1em; letter-spacing: -.01em; }
.login-card p { font-size: 1.1rem; line-height: 1.45; margin: .4em auto 1.2em; max-width: 30ch; }
.login-sun {
  width: 96px; height: 96px; margin: -84px auto 6px; border-radius: 50%; background: var(--sun);
  border: var(--line) solid var(--ink); box-shadow: var(--pop-sm); display: grid; place-items: center; font-size: 3rem;
}
.code-input {
  width: 100%; font: inherit; font-size: 2.4rem; font-weight: 800; letter-spacing: .35em; text-align: center;
  padding: 12px 0 12px .35em; border: var(--line) solid var(--ink); border-radius: 20px; background: #f4fbff; color: var(--ink);
  margin-bottom: 14px;
}
.code-input::placeholder { color: #b9b0cf; }
.login-msg { min-height: 1.5em; font-weight: 700; margin: 12px 0 0; }
.login-msg.err { color: #c0392b; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.hint { font-size: .9rem !important; opacity: .8; margin-top: 18px !important; }

/* ---------- Start / Bereiche ---------- */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.topbar h1, .topbar h2 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.1; flex: 1; }
.topbar .stars-total { font-weight: 800; font-size: 1.3rem; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: var(--pop-sm); white-space: nowrap; }

.home-title { text-align: center; margin: 3vh 0 3vh; }
.home-title h1 { font-size: clamp(2.6rem, 10vw, 4.6rem); margin: 0; letter-spacing: -.02em; line-height: 1; }
.home-title p { font-size: 1.2rem; margin: .5em 0 0; font-weight: 700; }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; max-width: 1080px; width: 100%; margin: 0 auto; flex: 1; align-content: start; }
.door {
  position: relative; border: var(--line) solid var(--ink); border-radius: 34px 34px 26px 26px; box-shadow: var(--pop);
  padding: 26px 22px 24px; text-align: left; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .12s;
}
.door:nth-child(1) { background: var(--sun); transform: rotate(-1.5deg); }
.door:nth-child(2) { background: var(--berry); color: #fff; transform: rotate(1.2deg); }
.door:nth-child(3) { background: var(--ocean); color: #fff; transform: rotate(-.8deg); }
.door:active { transform: rotate(0) translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.door .door-emoji { position: absolute; top: 16px; right: 20px; font-size: 5.2rem; line-height: 1; }
.door .age { display: inline-block; align-self: flex-start; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.door strong { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.05; display: block; }
.door span.sub { font-size: 1.1rem; font-weight: 700; opacity: .9; display: block; margin-top: 6px; }

.tiles { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); margin-top: 18px; padding-bottom: 12vh; }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile {
  position: relative; border: var(--line) solid var(--ink); border-radius: 26px; box-shadow: var(--pop); background: var(--paper);
  aspect-ratio: 1 / 1.02; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px;
}
.tile:nth-child(3n+1) { transform: rotate(-1.2deg); }
.tile:nth-child(3n+2) { transform: rotate(.8deg); }
.tile:active { transform: translate(3px, 3px) rotate(0); box-shadow: 2px 2px 0 var(--ink); }
.tile .t-emoji { font-size: clamp(3.4rem, 12vw, 4.6rem); line-height: 1.1; }
.tile .t-name { font-weight: 800; font-size: 1.2rem; text-align: center; line-height: 1.15; }
.tile .t-cat { font-size: .85rem; font-weight: 700; opacity: .7; }
.tile .t-stars { position: absolute; top: 8px; right: 10px; font-size: .95rem; letter-spacing: -2px; }

/* ---------- Spielfläche ---------- */
.game { padding-bottom: calc(12px + var(--safe-b)); }
.game .topbar { position: relative; z-index: 3; }
.progress { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.progress i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); }
.progress i.done { background: var(--leaf); }
.progress i.now { background: var(--sun); }
.stage { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; min-height: 0; }
.instruction { font-size: clamp(1.3rem, 4.5vw, 2rem); font-weight: 800; text-align: center; margin: 0 auto; line-height: 1.2; max-width: 30ch; }

.choices { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.choice {
  min-width: 104px; min-height: 104px; padding: 10px 16px; border: var(--line) solid var(--ink); border-radius: 26px; background: var(--paper);
  box-shadow: var(--pop-sm); font-size: 3.4rem; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.choice.text { font-size: 1.6rem; min-width: 140px; min-height: 76px; }
.choice:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.choice.right { background: var(--leaf); }
.choice.wrong { background: #ffd0cb; }

.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.bounce { animation: bounce .45s; }
@keyframes bounce { 40% { transform: scale(1.25); } 70% { transform: scale(.92); } }

/* Gewonnen */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(59, 42, 99, .45); padding: 20px; }
.win-card { padding: 30px 28px; text-align: center; width: min(420px, 100%); animation: pop-in .35s cubic-bezier(.3, 1.6, .5, 1); }
.win-card h2 { font-size: 2.2rem; margin: .2em 0 .4em; }
.win-stars { font-size: 3.6rem; letter-spacing: 4px; }
.win-stars .off { filter: grayscale(1); opacity: .35; }
.win-card .row { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } }

.confetti { position: fixed; z-index: 60; pointer-events: none; font-size: 1.8rem; top: -40px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* Eltern-Einstellungen */
.settings-card { padding: 26px; width: min(440px, 100%); }
.settings-card h2 { margin: 0 0 14px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 2px dashed #d8d1ea; font-weight: 700; font-size: 1.1rem; }
.switch { width: 70px; height: 40px; border-radius: 999px; border: 3px solid var(--ink); background: #ddd; position: relative; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--leaf); }
.switch[aria-checked="true"]::after { left: 33px; }
.hold-btn { position: relative; overflow: hidden; }
.hold-btn .fill { position: absolute; inset: 0; background: var(--tomato); transform-origin: left; transform: scaleX(0); }
.hold-btn span { position: relative; }
.small-print { font-size: .9rem; opacity: .75; margin: 10px 0 0; }

.offline-badge { position: fixed; z-index: 40; bottom: calc(10px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 520px) {
  :root { --pop: 5px 5px 0 var(--ink); }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tiles.big { grid-template-columns: repeat(2, 1fr); }
  .choice { min-width: 88px; min-height: 88px; font-size: 2.8rem; }
  .icon-btn { width: 52px; height: 52px; font-size: 1.5rem; }
}

/* =================== Spiele =================== */
.dragging { cursor: grabbing; filter: drop-shadow(4px 6px 0 rgba(59,42,99,.35)); }

/* Formen */
.shape-board { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 18px; background: #fff7dc; }
.shape-hole, .shape-piece { width: clamp(78px, 19vw, 128px); aspect-ratio: 1; }
.shape-hole svg, .shape-piece svg { width: 100%; height: 100%; display: block; }
.shape-tray { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; min-height: 120px; }
.shape-piece { cursor: grab; touch-action: none; position: relative; }

/* Muster & Reihen */
.pattern-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; }
.pattern-cell { width: clamp(56px, 10vw, 84px); aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(2rem, 6vw, 3rem); background: #fff; border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); }
.pattern-row.nums .pattern-cell { font-size: clamp(1.4rem, 4.5vw, 2.1rem); font-weight: 800; width: auto; min-width: clamp(60px, 11vw, 92px); padding: 0 8px; }
.pattern-cell.q { border-style: dashed; background: #fff7dc; color: var(--ink); font-weight: 800; }

/* Zählen */
.count-field { position: relative; width: min(620px, 94vw); height: min(42vh, 360px); background: #f4fbff; }
.count-item { position: absolute; transform: translate(-50%, -50%); font-size: clamp(2.4rem, 8vw, 3.6rem); background: none; border: 0; padding: 4px; line-height: 1; }
.count-item.counted::after { content: attr(data-n); position: absolute; right: -6px; top: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 3px solid var(--ink); font-size: 1rem; font-weight: 800; display: grid; place-items: center; }
.more-wrap { display: flex; gap: 20px; width: min(760px, 94vw); flex-wrap: wrap; justify-content: center; }
.more-panel { position: relative; flex: 1 1 260px; height: min(40vh, 320px); padding: 0; background: #f4fbff; }
.more-panel.right { background: #dff5e6; }
.more-item { position: absolute; transform: translate(-50%, -50%); font-size: clamp(2rem, 6vw, 3rem); }

/* Tiere */
.choice.animal { font-size: clamp(3.6rem, 13vw, 5.5rem); min-width: clamp(110px, 26vw, 170px); min-height: clamp(110px, 26vw, 170px); }

/* Ballons */
.balloon-field { position: relative; width: 100%; flex: 1; min-height: 55vh; overflow: hidden; border-radius: 26px; }
.balloon { position: absolute; top: 100%; width: clamp(70px, 14vw, 100px); background: none; border: 0; padding: 0; touch-action: none; }
.balloon svg { width: 100%; display: block; }
.balloon.popped { transition: transform .25s, opacity .25s !important; opacity: 0; scale: 1.6; }
.balloon.wiggle svg { animation: shake .4s; }

/* Memory */
.memory-grid { display: grid; gap: 12px; }
.mem-card { aspect-ratio: 1; perspective: 600px; background: none; border: 0; padding: 0; font-size: inherit; }
.mem-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.mem-card.open .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front { position: absolute; inset: 0; border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mem-back { background: var(--berry) radial-gradient(circle at 50% 50%, rgba(255,255,255,.35) 0 18%, transparent 19%) 0 0 / 34px 34px; }
.mem-front { background: #fff; transform: rotateY(180deg); line-height: 1; }
.mem-card.matched .mem-front { background: #dff5e6; }

/* Ausmalen */
.paint-wrap { display: flex; gap: 18px; align-items: center; justify-content: center; width: 100%; flex: 1; flex-direction: column; }
.paint-pic { padding: 8px; width: min(92vw, 52vh, 560px); aspect-ratio: 1; }
.paint-pic svg { width: 100%; height: 100%; display: block; }
.paint-pic .region { cursor: pointer; }
.paint-side { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.swatch { width: 52px; height: 52px; border-radius: 50%; border: var(--line) solid var(--ink); padding: 0; box-shadow: 3px 3px 0 var(--ink); }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--ink); }
.swatch.sm { width: 42px; height: 42px; }
.swatch.stamp { background: #fff; font-size: 1.4rem; display: grid; place-items: center; }
.paint-tools { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (orientation: landscape) and (min-width: 700px) {
  .paint-wrap { flex-direction: row; }
  .paint-pic { width: min(64vh, 56vw, 600px); }
  .palette { grid-template-columns: repeat(3, 1fr); }
}

/* Sortieren */
.sort-tray { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; min-height: 100px; }
.sort-item { font-size: clamp(2.8rem, 9vw, 4rem); width: clamp(76px, 17vw, 104px); aspect-ratio: 1; display: grid; place-items: center; background: #fff; border: var(--line) solid var(--ink); border-radius: 22px; box-shadow: var(--pop-sm); cursor: grab; position: relative; }
.sort-bins { display: flex; gap: 20px; width: min(760px, 96vw); }
.sort-bin { flex: 1; min-height: min(32vh, 260px); display: flex; flex-direction: column; align-items: center; padding: 12px; gap: 4px; background: #fff7dc; }
.sort-bin:nth-child(2) { background: #e6f3ff; }
.bin-emoji { font-size: 3rem; line-height: 1; pointer-events: none; }
.bin-label { font-weight: 800; font-size: 1.3rem; pointer-events: none; }
.bin-content { display: flex; flex-wrap: wrap; justify-content: center; font-size: 2rem; gap: 2px; pointer-events: none; }

/* Rechnen */
.mode-list { display: flex; flex-direction: column; gap: 16px; width: min(380px, 92vw); }
.rocket-track { position: relative; width: min(620px, 92vw); height: 60px; border-bottom: 4px dashed var(--ink); }
.rocket, .moon { position: absolute; bottom: 4px; font-size: 2.8rem; line-height: 1; }
.rocket { left: 0; transition: left .6s cubic-bezier(.3,1.4,.5,1); transform: rotate(45deg); }
.moon { right: 0; }
.equation { font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 800; padding: 10px 26px; font-variant-numeric: tabular-nums; }
.equation .answer { display: inline-block; min-width: 2.2ch; text-align: center; border-bottom: 5px solid var(--ink); }
.equation .answer.empty { color: #b9b0cf; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(330px, 86vw); }
.np-key { height: clamp(54px, 8vh, 70px); border: var(--line) solid var(--ink); border-radius: 18px; background: #fff; box-shadow: var(--pop-sm); font-size: 1.7rem; font-weight: 800; }
.np-key:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.np-key.ok { background: var(--leaf); }

/* Uhr */
.clock-box { padding: 10px; border-radius: 50%; }
.clock { width: min(56vw, 38vh, 300px); display: block; }

/* Schiebepuzzle */
.slide-board { position: relative; padding: 8px; background: #efeaff; }
.slide-tile { position: absolute; top: 4px; left: 4px; border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: var(--pop-sm); font-weight: 800; display: grid; place-items: center; transition: transform .15s ease-out; padding: 0; }
.moves { font-weight: 800; font-size: 1.2rem; margin: 0; }

/* Wörter */
.word-emoji { font-size: clamp(4rem, 16vw, 6.5rem); line-height: 1; }
.slot-row, .letter-pile { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 96vw; }
.slot, .letter { width: clamp(44px, 9vw, 64px); height: clamp(52px, 10vw, 72px); border: var(--line) solid var(--ink); border-radius: 14px; font-size: clamp(1.5rem, 5vw, 2.2rem); font-weight: 800; padding: 0; }
.slot { background: #fff7dc; border-style: dashed; }
.slot.full { border-style: solid; background: #fff; }
.slot.locked { background: #dff5e6; }
.letter { background: var(--sun); box-shadow: var(--pop-sm); }
.letter.used { visibility: hidden; }

/* Labyrinth */
.maze-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.maze-wrap.side { flex-direction: row; }
.maze { border-radius: 12px; padding: 0; display: block; touch-action: none; }
.dpad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 52px); gap: 6px; }
.dpad .up { grid-area: 1 / 2; } .dpad .left { grid-area: 2 / 1; } .dpad .right { grid-area: 2 / 3; } .dpad .down { grid-area: 3 / 2; }
.dpad .np-key { height: auto; font-size: 1.3rem; }

/* Farb-Echo */
.echo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: min(420px, 84vw, 56vh); aspect-ratio: 1; }
.echo-pad { border: var(--line) solid var(--ink); box-shadow: var(--pop); border-radius: 30px; opacity: .55; transition: opacity .1s, transform .1s; }
.echo-pad:nth-child(1) { border-top-left-radius: 50%; } .echo-pad:nth-child(2) { border-top-right-radius: 50%; }
.echo-pad:nth-child(3) { border-bottom-left-radius: 50%; } .echo-pad:nth-child(4) { border-bottom-right-radius: 50%; }
.echo-pad.lit { opacity: 1; transform: scale(1.05); filter: brightness(1.15); }

/* Lebensräume */
.choices.hab { max-width: 440px; }
.hab-choice { flex-direction: column; display: flex; gap: 4px; font-size: 1.2rem; min-width: 140px; min-height: 110px; }
.hab-emoji { font-size: 2.6rem; }
.fact { padding: 16px 20px; max-width: 520px; text-align: center; font-size: 1.15rem; font-weight: 700; }
.fact p { margin: 0 0 12px; line-height: 1.4; }

/* Farblabor */
.mix-row { display: flex; align-items: center; gap: 14px; font-size: 2.4rem; font-weight: 800; flex-wrap: wrap; justify-content: center; }
.blob { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); flex: none; }
.blob.big { width: clamp(70px, 16vw, 104px); height: clamp(70px, 16vw, 104px); border-width: var(--line); box-shadow: var(--pop-sm); display: inline-grid; place-items: center; }
.blob.q { background: #fff7dc; border-style: dashed; font-size: 2.4rem; }
.color-choice { display: flex; gap: 10px; align-items: center; font-size: 1.3rem; min-width: 150px; }

/* Malblock */
.draw-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.draw-bar .btn.on { background: var(--sun); }
.draw-canvas { border-radius: 16px; display: block; cursor: crosshair; }

/* =================== Weihnachten =================== */
.tile.xmas::before { content: "❄️"; position: absolute; top: 8px; left: 10px; font-size: 1.1rem; }
.xmas-row { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; }
.tree-box { position: relative; height: min(56vh, 440px); aspect-ratio: 200 / 250; }
.tree-box > svg { width: 100%; height: 100%; display: block; }
.ball { width: clamp(54px, 11vw, 70px); position: relative; cursor: grab; touch-action: none; }
.ball svg { width: 100%; display: block; }
.ball.hung { position: absolute; width: 13%; transform: translate(-50%, -50%); pointer-events: none; }
.ball-tray { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 16px; width: min(330px, 92vw); min-height: 110px; background: #fff7dc; }
.tree-star { position: absolute; left: 50%; top: 9%; transform: translate(-50%, -50%); font-size: clamp(3rem, 9vh, 4.6rem); }

.shadow-box { width: min(300px, 64vw, 36vh); aspect-ratio: 1; display: grid; place-items: center; background: #e6f3ff; }
.shadow { font-size: min(170px, 36vw, 20vh); line-height: 1; filter: brightness(0); opacity: .82; transition: filter .5s, opacity .5s; }
.shadow.revealed { filter: none; opacity: 1; }

.sudoku { display: grid; grid-template-columns: repeat(4, 1fr); width: min(400px, 88vw, 50vh); aspect-ratio: 1; padding: 0; overflow: hidden; background: #fff; }
.sd-cell { border: 0; border-right: 2px solid #d8d1ea; border-bottom: 2px solid #d8d1ea; background: #fff; font-size: min(56px, 11vw, 7vh); padding: 0; }
.sd-cell:nth-child(4n+2) { border-right: 4px solid var(--ink); }
.sd-cell:nth-child(4n) { border-right: 0; }
.sd-cell:nth-child(n+5):nth-child(-n+8) { border-bottom: 4px solid var(--ink); }
.sd-cell:nth-child(n+13) { border-bottom: 0; }
.sd-cell.given { background: #f1edfb; }
.sd-cell.sel { background: #fff3c4; box-shadow: inset 0 0 0 4px var(--sun); }
.sd-palette { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.sd-palette .choice { min-width: 74px; min-height: 74px; font-size: 2.4rem; }

.catch-field { position: relative; width: min(760px, 96vw); flex: 1; min-height: 50vh; overflow: hidden; touch-action: none;
  background: linear-gradient(#1f3b73, #3d5fa8 70%, #e9f4ff 70.5%); }
.catch-field::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#fff 1.5px, transparent 2px); background-size: 46px 52px; opacity: .55; }
.sled { position: absolute; left: 0; bottom: 6px; font-size: clamp(3.4rem, 9vw, 4.6rem); line-height: 1; }
.drop { position: absolute; left: 0; top: 0; font-size: 2.6rem; line-height: 1; will-change: transform; }
.catch-again { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 2; }

/* =================== ab 12 =================== */
.big-note { font-size: 1.2rem; font-weight: 700; text-align: center; max-width: 34ch; margin: 0; line-height: 1.4; }
.win-note { font-weight: 700; margin: -6px 0 6px; font-size: 1.1rem; }
.numpad .wide { grid-column: span 3; font-size: 1.3rem; }
.timebar { width: min(520px, 90vw); height: 18px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.timebar i { display: block; height: 100%; width: 100%; background: var(--leaf); transition: width .1s linear; }
.quiz-choices { max-width: 680px; }
.quiz-choices .choice.text { min-width: 200px; font-size: 1.3rem; }
.quiz-card { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 800; padding: 18px 34px; text-align: center; }

.frac-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; line-height: 1.1; background: #fff; border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--pop-sm); padding: 6px 18px; }
.frac span:first-child { border-bottom: 4px solid var(--ink); padding: 0 6px; }
.vs { font-size: 2.4rem; }
.pie { width: min(220px, 50vw, 30vh); }

.cc-wrap { display: flex; gap: 22px; align-items: flex-start; justify-content: center; flex-wrap: wrap; width: 100%; }
.cc-board { display: flex; flex-direction: column; gap: 6px; max-height: 48vh; overflow-y: auto; min-width: 270px; padding: 4px; }
.cc-row { display: flex; align-items: center; gap: 8px; }
.cc-n { width: 26px; font-weight: 800; text-align: right; }
.cc-fb { min-width: 70px; font-size: 1.2rem; letter-spacing: 2px; font-weight: 800; }
.cc-input { padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cc-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.peg { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); display: inline-block; padding: 0; }
.peg.empty { background: #f1edfb; border-style: dashed; }
.cc-row.current .peg { width: 50px; height: 50px; }
.peg.big { width: 58px; height: 58px; box-shadow: 3px 3px 0 var(--ink); }

.robo-wrap { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; }
.robo-grid { position: relative; display: grid; width: min(440px, 92vw); max-height: 46vh; padding: 0; overflow: hidden; background: #fff; }
.robo-cell { border: 1px solid #e3ddf2; display: grid; place-items: center; font-size: clamp(1.2rem, 4vw, 2rem); }
.robo-cell.wall { background: #8b7fb0; border-color: #8b7fb0; }
.bot { position: absolute; display: grid; place-items: center; transition: left .3s, top .3s; font-size: clamp(1.4rem, 4.5vw, 2.2rem); }
.bot-dir { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; color: var(--tomato); font-size: .8em; transition: transform .25s; }
.bot-dir { justify-items: end; padding-right: 2px; }
.robo-side { display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(380px, 94vw); }
.robo-prog { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; min-height: 64px; width: 100%; align-content: flex-start; }
.robo-empty { opacity: .6; font-weight: 700; }
.robo-chip { border: 3px solid var(--ink); border-radius: 12px; background: #fff7dc; font-weight: 800; padding: 6px 8px; font-size: .95rem; }
.robo-chip.now { background: var(--sun); transform: scale(1.1); }
.robo-ctrl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.robo-ctrl .btn { min-height: 52px; font-size: 1rem; padding: 0 .4em; }

.lights { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px; width: min(400px, 88vw, 52vh); aspect-ratio: 1; background: #2d2150; }
.light { border: 3px solid #120b29; border-radius: 14px; background: #4b3d78; padding: 0; transition: background .15s, box-shadow .15s; }
.light.on { background: var(--sun); box-shadow: 0 0 18px 4px rgba(255, 201, 60, .7); }

.schulte { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; width: min(440px, 92vw, 58vh); aspect-ratio: 1; }
.sch-cell { border: 3px solid var(--ink); border-radius: 12px; background: #fff; font-size: clamp(1.2rem, 4.5vw, 1.9rem); font-weight: 800; padding: 0; touch-action: manipulation; }
.sch-cell.hit { background: #dff5e6; color: #9ab8a2; }

/* Benutzername + Bot-Falle */
.name-input { width: 100%; font: inherit; font-size: 1.3rem; font-weight: 700; text-align: center; padding: 14px; border: var(--line) solid var(--ink); border-radius: 20px; background: #f4fbff; color: var(--ink); margin-bottom: 14px; }
.name-input::placeholder { color: #9d93b8; font-weight: 600; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
