:root {
  --grout: #0d5a12;
  --panel: rgba(9, 58, 14, .78);
  --panel-line: rgba(255, 232, 0, .25);
  --ink: #fffbea;
  --ink-dim: #cfe8c4;
  --yellow: #ffe600;
  --red: #e3241b;
  --red-dark: #9e120c;
  --radius: 11px;
  --cw: 64px;
  --ch: 92px;
  --cw-s: 40px;
  --ch-s: 58px;
  --font-fun: "Titan One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;

  /* Kartenfarben 0–13 */
  --c0: #12a5c9; --c1: #27a844; --c2: #86c232; --c3: #f2c40c; --c4: #f79a12; --c5: #f06a1d;
  --c6: #e3241b; --c7: #e5196b; --c8: #c0157f; --c9: #8a3fb8; --c10: #5a3bb5; --c11: #1f6fd8;
  --c12: #0f4fa8; --c13: #1d1d1f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: #2f9e2f;
  background-image: url("mosaic.svg");
  background-size: 512px auto;
  color: var(--ink);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 1320px; margin: 0 auto; padding: 12px 16px 120px; }
h1, h2, h3 { font-family: var(--font-fun); font-weight: 400; margin: 0 0 .5em; letter-spacing: .02em; }
a { color: var(--yellow); }
[hidden] { display: none !important; }

/* ---------- Logo (rote Buchstaben, dicke gelbe Kontur) ---------- */
.logo {
  font-family: var(--font-fun); font-weight: 400; line-height: .86; margin: 0;
  display: inline-grid; grid-template-columns: auto; text-align: center;
  font-size: clamp(64px, 18vw, 124px); letter-spacing: .02em; color: var(--red);
  text-shadow:
    0 0 0 var(--yellow),
    3px 0 0 var(--yellow), -3px 0 0 var(--yellow), 0 3px 0 var(--yellow), 0 -3px 0 var(--yellow),
    5px 5px 0 var(--yellow), -5px -5px 0 var(--yellow), 5px -5px 0 var(--yellow), -5px 5px 0 var(--yellow),
    7px 0 0 var(--yellow), -7px 0 0 var(--yellow), 0 7px 0 var(--yellow), 0 -7px 0 var(--yellow),
    6px 3px 0 var(--yellow), -6px 3px 0 var(--yellow), 6px -3px 0 var(--yellow), -6px -3px 0 var(--yellow),
    3px 6px 0 var(--yellow), -3px 6px 0 var(--yellow), 3px -6px 0 var(--yellow), -3px -6px 0 var(--yellow),
    9px 10px 0 rgba(0, 0, 0, .35);
}
.logo span { display: block; }
.logo.small { font-size: 56px; }
.logo.tiny {
  font-size: 22px; display: inline-block; line-height: 1;
  text-shadow: 2px 0 0 var(--yellow), -2px 0 0 var(--yellow), 0 2px 0 var(--yellow), 0 -2px 0 var(--yellow),
    2px 2px 0 var(--yellow), -2px -2px 0 var(--yellow), 2px -2px 0 var(--yellow), -2px 2px 0 var(--yellow);
}
.logo.tiny span { display: inline; }

/* ---------- Buttons & Inputs ---------- */
.btn {
  appearance: none; border: 2px solid rgba(255,255,255,.35); border-radius: 999px;
  background: rgba(0,0,0,.25); color: var(--ink);
  padding: 9px 18px; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .08s, background .15s, filter .15s;
}
.btn:hover:not(:disabled) { background: rgba(0,0,0,.4); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary, .btn.danger {
  font-family: var(--font-fun); font-weight: 400; letter-spacing: .03em;
  background: var(--red); color: #fff; border: 3px solid var(--yellow);
  box-shadow: 0 3px 0 var(--red-dark);
}
.btn.primary:hover:not(:disabled), .btn.danger:hover:not(:disabled) { background: #f0332a; }
.btn.snap {
  font-family: var(--font-fun); font-weight: 400; background: var(--yellow); color: #3b2a00;
  border-color: #fff6a8; box-shadow: 0 3px 0 #b8a200;
  animation: pulse 1.4s ease-in-out infinite;
}
.btn.snap:hover:not(:disabled) { background: #fff04d; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.link { border: 0; background: none; text-decoration: underline; padding: 4px 6px; }
input[type=text] {
  font: inherit; color: var(--ink); background: rgba(0,0,0,.3);
  border: 2px solid rgba(255,255,255,.3); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input[type=text]:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
label { display: block; font-size: 14px; color: var(--ink-dim); margin-bottom: 4px; }

/* ---------- Home & Lobby ---------- */
.hero { text-align: center; margin: 5vh 0 26px; }
.tagline {
  display: inline-block; margin: 18px 0 0; padding: 4px 14px; border-radius: 999px;
  background: var(--yellow); color: #3b2a00; font-weight: 700; box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.box {
  background: var(--panel); border: 2px solid var(--panel-line); border-radius: 18px; padding: 20px;
  max-width: 420px; margin: 0 auto 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.divider { text-align: center; color: var(--ink-dim); font-size: 14px; margin: 16px 0; }
.code { font-family: var(--font-fun); font-size: 44px; letter-spacing: .2em; color: var(--yellow); text-align: center; margin: 2px 0 8px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.plist li .name { flex: 1; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.15); color: var(--ink-dim); white-space: nowrap; }
.tag.gold { background: var(--yellow); color: #3b2a00; font-weight: 700; }
.tag.red { background: var(--red); color: #fff; font-weight: 700; }
.muted { color: var(--ink-dim); font-size: 14px; }
.center { text-align: center; }
.links { text-align: center; }
.links .btn.link { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Startseite: Formular links, Bestenliste rechts (auf dem Handy darunter) */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 0 28px; align-items: start; }
.board-side { max-width: 420px; width: 100%; }
.board-side h2 { color: var(--yellow); font-size: 24px; margin-bottom: 2px; }
.board-side .muted { margin: 0 0 10px; font-size: 13px; }
table.board.compact th:nth-child(6), table.board.compact td:nth-child(6) { display: none; }
@media (min-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .board-side { margin-top: 5vh; }
}

/* Einstellung im Lobby: 4 oder 5 Karten */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
.seg { display: inline-flex; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.25); border-radius: 999px; padding: 3px; }
.seg button {
  appearance: none; border: 0; background: none; color: var(--ink); font: inherit; font-family: var(--font-fun);
  font-size: 18px; min-width: 52px; padding: 4px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
}
.seg button.on { background: var(--yellow); color: #3b2a00; box-shadow: 0 2px 0 #b8a200; }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: .5; }

/* ---------- Spieltisch ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14px;
  background: var(--panel); border: 2px solid var(--panel-line); border-radius: 999px; padding: 6px 8px 6px 16px;
}
.topbar .spacer { flex: 1; }
.topbar b { color: var(--yellow); }

.opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.seat { background: var(--panel); border: 3px solid transparent; border-radius: 16px; padding: 8px 10px 10px; transition: border-color .2s; }
.seat.active { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,230,0,.25), 0 0 22px rgba(255,230,0,.35); }
.seat.cabo { background: rgba(140, 16, 10, .8); }
.seat-head { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; min-width: 0; }
.seat-head .pname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-head .pts { margin-left: auto; color: var(--ink-dim); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #7dff6b; flex: none; box-shadow: 0 0 6px #7dff6b; }
.dot.off { background: #888; box-shadow: none; }
.hand { display: flex; flex-wrap: wrap; gap: 6px; }

.middle {
  display: flex; justify-content: center; align-items: flex-end; gap: 22px; margin: 14px auto;
  flex-wrap: wrap; padding: 14px 18px; width: fit-content; max-width: 100%;
  background: rgba(9, 58, 14, .55); border-radius: 20px;
}
.pile { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 13px; color: var(--ink); font-weight: 700; }
.pile .card { --cw: 74px; --ch: 106px; }
.empty-slot { width: 74px; height: 106px; border-radius: var(--radius); border: 3px dashed rgba(255,255,255,.35); }

.me { background: var(--panel); border: 3px solid transparent; border-radius: 18px; padding: 10px 12px 14px; }
.me.active { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,230,0,.25), 0 0 26px rgba(255,230,0,.35); }
.me .hand { gap: 10px; justify-content: center; padding-top: 6px; }

.prompt { text-align: center; margin: 12px 0 6px; font-size: 17px; min-height: 1.4em; }
.prompt b { color: var(--yellow); }
.prompt .help { text-align: left; max-width: 560px; margin: 0 auto; background: rgba(0,0,0,.25); border: 2px solid var(--yellow); border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.prompt .help ol { margin: 6px 0; padding-left: 20px; }
.prompt .help li { margin: 3px 0; }
.prompt .help .picked { font-weight: 700; color: var(--yellow); }
.prompt .tip { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
.pile-hint { font-size: 11px; font-weight: 700; color: #3b2a00; background: var(--yellow); border-radius: 999px; padding: 1px 8px; }
.event { text-align: center; color: var(--ink-dim); font-size: 14px; min-height: 1.4em; }
.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.banner {
  text-align: center; background: var(--red); color: #fff; font-family: var(--font-fun); letter-spacing: .03em;
  padding: 6px 16px; border-radius: 999px; margin: 0 auto 10px; width: fit-content; border: 3px solid var(--yellow);
}

/* ---------- Karten ---------- */
.card {
  position: relative; width: var(--cw); height: var(--ch); border-radius: var(--radius);
  border: 0; padding: 0; font: inherit; cursor: default; flex: none; overflow: hidden;
  box-shadow: 0 3px 0 rgba(0,0,0,.3), 0 5px 12px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .15s, outline-color .15s;
  outline: 4px solid transparent; outline-offset: 2px;
}
.card:disabled { opacity: 1; color: inherit; }
.small .card, .card.small { --cw: var(--cw-s); --ch: var(--ch-s); border-radius: 7px; }

/* Rückseite: buntes Pastell-Mosaik wie im Original */
.card.back {
  background: #fbf6ea url("mosaic-back.svg") center / 132px auto;
  border: 3px solid #fbf6ea;
}
.small .card.back { background-size: 90px auto; }

/* Vorderseite: kräftige Farbe pro Wert, Mosaik-Struktur, dicke Zahl */
.card.face {
  --c: var(--c0);
  background: var(--c) url("mosaic-card.svg") center / 130px auto;
  border: 3px solid #fff; color: #fff;
}
.card .num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-fun); font-size: calc(var(--ch) * .44); line-height: 1; color: #fff;
  text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 3px 4px 0 rgba(0,0,0,.45);
}
.card .corner {
  position: absolute; top: 4px; left: 5px; font-family: var(--font-fun); font-size: calc(var(--ch) * .15); line-height: 1;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.card .corner.br { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg); }
.card .act {
  position: absolute; left: 0; right: 0; bottom: 5px; text-align: center;
  font-family: "Pacifico", "Brush Script MT", cursive; font-size: calc(var(--ch) * .15); line-height: 1.2;
  color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.card.face { background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,.2), transparent 50%), url("mosaic-card.svg"); background-size: auto, 130px auto; }
/* Illustration: große Karten zeigen das Monster, kleine nur die Zahl */
.card .art { position: absolute; left: 7%; right: 7%; top: 13%; bottom: 13%; pointer-events: none; }
.card .art svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 2px 0 rgba(0,0,0,.18)); }
.card.face .num { display: none; }
.card .corner { font-size: calc(var(--ch) * .19); z-index: 1; }
.small .card .art { display: none; }
.small .card.face .num { display: grid; }
.small .card .corner, .small .card .act { display: none; }
.small .card .num { font-size: calc(var(--ch) * .5); text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000; }

.card.v0 { --c: var(--c0); } .card.v1 { --c: var(--c1); } .card.v2 { --c: var(--c2); }
.card.v3 { --c: var(--c3); } .card.v4 { --c: var(--c4); } .card.v5 { --c: var(--c5); }
.card.v6 { --c: var(--c6); } .card.v7 { --c: var(--c7); } .card.v8 { --c: var(--c8); }
.card.v9 { --c: var(--c9); } .card.v10 { --c: var(--c10); } .card.v11 { --c: var(--c11); }
.card.v12 { --c: var(--c12); } .card.v13 { --c: var(--c13); }
.card.v13 .num { color: var(--red); text-shadow: 2px 0 0 var(--yellow), -2px 0 0 var(--yellow), 0 2px 0 var(--yellow), 0 -2px 0 var(--yellow), 2px 2px 0 var(--yellow), -2px -2px 0 var(--yellow), 2px -2px 0 var(--yellow), -2px 2px 0 var(--yellow); }

.card.revealed { outline-color: var(--yellow); }
.card { touch-action: manipulation; }
.card.selectable { cursor: pointer; }
.card.selectable:hover { transform: translateY(-4px) rotate(-1deg); }
.card.selected { transform: translateY(-9px); outline-color: #fff; box-shadow: 0 0 0 4px var(--red), 0 8px 16px rgba(0,0,0,.4); }
.card.protected { filter: grayscale(.7) brightness(.75); }
.card.flash { animation: flash 1.6s ease-out; }
@keyframes flash {
  0%, 35% { outline-color: var(--yellow); box-shadow: 0 0 0 7px rgba(255,230,0,.5), 0 5px 12px rgba(0,0,0,.3); }
  100% { outline-color: transparent; }
}

/* ---------- Ergebnis & Log ---------- */
.results { background: rgba(0,0,0,.35); border-radius: 14px; padding: 14px 16px; min-width: min(100%, 420px); }
.results table { width: 100%; border-collapse: collapse; font-size: 15px; }
.results th, .results td { padding: 6px 8px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.12); }
.results th:first-child, .results td:first-child { text-align: left; }
.results .note { display: block; font-size: 12px; color: var(--yellow); }
.results tr.win td { color: var(--yellow); font-weight: 800; }


table.board { width: 100%; border-collapse: collapse; font-size: 15px; }
table.board th, table.board td { padding: 7px 6px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
table.board th:nth-child(2), table.board td:nth-child(2) { text-align: left; width: 100%; white-space: normal; }
table.board th:first-child, table.board td:first-child { text-align: center; }
table.board th { color: var(--ink-dim); font-weight: 600; font-size: 13px; }
table.board tr.me-row td { color: var(--yellow); font-weight: 700; }
#board-body { overflow-x: auto; }
@media (max-width: 600px) { table.board th:nth-child(6), table.board td:nth-child(6) { display: none; } }

/* ---------- Mitverfolgen: Aktionsanzeige, fliegende Karten, 👁 ---------- */
.ticker {
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 12px auto 0;
  background: rgba(0,0,0,.55); border: 2px solid var(--yellow); border-radius: 999px; padding: 7px 18px 7px 8px;
  font-weight: 700; font-size: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.ticker-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); font-size: 17px; flex: none; }
.ticker.pop { animation: ticker-pop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes ticker-pop { from { transform: scale(.85); opacity: .2; } }
.card.ghost { position: fixed; z-index: 26; margin: 0; pointer-events: none; transform-origin: 0 0; box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.card.peeking::before {
  content: "👁"; position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.92); font-size: calc(var(--ch) * .3); box-shadow: 0 0 0 3px var(--yellow);
  animation: peek-pulse .9s ease-in-out infinite;
}
@keyframes peek-pulse { 50% { transform: translate(-50%, -50%) scale(1.15); } }
.lastcall { display: inline-block; background: var(--red); color: #fff; border: 3px solid var(--yellow); border-radius: 14px; padding: 8px 16px; font-weight: 700; animation: pulse 1s ease-in-out infinite; }
.lastcall b { color: var(--yellow); font-family: var(--font-fun); font-size: 22px; }
@media (max-width: 600px) { .ticker { font-size: 14px; padding: 5px 12px 5px 6px; } .ticker-icon { width: 26px; height: 26px; font-size: 14px; } }

/* ---------- Live-Punktestand ---------- */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.scoreboard { background: var(--panel); border: 2px solid var(--panel-line); border-radius: 18px; padding: 12px 12px 8px; order: -1; }
.scoreboard h3 { color: var(--yellow); margin: 0; font-size: 20px; }
.lb-sub { font-size: 12px; margin-bottom: 8px; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  background: rgba(0,0,0,.22); border: 2px solid transparent; border-radius: 12px; padding: 7px 10px; position: relative;
}
.lb-row.me { border-color: rgba(255,230,0,.55); }
.lb-row.turn { background: rgba(255,230,0,.14); }
.lb-rank { font-family: var(--font-fun); font-size: 18px; text-align: center; color: var(--ink-dim); }
.lb-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lb-name small { font-weight: 400; color: var(--ink-dim); }
.lb-name .tag { margin-left: 4px; font-size: 10px; padding: 1px 6px; }
.lb-turn { color: var(--yellow); margin-right: 4px; animation: pulse 1.2s ease-in-out infinite; display: inline-block; }
.lb-bot { margin-left: 4px; font-size: 12px; }
.lb-bar { display: block; height: 5px; border-radius: 999px; background: rgba(255,255,255,.12); margin: 5px 0 3px; overflow: hidden; }
.lb-bar i { display: block; height: 100%; background: #7dff6b; border-radius: inherit; transition: width .8s ease; }
.lb-bar.warm i { background: var(--yellow); }
.lb-bar.hot i { background: var(--red); }
.lb-meta { display: block; font-size: 11px; color: var(--ink-dim); font-weight: 400; }
.lb-pts { font-family: var(--font-fun); font-size: 22px; color: #fff; text-align: right; line-height: 1; }
.lb-delta { display: block; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800; color: #ffb3ad; margin-top: 3px; }
.lb-delta.zero { color: #7dff6b; }
.lb-delta-inline { color: #ffb3ad; font-weight: 700; }
.lb-delta-inline.zero { color: #7dff6b; }
.lb-unit { font-size: 14px; margin-left: 2px; vertical-align: 2px; }
.lb-pts.bump { animation: bump .9s ease; }
@keyframes bump { 0% { transform: scale(1); color: #fff; } 30% { transform: scale(1.5); color: var(--yellow); } 100% { transform: scale(1); } }
@media (max-width: 999px) {
  .lb { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lb-row { padding: 6px 8px; }
  .lb-meta { display: none; }
}
@media (min-width: 1000px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .scoreboard { order: 0; position: sticky; top: 12px; }
}

/* ---------- Cabo-Animation ---------- */
.cabo-fx { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0,0,0,.5); overflow: hidden; cursor: pointer; }
.cabo-fx.play { animation: fx-bg 3s ease forwards; }
.fx-rays {
  position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255,230,0,.38) 0 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0 12%, transparent 45%); mask: radial-gradient(circle, #000 0 12%, transparent 45%);
  animation: fx-spin 8s linear infinite;
}
.fx-box { position: relative; text-align: center; padding: 0 16px; }
.fx-logo { display: block; font-size: clamp(84px, 22vw, 210px); line-height: 1; }
.play .fx-logo { animation: fx-pop .9s cubic-bezier(.2,1.6,.4,1) both, fx-wobble 1s ease-in-out .9s 2; }
.fx-sub { font-family: var(--font-fun); font-size: clamp(22px, 5.5vw, 38px); color: #fff; margin-top: 18px; text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.fx-sub2 { display: inline-block; font-weight: 700; color: var(--yellow); margin-top: 10px; padding: 4px 14px; border-radius: 999px; background: rgba(0,0,0,.6); }
.play .fx-sub { animation: fx-up .5s .45s both; }
.play .fx-sub2 { animation: fx-up .5s .65s both; }
.fx-bits i {
  position: absolute; left: 50%; top: 50%; width: 4.5vmin; height: 6.3vmin; margin: -3.15vmin 0 0 -2.25vmin;
  border-radius: .8vmin; background: var(--c); border: .5vmin solid #fff; opacity: 0;
}
.play .fx-bits i { animation: fx-burst 1.5s cubic-bezier(.1,.8,.3,1) .15s both; }
@keyframes fx-pop { 0% { transform: scale(0) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.25) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(-3deg); } }
@keyframes fx-wobble { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.07) rotate(3deg); } }
@keyframes fx-up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fx-bg { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fx-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes fx-burst {
  0% { transform: rotate(var(--a)) translateY(0) rotate(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(var(--r)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-rays, .play .fx-logo, .play .fx-bits i { animation: none; }
}

/* ---------- Diverses ---------- */
.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: var(--red); color: #fff; text-align: center; padding: 6px; font-size: 14px; font-weight: 700; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: #1d1d1f; color: #fff; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--yellow);
  box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: calc(100% - 32px); text-align: center; font-size: 15px;
}
dialog {
  max-width: 580px; width: calc(100% - 32px); border: 3px solid var(--yellow); border-radius: 18px;
  background: #0f4a14; color: var(--ink); padding: 20px 22px;
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { color: var(--yellow); }
dialog h3 { color: var(--yellow); font-size: 18px; margin-top: 1em; }
dialog ul { padding-left: 20px; }
dialog li { margin: 4px 0; }

@media (max-width: 600px) {
  :root { --cw: 56px; --ch: 80px; --cw-s: 34px; --ch-s: 49px; }
  main { padding: 8px 12px 100px; }
  .opps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .seat { padding: 6px 8px 8px; }
  .hand { gap: 4px; }
  .me .hand { gap: 7px; }
  .pile .card { --cw: 60px; --ch: 86px; }
  .empty-slot { width: 60px; height: 86px; }
  .middle { gap: 14px; padding: 10px 14px; }
  .prompt { font-size: 16px; }
}

/* Leerer Platz: Karten rücken nicht zusammen */
.card.gap { background: none; border: 2px dashed rgba(255,255,255,.22); box-shadow: none; pointer-events: none; }
.card.gap::before, .card.gap::after { content: none; }

/* ---------- Spaß: Reaktionen, Sprechblasen, Erfolge ---------- */
.seat, .me { position: relative; }
.reactbar { display: flex; justify-content: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.reactbar button { font-size: 20px; line-height: 1; padding: 5px 7px; border-radius: 12px; border: 0; background: rgba(0,0,0,.22); cursor: pointer; transition: transform .12s; }
.reactbar button:hover { transform: scale(1.2); }
.reactbar button:active { transform: scale(.9); }
.float-emoji { position: fixed; z-index: 40; font-size: 44px; pointer-events: none; transform: translate(-50%, -50%); animation: emoji-up 2.2s ease-out forwards; }
@keyframes emoji-up {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  15% { opacity: 1; transform: translate(-50%, -70%) scale(1.25); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift)), -260%) scale(1); }
}
.bubble {
  position: absolute; z-index: 5; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%);
  background: #fff; color: #222; font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 14px;
  white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 6px 16px rgba(0,0,0,.35); animation: bubble-in .35s cubic-bezier(.2,1.6,.4,1);
}
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; }
.me .bubble { bottom: auto; top: -14px; }
@keyframes bubble-in { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
.clown { font-size: 18px; animation: clown-wobble 1.2s ease-in-out infinite; display: inline-block; }
@keyframes clown-wobble { 50% { transform: rotate(-15deg) scale(1.15); } }
.seat.revenge { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(255,60,60,.35), 0 0 22px rgba(255,60,60,.5); }
.lb-extra { display: inline-flex; gap: 2px; align-items: center; margin-left: 4px; }
.lb-badge { font-size: 14px; cursor: help; }
.poker { font-size: 11px; background: rgba(0,0,0,.3); border-radius: 8px; padding: 1px 5px; cursor: help; white-space: nowrap; }
.award-pop {
  position: fixed; z-index: 45; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #ffe600, #ffb300); color: #2a1a00; border: 3px solid #fff; border-radius: 18px;
  padding: 10px 18px; box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: award-in 3.6s ease forwards;
}
.award-pop .award-icon { font-size: 40px; }
.award-pop small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.award-pop b { display: block; font-size: 19px; font-family: var(--font-fun); }
@keyframes award-in {
  0% { opacity: 0; transform: translate(-50%, -40px) scale(.7); }
  10%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(.9); }
}
.round-awards { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 14px; text-align: left; }
.round-awards li span { display: inline-block; width: 24px; }
.round-awards small { opacity: .75; }
@media (max-width: 600px) { .reactbar button { font-size: 17px; padding: 4px 5px; } .bubble { font-size: 12px; max-width: 180px; } }
.lb-name { display: flex; flex-direction: column; white-space: normal; }
.lb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-extra { margin: 2px 0 0; flex-wrap: wrap; }
/* Sprechblase unter dem Platz der Gegner (oben ist kein Platz), über dem eigenen */
.seat .bubble { bottom: auto; top: calc(100% + 8px); white-space: normal; width: max-content; max-width: 230px; text-align: center; }
.seat .bubble::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #fff; }
.me .bubble { top: auto; bottom: calc(100% + 8px); white-space: normal; width: max-content; max-width: 260px; }
.opps { position: relative; z-index: 3; }
