/*
  PokerHafen – zentrale Pokertisch-Layout-Steuerung
  Version 1.22.24

  WICHTIG FÜR SPÄTERE ANPASSUNGEN:
  Positions-, Größen- und Layer-Werte des laufenden Pokertischs werden nur im
  Block "ZENTRALE TISCH-KONFIGURATION" geändert. Alles darunter ist ein
  technischer Binding-Layer, der diese Variablen auf bestehendes Markup bindet
  und ältere app.css-Hotfixes bewusst überschreibt.

  Koordinatensystem:
  - Alle Tisch-Elemente hängen an derselben 16:10 Table Plane.
  - Diese Table Plane wird auf jedem Ausgabegerät proportional in den freien Bildschirmbereich eingepasst.
  - X/Y-Werte sind Prozentwerte dieser Plane, nicht mehr des rohen Browser-Viewports.
  - Dadurch bleiben Seats, Community Cards und Pot auch auf Tablet/Portrait mittig zur Tischgrafik.
  - seat-pos-0 = Seat 1 / Hero unten
  - seat-pos-1 = Seat 2 links unten
  - seat-pos-2 = Seat 3 links oben
  - seat-pos-3 = Seat 4 oben mittig
  - seat-pos-4 = Seat 5 rechts oben
  - seat-pos-5 = Seat 6 rechts unten
*/

/* =========================================================
   ZENTRALE TISCH-KONFIGURATION – NUR HIER NORMAL ANPASSEN
   ========================================================= */
#app.game-root.game-flow .table-stage {
  /* Sicherheits-/Bühnenmaße */
  --table-stage-z: 0;
  --table-wrap-z: 10;
  --table-art-z: 1;
  --table-overlay-z: 2;

  /* Einheitliche 16:10 Table Plane: Bild und Overlay nutzen exakt dieselbe Fläche.
     Für Positionskorrekturen NICHT einzelne Media Queries ändern, sondern die
     Prozentwerte unten innerhalb dieser Plane anpassen. */
  --table-plane-aspect: 1.6;
  /* Kritische Fallbacks bleiben bewusst CSS-2/3-kompatibel: app.js schreibt
     danach exakte Pixelwerte. Keine min()/max()/env() in diesen Basiswerten,
     damit Tablet-Browser die Frame-Höhe nicht komplett verwerfen. */
  --table-plane-margin-left: 4px;
  --table-plane-margin-right: 4px;
  --table-plane-margin-top: 4px;
  --table-plane-margin-bottom: 6px;
  --table-plane-safe-width: calc(100vw - 8px);
  --table-plane-safe-height: calc(var(--app-height, 100vh) - var(--bottom-action-reserve, 128px) - 10px);
  /* Fallback ohne CSS-Level-4-Multiplikation: app.js schreibt die exakten Pixelwerte
     direkt und als Variablen. Diese Werte verhindern, dass ältere Tablet-Browser den
     Frame auf 0px Höhe setzen und dadurch alle Elemente oben übereinander legen. */
  --table-plane-width: calc(100vw - 8px);
  --table-plane-height: 62.5vw;
  --table-plane-left: 4px;
  --table-plane-top: 4px;

  /* Globale Proportionen: skalieren relativ zur Table Plane statt zum rohen Viewport. */
  --table-seat-width: clamp(96px, 14.5vw, 218px);
  --table-card-width: clamp(30px, 4vw, 62px);
  --table-card-height: clamp(43px, 5.68vw, 88px);
  --table-board-card-width: clamp(34px, 4.96vw, 81px);
  --table-board-card-height: clamp(49px, 7.04vw, 115px);
  --table-board-card-scale: clamp(1.14, 1.24, 1.30);
  --table-card-radius: clamp(.44rem, .8vw, .62rem);
  --table-seat-scale: var(--game-density-scale, 1);
  --table-chip-scale: .94;
  --table-chip-pulse-scale: 1.03;

  /* Feintuning v1.22.24: Board/Pot wieder auf die sichtbare Bildschirmmitte.
     Seat 2/3 und Seat 5/6 bleiben innen geführt; Community Cards, Pot und
     zugehörige Hinweise nutzen wieder die zentrale X-Achse der Table-Plane. */
  /* Seats als Mittelpunktkoordinaten. */
  --table-seat-1-x: 50%;
  --table-seat-1-y: 81.2%;
  --table-seat-2-x: 30.0%;
  --table-seat-2-y: 61.5%;
  --table-seat-3-x: 30.0%;
  --table-seat-3-y: 25.0%;
  --table-seat-4-x: 50%;
  --table-seat-4-y: 0.8%;
  --table-seat-5-x: 70.0%;
  --table-seat-5-y: 25.0%;
  --table-seat-6-x: 70.0%;
  --table-seat-6-y: 61.5%;
  --table-seat-z: 38;

  /* Seat-Anker: Seat 4 wird nicht halb aus dem sichtbaren Bereich geschoben. */
  --table-seat-default-anchor-x: -50%;
  --table-seat-default-anchor-y: -50%;
  --table-seat-4-anchor-x: -50%;
  --table-seat-4-anchor-y: -4%;

  /* Community Cards / Board. */
  --table-board-x: 50.0%;
  --table-board-y: 45.0%;
  --table-board-label-y: 45.0%;
  --table-board-z: 62;
  --table-board-gap: clamp(.26rem, .72vw, .58rem);

  /* Pot, Gewinnerhinweise und Status im gleichen Koordinatensystem. */
  --table-pot-x: 50.0%;
  --table-pot-y: 50.0%;
  --table-pot-z: 64;
  --table-winner-hint-x: 50.0%;
  --table-winner-hint-y: 55.8%;
  --table-payout-x: 50.0%;
  --table-payout-y: 60.0%;
  --table-status-x: 50.0%;
  --table-status-y: 63.2%;
  --table-status-z: 58;
  --table-bot-thinking-x: 50%;
  --table-bot-thinking-y: 0.8%;
  --table-bot-thinking-z: 70;

  /* Chipflug-Startpunkte; nahe am jeweiligen Seat, Ziel ist der zentrale Pot. */
  --table-chip-seat-1-x: 50%;
  --table-chip-seat-1-y: 74.0%;
  --table-chip-seat-2-x: 31.2%;
  --table-chip-seat-2-y: 63.6%;
  --table-chip-seat-3-x: 31.2%;
  --table-chip-seat-3-y: 29.5%;
  --table-chip-seat-4-x: 50%;
  --table-chip-seat-4-y: 3.9%;
  --table-chip-seat-5-x: 68.8%;
  --table-chip-seat-5-y: 29.5%;
  --table-chip-seat-6-x: 68.8%;
  --table-chip-seat-6-y: 63.6%;

  /* Analoge Stoppuhr kompakt und viewport-stabil. */
  --table-timer-top: max(8px, env(safe-area-inset-top));
  --table-timer-right: max(8px, env(safe-area-inset-right));
  --table-timer-min-width: clamp(104px, 11vw, 150px);
  --table-timer-max-width: min(160px, 27vw);
  --table-timer-padding: .22rem .30rem .24rem .28rem;
  --table-timer-gap: .20rem;
  --table-timer-radius: .72rem;
  --table-timer-face-size: clamp(32px, 3.15vw, 44px);
  --table-timer-copy-label-size: .40rem;
  --table-timer-copy-value-size: clamp(.66rem, .78vw, .80rem);
  --table-timer-cap-left: 1.05rem;
  --table-timer-cap-width: .56rem;
  --table-timer-cap-height: .20rem;
  --table-timer-cap-top: -.11rem;
  --table-timer-tick-offset: clamp(9px, 1.05vw, 14px);
  --table-timer-status-display: grid;
  --table-timer-status-gap: .12rem;
  --table-timer-status-padding-top: .16rem;
  --table-timer-status-cell-padding: .12rem .18rem;
  --table-timer-status-label-size: .36rem;
  --table-timer-status-value-size: clamp(.46rem, .58vw, .56rem);
  --table-timer-z: 110;

  /* Coach/Fenster müssen immer über Tischgrafik und Overlay liegen. */
  --table-coach-z: 10000;
}

/* Dichteklassen ändern nur generelle Proportionen, keine einzelnen Element-Positionen. */
html[data-game-density="compact"] #app.game-root.game-flow .table-stage {
  --table-seat-width: clamp(108px, 15.2vw, 218px);
  --table-card-width: clamp(31px, 4.2vw, 56px);
  --table-board-card-scale: 1.22;
  --table-timer-status-display: none;
}


/* Geräteklassen ändern keine Einzelpositionen mehr.
   Tablet, Desktop und Smartphone nutzen dieselbe 16:10-Table-Plane; nur die
   Dichte-/Größenwerte darunter dürfen responsiv variieren. */

html[data-game-density="tight"] #app.game-root.game-flow .table-stage,
html[data-game-density="ultra"] #app.game-root.game-flow .table-stage {
  --table-seat-width: clamp(86px, 14.2vw, 148px);
  --table-card-width: clamp(28px, 3.9vw, 43px);
  --table-card-height: clamp(40px, 5.55vw, 61px);
  --table-board-card-width: clamp(33px, 4.6vw, 51px);
  --table-board-card-height: clamp(47px, 6.55vw, 73px);
  --table-board-card-scale: 1.18;
  --table-seat-scale: 1;
  --table-timer-status-display: none;
  --table-timer-min-width: clamp(94px, 26vw, 128px);
  --table-timer-face-size: clamp(30px, 8.3vw, 38px);
  --table-timer-copy-label-size: .34rem;
  --table-timer-copy-value-size: .64rem;
}

/* =========================================================
   BINDINGS – technische Umsetzung, nicht für normale Layoutkorrekturen
   ========================================================= */
#app.game-root.game-flow > .table-stage {
  --seat-w: var(--table-seat-width) !important;
  --card-w: var(--table-card-width) !important;
  --card-h: var(--table-card-height) !important;
  z-index: var(--table-stage-z) !important;
}

#app.game-root.game-flow .poker-table-wrap,
#app.game-root.game-flow.singleplayer-flow .poker-table-wrap {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: var(--app-height, 100vh) !important;
  max-height: var(--app-height, 100vh) !important;
  display: block !important;
  overflow: hidden !important;
  z-index: var(--table-wrap-z) !important;
}

/*
  STABILE TABLE-PLANE:
  Der echte .poker-table ist selbst die einzige Koordinatenfläche.
  Es gibt keinen zusätzlichen Frame mehr, der auf manchen Tablets kollabieren kann.
  app.js schreibt dieselben Pixelwerte zusätzlich inline auf dieses Element.
*/
#app.game-root.game-flow .poker-table[data-table-plane-frame],
#app.game-root.game-flow.singleplayer-flow .poker-table[data-table-plane-frame] {
  position: absolute !important;
  left: var(--table-plane-left, 4px) !important;
  top: var(--table-plane-top, 4px) !important;
  width: var(--table-plane-width, calc(100vw - 8px)) !important;
  height: var(--table-plane-height, 62.5vw) !important;
  min-width: 280px !important;
  min-height: 180px !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  aspect-ratio: 16 / 10 !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(28, 64, 45, .46), transparent 36%),
    linear-gradient(135deg, #07130f 0%, #0b1712 48%, #050807 100%) !important;
  z-index: var(--table-wrap-z) !important;
  transform: translateZ(0) !important;
  transform-origin: center center !important;
  contain: layout style !important;
}

#app.game-root.game-flow .table-plane-frame,
#app.game-root.game-flow.singleplayer-flow .table-plane-frame {
  /* Legacy-Fallback, falls ein alter Browser noch gecachtes Markup besitzt. */
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  z-index: var(--table-wrap-z) !important;
}

#app.game-root.game-flow .poker-table-art,
#app.game-root.game-flow.singleplayer-flow .poker-table-art {
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  object-fit: fill !important;
  object-position: center center !important;
  z-index: var(--table-art-z) !important;
  pointer-events: none !important;
  user-select: none !important;
}

#app.game-root.game-flow .table-overlay-layer,
#app.game-root.game-flow.singleplayer-flow .table-overlay-layer {
  --board-center-x: var(--table-board-x) !important;
  --board-center-y: var(--table-board-y) !important;
  --pot-target-x: var(--table-pot-x) !important;
  --pot-target-y: var(--table-pot-y) !important;
  --sp-board-center-y: var(--table-board-y) !important;
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  right: auto !important;
  top: 0 !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
  z-index: var(--table-overlay-z) !important;
  isolation: isolate !important;
}

#app.game-root.game-flow.singleplayer-flow .table-stage {
  --sp-board-center-y: var(--table-board-y) !important;
}

#app.game-root.game-flow .poker-table[data-table-plane-frame][data-plane-ready="1"],
#app.game-root.game-flow.singleplayer-flow .poker-table[data-table-plane-frame][data-plane-ready="1"],
#app.game-root.game-flow .table-plane-frame[data-plane-ready="1"],
#app.game-root.game-flow.singleplayer-flow .table-plane-frame[data-plane-ready="1"] {
  /* Wird von app.js gesetzt, sobald echte Pixelmaße bekannt sind. */
  min-height: 220px !important;
}

#app.game-root.game-flow .poker-table[data-table-plane-frame][data-direct-locks="1"] .seat-card,
#app.game-root.game-flow .poker-table[data-table-plane-frame][data-direct-locks="1"] .community-cards,
#app.game-root.game-flow .poker-table[data-table-plane-frame][data-direct-locks="1"] .pot-stack,
#app.game-root.game-flow .poker-table[data-table-plane-frame][data-direct-locks="1"] .table-status-ribbon,
#app.game-root.game-flow .table-plane-frame[data-direct-locks="1"] .seat-card,
#app.game-root.game-flow .table-plane-frame[data-direct-locks="1"] .community-cards,
#app.game-root.game-flow .table-plane-frame[data-direct-locks="1"] .pot-stack,
#app.game-root.game-flow .table-plane-frame[data-direct-locks="1"] .table-status-ribbon {
  /* Notfall-Absicherung: app.js schreibt zusätzlich direkte Pixelkoordinaten auf diese Elemente. */
  will-change: left, top, transform;
}

#app.game-root.game-flow .community-zone,
#app.game-root.game-flow.singleplayer-flow .community-zone {
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  display: block !important;
  transform: none !important;
  z-index: var(--table-board-z) !important;
  pointer-events: none !important;
}

#app.game-root.game-flow .community-zone,
#app.game-root.game-flow .community-zone .zone-label,
#app.game-root.game-flow .community-cards,
#app.game-root.game-flow .pot-stack,
#app.game-root.game-flow.singleplayer-flow .community-zone,
#app.game-root.game-flow.singleplayer-flow .community-zone .zone-label,
#app.game-root.game-flow.singleplayer-flow .community-cards,
#app.game-root.game-flow.singleplayer-flow .pot-stack {
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

#app.game-root.game-flow .community-zone .zone-label,
#app.game-root.game-flow.singleplayer-flow .community-zone .zone-label {
  position: absolute !important;
  left: var(--table-board-x) !important;
  top: var(--table-board-label-y) !important;
  transform: translate(-50%, -50%) !important;
  z-index: calc(var(--table-board-z) + 1) !important;
  pointer-events: none !important;
}

#app.game-root.game-flow .community-cards,
#app.game-root.game-flow.singleplayer-flow .community-cards {
  position: absolute !important;
  left: var(--table-board-x) !important;
  top: var(--table-board-y) !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
  gap: var(--table-board-gap) !important;
  z-index: calc(var(--table-board-z) + 2) !important;
  pointer-events: none !important;
  display: flex !important;
}

#app.game-root.game-flow .community-cards .playing-card,
#app.game-root.game-flow.singleplayer-flow .community-cards .playing-card {
  width: var(--table-board-card-width) !important;
  height: var(--table-board-card-height) !important;
  border-radius: var(--table-card-radius) !important;
}

#app.game-root.game-flow .seat-cards .playing-card,
#app.game-root.game-flow.singleplayer-flow .seat-cards .playing-card {
  width: var(--card-w) !important;
  height: var(--card-h) !important;
  border-radius: var(--table-card-radius) !important;
}

#app.game-root.game-flow .pot-stack,
#app.game-root.game-flow.singleplayer-flow .pot-stack {
  position: absolute !important;
  left: var(--table-pot-x) !important;
  top: var(--table-pot-y) !important;
  transform: translate(-50%, -50%) scale(var(--table-chip-scale)) !important;
  transform-origin: center center !important;
  z-index: var(--table-pot-z) !important;
  pointer-events: none !important;
  display: inline-flex !important;
}

#app.game-root.game-flow .pot-stack.pulse,
#app.game-root.game-flow.singleplayer-flow .pot-stack.pulse {
  animation: tableLayoutPotPulse .5s ease !important;
}

@keyframes tableLayoutPotPulse {
  0% { transform: translate(-50%, -50%) scale(var(--table-chip-scale)); box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.3); }
  45% { transform: translate(-50%, -50%) scale(var(--table-chip-pulse-scale)); box-shadow: 0 0 2rem rgba(246,200,95,.55); }
  100% { transform: translate(-50%, -50%) scale(var(--table-chip-scale)); box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.3); }
}

#app.game-root.game-flow .winner-table-hint,
#app.game-root.game-flow.singleplayer-flow .winner-table-hint {
  position: absolute !important;
  left: var(--table-winner-hint-x) !important;
  top: var(--table-winner-hint-y) !important;
  transform: translate(-50%, -50%) !important;
  z-index: calc(var(--table-pot-z) + 1) !important;
  pointer-events: none !important;
}

#app.game-root.game-flow .showdown-payout-strip,
#app.game-root.game-flow.singleplayer-flow .showdown-payout-strip {
  position: absolute !important;
  left: var(--table-payout-x) !important;
  top: var(--table-payout-y) !important;
  transform: translate(-50%, -50%) !important;
  z-index: calc(var(--table-pot-z) + 1) !important;
  pointer-events: none !important;
}

#app.game-root.game-flow .table-status-ribbon,
#app.game-root.game-flow.singleplayer-flow .table-status-ribbon {
  position: absolute !important;
  left: var(--table-status-x) !important;
  top: var(--table-status-y) !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  z-index: var(--table-status-z) !important;
}

#app.game-root.game-flow .bot-thinking-pill,
#app.game-root.game-flow.singleplayer-flow .bot-thinking-pill {
  left: var(--table-bot-thinking-x) !important;
  top: var(--table-bot-thinking-y) !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  z-index: var(--table-bot-thinking-z) !important;
}

#app.game-root.game-flow .seat-card,
#app.game-root.game-flow.singleplayer-flow .seat-card {
  position: absolute !important;
  width: var(--seat-w) !important;
  min-width: min(var(--seat-w), calc(100vw - 24px)) !important;
  z-index: var(--table-seat-z) !important;
}

#app.game-root.game-flow .seat-pos-0,
#app.game-root.game-flow .seat-pos-1,
#app.game-root.game-flow .seat-pos-2,
#app.game-root.game-flow .seat-pos-3,
#app.game-root.game-flow .seat-pos-4,
#app.game-root.game-flow .seat-pos-5 {
  right: auto !important;
  bottom: auto !important;
  transform: translate(var(--table-seat-default-anchor-x), var(--table-seat-default-anchor-y)) scale(var(--table-seat-scale)) !important;
  transform-origin: center center !important;
}

#app.game-root.game-flow .seat-pos-0 { left: var(--table-seat-1-x) !important; top: var(--table-seat-1-y) !important; }
#app.game-root.game-flow .seat-pos-1 { left: var(--table-seat-2-x) !important; top: var(--table-seat-2-y) !important; }
#app.game-root.game-flow .seat-pos-2 { left: var(--table-seat-3-x) !important; top: var(--table-seat-3-y) !important; }
#app.game-root.game-flow .seat-pos-3,
#app.game-root.game-flow .seat-visible-4 {
  left: var(--table-seat-4-x) !important;
  top: var(--table-seat-4-y) !important;
  transform: translate(var(--table-seat-4-anchor-x), var(--table-seat-4-anchor-y)) scale(var(--table-seat-scale)) !important;
}
#app.game-root.game-flow .seat-pos-4 { left: var(--table-seat-5-x) !important; top: var(--table-seat-5-y) !important; }
#app.game-root.game-flow .seat-pos-5 { left: var(--table-seat-6-x) !important; top: var(--table-seat-6-y) !important; }

#app.game-root.game-flow .chip-flight.seat-0 { --sx: var(--table-chip-seat-1-x) !important; --sy: var(--table-chip-seat-1-y) !important; }
#app.game-root.game-flow .chip-flight.seat-1 { --sx: var(--table-chip-seat-2-x) !important; --sy: var(--table-chip-seat-2-y) !important; }
#app.game-root.game-flow .chip-flight.seat-2 { --sx: var(--table-chip-seat-3-x) !important; --sy: var(--table-chip-seat-3-y) !important; }
#app.game-root.game-flow .chip-flight.seat-3 { --sx: var(--table-chip-seat-4-x) !important; --sy: var(--table-chip-seat-4-y) !important; }
#app.game-root.game-flow .chip-flight.seat-4 { --sx: var(--table-chip-seat-5-x) !important; --sy: var(--table-chip-seat-5-y) !important; }
#app.game-root.game-flow .chip-flight.seat-5 { --sx: var(--table-chip-seat-6-x) !important; --sy: var(--table-chip-seat-6-y) !important; }

@keyframes flyToPot {
  0% { left: var(--sx); top: var(--sy); opacity: 0; transform: translate(-50%, -50%) scale(.75); }
  12% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: var(--table-pot-x); top: var(--table-pot-y); opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes flyToPotSingleplayer {
  0% { left: var(--sx); top: var(--sy); opacity: 0; transform: translate(-50%, -50%) scale(.74) rotate(-10deg); }
  14% { opacity: 1; }
  68% { opacity: 1; }
  100% { left: var(--table-pot-x); top: var(--table-pot-y); opacity: 0; transform: translate(-50%, -50%) scale(1.08) rotate(4deg); }
}

#app.game-root.game-flow .analog-turn-timer,
#app.game-root.game-flow.singleplayer-flow .analog-turn-timer {
  top: var(--table-timer-top) !important;
  right: var(--table-timer-right) !important;
  z-index: var(--table-timer-z) !important;
  min-width: var(--table-timer-min-width) !important;
  max-width: var(--table-timer-max-width) !important;
  grid-template-columns: auto minmax(48px, 1fr) !important;
  gap: var(--table-timer-gap) !important;
  padding: var(--table-timer-padding) !important;
  border-radius: var(--table-timer-radius) !important;
}

#app.game-root.game-flow .analog-stopwatch-cap,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-cap {
  left: var(--table-timer-cap-left) !important;
  width: var(--table-timer-cap-width) !important;
  height: var(--table-timer-cap-height) !important;
  top: var(--table-timer-cap-top) !important;
}

#app.game-root.game-flow .analog-stopwatch-face,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-face {
  width: var(--table-timer-face-size) !important;
  height: var(--table-timer-face-size) !important;
  border-width: 1px !important;
  box-shadow:
    inset 0 0 0 .16rem rgba(0,0,0,.35),
    inset 0 0 .72rem rgba(246,200,95,.12),
    0 .36rem .78rem rgba(0,0,0,.32),
    0 0 .8rem rgba(246,200,95,.12) !important;
}

#app.game-root.game-flow .analog-stopwatch-face::before,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-face::before {
  inset: .34rem !important;
}

#app.game-root.game-flow .analog-stopwatch-face .tick,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-face .tick {
  width: .09rem !important;
  height: .27rem !important;
  transform-origin: center center !important;
}

#app.game-root.game-flow .tick-0,
#app.game-root.game-flow.singleplayer-flow .tick-0 { transform: translate(-50%, calc(-50% - var(--table-timer-tick-offset))) !important; }
#app.game-root.game-flow .tick-15,
#app.game-root.game-flow.singleplayer-flow .tick-15 { transform: translate(calc(-50% + var(--table-timer-tick-offset)), -50%) rotate(90deg) !important; }
#app.game-root.game-flow .tick-30,
#app.game-root.game-flow.singleplayer-flow .tick-30 { transform: translate(-50%, calc(-50% + var(--table-timer-tick-offset))) !important; }
#app.game-root.game-flow .tick-45,
#app.game-root.game-flow.singleplayer-flow .tick-45 { transform: translate(calc(-50% - var(--table-timer-tick-offset)), -50%) rotate(90deg) !important; }

#app.game-root.game-flow .stopwatch-needle,
#app.game-root.game-flow.singleplayer-flow .stopwatch-needle {
  width: .1rem !important;
  height: 35% !important;
}

#app.game-root.game-flow .stopwatch-center,
#app.game-root.game-flow.singleplayer-flow .stopwatch-center {
  width: .36rem !important;
  height: .36rem !important;
}

#app.game-root.game-flow .analog-stopwatch-copy,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-copy {
  gap: .02rem !important;
}

#app.game-root.game-flow .analog-stopwatch-copy span,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-copy span {
  font-size: var(--table-timer-copy-label-size) !important;
  letter-spacing: .055em !important;
}

#app.game-root.game-flow .analog-stopwatch-copy strong,
#app.game-root.game-flow.singleplayer-flow .analog-stopwatch-copy strong {
  font-size: var(--table-timer-copy-value-size) !important;
}

#app.game-root.game-flow .timer-status-under,
#app.game-root.game-flow.singleplayer-flow .timer-status-under {
  display: var(--table-timer-status-display) !important;
  gap: var(--table-timer-status-gap) !important;
  margin-top: .04rem !important;
  padding-top: var(--table-timer-status-padding-top) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#app.game-root.game-flow .timer-status-under div,
#app.game-root.game-flow.singleplayer-flow .timer-status-under div {
  padding: var(--table-timer-status-cell-padding) !important;
  border-radius: .42rem !important;
}

#app.game-root.game-flow .timer-status-under span,
#app.game-root.game-flow.singleplayer-flow .timer-status-under span {
  font-size: var(--table-timer-status-label-size) !important;
  letter-spacing: .045em !important;
}

#app.game-root.game-flow .timer-status-under strong,
#app.game-root.game-flow.singleplayer-flow .timer-status-under strong {
  margin-top: .02rem !important;
  font-size: var(--table-timer-status-value-size) !important;
  line-height: 1 !important;
}

#app.game-root.game-flow > .table-stage > .singleplayer-coach-window,
#app.game-root.game-flow .singleplayer-coach-window,
#app.game-root.game-flow.singleplayer-flow .singleplayer-coach-window {
  position: fixed !important;
  z-index: var(--table-coach-z) !important;
  pointer-events: auto !important;
  transform: translateZ(0) !important;
  isolation: isolate !important;
}


/* Finale Kollaps-Sicherung v1.22.24: keine Spielflächen-Kinder dürfen in normaler Dokumentenreihenfolge oben stapeln. */
#app.game-root.game-flow .poker-table[data-table-plane-frame] > .table-overlay-layer > .seat-card,
#app.game-root.game-flow .poker-table[data-table-plane-frame] .community-cards,
#app.game-root.game-flow .poker-table[data-table-plane-frame] .pot-stack,
#app.game-root.game-flow .poker-table[data-table-plane-frame] .table-status-ribbon {
  position: absolute !important;
  right: auto !important;
  bottom: auto !important;
}

#app.game-root.game-flow .poker-table[data-table-plane-frame] .table-overlay-layer {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
}


/* =========================================================
   HARTE SICHTBARKEITS-KORREKTUR v1.22.24
   ---------------------------------------------------------
   Diese End-Overrides duplizieren die zentralen Werte ganz am Dateiende,
   damit alte Fallback-/Media-Query-Blöcke die neue Tischzentrierung nicht
   wieder überschreiben können. Die gleichen Werte stehen in app.js als
   direkte Pixel-Locks.
   ========================================================= */
#app.game-root.game-flow .table-stage,
#app.game-root.game-flow.singleplayer-flow .table-stage {
  --table-seat-2-x: 30.0% !important;
  --table-seat-2-y: 61.5% !important;
  --table-seat-3-x: 30.0% !important;
  --table-seat-3-y: 25.0% !important;
  --table-seat-4-y: 0.8% !important;
  --table-seat-4-anchor-y: -4% !important;
  --table-seat-5-x: 70.0% !important;
  --table-seat-5-y: 25.0% !important;
  --table-seat-6-x: 70.0% !important;
  --table-seat-6-y: 61.5% !important;
  --table-board-x: 50.0% !important;
  --table-board-y: 45.0% !important;
  --table-board-label-y: 45.0% !important;
  --table-pot-x: 50.0% !important;
  --table-pot-y: 50.0% !important;
  --table-winner-hint-x: 50.0% !important;
  --table-winner-hint-y: 55.8% !important;
  --table-payout-x: 50.0% !important;
  --table-payout-y: 60.0% !important;
  --table-status-x: 50.0% !important;
  --table-status-y: 63.2% !important;
  --table-bot-thinking-y: 0.8% !important;
  --table-chip-seat-2-x: 31.2% !important;
  --table-chip-seat-2-y: 63.6% !important;
  --table-chip-seat-3-x: 31.2% !important;
  --table-chip-seat-3-y: 29.5% !important;
  --table-chip-seat-4-y: 3.9% !important;
  --table-chip-seat-5-x: 68.8% !important;
  --table-chip-seat-5-y: 29.5% !important;
  --table-chip-seat-6-x: 68.8% !important;
  --table-chip-seat-6-y: 63.6% !important;
}

#app.game-root.game-flow .seat-pos-1,
#app.game-root.game-flow.singleplayer-flow .seat-pos-1 { left: var(--table-seat-2-x) !important; top: var(--table-seat-2-y) !important; right: auto !important; bottom: auto !important; }
#app.game-root.game-flow .seat-pos-2,
#app.game-root.game-flow.singleplayer-flow .seat-pos-2 { left: var(--table-seat-3-x) !important; top: var(--table-seat-3-y) !important; right: auto !important; bottom: auto !important; }
#app.game-root.game-flow .seat-pos-3,
#app.game-root.game-flow .seat-visible-4,
#app.game-root.game-flow.singleplayer-flow .seat-pos-3,
#app.game-root.game-flow.singleplayer-flow .seat-visible-4 { top: var(--table-seat-4-y) !important; }
#app.game-root.game-flow .seat-pos-4,
#app.game-root.game-flow.singleplayer-flow .seat-pos-4 { left: var(--table-seat-5-x) !important; top: var(--table-seat-5-y) !important; right: auto !important; bottom: auto !important; }
#app.game-root.game-flow .seat-pos-5,
#app.game-root.game-flow.singleplayer-flow .seat-pos-5 { left: var(--table-seat-6-x) !important; top: var(--table-seat-6-y) !important; right: auto !important; bottom: auto !important; }
#app.game-root.game-flow .community-zone .zone-label,
#app.game-root.game-flow.singleplayer-flow .community-zone .zone-label { left: var(--table-board-x) !important; top: var(--table-board-label-y) !important; }
#app.game-root.game-flow .community-cards,
#app.game-root.game-flow.singleplayer-flow .community-cards { left: var(--table-board-x) !important; top: var(--table-board-y) !important; }
#app.game-root.game-flow .pot-stack,
#app.game-root.game-flow.singleplayer-flow .pot-stack { left: var(--table-pot-x) !important; top: var(--table-pot-y) !important; }

/* =========================================================
   PokerHafen v1.22.24 – robuste mittige Board-/Pot-Zone
   ---------------------------------------------------------
   Board und Pot werden wieder als eine gemeinsame, mittig
   verankerte Zone behandelt. Die Kindelemente werden nicht
   mehr einzeln gegen eine ggf. verschobene Unter-Zone gelockt;
   dadurch können sie nicht mehr in die linke untere Ecke fallen.
   ========================================================= */
#app.game-root.game-flow .table-stage,
#app.game-root.game-flow.singleplayer-flow .table-stage {
  --table-board-x: 50.0% !important;
  --table-board-y: 45.0% !important;
  --table-board-label-y: 45.0% !important;
  --table-pot-x: 50.0% !important;
  --table-pot-y: 50.0% !important;
}

#app.game-root.game-flow .poker-table[data-table-plane-frame] .community-zone,
#app.game-root.game-flow.singleplayer-flow .poker-table[data-table-plane-frame] .community-zone,
#app.game-root.game-flow .table-overlay-layer > .community-zone,
#app.game-root.game-flow.singleplayer-flow .table-overlay-layer > .community-zone {
  position: absolute !important;
  inset: auto !important;
  left: var(--table-board-x) !important;
  top: var(--table-board-y) !important;
  right: auto !important;
  bottom: auto !important;
  width: min(620px, 66vw) !important;
  max-width: 78% !important;
  height: auto !important;
  min-width: min(280px, 92%) !important;
  display: grid !important;
  justify-items: center !important;
  align-items: center !important;
  gap: var(--table-board-gap) !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
  z-index: var(--table-board-z) !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

#app.game-root.game-flow .community-zone .zone-label,
#app.game-root.game-flow.singleplayer-flow .community-zone .zone-label,
#app.game-root.game-flow .community-zone .community-cards,
#app.game-root.game-flow.singleplayer-flow .community-zone .community-cards,
#app.game-root.game-flow .community-zone .pot-stack,
#app.game-root.game-flow.singleplayer-flow .community-zone .pot-stack,
#app.game-root.game-flow .community-zone .winner-table-hint,
#app.game-root.game-flow.singleplayer-flow .community-zone .winner-table-hint,
#app.game-root.game-flow .community-zone .showdown-payout-strip,
#app.game-root.game-flow.singleplayer-flow .community-zone .showdown-payout-strip {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
}

#app.game-root.game-flow .community-zone .zone-label,
#app.game-root.game-flow.singleplayer-flow .community-zone .zone-label {
  z-index: calc(var(--table-board-z) + 1) !important;
  text-align: center !important;
}

#app.game-root.game-flow .community-zone .community-cards,
#app.game-root.game-flow.singleplayer-flow .community-zone .community-cards {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: var(--table-board-gap) !important;
  z-index: calc(var(--table-board-z) + 2) !important;
}

#app.game-root.game-flow .community-zone .pot-stack,
#app.game-root.game-flow.singleplayer-flow .community-zone .pot-stack {
  display: inline-flex !important;
  transform: scale(var(--table-chip-scale, .94)) !important;
  transform-origin: center center !important;
  z-index: var(--table-pot-z) !important;
}

@keyframes tableLayoutPotPulse {
  0% { transform: scale(var(--table-chip-scale, .94)); box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.3); }
  45% { transform: scale(var(--table-chip-pulse-scale, 1.03)); box-shadow: 0 0 2rem rgba(246,200,95,.55); }
  100% { transform: scale(var(--table-chip-scale, .94)); box-shadow: 0 .8rem 1.5rem rgba(0,0,0,.3); }
}
