:root { --bg: #f4f1ec; --card: #fff; --ink: #1f2328; --muted: #6b6f76; --line: #e2ddd5; --ok: #1f8a4c; --bad: #c0392b; color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #15171a; --card: #1e2125; --ink: #eceae6; --muted: #9ca1a8; --line: #33373d; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: max(16px, env(safe-area-inset-top)) 16px 16px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.card { max-width: 640px; margin: 0 auto; background: var(--card); border-radius: 20px; padding: 24px 20px; box-shadow: 0 2px 16px rgb(0 0 0 / .06); }
header { margin-bottom: 20px; }
.title { display: flex; align-items: center; gap: 12px; }
.emoji { font-size: 32px; }
h1 { font-size: 24px; margin: 0; line-height: 1.2; }
h2 { font-size: 22px; margin: 0 0 16px; line-height: 1.3; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 15px; }
.progress { display: flex; gap: 6px; margin-top: 16px; }
.dot { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.dot.done, .dot.current { background: var(--accent); }
.dot.current { opacity: .55; }
.bullets { padding-left: 22px; margin: 0 0 8px; }
.bullets li { margin-bottom: 8px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
.rating { display: flex; justify-content: space-between; gap: 8px; }
.face { flex: 1; aspect-ratio: 1; max-width: 96px; font-size: clamp(32px, 9vw, 48px); background: var(--bg); border-radius: 18px; border: 3px solid transparent; transition: transform .1s; }
.face[aria-checked="true"] { border-color: var(--accent); transform: scale(1.06); }
.options { display: grid; gap: 12px; }
.option { min-height: 64px; padding: 14px 18px; text-align: left; background: var(--bg); border: 2px solid var(--line); border-radius: 14px; font-size: 18px; }
.option.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); font-weight: 600; }
.option.correct { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.option.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.option[aria-disabled="true"] { cursor: default; }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 17px; }
.feedback.ok { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.feedback.nope { background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
textarea { width: 100%; font: inherit; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); }
nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.primary, .secondary { min-height: 60px; padding: 0 28px; border-radius: 30px; font-weight: 600; font-size: 18px; }
.primary { background: var(--accent); color: #fff; margin-left: auto; }
.primary:disabled { opacity: .35; cursor: default; }
.secondary { background: transparent; border: 2px solid var(--line); }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.error { color: var(--bad); margin-top: 12px; text-align: right; }
.thanks { text-align: center; padding: 24px 0; }
.big { width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 48px; line-height: 88px; }
.score { font-size: 22px; font-weight: 700; color: var(--accent); }
.index .tiles { list-style: none; padding: 0; display: grid; gap: 12px; margin: 0 0 20px; }
.tile { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; padding: 16px; border-radius: 14px; border: 2px solid var(--line); text-decoration: none; color: inherit; border-left: 6px solid var(--accent); }
.tile span { grid-row: span 2; font-size: 30px; }
.tile code { color: var(--muted); font-size: 14px; }
a { color: inherit; }
.tile small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

/* Gemeinsame Spiel-Bausteine */
.stat { margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--accent); }
.center { text-align: center; }
.primary.wide { width: 100%; margin: 0; }
nav.split { gap: 12px; }
nav.split > * { flex: 1; margin: 0; }
.pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reveal-badge { display: inline-block; padding: 10px 18px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall 2.2s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--drift), 105vh) rotate(720deg); } }

/* Memory */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; perspective: 800px; }
.mem { aspect-ratio: 3 / 4; padding: 0; background: none; }
.mem-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .4s; transform-style: preserve-3d; }
.mem.flipped .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; font-size: clamp(28px, 9vw, 44px); }
.mem-back { background: var(--accent); color: #fff8; font-weight: 800; background-image: radial-gradient(#fff3 2px, transparent 2px); background-size: 12px 12px; }
.mem-front { background: var(--bg); border: 2px solid var(--line); transform: rotateY(180deg); }
.mem.matched .mem-front { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); animation: pop .4s; }

/* Mythos oder Fakt */
.swipe-stage { position: relative; min-height: 300px; display: grid; place-items: center; margin: 8px 0; }
.swipe-card { position: relative; width: 100%; min-height: 280px; padding: 28px 20px; border-radius: 22px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 10px 30px rgb(0 0 0 / .12); text-align: center; display: grid; place-content: center; gap: 10px; touch-action: pan-y; user-select: none; cursor: grab; transition: transform .28s ease; --left: 0; --right: 0; }
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card.fly { transition: transform .3s ease-in; }
.swipe-emoji { font-size: 64px; }
.swipe-text { font-size: 22px; font-weight: 600; margin: 0; }
.swipe-label { position: absolute; top: 18px; padding: 4px 12px; border: 3px solid; border-radius: 8px; font-weight: 800; letter-spacing: .08em; }
.swipe-label.left { left: 16px; color: var(--bad); transform: rotate(-12deg); opacity: var(--left); }
.swipe-label.right { right: 16px; color: var(--ok); transform: rotate(12deg); opacity: var(--right); }
.reveal { width: 100%; padding: 20px; border-radius: 18px; text-align: center; }
.reveal.ok { background: color-mix(in srgb, var(--ok) 12%, var(--card)); }
.reveal.nope { background: color-mix(in srgb, var(--bad) 10%, var(--card)); }
.reveal-verdict { font-weight: 700; }
.myth { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }

/* Glücksrad */
.wheel-wrap { position: relative; width: min(100%, 340px); margin: 8px auto 20px; }
.wheel { display: block; width: 100%; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .18)); }
.rotor { transform-origin: 100px 100px; transition: transform 4s cubic-bezier(.12, .7, .1, 1); }
.pointer { position: absolute; top: -6px; left: 50%; z-index: 1; translate: -50% 0; width: 0; height: 0; border: 16px solid transparent; border-top: 28px solid var(--ink); border-bottom: 0; }
.tip-card { margin-top: 8px; padding: 18px; border-radius: 16px; border-left: 8px solid var(--seg); background: color-mix(in srgb, var(--seg) 10%, var(--card)); }
.tip-label { font-weight: 800; font-size: 20px; margin-bottom: 8px; }

/* Atem-Ballon */
.balloon-stage { height: 280px; display: grid; place-items: center; overflow: hidden; }
.balloon { --s: 0; font-size: 64px; transform: scale(calc(1 + var(--s) * 2.6)) translateY(calc(var(--s) * -6px)); filter: saturate(calc(.6 + var(--s))); }
.breath-guide { text-align: center; font-size: 20px; min-height: 2.2em; }
.hold { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; transition: transform .15s; }
.hold.pressed { transform: scale(.96); filter: brightness(1.1); }

/* Zucker-Schätzen */
.item-emoji { font-size: 64px; margin-bottom: 4px; }
.pile { min-height: 96px; display: flex; align-items: flex-end; justify-content: center; margin: 8px 0; }
.cubes { display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 4px; max-width: 260px; }
.cubes i { width: 22px; height: 22px; border-radius: 4px; background: #fff; border: 1px solid #d9d4cc; box-shadow: inset -3px -3px 0 #ece7df; animation: pop .25s both; }
.cubes.drop i { animation: drop .4s both; }
@keyframes drop { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
.guess { display: block; text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 8px; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--accent); }
.compare { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
