/* Brett in Schräglage, Minispiel-Bühne, Handy-Ansichten und Lobby.
   Wird nach style.css geladen und überschreibt dort die flache Brett-Darstellung. */

.pill { background: var(--panel2); border-radius: 999px; padding: .2em .9em; font-weight: 600; white-space: nowrap; }
#game main { position: relative; }
#tilt { --tilt: 38deg; width: min(94%, calc((100vh - 210px) * 1.3)); margin-top: -3vh; perspective: 1500px; perspective-origin: 50% 10%; container-type: inline-size; }
#board { width: 100%; aspect-ratio: 1000 / 720; container-type: normal; transform: rotateX(var(--tilt)); transform-style: preserve-3d; transform-origin: 50% 60%; border-radius: 6cqw; box-shadow: 0 3cqw 0 -1cqw rgba(0, 0, 0, .4), 0 5cqw 6cqw rgba(0, 0, 0, .45); }
.arena-insel #board { background: radial-gradient(ellipse at 50% 50%, #66d9e8, #1c7ed6 75%); }
.arena-stern #board { background: radial-gradient(.3cqw .3cqw at 12% 22%, #fff, transparent), radial-gradient(.25cqw .25cqw at 82% 14%, #fff, transparent), radial-gradient(.3cqw .3cqw at 91% 78%, #fff, transparent), radial-gradient(.2cqw .2cqw at 7% 85%, #fff, transparent), radial-gradient(.25cqw .25cqw at 50% 6%, #fff, transparent), radial-gradient(ellipse at 50% 50%, #2b1d6b, #080820 80%); }
.edges line { stroke: rgba(0, 0, 0, .3); stroke-width: 20; }
.arena-insel .edges line { stroke: #b98a4a; }
.arena-stern .edges line { stroke: rgba(177, 151, 252, .45); }
#game .edges.dash line { stroke: rgba(255, 255, 255, .7); stroke-width: 3; stroke-dasharray: 2 10; }
.field .rim { fill: rgba(0, 0, 0, .45); stroke: none; filter: none; }
.field circle { stroke-width: 3; filter: none; }
.field.fork circle { stroke: var(--gold); stroke-width: 4; }
.field.opt0 circle { stroke: #339af0; stroke-width: 9; animation: pulse .8s infinite; }
.field.opt1 circle { stroke: #ff922b; stroke-width: 9; animation: pulse .8s infinite; }
.btn.optA { background: #1c7ed6; }
.btn.optB { background: #e8590c; }

/* Alles, was auf dem schrägen Brett aufrecht stehen soll */
.up { position: absolute; transform: translate(-50%, -100%) rotateX(calc(-1 * var(--tilt))); transform-origin: 50% 100%; pointer-events: none; }
.token { transition: left .4s ease, top .4s ease; }
.token .avatar { --s: 4.4cqw; }
.token.on .avatar { box-shadow: 0 0 0 .45cqw var(--gold), 0 0 2.5cqw var(--gold); }
.prop { font-size: calc(var(--z) * 1cqw); line-height: 1; filter: drop-shadow(0 .4cqw .3cqw rgba(0, 0, 0, .35)); }
#gold.up { transform: translate(-50%, -100%) rotateX(calc(-1 * var(--tilt))); font-size: 3.4cqw; line-height: 1; animation: none; filter: drop-shadow(0 0 1cqw var(--gold)); }
.float.up { animation: rise3d 1.5s forwards; }
@keyframes rise3d { from { transform: translate(-50%, -150%) rotateX(calc(-1 * var(--tilt))); } to { transform: translate(-50%, -420%) rotateX(calc(-1 * var(--tilt))); opacity: 0; } }

#dice { position: absolute; inset: 0; gap: 2vmin; }
.die { width: 16vmin; height: 16vmin; border-radius: 3vmin; font-size: 10vmin; box-shadow: 0 1vmin 0 #bbb, 0 2vmin 4vmin rgba(0, 0, 0, .5); }
#pop { position: absolute; inset: 0; display: none; place-items: center; z-index: 9; background: rgba(10, 6, 40, .55); border-radius: 20px; padding: 12px; }
#pop.show { display: grid; }
.popin { background: var(--panel); border-radius: 24px; padding: 26px 32px; width: min(660px, 100%); max-height: 100%; overflow: auto; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: pop .25s cubic-bezier(.3, 1.6, .5, 1); }
.popin h2 { color: var(--gold); }
.either { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.either div { background: var(--panel2); border-radius: 14px; padding: 12px; }
#game footer { min-height: 56px; }

/* ---------- Minispiel-Bühne am großen Bildschirm ---------- */
.wait { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.wait span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 16px; opacity: .55; font-size: 1.1rem; }
.wait span.ok, .wait span.win { opacity: 1; }
.wait span.win b { color: var(--gold); }
.wait span.out { opacity: .3; }
.race { display: grid; gap: 8px; margin: 12px 0; }
.lane { position: relative; height: 62px; background: rgba(0, 0, 0, .25); border-radius: 12px; border-right: 6px dashed #fff; }
.runner { position: absolute; left: 0; top: 4px; padding-top: 4px; transition: left .12s; }
.opts .opt { padding: 14px; border-radius: 12px; font-weight: 600; }
.c0 { background: #e03131 !important; }
.c1 { background: #1971c2 !important; }
.c2 { background: #e8590c !important; }
.c3 { background: #2f9e44 !important; }
.opt.dim { opacity: .25; }
.opt.right { outline: 4px solid #fff; opacity: 1; }
.cwc { cursor: default; }
.cwc.g { background: var(--ok); color: #fff; }
.cwc.x { background: #111; color: #fff; }
.cwc.n.open { background: #8d8670; color: #ddd; }
.bar { margin: 10px 0; }

/* ---------- Ansichten (Handy und Ersatzfeld am Computer) ---------- */
.vbody { margin-bottom: 12px; }
.vbody .word { font-size: clamp(1.6rem, 8vw, 2.6rem); }
.vbody .cwc { padding: 12px 2px; font-size: .78rem; overflow-wrap: anywhere; }
.vbtns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.vbtns.col { flex-direction: column; }
.vbtns.col .btn { width: 100%; }
.vbtns .btn:has(.big) { justify-content: flex-start; text-align: left; }
.vbtns .big { font-size: 1.8rem; }
.vbtns.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.vbtns.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.vbtns.grid5 .btn { padding: .9em 0; }
.vbtns.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.btn.cwb { background: #f1e9d2; color: #333; padding: 1em .1em; font-size: .78rem; overflow-wrap: anywhere; border-radius: 10px; }
.btn.cwb:disabled { opacity: 1; }
.btn.cwb.g { background: var(--ok); color: #fff; }
.btn.cwb.x { background: #111; color: #fff; }
.btn.cwb.n { background: #8d8670; color: #ddd; }
.btn.huge { font-size: 1.8rem; padding: 1em; width: 100%; border-radius: 22px; }
.vform { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.bigpad { width: min(100%, 50vh); aspect-ratio: 1; margin: 10px auto 0; border-radius: 50%; border: 0; font-weight: 700; font-size: 2.4rem; font-family: inherit; color: #fff; background: radial-gradient(circle at 35% 30%, #ff9f6b, var(--pri2)); box-shadow: 0 12px 0 #a61e4d, 0 20px 30px rgba(0, 0, 0, .5); touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.bigpad.hit { transform: translateY(9px); box-shadow: 0 3px 0 #a61e4d; }

body.ctl { overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
#ctl { min-height: 100dvh; display: flex; flex-direction: column; }
#chead { display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px; background: var(--panel); position: sticky; top: 0; z-index: 2; }
#chead .cur { margin-left: auto; }
#cview { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 20px 16px 30px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
body.ctl .btn { font-size: 1.15rem; padding: .85em 1em; }
body.ctl .btn.huge { font-size: 1.9rem; padding: 1.1em; }
body.ctl .btn.cwb { font-size: .78rem; padding: 1em .1em; }
body.ctl h2 { font-size: 1.7rem; }
body.ctl .vbody { font-size: 1.1rem; }
.cwait { color: var(--dim); font-size: 1.15rem; }
.sent { font-size: 4.5rem; color: var(--ok); }

#localviews { position: fixed; right: 10px; bottom: 10px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-height: 92vh; overflow: auto; width: 280px; }
.lv { background: var(--panel); border: 2px solid var(--gold); border-radius: 16px; padding: 10px; text-align: center; font-size: .85rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.lv h2 { font-size: 1rem; }
.lvh { font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.lv .btn { font-size: .85rem; padding: .45em .7em; }
.lv .btn.huge { font-size: 1.05rem; padding: .6em; border-radius: 14px; }
.lv .bigpad { aspect-ratio: auto; height: 64px; width: 100%; border-radius: 16px; font-size: 1.1rem; box-shadow: 0 5px 0 #a61e4d; }
.lv .vbody .word { font-size: 1.3rem; }

/* ---------- Lobby ---------- */
.grid.qr { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.qr .pbig { cursor: default; }
.qrbox { background: #fff; padding: 10px; border-radius: 12px; color: #222; }
.qrbox img, .qrbox canvas { display: block; }
.roomcode { background: var(--panel2); border-radius: 12px; padding: .3em .8em; }
.roomcode b { color: var(--gold); letter-spacing: 3px; font-size: 1.5rem; }
.warn { background: rgba(232, 89, 12, .2); border: 2px solid #e8590c; border-radius: 12px; padding: 10px 14px; }

/* ---------- Themenwahl ---------- */
.catrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.cat { border-radius: 18px; padding: 18px 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 1.1rem; transition: transform .3s, opacity .3s; }
.cat span { font-size: 2.8rem; line-height: 1; }
.cat em { font-style: normal; font-weight: 700; font-size: 1.6rem; }
.cat.dim { opacity: .3; transform: scale(.92); }
.stage-head .pill { font-size: 1.1rem; }
.cat.won { transform: scale(1.08); outline: 5px solid var(--gold); }

/* ---------- Hüpfer und Sumo ---------- */
.pgame { width: 100%; max-height: 68vh; object-fit: contain; border-radius: 18px; touch-action: none; }
.towers { display: flex; gap: 12px; justify-content: center; height: 300px; margin: 12px 0; }
.tower { position: relative; width: 84px; border-radius: 14px; background: linear-gradient(0deg, rgba(153, 233, 242, .35), rgba(59, 91, 219, .35)); }
.climber { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 14px; transition: bottom .5s; font-size: .85rem; white-space: nowrap; }
.arena { width: 100%; max-width: 640px; border-radius: 20px; background: #1864ab; }
.joy { position: relative; width: min(100%, 46vh); aspect-ratio: 1; margin: 10px auto 0; border-radius: 50%; background: radial-gradient(circle, var(--panel2), var(--panel)); border: 4px solid var(--gold); touch-action: none; container-type: inline-size; }
.joy i { position: absolute; left: 50%; top: 50%; width: 32%; height: 32%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9f6b, var(--pri2)); transform: translate(-50%, -50%); box-shadow: 0 6px 14px rgba(0, 0, 0, .5); pointer-events: none; }
.lv .joy { width: 150px; }
.lv .pgame { max-height: 240px; }

/* ---------- Charakter-Menü am Handy ---------- */
#chead #cmb { margin-left: 4px; }
#cmenu { display: none; position: fixed; inset: 0; z-index: 5; background: var(--bg); overflow: auto; padding: 14px 14px 40px; -webkit-user-select: none; user-select: none; }
#cmenu.show { display: block; }
.mhead { display: flex; gap: 14px; align-items: center; padding-top: 22px; }
.mhead > div:not(.avatar) { flex: 1; display: flex; flex-direction: column; }
.mhead b { font-size: 1.3rem; }
.tabs { display: flex; gap: 8px; margin: 14px 0 4px; }
.tabs .btn { flex: 1; }
#cmenu .tiles { gap: 8px; }
#cmenu .tile { width: calc(25% - 6px); }
.pref { display: grid; grid-template-columns: 1fr 42%  2em; gap: 8px; align-items: center; background: var(--panel); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; }
.pref span { display: flex; flex-direction: column; }
.pref b { font-size: 1.5rem; text-align: center; }
.pref input { width: 100%; accent-color: var(--pri); height: 30px; }
.ghostbox { font-size: 5rem; line-height: 180px; height: 180px; }

/* ---------- Anleitung, Emotes, Solo-Übertragung ---------- */
details.more { text-align: left; background: var(--panel); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
details.more summary { font-weight: 600; cursor: pointer; color: var(--gold); }
details.more p { margin: .6em 0 0; }
#cemo { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 4px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); }
#cemo button { flex: 1; font-size: 1.5rem; background: var(--panel2); border: 0; border-radius: 12px; padding: 6px 0; transition: transform .15s; }
#cemo button.hit { transform: scale(1.4) translateY(-8px); }
.emote { position: fixed; bottom: 70px; z-index: 80; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 12px 14px 6px 8px; font-size: 2.4rem; line-height: 1; pointer-events: none; animation: emo 2.6s ease-out forwards; }
@keyframes emo { 0% { transform: translateY(40px) scale(.5); opacity: 0; } 12% { transform: translateY(0) scale(1.15); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-38vh) scale(1); opacity: 0; } }
.streambox { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.streambox img { height: min(46vh, 420px); aspect-ratio: 320 / 460; border-radius: 16px; background: #000; border: 4px solid var(--gold); }
.streambox b { font-size: 1.5rem; color: var(--gold); }

/* Charakter-Menü auf breiten Bildschirmen in Handybreite halten */
#cmenu { padding-left: max(14px, calc(50% - 280px)); padding-right: max(14px, calc(50% - 280px)); }

/* Handy: nichts darf breiter sein als der Bildschirm */
body.ctl { overflow-x: hidden; }
#ctl, #cview { max-width: 100vw; overflow-x: hidden; }
#cmenu { overflow-x: hidden; scrollbar-width: none; }
#cmenu::-webkit-scrollbar { display: none; }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tabs .btn { min-width: 0; flex-direction: column; gap: 1px; padding: .5em .1em; font-size: .78rem; }
.tabs .btn span { font-size: 1.25rem; line-height: 1; }
#cmenu .btn, #cmenu .btn > span { min-width: 0; overflow-wrap: anywhere; }
#cmenu h3 small { display: block; margin-left: 0; }
.mhead { min-width: 0; }
.mhead .cur { flex-wrap: wrap; gap: 0 .8em; font-size: .9rem; }
.pref { grid-template-columns: minmax(0, 1fr) 40% 1.8em; }
.pgame { max-width: 100%; }

/* ---------- Pixel-Look: Figuren und Brett ---------- */
img.avatar { width: calc(var(--s) * .667); height: var(--s); border: 0; border-radius: 0; box-shadow: none; background: none; image-rendering: pixelated; object-fit: contain; display: inline-block; vertical-align: middle; }
.tile img.avatar { --s: 60px; }
#cmenu .tile { width: calc(25% - 6px); padding: 8px 2px 4px; }
#cmenu.inline { position: static; background: none; padding: 0; }
#cmenu.inline .tile { width: 84px; }
/* Das Brett ist jetzt eine flache Pixel-Szene – die Schräglage entfällt. */
#tilt { perspective: none; margin-top: 0; width: min(96%, calc((100vh - 190px) * 1000 / 720)); }
#board { transform: none; background: none !important; border-radius: 2.4cqw; overflow: hidden; box-shadow: 0 1.2cqw 0 rgba(0, 0, 0, .35), 0 2.5cqw 4cqw rgba(0, 0, 0, .45); }
#scene { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.float { animation: rise 1.4s forwards; }
/* Live-Bilder der Handy-Spiele am großen Bildschirm */
.streambox canvas { height: min(52vh, 460px); aspect-ratio: 320 / 460; border-radius: 16px; background: #000; border: 4px solid var(--gold); }
.screens { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.screen1 { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.screen1 canvas, .ghostplay { height: min(44vh, 380px); aspect-ratio: 320 / 460; border-radius: 14px; background: #000; border: 3px solid var(--panel2); }
.ghostplay { display: grid; place-items: center; font-size: 4rem; background: var(--panel2); }
.who img.avatar { --s: 96px; }
body.ctl .tabs .btn, #cmenu .tabs .btn { font-size: .8rem; padding: .5em .1em; white-space: nowrap; overflow-wrap: normal; }

/* ---------- Würfel: am Brett und am Handy dieselben ---------- */
.dicerow { display: flex; gap: calc(var(--d, 16vmin) * .22); justify-content: center; align-items: center; width: 100%; }
.die { --d: 16vmin; --die: #fff; --pip: #1b1b1b; width: var(--d); height: var(--d); flex: none; box-sizing: border-box; padding: calc(var(--d) * .13); border-radius: calc(var(--d) * .18); background: var(--die); color: var(--pip); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: stretch; font-size: calc(var(--d) * .58); box-shadow: inset 0 calc(var(--d) * -.07) 0 rgba(0, 0, 0, .25), 0 calc(var(--d) * .1) calc(var(--d) * .2) rgba(0, 0, 0, .5); transition: transform .08s; }
.die i { border-radius: 50%; margin: 13%; }
.die i.on { background: var(--pip); }
.die.num { grid-template: none; place-items: center; padding: 0; }
.die b { font-weight: 700; line-height: 1; }
.die.final, #dice.final .die { background: var(--die); outline: calc(var(--d) * .05) solid var(--gold); animation: pop .3s; }
#cview .die { --d: min(34vmin, 26vw); }
#cview .dicerow { margin: 22px 0 10px; }
.lv .die { --d: 54px; }
.dsum { font-weight: 700; color: var(--gold); }

/* ---------- Zentrale, Bestenlisten ---------- */
.mtools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 0; }
.bchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0 8px; }
.bchips .btn, body.ctl .bchips .btn { flex-direction: column; gap: 1px; padding: .45em .1em; font-size: .7rem; min-width: 0; white-space: nowrap; }
.bchips .btn span { font-size: 1.2rem; line-height: 1; }
.board { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 2.2em 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--panel); border-radius: 12px; padding: 6px 10px; }
.board li i { font-style: normal; font-weight: 700; text-align: center; }
.board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.board li b { color: var(--gold); white-space: nowrap; font-size: .9rem; }
.board li.me { outline: 2px solid var(--gold); background: var(--panel2); }
.board li.none, .board li.gap { display: block; text-align: center; color: var(--dim); background: none; padding: 2px; }
.modal .inp + .inp { margin-top: 10px; }
.modal a { color: var(--gold); }
.small.center { text-align: center; }
.scanbox { border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 1; display: grid; place-items: center; margin: 10px 0; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox p { padding: 16px; }

/* ---------- Lobby ---------- */
.lobby { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; margin: 14px 0; }
.joinbox { background: var(--panel); border-radius: 20px; padding: 18px; text-align: center; }
.joinbox .qrbox { display: inline-block; }
.lobby .grid.qr { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 0; }
@media (max-width: 760px) { .lobby { grid-template-columns: 1fr; } }

/* ---------- Teamspiele ---------- */
.teams { display: flex; justify-content: center; align-items: stretch; gap: 14px; margin: 14px 0 6px; flex-wrap: wrap; }
.teams > div { border: 3px solid var(--tc); border-radius: 16px; padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 150px; background: var(--panel2); }
.teams > div > b { color: var(--tc); font-size: 1.1rem; }
.teams span { display: flex; align-items: center; gap: 8px; }
.teams > i { align-self: center; font-style: normal; color: var(--dim); }

/* ================= Stand 29.11.: Vollbild-Brett, Chat, Online-Modus, nichts scrollt ================= */

/* ---------- Großer Bildschirm: links eine schmale Leiste, der Rest gehört dem Brett ---------- */
#game { height: 100vh; height: 100dvh; display: grid; grid-template: minmax(0, 1fr) auto / 236px minmax(0, 1fr); gap: 8px; padding: 8px; overflow: hidden; }
#game #side { grid-row: 1 / -1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; padding: 0; min-height: 0; }
#ghead { background: var(--panel); border-radius: 14px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
#ghead b { color: var(--gold); font-size: 1.15rem; width: 100%; }
#ghead .pill { font-size: .78rem; padding: .15em .7em; }
#plist { display: flex; flex-direction: column; gap: 6px; }
#plist .pcard { padding: 8px 8px 4px; gap: 8px; border-width: 2px; border-radius: 14px; }
#plist .pcard.on { transform: none; }
#plist .pcard > div { min-width: 0; font-size: .92rem; }
#plist .bag { font-size: .85rem; line-height: 1.1; max-height: 1.2em; overflow: hidden; }
#chat { flex: 1; min-height: 40px; background: var(--panel); border-radius: 14px; padding: 6px 8px; overflow: hidden; display: flex; }
#chatlog { flex: 1; overflow: hidden auto; scrollbar-width: none; font-size: .85rem; display: flex; flex-direction: column; gap: 3px; }
#chatlog::-webkit-scrollbar { display: none; }
#chatlog p { margin: 0; overflow-wrap: anywhere; }
#chatlog p.dim, td.dim { color: var(--dim); }
#chatlog img.avatar { vertical-align: -4px; margin-right: 4px; }
#chatlog b { color: var(--gold); margin-right: 3px; }
#gbtns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
#game main { grid-column: 2; grid-row: 1; position: relative; display: grid; place-items: center; min-height: 0; min-width: 0; overflow: hidden; }
#game footer { grid-column: 2; grid-row: 2; min-height: 46px; padding: 6px 14px; border-radius: 14px; flex-wrap: nowrap; }
#say { font-size: 1.05rem; min-width: 0; }
/* So groß wie möglich: begrenzt von der Breite oder von der Höhe (abzüglich Ansagezeile und Rand). */
#tilt { position: relative; width: min(100%, calc((100dvh - 78px) * 1000 / 720)); margin: 0; perspective: none; }
#board { border-radius: 14px; }
.evb { position: absolute; top: 2.5%; left: 50%; transform: translateX(-50%); z-index: 6; background: rgba(15, 10, 50, .85); border: 2px solid var(--gold); border-radius: 999px; padding: .3em 1.2em; display: flex; gap: .5em; align-items: center; font-size: 1.3rem; animation: pop .3s; white-space: nowrap; }
.evb b { color: var(--gold); }
#localviews { max-height: 96vh; scrollbar-width: none; }
@media (max-width: 900px) {
  #game { grid-template: minmax(0, 1fr) auto / 170px minmax(0, 1fr); height: 100dvh; min-height: 0; }
  #game #side { flex-direction: column; overflow: hidden; padding: 0; }
  #plist .pcard { min-width: 0; }
  #ghead b { display: block; }
}

/* ---------- Abschluss-Auswertung ---------- */
.modal.xwide { width: min(1080px, 96vw); max-width: none; }
.endtab { width: 100%; border-collapse: separate; border-spacing: 0 5px; font-size: .95rem; }
.endtab th { font-weight: 600; color: var(--dim); font-size: .78rem; padding: 0 6px; white-space: nowrap; }
.endtab tr.grp th { color: var(--gold); border-bottom: 1px solid var(--panel2); padding-bottom: 2px; }
.endtab td { background: var(--panel2); padding: 5px 8px; text-align: center; white-space: nowrap; }
.endtab td:first-child { border-radius: 12px 0 0 12px; font-size: 1.3rem; }
.endtab td:last-child { border-radius: 0 12px 12px 0; }
.endtab tr.first td { background: #4a3aa8; }
.endtab .who2 { text-align: left; display: flex; align-items: center; gap: 8px; }
.endtab .who2 span { display: flex; flex-direction: column; line-height: 1.15; }
.endtab .lvup { font-style: normal; font-size: .72rem; color: var(--gold); }

/* ---------- Spielvorbereitung auf einem Bildschirm ---------- */
.screen.setup { max-width: 1180px; height: 100dvh; padding: 14px 16px; display: flex; flex-direction: column; overflow: hidden; }
.setcols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; overflow: hidden auto; scrollbar-width: none; }
.setup h3 { margin: .7em 0 .35em; }
.setup .btn.chip { padding: .45em .9em; }
.setup p.small { margin: .3em 0 0; min-height: 2.4em; }
.grid.mini { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 8px 0; }
.grid.mini .pbig { padding: 14px 4px 8px; border-radius: 14px; font-size: .85rem; }
.grid.mini .pbig.add span { font-size: 1.6rem; }
@media (max-width: 820px) { .setcols { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Quiz-Tabelle ---------- */
.qboard { width: 100%; border-collapse: separate; border-spacing: 6px; margin: 10px 0; }
.qboard th { background: var(--panel2); border-radius: 10px; padding: 8px 4px; font-size: 1rem; }
.qboard td { border-radius: 10px; padding: 10px 4px; font-size: 1.3rem; font-weight: 700; }
.qboard td small { display: block; font-weight: 400; color: inherit; opacity: .85; }
.qboard .lv1, .btn.lv1 { background: #2f9e44; }
.qboard .lv2, .btn.lv2 { background: #e8590c; }
.qboard .lv3, .btn.lv3 { background: #c2255c; }
.vbtns.qpick { gap: 6px; }
.vbtns.qpick .btn, body.ctl .vbtns.qpick .btn { flex-direction: column; gap: 0; padding: .5em .2em; font-size: 1rem; min-width: 0; }
.vbtns.qpick .btn small { color: #fff; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.res.qlist li { grid-template-columns: auto minmax(60px, auto) 1fr 70px; padding: 6px 10px; }
.res.qlist li b { font-weight: 600; text-align: left; font-size: .95rem; }
.res.qlist li b small { display: block; color: var(--gold); }
.res.qlist li.out { opacity: .7; }

/* ---------- Handy: alles auf einem Bildschirm ---------- */
#ctl { height: 100dvh; min-height: 0; overflow: hidden; }
#chead { padding: 10px 12px 8px; flex: none; }
#cview { min-height: 0; overflow: hidden auto; scrollbar-width: none; padding: 12px 14px; }
#cview::-webkit-scrollbar { display: none; }
#cemo { position: static; flex: none; gap: 3px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
#cemo button { font-size: 1.3rem; padding: 5px 0; min-width: 0; }
#cemo #cchat { background: var(--pri); }
body.ctl h2 { font-size: 1.5rem; margin: 0 0 .3em; }
body.ctl .vbody p { margin: .3em 0; }
body.ctl .btn.huge { font-size: 1.6rem; padding: .8em; }
body.ctl .vbtns { gap: 8px; }
body.ctl .vbtns.col .btn small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .78rem; line-height: 1.2; }
.vbtns.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.vbtns.grid2 .btn, body.ctl .vbtns.grid2 .btn { justify-content: flex-start; text-align: left; gap: 6px; padding: .45em .5em; font-size: .9rem; min-width: 0; }
.vbtns.grid2 .btn > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.vbtns.grid2 .btn small { font-size: .68rem; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vbtns.grid2 .big { font-size: 1.4rem; }
details.more { max-height: 38vh; overflow: auto; scrollbar-width: none; }

/* Online-Modus: oben das ganze Brett (oder was am Computer gerade groß eingeblendet ist), darunter die Steuerung. */
#cboard { position: relative; flex: none; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 680 / 490; max-height: 40dvh; background: #0b0b2b; overflow: hidden; }
#cboard canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; }
#cbig { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0, #5f3dc4, #1b1444 70%); overflow: hidden; }
#cbig > div { width: 620px; transform-origin: 0 0; padding: 8px; text-align: center; }
#cbig .stage-head { margin-bottom: 6px; }
#cbig .stage-head span { font-size: 2rem; }
#cbig .popin { width: auto; box-shadow: none; animation: none; }
#csay { flex: none; background: var(--panel); padding: 4px 12px; font-size: .85rem; text-align: center; min-height: 1.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ctl.online #cview { justify-content: flex-start; padding: 8px 12px; }
#ctl.online h2 { font-size: 1.2rem; }
#ctl.online .btn { font-size: 1rem; padding: .55em .8em; }
#ctl.online .btn.huge { font-size: 1.25rem; padding: .6em; }
#ctl.online .vbody { font-size: .95rem; }
#ctl.online #cemo button { font-size: 1.1rem; padding: 3px 0; }
#ctl.online .die { --d: min(20vmin, 18vw); }
#ctl.online .dicerow { margin: 8px 0 4px; }
#ctl.online .joy { width: min(100%, 34vh); }

[hidden] { display: none !important; }
.screen.setup { box-sizing: border-box; }

#ctl.online.playing #cboard, #ctl.online.playing #csay { display: none; }
#ctl.online .vbtns .big { font-size: 1.3rem; }
#ctl.online .vbtns { gap: 6px; }
#ctl.online .btn.c0, #ctl.online .btn.c1, #ctl.online .btn.c2, #ctl.online .btn.c3 { padding: .4em .8em; }
.qboard { table-layout: fixed; }

/* ================= Freie Wege, Live-Aktionen, Geschichte, Ansagen am Handy ================= */
.btn.way0 { background: #1c7ed6; } .btn.way1 { background: #e8590c; } .btn.way2 { background: #2f9e44; } .btn.way3 { background: #d6336c; }
.btn[class*="way"] b { letter-spacing: 1px; }
.btn[class*="way"] small { color: #fff; opacity: .9; }
#gstory { background: linear-gradient(135deg, #4a3aa8, var(--panel)); border: 1px solid var(--gold); border-radius: 14px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
#gstory b { color: var(--gold); font-size: .88rem; line-height: 1.15; }
#gstory small { font-size: .76rem; line-height: 1.25; color: var(--ink); }
/* Die Ansagezeile steht jetzt immer am Handy, zwei Zeilen hoch. */
#csay { white-space: normal; min-height: 2.5em; max-height: 2.9em; line-height: 1.25; display: flex; align-items: center; justify-content: center; }
#cemo #cact { background: var(--pri2); }
.popmini { font-size: .92rem; text-align: center; }
.popmini h2 { font-size: 1.25rem; color: var(--gold); }
.popmini .lead { font-size: 1rem; }
.popmini .wheel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: .75rem; }
.popmini .wheel div { background: var(--panel2); border-radius: 8px; padding: 6px 2px; }
#csheet .modal { width: min(440px, 100%); max-height: 94dvh; padding: 16px 14px; }
#csheet .vbtns { margin: 10px 0; }
#ctl .pgame { max-height: calc(100dvh - 240px); }
