/* Zwei Schriften: Weihnachts-Schreibschrift nur für große Titel, sonst die Systemschrift (iPhone: San Francisco) */
@font-face { font-family: 'WC'; src: url(/fonts/MerryChristmasFlake.ttf) format('truetype'); font-display: swap; unicode-range: U+0000-002F, U+003A-10FFFF; }

:root {
  --cat: #2f3d5c;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, .8);           /* sekundärer Text */
  --ink-3: rgba(255, 255, 255, .6);           /* tertiärer Text */
  --gold: #f7cb4d;                            /* Akzent: Auswahl, Sieg, "du bist dran" */
  --gold-ink: #3d2c00;
  --glass: rgba(255, 255, 255, .12);          /* Karten (mattiertes Glas) */
  --glass-strong: rgba(255, 255, 255, .2);
  --fill: rgba(255, 255, 255, .16);           /* getönte Knöpfe, Chips */
  --line: rgba(255, 255, 255, .22);           /* Haarlinien */
  --shadow: 0 1px 3px rgba(0, 0, 0, .3);
  --elev: 0 6px 20px rgba(0, 0, 0, .16);
  --radius: 16px;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --rounded: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: var(--sans);
}
/* Kategoriefarben: gleiche Sättigung/Helligkeit, damit sie zusammen stimmig wirken */
body[data-cat=neutral]  { --c1: #3b4a6b; --c2: #141b2d; --cat: #2f3d5c; }
body[data-cat=wissen]   { --c1: #2a86cc; --c2: #0b3360; --cat: #1f6fae; }
body[data-cat=geschick] { --c1: #e8792f; --c2: #84300c; --cat: #c95d1c; }
body[data-cat=kraft]    { --c1: #d8262d; --c2: #6e0a11; --cat: #c01c24; }
body[data-cat=ausdauer] { --c1: #9b52c4; --c2: #3f1559; --cat: #8240aa; }
body[data-cat=humor]    { --c1: #3aa553; --c2: #11451f; --cat: #2a8a41; }
body[data-cat=gold]     { --c1: #d9a92c; --c2: #5e4206; --cat: #a77c0e; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--c2, #141b2d); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
/* Hintergrund: Kategoriefarbe als weicher Verlauf (kein Bildrahmen mehr) */
.bg { position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 120% 85% at 50% 22%, var(--c1, #3b4a6b) 0%, var(--c2, #141b2d) 100%); }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 25%, rgba(255,255,255,.07), rgba(0,0,0,.22)); }
.script { font-family: 'WC', cursive; font-weight: normal; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); letter-spacing: .01em; line-height: 1.1; }
/* früher Kapitälchen-Schrift mit Schneehaube – jetzt ruhige Systemschrift mit leichter Sperrung */
.flake { font-family: var(--sans); font-weight: 500; letter-spacing: -.005em; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.hidden { display: none !important; }
.center { text-align: center; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

.chip { display: inline-flex; align-items: center; gap: .35em; padding: .25em .75em; border-radius: 99px; background: var(--fill); white-space: nowrap; font-weight: 500; }
.chip.off { opacity: .45; }
.team-dot { display: inline-block; width: .75em; height: .75em; border-radius: 50%; background: var(--c, #fff); box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }

/* ------------------------------------------------------------------ TV */
body.tv { overflow: hidden; }
.tv .stage { position: fixed; inset: 7vh 7vw 11vh; display: flex; flex-direction: column; }
.tv h1.script { font-size: 9.5vh; margin: 0 0 2vh; text-align: center; }
.tv .sub { font-size: 3vh; text-align: center; color: var(--ink-2); }
.tv .scorebar { position: fixed; left: 7vw; right: 7vw; bottom: 3vh; display: flex; gap: 1.2vw; justify-content: center; font-size: 2.6vh; font-weight: 600; }
.tv .scorebar .chip { padding: .35em 1em; background: rgba(0,0,0,.25); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-variant-numeric: tabular-nums; }
.tv .scorebar .chip.lead { box-shadow: 0 0 0 2px var(--gold); }
.tv .corner { position: fixed; top: 2vh; right: 2vw; display: flex; gap: .6vw; opacity: .25; transition: opacity .3s; z-index: 5; }
.tv .corner:hover { opacity: 1; }
.tv .corner button { background: rgba(0,0,0,.35); color: #fff; border: 0; border-radius: 99px; padding: .4em 1em; font: 500 1.6vh var(--sans); }

.lobby-grid > div { min-width: 0; }
.lobby-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4vw; align-items: center; flex: 1; min-height: 0; }
.qr-box { background: #fff; padding: 1.4vh; border-radius: 1.5vh; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.qr-box img { display: block; width: 30vh; height: 30vh; }
.qr-url { margin-top: 1vh; font-size: 2.3vh; text-align: center; font-family: monospace; }
.names { display: flex; flex-wrap: wrap; gap: 1vh; font-size: 2.6vh; align-content: flex-start; max-height: 42vh; overflow: hidden; }
.names .chip { animation: pop .5s both; }

.team-cols { display: grid; gap: 2vw; flex: 1; min-height: 0; grid-template-columns: repeat(var(--n, 3), 1fr); }
.team-col { background: rgba(0,0,0,.18); box-shadow: 0 0 0 .3vh var(--c) inset; border-radius: 2.4vh; padding: 2vh 1.2vw; overflow: hidden; }
.team-col h2 { margin: 0 0 1.4vh; text-align: center; font-size: 5.5vh; }
.team-col .emoji { font-size: 6vh; display: block; text-align: center; }
.team-col ul { list-style: none; margin: 0; padding: 0; font-size: 3.2vh; text-align: center; }
.team-col li { padding: .25em 0; animation: pop .5s both; }
.team-col li.youngest::after { content: ' ⭐'; }

.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4vw; margin-top: 3vh; }
.cat-tile { position: relative; border-radius: 2.4vh; padding: 6vh 1vw; text-align: center; overflow: hidden; isolation: isolate; box-shadow: 0 0 0 .25vh rgba(255,255,255,.35) inset, 0 1.2vh 3vh rgba(0,0,0,.3); }
.cat-tile::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 80% 12%, rgba(255,255,255,.25), transparent 45%), linear-gradient(160deg, var(--cc), var(--cc2)); }
.cat-tile::after { content: '❄'; position: absolute; right: -1vh; bottom: -3vh; font-size: 16vh; opacity: .12; z-index: -1; }
.cat-tile .script { font-size: 5.2vh; }
.cat-tile .cnt { font-size: 2vh; margin-top: 1vh; color: var(--ink-2); font-weight: 500; }
.cat-tile.off { opacity: .35; filter: grayscale(.7); }
.team-col li.picked { font-size: 4vh; font-weight: bold; }
.buzz-banner { margin: 2vh auto 0; padding: 1.2vh 3vw; border-radius: 99px; background: #fff; color: #222; font-size: 4.6vh; font-weight: bold; box-shadow: 0 0 0 .6vh var(--c), 0 1vh 3vh rgba(0,0,0,.4); animation: pop .4s both; width: fit-content; }
.buzz-banner small { font-size: 2.6vh; font-weight: normal; }
.cat-tile .votes { display: inline-block; font-size: 3vh; margin-top: 1.4vh; padding: .2em .8em; border-radius: 99px; background: rgba(0,0,0,.25); min-height: 4vh; }
.cat-tile .votes.has { background: rgba(255,255,255,.92); color: #222; }
.pick { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: 0; background: var(--fill); color: #fff; font: 500 17px var(--sans); text-align: left; }
.pick small { font-size: 12px; opacity: .85; white-space: nowrap; }
.pick.on { background: #fff; color: #1c1c1e; box-shadow: 0 0 0 3px var(--gold); }
.list li:has(> .pick) { border-bottom: 0; padding: 4px 0; }
.team-btn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 99px; border: 2px solid var(--c); background: rgba(255,255,255,.15); color: #fff; font-size: 16px; }
.team-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.team-btn .team-dot { margin-left: 6px; }
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fadein .2s both; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; padding: 18px 16px 28px; border-radius: 22px 22px 0 0; background: linear-gradient(var(--c2, #555), #222); border-top: 4px solid var(--c); box-shadow: 0 -10px 30px rgba(0,0,0,.4); animation: slideup .25s both; }
.sheet .close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 18px; }
.sheet h2.script { margin: 10px 0 4px; }
.team-photo-big { display: block; width: 100%; max-height: 46vh; object-fit: cover; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.35); margin: 6px 0 10px; }
.team-photo { display: block; width: 100%; height: 24vh; object-fit: cover; border-radius: 1.4vh; border: .4vh solid var(--c); margin-bottom: 1vh; animation: pop .5s both; }
.mini-photo { width: 3.2vh; height: 3.2vh; border-radius: 50%; object-fit: cover; border: 2px solid var(--c); }
.win-photos { display: flex; gap: 2vw; justify-content: center; margin-bottom: 1vh; }
.win-photos img { height: 30vh; max-width: 40vw; object-fit: cover; border-radius: 2vh; border: .6vh solid var(--c); box-shadow: 0 0 0 .4vh var(--gold), 0 1vh 4vh rgba(0,0,0,.5); animation: pop .6s both; }
.podium-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.4vh; border: .5vh solid var(--c); margin-bottom: 1vh; }
.photo-missing { text-align: center; font-size: 2.4vh; padding: 3vh 0; opacity: .85; border: .3vh dashed rgba(255,255,255,.6); border-radius: 1.4vh; margin-bottom: 1vh; }
@keyframes fadein { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
canvas.sketch { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; border: 3px solid #fff; background: #fffdf7; box-shadow: 0 6px 18px rgba(0,0,0,.3); margin: 8px 0; touch-action: none; }
.tv canvas.sketch { width: auto; height: 60vh; margin: 1vh auto; border-width: .5vh; border-radius: 1.6vh; }
.new-badge { display: inline-block; vertical-align: super; margin-left: .4em; padding: .1em .45em; border-radius: .4em; background: var(--gold); color: #7a1010; font: bold .32em var(--serif); letter-spacing: .05em; text-shadow: none; transform: rotate(8deg); }
.palette { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.pal { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); }
.pal.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold); }
.pal.size { background: rgba(255,255,255,.85); font-size: 18px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.timer-inline-ph { font-size: 26px; font-weight: bold; font-variant-numeric: tabular-nums; }
.timer-inline-ph.done { color: #ffe08a; }
.secret-chip { background: #fff; color: #222; border-radius: 10px; padding: 6px 12px; font-weight: bold; font-size: 18px; }
.tabu { margin: -6px 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(192,20,27,.85); border: 2px solid #fff; text-align: center; }
.tabu span { display: inline-block; margin: 3px 6px; font-weight: bold; text-decoration: line-through; }
.poem-input { width: 100%; border-radius: 12px; border: 0; padding: 12px 14px; font: 17px/1.5 var(--sans); color: #1c1c1e; background: rgba(255,255,255,.96); resize: vertical; }
.poem-text { white-space: pre-wrap; font-size: 17px; line-height: 1.5; }
.card.voted { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold); }
.emoji-input { font-size: 32px !important; text-align: center; }
.emoji-msg { font-size: 54px; text-align: center; letter-spacing: 4px; margin: 10px 0; line-height: 1.3; word-break: break-word; }
.tv .emoji-msg { font-size: 13vh; margin: 4vh 0 2vh; animation: pop .5s both; }
.tv .poem-big { white-space: pre-wrap; font-size: 4vh; line-height: 1.45; text-align: center; max-height: 54vh; overflow: hidden; margin: 1vh auto; max-width: 64vw; padding: 2.4vh 3vw; border-radius: 2vh; background: rgba(0,0,0,.32); box-shadow: 0 1vh 3vh rgba(0,0,0,.25); animation: pop .5s both; }
.tv .word-chips { display: flex; gap: 1.4vw; justify-content: center; margin: 2vh 0; }
.tv .word-chips span { background: #fff; color: #222; border-radius: 1.2vh; padding: .8vh 1.6vw; font-size: 4vh; font-weight: bold; box-shadow: 0 .6vh 1.6vh rgba(0,0,0,.3); }
.opt { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; margin: 8px 0; padding: 12px 14px; border-radius: 14px; border: 0; background: var(--fill); color: #fff; font: 500 17px var(--sans); text-align: left; transition: transform .12s ease; }
.opt:active { transform: scale(.98); }
.opt b { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--cat); }
.opt .mini { margin-left: auto; }
.opt.on { background: #fff; color: #1c1c1e; box-shadow: 0 0 0 3px var(--gold); }
.opt.on b { background: var(--cat); color: #fff; }
.opt.right { background: #2e9b3e; border-color: #c9ffbf; }
.opt.wrong { background: rgba(0,0,0,.3); opacity: .8; text-decoration: line-through; }
.prod-img { display: block; max-width: 100%; max-height: 34vh; margin: 8px auto; border-radius: 14px; background: #fff; padding: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4vh 1.4vw; max-width: 70vw; margin: 0 auto; width: 100%; }
.quiz-grid .o { display: flex; align-items: center; gap: 1vw; padding: 1.6vh 1.2vw; border-radius: 1.8vh; background: rgba(0,0,0,.22); box-shadow: 0 0 0 .15vh rgba(255,255,255,.28) inset; font-size: 3.2vh; font-weight: 500; }
.quiz-grid .o b { display: inline-grid; place-items: center; min-width: 5vh; height: 5vh; border-radius: 50%; background: #fff; color: var(--cat); }
.quiz-grid .o .who { margin-left: auto; font-size: 3vh; }
.quiz-grid .o.right { background: #2e9b47; box-shadow: 0 0 0 .3vh #c9ffbf inset; animation: pop .5s both; }
.quiz-grid .o.dim { opacity: .45; }
.tv-prod { display: block; max-height: 34vh; max-width: 40vw; margin: 0 auto 1vh; border-radius: 1.4vh; background: #fff; padding: 1vh; box-shadow: 0 1vh 3vh rgba(0,0,0,.35); }
.buzzer { display: block; width: 72vw; max-width: 300px; aspect-ratio: 1; margin: 26px auto; border-radius: 50%; border: 8px solid #fff; background: radial-gradient(circle at 35% 30%, #ff6b6b, #c0141b 60%, #7a0a0f); color: #fff; font-size: 44px; font-weight: bold; letter-spacing: .05em; box-shadow: 0 12px 30px rgba(0,0,0,.45), inset 0 -8px 18px rgba(0,0,0,.35); text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.buzzer:active { transform: scale(.95); }
.buzzer:disabled { background: radial-gradient(circle at 35% 30%, #9be29b, #2e8b3a 60%, #1c5a24); font-size: 70px; }
.secret-word { margin: 18px 0; padding: 28px 14px; border-radius: 20px; background: #fff; color: #1c1c1e; font-size: 34px; font-weight: 700; letter-spacing: -.02em; text-align: center; line-height: 1.2; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.film-emoji { font-size: 15vh; line-height: 1.2; text-align: center; letter-spacing: 1vw; margin: 3vh 0 1vh; filter: drop-shadow(0 .6vh 1.2vh rgba(0,0,0,.35)); animation: pop .5s both; }
.film-img { display: block; max-width: 100%; max-height: 52vh; margin: 0 auto; border-radius: 1.4vh; border: .5vh solid #fff; box-shadow: 0 1vh 3vh rgba(0,0,0,.45); }
.cat-btn.mine { box-shadow: 0 0 0 4px var(--gold), 0 6px 18px rgba(0,0,0,.3); }
.cat-tile.picked { transform: scale(1.08); box-shadow: 0 0 0 5px var(--gold), 0 10px 30px rgba(0,0,0,.4); }

.draw-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.draw-cat { font-size: 16vh !important; text-align: left !important; margin: 0 !important; }
.draw-tag { font-size: 2.8vh; margin-bottom: 6vh; }
.slot { font-size: 7vh; height: 10vh; overflow: hidden; text-align: center; }
.slot.final { animation: pop .6s both; }

.slide { display: grid; grid-template-columns: 22vw 1fr; gap: 1.2vh 2vw; font-size: 2.7vh; line-height: 1.45; }
.slide dt { font-weight: 600; text-align: right; color: var(--ink-2); }
.slide dd { margin: 0; }
.ready-row { display: flex; flex-wrap: wrap; gap: .8vh; justify-content: center; margin-top: auto; font-size: 2.1vh; padding-bottom: 5vh; }
.ready-row .chip.yes { background: rgba(255,255,255,.85); color: #222; }

.timer-big { font-size: 20vh; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--rounded); font-weight: 600; text-shadow: 0 4px 14px rgba(0,0,0,.25); line-height: 1; }
.timer-big.done { animation: blink 1s infinite; color: #ffe08a; }
.timer-inline { display: inline-block; margin-left: 1.2vw; font-family: var(--rounded); font-size: 4.4vh; font-weight: bold; vertical-align: middle; font-variant-numeric: tabular-nums; }
.timer-inline.done { color: #ffe08a; animation: blink 1s infinite; }
.vals { display: flex; gap: 2vw; justify-content: center; font-size: 3vh; margin-top: 3vh; flex-wrap: wrap; }
.vals .chip { padding: .4em 1em; }
.vals .chip.win { background: var(--gold); color: var(--gold-ink); }

.q-text { font-size: 4.4vh; font-weight: 600; letter-spacing: -.01em; text-align: center; line-height: 1.22; margin: .8vh 3vw 2.4vh; text-wrap: balance; }
.q-meta { text-align: center; font-size: 2.2vh; color: var(--ink-2); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.ans-row { display: flex; gap: 1.6vw; justify-content: center; flex-wrap: wrap; font-size: 3vh; }
.ans-card { min-width: 14vw; text-align: center; padding: 1.6vh 1.2vw; border-radius: 2vh; background: rgba(0,0,0,.22); box-shadow: 0 0 0 .25vh var(--c) inset; }
.ans-card .v { font-size: 4.6vh; font-weight: bold; }
.ans-card.win { background: var(--gold); color: var(--gold-ink); animation: pop .6s both; }
.truth { text-align: center; font-size: 6vh; margin-top: 3vh; animation: pop .6s both; }
.truth small { display: block; font-size: 2.4vh; opacity: .9; }

.board { display: grid; gap: .7vh; max-width: 62vw; margin: 0 auto; width: 100%; }
.tile { display: flex; align-items: center; gap: 1.2vw; padding: .6vh 1.4vw; border-radius: 1.4vh; background: rgba(0,0,0,.24); box-shadow: 0 0 0 .15vh rgba(255,255,255,.25) inset; font-size: 3vh; font-weight: 500; min-height: 5.8vh; }
.tile .rank { font-family: var(--rounded); font-weight: 600; font-size: 3.2vh; width: 3vw; text-align: center; color: var(--ink-3); }
.tile .txt { flex: 1; }
.tile.open { background: rgba(255,255,255,.94); color: #1c1c1e; animation: flip .6s both; }
.tile.open .rank { color: var(--cat); }
.tile .by { display: flex; gap: .4vw; font-size: 3.4vh; }
.team-stat { display: flex; justify-content: center; gap: 1.2vw; margin-top: 1.4vh; font-size: 2.2vh; flex-wrap: wrap; }
.team-stat .chip.lead { background: var(--gold); color: var(--gold-ink); }
.guess-cols { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 1.2vw; margin-top: 1.2vh; font-size: 1.9vh; }
.guess-cols .col { background: rgba(0,0,0,.2); border-radius: 1.4vh; padding: 1vh .8vw; box-shadow: 0 .4vh 0 var(--c) inset; }
.guess-cols .ok { color: #c9ffbf; } .guess-cols .no { opacity: .6; text-decoration: line-through; }

.winner-big { text-align: center; margin-top: 4vh; }
.winner-big .emoji { font-size: 14vh; display: block; animation: bounce 1.4s infinite; }
.winner-big .script { font-size: 10vh; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; flex: 1; padding-bottom: 6vh; }
.podium .p { width: 16vw; text-align: center; }
.podium .block { background: rgba(255,255,255,.85); color: #222; border-radius: 1.2vh 1.2vh 0 0; font-size: 5vh; font-weight: bold; padding-top: 1vh; }
.podium .emoji { font-size: 8vh; }
.podium .name { font-size: 3.2vh; font-family: var(--sans); font-weight: 600; margin-bottom: .6vh; text-shadow: none; }
.podium .block { font-family: var(--rounded); }

/* ------------------------------------------------------------------ Handy */

body.phone, body.tv { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.phone input, body.phone textarea { -webkit-user-select: text; user-select: text; }
#snow, #frost { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.phone .lead, .phone h1, .phone h2 { text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.phone .wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
/* Navigationsleiste wie unter iOS: Material mit Unschärfe, Haarlinie */
.phone header, .host header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; min-height: 52px;
  padding: calc(6px + env(safe-area-inset-top)) 16px 6px; background: rgba(0,0,0,.22); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line); font-size: 15px; }
.phone header .grow, .host header .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone header b, .host header b { font-weight: 600; }
.phone header .pts { font-weight: 600; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 99px; background: var(--fill); }
.phone h1.script { font-size: 50px; text-align: center; margin: 24px 0 8px; }
.phone h2.script { font-size: 40px; text-align: center; margin: 20px 0 6px; }
.phone .lead { font-size: 17px; text-align: center; line-height: 1.45; margin: 6px 0 18px; color: var(--ink-2); }
/* Karten: mattiertes Glas statt weißer Umrandung */
.card { background: var(--glass); border: .5px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0;
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); line-height: 1.45; font-size: 17px; }
.card h3 { margin: 0 0 10px; font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
/* Knöpfe: gefüllt = Hauptaktion, getönt = Nebenaktion; mind. 44 pt hoch */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 13px 18px; margin: 10px 0; border: 0; border-radius: 14px;
  background: #fff; color: var(--cat); font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: -.01em; box-shadow: var(--elev);
  transition: transform .12s ease, opacity .12s ease; }
.btn:active { transform: scale(.97); opacity: .85; }
.btn.ghost { background: var(--fill); color: #fff; box-shadow: none; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; margin: 6px 0; border-radius: 12px; }
.btn:disabled { opacity: .4; }
.btn:focus-visible, .opt:focus-visible, .cat-btn:focus-visible, .pick:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: 15px; font-weight: 600; margin: 0 0 6px 4px; color: var(--ink-2); }
.field span small, .field span .mini { font-weight: 400; }
.field input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 0; background: rgba(255,255,255,.96); color: #1c1c1e; font-size: 17px; font-family: var(--sans); }
.field input:focus { outline: 3px solid var(--gold); outline-offset: 0; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input { flex: 1; min-width: 0; }
.input-row .unit { font-size: 18px; min-width: 2em; }
.err { background: rgba(0,0,0,.25); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 12px; margin: 10px 0; font-size: 15px; }
.team-hero { text-align: center; padding: 22px 12px; border-radius: 22px; background: rgba(0,0,0,.18); box-shadow: 0 0 0 3px var(--c) inset; animation: pop .6s both; }
.team-hero .emoji { font-size: 74px; line-height: 1; }
.team-hero .script { font-size: 48px; margin-top: 6px; }
.cat-btn { position: relative; overflow: hidden; display: block; width: 100%; margin: 10px 0; padding: 16px 18px; min-height: 76px; border-radius: 18px; border: 0; color: #fff; text-align: left; isolation: isolate; box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, var(--elev); }
.cat-btn::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.22), transparent 45%), linear-gradient(135deg, var(--cc), var(--cc2)); z-index: -1; }
.cat-btn::after { content: '❄'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 46px; opacity: .25; }
[data-c=wissen] { --cc: #2a86cc; --cc2: #154468; } [data-c=geschick] { --cc: #e8792f; --cc2: #743d18; } [data-c=kraft] { --cc: #d8262d; --cc2: #6c1317; } [data-c=ausdauer] { --cc: #9b52c4; --cc2: #4e2962; } [data-c=humor] { --cc: #3aa553; --cc2: #1d532a; }
.cat-btn .script { font-size: 34px; display: block; }
.cat-btn small { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.cat-btn small { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.cat-btn:disabled { opacity: .35; }
.steps .dots { display: flex; justify-content: center; gap: 8px; margin: 6px 0 2px; }
.steps .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.4); }
.steps .dots i.on { background: #fff; }
.step { animation: slidein .35s both; min-height: 150px; }
.step .big { font-size: 46px; text-align: center; display: block; margin-bottom: 6px; }
.nav-row { display: flex; gap: 10px; }
.nav-row .btn { margin: 6px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0; border-bottom: .5px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.ok { color: #c9ffbf; }
.timer-sm { font-size: 48px; font-family: var(--rounded); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; margin: 4px 0; }
.timer-sm.done { color: #ffe08a; }
.badge-win { display: inline-block; background: var(--gold); color: var(--gold-ink); border-radius: 8px; padding: 2px 8px; font-weight: 600; font-size: 13px; }

/* ------------------------------------------------------------------ Umschalter Spielen / Moderation (Handy) */
body.has-modbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
#modbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 4px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(18, 18, 22, .78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--line); }
#modbar button { flex: 1; position: relative; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 12px; background: transparent; color: #fff; font-size: 15px; font-weight: 600; opacity: .65; }
#modbar button.on { background: rgba(255,255,255,.95); color: #1c1c1e; opacity: 1; }
#modbar .dot { display: none; position: absolute; top: 7px; right: 14px; width: 11px; height: 11px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 0 2px #fff; animation: blink 1s infinite; }
#modbar .dot.show { display: block; }
#modframe { position: fixed; left: 0; right: 0; top: 0; bottom: calc(64px + env(safe-area-inset-bottom)); width: 100%; height: calc(100% - 64px - env(safe-area-inset-bottom)); border: 0; z-index: 10; display: none; background: #333; }
body.mode-mod #modframe { display: block; }
body.mode-mod #app { display: none; }
body.embed header a { display: none; }

/* ------------------------------------------------------------------ Moderation */
.host .wrap { max-width: 860px; margin: 0 auto; padding: 0 16px 60px; }
.host .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.host .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.host .row .btn { width: auto; flex: 1 1 auto; }
.host select, .host input[type=number], .host input[type=text] { min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 0; font: 16px var(--sans); color: #1c1c1e; background: rgba(255,255,255,.96); }
.host .tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--fill); }
.host details { margin: 12px 0; border-radius: var(--radius); background: rgba(0,0,0,.14); }
.host summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; font-size: 17px; list-style: none; }
.host summary::-webkit-details-marker { display: none; }
.host summary::after { content: '›'; margin-left: auto; font-size: 22px; color: var(--ink-3); transition: transform .2s; }
.host details[open] > summary::after { transform: rotate(90deg); }
.host details > .card { margin: 0 8px 8px; }
.mini { font-size: 13px; color: var(--ink-2); }

@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flip { from { transform: scaleY(.1); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes bounce { 50% { transform: translateY(-2vh); } }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ Chromecast */
.cast .corner { display: none; }
.cast .card, .cast .tv .scorebar .chip, .cast .scorebar .chip { backdrop-filter: none; -webkit-backdrop-filter: none; }
google-cast-launcher.cast-btn { display: inline-block; width: 28px; height: 28px; cursor: pointer; --connected-color: #f7cb4d; --disconnected-color: #fff; }
.host .card a { color: #fff; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 3px; font-weight: 500; }

/* ------------------------------------------------------------------ Kopfschmuck-Editor (Gruppenfoto) */
body.he-open { overflow: hidden; }
.hat-editor { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(12, 16, 28, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: fadein .2s both; }
.he-top { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.he-top b { font-weight: 600; }
.he-status { margin-left: auto; font-size: 13px; color: var(--ink-2); text-align: right; }
.he-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: #fff; font-size: 16px; }
.he-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.he-stage canvas { max-width: 100%; max-height: 100%; border-radius: 14px; touch-action: none; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.he-sel { display: flex; justify-content: center; gap: 8px; }
.he-sel button { min-width: 48px; min-height: 44px; border-radius: 12px; border: 0; background: var(--fill); color: #fff; font-size: 20px; }
.he-hint { margin: 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.he-bar { display: flex; gap: 8px; }
.he-bar .btn { flex: 1; margin: 0; }
.he-sparkle { animation: sparkle 1.1s ease-in-out infinite; }
@keyframes sparkle { 50% { filter: brightness(1.18) saturate(1.2); box-shadow: 0 0 0 4px rgba(247,203,77,.55), 0 8px 30px rgba(0,0,0,.4); } }
.gallery-link { display: block; text-align: center; margin: -2px 0 8px; padding: 10px; font-size: 15px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.game-chip { margin: 3px; color: #fff; border: 0; font: 500 14px var(--sans); min-height: 34px; cursor: pointer; }
.game-chip.played { text-decoration: line-through; opacity: .55; }
.game-chip.excluded { opacity: .55; background: rgba(0,0,0,.25); }
.host .overlay .sheet { background: linear-gradient(var(--cc2, #2a3550), #141b2d); border-top-color: var(--cc, #fff); }
.host .overlay .sheet h3 { font-size: 17px; font-weight: 600; margin: 14px 0 4px; }
.host .overlay .sheet p, .host .overlay .sheet li { font-size: 16px; line-height: 1.45; }

/* Chromecast (alte Geräte, wenig Leistung): nichts, was ständig neu gezeichnet werden muss */
.cast *, .cast *::before, .cast *::after { animation: none !important; transition: none !important; }
.cast .script, .cast .q-text, .cast .timer-big { text-shadow: none; }
.cast .film-emoji, .cast .winner-big .emoji { filter: none; }
.cast .tv .scorebar .chip, .cast .scorebar .chip { background: rgba(0,0,0,.35); }
/* Chromecast: fallender Schnee als GPU-Animation (nur transform) */
#snowfall { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#snowfall > div { position: absolute; left: 0; top: -100%; width: 100%; height: 200%; background-repeat: repeat; will-change: transform; transform: translate3d(0, 0, 0); }
.cast #snowfall > div { animation: snowfall var(--d, 20s) linear infinite !important; }
@keyframes snowfall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 50%, 0); } }
#music-hint { position: fixed; left: 50%; top: 2vh; transform: translateX(-50%); z-index: 40; padding: .6em 1.2em; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font: 600 2vh var(--sans); cursor: pointer; }
.tv-vol { display: inline-flex; align-items: center; gap: 2px; background: var(--fill); border-radius: 12px; padding: 2px; font-variant-numeric: tabular-nums; font-size: 14px; }
.tv-vol button { min-width: 44px; min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-size: 22px; font-weight: 600; }
.tv-vol button:active { background: rgba(255,255,255,.2); }
.tv-vol span { min-width: 2.2em; text-align: center; }
/* Chromecast: Emojis aus der mitgelieferten Emoji-Schrift statt der veralteten Gerätschrift */
body.cast { --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Color Emoji', sans-serif;
  --rounded: ui-rounded, 'SF Pro Rounded', -apple-system, 'Segoe UI', Roboto, 'Noto Color Emoji', sans-serif; }
.cast .script { font-family: 'WC', 'Noto Color Emoji', cursive; }
.cast .emoji, .cast .film-emoji, .cast .emoji-msg { font-family: 'Noto Color Emoji', sans-serif; }
.sound-label { margin: 12px 0 2px; font-weight: 600; font-size: 15px; }
.sound-row { display: flex; align-items: center; gap: 10px; }
.sound-row input[type=range] { flex: 1; min-height: 44px; accent-color: #fff; }
.sound-row .spk { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--fill); font-size: 20px; line-height: 1; }
.sound-row .spk.off { background: rgba(0,0,0,.25); }
#tv-ver { position: fixed; left: 1vw; bottom: .6vh; font: 1.2vh var(--sans); color: rgba(255,255,255,.35); z-index: 5; pointer-events: none; }
.prep-tag { display: inline-flex; align-items: center; gap: .3em; padding: .15em .6em; border-radius: 99px; background: var(--fill); font-size: 13px; font-weight: 600; white-space: nowrap; }
