/* Sprechblasen, fliegende Chips, Animationen */
.hand, .seat { position: relative; }
.bubble { position: absolute; left: 50%; top: -14px; z-index: 4; padding: 5px 12px; border-radius: 999px; background: #fff; color: #111; font-weight: 900; font-size: 14px; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 16px #0007; pointer-events: none; animation: bubble 1.6s cubic-bezier(.2,.8,.3,1) both; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.bubble.good { background: #22a55b; color: #fff; }
.bubble.bad { background: #d33a3a; color: #fff; }
.bubble.hot { background: #ffd34d; color: #111; }
.seat .bubble { top: -10px; padding: 3px 8px; font-size: 11px; }
@keyframes bubble {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.6); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  20% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}
.badge.win, .badge.bj, .badge.push, .badge.lose, .badge.bust { animation: pop .45s ease; }
.seat.active, .hand.active { animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px #ffffff26; } }
.chip.fly { position: fixed; width: 24px; height: 24px; border-width: 3px; font-size: 0; pointer-events: none; z-index: 30; }
.pk-log { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 46px; font-size: 12px; color: var(--muted); }
.pk-log div:first-child { color: var(--text); font-weight: 700; }
.pk-log div:nth-child(3) { opacity: .5; }
/* Seitenwechsel */
::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .3s cubic-bezier(.22,1,.36,1) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .bubble { animation: none !important; }
}

/* Emotes und Kurznachrichten */
.chatpad { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(448px, calc(100% - 32px)); z-index: 25; padding: 10px; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 6px 6px 0 #000; display: flex; flex-direction: column; gap: 8px; animation: padin .25s cubic-bezier(.3,1.5,.5,1); }
@keyframes padin { from { transform: translate(-50%, 16px) scale(.96); opacity: 0; } }
.emotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.emotes button { height: 44px; font-size: 24px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .15s cubic-bezier(.3,1.6,.5,1); }
.emotes button:active { transform: scale(1.25) rotate(-8deg); }
.quick { display: flex; flex-wrap: wrap; gap: 4px; }
.quick button { padding: 8px 10px; border: 1px solid var(--line-strong); background: none; color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.quick button:active { background: #fff; color: #0b0b0c; }
.bubble.emote, [data-theme="studio"] .bubble.emote { background: none; font-size: 30px; padding: 0; letter-spacing: 0; text-transform: none; }
.seat .bubble.emote { font-size: 24px; }
.pop.emote { background: none; box-shadow: none; font-size: 40px; }

/* Pulsieren nur über opacity (läuft auf der Grafikkarte, kein Neuzeichnen wie bei box-shadow) */
@keyframes pulse { 50% { opacity: .72; } }
@keyframes glowfade { 50% { opacity: 1; } }

/* Zug-Timer: Rahmen um die eigenen Karten, läuft im Uhrzeigersinn ab */
.turnring { position: absolute; inset: -6px; z-index: 3; pointer-events: none; }
.turnring[hidden] { display: none; }
.turnring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.turnring path { fill: none; stroke: var(--accent); stroke-width: 3px; stroke-linecap: butt; }
.turnring.late path { stroke: var(--bad); }
/* Pause zwischen Runden */
.roundpause { box-sizing: border-box; width: min(300px, 100%); margin: 0 auto 10px; padding: 8px 12px 10px; background: var(--bg); border: 1px solid var(--line-strong); text-align: center; pointer-events: none; }
.roundpause[hidden] { display: none; }
.roundpause span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.roundpause i { display: block; height: 3px; margin-top: 6px; background: var(--accent); transform-origin: left; will-change: transform; transition: transform .1s linear; }
/* Restsekunden am Zug-Rahmen, ab 5 s rot */
.turnring b { position: absolute; top: 0; right: 0; min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center;
  background: var(--accent); color: #0b0b0c; font-family: var(--mono); font-size: 15px; font-weight: 700; }
.turnring.late b { background: var(--bad); color: #fff; }
/* Zurück während einer Runde: Knopf sieht gesperrt aus, tippen erklärt warum */
.iconbtn.busy { opacity: .4; }
