:root {
  --bg: #041a12;
  --navy: #0e1a33;
  --navy2: #15274a;
  --panel: #0b1320;
  --panel2: #1a2433;
  --line: #2c3a4a;
  --text: #f2efe8;
  --muted: #98a6b3;
  --gold: #e3b341;
  --gold2: #f7d77c;
  --red: #d23a4b;
  --green: #2fbf6a;
  --purple: #8b5cf6;
  --hdr: 64px;
  --gap: 12px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font: 15px/1.4 var(--font); min-height: 100%;
  background: radial-gradient(ellipse at 50% 35%, #0f4a35 0%, #082c20 50%, var(--bg) 100%) fixed; }
[hidden] { display: none !important; }
button { font: inherit; }
input, textarea { font: inherit; color: var(--text); background: #08101c; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; font-weight: 600; }
label input, label textarea { margin-top: 3px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.goldTxt { color: var(--gold2); font-weight: 800; }
code { background: #08101c; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- Buttons & Panels ---------- */
.btn { background: var(--panel2); color: var(--text); border: 1.5px solid #3a4658; border-radius: 11px; padding: 10px 16px; cursor: pointer; font-weight: 800;
  transition: transform .08s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a00; border-color: #b88a1a; }
.btn.red { background: #5a1f26; border-color: #8a2d36; }
.btn.green { background: #1b5631; border-color: #2e8a4c; }
.btn.tiny { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.icon { padding: 6px 9px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.off { opacity: .55; text-decoration: line-through; background: #3a1f22; }
.btn.open { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 179, 65, .3); }
.btn.pulse { animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(227, 179, 65, .18); } }
.btnRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }

.panel { background: rgba(11, 19, 32, .94); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.panel h2, .panel h3 { margin: 0 0 8px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 900; }

.brand { font-weight: 900; font-size: 20px; letter-spacing: .02em; white-space: nowrap; }
.brand span:not(.suit) { color: var(--gold); }
.brand .suit { color: var(--gold); }
.brand.big { font-size: clamp(40px, 8vw, 64px); text-align: center; }

/* ---------- Startseite ---------- */
.landing { max-width: 880px; margin: 0 auto; padding: 8vh 18px 40px; }
.tagline { text-align: center; color: var(--muted); font-size: 17px; max-width: 560px; margin: 8px auto 30px; }
.landingCards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.landingCards .panel { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.landingCards h2 { font-size: 19px; }
.landingCards .btn { white-space: normal; }

/* ---------- Kopfzeile ---------- */
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 14px;
  background: rgba(3, 16, 11, .9); border-bottom: 1px solid rgba(227, 179, 65, .25); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(6px); }
.tbLeft { display: flex; align-items: center; gap: 14px; min-width: 0; }
.roomInfo { display: flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; font-weight: 700; }
.roomInfo b { color: var(--gold); letter-spacing: .14em; font-size: 17px; }
.tbRight { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.stats { display: flex; background: linear-gradient(180deg, #13223f, var(--navy)); border: 1.5px solid rgba(227, 179, 65, .55); border-radius: 999px; padding: 4px 8px; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 0 16px; min-width: 74px; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .1); }
.stat span { font-size: 9.5px; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; font-weight: 900; }
.stat b { font-size: 19px; font-weight: 900; font-style: italic; color: #fff; line-height: 1.15; white-space: nowrap; }

/* ---------- Bühne ---------- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, max-content) minmax(150px, 1fr);
  grid-template-areas: "left center right" "left bottom right";
  gap: var(--gap); padding: var(--gap); height: calc(100dvh - var(--hdr)); }
#colLeft { grid-area: left; }
#colRight { grid-area: right; }
.centerCol { grid-area: center; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.bottomRow { grid-area: bottom; display: flex; justify-content: center; align-items: stretch; gap: var(--gap); min-height: 0; }
.col { display: flex; flex-direction: column; justify-content: center; gap: var(--gap); min-height: 0; }
.col .tile { width: 100%; aspect-ratio: 4 / 3; max-height: calc((100% - 2 * var(--gap)) / 3); flex: 0 1 auto; }
.bottomRow .tile { height: 100%; aspect-ratio: 4 / 3; flex: 0 1 auto; max-width: 100%; }

/* ---------- Kacheln ---------- */
.tile { position: relative; border-radius: 18px; overflow: hidden; background: #0d1626; border: 3px solid rgba(227, 179, 65, .55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45); container-type: inline-size; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; transition: filter .4s; }
.tile.hasCam video { display: block; }
.tile.hasCam .avatar { display: none; }
video.mirror { transform: scaleX(-1); }
.avatar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: clamp(22px, 16cqw, 70px);
  color: #c8d3de; background: radial-gradient(circle at 50% 38%, #263a5c, #0d1626 72%); transition: filter .4s; }
.tTop { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; z-index: 2; }
.tTopL { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; flex: 0 1 auto; }
.tBot { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "stk name io"; align-items: center; gap: 6px; z-index: 2; }
.tBot .stk { grid-area: stk; }
.tBot .name { grid-area: name; justify-self: center; }
.tBot .inout { grid-area: io; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(9, 16, 30, .88);
  border: 1.5px solid rgba(255, 255, 255, .2); color: #fff; font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-width: 0; max-width: 100%; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pill:empty { display: none; }
.name { background: var(--navy); border-color: rgba(255, 255, 255, .45); font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; height: 30px; padding: 0 12px; }
.nmTxt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.marks { display: inline-flex; gap: 3px; flex: none; }
.marks:empty { display: none; }
.mk { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; font-size: 9.5px; font-weight: 900; padding: 0 5px; letter-spacing: 0; }
.mk.d { background: #fff; color: #111; }
.mk.sb { background: #3b82f6; color: #fff; }
.mk.bb { background: #f97316; color: #fff; }
.mk.host, .mk.dl { background: transparent; font-size: 13px; padding: 0; min-width: 16px; }
.chip { display: inline-block; width: 13px; height: 13px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #fff 0 24%, var(--gold) 25% 58%, #fff 59% 68%, var(--gold) 69%); }
.stk { color: #fff; }
.inout.inp { border-color: var(--green); color: #9ff3c0; }
.inout.outp { border-color: rgba(255, 255, 255, .25); color: #b9c2cc; }
.inout.allinp { border-color: var(--red); color: #ffc0c6; }
.inout.dl { border-color: var(--purple); color: #ddd0ff; }
.ans { border-color: var(--gold); color: var(--gold2); font-size: 14.5px; font-weight: 900; max-width: 62%; flex: 0 1 auto; height: 30px; }
.ans.private { color: #d5dce4; border-color: rgba(255, 255, 255, .35); font-size: 13px; }
.ans.best { background: var(--gold); color: #241a00; }
.ans em { font-style: normal; font-weight: 700; color: #9fb3c8; font-size: 11px; }
.ans.best em { color: #5a4200; }
.status.turnp { background: var(--gold); color: #241a00; border-color: #fff6; }
.status.fold { background: #5a1f26; border-color: #a33a47; }
.status.ok { border-color: var(--green); color: #9ff3c0; }
.status.betp { border-color: var(--gold); color: var(--gold2); }
.win { background: var(--gold); color: #241a00; border-color: #fff8; }
.mic { padding: 0 6px; }
.status .cd { color: inherit; }

.tile.me { border-color: #6aa8ff; }
.tile.turn { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(247, 215, 124, .35), 0 0 30px rgba(247, 215, 124, .55); }
.tile.allin { border-color: var(--red); }
.tile.folded video, .tile.folded .avatar { filter: grayscale(1) brightness(.72) contrast(.95); }
.tile.folded { border-color: rgba(255, 255, 255, .25); }
.tile.out video, .tile.out .avatar, .tile.offline video, .tile.offline .avatar { filter: grayscale(1) brightness(.5); }
.tile.winner { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(247, 215, 124, .6), 0 0 36px rgba(247, 215, 124, .7); }
.tile.dealer { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(139, 92, 246, .25), 0 10px 28px rgba(0, 0, 0, .45); }
.tile.dealer .name { background: var(--purple); border-color: #c4b5fd; }
.tile.bot .avatar { font-size: clamp(30px, 22cqw, 90px); }

/* schmale Kacheln: Name oben, Stack und IN/OUT darunter – nichts überlappt */
@container (max-width: 270px) {
  .tBot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "name name" "stk io"; gap: 4px; left: 6px; right: 6px; bottom: 6px; }
  .tBot .stk { justify-self: start; }
  .tBot .inout { justify-self: end; }
  .tTop { top: 6px; left: 6px; right: 6px; }
  .pill { height: 22px; font-size: 11px; padding: 0 7px; }
  .name { height: 24px; font-size: 11.5px; }
  .ans { height: 24px; font-size: 12px; }
  .mk { min-width: 17px; height: 17px; font-size: 8.5px; }
}

/* ---------- Brett ---------- */
#board { display: flex; flex-direction: column; gap: 10px; container-type: inline-size; }
.qCard { position: relative; background: linear-gradient(180deg, #13223f, #0a1428); border: 2px solid rgba(227, 179, 65, .65); border-radius: 22px;
  padding: 16px 64px 18px; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.qMeta { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 900; margin-bottom: 6px; }
.qText { font-size: clamp(17px, 1.9vw, 31px); font-weight: 900; line-height: 1.2; color: #fff; }
.qSuit { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 40px; color: rgba(255, 255, 255, .13); pointer-events: none; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--gold2); font-weight: 900; letter-spacing: .18em; text-transform: uppercase; font-size: 13.5px; white-space: nowrap; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, rgba(227, 179, 65, .7)); }
.divider::after { background: linear-gradient(270deg, transparent, rgba(227, 179, 65, .7)); }
.hRow { display: grid; grid-template-columns: auto minmax(0, 1fr) 30px; align-items: center; gap: 14px; padding: 9px 14px; min-height: 58px; border-radius: 16px;
  border: 2px solid rgba(255, 110, 130, .4); background-color: #5b1023;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .045) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .045) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .045) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .045) 75%);
  background-size: 22px 22px; background-position: 0 0, 11px 11px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); perspective: 600px; }
.hLabel { display: inline-flex; align-items: center; gap: 6px; background: #1a0910; border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 6px 14px;
  font-weight: 900; letter-spacing: .1em; text-transform: uppercase; font-size: 12.5px; color: #ffd3da; white-space: nowrap; }
.hText { text-align: center; font-weight: 800; font-size: clamp(13px, 1.15vw, 18px); color: #fff; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.hRow:not(.up) .hText { color: rgba(255, 255, 255, .3); letter-spacing: .4em; }
.hSuit { font-size: 26px; color: #ff4d6a; text-align: center; line-height: 1; }
.hRow.ansRow { background-color: #16120a; border-color: var(--gold);
  background-image: linear-gradient(45deg, rgba(227, 179, 65, .06) 25%, transparent 25%, transparent 75%, rgba(227, 179, 65, .06) 75%),
    linear-gradient(45deg, rgba(227, 179, 65, .06) 25%, transparent 25%, transparent 75%, rgba(227, 179, 65, .06) 75%); }
.hRow.ansRow .hLabel { color: #fff; background: #0f0b04; border-color: var(--gold); }
.hRow.ansRow .hText { font-size: clamp(20px, 2.3vw, 38px); font-style: italic; font-weight: 900; color: #fff6d6; }
.hRow.ansRow:not(.up) .hText { font-size: 18px; font-style: normal; }
.hRow.ansRow .hSuit { color: var(--gold); }
.hRow.up.flip .hText { animation: flipIn .75s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0; } to { transform: none; opacity: 1; } }

.lastAction { align-self: center; width: min(100%, 600px); background: rgba(6, 18, 14, .8); border: 1.5px solid rgba(255, 255, 255, .13); border-radius: 16px; padding: 8px 14px 10px; }
.laHead { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 900; }
.laTag { border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 10px; font-size: 10px; color: #d5dce4; letter-spacing: .06em; white-space: nowrap; }
.laTag:empty { display: none; }
.laStatus { font-weight: 700; font-size: 14px; margin-top: 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.laStatus:empty { display: none; }
.laStatus b { color: var(--gold2); }
.laStatus .won { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; background: var(--navy); border: 1.5px solid rgba(227, 179, 65, .55);
  border-radius: 999px; padding: 4px 6px 4px 14px; text-transform: uppercase; font-weight: 900; font-size: 13px; }
.laStatus .won b { color: #fff; }
.coin { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 30px; padding: 0 10px; border-radius: 999px;
  background: radial-gradient(#e0b23d, #9a6d12); border: 2px dashed #ffe7a3; color: #2a1b00; font-weight: 900; }
.laMsg { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@container (max-width: 560px) {
  .hLabel .lf { display: none; }
  .hRow { gap: 8px; padding: 8px 10px; grid-template-columns: auto minmax(0, 1fr) 20px; min-height: 50px; }
  .hLabel { padding: 5px 10px; font-size: 11.5px; }
  .hSuit { font-size: 18px; }
  .qCard { padding: 12px 38px 14px; }
  .qSuit { font-size: 28px; right: 10px; }
}

/* ---------- Aktionsleiste ---------- */
#actionBar { background: rgba(9, 16, 30, .9); border: 1.5px solid rgba(227, 179, 65, .4); border-radius: 16px; padding: 12px 14px; }
#actionBar:empty { display: none; }
.barInfo, .turnHead { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.barInfo .btn { margin-left: auto; }
.turnHead { font-weight: 900; color: var(--gold2); margin-bottom: 10px; font-size: 16px; }
.turnHead .myAns, .turnHead .muted { font-weight: 600; font-size: 14px; color: var(--text); }
.myAns b { color: var(--gold2); }
.warn { color: #ff9b9b; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.acts .btn { flex: 1 1 90px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-height: 52px; justify-content: center; }
.acts .btn small { font-weight: 700; opacity: .85; font-size: 12px; margin-top: 2px; }
.custom { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.custom input[type=range] { flex: 1; padding: 0; accent-color: var(--gold); background: none; border: 0; min-width: 0; }
.custom input[type=number] { width: 110px; flex: none; }
.custom .btn { flex: none; }
.answerRow { display: flex; gap: 8px; margin-bottom: 6px; }
.answerRow input { font-size: 17px; }

/* ---------- Spielleiter-Leiste ---------- */
#gmBar { display: flex; flex-direction: column; gap: 10px; }
#gmBar .panel { background: rgba(9, 16, 30, .9); border-color: rgba(139, 92, 246, .55); }
#gmBar #gmAnswers { display: none; }
#gmBar #gmSecret .gmQ { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
#gmBar #gmSecret .gmQ div:first-child { grid-column: 1 / -1; }
.gmStatus { font-size: 14px; }
.gmNextQ { margin-top: 8px; padding: 8px 10px; border: 1px dashed rgba(227, 179, 65, .45); border-radius: 10px; font-size: 14px; }
.gmQ div { font-size: 13px; color: var(--muted); padding: 2px 0; }
.gmQ div:first-child { color: var(--text); margin-bottom: 2px; }
.gmQ .rev { color: var(--gold2); }
.ansTable, .sdTable { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.ansTable td, .sdTable td, .sdTable th { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.sdTable th { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.ansTable tr.fold { opacity: .45; text-decoration: line-through; }
.sdTable input { width: 62px; padding: 5px 6px; }
#gmShowdown:not(:empty) { margin-top: 10px; }

/* ---------- Menü (Dropdown) ---------- */
.menu { position: fixed; top: calc(var(--hdr) + 6px); right: 8px; width: min(440px, calc(100vw - 16px)); max-height: calc(100dvh - var(--hdr) - 14px);
  overflow: auto; z-index: 60; background: #08101c; border: 1.5px solid var(--gold); border-radius: 16px; padding: 0 10px 10px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .65); animation: dropIn .16s ease-out; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } }
.menuHead { display: flex; justify-content: space-between; align-items: center; font-weight: 900; color: var(--gold); text-transform: uppercase; letter-spacing: .1em;
  font-size: 13px; position: sticky; top: 0; background: #08101c; padding: 12px 4px 6px; z-index: 1; }
#gmPanel, #playerPanel, #hostPanel { display: flex; flex-direction: column; gap: 10px; }
.bankNav { display: flex; align-items: center; gap: 8px; }
.bankNav span { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.pRow { display: grid; grid-template-columns: minmax(0, 1fr) 74px auto auto auto auto; gap: 5px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pRow input { padding: 5px 6px; }
.pRow.offline .pName { color: var(--muted); }
.pName { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#resetStacks, #hReset { margin-top: 10px; }
.bankList { margin: 10px 0 0; padding-left: 22px; max-height: 260px; overflow: auto; font-size: 13px; }
.bankList li { padding: 3px 0; }
.bankList .bq { cursor: pointer; }
.bankList .bq em { color: var(--gold2); font-style: normal; }
.bankList li.used { opacity: .45; }
.bankList li.cur .bq { color: var(--gold2); font-weight: 800; }
.bankList .x { background: none; border: 0; color: var(--muted); cursor: pointer; margin-left: 4px; }
details summary { cursor: pointer; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
details textarea { margin: 6px 0; }
.packs .btn { font-size: 12.5px; }
label.chk { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; margin: 6px 0 2px; font-weight: 600; }
label.chk input { width: auto; margin: 0; accent-color: var(--gold); }
.packList .chk { margin: 4px 0; }
.rules ol { margin: 0; padding-left: 20px; font-size: 13.5px; }
.rules li { margin: 3px 0; }
.logBox #log { max-height: 260px; overflow: auto; font-size: 13px; }
#log div { padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .05); }
#log time { color: var(--muted); font-size: 11px; margin-right: 4px; }

/* ---------- Countdown & Toast ---------- */
.cd { font-weight: 900; color: var(--gold2); white-space: nowrap; }
.cd.urgent { color: #ff7b7b; animation: blink .5s infinite alternate; }
@keyframes blink { to { opacity: .45; } }
.status.turnp .cd { color: #241a00; }
#toast { position: fixed; left: 50%; top: calc(var(--hdr) + 10px); transform: translate(-50%, -16px); background: #1b2533; border: 1px solid var(--gold); color: #fff;
  padding: 10px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 92vw; text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); font-weight: 600; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Taschenrechner (Dropdown) ---------- */
.calc { position: fixed; top: calc(var(--hdr) + 6px); right: 8px; z-index: 61; width: min(272px, calc(100vw - 16px)); background: #0c121b; border: 1.5px solid var(--gold);
  border-radius: 16px; padding: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); animation: dropIn .16s ease-out; }
.calcHead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin: 0 2px 6px; font-weight: 900; }
.calcX { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 2px 6px; }
.calcDisplay { background: #06090e; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: right; margin-bottom: 8px; min-height: 62px; }
.calcExpr { color: var(--muted); font-size: 13px; min-height: 18px; word-break: break-all; }
.calcRes { font-size: 26px; font-weight: 900; color: #fff; word-break: break-all; line-height: 1.2; }
.calcRes.err { color: #ff8a8a; font-size: 16px; }
.calcQuick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.calcQuick button { background: #2a2210; color: var(--gold2); border: 1px solid #5a4614; border-radius: 8px; padding: 6px 0; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.calcQuick button:disabled { opacity: .35; cursor: not-allowed; }
.calcKeys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calcKeys button { background: var(--panel2); color: var(--text); border: 1px solid #333c48; border-radius: 10px; height: 44px; font-size: 18px; font-weight: 800; cursor: pointer; }
.calcKeys button:active { transform: translateY(1px); }
.calcKeys .op { color: var(--gold2); }
.calcKeys .fn { color: #9fb3c8; font-size: 16px; }
.calcKeys .eq { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a00; border-color: #b88a1a; }
.calcUse { width: 100%; margin-top: 8px; background: #1b5631; border: 1px solid #2e8a4c; color: #fff; border-radius: 10px; padding: 9px; font-weight: 800; cursor: pointer; }

/* ---------- Bot-Dealer mit Bild ---------- */
.tile.bot .avatar { background: #0d1626 url(dealer.jpg) center 30% / cover no-repeat; font-size: 0; }

/* ---------- Handy ---------- */
.phone { --pw: 300px; position: fixed; z-index: 55; width: var(--pw); left: 0; top: 0; touch-action: none; user-select: none;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6)); }
.phoneBar { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px; margin: 0 14px 6px; border-radius: 12px;
  background: rgba(8, 12, 20, .92); border: 1px solid rgba(255, 255, 255, .15); cursor: grab; }
.phoneBar:active { cursor: grabbing; }
.phoneBar .grip { color: var(--muted); font-size: 16px; padding: 0 4px; }
.phoneBar button { background: #1c2533; color: #fff; border: 1px solid #333f50; border-radius: 8px; height: 24px; padding: 0 8px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.phoneBar button[data-ph=fyp] { margin-left: auto; background: #fe2c55; border-color: #fe2c55; }
.phoneBar button:hover { border-color: var(--gold); }
.phoneBody { position: relative; width: 100%; aspect-ratio: 9 / 19.5; border-radius: calc(var(--pw) * .16); padding: calc(var(--pw) * .035);
  background: linear-gradient(145deg, #3a3f47, #16181c 45%, #2c3037); box-shadow: inset 0 0 0 2px #5c6370, inset 0 0 0 4px #111; cursor: grab; }
.side { position: absolute; width: 4px; border-radius: 2px; background: #4a505a; }
.side.s1 { left: -3px; top: 17%; height: 4%; }
.side.s2 { left: -3px; top: 24%; height: 8%; }
.side.s3 { left: -3px; top: 34%; height: 8%; }
.side.s4 { right: -3px; top: 27%; height: 12%; }
.screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw) * .13); overflow: hidden; background: #000;
  display: flex; flex-direction: column; cursor: default; }
.sbar { flex: none; height: calc(var(--pw) * .12); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 calc(var(--pw) * .07);
  color: #fff; font-weight: 800; font-size: calc(var(--pw) * .045); }
.sbar .sIcons { justify-self: end; font-size: calc(var(--pw) * .035); letter-spacing: -1px; }
.island { width: calc(var(--pw) * .3); height: calc(var(--pw) * .085); border-radius: 999px; background: #000; box-shadow: 0 0 0 1px #1a1a1a; }
.feed { flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; background: #000; }
.slide { overflow: hidden; }
.slide iframe { width: var(--ttW, 100%); height: var(--ttH, 100%); border: 0; display: block; transform: scale(var(--ttS, 1)); transform-origin: 0 0; position: relative; z-index: 1; }
.ttOpen { position: absolute; z-index: 2; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 13px; font-weight: 800; }
.slide .loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #666; font-size: 13px; }
.slide.info { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; color: #ddd; font-size: 13.5px;
  background: radial-gradient(circle at 50% 30%, #2a0f1a, #000 70%); }
.slide.info .big { font-size: 40px; }
.slide.info button { background: #fe2c55; color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; cursor: pointer; width: 100%; }
.slide.info button.alt { background: #222; border: 1px solid #444; }
.tabbar { flex: none; height: calc(var(--pw) * .16); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: #000; border-top: 1px solid #1d1d1d; padding: 0 8px 4px; }
.tabbar button { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.1; }
.tabbar button b { font-size: calc(var(--pw) * .06); }
.tabbar small { font-size: calc(var(--pw) * .032); color: #bbb; }
.tabbar .plus { width: calc(var(--pw) * .15); height: calc(var(--pw) * .095); border-radius: 9px; background: #fff; color: #000; font-weight: 900; font-size: calc(var(--pw) * .06);
  box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55; justify-content: center; }
.addSheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; overflow: auto; background: #121212; color: #eee; border-radius: 16px 16px 0 0;
  padding: 12px; font-size: 12.5px; z-index: 2; border-top: 1px solid #333; }
.sheetHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheetHead button { background: none; border: 0; color: #aaa; font-size: 15px; cursor: pointer; }
.addSheet p { margin: 4px 0 8px; color: #aaa; }
.addSheet textarea { background: #000; border-color: #333; font-size: 12px; }
.sheetBtn { width: 100%; margin-top: 6px; background: #fe2c55; color: #fff; border: 0; border-radius: 9px; padding: 9px; font-weight: 800; cursor: pointer; }
.hintTxt { font-size: 11px; }
.ttCats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.ttCat { background: #1c1c1c; color: #999; border: 1px solid #333; border-radius: 999px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.ttCat small { opacity: .7; }
.ttCat.on { background: #fe2c55; color: #fff; border-color: #fe2c55; }
.ttCountTxt { color: #fe2c55; font-weight: 700; }
.sheetBtn.alt { background: #222; border: 1px solid #444; }
.ttList { display: flex; flex-direction: column; gap: 4px; }
.ttList div { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: #1c1c1c; border-radius: 7px; padding: 5px 8px; font-size: 11.5px; }
.ttList span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ttList button { background: none; border: 0; color: #ff6b81; cursor: pointer; flex: none; }
.resize { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; cursor: nwse-resize; border-radius: 0 0 14px 0;
  background: linear-gradient(135deg, transparent 50%, var(--gold) 50%); opacity: .85; }
.phone.busy iframe { pointer-events: none; }

/* ---------- Kleinere Bildschirme ---------- */
@media (min-width: 901px) and (max-height: 820px) {
  #board { gap: 7px; }
  .qCard { padding: 10px 56px 12px; border-radius: 18px; }
  .qMeta { margin-bottom: 3px; font-size: 10px; }
  .qText { font-size: clamp(16px, 1.6vw, 24px); }
  .divider { font-size: 12px; }
  .hRow { min-height: 46px; padding: 6px 12px; border-radius: 13px; }
  .hLabel { padding: 4px 11px; font-size: 11.5px; }
  .hRow.ansRow .hText { font-size: clamp(18px, 1.9vw, 30px); }
  .lastAction { padding: 6px 12px 8px; }
  .laStatus { margin-top: 3px; font-size: 13px; }
  #actionBar { padding: 9px 12px; }
  .acts .btn { min-height: 44px; padding: 6px 8px; }
  .turnHead { margin-bottom: 6px; font-size: 15px; }
  .stage { grid-template-rows: minmax(0, max-content) minmax(120px, 1fr); }
}
@media (max-width: 1250px) {
  .stat { padding: 0 10px; min-width: 60px; }
  .stat b { font-size: 16px; }
  .brand { display: none; }
}
@media (max-width: 900px) {
  :root { --gap: 8px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l r" "s s"; padding: 6px 8px; row-gap: 6px; }
  .tbLeft { grid-area: l; }
  .tbRight { grid-area: r; gap: 4px; }
  .stats { grid-area: s; justify-content: space-around; padding: 3px 4px; }
  .stat { min-width: 0; padding: 0 6px; flex: 1; }
  .stat span { font-size: 8.5px; letter-spacing: .1em; }
  .roomInfo .lbl { display: none; }
  .stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; height: auto; }
  #colLeft, #colRight, .centerCol, .bottomRow { grid-area: auto; }
  .centerCol { grid-column: 1 / -1; order: -1; overflow: visible; }
  .col, .bottomRow { display: contents; }
  .tile, .col .tile, .bottomRow .tile { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: none; }
  .qText { font-size: clamp(16px, 4.6vw, 22px); }
  .hText { font-size: 13.5px; }
  .acts .btn { flex: 1 1 30%; padding: 8px 6px; font-size: 14px; }
  .custom input[type=number] { width: 86px; }
  .menu, .calc { right: 6px; }
  .calcKeys button { height: 40px; font-size: 16px; }
}
@media (max-width: 420px) {
  .btn.tiny { padding: 5px 8px; font-size: 12px; }
  .roomInfo b { font-size: 15px; letter-spacing: .08em; }
}

/* ---------- Auswahl Quiz-Poker / Poker ---------- */
.choiceGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 22px; border-radius: 18px; cursor: pointer; text-decoration: none;
  color: var(--text); font: inherit; background: linear-gradient(180deg, rgba(21, 39, 74, .95), rgba(11, 19, 32, .95)); border: 2px solid rgba(227, 179, 65, .45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45); transition: transform .15s, border-color .15s, box-shadow .15s; }
.choice:hover { transform: translateY(-4px); border-color: var(--gold2); box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 30px rgba(247, 215, 124, .25); }
.choice .ico { font-size: 54px; line-height: 1; }
.choice b { font-size: 24px; font-weight: 900; font-style: italic; color: var(--gold2); }
.choice small { color: var(--muted); font-size: 14px; max-width: 300px; }
.joinAny h2 { font-size: 16px; }
.backLink { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-weight: 700; }
.backLink:hover { color: var(--gold2); }

/* ===== Ewige Bestenliste (live) ===== */
.lbPanel { width: 100%; max-width: 844px; margin: 16px auto 0; box-sizing: border-box; }
.lbPanel h2 { display: flex; align-items: center; gap: 10px; }
.lbLive { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ff6b6b; animation: lbBlink 1.6s infinite; }
@keyframes lbBlink { 50% { opacity: .35; } }
.lbWrap { overflow-x: auto; }
.lbTable { width: 100%; border-collapse: collapse; font-size: 14px; }
.lbTable th { text-align: right; font-size: 11px; color: rgba(255, 255, 255, .55); text-transform: uppercase; letter-spacing: .05em; padding: 6px; border-bottom: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; }
.lbTable td { text-align: right; padding: 7px 6px; border-bottom: 1px solid rgba(255, 255, 255, .07); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lbTable td:first-child, .lbTable th:first-child { width: 30px; text-align: center; }
.lbTable .lbName { text-align: left; }
.lbTable tr.lbMe td { background: rgba(247, 215, 124, .09); }
.lbPos { color: #7CFF8A; font-weight: 800; }
.lbNeg { color: #ff8b8b; font-weight: 800; }
.lbMuted { color: rgba(255, 255, 255, .55); }
.lbSmall { font-size: 12px; }
.lbDot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff5d5d; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px #ff5d5d; animation: lbBlink 1.6s infinite; }
.lbH { color: #f7d77c; margin: 14px 0 6px; font-size: 15px; }
.lbRecent { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.boardFab { position: absolute; left: 10px; top: 10px; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px;
  background: rgba(8, 16, 28, .78); border: 1px solid rgba(247, 215, 124, .55); color: #f7d77c; font-family: inherit; font-weight: 800; font-size: 13px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px); }
.boardFab:hover { background: rgba(20, 32, 52, .9); }
@media (max-width: 700px) { .boardFab span { display: none; } .boardFab { padding: 6px 8px; font-size: 15px; } .lbTable { font-size: 13px; } }
