/* KRABBARC 3000 – Riso-Collage auf Papier */
@font-face { font-family: 'Bungee'; src: url('/fonts/bungee.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/fonts/rubik-500.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/fonts/rubik-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/fonts/rubik-900.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }

:root {
  --paper: #f4ecd8; --paper2: #e8dcc0;
  --pink: #ff48b0; --blue: #0078bf; --yellow: #ffe800; --green: #00a95c;
  --orange: #ff6c2f; --purple: #765ba7; --teal: #00838a; --ink: #2a2236; --white: #fffaf0;
  /* dunklere Druckfarben für Text (Kontrast >= 4,5:1 auf Papier/Weiß) */
  --pink-ink: #d0147a; --green-ink: #00703c; --orange-ink: #c2410c; --blue-ink: #005a91;
  --c: var(--pink); --ct: var(--pink-ink);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Bungee', 'Rubik', system-ui, sans-serif;
  --body: 'Rubik', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 500 16px/1.4 var(--body);
  color: var(--ink);
  background: var(--paper) var(--grain) repeat;
  background-size: 160px;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  user-select: none; -webkit-user-select: none;
}
/* großer Rasterklecks im Hintergrund */
body::before {
  content: ''; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 72, 176, .22) 0 18vmax, transparent 18.2vmax),
    radial-gradient(circle at 92% 38%, rgba(255, 232, 0, .35) 0 14vmax, transparent 14.2vmax),
    radial-gradient(circle at 20% 88%, rgba(0, 120, 191, .16) 0 20vmax, transparent 20.2vmax);
  mix-blend-mode: multiply;
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(3vmax, -2vmax) rotate(4deg); } }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.screen { padding: calc(16px + var(--safe-t)) 16px calc(96px + var(--safe-b)); animation: screenIn .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) rotate(-.6deg); } }
.screen.playing { padding: 0; height: 100dvh; animation: none; }
.screen.title, .screen.finale { padding-bottom: calc(32px + var(--safe-b)); text-align: center; }

b { font-weight: 800; }
h2, h3, h4 { margin: 0; }
.mis {
  font: 400 34px/1 var(--display);
  /* auf schmalen Handys kleiner, damit lange Wörter wie „Weiterträumen“ im Kasten (Breite ≈ 100vw − 74px) in eine Zeile passen */
  font-size: min(34px, calc((100vw - 74px) * .105));
  color: var(--pink-ink);
  text-shadow: 2.5px 2.5px 0 var(--blue);
  mix-blend-mode: multiply;
  letter-spacing: -.5px;
  overflow-wrap: break-word; hyphens: manual;
}
.mis.huge { font-size: clamp(34px, 11vw, 50px); }
.sec { font: 400 15px/1 var(--display); letter-spacing: .5px; color: var(--blue-ink); margin: 26px 2px 12px; text-transform: uppercase; }
.sub { color: rgba(42, 34, 54, .7); font-size: 14px; margin: 6px 0 16px; }

/* ---------- Knöpfe ---------- */
.btn {
  font: 400 17px/1 var(--display); letter-spacing: .3px;
  border: 3px solid var(--ink); border-radius: 14px 18px 13px 17px / 17px 13px 18px 14px;
  background: var(--white); color: var(--ink);
  padding: 14px 18px; min-height: 52px; cursor: pointer;
  box-shadow: 4px 5px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
  touch-action: manipulation;
}
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.pink { background: var(--pink-ink); color: var(--white); box-shadow: 4px 5px 0 var(--blue); border-color: var(--ink); }
.btn.pink:active { box-shadow: 1px 1px 0 var(--blue); }
.btn.big { display: block; width: 100%; font-size: 22px; min-height: 64px; margin-top: 18px; }
.btn.ghost { background: transparent; box-shadow: none; border-style: dashed; }
.btn.mini { min-height: 40px; padding: 8px 12px; font-size: 15px; box-shadow: 2px 3px 0 var(--ink); }
.btn.wobble { animation: wob 2.4s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.4deg) scale(1.02); } }
.linkish { display: block; margin: 16px auto 0; min-height: 44px; background: none; border: 0; color: var(--blue-ink); font: 700 14px var(--body); text-decoration: underline wavy; text-underline-offset: 4px; padding: 8px; }
.back { background: none; border: 0; font: 700 15px var(--body); color: var(--ink); padding: 12px 12px 12px 0; min-height: 44px; margin-bottom: 4px; }

/* ---------- Krabbe aus Papier ---------- */
.krabbe { position: relative; width: 120px; height: 104px; margin: 0 auto; }
.krabbe .shell { position: absolute; left: 10%; right: 10%; top: 38%; bottom: 8%; background: var(--orange); border: 3px solid var(--ink); border-radius: 50% 50% 44% 46% / 60% 60% 40% 40%; mix-blend-mode: multiply; }
.krabbe .face { position: absolute; left: 50%; top: 2%; width: 58%; aspect-ratio: 1; transform: translateX(-50%) rotate(-4deg); border-radius: 47% 53% 50% 50%; border: 4px solid var(--white); box-shadow: 3px 4px 0 var(--blue); object-fit: cover; }
.krabbe .claw { position: absolute; top: 18%; width: 30%; height: 34%; background: var(--orange); border: 3px solid var(--ink); border-radius: 60% 60% 20% 60%; mix-blend-mode: multiply; animation: snip 1.2s ease-in-out infinite; }
.krabbe .claw.l { left: -10%; transform-origin: 80% 90%; }
.krabbe .claw.r { right: -10%; transform: scaleX(-1); transform-origin: 20% 90%; animation-delay: .3s; }
@keyframes snip { 50% { rotate: -14deg; } }
.krabbe { isolation: isolate; }
/* drei Beine je Seite, setzen hinter dem Panzer an (z-index -1) und knicken nach außen und unten ab */
.krabbe .legs { position: absolute; inset: 0; z-index: -1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 87' preserveAspectRatio='none'%3E%3Cpath d='M22 50L6 46L1 58M20 59L4 58L0 71M22 68L8 71L5 84M78 50L94 46L99 58M80 59L96 58L100 71M78 68L92 71L95 84' fill='none' stroke='%232a2236' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat; animation: scuttle .5s steps(2) infinite; }
@keyframes scuttle { 50% { transform: translateY(1px) skewX(-3deg); } }
.krabbe.big { width: 200px; height: 174px; }
.krabbe.mid { width: 92px; height: 80px; flex: none; }
.krabbe.spin { animation: spin 1.4s linear infinite; width: 90px; height: 78px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Titel ---------- */
.title-art { position: relative; height: 250px; margin-top: 10px; }
.title-art .sun { position: absolute; left: 50%; top: 12px; width: 230px; height: 230px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, var(--yellow) 0 30%, transparent 30.5%) 0 0 / 14px 14px, var(--yellow); mix-blend-mode: multiply; opacity: .9; animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.06) rotate(8deg); } }
.title-art .krabbe { position: absolute; left: 50%; top: 44px; margin-left: -100px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(2deg); } }
.zzz { position: absolute; right: 18%; top: 4px; font: 400 30px var(--display); color: var(--blue); }
.zzz span { display: inline-block; animation: zz 2.4s ease-in-out infinite; }
.zzz span:nth-child(2) { animation-delay: .4s; font-size: .8em; }
.zzz span:nth-child(3) { animation-delay: .8s; font-size: 1.3em; color: var(--pink); }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 10px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -26px) rotate(14deg); } }
.logo { margin: 8px 0 14px; line-height: .86; font-weight: 400; font-family: var(--display); mix-blend-mode: multiply; }
.logo span { display: block; }
.logo .l1 { font-size: clamp(44px, 14.5vw, 66px); color: var(--pink); text-shadow: 3px 3px 0 var(--blue); transform: rotate(-3deg); }
.logo .l2 { font-size: clamp(60px, 22vw, 100px); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); text-shadow: 5px 5px 0 var(--orange); transform: rotate(2deg); margin-top: -4px; }
.tagline { font-size: 18px; font-weight: 600; margin: 10px 8px; }
.tagline.small { font-size: 15px; font-weight: 500; opacity: .8; }
.foot { font-size: 14px; opacity: .85; margin-top: 14px; }

/* ---------- Namenswahl ---------- */
.name-head { display: flex; gap: 12px; align-items: center; margin: 8px 0 18px; }
.name-head p { margin: 6px 0 0; font-size: 15px; }
.guest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ticket {
  font: 400 17px var(--display); padding: 14px 4px; min-height: 56px; border: 2.5px solid var(--ink); background: var(--white);
  border-radius: 6px; rotate: var(--r); box-shadow: 3px 3px 0 var(--pink); position: relative; color: var(--ink);
}
.ticket::before, .ticket::after { content: ''; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); }
.ticket::before { left: -8px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -8px; clip-path: inset(0 50% 0 0); }
.ticket:active { background: var(--yellow); transform: scale(.95); }
.name-row { display: flex; gap: 10px; margin-top: 18px; }
.name-input { flex: 1; min-width: 0; font: 700 18px var(--body); padding: 12px 14px; border: 3px solid var(--ink); border-radius: 12px; background: var(--white); color: var(--ink); user-select: text; -webkit-user-select: text; }
.name-msg { min-height: 22px; font-weight: 700; color: var(--pink); }

/* ---------- Traumpfad ---------- */
.path-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.me { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.me b { display: block; font: 400 19px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-size: 13px; opacity: .75; }
.me-icon { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; rotate: -8deg; flex: none; }
.rekord { text-align: right; line-height: 1.1; }
.rekord b { display: block; font: 400 22px var(--display); color: var(--blue); }
.rekord small { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.mute { background: none; border: 0; font-size: 22px; padding: 8px; min-width: 44px; min-height: 44px; }

.hero {
  position: relative; padding: 20px 18px 18px; border: 3px solid var(--ink); border-radius: 22px 16px 24px 14px / 16px 24px 14px 22px;
  background: var(--white); box-shadow: 6px 7px 0 var(--c);
  rotate: -1deg;
}
.hero::before { content: ''; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: rgba(255, 232, 0, .75); rotate: 3deg; mix-blend-mode: multiply; }
.hero-kicker { font: 800 13px var(--body); text-transform: uppercase; letter-spacing: 1px; color: var(--ct); }
.hero-time { font: 400 44px/1 var(--display); color: var(--ink); margin: 8px 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-time span { font: 700 15px var(--body); opacity: .7; }
.hero-genre { margin: 8px 0 0; font-weight: 700; }
.hero.fever p { margin: 10px 0 0; }
.roomnote { margin: 18px 6px 0; font-size: 15px; background: var(--yellow); display: inline-block; padding: 4px 10px; rotate: .8deg; mix-blend-mode: multiply; }

.scrap { margin: 18px 4px 0; padding: 10px 14px 12px; background: var(--white); border: 2px dashed var(--purple); border-radius: 4px; rotate: var(--r); font-weight: 600; font-size: 15px; position: relative; }
.scrap small { display: block; font: 400 13px var(--display); color: var(--purple); letter-spacing: .5px; margin-bottom: 2px; }
.dreams { list-style: none; margin: 0; padding: 0 0 0 64px; position: relative; }
.dreams::before { content: ''; position: absolute; left: 30px; top: 10px; bottom: 26px; border-left: 3px dashed var(--ink); opacity: .4; }
.dream { position: relative; margin-bottom: 14px; }
.dream-time { position: absolute; left: -64px; top: 14px; width: 56px; font: 400 14px var(--display); text-align: center; background: var(--paper); padding: 2px 0; }
.dream-card {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 12px; min-height: 68px;
  font: inherit; color: inherit; background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px 16px 10px 14px;
  box-shadow: 4px 4px 0 var(--c); rotate: var(--r); cursor: pointer;
}
.dream-card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--c); }
.dream-emoji { font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, transparent); }
.dream-txt { flex: 1; min-width: 0; }
.dream-txt b { display: block; font-size: 16px; line-height: 1.15; }
.dream-txt small { font-size: 13.5px; opacity: .85; }
.dream-best { text-align: right; line-height: 1.05; flex: none; }
.dream-best b { font: 400 17px var(--display); color: var(--ct); display: block; }
.dream-best small { font-size: 13px; opacity: .85; }
.dream.locked .dream-card { opacity: .75; box-shadow: none; border-style: dashed; filter: grayscale(.8); }
.dream.done .dream-time { color: var(--green); }
.dream-endcard { padding: 12px; font-weight: 700; opacity: .7; }
.queue { font-size: 13px; color: var(--blue); }

.c-pink { --c: var(--pink); --ct: var(--pink-ink); } .c-blue { --c: var(--blue); --ct: var(--blue); } .c-yellow { --c: #e0c600; --ct: #8a6d00; } .c-green { --c: var(--green); --ct: var(--green-ink); }
.c-orange { --c: var(--orange); --ct: var(--orange-ink); } .c-purple { --c: var(--purple); --ct: var(--purple); } .c-teal { --c: var(--teal); --ct: var(--teal); }

/* ---------- Traumkarte ---------- */
.intro-card { position: relative; padding-top: 6px; }
.intro-time { display: flex; gap: 10px; align-items: baseline; font-weight: 700; }
.intro-time b { font: 400 26px var(--display); background: var(--ct); color: var(--white); padding: 4px 10px 2px; rotate: -2deg; display: inline-block; mix-blend-mode: multiply; }
.intro-card h2 { margin: 14px 0 6px; }
.intro-genre { font-weight: 700; margin: 0 0 16px; opacity: .8; }
.speech { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; text-align: left; }
.speech .face { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); box-shadow: 3px 3px 0 var(--blue); flex: none; rotate: -6deg; }
.speech p { margin: 0; position: relative; background: var(--white); border: 2.5px solid var(--ink); border-radius: 16px 18px 18px 6px; padding: 10px 14px; font-weight: 600; font-size: 16px; }
.chips { list-style: none; padding: 0; margin: 6px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 800 14px var(--body); padding: 8px 12px; border: 2.5px solid var(--ink); background: var(--yellow); rotate: var(--r); border-radius: 4px; mix-blend-mode: multiply; }
.how { background: rgba(255, 255, 255, .6); border-left: 5px solid var(--c); padding: 10px 12px; margin: 0; font-size: 15px; }
.mutbox { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border: 2.5px dashed var(--purple); border-radius: 12px; background: rgba(118, 91, 167, .1); }
.mutbox > div:first-child { flex: 1; display: flex; flex-direction: column; }
.mutbox small { font-size: 12px; opacity: .75; }
.mutbox b { font: 400 17px var(--display); color: var(--purple); }
.mut-actions { display: flex; gap: 6px; }
.rules-full ul, .spick-card ul { margin: 10px 0 0; padding-left: 20px; }
.rules-full li, .spick-card li { margin: 6px 0; font-size: 15px; }

/* ---------- Spielbühne ---------- */
.stage { position: relative; width: 100%; height: 100dvh; overflow: hidden; touch-action: none; background: var(--paper); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--grain); background-size: 160px; mix-blend-mode: multiply; opacity: .9; }
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mut-wackel .game-canvas { animation: wackel 3.2s ease-in-out infinite; }
@keyframes wackel { 25% { transform: skewX(1.5deg) scaleY(1.01); } 75% { transform: skewX(-1.5deg) scaleY(.99); } }
.hud { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 10px 0; pointer-events: none; }
.hud-score-wrap { background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 4px 10px 3px; text-align: center; min-width: 74px; box-shadow: 3px 3px 0 var(--pink); line-height: 1; }
.hud-score { font: 400 22px var(--display); display: block; }
.hud-score.bump { animation: bump .25s; }
@keyframes bump { 40% { transform: scale(1.3); color: var(--pink); } }
.hud-score-wrap small { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; opacity: .7; }
.hud-mid { flex: 1; min-width: 0; }
.hud-label { font: 800 14px var(--body); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 6px var(--paper), 0 0 3px var(--paper); }
.hud-bar { height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); overflow: hidden; margin-top: 3px; }
.hud-bar i { display: block; height: 100%; width: 100%; background: var(--blue); transition: width .15s linear; }
.hud-pause { pointer-events: auto; width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--white); display: flex; gap: 5px; align-items: center; justify-content: center; box-shadow: 2px 3px 0 var(--ink); }
.hud-pause span { width: 5px; height: 16px; background: var(--ink); border-radius: 2px; }
.mut-tag { position: absolute; z-index: 3; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%) rotate(-2deg); font: 800 12px var(--body); background: var(--purple); color: var(--white); padding: 3px 10px; border-radius: 4px; pointer-events: none; white-space: nowrap; animation: mutfade 5s forwards; }
@keyframes mutfade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

.banner { position: absolute; z-index: 4; left: 0; right: 0; top: 38%; text-align: center; pointer-events: none;
  font: 400 clamp(44px, 15vw, 72px)/1 var(--display); color: var(--c, var(--pink)); text-shadow: 4px 4px 0 var(--blue); mix-blend-mode: multiply; }
.banner.go { animation: bannerIn .9s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes bannerIn { 0% { transform: scale(2.6) rotate(-12deg); opacity: 0; } 25% { transform: scale(1) rotate(-4deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(.9) rotate(2deg); opacity: 0; } }

.coach { position: absolute; z-index: 5; left: 0; right: 0; top: calc(66px + var(--safe-t)); padding: 0 12px; pointer-events: none; }
.coach:not(.block) .coach-bubble { padding: 8px 12px; box-shadow: 3px 4px 0 var(--pink); opacity: .96; }
.coach[data-at=bottom]:not(.block) { top: auto; bottom: calc(14px + var(--safe-b)); }
.coach[data-at=mid]:not(.block) { top: 31%; }
.coach:not(.block) .coach-bubble img { width: 40px; height: 40px; }
.coach:not(.block) .coach-bubble p { font-size: 15px; }
.coach.block { top: 0; bottom: 0; padding: 0 12px calc(16px + var(--safe-b)); pointer-events: auto; display: flex; align-items: flex-end; background: rgba(42, 34, 54, .18); }
.coach-bubble { position: relative; width: 100%; display: flex; gap: 12px; align-items: center; background: var(--white); border: 3px solid var(--ink); border-radius: 18px 20px 20px 8px; padding: 12px 14px; box-shadow: 5px 6px 0 var(--pink); }
.coach.in .coach-bubble { animation: coachIn .35s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes coachIn { from { transform: translateY(40px) rotate(-3deg) scale(.9); opacity: 0; } }
.coach-bubble img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 3px solid var(--paper); box-shadow: 2px 2px 0 var(--blue); flex: none; }
.coach-bubble p { margin: 0; font: 700 17px/1.3 var(--body); }
.coach-body { flex: 1; min-width: 0; }
.coach-pic { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.coach-pic span { flex: 1 1 0; min-width: 52px; text-align: center; background: var(--paper); border: 2.5px solid var(--c, var(--ink)); border-radius: 10px; padding: 4px 2px 3px; box-shadow: 2px 2px 0 var(--c, var(--ink)); }
.coach-pic b { display: block; font: 400 22px/1.15 var(--display); white-space: nowrap; }
.coach-pic small { display: block; font: 800 10.5px/1.2 var(--body); overflow-wrap: anywhere; }
.coach-bubble > small { position: absolute; right: 12px; bottom: -12px; background: var(--yellow); border: 2px solid var(--ink); font: 800 13px var(--body); padding: 1px 8px; border-radius: 8px; text-transform: uppercase; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .4; } }

.pause { position: absolute; inset: 0; z-index: 6; background: rgba(42, 34, 54, .55); display: grid; place-items: center; padding: 20px; }
.pause-card { width: 100%; max-width: 340px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 22px; text-align: center; box-shadow: 6px 6px 0 var(--pink); }
.pause-card h2 { font: 400 32px var(--display); }
.pause-card .btn { width: 100%; margin-top: 12px; }
.pause-how { margin: 10px 0 4px; font-size: 15px; line-height: 1.35; text-align: left; }
.loading { height: 100%; display: grid; place-content: center; text-align: center; font-weight: 700; }

/* ---------- Auswertung ---------- */
.res-top { text-align: center; }
.res-kicker { font: 800 13px var(--body); text-transform: uppercase; letter-spacing: 1px; color: var(--ct); }
.res-top h2 { margin-top: 10px; }
.res-score { margin: 10px 0 4px; }
.res-points { display: block; font: 400 clamp(64px, 20vw, 92px)/1 var(--display); color: var(--yellow); -webkit-text-stroke: 3px var(--ink); text-shadow: 5px 5px 0 var(--pink); }
.res-points.pop { animation: bump .4s; }
.res-score small { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.res-mult, .res-prev { margin: 4px 0; font-weight: 700; opacity: .75; }
.newbest { display: inline-block; margin: 8px 0; font: 400 20px var(--display); color: var(--white); background: var(--green-ink); padding: 6px 14px; rotate: -3deg; border: 2.5px solid var(--ink); animation: wob 1.4s infinite; }
.res-lines { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.res-lines li { background: rgba(255, 255, 255, .65); border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rule { position: relative; background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 12px 12px 12px 92px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.rule p { margin: 0; font-size: 15px; }
.rule a { color: var(--blue); font-weight: 800; margin-top: 6px; }
.stamp { position: absolute; left: 6px; top: 50%; translate: 0 -50%; width: 76px; text-align: center; font: 400 13px var(--display); text-transform: uppercase; padding: 8px 0; border: 3px double currentColor; border-radius: 8px; rotate: -10deg; mix-blend-mode: multiply; }
.rule.ok .stamp { color: var(--green-ink); }
.rule.bad .stamp { color: var(--pink-ink); }
.rule.seen .stamp { color: var(--blue); opacity: .75; }
.rule { animation: ruleIn .4s backwards; }
.rule:nth-child(2) { animation-delay: .08s; } .rule:nth-child(3) { animation-delay: .16s; } .rule:nth-child(4) { animation-delay: .24s; }
.rule:nth-child(5) { animation-delay: .32s; } .rule:nth-child(6) { animation-delay: .4s; } .rule:nth-child(7) { animation-delay: .48s; }
@keyframes ruleIn { from { opacity: 0; transform: translateX(-20px) rotate(-2deg); } }
.oktoggle { position: relative; width: 100%; margin-top: 10px; text-align: left; padding: 12px 12px 12px 92px; min-height: 56px; background: rgba(0, 169, 92, .1); border: 2.5px dashed var(--green); border-radius: 12px; font: 700 15px var(--body); color: var(--ink); }
.oktoggle .stamp { color: var(--green-ink); }
.oktoggle small { display: block; font-size: 13px; color: var(--green-ink); text-decoration: underline; }
.oktoggle.open small { visibility: hidden; }
.oktoggle + .rules { margin-top: 10px; }
.res-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 20px; align-items: end; }
.res-actions .btn.big { margin-top: 0; font-size: 18px; }
.res-status { font-size: 13px; text-align: center; opacity: .7; min-height: 18px; }

/* ---------- Aufwachen ---------- */
.alarmclock { font-size: 90px; animation: ring .25s infinite; margin-top: 20px; }
@keyframes ring { 50% { transform: rotate(14deg); } }
.recap { text-align: left; list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 6px; }
.recap li, .sched li { display: flex; gap: 12px; align-items: baseline; background: rgba(255, 255, 255, .6); padding: 8px 12px; border-radius: 8px; border: 2px solid var(--ink); }
.recap b, .sched b { font: 400 16px var(--display); min-width: 54px; color: var(--blue); }

/* ---------- Spickzettel ---------- */
.sched { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.sched li.now { background: var(--yellow); box-shadow: 3px 3px 0 var(--pink); }
.sched em { margin-left: auto; font: 400 12px var(--display); color: var(--pink); font-style: normal; }
.myroom { background: var(--pink-ink); color: var(--white); padding: 12px 14px; border-radius: 12px; border: 2.5px solid var(--ink); margin-bottom: 18px; font-size: 17px; rotate: -.6deg; }
.spick-card { background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px; margin-bottom: 14px; box-shadow: 4px 4px 0 var(--c); }
.spick-head { display: flex; gap: 10px; align-items: center; }
.spick-head > span { font-size: 28px; }
.spick-head b { display: block; font: 400 18px var(--display); }
.spick-head small { opacity: .7; }
.spick-card a { color: var(--blue); font-weight: 800; display: inline-block; padding: 10px 4px; min-height: 44px; }
.rooms { list-style: none; padding: 0 !important; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rooms li { margin: 0 !important; background: var(--paper); padding: 6px 8px; border-radius: 6px; font-weight: 700; font-size: 14px !important; }
.rooms li.mine { background: var(--yellow); }
.maplink { display: inline-block; margin-top: 10px; }

/* ---------- Rangliste ---------- */
.tabs { display: flex; gap: 8px; margin: 14px 0; }
.btn.tab { flex: 1; min-height: 44px; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); }
.btn.tab.on { background: var(--blue); color: var(--white); }
.lb { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lb li { display: flex; align-items: center; gap: 10px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.lb li.me { background: var(--yellow); box-shadow: 3px 3px 0 var(--pink); }
.lb-rank { font: 400 18px var(--display); width: 34px; text-align: center; }
.lb-name { flex: 1; min-width: 0; }
.lb-name b { display: block; font-size: 17px; }
.lb-name small, .lb-pts small { font-size: 13px; opacity: .8; }
.lb-pts { text-align: right; line-height: 1.1; }
.lb-pts b { display: block; font: 400 19px var(--display); color: var(--blue); }
.lb-game { background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: 3px 3px 0 var(--c); }
.lb-game h4 { font: 400 16px var(--display); margin-bottom: 6px; }
.lb-game ol { margin: 0; padding-left: 22px; }
.lb-game li { display: flex; justify-content: space-between; padding: 2px 0; }
.lb-game li.me { font-weight: 800; color: var(--pink); }
.ticker { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.ticker li { font-size: 13px; background: var(--ink); color: var(--paper); padding: 6px 10px; border-radius: 6px; animation: screenIn .3s; }
.ticker li b { color: var(--yellow); }

/* ---------- Navigation ---------- */
#nav { position: fixed; z-index: 10; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(460px, calc(100% - 20px));
  display: flex; gap: 6px; padding: 6px; background: var(--ink); border-radius: 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
#nav[hidden] { display: none; }
#nav button { flex: 1; border: 0; background: transparent; color: var(--paper); font: 800 13px var(--body); padding: 8px 4px 6px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; }
#nav button span { font-size: 20px; }
#nav button.on { background: var(--pink-ink); color: var(--white); }

.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-weight: 700; max-width: 90vw; text-align: center; animation: screenIn .25s; transition: opacity .4s; }
.toast.out { opacity: 0; }
.noscript { padding: 40px; text-align: center; }

/* Querformat auf dem Handy: bitte drehen */
#rotate { display: none; }
html.landscape #rotate { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--paper); flex-direction: column; align-items: center; justify-content: center; gap: 10px; font: 400 22px var(--display); color: var(--pink-ink); text-align: center; padding: 20px; }
html.landscape #rotate span { font-size: 60px; animation: rot 1.6s ease-in-out infinite; }
html.landscape #rotate small { font: 600 15px var(--body); color: var(--ink); }
@keyframes rot { 50% { transform: rotate(-90deg); } }
/* kleine Handys */
@media (max-height: 700px) {
  .mis.huge { font-size: 34px; }
  .intro-card h2 { margin: 8px 0 4px; }
  .speech { margin: 10px 0; }
  .speech p { font-size: 15px; }
  .btn.big { margin-top: 12px; min-height: 58px; }
  .hero-time { font-size: 36px; }
}

/* Namensbestätigung, Traumcode, Abzeichen */
.ticket.taken { opacity: .8; border-style: dashed; box-shadow: none; background: var(--paper2); }
.ticket small { display: block; font: 800 13px var(--body); }
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(42, 34, 54, .45); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.sheet-card { width: 100%; max-width: 460px; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 20px 18px calc(18px + var(--safe-b)); box-shadow: 0 -4px 0 var(--pink); animation: screenIn .3s; }
.sheet-card h3 { font: 400 24px var(--display); color: var(--pink-ink); margin-bottom: 8px; }
.sheet-card p { margin: 6px 0 12px; font-size: 16px; }
.sheet-card .btn { width: 100%; margin-top: 10px; }
.code { font: 400 44px var(--display); letter-spacing: 8px; color: var(--blue); text-align: center; background: var(--white); border: 3px dashed var(--blue); border-radius: 12px; padding: 10px; margin: 10px 0; user-select: text; -webkit-user-select: text; }
.code-input { width: 100%; font: 400 34px var(--display); letter-spacing: 10px; text-align: center; padding: 10px; border: 3px solid var(--ink); border-radius: 12px; background: var(--white); color: var(--ink); user-select: text; -webkit-user-select: text; }
.badges { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.badge { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--white); text-align: left; }
.badge > span { font-size: 28px; width: 40px; text-align: center; flex: none; }
.badge b { display: block; font: 400 15px var(--display); }
.badge small { font-size: 13px; opacity: .8; }
.badge.new { background: var(--yellow); box-shadow: 3px 3px 0 var(--pink); animation: wob 1.4s ease-in-out 3; }
.badge.locked { opacity: .85; border-style: dashed; background: var(--paper2); }
.badge.locked > span { filter: grayscale(1); }
.dream-badges { display: block; font-size: 13px; margin-top: 2px; }
.nexttitle { margin: 12px 4px 0; font-size: 14px; font-weight: 700; color: rgba(42, 34, 54, .85); }
.nexttitle i { display: block; height: 10px; margin-top: 4px; border: 2px solid var(--ink); border-radius: 6px; background: linear-gradient(90deg, var(--yellow) var(--p), var(--white) var(--p)); }
.mycode { margin-top: 18px; padding: 12px 14px; border: 2px dashed var(--blue); border-radius: 12px; font-size: 15px; background: var(--white); }
.mycode b { font: 400 22px var(--display); color: var(--blue); letter-spacing: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
