/* ===== Pokertisch – ergänzt style.css ===== */
body.pk { overflow: hidden; }
body.pk .landing { overflow: auto; height: 100dvh; }
.modeSwitch { display: flex; gap: 6px; background: #08101c; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.modeSwitch button { flex: 1; background: none; border: 0; color: var(--muted); font-weight: 800; padding: 8px; border-radius: 9px; cursor: pointer; }
.modeSwitch button.on { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a00; }
.formGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 10px; }
select { font: inherit; color: var(--text); background: #08101c; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%; margin-top: 3px; }
.backLink { display: inline-block; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-weight: 700; }
.backLink:hover { color: var(--gold2); }

/* Bühne */
.pkStage { height: calc(100dvh - var(--hdr)); display: flex; flex-direction: column; padding: 6px 10px 10px; gap: 8px; }
.tableWrap { position: relative; flex: 1 1 auto; min-height: 0; }
.pkTable { position: absolute; border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, .10), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 45%, #1f9a5e 0%, #127044 48%, #0a4a2c 85%, #073920 100%);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, .25), inset 0 0 70px rgba(0, 0, 0, .55),
    0 0 0 7px #6b4423, 0 0 0 9px #8a5a2e, 0 0 0 26px #1c110b, 0 0 0 28px #3a2616,
    0 0 0 29px rgba(227, 179, 65, .35), 0 34px 70px 18px rgba(0, 0, 0, .65); }
.pkTable::before { content: ''; position: absolute; inset: 5% 3.5%; border-radius: 50%; border: 2px solid rgba(247, 215, 124, .18); pointer-events: none; }
.feltLogo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; color: rgba(247, 215, 124, .2);
  font-weight: 900; letter-spacing: .3em; text-transform: uppercase; white-space: nowrap; font-size: clamp(11px, 1.3vw, 20px); }
.feltLogo b { display: block; font-size: 1.7em; letter-spacing: .18em; font-style: italic; }
.pkCenter { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: calc(var(--cw) * .14); pointer-events: none; }
.board { display: flex; gap: calc(var(--cw) * .12); }
.slot { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .1); border: 2px dashed rgba(255, 255, 255, .14); }
.potBox { display: flex; align-items: flex-end; gap: 10px; min-height: calc(var(--cw) * .9); }
.potPill { background: rgba(0, 0, 0, .55); border: 1.5px solid rgba(247, 215, 124, .6); color: #fff; border-radius: 999px; padding: 3px 14px; font-weight: 900;
  font-size: calc(var(--cw) * .24); white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.potPill small { color: var(--gold2); font-weight: 800; letter-spacing: .08em; margin-right: 4px; }
.sidePots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: calc(var(--cw) * 7); }
.sidePots span { background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 800; }
.tableMsg { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); z-index: 3; background: rgba(0, 0, 0, .55); border-radius: 12px; padding: 6px 14px; font-weight: 800; font-size: calc(var(--cw) * .2); text-align: center; max-width: calc(var(--cw) * 7);
  border: 1px solid rgba(247, 215, 124, .35); }
.tableMsg:empty { display: none; }
.tableMsg.win { color: #241a00; background: linear-gradient(180deg, var(--gold2), var(--gold)); animation: popIn .35s ease-out; }
.kasse { position: absolute; left: 50%; top: 11%; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: #e8d2b6; background: rgba(60, 35, 15, .7);
  border: 1px solid rgba(200, 140, 80, .6); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.kasse:empty { display: none; }

/* Karten */
.card { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .1); background: linear-gradient(160deg, #fff, #ecebe6);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .15); color: #111; font-weight: 900; flex: none; overflow: hidden; user-select: none; }
.card .r { position: absolute; left: 7%; top: 3%; font-size: calc(var(--cw) * .42); line-height: 1; letter-spacing: -.04em; }
.card .s1 { position: absolute; left: 9%; top: 34%; font-size: calc(var(--cw) * .3); line-height: 1; }
.card .s2 { position: absolute; right: 6%; bottom: 2%; font-size: calc(var(--cw) * .62); line-height: 1; }
.card.h, .card.d { color: #d0172b; }
body.four .card.d { color: #1d5fd1; }
body.four .card.c { color: #128a3c; }
.card.back { background: repeating-linear-gradient(45deg, #a3172a 0 5px, #8b1022 5px 10px); box-shadow: 0 3px 8px rgba(0, 0, 0, .5), inset 0 0 0 3px #fff, inset 0 0 0 5px #6d0c1a; }
.card.back::after { content: '♠'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .55); font-size: calc(var(--cw) * .55); }
.card.deal { animation: dealIn .38s cubic-bezier(.2, .8, .3, 1) both; }
.card.flip { animation: flipIn .5s ease-out both; }
.card.dim { filter: brightness(.55) saturate(.6); }
.card.hi { box-shadow: 0 0 0 3px var(--gold2), 0 0 18px rgba(247, 215, 124, .9); transform: translateY(-6%); }
.card.pick { cursor: pointer; transition: transform .12s; }
.card.pick:hover { transform: translateY(-12%); box-shadow: 0 0 0 3px #ff6b6b, 0 6px 14px rgba(0, 0, 0, .6); }
.card.gone { opacity: .35; transform: rotate(-12deg) translateY(10%); }
@keyframes dealIn { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -120px)) scale(.4) rotate(-30deg); } }
@keyframes flipIn { from { opacity: 0; transform: rotateY(90deg) scale(.9); } }
@keyframes popIn { from { opacity: 0; scale: .7; } }

/* Sitze */
.seat { position: absolute; width: var(--tw); height: var(--th); transform: translate(-50%, -50%); z-index: 3; }
.seat .tile { width: 100%; height: 100%; border-radius: 14px; border-width: 2.5px; cursor: pointer; }
.seat.self .tile { cursor: default; }
.seat .tTop { top: 5px; left: 5px; right: 5px; }
.seat .tBot { left: 5px; right: 5px; bottom: 5px; }
.seat .pill { height: 22px; font-size: 11.5px; padding: 0 8px; }
.seat .name { height: 24px; font-size: 11.5px; }
.seat .tile.sitout video, .seat .tile.sitout .avatar { filter: grayscale(1) brightness(.5); }
.seat .tile.empty { border-style: dashed; border-color: rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); cursor: default; }
.seat.dealerSeat .tile { border-color: var(--purple); }
.seat.dealerSeat .avatar { background: url(dealer.jpg) center 35% / cover; }
.seat.dealerSeat .tile .name { background: var(--purple); border-color: #c4b5fd; }
.timer { position: absolute; left: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, #ff5f5f, var(--gold2), #7CFF8A); z-index: 3; width: 100%; transform-origin: left; }
.actBubble { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); z-index: 5; background: #fff; color: #111; font-weight: 900; font-size: 12px; border-radius: 999px;
  padding: 2px 10px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); animation: popIn .25s ease-out; }
.actBubble.fold { background: #5a1f26; color: #ffc0c6; }
.actBubble.raise, .actBubble.bet { background: var(--gold); color: #241a00; }
.actBubble.allin { background: var(--red); color: #fff; }
.actBubble.win { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a00; font-size: 13px; }
.handTag { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); z-index: 5; background: #0b1320; border: 1.5px solid var(--gold); color: var(--gold2); font-weight: 800;
  font-size: 11px; border-radius: 999px; padding: 1px 9px; white-space: nowrap; max-width: calc(var(--tw) * 1.3); overflow: hidden; text-overflow: ellipsis; }
.hole { position: absolute; display: flex; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; }
.hole .card + .card { margin-left: calc(var(--cw) * -.32); }
.hole.n4 .card + .card, .hole.n3 .card + .card { margin-left: calc(var(--cw) * -.55); }
.hole.mine .card + .card { margin-left: calc(var(--cw) * -.12); }
.hole.mine.n4 .card + .card { margin-left: calc(var(--cw) * -.3); }
.hole.mine { pointer-events: auto; }
.hole.folded { opacity: .0; }
.hole.mine.folded { opacity: .45; }
.betSpot, .stackSpot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; pointer-events: none; }
.betSpot.slim { z-index: 6; }
.betAmt { display: inline-flex; align-items: center; gap: 3px; background: rgba(0, 0, 0, .6); border-radius: 999px; padding: 0 8px; font-weight: 900; font-size: 12px; color: #fff; white-space: nowrap; border: 1px solid rgba(255, 255, 255, .25); }
.dealerBtn { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #d9d9d9 70%, #a8a8a8);
  color: #111; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 2px #999;
  transition: left .6s ease, top .6s ease; z-index: 2; }
.dealerBtn[hidden] { display: none; }

/* Kachel-Inhalt sauber stapeln, wenn sie schmal ist */
@container (max-width: 270px) {
  .seat .tBot { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "stk"; justify-items: start; }
  .seat .tBot .name { justify-self: stretch; justify-content: center; }
}
.seat.flipTop .tTop { flex-direction: row-reverse; }
.seat.flipTop .tTopL { justify-content: flex-end; }

/* Chips */
.chips { display: flex; align-items: flex-end; gap: calc(var(--cs) * .08); }
.ccol { position: relative; width: var(--cs); }
.chp { position: absolute; left: 0; width: var(--cs); height: calc(var(--cs) * .4); border-radius: 50%;
  background: repeating-conic-gradient(from 8deg, var(--s) 0 14deg, var(--c) 14deg 45deg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(0, 0, 0, .3); }
.chp::after { content: ''; position: absolute; inset: 16% 15%; border-radius: 50%; background: var(--c); border: 1px dashed rgba(255, 255, 255, .5); }
.flyChip { position: fixed; z-index: 70; pointer-events: none; transition: transform .7s cubic-bezier(.3, .7, .3, 1), opacity .7s; }

/* Werfen */
.throwMenu { position: fixed; z-index: 80; background: #08101c; border: 1.5px solid var(--gold); border-radius: 14px; padding: 10px; width: 250px; box-shadow: 0 18px 50px rgba(0, 0, 0, .65);
  animation: dropIn .14s ease-out; }
.throwMenu h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.throwGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.throwGrid button { background: #111c2c; border: 1px solid var(--line); border-radius: 10px; font-size: 24px; padding: 6px 0 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.throwGrid button small { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.throwGrid button:hover { border-color: var(--gold); transform: scale(1.06); }
.throwMenu .hintTxt { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.projectile { position: fixed; z-index: 75; font-size: 42px; pointer-events: none; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)); }
.splat { position: absolute; inset: 0; z-index: 6; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.splat .blob { position: absolute; width: 70%; height: 62%; border-radius: 46% 54% 42% 58% / 52% 40% 60% 48%; opacity: .92; animation: splatIn .25s ease-out both, fadeOut .8s 3.4s forwards; }
.splat .blob::before, .splat .blob::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.splat .blob::before { width: 26%; height: 26%; left: -12%; top: 20%; }
.splat .blob::after { width: 16%; height: 60%; left: 40%; top: 80%; border-radius: 0 0 50% 50%; animation: drip 3s ease-in forwards; }
.splat .big { position: relative; font-size: calc(var(--tw) * .3); animation: splatIn .25s ease-out both, fadeOut .8s 3.4s forwards; }
.splat .lbl { position: absolute; bottom: 30%; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 2px 4px #000, 0 0 8px #000; animation: splatIn .3s ease-out both, fadeOut .8s 3.4s forwards; }
.floaty { position: absolute; font-size: 22px; animation: floatUp 2.4s ease-out forwards; }
@keyframes splatIn { from { transform: scale(.2); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes drip { to { height: 140%; } }
@keyframes floatUp { from { transform: translateY(20px) scale(.6); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-120px) scale(1.2); opacity: 0; } }
.tile.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px) rotate(-1.5deg); } 40%, 80% { transform: translateX(6px) rotate(1.5deg); } }

/* GIF auf der Kachel */
.gifOver { position: absolute; inset: 0; z-index: 7; background: #000 center / cover no-repeat; animation: popIn .25s ease-out; }
.gifOver.out { animation: fadeOut .4s forwards; }
.gifPanel { position: fixed; top: calc(var(--hdr) + 6px); right: 8px; width: min(420px, 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; box-shadow: 0 18px 50px rgba(0, 0, 0, .65); animation: dropIn .16s ease-out; }
.gifTabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.gifTabs button { background: #111c2c; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 12px; cursor: pointer; }
.gifTabs button.on { background: var(--gold); color: #241a00; border-color: var(--gold); }
.gifGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gifGrid button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #111c2c; cursor: pointer; aspect-ratio: 1; }
.gifGrid button:hover { border-color: var(--gold); }
.gifGrid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Aktionsleiste */
#pkBar { flex: none; width: min(980px, 100%); margin: 0 auto; background: rgba(9, 16, 30, .92); border: 1.5px solid rgba(227, 179, 65, .4); border-radius: 16px; padding: 10px 12px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.myCards { display: flex; gap: 6px; align-items: center; --cw: 46px; }
.myCards:empty { display: none; }
.barMain { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.barTop { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-weight: 700; }
.barTop .hn { color: var(--gold2); font-weight: 900; }
.barTop .spacer { flex: 1; }
.pre { display: flex; gap: 6px; flex-wrap: wrap; }
.pre label.chk { margin: 0; background: #111c2c; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.pre label.chk.on { border-color: var(--gold); background: #2a2410; }
.acts .btn.fold { background: #5a1f26; border-color: #8a2d36; }
.acts .btn.call { background: #1b3b66; border-color: #2c5fa3; }
.acts .btn.raise { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #241a00; border-color: #b88a1a; }
.presets { display: flex; gap: 5px; flex-wrap: wrap; }
.presets .btn { padding: 5px 9px; font-size: 12px; }
.seatOpts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seatOpts .btn { padding: 5px 10px; font-size: 12px; }
.buyGrid { display: flex; gap: 8px; flex-wrap: wrap; }
.buyGrid .btn { display: flex; flex-direction: column; align-items: center; min-width: 86px; }
.buyGrid .btn small { font-weight: 700; opacity: .8; font-size: 11.5px; }

/* Abrechnung */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { background: #08101c; border: 1.5px solid var(--gold); border-radius: 18px; padding: 18px 20px; width: min(720px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7); animation: popIn .25s ease-out; }
.modal h2 { margin: 0 0 6px; color: var(--gold2); }
.setTable { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.setTable th { text-align: right; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px; border-bottom: 1px solid var(--line); }
.setTable td { text-align: right; padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.setTable th:first-child, .setTable td:first-child { text-align: left; }
.pos { color: #7CFF8A; font-weight: 900; }
.neg { color: #ff8b8b; font-weight: 900; }
.transfers { list-style: none; padding: 0; margin: 6px 0 0; }
.transfers li { padding: 8px 10px; background: #111c2c; border-radius: 10px; margin-bottom: 6px; font-weight: 700; }
.transfers b { color: var(--gold2); }
.scoreRow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.scoreRow .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hostRow { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto auto auto; gap: 5px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hostRow input { padding: 5px 6px; }
.levelInfo { font-size: 13px; color: var(--muted); }
.levelInfo b { color: var(--gold2); }

@media (max-width: 760px) {
  .topbar .brand, .stats .stat.opt, .roomInfo .lbl { display: none; }
  .topbar { gap: 6px; padding: 6px 8px; }
  .tbRight { gap: 4px; }
  .tbRight .btn.icon { padding: 5px 6px; }
  #copyLink { font-size: 0; padding: 6px 8px; }
  #copyLink::before { content: '🔗'; font-size: 13px; }
  .stat { min-width: 0; padding: 0 9px; }
  .stat b { font-size: 15px; }
  #pkBar { grid-template-columns: auto minmax(0, 1fr); padding: 6px 8px; gap: 8px; border-radius: 12px; }
  .myCards { --cw: 34px; gap: 3px; }
  .barMain { gap: 6px; }
  .barTop { font-size: 12.5px; gap: 4px 10px; }
  .acts { gap: 5px; }
  .acts .btn { min-height: 40px; flex: 1 1 58px; padding: 5px 3px; font-size: 13px; border-radius: 9px; }
  .acts .btn small { font-size: 10.5px; }
  .custom { margin-top: 0; gap: 6px; }
  .custom input[type=number] { width: 78px; padding: 6px; }
  .presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .presets .btn { flex: none; }
  .seatOpts { display: none; }
  .pre label.chk { padding: 5px 8px; font-size: 12.5px; }
  .pkStage { padding: 4px 4px 6px; gap: 6px; }
  .seat .tTop { top: 3px; left: 3px; right: 3px; }
  .seat .tBot { left: 3px; right: 3px; bottom: 3px; }
  .seat .pill { height: 18px; font-size: 10px; padding: 0 5px; }
  .seat .name { height: 19px; font-size: 9.5px; letter-spacing: .02em; }
  .seat .tile { border-radius: 10px; border-width: 2px; }
  .actBubble { font-size: 10.5px; padding: 1px 7px; top: -9px; }
  .handTag { font-size: 9.5px; }
  .feltLogo { font-size: 9px; letter-spacing: .15em; }
  .potPill { font-size: 12px; padding: 2px 9px; }
  .kasse { font-size: 10px; }
}

/* ===================== Tisch-Design 2.0 + Farbthemen ===================== */
body.pk { --felt1: #23a065; --felt2: #137346; --felt3: #0a4b2d; --rail1: #3a2a20; --rail2: #120b07; --wood1: #8a5a2e; --wood2: #5e3a1c; --wood3: #a36d3a;
  --line: rgba(247, 215, 124, .26); --logo: rgba(247, 215, 124, .2); --room1: #0f4a35; --room2: #031510; --accent: #f7d77c;
  background: radial-gradient(ellipse at 50% 38%, var(--room1) 0%, var(--room2) 72%) fixed; }
body.pk[data-theme="black"] { --felt1: #3b4048; --felt2: #252930; --felt3: #121418; --rail1: #1d1d1f; --rail2: #050506; --wood1: #3f3229; --wood2: #261d17; --wood3: #54443a;
  --line: rgba(255, 255, 255, .13); --logo: rgba(255, 255, 255, .1); --room1: #23262b; --room2: #060708; --accent: #d9dde3; }
body.pk[data-theme="blue"] { --felt1: #2f7fd0; --felt2: #19589c; --felt3: #0b2f5c; --rail1: #2b2118; --rail2: #0b0705; --wood1: #a8763f; --wood2: #714b25; --wood3: #c08a4c;
  --line: rgba(255, 255, 255, .24); --logo: rgba(255, 255, 255, .16); --room1: #10305a; --room2: #040b16; --accent: #9fd0ff; }
body.pk[data-theme="red"] { --felt1: #b02c42; --felt2: #7d172a; --felt3: #3f0a15; --rail1: #241614; --rail2: #080404; --wood1: #b8924c; --wood2: #7a5a26; --wood3: #d8b46a;
  --line: rgba(247, 215, 124, .3); --logo: rgba(247, 215, 124, .22); --room1: #3d0e18; --room2: #0d0305; --accent: #f7d77c; }
body.pk[data-theme="night"] { --felt1: #6a3fb0; --felt2: #40237a; --felt3: #1b0f35; --rail1: #1a1226; --rail2: #06040b; --wood1: #2c2a3d; --wood2: #191826; --wood3: #b388ff;
  --line: rgba(179, 136, 255, .45); --logo: rgba(179, 136, 255, .25); --room1: #221139; --room2: #05030b; --accent: #d6c2ff; }
body.pk[data-theme="beige"] { --felt1: #2c8a7c; --felt2: #1c6358; --felt3: #0e3a33; --rail1: #6b4a32; --rail2: #3a2516; --wood1: #c9a171; --wood2: #a07a4c; --wood3: #e3c18f;
  --line: rgba(255, 245, 220, .3); --logo: rgba(255, 245, 220, .2); --room1: #3c3226; --room2: #120e0a; --accent: #ffe7b0; }

/* Polster (Rail) aus Leder mit Naht */
.pkTable { border-radius: 50%; overflow: visible;
  background: radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, .16), transparent 45%), radial-gradient(ellipse at 50% 55%, var(--rail1) 55%, var(--rail2) 100%);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .18), inset 0 -8px 16px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .9), 0 38px 80px 10px rgba(0, 0, 0, .7), 0 10px 22px rgba(0, 0, 0, .5); }
.pkTable::before { content: ''; position: absolute; inset: calc(var(--rail) * .32); border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .17); pointer-events: none; }
.pkTable::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .015) 0 2px, transparent 2px 5px); mix-blend-mode: overlay; }
/* Holzring */
.pkTable .wood { position: absolute; inset: calc(var(--rail) * .72); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .22), transparent 60%),
    repeating-linear-gradient(100deg, var(--wood1) 0 3px, var(--wood2) 3px 5px, var(--wood3) 5px 6px, var(--wood1) 6px 11px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 2px 2px rgba(255, 255, 255, .25), 0 0 0 1px rgba(0, 0, 0, .6); }
/* Filz mit Struktur */
.pkTable .felt { position: absolute; inset: calc(var(--rail) * .28); border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .13), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 45%, var(--felt1) 0%, var(--felt2) 50%, var(--felt3) 100%);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, .6), inset 0 6px 14px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(0, 0, 0, .3); }
.pkTable .betLine { position: absolute; inset: 9% 6.5%; border-radius: 50%; border: 2px solid var(--line); pointer-events: none; }
.pkTable .chipTray { position: absolute; left: 50%; top: 3.2%; transform: translateX(-50%); width: 21%; height: 7.5%; min-height: 14px; border-radius: 8px 8px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 35%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, #d62828 0 16%, #1f1f1f 16% 32%, #2a9d4b 32% 48%, #7b2cbf 48% 64%, #f4c430 64% 80%, #2b6cb0 80% 100%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .5); opacity: .9; }
.pkTable .feltLogo { color: var(--logo); }
.pkTable .kasse { top: 14.5%; }
.pkTable .tableMsg { top: 29%; }
.portrait .pkTable .chipTray { display: none; }

/* Straße / Spielart über den Karten */
.streetLbl { font-weight: 900; letter-spacing: .22em; text-transform: uppercase; font-size: calc(var(--cw) * .16); color: var(--accent);
  background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 2px 12px; }
.streetLbl:empty { display: none; }
.boards { display: flex; flex-direction: column; align-items: center; gap: calc(var(--cw) * .1); }
.boardRow { display: flex; align-items: center; gap: 8px; }
.boardRow .bLbl { font-size: 11px; font-weight: 900; color: var(--accent); min-width: 54px; text-align: right; text-shadow: 0 1px 2px #000; }
.boardRow .bWin { font-size: 11.5px; font-weight: 800; min-width: 54px; max-width: 170px; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boardRow .bWin b { color: var(--gold2); }

/* Kamera: Name dezent unten */
.seat .nameBar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 16px 8px 5px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .74)); color: #fff; font-size: 12.5px; font-weight: 800; text-shadow: 0 1px 2px #000; pointer-events: none; }
.seat .nameBar .nmTxt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; }
.seat .nameBar .stk { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--gold2); font-weight: 900; }
.seat .nameBar .stk small { color: #9ff3c0; font-size: .85em; }
.seat .nameBar .marks { display: inline-flex; gap: 3px; flex: none; }
.seat .nameBar .marks:empty { display: none; }
.seat .nameBar .mk { min-width: 16px; height: 16px; font-size: 8.5px; padding: 0 4px; }
.seat .nameBar .chip { width: 11px; height: 11px; }
.dealerSeat .nameBar { justify-content: center; color: #e4dbff; }
@container (max-width: 180px) {
  .seat .nameBar { font-size: 10.5px; padding: 12px 5px 3px; gap: 4px; }
}
.seat .tile { border-width: 2px; border-color: rgba(255, 255, 255, .22); box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }
.seat .tile.me { border-color: #6aa8ff; }
.seat .tile.turn { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(247, 215, 124, .4), 0 0 30px rgba(247, 215, 124, .55); }
.seat .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); }
.seat .tile.allin { border-color: var(--red); }
.seat.dealerSeat .tile { border-color: var(--purple); }
.seat .timer { height: 4px; z-index: 3; }

/* Game-Button */
.gameBtn { background: radial-gradient(circle at 35% 30%, #c4b5fd, #7c3aed 70%, #4c1d95); color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 2px #a78bfa; }

/* Abstimmung & Spielwahl in der Leiste */
.voteBtns, .gameChoice { display: flex; gap: 8px; flex-wrap: wrap; }
.voteBtns .btn, .gameChoice .btn { flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; min-height: 52px; justify-content: center; }
.voteBtns .btn small, .gameChoice .btn small { font-size: 11px; font-weight: 700; opacity: .85; }
.voteBtns .btn.on { box-shadow: 0 0 0 3px var(--gold2); }
.voteState { font-size: 12.5px; color: var(--muted); }
.voteState b { color: #9ff3c0; }

/* Themen-Auswahl */
.themeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.themeGrid button { border: 2px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; background: none; color: #fff; font-weight: 800; font-size: 12px; }
.themeGrid button.on { border-color: var(--gold2); box-shadow: 0 0 0 2px rgba(247, 215, 124, .35); }
.themeGrid .sw { display: block; height: 38px; border-bottom: 5px solid; }
.themeGrid span.t { display: block; padding: 4px 0 5px; background: #0b1320; }
.portrait .boardRow .bLbl, .portrait .boardRow .bWin { display: none; }

/* ===================== Runde 3: Seitenleiste, Dealer am Tisch, Rack ===================== */
.pkStage { display: grid; grid-template-columns: minmax(0, 1fr) clamp(270px, 21vw, 360px); grid-template-rows: minmax(0, 1fr); gap: 10px; padding: 8px 10px 10px; }
.sidePanel { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; }
.sidePanel #pkBar { width: 100%; margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; max-height: 100%; overflow: auto;
  border-radius: 18px; background: linear-gradient(180deg, rgba(12, 20, 34, .96), rgba(6, 11, 20, .96)); }
.sidePanel .myCards { --cw: clamp(54px, 4.6vw, 78px); justify-content: center; gap: 8px; padding: 6px 0 2px; }
.sidePanel .barMain { gap: 10px; }
.sidePanel .barTop { flex-direction: column; align-items: flex-start; gap: 4px; }
.sidePanel .barTop .hn { font-size: 15px; }
.sidePanel .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidePanel .acts .btn { min-height: 56px; }
.sidePanel .custom { margin-top: 0; }
.sidePanel .custom input[type=number] { width: 92px; }
.sidePanel .presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.sidePanel .seatOpts { display: flex; flex-direction: column; align-items: stretch; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.sidePanel .seatOpts .btn, .sidePanel .seatOpts select { width: 100% !important; }
.sidePanel .buyGrid { display: grid; grid-template-columns: 1fr 1fr; }
.sidePanel .pre { display: grid; grid-template-columns: 1fr; gap: 6px; }
.sidePanel .voteBtns, .sidePanel .gameChoice { display: grid; grid-template-columns: 1fr 1fr; }
.sidePanel .voteBtns .btn:first-child { grid-column: 1 / -1; }
.voteInput { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.voteInput input { width: 80px; font-size: 18px; font-weight: 800; text-align: center; padding: 8px; }
.wheelHint { font-size: 11px; color: var(--muted); }

/* Dealer als Person hinter dem Tisch */
.dealerPerson { position: absolute; z-index: 0; pointer-events: none; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .7)); }
.dealerPerson img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.dealerPerson .dealerTag { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase;
  color: #e4dbff; background: rgba(76, 29, 149, .75); border: 1px solid rgba(196, 181, 253, .6); border-radius: 999px; padding: 2px 10px; opacity: .85; }
.pkTable { z-index: 1; }
#seats { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#seats > * { pointer-events: auto; }
#seats .hole:not(.mine), #seats .betSpot, #seats .stackSpot { pointer-events: none; }

/* Chip-Rack: Dealer-Tray mit Chip-Röhren */
.pkTable .rack { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: calc(var(--cw) * .16); z-index: 1; }
.tray { padding: calc(var(--cw) * .07) calc(var(--cw) * .09) 0; border-radius: calc(var(--cw) * .1) calc(var(--cw) * .1) calc(var(--cw) * .14) calc(var(--cw) * .14);
  background: linear-gradient(180deg, #4a4a4f, #1b1b1e 40%, #0b0b0d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 4px rgba(0, 0, 0, .8), 0 0 0 1px #000, 0 0 0 2px rgba(227, 179, 65, .45), 0 8px 18px rgba(0, 0, 0, .7); }
.trayIn { display: flex; gap: calc(var(--cw) * .05); height: calc(var(--cw) * .95); padding: calc(var(--cw) * .04); border-radius: calc(var(--cw) * .07);
  background: linear-gradient(180deg, #030303, #121214); box-shadow: inset 0 4px 9px rgba(0, 0, 0, .95), inset 0 -1px 0 rgba(255, 255, 255, .08); }
.tube { position: relative; display: flex; align-items: flex-end; width: calc(var(--cw) * .44); height: 100%; overflow: hidden; border-radius: calc(var(--cw) * .22) calc(var(--cw) * .22) calc(var(--cw) * .1) calc(var(--cw) * .1);
  background: linear-gradient(90deg, #000, #26262a 45%, #0a0a0b); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .9); }
.tubeFill { display: block; width: 100%; height: calc(var(--f) * 100%); background-size: 100% 100%, 100% calc(var(--cw) * .14); background-repeat: no-repeat, repeat-y; background-position: 0 0, 0 100%;
  border-radius: calc(var(--cw) * .05) calc(var(--cw) * .05) 0 0; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 -2px 4px rgba(0, 0, 0, .6); }
.trayLip { text-align: center; font-size: calc(var(--cw) * .1); line-height: 1.6; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: rgba(247, 215, 124, .75);
  text-shadow: 0 1px 0 #000; padding: 0 0 calc(var(--cw) * .02); }
.rackLoose { display: flex; align-items: flex-end; }
.portrait .pkTable .rack { display: none; }

/* Kassenbuch */
.bookTable td, .bookTable th { padding: 5px 4px; font-size: 12.5px; }
.bookLog { max-height: 160px; overflow: auto; font-size: 12px; margin-top: 6px; }
.bookLog div { padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.bookLog time { color: var(--muted); font-size: 11px; margin-right: 5px; }

/* Viele Boards: zwei Spalten */
.boards.many { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.boards.many .boardRow .bWin { display: none; }

@media (max-width: 1000px), (max-aspect-ratio: 1/1) {
  .pkStage { display: flex; flex-direction: column; }
  .sidePanel #pkBar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 8px; max-height: 46dvh; }
  .sidePanel .myCards { --cw: 38px; }
  .sidePanel .acts { display: flex; }
  .sidePanel .seatOpts { display: none; }
  .sidePanel .barTop { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidePanel .presets { display: flex; flex-wrap: nowrap; overflow-x: auto; }
}

/* ===== Runde 4: Squeeze, Rabbit, Zeitbank, Historie, Statistik ===== */
kbd { display: inline-block; font: 800 10px/1 ui-monospace, monospace; padding: 2px 4px; border-radius: 4px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .25); color: inherit; opacity: .75; vertical-align: 1px; }
.presets kbd { margin-right: 4px; opacity: .55; }
@media (hover: none) { kbd, .wheelHint { display: none; } }
.bankPill { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(76, 201, 240, .14); border: 1px solid rgba(76, 201, 240, .45); color: #bfefff; white-space: nowrap; }
.bankPill.on { background: rgba(255, 93, 93, .2); border-color: #ff5d5d; color: #ffd0d0; animation: pulse 1s infinite; }
.pill.status.bank { background: #5b1820 !important; color: #ffd4d4 !important; }
@keyframes pulse { 50% { opacity: .55; } }

/* Squeeze */
.sqBox { position: relative; display: flex; gap: 8px; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; padding-bottom: 16px; }
.sqBox.drag { cursor: grabbing; }
.sqCard { position: relative; transform: rotate(calc(var(--peel, 0) * -3deg)); transition: transform .1s; }
.sqCard:nth-child(2) { transform: rotate(calc(var(--peel, 0) * 3deg)); }
.sqFlap { position: absolute; inset: 0; filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, .55)); pointer-events: none; }
.sqBack { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; }
.sqHint { position: absolute; left: 50%; transform: translateX(-50%); bottom: -2px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--gold2); opacity: .8; white-space: nowrap; pointer-events: none; }
.sqBox .card .r, .sqBox .card .s1 { text-shadow: 0 0 1px rgba(0, 0, 0, .2); }

/* Rabbit Hunt */
.card.rabbit { opacity: .78; filter: saturate(.55) brightness(.92); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 4px rgba(122, 229, 130, .5); }
.card.rabbit::before { content: '🐇'; position: absolute; right: -8%; top: -10%; font-size: calc(var(--cw) * .32); filter: none; }
.rabbitBtn small { font-weight: 700; opacity: .8; margin-left: 4px; }

/* Info-Fenster (Historie / Statistik) */
#infoRoot .overlay { z-index: 95; }
.infoModal { width: min(860px, 100%); }
.infoHead { display: flex; align-items: center; gap: 8px; position: sticky; top: -18px; background: #08101c; padding: 4px 0 8px; z-index: 2; }
.infoHead h2 { margin: 0; flex: 1; }
.hh { border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 8px 12px; margin: 8px 0; background: rgba(255, 255, 255, .03); }
.hh[open] { background: rgba(255, 255, 255, .05); border-color: rgba(247, 215, 124, .3); }
.hh summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.hh summary time { margin-left: auto; opacity: .55; font-size: 12px; }
.mini { display: inline-flex; gap: 3px; --cw: 26px; vertical-align: middle; }
.mini .card { box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.hhBoard { display: flex; gap: 10px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.hhBoard .rab { display: inline-flex; gap: 4px; align-items: center; opacity: .8; }
.hhTable { width: 100%; border-collapse: collapse; font-size: 13px; }
.hhTable td { padding: 4px 6px; border-top: 1px solid rgba(255, 255, 255, .06); }
.hhTable tr.me td { background: rgba(247, 215, 124, .07); }
.hhTable td:last-child { text-align: right; font-weight: 800; }
.hhLines { margin: 8px 0 2px; padding-left: 22px; font-size: 12.5px; opacity: .85; max-height: 220px; overflow: auto; }
.ct { font-weight: 800; }
.ct.h, .ct.d { color: #ff6b7a; }
body.four .ct.d { color: #4ea8ff; } body.four .ct.c { color: #5fd47a; }
.tblWrap { overflow-x: auto; }
.statTable { font-size: 13px; white-space: nowrap; }
.statTable tr.me td { background: rgba(247, 215, 124, .08); }
.curve { width: 100%; height: 220px; background: rgba(0, 0, 0, .25); border-radius: 10px; }
.curve text { fill: rgba(255, 255, 255, .55); font-size: 11px; }
.curve .gl { stroke: rgba(255, 255, 255, .08); }
.curve .zl { stroke: rgba(255, 255, 255, .35); stroke-dasharray: 4 4; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; }
.legend i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.volRow { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.volRow input { flex: 1; accent-color: var(--gold); }
.sqHint .m { display: none; }
@media (hover: none), (max-width: 700px) { .sqHint .d { display: none; } .sqHint .m { display: inline; } }
.recentList { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.boardTable td:first-child { width: 28px; text-align: center; }
.breakCtl, .botCtl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; margin-top: 4px; }
.breakCtl input { width: 64px; padding: 5px 7px; }
.tableMsg b[data-break] { font-variant-numeric: tabular-nums; color: var(--gold2); }
.tile.pkbot .avatar { font-size: clamp(30px, 22cqw, 90px); background: radial-gradient(circle at 50% 40%, #1b2a44, #0b1220); }
.infoHead h2 small { font-size: 13px; font-weight: 600; margin-left: 6px; }

/* Squeeze direkt vor einem selbst auf dem Tisch */
.hole .sqBox { padding: 0; gap: calc(var(--cw) * .1); }
.hole .sqHint { bottom: auto; top: calc(var(--cw) * -.32); font-size: 11px; text-shadow: 0 1px 3px #000; }
.hole.mine { z-index: 6; }
.myCards:empty { display: none; }
.hole .sqHint { display: none; }
.sqBarHint { font-size: 12.5px; font-weight: 800; color: var(--gold2); background: rgba(247, 215, 124, .08); border: 1px dashed rgba(247, 215, 124, .35); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }

/* GIF-Sprechblase neben dem Absender */
.gifPop { position: absolute; z-index: 60; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); animation: gifIn .3s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: auto; }
.gifPop img, .gifPop video { display: block; max-width: var(--mw, 260px); max-height: var(--mh, 340px); width: auto; height: auto; object-fit: contain; border-radius: 11px; background: #000; }
.gifPop.tailL::before, .gifPop.tailR::before { content: ''; position: absolute; top: 50%; width: 0; height: 0; border: 10px solid transparent; transform: translateY(-50%); }
.gifPop.tailL::before { left: -19px; border-right-color: #fff; }
.gifPop.tailR::before { right: -19px; border-left-color: #fff; }
.gifPop .gifFrom { position: absolute; left: 12px; top: -11px; background: #111; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.gifPop .gifSound { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .75); color: #fff; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 12px; cursor: pointer; }
.gifPop.out { animation: fadeOut .35s forwards; }
@keyframes gifIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
#gifGrid video { width: 100%; height: 100%; object-fit: cover; display: block; }
#gifGrid button { position: relative; }
#gifGrid .gifTag { position: absolute; right: 4px; bottom: 4px; font-size: 12px; background: rgba(0, 0, 0, .65); border-radius: 999px; padding: 1px 5px; }

/* ---------- Abrechnung: Überblick + Status ---------- */
.setModal { max-width: 640px; }
.setFacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; margin: 10px 0; }
.setFacts > div { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; }
.setFacts small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }
.setFacts b { font-size: 16px; }
.setFacts em { font-style: normal; font-size: 12px; opacity: .8; }
.setStatus { border-radius: 10px; padding: 8px 12px; margin: 6px 0 10px; font-size: 13px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.setStatus.ok { background: rgba(60,200,120,.12); border-color: rgba(60,200,120,.35); }
.setStatus.bad { background: rgba(230,70,70,.14); border-color: rgba(230,70,70,.4); }
.setTable tr.meRow td { background: rgba(232,190,80,.1); }
.setModal .btnRow { flex-wrap: wrap; }

/* ===== Aktionsleiste flach unten rechts neben dem eigenen Platz (breite Bildschirme) ===== */
@media (min-width: 1001px) and (min-aspect-ratio: 1/1) {
  .pkStage { grid-template-columns: minmax(0, 1fr); position: relative; }
  .sidePanel { position: absolute; right: 12px; bottom: 10px; width: clamp(400px, 31vw, 490px); max-width: calc(100% - 24px); max-height: 62%; z-index: 30; justify-content: flex-end; }
  .sidePanel #pkBar { gap: 5px; padding: 7px 10px; border-radius: 14px; max-height: 100%;
    background: linear-gradient(180deg, rgba(12, 20, 34, .93), rgba(6, 11, 20, .93)); backdrop-filter: blur(6px); }
  .sidePanel .barMain { gap: 5px; }
  .sidePanel .barTop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
  .sidePanel .barTop .hn { font-size: 14px; }
  .sidePanel .acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sidePanel .acts .btn { min-height: 38px; padding: 4px 4px; font-size: 14px; line-height: 1.05; }
  .sidePanel .acts .btn kbd { display: none; }
  .sidePanel .acts .btn small { font-size: 11px; }
  .sidePanel .custom { display: flex; align-items: center; gap: 8px; margin: 0; }
  .sidePanel .custom input[type=range] { flex: 1; }
  .sidePanel .custom input[type=number] { width: 78px; padding: 5px 6px; font-size: 14px; }
  .sidePanel .presets { display: flex; flex-wrap: nowrap; gap: 4px; }
  .sidePanel .presets .btn { flex: 1 1 auto; min-width: 0; padding: 3px 5px; font-size: 11.5px; white-space: nowrap; }
  .sidePanel .presets kbd { display: none; }
  .sidePanel .wheelHint { display: none; }
  .sidePanel .seatOpts { display: none; } /* Aussetzen/Nachkaufen/Auscashen gibt es im Menü */
  .sidePanel .myCards:empty { display: none; }
}

/* WhatsApp-Einladung */
#waInvite.waBtn { background: #1f8f4e; border-color: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0; gap: 0; padding: 6px 9px; }
#waInvite svg { width: 17px; height: 17px; display: block; }
#waInvite.waBtn:hover { background: #25a35a; }
@media (max-width: 430px) {
  .tbRight { gap: 3px; }
  .tbRight .btn.icon, #waInvite.waBtn { padding: 5px 5px; }
  #waInvite svg { width: 15px; height: 15px; }
  .tbRight #menuBtn { padding: 5px 8px; }
}

/* ===== Dealer-Einbuchtung im Tischrand + eingelassenes Chip-Tray ===== */
.bayRing { position: absolute; z-index: 2; pointer-events: none; }
.bayRing > div { position: absolute; border-radius: 50%; }
.bayWood { inset: 0; border: var(--rw) solid var(--wood2);
  background: none; box-shadow: 0 7px 16px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .7); }
.bayWood::before { content: ''; position: absolute; inset: calc(var(--rw) * -1); border-radius: 50%; border: var(--rw) solid transparent;
  background: repeating-linear-gradient(100deg, var(--wood1) 0 3px, var(--wood2) 3px 5px, var(--wood3) 5px 6px, var(--wood1) 6px 11px) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.bayRail { inset: var(--rw); border: var(--rr) solid var(--rail1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(0, 0, 0, .8); }
.bayRail::before { content: ''; position: absolute; inset: calc(var(--rr) * -1); border-radius: 50%; border: var(--rr) solid transparent;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(180deg, var(--rail2), var(--rail1) 55%, var(--rail2)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.portrait .bayRing { display: none; }
/* Tray wie eingelassen: flacher Metallrahmen bündig im Filz */
.pkTable .rack { z-index: 1; }
.pkTable .rack .tray { padding: calc(var(--cw) * .05) calc(var(--cw) * .06) 0; border-radius: calc(var(--cw) * .06);
  background: linear-gradient(180deg, #2b2d31, #17181b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 2px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(0, 0, 0, .85), 0 0 0 3px rgba(0, 0, 0, .22), 0 1px 0 4px rgba(255, 255, 255, .04); }
.pkTable .rack .trayIn { border-radius: calc(var(--cw) * .04); box-shadow: inset 0 5px 10px rgba(0, 0, 0, .95), inset 0 -1px 0 rgba(255, 255, 255, .06); }
.pkTable .rack .trayLip { font-size: calc(var(--cw) * .12); color: rgba(247, 215, 124, .55); }

.pkTable .rack { flex-direction: column; align-items: center; gap: 5px; }
.pkTable .rack .streetLbl { font-size: 11px; white-space: nowrap; }
/* Vorab-Aktionen (wenn man nicht dran ist) flach nebeneinander */
@media (min-width: 1001px) and (min-aspect-ratio: 1/1) {
  .sidePanel .pre { display: flex; flex-wrap: nowrap; }
  .sidePanel .pre label.chk { flex: 1 1 0; min-width: 0; padding: 6px 7px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Leiste flach unten mittig unter dem eigenen Platz: 2-spaltig, so wenig Höhe wie möglich */
@media (min-width: 1001px) and (min-aspect-ratio: 1/1) {
  .sidePanel { bottom: 4px; max-height: 45%; }
  .sidePanel .barMain { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 5px 12px; align-items: center; }
  .sidePanel .barMain > * { grid-column: 1 / -1; }
  .sidePanel .barMain > .acts { grid-column: 1; }
  .sidePanel .barMain > .custom { grid-column: 2; }
  .sidePanel .barMain:not(:has(.custom)) > .acts { grid-column: 1 / -1; }
  .sidePanel .acts .btn { min-height: 36px; }
  .sidePanel .sqBarHint { display: none; }
}

/* ===== Eigene Chips greifen (statt Regler) ===== */
.custom.chipMode { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pickRow { display: flex; gap: 5px; flex: none; }
.pChip { --d: 36px; position: relative; width: var(--d); height: var(--d); flex: none; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle, var(--c) 0 50%, var(--s) 50% 54%, var(--c) 54% 63%, transparent 64%),
    repeating-conic-gradient(var(--c) 0 30deg, var(--s) 30deg 45deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 3px 6px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .35);
  transition: transform .08s ease, filter .15s ease; }
.pChip span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 9.5px/1 system-ui, sans-serif; color: var(--s);
  letter-spacing: -.02em; white-space: nowrap; text-shadow: 0 0 2px rgba(0, 0, 0, .25); }
.pChip:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.12); }
.pChip:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.pChip:disabled { opacity: .28; cursor: not-allowed; filter: grayscale(.6); }
.pickSum { display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; font-size: 13px; height: 22px; }
.pickSum b { color: var(--gold2, #f7d77c); font-size: 14px; white-space: nowrap; }
.pickSum em { font-style: normal; font-size: 11.5px; color: #9fe6b0; white-space: nowrap; }
.pickSum em.bad { color: #ff9a9a; }
.pickSum .muted { font-size: 11.5px; white-space: nowrap; }
.pickStack { display: inline-flex; align-items: flex-end; height: 22px; overflow: visible; }
.pickStack .chips { position: relative; }
.pickClr { border: 0; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer; flex: none; }
.pickClr:hover { background: rgba(255, 93, 93, .45); }
.modeBtn { flex: none; padding: 4px 7px !important; font-size: 14px !important; margin-left: auto; }
.btn.dim { opacity: .55; }
@media (min-width: 1001px) and (min-aspect-ratio: 1/1) {
  .sidePanel .custom.chipMode { flex-wrap: nowrap; gap: 6px; }
  .sidePanel .pChip { --d: 36px; }
  .sidePanel .pChip span { font-size: 9.5px; }
  .sidePanel .barTop:has(.pickSum) { flex-wrap: nowrap; }
  .sidePanel .pickSum { flex-wrap: nowrap; }
}
@media (max-width: 1000px), (max-aspect-ratio: 1/1) {
  .custom.chipMode .pickRow { flex: 1 1 100%; justify-content: space-between; max-width: 290px; }
  .pChip { --d: 40px; }
  .pChip span { font-size: 10.5px; }
}

/* Dealer-Tray: nur noch die echten Chip-Werte, fein beschriftet */
.pkTable .rack .trayIn { height: auto; align-items: flex-end; gap: calc(var(--cw) * .1); padding: calc(var(--cw) * .06) calc(var(--cw) * .08) calc(var(--cw) * .04); }
.tubeCol { display: flex; flex-direction: column; align-items: center; gap: calc(var(--cw) * .06); min-width: calc(var(--cw) * .7); }
.tubeCol .tube { width: calc(var(--cw) * .6); height: calc(var(--cw) * 1.05); }
.tubeVal { font-size: max(9px, calc(var(--cw) * .2)); line-height: 1; font-weight: 800; letter-spacing: .02em; white-space: nowrap; color: rgba(247, 215, 124, .78); }
.pickStack { align-items: center; }
.miniChip { width: 15px; height: 15px; border-radius: 50%; margin-left: -5px; flex: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: radial-gradient(circle, var(--c) 0 45%, transparent 47%), repeating-conic-gradient(var(--c) 0 30deg, var(--s) 30deg 45deg); }
.miniChip:first-child { margin-left: 0; }
.pickStack small { font-size: 10px; margin-left: 3px; color: var(--muted); }
/* Stack folgt dem Tischrand */
.chips.arc { position: relative; display: block; }
.chips.arc > .ccol { position: absolute; }

/* Zeit-Chips (je +60 s Bedenkzeit) */
.tcI { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; margin-left: -6px; flex: none;
  font: 900 8px/1 system-ui, sans-serif; font-style: normal; color: #1b2a4a;
  background: radial-gradient(circle, #f6f1e3 0 46%, #4cc9f0 47% 52%, #f6f1e3 53% 60%, transparent 61%), repeating-conic-gradient(#f6f1e3 0 30deg, #4cc9f0 30deg 45deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.tcI:first-child { margin-left: 0; }
.tChipBtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(76, 201, 240, .6); background: rgba(76, 201, 240, .14); color: #bfefff;
  border-radius: 999px; padding: 2px 9px 2px 4px; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s; }
.tChipBtn:hover { background: rgba(76, 201, 240, .3); transform: translateY(-1px); }
.tChipBtn:active { transform: translateY(1px); }
.tChipBtn > span { display: inline-flex; align-items: center; }
.tChipInfo { display: inline-flex; align-items: center; opacity: .8; margin-left: auto; }
.barTop > span, .barTop > button { white-space: nowrap; }
.sidePanel .tcI { width: 17px; height: 17px; font-size: 7px; margin-left: -7px; }
.sidePanel .tcI:first-child { margin-left: 0; }
.sidePanel .tChipBtn { padding: 1px 7px 1px 3px; font-size: 11.5px; gap: 4px; }
.pickSum:empty { display: none; }
/* Karten liegen immer über den Chips (Stacks ganz unten, dann Einsätze, dann Karten) */
#seats .stackSpot { z-index: 1; }
#seats .betSpot:not(.slim) { z-index: 2; }
#seats .hole { z-index: 4; }
#seats .hole.mine { z-index: 6; }
