/* =====================================================================
   Stadt Land Fluss – Party-Edition
   ===================================================================== */
:root {
  --bg: #0d0726;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .14);
  --pink: #ff3d8b;
  --yellow: #ffd23f;
  --orange: #ff8a3d;
  --cyan: #2de2e6;
  --violet: #7b5cff;
  --lime: #a6ff4d;
  --red: #ff4d5e;
  --deep: #1a0b3d;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --spring: cubic-bezier(.2, .9, .3, 1.4);
  --springy: cubic-bezier(.2, .9, .3, 1.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.upper { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .8rem; }

/* ---------------------------------------------------------------- Hintergrund */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 900px at 12% -5%, #2b1078 0%, transparent 60%),
    radial-gradient(900px 700px at 105% 105%, #5b0e52 0%, transparent 60%),
    linear-gradient(160deg, #0d0726, #140a38 60%, #0b0620);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.blob {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(90px); opacity: .32; animation: float 24s ease-in-out infinite;
}
.b1 { background: var(--pink); top: -16vmax; left: -12vmax; }
.b2 { background: var(--cyan); bottom: -22vmax; right: -12vmax; opacity: .2; animation-delay: -8s; }
.b3 { background: var(--violet); top: 30%; left: 38%; width: 30vmax; height: 30vmax; opacity: .28; animation-delay: -15s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6vmax, 4vmax) scale(1.12); }
  66% { transform: translate(-4vmax, 6vmax) scale(.94); }
}
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

/* ---------------------------------------------------------------- Bausteine */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.panel { padding: 1.3rem 1.5rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; font-weight: 800; letter-spacing: .01em;
  background: rgba(255, 255, 255, .1); border: 1px solid var(--line);
  transition: transform .15s, box-shadow .25s, opacity .2s, background .2s;
  user-select: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.97); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, var(--pink), var(--orange));
  border: 0; color: #fff; box-shadow: 0 10px 30px -8px rgba(255, 61, 139, .75);
}
.btn.primary:not(:disabled) { animation: pulseGlow 2.4s ease-in-out infinite; }
.btn.primary-flat { background: linear-gradient(135deg, var(--violet), var(--pink)); border: 0; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 30px -8px rgba(255, 61, 139, .7); }
  50% { box-shadow: 0 10px 55px -2px rgba(255, 61, 139, 1); }
}
.btn.xl { font-family: var(--display); font-size: 1.5rem; padding: .85em 1.8em; }
.btn.big { width: 100%; font-size: 1.15rem; padding: 1em; }
.btn.small { padding: .55em 1em; font-size: .9rem; }
.btn.ghost { background: rgba(255, 255, 255, .05); }

.icon-btn {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: 1.05rem;
  transition: transform .2s, background .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); transform: scale(1.06); }
.icon-btn.sm { width: 2.1rem; height: 2.1rem; font-size: .85rem; flex: 0 0 auto; }

.pill {
  padding: .45em .95em; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line); font-weight: 700; white-space: nowrap;
}
.pill b { font-family: var(--display); letter-spacing: .12em; color: var(--yellow); }
.pill.small { font-size: .78rem; padding: .35em .7em; }

.avatar {
  --c: #fff;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 2.6em; height: 2.6em; border-radius: 50%; line-height: 1; font-size: 1em;
  background: var(--c);
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .55), transparent 55%), var(--c);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 8px 22px -6px var(--c);
}
.avatar.sm { font-size: .78rem; }

.chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .45em .95em; border-radius: 999px;
  font-weight: 700; background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  animation: popIn .4s var(--springy) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.chip.big { font-size: 1.25rem; padding: .5em 1.1em; }
.chip.sel { background: linear-gradient(135deg, rgba(123, 92, 255, .95), rgba(255, 61, 139, .9)); border-color: transparent; }
.chip.sel i { font-style: normal; font-size: .75em; opacity: .7; }
.chip.sel:hover i { opacity: 1; }
.chip.ghost { background: transparent; border-style: dashed; color: var(--muted); animation: none; }
.chip.ghost:hover { color: #fff; border-color: #fff; transform: translateY(-1px); }

.letter-badge {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: .4em; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--yellow), var(--orange)); color: var(--deep);
  font-family: var(--display); font-weight: 900; font-size: 2.4rem;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), 0 10px 30px -10px var(--orange);
}

.section-title {
  display: flex; align-items: center; gap: .6em; margin: 0 0 .8rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: var(--muted);
}
.count { background: var(--violet); color: #fff; border-radius: 999px; padding: .1em .65em; letter-spacing: 0; }

.shout {
  font-family: var(--display); font-weight: 900; font-size: 6rem; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: slam .7s var(--spring) both; text-align: center;
}

/* ---------------------------------------------------------------- Animationen */
@keyframes popIn { from { opacity: 0; transform: scale(.3); } }
@keyframes slam { from { opacity: 0; transform: scale(2.6); } }
@keyframes wordIn { from { opacity: 0; transform: translateY(40px) rotate(-6deg) scale(.8); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-50px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px) scale(.98); } }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes countPop { from { transform: scale(1.7); opacity: .3; } }
@keyframes wiggle { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes shake {
  10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.enter > * { animation: riseIn .6s var(--spring) both; }
.pop { animation: popIn .5s var(--springy) both; }

/* ---------------------------------------------------------------- Verbindung & Toasts */
.conn {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 200%); z-index: 90;
  padding: .7em 1.3em; border-radius: 999px; background: var(--red); font-weight: 800;
  transition: transform .4s var(--spring); box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.conn.show { transform: translate(-50%, 0); }
#toast {
  position: fixed; left: 50%; top: 1.1rem; transform: translateX(-50%); z-index: 70;
  display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none;
}
.toast {
  padding: .7em 1.4em; border-radius: 999px; background: rgba(24, 12, 58, .92); border: 1px solid var(--line);
  font-weight: 700; white-space: nowrap; box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  animation: toastIn .45s var(--springy) both;
}
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }

/* =====================================================================
   FERNSEHER
   ===================================================================== */
html.tv-root { font-size: clamp(12px, 1.05vw, 30px); }
body.tv { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

.topbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 2.2rem; }
.logo { font-family: var(--display); font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; display: flex; gap: .4em; }
.logo span:nth-child(1) { color: var(--pink); }
.logo span:nth-child(2) { color: var(--yellow); }
.logo span:nth-child(3) { color: var(--cyan); }
.top-mid { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 1.05rem; letter-spacing: .06em; }
.top-right { display: flex; gap: .6rem; align-items: center; }

#screen { flex: 1; min-height: 0; position: relative; padding: 0 2.2rem 1.2rem; }
#screen > section { height: 100%; }

.controls {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 2.2rem 1.3rem;
  background: linear-gradient(0deg, rgba(13, 7, 38, .95), rgba(13, 7, 38, 0));
  transform: translateY(120%); transition: transform .5s var(--spring);
}
.controls.show { transform: none; }
.controls #nextBtn { font-size: 1.2rem; padding: .85em 1.7em; }
.ctrl-hint { color: var(--muted); font-weight: 600; text-align: center; }

.icon-btn.danger:hover { background: var(--red); border-color: var(--red); }
a.btn { text-decoration: none; }
.ended { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem; text-align: center; }
.ended-icon { font-size: 8rem; animation: wiggle .6s ease-in-out infinite alternate; transform-origin: 70% 90%; }
.ended .shout { font-size: 5rem; }
.ended .btn { margin-top: 1rem; }

/* ---------- Lobby */
.lobby { display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 2.4rem; align-items: start; }
.join-card { padding: 1.7rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; }
.join-title { font-family: var(--display); font-weight: 900; font-size: 1.9rem; }
.qr-wrap {
  position: relative; width: 100%; aspect-ratio: 1; background: #fff; border-radius: 1.3rem; padding: .9rem; overflow: hidden;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 0 70px -10px var(--cyan);
  animation: popIn .8s var(--spring) both .1s;
}
.qr, .qr svg { width: 100%; height: 100%; display: block; }
.qr-scan {
  position: absolute; left: 0; right: 0; height: 22%; top: -25%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(45, 226, 230, .32), transparent);
  animation: scan 3.2s ease-in-out infinite;
}
@keyframes scan { 0% { top: -25%; } 100% { top: 105%; } }
.join-steps { color: var(--muted); font-weight: 600; }
.join-url { font-weight: 800; font-size: 1.2rem; word-break: break-all; color: var(--cyan); }
.room-code {
  display: flex; flex-direction: column; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem;
}
.room-code b {
  font-family: var(--display); font-size: 3.1rem; letter-spacing: .2em; color: var(--yellow);
  text-shadow: 0 0 30px rgba(255, 210, 63, .5); margin-left: .2em;
}
.lobby-main { max-height: 100%; overflow: auto; padding: 0 1rem 2rem; margin-left: -1rem; }
.hero {
  font-family: var(--display); font-weight: 900; font-size: 3.8rem; line-height: .95; letter-spacing: -.045em;
  display: flex; flex-wrap: wrap; gap: 0 .28em; margin: 0 0 1.2rem;
}
.hero .w { display: inline-block; animation: wordIn .9s var(--spring) both, bob 4.5s ease-in-out infinite; }
.hero .w1 { color: var(--pink); animation-delay: .05s, 1.2s; }
.hero .w2 { color: var(--yellow); animation-delay: .2s, 1.6s; }
.hero .w3 { color: var(--cyan); animation-delay: .35s, 2s; }

.players { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; min-height: 3.4rem; }
.players:empty::before {
  content: "Noch niemand da – scannt den QR-Code! 📱"; color: var(--muted); font-size: 1.25rem;
  animation: breathe 2s ease-in-out infinite; align-self: center;
}
.player {
  display: flex; align-items: center; gap: .6rem; padding: .4rem 1.1rem .4rem .4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-weight: 700; font-size: 1.2rem;
  animation: popIn .55s var(--springy) both; cursor: pointer; transition: opacity .3s, filter .3s, border-color .2s;
}
.player:hover { border-color: var(--red); }
.player .crown { display: none; }
.player.vip .crown { display: inline; animation: bob 2s ease-in-out infinite; }
.player.off { opacity: .4; filter: grayscale(1); }
.lobby-actions { display: flex; align-items: center; gap: 1.4rem; margin-top: 1.2rem; flex-wrap: wrap; }

/* ---------- Einstellungen */
.settings .set-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.settings h3 { font-family: var(--display); font-size: 1.1rem; }
.set-sub { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.1rem 0 .55rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.presets { max-height: 5.4rem; overflow: auto; padding: 2px; }
.cat-add { display: flex; gap: .5rem; margin-top: .9rem; }
.cat-add input {
  flex: 1; min-width: 0; padding: .7em 1.1em; border-radius: 999px; background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line); outline: none; transition: border-color .2s, box-shadow .2s;
}
.cat-add input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(45, 226, 230, .25); }
.steppers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.stepper { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 1rem; padding: .7rem .7rem .8rem; text-align: center; }
.stepper .lbl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin-bottom: .35rem; }
.stepper .ctl { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
.stepper b { font-family: var(--display); font-size: 1.15rem; white-space: nowrap; }
.stepper button {
  width: 2.1em; height: 2.1em; border-radius: 50%; background: rgba(255, 255, 255, .1); font-weight: 900; font-size: 1.05rem;
  transition: background .2s, transform .15s;
}
.stepper button:hover { background: rgba(255, 255, 255, .2); }
.stepper button:active { transform: scale(.88); }
.letters { margin-top: 1rem; }
.letters summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.letter-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: .3rem; margin-top: .6rem; }
.letter-grid button {
  aspect-ratio: 1; border-radius: .5rem; background: rgba(255, 255, 255, .06); font-weight: 800; color: var(--muted);
  transition: background .2s, color .2s, transform .15s;
}
.letter-grid button.on { background: var(--cyan); color: var(--deep); }
.letter-grid button:active { transform: scale(.85); }
.settings.readonly .editonly,
.settings.readonly .chip i,
.settings.readonly .stepper button { display: none; }
.settings.readonly .stepper .ctl { justify-content: center; }
.settings.readonly .chip { cursor: default; }

/* ---------- Buchstabe ziehen */
.spin { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.8rem; }
.spin-round { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 1.4rem; letter-spacing: .12em; text-transform: uppercase; }
.reel-box { position: relative; perspective: 900px; }
.reel {
  width: 18rem; height: 18rem; border-radius: 3rem; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 12rem; line-height: 1;
  background: linear-gradient(145deg, var(--yellow), var(--orange)); color: var(--deep);
  box-shadow: 0 30px 80px -20px rgba(255, 138, 61, .8), inset 0 -14px 0 rgba(0, 0, 0, .15), inset 0 6px 0 rgba(255, 255, 255, .45);
}
.reel.flick { animation: flick .14s ease-out; }
@keyframes flick { from { transform: rotateX(70deg) scale(.95); opacity: .5; } }
.reel.landed { animation: land 1s var(--springy) both, glow 2.2s ease-in-out 1s infinite; }
@keyframes land { 0% { transform: scale(.6) rotate(-12deg); } 60% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes glow {
  0%, 100% { box-shadow: 0 30px 80px -20px rgba(255, 138, 61, .8), inset 0 -14px 0 rgba(0, 0, 0, .15), inset 0 6px 0 rgba(255, 255, 255, .45); }
  50% { box-shadow: 0 30px 140px 10px rgba(255, 210, 63, .9), inset 0 -14px 0 rgba(0, 0, 0, .15), inset 0 6px 0 rgba(255, 255, 255, .45); }
}
.spin-label { font-family: var(--display); font-size: 2rem; font-weight: 700; }
.spin-cats { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; max-width: 70rem; }

/* ---------- Spielrunde */
.play { display: grid; grid-template-columns: auto 1fr; gap: 3.5rem; align-items: center; position: relative; }
.play-left { display: flex; flex-direction: column; align-items: center; gap: 2.2rem; }
.letter-tile {
  width: 14rem; height: 14rem; border-radius: 2.6rem; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 9.5rem; line-height: 1;
  background: linear-gradient(145deg, var(--yellow), var(--orange)); color: var(--deep);
  box-shadow: 0 30px 80px -20px rgba(255, 138, 61, .8), inset 0 -12px 0 rgba(0, 0, 0, .15), inset 0 6px 0 rgba(255, 255, 255, .45);
  animation: land .9s var(--springy) both, bob 5s ease-in-out 1s infinite;
}
.timer { position: relative; width: 12rem; height: 12rem; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 9; }
.timer .track { stroke: rgba(255, 255, 255, .1); }
.timer .prog { stroke: var(--cyan); stroke-linecap: round; transition: stroke .4s; filter: drop-shadow(0 0 8px var(--cyan)); }
.timer span { font-family: var(--display); font-weight: 900; font-size: 2.6rem; }
.timer.hurry .prog { stroke: var(--red); filter: drop-shadow(0 0 12px var(--red)); }
.timer.hurry span { color: var(--red); animation: heartbeat 1s infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.16); } 30% { transform: scale(1); } }
.play-right { min-width: 0; }
.cat-strip { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.2rem; }
.progress { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .9rem; }
.prow {
  display: grid; grid-template-columns: auto 1fr auto; column-gap: .9rem; row-gap: .5rem; align-items: center;
  padding: .85rem 1.1rem; border-radius: 1.2rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  animation: popIn .5s var(--springy) both; animation-delay: calc(var(--i, 0) * 60ms);
  transition: border-color .4s, box-shadow .4s, opacity .3s;
}
.prow .avatar { grid-row: span 2; }
.prow .pname { font-weight: 800; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pbar { grid-column: 2 / 4; height: .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.prow .pbar i { display: block; height: 100%; width: 0; background: var(--c); border-radius: inherit; transition: width .6s var(--spring); box-shadow: 0 0 14px var(--c); }
.prow .pdone { opacity: 0; font-weight: 800; color: var(--lime); transform: scale(.4); transition: opacity .3s, transform .45s var(--springy); }
.prow.done { border-color: var(--lime); box-shadow: 0 0 34px -10px var(--lime); }
.prow.done .pdone { opacity: 1; transform: none; }
.prow.off { opacity: .45; }

.stop-ov {
  position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(255, 61, 94, .6), rgba(13, 7, 38, .97) 72%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.stop-ov.show { opacity: 1; }
.stop-word { font-family: var(--display); font-weight: 900; font-size: 10rem; letter-spacing: -.04em; text-shadow: 0 0 70px var(--red); }
.stop-ov.show .stop-word { animation: slam .6s var(--spring) both, shake .55s .6s; }
.stop-by { font-size: 2rem; font-weight: 800; margin-top: .4rem; }
.stop-count { font-family: var(--display); font-weight: 900; font-size: 7.5rem; color: var(--yellow); margin-top: 1rem; text-shadow: 0 0 40px rgba(255, 210, 63, .6); }
.stop-count.tick, #stopSec.tick { animation: countPop .9s ease-out; }

/* ---------- Stifte weg */
.collect { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.collect-icon { font-size: 8rem; animation: wiggle .35s ease-in-out infinite alternate; }
.big-muted { font-size: 1.4rem; }

/* ---------- Auswertung */
.review { display: flex; flex-direction: column; gap: 1.6rem; }
.review-head { display: flex; flex-direction: column; gap: .9rem; }
.steps { display: flex; gap: .4rem; }
.steps span { flex: 1; height: .4rem; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .4s; }
.steps .past { background: var(--violet); }
.steps .now { background: linear-gradient(90deg, var(--pink), var(--yellow)); box-shadow: 0 0 14px var(--pink); }
.review-title { display: flex; align-items: center; gap: 1.2rem; }
.review-title h2 { font-family: var(--display); font-size: 4rem; font-weight: 900; letter-spacing: -.035em; line-height: 1; animation: wordIn .7s var(--spring) both; }
.answers {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.1rem;
  align-content: start; overflow: auto; padding: .3rem .3rem 7rem; min-height: 0; flex: 1;
}
.acard {
  position: relative; padding: 1.1rem 1.3rem 1.2rem; border-radius: 1.4rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border: 1px solid var(--line); border-top: 4px solid var(--c);
  animation: flipIn .75s var(--spring) both; animation-delay: calc(var(--i) * 110ms + .25s);
  transition: filter .4s, opacity .4s, transform .35s; transform-origin: top center;
}
@keyframes flipIn { from { opacity: 0; transform: perspective(800px) rotateX(-85deg) translateY(-20px); } }
.acard-top { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--muted); }
.acard-top .avatar { font-size: .8rem; }
.acard .pts { margin-left: auto; font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--cyan); }
.pts[data-p="20"] { color: var(--yellow); text-shadow: 0 0 18px rgba(255, 210, 63, .7); }
.pts[data-p="5"] { color: #b18cff; }
.pts[data-p="0"] { color: rgba(255, 255, 255, .35); }
.pts.bump { animation: countPop .5s ease-out; display: inline-block; }
.aword { font-family: var(--display); font-weight: 700; font-size: 2rem; margin: .55rem 0 .45rem; word-break: break-word; line-height: 1.12; }
.acard.invalid { filter: grayscale(.9); opacity: .55; transform: scale(.96); }
.acard.invalid .aword { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: .12em; }
.acard.empty .aword { color: var(--muted); }
.atags { display: flex; gap: .4rem; flex-wrap: wrap; min-height: 1.5rem; }
.tag { font-size: .8rem; font-weight: 800; padding: .25em .75em; border-radius: 999px; background: rgba(255, 255, 255, .1); animation: popIn .35s var(--springy) both; }
.tag.bad { background: rgba(255, 77, 94, .25); color: #ffb3bb; }
.tag.dup { background: rgba(177, 140, 255, .25); color: #e0d4ff; }
.tag.vote { background: rgba(255, 210, 63, .2); color: var(--yellow); }
.tag.gold { background: rgba(255, 210, 63, .9); color: var(--deep); }

/* ---------- Rundenergebnis */
.result { display: flex; flex-direction: column; gap: 1.3rem; overflow: auto; padding-bottom: 7rem; }
.result-title { font-family: var(--display); font-size: 3rem; font-weight: 900; display: flex; align-items: center; gap: 1rem; animation: wordIn .7s var(--spring) both; }
.result-title .letter-badge { font-size: 1.6rem; }
.small-title { font-family: var(--body); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.board { display: flex; flex-direction: column; gap: .8rem; }
.brow {
  display: grid; grid-template-columns: 2.4rem auto 1fr auto 5.5rem; gap: 1.2rem; align-items: center;
  padding: .9rem 1.4rem; border-radius: 1.3rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  animation: slideIn .6s var(--spring) both; animation-delay: calc(var(--i) * 120ms);
}
.brow:first-child { border-color: var(--yellow); box-shadow: 0 0 40px -12px var(--yellow); }
.brow .avatar { font-size: 1.1rem; }
.rank { font-family: var(--display); font-weight: 900; font-size: 1.8rem; color: var(--muted); }
.brow:first-child .rank { color: var(--yellow); }
.bmain { min-width: 0; }
.bname { font-weight: 800; font-size: 1.35rem; }
.bbar { height: .6rem; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; margin: .45rem 0; }
.bbar i { display: block; height: 100%; background: var(--c); border-radius: inherit; transition: width 1.5s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 0 12px var(--c); }
.bcats { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .9rem; color: var(--muted); }
.bcats b { color: #fff; margin-left: .15em; }
.bcats .x { text-decoration: line-through; opacity: .55; }
.gain { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--lime); animation: popIn .5s var(--springy) both; animation-delay: calc(var(--i) * 120ms + .9s); }
.total { font-family: var(--display); font-weight: 900; font-size: 2.4rem; text-align: right; }

/* ---------- Siegerehrung */
.final { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; overflow: auto; padding-bottom: 7rem; }
.final .shout { font-size: 4rem; }
.podium { display: flex; align-items: flex-end; gap: 1.6rem; margin-top: 2.2rem; }
.pod { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 15rem; }
.pod-avatar {
  position: relative; width: 6rem; height: 6rem; border-radius: 50%; display: grid; place-items: center; font-size: 3.3rem;
  background: var(--c); box-shadow: 0 0 0 5px rgba(255, 255, 255, .2), 0 0 50px -6px var(--c);
  animation: popIn .6s var(--springy) both;
}
.pod-name, .pod-score { animation: riseIn .5s var(--spring) both; }
.pod-name { font-weight: 800; font-size: 1.5rem; text-align: center; }
.pod-score { color: var(--muted); font-weight: 700; }
.pod-block {
  width: 100%; border-radius: 1.2rem 1.2rem .4rem .4rem; display: grid; place-items: start center; padding-top: .8rem;
  font-family: var(--display); font-weight: 900; font-size: 4rem; color: var(--deep);
  animation: rise 1s var(--spring) both; transform-origin: bottom;
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, .35);
}
@keyframes rise { from { transform: scaleY(0); } }
.p1 .pod-block { height: 16rem; background: linear-gradient(180deg, var(--yellow), var(--orange)); }
.p2 .pod-block { height: 11rem; background: linear-gradient(180deg, #eef0fa, #9aa3c0); }
.p3 .pod-block { height: 8rem; background: linear-gradient(180deg, #ffbf8a, #c46a2b); }
.p3 .pod-block { animation-delay: .2s; }
.p3 .pod-avatar, .p3 .pod-name, .p3 .pod-score { animation-delay: .9s; }
.p2 .pod-block { animation-delay: .55s; }
.p2 .pod-avatar, .p2 .pod-name, .p2 .pod-score { animation-delay: 1.25s; }
.p1 .pod-block { animation-delay: .9s; }
.p1 .pod-avatar, .p1 .pod-name, .p1 .pod-score { animation-delay: 1.7s; }
.p1 .pod-avatar { width: 7.6rem; height: 7.6rem; font-size: 4.2rem; }
.p1 .pod-avatar::after { content: "👑"; position: absolute; top: -2.6rem; font-size: 2.6rem; animation: bob 2s ease-in-out infinite; }
.rest { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1rem; }
.rest-row {
  display: flex; align-items: center; gap: .6rem; padding: .4rem 1.1rem .4rem .4rem; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-weight: 700; font-size: 1.1rem;
  animation: popIn .5s var(--springy) both; animation-delay: calc(2.2s + var(--i) * 90ms);
}
.rest-row b { font-family: var(--display); margin-left: .3rem; }
.rest-rank { color: var(--muted); padding-left: .5rem; }

@media (max-width: 900px) {
  html.tv-root { font-size: 14px; }
  body.tv { height: auto; min-height: 100vh; overflow: auto; }
  .lobby, .play { grid-template-columns: 1fr; }
  .join-card { max-width: 24rem; margin: 0 auto; }
}

/* =====================================================================
   HANDY
   ===================================================================== */
body.phone { min-height: 100vh; min-height: 100dvh; font-size: 16px; }
.p-top {
  display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem; padding-top: max(.7rem, env(safe-area-inset-top));
  background: rgba(13, 7, 38, .65); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.p-top > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app { padding: 1.2rem 1rem calc(2rem + env(safe-area-inset-bottom)); max-width: 34rem; margin: 0 auto; }
.phone .panel { padding: 1.1rem; width: 100%; text-align: left; }
.phone .letter-grid { grid-template-columns: repeat(7, 1fr); }
.phone .steppers { gap: .5rem; }
.phone .stepper { padding: .6rem .4rem .7rem; }
.phone .stepper b { font-size: .95rem; }
.phone .stepper button { width: 1.9em; height: 1.9em; font-size: .95rem; flex: 0 0 auto; }
.phone .stepper .lbl { font-size: .62rem; letter-spacing: .06em; }
.phone .shout { font-size: 2.6rem; }
.small-text { font-size: .88rem; }
.big-emoji { font-size: 5rem; animation: popIn .6s var(--springy) both; }
.spin-slow { animation: spinSlow 3s linear infinite; display: inline-block; }

.p-center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; }
.p-center h2 { font-family: var(--display); font-size: 1.6rem; }

/* ---------- Beitreten */
.logo-big { font-family: var(--display); font-weight: 900; font-size: 2.9rem; line-height: .95; letter-spacing: -.045em; margin: 1.2rem 0 1.8rem; }
.logo-big span { display: block; animation: wordIn .8s var(--spring) both; }
.logo-big span:nth-child(1) { color: var(--pink); }
.logo-big span:nth-child(2) { color: var(--yellow); animation-delay: .12s; }
.logo-big span:nth-child(3) { color: var(--cyan); animation-delay: .24s; }
.form { display: flex; flex-direction: column; gap: .7rem; }
.form label { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }
.input {
  width: 100%; padding: 1rem 1.1rem; border-radius: 1rem; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line);
  font-size: 1.2rem; font-weight: 700; outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(45, 226, 230, .2); }
.input.code { font-family: var(--display); letter-spacing: .35em; text-transform: uppercase; text-align: center; font-size: 1.7rem; }
.emoji-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.emoji-pick button {
  aspect-ratio: 1; border-radius: 1rem; background: rgba(255, 255, 255, .06); font-size: 1.7rem; border: 2px solid transparent;
  transition: transform .25s var(--springy), border-color .2s, background .2s;
}
.emoji-pick button.on { border-color: var(--yellow); background: rgba(255, 210, 63, .16); transform: scale(1.1); }
.err { color: #ffb3bb; font-weight: 700; min-height: 1.3em; }

/* ---------- Lobby */
.p-lobby { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; }
.me-big {
  width: 7rem; height: 7rem; border-radius: 50%; display: grid; place-items: center; font-size: 4rem; margin-top: .8rem;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .55), transparent 55%), var(--c);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .15), 0 0 60px -6px var(--c);
  animation: popIn .6s var(--springy) both, bob 3s ease-in-out .6s infinite;
}
.p-lobby h2 { font-family: var(--display); font-size: 1.8rem; }
.mini-players { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin: .4rem 0 .6rem; }
.mini { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 3.6rem; animation: popIn .45s var(--springy) both; }
.mini .avatar { font-size: .85rem; }
.mini small { font-size: .72rem; font-weight: 700; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini.off { opacity: .4; }
.vip-badge { padding: .45em 1.1em; border-radius: 999px; background: rgba(255, 210, 63, .15); color: var(--yellow); font-weight: 800; }

/* ---------- Buchstabe (Handy) */
.phone .reel { width: 11rem; height: 11rem; font-size: 7rem; border-radius: 2rem; margin: .6rem 0; }

/* ---------- Spielrunde (Handy) */
.p-head {
  position: sticky; top: .5rem; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .9rem;
  padding: .75rem; margin-bottom: 1.1rem; border-radius: 1.3rem;
  background: rgba(22, 11, 54, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
}
.p-letter {
  width: 3.7rem; height: 3.7rem; border-radius: 1rem; display: grid; place-items: center; flex: 0 0 auto;
  font-family: var(--display); font-weight: 900; font-size: 2.3rem;
  background: linear-gradient(145deg, var(--yellow), var(--orange)); color: var(--deep);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); animation: land .8s var(--springy) both;
}
.p-timer { flex: 1; }
.p-time { font-family: var(--display); font-weight: 900; font-size: 1.55rem; }
.p-bar { height: .5rem; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: .35rem; }
.p-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: inherit; }
.p-timer.hurry .p-time { color: var(--red); animation: heartbeat 1s infinite; display: inline-block; }
.p-timer.hurry .p-bar i { background: var(--red); }
.stop-banner {
  flex-basis: 100%; display: none; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .6rem .95rem; border-radius: .9rem; background: linear-gradient(135deg, var(--red), var(--pink)); font-weight: 800;
}
.stop-banner.show { display: flex; animation: shake .5s; }
.stop-banner b { font-family: var(--display); font-size: 1.5rem; display: inline-block; }
.fields { display: flex; flex-direction: column; gap: .85rem; }
.field { position: relative; display: block; animation: slideIn .45s var(--spring) both; animation-delay: calc(var(--i) * 60ms); }
.flabel { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem .3rem; }
.field input {
  width: 100%; padding: .95rem 3rem .95rem 1.1rem; border-radius: 1rem; background: rgba(0, 0, 0, .3);
  border: 1.5px solid var(--line); font-size: 1.25rem; font-weight: 700; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: rgba(255, 255, 255, .25); }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(45, 226, 230, .18); }
.fstate {
  position: absolute; right: .9rem; bottom: .95rem; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: .95rem;
  transform: scale(0); transition: transform .35s var(--springy);
}
.field.ok input { border-color: rgba(166, 255, 77, .65); }
.field.ok .fstate { transform: scale(1); background: var(--lime); color: var(--deep); }
.field.ok .fstate::after { content: "✓"; }
.field.bad input { border-color: rgba(255, 77, 94, .75); }
.field.bad .fstate { transform: scale(1); background: var(--red); }
.field.bad .fstate::after { content: "!"; }
.stop-btn {
  margin-top: 1.4rem; width: 100%; font-family: var(--display); font-size: 1.9rem; padding: 1rem; border-radius: 1.4rem;
  background: linear-gradient(135deg, var(--red), var(--pink)); border: 0; color: #fff; box-shadow: 0 12px 40px -10px var(--red);
}
.stop-btn:not(:disabled) { animation: pulseRed 1.3s ease-in-out infinite; }
.stop-btn.slam { animation: slam .5s var(--spring); }
@keyframes pulseRed {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 40px -10px var(--red); }
  50% { transform: scale(1.03); box-shadow: 0 12px 60px 0 var(--red); }
}
.p-hint { text-align: center; margin-top: .8rem; font-weight: 600; }

/* ---------- Abstimmen (Handy) */
.p-review .steps { margin-bottom: 1rem; }
.p-rhead { display: flex; align-items: center; gap: .9rem; margin-bottom: .5rem; }
.p-rhead .letter-badge { font-size: 1.5rem; }
.p-rhead h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; animation: wordIn .6s var(--spring) both; }
.votes { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0 1.3rem; }
.vrow {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center;
  padding: .7rem .8rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-left: 4px solid var(--c); animation: slideIn .45s var(--spring) both; animation-delay: calc(var(--i) * 60ms);
  transition: opacity .3s, filter .3s;
}
.vrow.mine { background: rgba(255, 255, 255, .1); }
.vtext { min-width: 0; }
.vname { font-size: .78rem; color: var(--muted); font-weight: 700; }
.vword { font-weight: 800; font-size: 1.15rem; word-break: break-word; }
.vrow.invalid .vword { text-decoration: line-through; text-decoration-color: var(--red); color: var(--muted); }
.vbtn {
  min-width: 4.4rem; padding: .6em .85em; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  font-weight: 800; transition: background .2s, transform .25s var(--springy), border-color .2s;
}
.vbtn.on { background: var(--red); border-color: var(--red); transform: scale(1.06); }
.vnote { font-size: .75rem; color: var(--muted); font-weight: 700; text-align: right; max-width: 6.5rem; }

/* ---------- Ergebnis (Handy) */
.p-result { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; }
.gain-big { font-family: var(--display); font-weight: 900; font-size: 5rem; color: var(--lime); text-shadow: 0 0 40px rgba(166, 255, 77, .45); animation: slam .7s var(--spring) both; }
.rank-card { display: flex; align-items: baseline; gap: .6rem; padding: .9rem 1.4rem; margin: .6rem 0 1rem; font-weight: 700; animation: riseIn .6s var(--spring) both .3s; }
.rank-card b { font-family: var(--display); font-size: 2.4rem; color: var(--yellow); }
.mycats { width: 100%; display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.2rem; }
.mycat {
  display: grid; grid-template-columns: 1fr auto auto; gap: .7rem; align-items: center; text-align: left;
  padding: .6rem .9rem; border-radius: .9rem; background: rgba(255, 255, 255, .06);
  animation: slideIn .45s var(--spring) both; animation-delay: calc(.4s + var(--i) * 60ms);
}
.mycat span { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.mycat em { font-style: normal; font-weight: 800; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mycat b { font-family: var(--display); min-width: 2.2rem; text-align: right; color: var(--cyan); }
.mycat b[data-p="20"] { color: var(--yellow); }
.mycat b[data-p="0"] { color: rgba(255, 255, 255, .35); }
.mycat.x em { text-decoration: line-through; color: var(--muted); }
.p-final .medal { font-size: 7rem; animation: popIn .7s var(--springy) both, bob 2.5s ease-in-out .7s infinite; }

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