:root {
  --bg: #0c0f2a;
  --bg2: #141947;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f5ff;
  --muted: #a9addb;
  --accent: #ffd23f;
  --good: #3ddc97;
  --bad: #ff5d73;
  --a: #ff5d73;
  --b: #4cc9f0;
  --c: #ffb627;
  --d: #3ddc97;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #2a2f7a 0, transparent 45%),
              radial-gradient(circle at 90% 90%, #3a1d5c 0, transparent 40%),
              var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
input { font: inherit; }

.chip {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .25em .7em .25em .45em; border-radius: 999px;
  background: var(--panel-strong); font-weight: 650; white-space: nowrap;
}
.chip i { width: .8em; height: .8em; border-radius: 50%; background: var(--c); flex: none; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.conn {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--bad); color: #fff; text-align: center; font-weight: 700;
  padding: .4em; font-size: 14px; display: none;
}
.conn.show { display: block; }

@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.pop { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.rise { animation: rise .4s ease-out both; }

.opt-0 { --o: var(--a); } .opt-1 { --o: var(--b); } .opt-2 { --o: var(--c); } .opt-3 { --o: var(--d); }

/* =================== LEINWAND =================== */
body.screen { overflow: hidden; font-size: clamp(14px, 1.25vw, 30px); }
.screen-wrap { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; }
.screen header {
  display: flex; align-items: center; gap: 1.2em; padding: .9em 1.6em;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 900; letter-spacing: .02em; font-size: 1.5em; }
.brand b { color: var(--accent); }
.screen header .roundinfo { flex: 1; text-align: center; font-weight: 700; font-size: 1.2em; }
.screen header .code { font-weight: 800; }
.screen header .code span { color: var(--accent); letter-spacing: .12em; }

.screen-main { display: grid; grid-template-columns: 1fr 23em; min-height: 0; }
.stage { position: relative; padding: 2em 2.6em; display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: hidden; }
.board { border-left: 1px solid var(--line); padding: 1.2em; display: flex; flex-direction: column; gap: .4em; min-height: 0; overflow: hidden; }
.board h3 { margin: 0 0 .3em; font-size: .9em; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.row {
  display: grid; grid-template-columns: 1.6em 1fr auto auto; align-items: center; gap: .5em;
  padding: .42em .6em; border-radius: 12px; background: var(--panel); font-size: 1.05em;
  transition: background .3s;
}
.row .rk { color: var(--muted); font-weight: 700; text-align: right; }
.row .nm { display: flex; align-items: center; gap: .5em; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm i { width: .8em; height: .8em; border-radius: 50%; background: var(--c); flex: none; }
.row .sc { font-weight: 900; font-size: 1.15em; min-width: 1.6em; text-align: right; }
.row .st { font-size: .8em; color: var(--muted); min-width: 2.2em; text-align: right; }
.row .st.ok { color: var(--good); }
.row.off { opacity: .45; }
.row.hl { background: rgba(255, 210, 63, .18); }
.board .mini { margin-top: auto; display: flex; gap: .8em; align-items: center; padding-top: .8em; border-top: 1px solid var(--line); }
.board .mini .qr { width: 6.5em; background: #fff; padding: .3em; border-radius: 8px; flex: none; }
.board .mini .qr svg { display: block; width: 100%; height: auto; }
.board .mini div { font-size: .85em; line-height: 1.35; }
.board .mini strong { color: var(--accent); font-size: 1.4em; letter-spacing: .1em; }

.controls {
  display: flex; gap: .6em; align-items: center; padding: .6em 1.2em;
  border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); font-size: .8em;
}
.controls.hidden { display: none; }
.controls .sp { flex: 1; }
.controls select { font: inherit; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .3em; }
.btn {
  border: 1px solid var(--line); background: var(--panel-strong); border-radius: 10px;
  padding: .55em 1em; font-weight: 700;
}
.btn:hover { background: rgba(255, 255, 255, .18); }
.btn.primary { background: var(--accent); color: #1b1600; border-color: transparent; }
.btn.good { background: var(--good); color: #022; border-color: transparent; }
.btn.bad { background: var(--bad); color: #fff; border-color: transparent; }
.btn:disabled { opacity: .4; cursor: default; }
kbd { font-family: inherit; font-size: .85em; padding: .05em .4em; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }

/* Lobby */
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 3em; align-items: center; }
.lobby .qr { background: #fff; padding: 1em; border-radius: 22px; width: min(34vh, 26vw); }
.lobby .qr svg { display: block; width: 100%; height: auto; }
.lobby h1 { font-size: 3.4em; margin: 0 0 .2em; line-height: 1; }
.lobby .url { font-size: 1.7em; font-weight: 800; color: var(--accent); word-break: break-all; }
.lobby .codebig { font-size: 5em; font-weight: 900; letter-spacing: .18em; color: var(--accent); line-height: 1; }
.lobby .label { text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-size: .85em; margin-top: 1.4em; }
.lobby .waiting { margin-top: 2em; font-size: 1.2em; color: var(--muted); }

/* Ablauf & Ergebnis */
.big-center { text-align: center; }
.kicker { text-transform: uppercase; letter-spacing: .2em; color: var(--accent); font-weight: 800; font-size: 1.1em; }
.huge { font-size: 5.2em; font-weight: 900; margin: .15em 0; line-height: 1.05; }
.sub { font-size: 1.6em; color: var(--muted); max-width: 32em; margin: .5em auto 0; line-height: 1.4; }
.value-badge { display: inline-block; margin-top: 1em; background: var(--accent); color: #1b1600; font-weight: 900; font-size: 1.8em; padding: .25em .9em; border-radius: 999px; }

.question { font-size: 2.9em; font-weight: 800; line-height: 1.2; margin: 0 0 .6em; }
.qimg { max-height: 32vh; max-width: 100%; border-radius: 14px; margin: 0 auto 1em; display: block; }
/* Bildfragen aus dem Pool: Länderumriss oder Städtefoto */
.qfig { margin: 0 auto .5em; text-align: center; }
.qfig .qimg { margin: 0 auto; }
.qfig figcaption { font-size: .55em; color: var(--muted); opacity: .75; margin-top: .3em; }
.qimg-umriss .qimg { height: 40vh; max-height: 40vh; width: auto; max-width: 70%; border-radius: 0; filter: drop-shadow(0 0 18px rgba(255, 210, 63, .35)); }
.qimg-foto .qimg { height: auto; max-height: 40vh; width: auto; max-width: 80%; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); border: 3px solid rgba(255, 255, 255, .15); }
.question.question-bild { font-size: 2em; margin-bottom: .5em; }
.lw-castside .qimg-umriss .qimg { height: 26vh; max-height: 26vh; max-width: 100%; }
.lw-castside .qimg-foto .qimg { max-height: 26vh; max-width: 100%; }
.p-qimg { display: block; max-width: 100%; max-height: 26vh; margin: 10px auto 0; border-radius: 10px; }
.p-qimg.umriss { border-radius: 0; height: 22vh; width: auto; }
.timerbar { height: .55em; background: var(--panel); border-radius: 99px; overflow: hidden; margin-bottom: 1.4em; }
.timerbar div { height: 100%; background: var(--accent); border-radius: 99px; }
.timerbar div.urgent { background: var(--bad); }
.metaline { display: flex; justify-content: space-between; color: var(--muted); font-size: 1.1em; margin-bottom: .6em; font-weight: 600; }
.metaline .tnum { color: var(--text); font-weight: 900; font-size: 1.4em; }
.metaline .tnum.urgent { color: var(--bad); }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.opt {
  display: flex; align-items: center; gap: .7em; padding: .8em 1em; border-radius: var(--radius);
  background: var(--panel-strong); border-left: .45em solid var(--o); font-size: 1.9em; font-weight: 750;
  transition: opacity .3s, transform .3s, background .3s;
}
.opt .lt { background: var(--o); color: #111; border-radius: 10px; width: 1.5em; height: 1.5em; display: grid; place-items: center; font-weight: 900; flex: none; }
.opt .cnt { margin-left: auto; font-size: .8em; color: var(--muted); }
.opt.wrong { opacity: .3; }
.opt.right { background: color-mix(in srgb, var(--good) 35%, transparent); transform: scale(1.03); }

.answer-reveal { font-size: 4em; font-weight: 900; color: var(--good); margin: .1em 0 .4em; }
.ranklist { display: flex; flex-direction: column; gap: .4em; max-width: 46em; }
.ranklist .r { display: grid; grid-template-columns: 2em 1fr auto auto; gap: .8em; align-items: center; padding: .5em .8em; background: var(--panel); border-radius: 12px; font-size: 1.35em; }
.ranklist .r.win { background: rgba(61, 220, 151, .22); }
.ranklist .r .v { font-weight: 900; }
.ranklist .r .d { color: var(--muted); font-size: .85em; min-width: 6em; text-align: right; }
.names { display: flex; flex-wrap: wrap; gap: .5em; font-size: 1.3em; }

.buzzwho { font-size: 5em; font-weight: 900; color: var(--c); animation: pulse 1s infinite; }
.react-hint { font-size: 4em; font-weight: 900; color: var(--bad); }

.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1.4em; margin-top: 1.5em; }
.podium .pl { text-align: center; width: 12em; }
.podium .bar { border-radius: 14px 14px 0 0; background: var(--panel-strong); display: grid; place-items: center; font-size: 2.6em; font-weight: 900; }
.podium .p1 .bar { height: 7em; background: var(--accent); color: #1b1600; }
.podium .p2 .bar { height: 5em; }
.podium .p3 .bar { height: 3.6em; }
.podium .nm { font-size: 1.6em; font-weight: 850; margin-bottom: .3em; }
.podium .pts { color: var(--muted); font-size: 1.1em; margin-bottom: .4em; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* =================== SPIELER (Handy) =================== */
body.player { min-height: 100%; }
.p-wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 28px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; font-size: 15px; }
.p-top .score { font-weight: 900; font-size: 18px; }
.p-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.p-title { font-size: 28px; font-weight: 900; margin: 0; line-height: 1.15; }
.p-sub { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 0; }
.p-q { font-size: 20px; font-weight: 750; line-height: 1.3; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 14px; color: var(--muted); }
.field input {
  background: rgba(0, 0, 0, .3); border: 2px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 14px; font-size: 20px; font-weight: 700; width: 100%;
}
.field input:focus { outline: none; border-color: var(--accent); }
.bigbtn {
  width: 100%; border: 0; border-radius: 16px; padding: 18px; font-size: 20px; font-weight: 850;
  background: var(--accent); color: #1b1600;
}
.bigbtn:disabled { opacity: .5; }
.err { color: var(--bad); font-weight: 700; min-height: 1.2em; margin: 0; }
.p-opts { display: grid; gap: 10px; }
.p-opt {
  display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 16px;
  padding: 16px; font-size: 19px; font-weight: 750; background: var(--o); color: #111; min-height: 64px;
}
.p-opt .lt { background: rgba(0, 0, 0, .18); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; font-weight: 900; flex: none; }
.p-opt.dim { opacity: .3; }
.status-big { font-size: 26px; font-weight: 900; text-align: center; margin: 0; }
.status-big.good { color: var(--good); }
.status-big.bad { color: var(--bad); }
.center { text-align: center; }
.buzz {
  width: min(78vw, 340px); aspect-ratio: 1; border-radius: 50%; margin: 10px auto; display: block;
  border: 0; background: radial-gradient(circle at 35% 30%, #ff8a9b, var(--bad) 55%, #b3203a);
  box-shadow: 0 12px 0 #7d1427, 0 18px 40px rgba(0, 0, 0, .5);
  font-size: 44px; font-weight: 900; color: #fff; letter-spacing: .06em; user-select: none; -webkit-user-select: none;
}
.buzz:active { transform: translateY(8px); box-shadow: 0 4px 0 #7d1427, 0 8px 20px rgba(0, 0, 0, .5); }
.buzz:disabled { filter: grayscale(1); opacity: .35; }
.pad {
  flex: 1; min-height: 60vh; border-radius: 24px; display: grid; place-items: center; text-align: center;
  font-size: 34px; font-weight: 900; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  background: #b3203a; transition: none;
}
.pad.go { background: #1fb978; }
.pad.done { background: var(--panel-strong); }
.p-timer { height: 6px; background: var(--panel); border-radius: 9px; overflow: hidden; }
.p-timer div { height: 100%; background: var(--accent); }
.p-timer div.urgent { background: var(--bad); }

/* =================== MODERATION =================== */
body.mod { font-size: 16px; }
.m-wrap { max-width: 620px; margin: 0 auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
.m-secret { background: rgba(61, 220, 151, .15); border: 1px solid var(--good); border-radius: 14px; padding: 12px 14px; }
.m-secret b { display: block; font-size: 22px; margin-top: 2px; }
.m-row { display: flex; gap: 8px; flex-wrap: wrap; }
.m-row .btn { flex: 1; padding: 14px; font-size: 17px; }
.m-players .pr { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.m-players .pr .nm { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 650; }
.m-players .pr .nm i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.m-players .pr .sc { font-weight: 900; min-width: 2em; text-align: right; }
.m-players .pr .btn { padding: 6px 12px; }
.board.dense { gap: .28em; padding-top: .9em; }
.board.dense .row { padding: .22em .6em; font-size: .95em; }
.board.dense .mini .qr { width: 5em; }

/* =================== AKTIONSSPIELE (Handy) =================== */
.countdown { font-size: 110px; font-weight: 900; margin: 0; color: var(--accent); line-height: 1.1; }
.pad.tap { background: linear-gradient(160deg, #4cc9f0, #4361ee); min-height: 62vh; cursor: pointer; }
.pad.tap.flash { animation: tapflash .12s ease-out; }
@keyframes tapflash { from { transform: scale(.97); filter: brightness(1.3); } to { transform: none; filter: none; } }
.tapnum { font-size: 96px; line-height: 1; }
.fc-score { text-align: center; font-size: 18px; color: var(--muted); }
.fc-score b { color: var(--text); font-size: 26px; }
.fc-word { text-align: center; font-size: 64px; font-weight: 900; letter-spacing: .04em; padding: 24px 0; background: #fff; border-radius: 20px; }
.fc-word.ok { animation: okflash .3s; } .fc-word.no { animation: noflash .35s; }
@keyframes okflash { from { box-shadow: 0 0 0 8px var(--good); } to { box-shadow: 0 0 0 0 transparent; } }
@keyframes noflash { 0%, 100% { transform: none; } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.fc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-btn { border: 2px solid var(--line); background: var(--panel-strong); border-radius: 16px; padding: 24px 8px; font-size: 22px; font-weight: 900; color: var(--text); }
.fc-btn:active { background: rgba(255,255,255,.25); }
.balloon-wrap { height: 42vh; display: grid; place-items: end center; overflow: hidden; }
.balloon {
  width: 220px; height: 260px; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 35% 30%, #ff9aa8, var(--me, #ff5d73) 60%, #b3203a);
  display: grid; place-items: center; color: #fff; font-size: 56px; font-weight: 900;
  transform: scale(var(--s)); transform-origin: 50% 100%; transition: transform .15s; position: relative;
}
.balloon::after { content: ''; position: absolute; bottom: -10px; left: 50%; margin-left: -8px; border: 8px solid transparent; border-top-color: #b3203a; }
.balloon.puff { animation: puff .15s; }
@keyframes puff { 50% { filter: brightness(1.2); } }
.bang { font-size: 72px; font-weight: 900; color: var(--accent); margin: 0; transform: rotate(-8deg); }
.watch { font-size: 76px; font-weight: 900; text-align: center; margin: 6px 0; font-variant-numeric: tabular-nums; }
.watch.hidden-time { color: var(--muted); }
.draw-canvas { display: block; margin: 0 auto; background: rgba(255,255,255,.06); border: 2px dashed var(--line); border-radius: 20px; touch-action: none; }
.my-drawing { width: 60%; margin: 8px auto; background: rgba(255,255,255,.06); border-radius: 16px; }
.drawing { display: block; width: 100%; height: auto; }
.dots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; background: var(--panel-strong); border: 2px solid var(--line); }
.mu-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mu-pad { aspect-ratio: 1; border: 0; border-radius: 22px; background: var(--m); opacity: .85; }
.mu-pad.hit { animation: muhit .25s; }
@keyframes muhit { from { opacity: 1; transform: scale(.94); filter: brightness(1.4); } to { opacity: .85; transform: none; } }

/* =================== AKTIONSSPIELE (Leinwand) =================== */
.race { display: flex; flex-direction: column; gap: .45em; }
.race .ln { display: grid; grid-template-columns: 9em 1fr 4em; align-items: center; gap: .8em; font-size: 1.25em; font-weight: 750; }
.race .ln .bar { height: 1.3em; background: var(--panel); border-radius: 99px; overflow: hidden; }
.race .ln .bar div { height: 100%; background: var(--c); border-radius: 99px; transition: width .2s linear; }
.race .ln .num { text-align: right; font-weight: 900; }
.race .ln .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c); }
.balloons { display: flex; flex-wrap: wrap; gap: 1.2em 1.6em; justify-content: center; align-items: flex-end; }
.balloons .b { text-align: center; width: 7em; }
.balloons .bl { width: 5em; height: 6em; margin: 0 auto; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), var(--c) 55%); transform: scale(var(--s)); transform-origin: 50% 100%; transition: transform .2s; display: grid; place-items: center; font-weight: 900; color: #111; font-size: 1.2em; }
.balloons .bl.burst { background: none; transform: none; }
.balloons .bl.banked { box-shadow: 0 0 0 .25em var(--good); }
.balloons .nm { margin-top: .5em; font-weight: 800; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawings { display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: 1em; }
.drawings .dw { background: var(--panel); border-radius: 16px; padding: .6em; text-align: center; }
.drawings .dw.win { background: rgba(61, 220, 151, .22); }
.drawings .dw .drawing { background: rgba(255,255,255,.04); border-radius: 10px; }
.drawings .dw b { display: block; margin-top: .3em; font-size: 1.2em; }
.mu-screen { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; width: min(52vh, 40vw); margin: 0 auto; }
.mu-screen div { aspect-ratio: 1; border-radius: 24px; background: var(--m); opacity: .22; transition: opacity .1s, transform .1s; }
.mu-screen div.on { opacity: 1; transform: scale(1.05); box-shadow: 0 0 2em var(--m); }
.bigcount { font-size: 12em; font-weight: 900; color: var(--accent); line-height: 1; }
.drawings.many { grid-template-columns: repeat(6, 1fr); gap: .7em; }
.drawings.many .dw b { font-size: 1em; }
.drawings.many .dw span { font-size: .85em; }
.balloons .b { height: 9.5em; display: flex; flex-direction: column; justify-content: flex-end; }
.ranklist .r { padding: .38em .8em; font-size: 1.25em; }
.m-sets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.m-sets .btn { padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.m-sets .btn small { font-size: 11px; font-weight: 600; opacity: .8; }
.pad.tap.jagd { position: relative; display: block; background: linear-gradient(160deg, #2b2f6b, #1b1f4a); }
.pad.tap.jagd .tapnum { position: absolute; inset: 0; display: grid; place-items: center; opacity: .25; font-size: 120px; pointer-events: none; }
.jagd-btn { position: absolute; width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--accent); color: #1b1600; font-weight: 900; font-size: 18px; box-shadow: 0 6px 0 #a88400; touch-action: manipulation; }
.lr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; min-height: 52vh; }
.lr-btn { border: 0; border-radius: 22px; font-size: 24px; font-weight: 900; color: #fff; background: linear-gradient(160deg, #4cc9f0, #4361ee); touch-action: manipulation; }
.lr-btn[data-side="R"] { background: linear-gradient(160deg, #ff8fab, #e0457b); }
.lr-btn.hit { animation: tapflash .12s ease-out; }
.fc-rule { text-align: center; font-weight: 900; font-size: 20px; min-height: 28px; letter-spacing: .06em; color: var(--accent); }
.fc-rule.wort { color: #fff; background: #e0457b; border-radius: 10px; padding: 4px; }
.fc-rule.schrift { color: #111; background: var(--accent); border-radius: 10px; padding: 4px; }
.net { margin-top: .5em; font-size: 1.05em; color: var(--muted); font-weight: 600; }
.net.ok { color: var(--good); }
.net.bad { color: #ffb4bf; }
.lobby .url { font-size: 1.5em; }

/* Moderations-QR auf der Leinwand */
.modqr { position: fixed; inset: 0; background: rgba(5, 8, 20, .88); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modqr-card { background: #151a33; border: 2px solid #ffd23f; border-radius: 22px; padding: 28px 36px; text-align: center; max-width: 620px; }
.modqr-card h2 { margin: 0 0 16px; }
.modqr-card .qr { width: 300px; height: 300px; margin: 0 auto 16px; background: #fff; padding: 14px; border-radius: 14px; }
.modqr-card .qr svg { width: 100%; height: 100%; display: block; }
.modqr-card .muted { margin-bottom: 18px; line-height: 1.4; }
.modqr-link { display: flex; gap: 10px; align-items: center; background: #0b0f22; border-radius: 10px; padding: 8px 10px; margin: 0 0 14px; text-align: left; }
.modqr-link span { flex: 1; font-family: ui-monospace, monospace; font-size: 15px; word-break: break-all; user-select: all; color: #ffd23f; }
.modqr-link .btn { flex: none; padding: 8px 12px; font-size: 14px; }

/* Arcade-Spiele (Handy) */
.arcade { display: block; width: 100%; border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none; background: #0b1030; }
.arc-hint { text-align: center; font-size: 13px; color: var(--muted, #aab); }
.tilt-btn { font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 10px 14px; background: #ffd23f; color: #111; }
.tilt-btn:disabled { background: #3ddc97; }
.br-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.br-pad button { font-size: 30px; font-weight: 900; padding: 14px 0; border: 0; border-radius: 16px; background: #2b3170; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.br-pad button small { display: block; font-size: 11px; font-weight: 700; opacity: .75; margin-top: 2px; }
.br-pad button[data-br="drop"] { background: #ff5d73; }
.br-pad button[data-br="rot"] { background: #4361ee; }
.br-pad button.hit { animation: tapflash .12s ease-out; }

/* Wolkenhüpfer (Leinwand): Höhenturm */
.tower { display: flex; gap: .8em; justify-content: center; align-items: stretch; height: 52vh; }
.tower .tw { flex: 1; max-width: 7em; display: flex; flex-direction: column; align-items: center; gap: .3em; }
.tower .tw-col { position: relative; flex: 1; width: 100%; border-radius: 14px; background: linear-gradient(to top, rgba(255,255,255,.04), rgba(76,201,240,.12)); border: 1px solid rgba(255,255,255,.08); }
.tower .tw-dot { position: absolute; left: 50%; transform: translate(-50%, 50%); width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--c); transition: bottom .25s ease-out; box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
.tower .tw-dot.lead { box-shadow: 0 0 0 4px #ffd23f, 0 0 24px #ffd23f; }
.tower .tw-dot b { position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 1.1em; }
.tower .nm { font-weight: 800; color: var(--c); font-size: 1.05em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatare */
i.av { width: 1.55em; height: 1.55em; border-radius: 50%; background: var(--c); flex: none; display: inline-grid; place-items: center; font-style: normal; font-size: 1em; line-height: 1; }
i.av:empty { width: .8em; height: .8em; }
.chip i.av { margin-left: -.2em; }
.row .nm i.av { width: 1.5em; height: 1.5em; }
.m-players .pr .nm i.av { width: 26px; height: 26px; font-size: 16px; }
.av-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.av-pick { font-size: 26px; line-height: 1; padding: 6px 0; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.06); }
.av-pick.on { border-color: var(--accent, #ffd23f); background: rgba(255,210,63,.18); transform: scale(1.08); }
.my-av { width: 96px; height: 96px; margin: 8px auto 4px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 58px; box-shadow: 0 0 0 4px rgba(255,255,255,.15); }
.av-change { margin-top: 18px; text-align: left; }
.av-change summary { text-align: center; color: var(--muted); cursor: pointer; }
.pav { width: 2.6em; height: 2.6em; margin: 0 auto .2em; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 1.7em; }
.tower .tw-dot span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.3em; }

/* Buzzer-Countdown */
.buzz.wait { background: radial-gradient(circle at 35% 30%, #8c92b8, #4a4f75); box-shadow: 0 12px 0 #2b2f4a, 0 16px 30px rgba(0,0,0,.5); font-size: 30px; }
.buzz.early { filter: none; opacity: 1; background: #5a1b26; }
.bad { color: var(--bad, #ff5d73); }

/* Teams */
.tchip { display: inline-block; padding: .1em .6em; border-radius: 999px; background: var(--t); color: #111; font-weight: 800; }
.lobby-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: .8em; margin-top: 1.4em; }
.lt-box { border: 2px solid var(--t); border-radius: 16px; padding: .7em; display: flex; flex-wrap: wrap; gap: .35em; align-content: flex-start; background: rgba(255,255,255,.03); }
.lt-h { width: 100%; font-weight: 900; color: var(--t); font-size: 1.15em; margin-bottom: .2em; }
.trow { display: flex; align-items: center; gap: .5em; padding: .35em .7em; border-radius: 10px; background: rgba(255,255,255,.05); border-left: 6px solid var(--t); }
.trow .tn { font-weight: 850; color: var(--t); white-space: nowrap; }
.trow .tav { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: clip; font-size: .9em; }
.trow .sc { font-weight: 900; font-size: 1.2em; }
.row.inteam { box-shadow: inset 4px 0 0 var(--t); }
.team-final { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; margin: 1.2em 0; }
.tf { border: 3px solid var(--t); border-radius: 18px; padding: .8em 1.2em; min-width: 11em; background: rgba(255,255,255,.04); }
.tf-r { font-size: 2.2em; font-weight: 900; color: var(--t); }
.tf-n { font-size: 1.4em; font-weight: 850; }
.tf-av { font-size: 1.4em; margin: .3em 0; }
.tf-s { color: var(--muted); font-weight: 700; }
.team-pick { display: flex; flex-direction: column; gap: 8px; }
.tp { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--t); background: rgba(255,255,255,.04); font-weight: 800; color: var(--t); font-size: 17px; }
.tp.on { background: var(--t); color: #111; }
.tp small { font-size: 18px; }
.rename { display: flex; gap: 8px; margin-top: 10px; }
.rename input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: inherit; font-size: 17px; }

/* Reaktionen: Leiste am Handy */
.emote-bar { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); display: flex; gap: 2px; padding: 5px 8px; border-radius: 999px; background: rgba(20, 24, 60, .92); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .25s ease; z-index: 40; max-width: calc(100vw - 16px); }
.emote-bar.show { transform: translate(-50%, 0); }
.emote-bar button { font-size: 24px; line-height: 1; padding: 5px 4px; border: 0; background: none; border-radius: 50%; }
.emote-bar.cool button { opacity: .45; }
.emote-bar button.sent { animation: emotepop .35s ease-out; }
@keyframes emotepop { 50% { transform: scale(1.5); } }
body.has-emotes .p-wrap { padding-bottom: 86px; }
/* Reaktionen: Leinwand */
.emotes { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.emote { position: absolute; bottom: 6vh; display: flex; flex-direction: column; align-items: center; animation: emoteup 3.2s ease-out forwards; }
.emote .em { font-size: 4.2em; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.emote .who { font-size: 1em; font-weight: 800; padding: .1em .6em; border-radius: 999px; background: rgba(0,0,0,.5); color: var(--c); white-space: nowrap; }
@keyframes emoteup {
  0% { transform: translate(0, 40px) scale(.4); opacity: 0; }
  12% { transform: translate(0, 0) scale(1.15); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--dx), -55vh) scale(.9); opacity: 0; }
}
.flashnote { position: fixed; top: 14vh; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); padding: .5em 1.2em; border-radius: 999px; font-weight: 800; font-size: 1.4em; z-index: 60; }

body.player, body.player * { touch-action: manipulation; }
body.player canvas, body.player .arcade { touch-action: none; }

.pedals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pedals button { font-size: 22px; font-weight: 900; padding: 20px 0; border: 0; border-radius: 18px; color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; }
.pedals [data-pedal="brake"] { background: #b3263c; }
.pedals [data-pedal="gas"] { background: #1f9e5c; }
.pedals button.on { filter: brightness(1.35); transform: scale(.97); }
.m-plan { margin: 0; padding-left: 26px; }
.m-plan li { margin: 6px 0; }
.m-pick { width: 100%; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; background: #0b0f22; color: #fff; border: 1px solid #39407a; }
.hmode { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 8px 0; font-size: 14px; color: #aab; }
.hmode button { border: 2px solid #39407a; background: #1b2050; color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 800; }
.hmode button.on { background: #ffd23f; color: #1a1a2e; border-color: #ffd23f; }
.hmove button { font-size: 30px; background: #2b3170; padding: 16px 0; }
.mathe-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mathe-pad button { font-size: 30px; font-weight: 900; padding: 22px 0; border: 0; border-radius: 18px; background: #2b3170; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; }
.mathe-pad button.good { background: #1f9e5c; }
.mathe-pad button.bad { background: #b3263c; }
.flip button { background: #7209b7; }
/* Themen-Auswahl (Moderation und Leinwand) */
.tchip { border: 1px solid var(--line); background: var(--bg2); color: var(--muted); border-radius: 999px; padding: 8px 12px; font-weight: 650; font-size: 15px; }
.tchip small { opacity: .6; font-weight: 600; margin-left: 2px; }
.tchip.on { background: var(--accent); border-color: var(--accent); color: #1b1530; }
.m-themes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lw-themes { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 6px; }
.lw-themes .tchip { font-size: 14px; padding: 5px 10px; }
.controls { flex-wrap: wrap; }
/* Selfie-Avatare */
.avimg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avimg.inl { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.25em; box-shadow: 0 0 0 2px var(--c, rgba(255,255,255,.4)); }
i.av.ph, .pav.ph, .my-av.ph { padding: 2px; overflow: hidden; }
.selfie-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.selfie-prev { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; color: var(--muted); }
.selfie-prev img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--accent); }

/* =================== Siegerehrung =================== */
body.final-on .screen-main { grid-template-columns: 1fr; }
body.final-on .board { display: none; }
.cer { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at 50% 110%, rgba(255, 210, 63, .12), transparent 60%); transition: background 1s; }
.cer .fw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.cer .confetti { z-index: 6; }
.cer > .cer-intro, .cer > .cer-hl, .cer > .cer-pod { grid-area: 1 / 1; transition: opacity .7s, transform .7s; opacity: 0; pointer-events: none; transform: scale(.94); width: 100%; }
.cer.s-intro .cer-intro, .cer.s-hl .cer-hl, .cer.s-pod .cer-pod { opacity: 1; transform: none; }
.cer-title { font-size: 6.4em; font-weight: 950; line-height: 1; margin: .15em 0 .2em; letter-spacing: -.01em;
  background: linear-gradient(90deg, #ffd23f, #ff9f1c, #ff5d73, #ffd23f); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 3s linear infinite; }
@keyframes shine { to { background-position: 300% 0; } }
.cer-intro .sub { font-size: 1.7em; }
.cer .drum { font-size: 4em; margin-top: .4em; display: inline-block; animation: drum .09s infinite alternate; }
@keyframes drum { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-6px); } }
.cer-pod .drum.big { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: 7em; opacity: 0; transition: opacity .3s; animation: none; z-index: 4; }
.cer.rolling .cer-pod .drum.big { opacity: 1; animation: drumbig .08s infinite alternate; }
@keyframes drumbig { from { transform: translate(-50%, -50%) rotate(-8deg) scale(1); } to { transform: translate(-50%, -52%) rotate(8deg) scale(1.06); } }

.hl-grid { display: flex; justify-content: center; gap: 1.2em; margin-top: 1.4em; flex-wrap: wrap; padding: 0 1em; }
.hlc { width: 13.5em; background: var(--panel-strong); border: 1px solid var(--line); border-radius: 22px; padding: 1.2em 1em; opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.8);
  transition: opacity .5s, transform .6s cubic-bezier(.2, 1.6, .4, 1); }
.hlc.in { opacity: 1; transform: none; }
.hlc .ic { font-size: 3.4em; }
.hlc .ti { font-weight: 900; font-size: 1.35em; color: var(--accent); margin: .2em 0 .5em; }
.hlc .hw { font-weight: 800; font-size: 1.3em; line-height: 1.5; }
.hlc .tx { color: var(--muted); margin-top: .5em; }
.cer-hl .kicker { font-size: 1.6em; }

.cer-pod { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 1.2em 0 0; position: relative; }
.cer-head { position: relative; z-index: 3; }
.cer-head .kicker { font-size: 1.7em; }
.champ-title { font-size: 4.4em; font-weight: 950; line-height: 1.05; opacity: 0; transform: scale(.3); transition: opacity .4s, transform .9s cubic-bezier(.2, 1.8, .4, 1);
  background: linear-gradient(90deg, #ffd23f, #fff6c8, #ffd23f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.5s linear infinite;
  filter: drop-shadow(0 0 24px rgba(255, 210, 63, .45)); }
.cer.champ .champ-title { opacity: 1; transform: none; }
.podium2 { display: flex; justify-content: center; align-items: flex-end; gap: 1.6em; z-index: 2; }
.pcol { width: 15em; display: flex; flex-direction: column; align-items: center; transition: filter .6s, opacity .6s; }
.pcol .who { opacity: 0; transform: translateY(-120px) scale(.4); transition: opacity .35s, transform .8s cubic-bezier(.2, 1.7, .4, 1); }
.pcol.in .who { opacity: 1; transform: none; }
.pcol .block { width: 100%; height: 1.2em; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, #3a4080, #252a5e); display: grid; place-items: center;
  transition: height 1s cubic-bezier(.2, 1.3, .4, 1); overflow: hidden; box-shadow: inset 0 2px 0 rgba(255,255,255,.15); }
.pcol .block span { font-size: 3.4em; font-weight: 950; opacity: 0; transition: opacity .4s .5s; }
.pcol.in .block span { opacity: 1; }
.pcol.left.in .block { height: 4.6em; }
.pcol.right.in .block { height: 3.2em; }
.pcol.center.in .block { height: 6.6em; }
.pcol.in[data-rank="2"] .block { background: linear-gradient(180deg, #e6e9f5, #9aa1c0); color: #23284f; }
.pcol.in[data-rank="3"] .block { background: linear-gradient(180deg, #f0a868, #a8612c); color: #3a1d05; }
.pcol.in[data-rank="1"] .block { background: linear-gradient(180deg, #ffe066, #e0a800); color: #3a2a00; box-shadow: 0 0 60px rgba(255, 210, 63, .55); }
.pcol.center { width: 22em; }
.pcol .avs { display: flex; justify-content: center; flex-wrap: nowrap; }
.pcol.empty { width: 8em; }
.pcol.roll .block { animation: pulse .25s infinite; }
.cav { width: 5.5em; height: 5.5em; border-radius: 50%; background: var(--c); display: inline-grid; place-items: center; font-size: 1em; margin: 0 .15em; overflow: hidden;
  box-shadow: 0 0 0 5px rgba(255,255,255,.18), 0 10px 30px rgba(0,0,0,.4); vertical-align: bottom; }
.cav:not(.ph) { font-size: 3.6em; width: 1.8em; height: 1.8em; }
.cav.ph { padding: 4px; }
.cav:not(.ph) { font-size: 3em; }
.cav.sm { width: 4em; height: 4em; }
.cav.sm:not(.ph) { font-size: 2.2em; width: 1.8em; height: 1.8em; }
.cav.xs { width: 3em; height: 3em; }
.cav.xs:not(.ph) { font-size: 1.7em; width: 1.8em; height: 1.8em; }
.pcol.center .cav:not(.sm):not(.xs) { width: 7.5em; height: 7.5em; }
.pcol.center .cav:not(.ph):not(.sm):not(.xs) { font-size: 4.2em; width: 1.8em; height: 1.8em; }
.cmem { margin-top: .3em; font-size: 1.3em; }
.pcol .nm { font-size: 1.7em; line-height: 1.15; font-weight: 900; margin-top: .25em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.pcol.center .nm { font-size: 2.3em; }
.pcol .pts { color: var(--muted); font-size: 1.15em; margin: .15em 0 .5em; }
.pcol .crown { font-size: 3.2em; line-height: 1; margin-bottom: -.15em; opacity: 0; transform: translateY(-30px) rotate(-20deg); transition: all .7s cubic-bezier(.2, 1.8, .4, 1) .5s; }
.cer.champ .pcol.in .crown { opacity: 1; transform: rotate(-8deg); animation: crown 1.6s ease-in-out 1.3s infinite alternate; }
@keyframes crown { to { transform: rotate(8deg) translateY(-6px); } }
.cer.dim .pcol.in { filter: brightness(.35) saturate(.4); }
.cer.dim { background: radial-gradient(ellipse at 50% 70%, rgba(255, 210, 63, .25), rgba(0,0,0,.55) 55%); }
.cer-rays { position: absolute; left: 50%; top: 62%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); opacity: 0; transition: opacity 1.2s; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 210, 63, .14) 0 8deg, transparent 8deg 20deg); border-radius: 50%; animation: spin 30s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%); }
.cer.champ .cer-rays { opacity: 1; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cer-rest { padding: .6em 0 .5em; min-height: 3.6em; opacity: 0; transition: opacity .8s; display: flex; flex-wrap: wrap; justify-content: center; gap: .5em 1.4em; font-size: 1.15em; align-items: center; }
.cer.s-rest .cer-rest { opacity: 1; }
.cer-rest .rr { background: var(--panel); border-radius: 999px; padding: .2em .8em; }
.cer-rest .thanks { flex-basis: 100%; color: var(--accent); font-weight: 800; font-size: 1.2em; }
.ph-drum { font-size: 90px; animation: drum .09s infinite alternate; display: inline-block; }
.ph-medal { font-size: 96px; animation: pop .7s cubic-bezier(.2, 1.8, .4, 1); }
.ph-win .p-title { color: var(--accent); text-shadow: 0 0 30px rgba(255, 210, 63, .6); }
.ph-win .ph-medal { animation: pop .7s cubic-bezier(.2, 1.8, .4, 1), pulse 1.2s ease-in-out .7s infinite; }
.tent { display: flex; flex-direction: column; align-items: center; margin: 0 .4em; }

/* Chat (Handy) */
.emote-bar .chat-btn { position: relative; margin-left: 4px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.15); border-radius: 0; }
.emote-bar.no-chat .chat-btn { display: none; }
.emote-bar .chat-btn .badge { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; border-radius: 9px; background: #ff5d73; color: #fff; font: 800 11px/17px system-ui; font-style: normal; padding: 0 4px; }
.chat-sheet { position: fixed; left: 0; right: 0; bottom: 0; height: 72vh; height: 72dvh; z-index: 60; background: #121640; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; transform: translateY(105%); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); }
.chat-sheet.open { transform: none; }
.cs-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; font-size: 13px; }
.cs-head b { font-size: 17px; }
.cs-x { margin-left: auto; background: none; border: 0; color: var(--text); font-size: 22px; padding: 4px 8px; }
.cs-list { flex: 1; overflow-y: auto; padding: 4px 12px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.cm { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.cm.me { align-self: flex-end; flex-direction: row-reverse; }
.cm-av { font-size: 22px; line-height: 1; }
.cm-b { background: var(--panel-strong); border-radius: 14px; padding: 6px 11px; font-size: 15px; line-height: 1.35; word-break: break-word; border-left: 3px solid var(--c); }
.cm.me .cm-b { border-left: 0; border-right: 3px solid var(--c); }
.cm-b b { display: block; font-size: 12px; color: var(--c); }
.cs-err { margin: 0; min-height: 18px; padding: 0 14px; color: #ff8a9b; font-size: 13px; }
.cs-form { display: flex; gap: 8px; padding: 6px 12px 12px; }
.cs-form input { flex: 1; min-width: 0; font-size: 16px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); }
/* Chat (Leinwand) */
.lw-chat { position: fixed; left: 1.2em; bottom: 5.4em; z-index: 25; display: flex; flex-direction: column; align-items: flex-start; gap: .4em; max-width: 30em; pointer-events: none; font-size: clamp(14px, 1.1vw, 26px); }
.lwc { display: flex; gap: .5em; align-items: center; background: rgba(14, 17, 50, .88); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 14px; padding: .45em .8em;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); animation: rise .35s ease-out; transition: opacity .6s, transform .6s; line-height: 1.3; word-break: break-word; }
.lwc b { color: var(--c); }
.lwc.out { opacity: 0; transform: translateX(-20px); }
.lwc-av { font-size: 1.3em; }
.m-chatlist { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mc { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-left: 3px solid var(--c); padding-left: 8px; font-size: 15px; word-break: break-word; }
.mc b { color: var(--c); }
.mc .btn { padding: 4px 10px; flex: none; }
.controls .keys kbd { margin-left: .5em; }
.controls select { max-width: 13em; }
/* Kurvenkönig und Nebelgefecht */
.kart-pad button[data-kart="D"] { background: #7b2ff7; }
.kart-pad button[data-kart="I"] { background: #c2185b; font-size: 26px; }
.kart-pad button.on, .br-pad button.on { filter: brightness(1.4); transform: scale(.96); }
.rk-pad [data-rk="F"] { background: linear-gradient(180deg, #ff5d73, #c2185b); }
.rk-pad [data-rk="B"] { background: linear-gradient(180deg, #4cc9f0, #3a56d4); }
.lw-kart { display: block; width: 100%; height: min(68vh, calc((100vw - 460px) * .5625)); border-radius: 18px; background: #2f6fd6; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
/* Leinwand: Spielbild der führenden Person */
.lw-castwrap { display: flex; gap: 2.2em; align-items: center; justify-content: center; margin-top: .6em; }
.lw-cast { position: relative; flex: 0 0 auto; height: min(60vh, 660px); aspect-ratio: 9 / 10; display: flex; align-items: center; justify-content: center; border-radius: 22px; background: rgba(0,0,0,.28); box-shadow: 0 12px 40px rgba(0,0,0,.45); margin-top: 2.6em; }
.lw-cast canvas { height: 100%; width: 100%; object-fit: contain; visibility: hidden; display: block; border-radius: 22px; }
.lw-castname { position: absolute; left: 50%; top: -2.4em; transform: translateX(-50%); padding: .3em .9em; border-radius: 999px; background: rgba(10,10,40,.78); color: var(--c, #fff); font-weight: 800; font-size: 1.25em; white-space: nowrap; }
.lw-castname:empty { display: none; }
.lw-castwait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2em; opacity: .75; font-size: 1.2em; }
.lw-castside { flex: 1 1 0; min-width: 0; max-width: 46%; }
.lw-castside .question { font-size: 1.6em !important; text-align: left; }

/* Live-Führung bei Highscore-Spielen */
.lw-lead { display: flex; align-items: center; gap: .55em; flex-wrap: wrap; font-size: 1.5em; font-weight: 850; margin: 0 0 .6em; padding: .45em .8em; border-radius: 16px; background: linear-gradient(90deg, rgba(255,210,63,.22), rgba(255,210,63,.05)); border: 2px solid rgba(255,210,63,.55); }
.lw-lead.none { background: var(--panel); border-color: transparent; opacity: .7; font-size: 1.2em; }
.lw-lead .cr { font-size: 1.3em; }
.lw-lead .tx { color: #ffd23f; text-transform: uppercase; letter-spacing: .06em; font-size: .7em; }
.lw-lead .who { min-width: 0; }
.lw-lead .v { margin-left: auto; font-weight: 900; }
.lw-lead.flash { animation: leadflash .9s ease-out; }
@keyframes leadflash { 0% { transform: scale(1.08); box-shadow: 0 0 40px #ffd23f; } 100% { transform: none; box-shadow: none; } }
.race.ranked .ln { grid-template-columns: 1.8em minmax(0, 1fr) minmax(2.5em, 7em) auto; gap: .6em; padding: .1em .4em; }
.lw-castside .lw-lead { font-size: 1.25em; }
.race.ranked .ln .num { min-width: 2.5em; }
.race.ranked .ln .pl { text-align: right; font-weight: 900; opacity: .75; }
.race.ranked .ln.lead .pl { opacity: 1; }
.race.ranked .ln.lead { background: rgba(255,210,63,.1); border-radius: 12px; }
.race.ranked.many { gap: .2em; }
.race.ranked.many .ln { font-size: 1.05em; }
.race .ln .num small.dn { display: block; font-size: .6em; opacity: .7; font-weight: 700; }

/* Punkte nach Platzierung */
.staffel .sub { margin-top: .5em; font-weight: 700; }
.huge.win-line { font-size: 3.4em; }
.awards { display: grid; grid-template-columns: 1fr; gap: .35em; max-width: 40em; margin: .8em auto 0; text-align: left; }
.awards.two { grid-template-columns: 1fr 1fr; max-width: 70em; }
.awards .aw { display: grid; grid-template-columns: 2.2em 1fr auto auto; gap: .7em; align-items: center; padding: .4em .8em; background: var(--panel); border-radius: 12px; font-size: 1.25em; }
.awards .aw.win { background: rgba(61, 220, 151, .22); }
.awards .aw.none { opacity: .55; }
.awards .aw .pl { color: var(--muted); font-weight: 800; }
.awards .aw .tx { color: var(--muted); font-size: .85em; }
.awards .aw .pt { font-weight: 900; color: var(--accent); min-width: 2.6em; text-align: right; }
.team-awards { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; margin-top: .5em; }
.team-awards .ta { border: 2px solid var(--t); border-radius: 999px; padding: .2em .8em; font-weight: 800; font-size: 1.2em; }
.team-awards .ta b { color: var(--accent); }

/* =================== ZEICHNEN UND RATEN =================== */
.z-word { text-align: center; }
.z-word span { display: block; color: var(--muted); font-size: 14px; font-weight: 650; }
.z-word b { font-size: 32px; font-weight: 900; color: var(--accent); letter-spacing: .02em; }
.z-cvwrap { display: flex; justify-content: center; }
.z-cv { display: block; border-radius: 14px; background: #fff; touch-action: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.z-pal { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.zc { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); background: var(--zc); color: #555; font-size: 15px; padding: 0; }
.zc.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.z-tools { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.zw { width: 44px; height: 40px; border-radius: 10px; background: var(--panel-strong); border: 1px solid var(--line); display: grid; place-items: center; padding: 0; }
.zw i { display: block; width: var(--zs); height: var(--zs); border-radius: 50%; background: #fff; }
.zw.on { border-color: var(--accent); background: rgba(255, 210, 63, .2); }
.z-tools .btn { padding: 8px 12px; font-size: 16px; }
.z-hint { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.z-hint b { min-width: 22px; height: 30px; border-bottom: 3px solid var(--text); text-align: center; font-size: 22px; font-weight: 900; }
.z-hint b:empty::after { content: ''; }
.zh-sp { width: 14px; }
.z-form { display: flex; gap: 8px; }
.z-form input { flex: 1; min-width: 0; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--text); font-size: 18px; }
.z-form input:focus { outline: none; border-color: var(--accent); }
.z-form .btn { padding: 0 20px; font-size: 17px; }
.z-guesses { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.zg { background: var(--panel-strong); padding: 5px 11px; border-radius: 99px; font-size: 14px; }
.zg.nah { background: rgba(255, 182, 39, .25); }
.zg.nah small { color: var(--accent); font-weight: 800; }
.zg.ok { background: rgba(61, 220, 151, .3); }
.z-guesses.small .zg { font-size: 13px; padding: 4px 9px; }
.z-reslist { display: flex; flex-direction: column; gap: 6px; }
.zr { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-left: 4px solid var(--t); background: var(--panel); border-radius: 10px; }
.zr.ok b { color: var(--good); }

body.z-on .screen-main { grid-template-columns: 1fr; }
body.z-on .board { display: none; }
.z-stage { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.z-grid { flex: 1; min-height: 0; display: flex; gap: 1.2em; justify-content: center; }
.z-tile { flex: 1 1 0; min-width: 0; max-width: 42em; display: flex; flex-direction: column; gap: .4em; background: var(--panel); border: 3px solid var(--t); border-radius: var(--radius); padding: .6em .7em .7em; }
.zt-h { display: flex; justify-content: space-between; align-items: center; gap: .5em; font-weight: 800; font-size: 1.15em; white-space: nowrap; }
.zt-n { color: var(--t); }
.zt-d { overflow: hidden; text-overflow: ellipsis; }
.zt-box { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.zt-box canvas { border-radius: 12px; }
.zt-ok { position: absolute; left: 0; right: 0; bottom: .7em; display: none; justify-content: center; }
.zt-ok.on { display: flex; }
.zt-ok span { background: var(--good); color: #06281a; font-weight: 900; padding: .3em .9em; border-radius: 99px; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.zt-hint { display: flex; justify-content: center; align-items: flex-end; gap: .3em; min-height: 2.1em; flex-wrap: wrap; }
.zt-hint b { min-width: 1em; border-bottom: .14em solid var(--text); text-align: center; font-size: 1.6em; line-height: 1.15; font-weight: 900; }
.zt-hint .zh-sp { width: .8em; }
.zt-word { font-size: 2.1em; font-weight: 900; color: var(--accent); }
.zt-g { display: flex; gap: .4em; justify-content: center; flex-wrap: wrap; min-height: 1.9em; font-size: .95em; }
.zt-g span { background: var(--panel-strong); padding: .15em .6em; border-radius: 99px; }
.zt-g span.nah { background: rgba(255, 182, 39, .3); }
.z-note { margin-top: .8em; font-weight: 700; color: var(--muted); }
.z-note.ok { color: var(--good); }

/* Schüttel-Rennen auf der Leinwand */
.lw-racewrap { margin-top: .4em; }
.lw-racewrap .race-off { display: none; }
.lw-racewrap .lw-lead { margin-bottom: .5em; }
.lw-race { width: 100%; height: min(64vh, calc((100vw - 460px) * .56)); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lw-race canvas { display: block; }

/* Probelauf mit Bots */
.probe-note { margin-top: .8em; padding: .4em .8em; border-radius: 10px; background: rgba(255, 210, 63, .14); color: #ffd23f; font-weight: 700; }
.probe-tag { display: inline-block; padding: .1em .5em; margin-right: .4em; border-radius: 8px; background: rgba(255, 210, 63, .18); color: #ffd23f; font-weight: 800; }

/* =================== ISSC-LOGO =================== */
.brand { display: flex; align-items: center; gap: .55em; }
.brand-logo { height: 1.9em; width: auto; display: block; border-radius: 3px; }
.lobby-left { display: flex; flex-direction: column; align-items: center; gap: 1.6em; }
.lobby-logo { display: block; width: min(34vh, 26vw); height: auto; border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.cer-logo { display: block; width: 13em; height: auto; margin: 0 auto 1em; border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.join-logo { display: block; width: 150px; height: auto; margin: 4px auto 14px; border-radius: 5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }

/* =================== STARTSEITE (Lobbys) =================== */
body.start { font-size: 16px; }
.st-wrap { max-width: 980px; margin: 0 auto; padding: 24px 18px 60px; display: flex; flex-direction: column; gap: 16px; }
.st-head { display: flex; align-items: center; gap: 18px; }
.st-head h1 { margin: 0; font-size: 2.2em; }
.st-logo { height: 64px; background: #fff; border-radius: 10px; padding: 6px; }
.st-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.st-card h2 { margin: 0 0 12px; }
.st-new { border-color: rgba(255, 210, 63, .45); }
.st-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.st-form .field { flex: 1 1 260px; }
.st-form .btn.big { font-size: 1.1em; padding: .7em 1.2em; }
.st-h { margin: 10px 0 0; }
.st-lobby { display: flex; flex-direction: column; gap: 10px; }
.st-lobby-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.st-name { font-size: 1.4em; font-weight: 800; }
.st-code { font-size: 2.2em; font-weight: 900; letter-spacing: .12em; color: var(--accent); font-variant-numeric: tabular-nums; }
.st-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); }
.st-stats .ok { color: var(--good); }
.st-stats .warn { color: var(--c); }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-actions .sp { flex: 1; }
.st-empty, .st-foot { margin: 4px 2px; }
.st-wrap p.bad { color: var(--bad); font-weight: 650; }
a.btn { display: inline-block; text-decoration: none; color: var(--text); }
a.btn.primary { color: #1b1600; }
