/* River — styles exclusivement dédiés aux mains.
   Les sièges utilisent les coordonnées de l’assistant ; la table devient verticale
   sur téléphone afin de conserver dix joueurs sans réduire le texte à l’excès. */
.hand-wizard .poker-table-wrap {
  max-width: 1050px;
  margin: 0 auto 18px;
  isolation: isolate;
}
.hand-wizard .poker-table-scene {
  position: relative;
  width: 100%;
  min-height: 570px;
  height: clamp(570px, 48vw, 630px);
  border-radius: 18px;
  background: radial-gradient(ellipse at center, #1b1011 0, #150c0d 65%, #120a0c 100%);
  overflow: hidden;
}
.hand-wizard .poker-felt {
  position: absolute;
  inset: 17% 9%;
  border: 12px solid #2b1a1d;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 35%, #25433a, #18352c 55%, #132a24);
  box-shadow: inset 0 0 0 2px #88535c, inset 0 0 0 5px #241618, inset 0 0 50px #0008, 0 0 0 2px #110a0b, 0 18px 35px #0009;
}
.hand-wizard .poker-felt::after {
  content: '';
  position: absolute;
  inset: 13px;
  border: 1px solid #9f7d8330;
  border-radius: inherit;
  pointer-events: none;
}
.hand-wizard .table-center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}
.hand-wizard .table-potlabel {
  font-size:12px;
  line-height: 1.2;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #baa2a6;
}
.hand-wizard .table-pot-value {
  color: #e8f4ec;
  font-size: clamp(23px, 2.5vw, 31px);
  letter-spacing: -.6px;
  line-height: 1.2;
}
.hand-wizard .table-street {
  color: #d5c3c6;
  font-size:12px;
  letter-spacing: .5px;
}
.hand-wizard .table-board {
  margin-top: 6px;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
}
.hand-wizard .table-board .poker-card {
  width: 36px;
  height: 51px;
  border: 1px solid #dedde2;
  font-size: 18px;
  box-shadow: 0 2px 6px #0003;
}
.hand-wizard .table-seat {
  position: absolute;
  z-index: 2;
  left: var(--seat-x, 50%);
  top: var(--seat-y, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 112px;
  min-height: 116px;
  padding: 9px 7px;
  background: linear-gradient(#2a1a1b, #1d1112);
  border: 1px solid #61494b;
  border-radius: 12px;
  color: #eeeaf0;
  box-shadow: 0 6px 15px #0007;
  text-align: center;
  overflow: visible;
  transition: opacity .2s, border-color .2s, box-shadow .2s;
}
.hand-wizard .table-seat:not(:disabled):hover {
  border-color: #b17982;
  background: linear-gradient(#2e1c1f, #221517);
}
.hand-wizard .table-seat:focus-visible {
  outline: 3px solid #ffe3a8;
  outline-offset: 4px;
}
.hand-wizard .table-seat.acting {
  border-color: #f2c772;
  background: linear-gradient(#4a3a24, #26181a);
  outline: 2px solid #f2c772;
  outline-offset: 2px;
  box-shadow: 0 6px 15px #0009;
}
.hand-wizard .table-seat.hero-seat:not(.acting) {
  border-color: #f07882;
  box-shadow: 0 0 0 1px #9b4b59, 0 6px 15px #0007;
}
.hand-wizard .table-seat.folded {
  opacity: .46;
  border-style: dashed;
}
.hand-wizard .table-seat.all-in .seat-status {
  color: #ffd68a;
}
.hand-wizard .seat-position {
  display: flex;
  justify-content: center;
  gap: 4px;
  color: #f3edf2;
  font-size:12px;
  font-weight: 700;
  line-height: 1.2;
}
.hand-wizard .seat-position strong { font-size: inherit; }
.hand-wizard .seat-status {
  min-height: 11px;
  color: #b7a8aa;
  font-size:12px;
  line-height: 1.2;
}
.hand-wizard .acting .seat-status { color: #ffe0a5; }
.hand-wizard .seat-hole {
  justify-content: center;
  gap: 3px;
  min-height: 31px;
}
.hand-wizard .seat-hole .poker-card {
  width: 23px;
  height: 31px;
  font-size: 12px;
  border-radius: 3px;
}
.hand-wizard .seat-stack {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #e5dcde;
  font-size:12px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.hand-wizard .seat-wager {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 140px;
  padding: 3px 6px;
  background: #170d0e;
  border: 1px solid #7f6a6e;
  border-radius: 20px;
  color: #ecf7ee;
  font-size:12px;
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hand-wizard .seat-wager::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px dashed #f4e6cf;
  background: #a84e5d;
  flex: 0 0 auto;
}
.hand-wizard .seat-wager:empty { display: none; }
.hand-wizard .dealer-button {
  position: absolute;
  top: -10px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: #e8dedf;
  border: 2px solid #a9999a;
  border-radius: 50%;
  color: #2c1b1d;
  font-size:12px;
  font-weight: 800;
  box-shadow: 0 2px 6px #0006;
}
.hand-wizard .table-statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  margin: 0 0 12px;
  color: #c6b9bb;
  font-size:12px;
}
.hand-wizard .table-statusbar strong { color: #ebf0ed; }
.hand-wizard .table-help {
  margin: 10px 0 0;
  color: #b2a2a4;
  font-size:12px;
  line-height: 1.7;
  text-align: center;
}
.hand-wizard .hand-action-panel {
  padding: 18px 20px;
  border: 1px solid #4c2e33;
  border-radius: 12px;
  background: #1e1214;
  margin-top: 16px;
}
.hand-wizard .hand-action-panel h3 {
  margin-bottom: 12px;
  color: #f0e7e8;
  font-size: 15px;
}
.hand-wizard .table-action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.hand-wizard .table-action-buttons button {
  min-width: 120px;
  padding: 13px 20px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.hand-wizard .table-action-buttons .danger {
  color: #ffafb7;
  background: #2b1a1d;
  border: 1px solid #683e45;
}
@media(hover:hover){.hand-wizard .table-action-buttons .danger:hover { background: #43252a; }}
.hand-wizard .table-results {
  margin-top: 20px;
  padding: 20px;
  background: #1b1011;
  border: 1px solid #4c2e33;
  border-radius: 10px;
}
.hand-wizard .table-results h3 { font-size: 14px; }
.hand-wizard .player-result {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #3f2729;
  font-size:12px;
}
.hand-wizard .player-result:last-child { border-bottom: 0; }
.hand-wizard .player-result strong { font-size: 13px; }
.hand-wizard .player-result small { font-size:12px; }
/* La collecte reste une simple animation visuelle : le moteur calcule le pot. */
.hand-wizard .collecting .seat-wager {
  animation: river-collect-chips .55s ease-in both;
}
@keyframes river-collect-chips {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  85% { opacity: .8; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--collect-x, 0px)), var(--collect-y, -30px)) scale(.25); }
}
.hand-wizard .collecting .table-pot-value { animation: river-pot-pulse .6s ease-out both; }
@keyframes river-pot-pulse {
  0%, 100% { transform: scale(1); }
  55% { transform: scale(1.09); color: #fff2c5; }
}
/* La fenêtre d’action permet toujours une saisie libre, avant les raccourcis. */
#handActionDialog.hand-action-dialog {
  width: min(560px, 96vw);
  max-height: 94vh;
  padding: 24px;
  background: #1d1112;
  border: 1px solid #6e424a;
  border-radius: 12px;
}
#handActionDialog .modal-head h2 { font-size: 19px; }
#handActionDialog .modal-head p { margin: 5px 0 0; color: #b4a4a6; font-size:12px; }
#handActionDialog form { display: block; }
#handActionDialog label { margin-top: 15px; }
#handActionDialog input[type=number] { padding: 12px; font-size: 15px; }
#handActionDialog .quick-bets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 15px;
}
#handActionDialog .quick-bets button {
  padding: 7px 12px;
  border: 1px solid #654c50;
  border-radius: 5px;
  background: #2c1b1e;
  color: #e7d7da;
  font-size:12px;
}
#handActionDialog .quick-bets button:disabled { opacity: .35; }
#handActionDialog .action-error:not(:empty) {
  padding: 10px 12px;
  margin-top: 15px;
  border: 1px solid #964e5a;
  border-radius: 6px;
  background: #2f1d20;
  color: #ffc1c8;
  font-size:12px;
}
#handActionDialog .opponent-cards { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 17px; }
#handActionDialog .opponent-cards .playing-cards { margin-right: auto; }
#handActionDialog .modal-actions { flex-wrap: wrap; }
#handActionDialog .fine-print { margin-top: 8px; }
/* Deux couleurs pour les cartes de la table et du sélecteur, sans toucher les autres pages. */
.hand-wizard .river-playing-card.red,
#handActionDialog .river-playing-card.red,
#handCardPicker.river-card-picker .river-playing-card.red,
#handCardPicker.river-card-picker .deck-card.red { color: #bd273d; }
.hand-wizard .river-playing-card.black,
#handActionDialog .river-playing-card.black,
#handCardPicker.river-card-picker .river-playing-card.black,
#handCardPicker.river-card-picker .deck-card.black { color: #1d212a; }
.hand-wizard .river-playing-card,
#handActionDialog .river-playing-card,
#handCardPicker.river-card-picker .river-playing-card {
  background: linear-gradient(140deg, #fff, #e9e7e9);
  border: 1px solid #e6dfe5;
  box-shadow: 0 2px 3px #0003;
  line-height: 1.05;
}
.hand-wizard .river-playing-card.card-back,
#handActionDialog .river-playing-card.card-back,
#handCardPicker.river-card-picker .river-playing-card.card-back {
  background: repeating-linear-gradient(45deg, #38232c, #38232c 3px, #4a2d38 3px, #4a2d38 6px);
  border-color: #7e5362;
  color: #d9bdc8;
}
#handCardPicker.river-card-picker {
  width: min(910px, 97vw);
  padding: 24px;
  border: 1px solid #714c52;
  border-radius: 12px;
  background: #1c1011;
}
#handCardPicker.river-card-picker .modal-head { align-items: flex-start; }
#handCardPicker.river-card-picker .modal-head h2 { font-size: 19px; }
#handCardPicker.river-card-picker #pickerSelected { min-height: 50px; padding: 0 3px; margin-bottom: 18px; }
#handCardPicker.river-card-picker .card-deck { display: grid; gap: 9px; }
#handCardPicker.river-card-picker .deck-suit { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; }
#handCardPicker.river-card-picker .deck-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 68px;
  padding: 8px 0;
  border: 1px solid #d4cbd2;
  border-radius: 5px;
  background: linear-gradient(145deg, #fff, #e7e4e8);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.05;
  box-shadow: 0 2px 3px #0005;
}
#handCardPicker.river-card-picker .deck-card i { font-style: normal; font-size: 24px; }
#handCardPicker.river-card-picker .deck-card:hover:not(:disabled) { background: #fff5df; border-color: #d4af71; }
#handCardPicker.river-card-picker .deck-card.picked { outline: 2px solid #f3c479; outline-offset: 1px; background: #fff1d5; }
#handCardPicker.river-card-picker .deck-card:disabled { background: #332b34; color: #7b6c79; border-color: #544652; opacity: .46; box-shadow: none; }
#handCardPicker.river-card-picker .card-picker-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 21px;
}
#handCardPicker.river-card-picker .card-picker-actions .text-btn { margin-right: auto; color: #edbdc8; font-size:12px; }
@media (min-width: 701px) and (max-width: 920px) {
  .hand-wizard .table-seat { width: 100px; min-height: 109px; }
  .hand-wizard .poker-table-scene { min-height: 600px; }
}
@media (max-width: 700px) {
  .hand-wizard .poker-table-wrap { margin-inline: -5px; margin-bottom: 13px; }
  .hand-wizard .poker-table-scene {
    height: 720px;
    min-height: 720px;
    border-radius: 10px;
  }
  .hand-wizard .poker-felt {
    inset: 8% 17%;
    border-width: 8px;
    box-shadow: inset 0 0 0 1px #88535c, inset 0 0 30px #0007, 0 0 0 2px #110a0b, 0 12px 25px #0008;
  }
  .hand-wizard .poker-felt::after { inset: 8px; }
  .hand-wizard .table-center { gap: 7px; padding: 8px; }
  .hand-wizard .table-potlabel { font-size:12px; letter-spacing: 1.5px; }
  .hand-wizard .table-pot-value { max-width: 100%; font-size: 23px; overflow-wrap: anywhere; }
  .hand-wizard .table-street { font-size:12px; }
  .hand-wizard .table-board { gap: 3px; min-height: 42px; flex-wrap: wrap; max-width: 165px; }
  .hand-wizard .table-board .poker-card { width: 27px; height: 39px; font-size: 14px; }
  .hand-wizard .table-seat {
    left: clamp(39px, var(--mobile-x, var(--seat-x, 50%)), calc(100% - 39px));
    top: var(--mobile-y, var(--seat-y, 50%));
    width: 74px;
    min-height: 100px;
    border-radius: 9px;
    padding: 7px 4px;
    gap: 4px;
  }
  .hand-wizard .seat-position { font-size:12px; }
  .hand-wizard .seat-status { font-size:12px; min-height: 9px; }
  .hand-wizard .seat-hole { min-height: 26px; gap: 2px; }
  .hand-wizard .seat-hole .poker-card { width: 18px; height: 26px; font-size:12px; }
  .hand-wizard .seat-stack { font-size:12px; line-height: 1.25; }
  .hand-wizard .seat-wager { bottom: -19px; font-size:12px; padding: 3px 4px; max-width: 90px; gap: 3px; }
  .hand-wizard .seat-wager::before { width: 7px; height: 7px; border-width: 1px; }
  .hand-wizard .dealer-button { width: 18px; height: 18px; font-size:12px; right: -5px; top: -7px; }
  .hand-wizard .table-statusbar { font-size:12px; gap: 5px 12px; }
  .hand-wizard .table-help { font-size:12px; }
  .hand-wizard .hand-action-panel { padding: 15px 12px; }
  .hand-wizard .hand-action-panel h3 { font-size: 14px; }
  .hand-wizard .table-action-buttons { gap: 7px; }
  .hand-wizard .table-action-buttons button { flex: 1; min-width: 0; padding: 13px 7px; font-size:12px; }
  .hand-wizard .table-results { padding: 15px 12px; }
  .hand-wizard .player-result { grid-template-columns: minmax(45px, 1fr) auto auto; gap: 7px; font-size:12px; }
  .hand-wizard .player-result strong { font-size:12px; }
  .hand-wizard .player-result small { font-size:12px; }
  #handActionDialog.hand-action-dialog { padding: 19px 15px; }
  #handActionDialog .modal-head h2 { font-size: 17px; }
  #handCardPicker.river-card-picker { padding: 18px 10px; }
  #handCardPicker.river-card-picker .modal-head { padding-inline: 5px; }
  #handCardPicker.river-card-picker .modal-head h2 { font-size: 17px; }
  #handCardPicker.river-card-picker .deck-suit { gap: 3px; }
  #handCardPicker.river-card-picker .deck-card { min-height: 48px; padding: 7px 0; gap: 3px; font-size: 12px; border-radius: 4px; }
  #handCardPicker.river-card-picker .deck-card i { font-size: 17px; }
  #handCardPicker.river-card-picker .card-picker-actions { gap: 8px; padding-top: 16px; }
  #handCardPicker.river-card-picker .card-picker-actions .text-btn { width: 100%; margin: 0; text-align: left; }
  #handCardPicker.river-card-picker .card-picker-actions .secondary,
  #handCardPicker.river-card-picker .card-picker-actions .primary { flex: 1; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hand-wizard .table-seat { transition: none; }
  .hand-wizard .collecting .seat-wager,
  .hand-wizard .collecting .table-pot-value { animation: none; }
}
/* Outils et cartes de la liste des mains uniquement. */
#handsView .hand-demo-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0 0 20px; }
#handsView .hand-known-players { display:flex; flex-wrap:wrap; gap:13px; margin:14px 0; }
#handsView .hand-known-players>div { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
#handsView .hand-known-players .poker-card { width:24px; height:33px; font-size:12px; }
#handsView .river-playing-card.red { color:#bd273d; }
#handsView .river-playing-card.black { color:#1d212a; }
.hand-wizard .table-setup-note { font-size:12px; color:var(--muted); line-height:1.8; margin-top:20px; }
#handActionDialog .wizard-unit { margin-bottom:18px; justify-content:space-between; }
#handActionDialog #actionError:not(:empty) { padding:10px; background:#321d20; border:1px solid #935560; border-radius:6px; }
.hand-wizard .table-seat:disabled { opacity:1; cursor:default; }
.hand-wizard .table-seat.folded:disabled { opacity:.46; }
.hand-wizard .hand-history summary { font-size:12px; font-weight:600; color:#dbc1c6; cursor:pointer; }
.hand-wizard .pot-award { font-size:12px; color:#d5c6c8; padding:9px 0; }
@media(max-width:700px){ .hand-wizard .player-result { grid-template-columns:1fr auto; } .hand-wizard .player-result b { grid-column:1/-1; } }
/* La mise est placée vers le milieu, y compris sur les sièges du bas. */
.hand-wizard .seat-wager { top:50%; bottom:auto; margin-left:var(--wager-x); margin-top:var(--wager-y); transform:translate(-50%,-50%); }
@media(max-width:700px){ .hand-wizard .seat-wager { margin-left:var(--mobile-wager-x); margin-top:var(--mobile-wager-y); } }
/* L’action courante reste accessible pendant le défilement de la table. */
.hand-wizard.table-recorder .wizard-top { display:grid; grid-template-columns:minmax(0,1fr) auto auto; }
.hand-wizard.table-recorder #wizardUnits { grid-column:2; grid-row:1; }
.hand-wizard.table-recorder .wizard-top>button { grid-column:3; grid-row:1; }
.hand-wizard.table-recorder .wizard-footer { display:block; }
.hand-wizard.table-recorder .wizard-footer-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.hand-wizard.table-recorder .wizard-footer-tools>div { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.hand-wizard.table-recorder .wizard-footer>.hand-action-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; border:0; background:transparent; margin:0 0 12px; padding:0; }
.hand-wizard.table-recorder .wizard-footer .action-caption { margin:0; display:block; }
.hand-wizard.table-recorder .wizard-footer .action-caption h3 { margin:0 0 3px; font-size:13px; }
.hand-wizard.table-recorder .wizard-footer .fine-print { display:none; }
@media(max-width:700px){
  .hand-wizard.table-recorder .wizard-top { grid-template-columns:minmax(0,1fr) auto; gap:9px; text-align:left; }
  .hand-wizard.table-recorder #wizardUnits { grid-column:1/-1; grid-row:2; }
  .hand-wizard.table-recorder .wizard-top>button { grid-column:2; grid-row:1; }
  .hand-wizard.table-recorder #wizardUnits .wizard-unit { margin:0; width:100%; justify-content:space-between; }
  .hand-wizard.table-recorder .wizard-footer { padding:10px; }
  .hand-wizard.table-recorder .wizard-footer .table-action-buttons { gap:6px; }
  .hand-wizard.table-recorder .wizard-footer .table-action-buttons button { min-width:66px; font-size:12px; padding:12px 9px; }
  .hand-wizard.table-recorder .wizard-footer .action-caption h3 { font-size:12px; }
  .hand-wizard.table-recorder .wizard-footer .action-caption>span { font-size:12px; }
  .hand-wizard.table-recorder .wizard-footer-tools>div { width:100%; justify-content:space-between; gap:8px; }
  .hand-wizard.table-recorder .wizard-footer-tools { flex-wrap:wrap; }
  .hand-wizard.table-recorder .wizard-footer-tools>.primary { width:100%; }
}
/* Navigation conservant le futur, lecture automatique et confidentialité Hero. */
.hand-wizard #handViewOptions { padding:10px 25px 0; }
.hand-wizard .hide-hero-toggle { display:flex; flex-direction:row; align-items:center; gap:9px; font-size:12px; color:var(--muted); }
.hand-wizard .hide-hero-toggle input { width:17px; height:17px; accent-color:#de6075; }
.hand-wizard .replay-playback { display:flex; flex-wrap:wrap; align-items:center; gap:15px; margin:-5px 0 18px; }
.hand-wizard .replay-playback label { display:flex; flex-direction:row; align-items:center; gap:8px; }
.hand-wizard .replay-playback select { width:85px; }
.hand-wizard .replay-playback>span { font-size:12px; color:var(--muted); }
.hand-wizard .seat-status.checked { display:inline-block; padding:3px 8px; border:1px solid #7ebdba; border-radius:20px; background:#321419; color:#c6ffff; font-size:12px; font-weight:750; }
.hand-wizard .hero-choice { padding:13px; background:#2d1c1f; border:1px solid #a45f6a; color:#efd7db; border-radius:8px; }
.hand-wizard .winner-summary { border-left:3px solid var(--positive); padding:4px 15px; color:var(--positive); font-size:13px; }
.hand-wizard .hand-share-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
#handBranchDialog { width:min(500px,95vw); padding:24px; background:#211316; border:1px solid #9f646e; border-radius:12px; }
#handBranchDialog p { color:var(--muted); line-height:1.7; font-size:13px; }
#handsView .hand-history-tools { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
#handsView .hand-history-tools input { flex:1; min-width:160px; }
#handsView .hand-history-tools select { max-width:200px; }
#handsView .history-focus { outline:2px solid #c17582; outline-offset:6px; }
.hand-wizard .poker-table-scene { touch-action:pan-y; }
@media(max-width:700px){
  .hand-wizard #handViewOptions { padding:9px 15px 0; }
  .hand-wizard .replay-controls { flex-wrap:wrap; }
  .hand-wizard .replay-controls label { order:3; flex-basis:100%; }
  .hand-wizard .replay-controls>button { flex:1; }
  .hand-wizard .wizard-footer-tools { justify-content:space-between; }
  .hand-wizard .wizard-footer-tools>button { flex:1; padding:9px 6px; font-size:12px; }
}
/* WebKit : alternatives explicites aux effets décoratifs facultatifs. */
.hand-wizard .wizard-top,.hand-wizard .wizard-footer { -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
@supports not (backdrop-filter:blur(8px)){ .hand-wizard .wizard-top,.hand-wizard .wizard-footer { background:#1d1112; } }

/* Montants sobres : aucun pictogramme textuel autour du pot. */
.hand-wizard .seat-wager::before { display:none; content:none; }

/* Saisie rapide : un montant central, des raccourcis et un curseur tactile. */
#handActionDialog .bet-amount-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 17px; margin-top:10px; background:#29191b; border:1px solid #745358; border-radius:11px; }
#handActionDialog .bet-amount-heading>span { max-width:150px; font-size:12px; color:#c8b9bb; }
#handActionDialog .bet-amount-heading output { font-size:28px; line-height:1.2; font-weight:750; color:#fff0d4; font-variant-numeric:tabular-nums; }
#handActionDialog .bet-slider-row { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:13px; align-items:center; margin:17px 0 12px; }
#handActionDialog .bet-fine-button { width:44px; height:44px; padding:0; font-size:25px; font-weight:500; background:#311e21; border-color:#74585c; }
#handActionDialog #betAmountSlider { display:block; width:100%; min-height:46px; padding:0; border:0; background:transparent; accent-color:#ed7788; -webkit-appearance:none; appearance:none; cursor:pointer; touch-action:pan-x; }
#handActionDialog #betAmountSlider::-webkit-slider-runnable-track { height:8px; border-radius:20px; background:linear-gradient(90deg,#9f5360,#d78879); }
#handActionDialog #betAmountSlider::-webkit-slider-thumb { -webkit-appearance:none; width:31px; height:31px; margin-top:-12px; border:3px solid #fff0dd; border-radius:50%; background:#dc657b; box-shadow:0 2px 9px #0008; }
#handActionDialog #betAmountSlider::-moz-range-track { height:8px; border-radius:20px; background:linear-gradient(90deg,#9f5360,#d78879); }
#handActionDialog #betAmountSlider::-moz-range-thumb { width:27px; height:27px; border:3px solid #fff0dd; border-radius:50%; background:#dc657b; box-shadow:0 2px 9px #0008; }
#handActionDialog #betAmountSlider:disabled { opacity:.4; cursor:default; }
#handActionDialog .quick-bets-modern { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin:0 0 15px; }
#handActionDialog .quick-bets-modern button { min-height:38px; padding:8px 5px; font-size:12px; }
#handActionDialog .quick-bets-modern button[data-bet-preset="allin"] { background:#522c32; color:#ffd8dc; border-color:#a35b67; }
#handActionDialog .bet-free-amount { display:grid; grid-template-columns:minmax(0,1fr) 150px; align-items:center; gap:15px; }
#handActionDialog .bet-free-amount input { text-align:right; font-variant-numeric:tabular-nums; }
#handActionDialog .fixed-stack-summary { display:grid; grid-template-columns:1fr auto; gap:4px 12px; padding:13px 15px; margin-top:14px; border:1px solid #4c3a3b; border-radius:8px; background:#211415; }
#handActionDialog .fixed-stack-summary>span { color:#c0b1b4; font-size:12px; }
#handActionDialog .fixed-stack-summary strong { color:#e3e9e6; font-size:15px; font-weight:650; }
#handActionDialog .fixed-stack-summary small { grid-column:1/-1; color:#aa999a; font-size:12px; }
#handActionDialog .modal-actions>.primary { min-height:44px; min-width:180px; }
/* Les mises sont représentées par de petites piles proportionnelles, sans texte décoratif. */
.hand-wizard .wager-pile { position:relative; display:inline-block; flex:0 0 auto; width:calc(var(--pile-columns,1) * 19px + 2px); height:32px; pointer-events:none; vertical-align:bottom; }
.hand-wizard .wager-disc { position:absolute; display:block; left:calc(var(--disc-column,0) * 18px); bottom:calc(var(--disc-level,0) * 4px); width:21px; height:9px; border:1px solid #e5d8da; border-radius:50%; background:repeating-conic-gradient(from 20deg,var(--disc-color) 0 38deg,#eadfd5 38deg 50deg,var(--disc-color) 50deg 90deg); box-shadow:0 2px 0 #241618,0 3px 3px #0008; }
.hand-wizard .wager-disc::after { content:''; position:absolute; inset:2px 5px; border:1px solid #f5eee6b0; border-radius:50%; background:var(--disc-color); }
.hand-wizard .seat-wager { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:2px; padding:0; border:0; background:transparent; border-radius:0; }
.hand-wizard .seat-wager::before { display:none; }
.hand-wizard .seat-wager-value { display:block; padding:3px 7px; border:1px solid #785b60; border-radius:13px; background:#170d0eed; color:#eef4ec; line-height:1.2; white-space:nowrap; box-shadow:0 2px 3px #0004; }
.hand-wizard .table-pot-pile { height:33px; margin-bottom:2px; pointer-events:none; }
.hand-wizard .table-pot-pile .wager-pile { transform:scale(1.12); transform-origin:bottom center; }
.hand-wizard .pot-distribution { position:absolute; inset:0; z-index:8; pointer-events:none; overflow:visible; }
.hand-wizard .pot-award-flight { position:absolute; left:50%; top:50%; --flight-x:var(--seat-x); --flight-y:var(--seat-y); transform:translate(-50%,-50%); opacity:0; animation:river-award-pot 1s cubic-bezier(.18,.65,.2,1) both; animation-delay:var(--flight-delay,0ms); }
.hand-wizard .pot-award-flight .wager-pile { filter:drop-shadow(0 4px 8px #0008); }
.hand-wizard .receiving-pot { animation:river-winner-receives 1.1s ease-out both; }
@keyframes river-award-pot { 0%{left:50%;top:50%;opacity:1;transform:translate(-50%,-50%) scale(1.05);} 85%{opacity:1;} 100%{left:var(--flight-x);top:var(--flight-y);opacity:0;transform:translate(-50%,-50%) scale(.72);} }
@keyframes river-winner-receives { 0%,100%{box-shadow:0 6px 15px #0007;} 70%{box-shadow:0 0 0 3px #e9bc76,0 8px 22px #e9bc7655;} }
@supports not (background:repeating-conic-gradient(red 0 30deg,white 30deg 60deg)){ .hand-wizard .wager-disc { background:var(--disc-color); } }
@media(max-width:700px){
  #handActionDialog .bet-amount-heading { padding:13px; gap:10px; }
  #handActionDialog .bet-amount-heading output { font-size:24px; }
  #handActionDialog .bet-free-amount { grid-template-columns:1fr 135px; gap:10px; }
  #handActionDialog .bet-slider-row { gap:10px; }
  #handActionDialog .modal-actions>.primary { flex:1; }
  .hand-wizard .wager-pile { width:calc(var(--pile-columns,1) * 14px + 2px); height:28px; }
  .hand-wizard .wager-disc { left:calc(var(--disc-column,0) * 14px); width:17px; height:8px; bottom:calc(var(--disc-level,0) * 3px); }
  .hand-wizard .wager-disc::after { inset:2px 4px; }
  .hand-wizard .seat-wager-value { padding:3px 5px; font-size:12px; }
  .hand-wizard .pot-award-flight { --flight-x:var(--mobile-x); --flight-y:var(--mobile-y); }
}
@media(prefers-reduced-motion:reduce){ .hand-wizard .pot-award-flight { animation:none; opacity:0; } .hand-wizard .receiving-pot { animation:none; box-shadow:0 0 0 2px #e9bc76; } }

/* Le panneau de mise occupe une vraie rangée sous la table, jamais sa surface.
   Les autres outils se replient pendant une action pour conserver tous les sièges. */
#handWizard.hand-wizard.action-open {
  position:fixed;inset:0;width:min(1180px,100vw);height:100dvh;max-height:100dvh;
  margin:0 auto;padding:0;border-radius:0;display:flex;flex-direction:column;overflow:hidden;
}
#handWizard.action-open .wizard-top {position:relative;flex:none;padding:8px 16px;gap:8px;min-height:46px;}
#handWizard.action-open .wizard-top h2 {font-size:14px;margin:0;}
#handWizard.action-open .wizard-top p {display:none;}
#handWizard.action-open .wizard-top .icon-btn {width:30px;height:30px;padding:0;}
#handWizard.action-open #wizardUnits {grid-column:2;grid-row:1;}
#handWizard.action-open #wizardUnits .wizard-unit {width:auto;gap:8px;margin:0;}
#handWizard.action-open #wizardUnits .wizard-unit>span {display:none;}
#handWizard.action-open #wizardUnits .segmented {padding:2px;}
#handWizard.action-open #wizardUnits .segmented button {padding:5px 10px;min-height:29px;font-size:12px;}
#handWizard.action-open .wizard-top {grid-template-columns:minmax(0,1fr) auto auto;}
#handWizard.action-open .wizard-top>button {grid-column:3;}
#handWizard.action-open #handViewOptions,
#handWizard.action-open #wizardSteps,
#handWizard.action-open #wizardFooter {display:none;}
#handWizard.action-open #wizardBody {display:flex;flex-direction:column;flex:1;min-height:0;padding:4px 8px;overflow:hidden;}
#handWizard.action-open #wizardBody>*:not(.poker-table-wrap) {display:none;}
#handWizard.action-open .poker-table-wrap {flex:1;min-height:0;width:100%;max-width:1000px;margin:0 auto;}
#handWizard.action-open .poker-table-scene {height:100%;min-height:0;}
#handWizard.action-open .poker-felt {inset:14% 11%;border-width:8px;}
#handWizard.action-open .table-seat {width:96px;min-height:82px;padding:5px;gap:3px;}
#handWizard.action-open .seat-status {font-size:12px;min-height:8px;}
#handWizard.action-open .seat-position {font-size:12px;}
#handWizard.action-open .seat-hole {min-height:24px;}
#handWizard.action-open .seat-hole .poker-card {width:18px;height:25px;font-size:12px;}
#handWizard.action-open .seat-stack {font-size:12px;}
#handWizard.action-open .table-pot-pile {height:24px;}
#handWizard.action-open .table-center {gap:3px;padding:4px;}
#handWizard.action-open .table-board {margin-top:1px;gap:4px;min-height:34px;}
#handWizard.action-open .table-board .poker-card {width:28px;height:39px;font-size:14px;}
#handWizard.action-open .table-pot-value {font-size:22px;}
#handWizard.action-open .table-potlabel {font-size:12px;}
#handWizard.action-open .table-street {font-size:12px;}
#handActionDialog.hand-action-dialog {
  position:relative;inset:auto;display:block;flex:none;width:100%;max-height:44dvh;
  padding:10px 18px max(10px,env(safe-area-inset-bottom));margin:0;overflow:auto;
  border:0;border-top:1px solid #715559;border-radius:15px 15px 0 0;
  background:#1e1214;box-shadow:0 -5px 18px #0004;
}
#handActionDialog .modal-head {display:none;}
#handActionDialog .bet-amount-heading {padding:0;margin:0;border:0;border-radius:0;background:none;gap:10px;}
#handActionDialog .bet-amount-heading>span {max-width:none;font-size:12px;}
#handActionDialog .bet-amount-heading output {margin-left:auto;font-size:23px;white-space:nowrap;}
#handActionDialog .bet-exact-toggle {display:flex;align-items:center;gap:4px;font-size:12px;margin:0;white-space:nowrap;}
#handActionDialog .bet-exact-toggle input {accent-color:#e75f73;}
#handActionDialog .bet-slider-row {margin:4px 0;gap:12px;grid-template-columns:40px minmax(0,1fr) 40px;}
#handActionDialog .bet-fine-button {width:40px;height:40px;min-height:40px;font-size:22px;}
#handActionDialog #betAmountSlider {min-height:40px;}
#handActionDialog .quick-bets-modern {grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 5px;gap:6px;}
#handActionDialog .quick-bets-modern button {min-height:35px;padding:6px;font-size:12px;}
#handActionDialog .bet-free-amount {grid-template-columns:1fr 130px;gap:8px;margin:6px 0;font-size:12px;}
#handActionDialog .bet-free-amount input {padding:6px 9px;font-size:14px;}
#handActionDialog #betAmountMeta {font-size:12px;line-height:1.4;margin:3px 0;}
#handActionDialog .action-player-info {display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:31px;}
#handActionDialog .action-stack-field {display:flex;align-items:center;gap:10px;margin:4px 0;font-size:12px;}
#handActionDialog .action-stack-field input {width:130px;padding:7px 9px;font-size:14px;}
#handActionDialog .fixed-stack-summary {display:inline-flex;align-items:center;gap:5px;padding:0;margin:0;border:0;background:none;font-size:12px;white-space:nowrap;}
#handActionDialog .fixed-stack-summary strong {font-size:12px;}
#handActionDialog .opponent-cards {display:flex;flex-wrap:nowrap;align-items:center;gap:7px;margin:0;}
#handActionDialog .opponent-cards .playing-cards {margin:0;gap:2px;}
#handActionDialog .opponent-cards .poker-card {width:18px;height:25px;font-size:12px;}
#handActionDialog .opponent-cards button {font-size:12px;padding:6px 0;white-space:nowrap;}
#handActionDialog .modal-actions {display:flex;gap:10px;margin:5px 0 0;padding:0;}
#handActionDialog .modal-actions button {min-height:39px;padding:8px 16px;font-size:12px;}
#handActionDialog .modal-actions>.primary {flex:1;min-width:0;}
#handActionDialog .call-preview {margin:0 0 8px;font-size:15px;}
#handActionDialog #actionError:not(:empty) {padding:5px 8px;margin:5px 0;font-size:12px;}
.fixed-bb-unit strong {padding:6px 10px;border:1px solid #63464b;border-radius:6px;color:#f1dde0;font-size:12px;}
@media(max-width:700px){
  #handWizard.action-open .wizard-top {padding:5px 9px;min-height:42px;}
  #handWizard.action-open .wizard-top h2 {font-size:12px;}
  #handWizard.action-open #wizardBody {padding:2px 4px;}
  #handWizard.action-open .poker-table-scene {border-radius:8px;}
  #handWizard.action-open .poker-felt {inset:8% 17%;border-width:6px;}
  #handWizard.action-open .table-seat {width:64px;min-height:72px;padding:4px 2px;gap:2px;left:clamp(34px,var(--mobile-x),calc(100% - 34px));top:clamp(39px,var(--mobile-y),calc(100% - 39px));}
  #handWizard.action-open .seat-position {font-size:12px;gap:2px;}
  #handWizard.action-open .seat-status {font-size:12px;min-height:7px;}
  #handWizard.action-open .seat-stack {font-size:12px;}
  #handWizard.action-open .seat-hole .poker-card {width:16px;height:22px;font-size:12px;}
  #handWizard.action-open .table-board {max-width:145px;min-height:31px;gap:3px;}
  #handWizard.action-open .table-board .poker-card {width:24px;height:33px;font-size:13px;}
  #handWizard.action-open .table-pot-value {font-size:18px;}
  #handWizard.action-open .table-potlabel {font-size:12px;letter-spacing:1px;}
  #handWizard.action-open .table-street {font-size:12px;}
  #handWizard.action-open .table-pot-pile {height:22px;}
  #handWizard.action-open .wager-pile {height:21px;transform:scale(.8);}
  #handWizard.action-open .seat-wager {margin-left:calc(var(--mobile-wager-x)*.75);margin-top:calc(var(--mobile-wager-y)*.7);gap:0;}
  #handWizard.action-open .seat-wager-value {font-size:12px;padding:2px 4px;}
  #handActionDialog.hand-action-dialog {padding:8px 10px max(8px,env(safe-area-inset-bottom));max-height:44dvh;}
  #handActionDialog .bet-amount-heading>span {font-size:12px;}
  #handActionDialog .bet-amount-heading output {font-size:22px;}
  #handActionDialog .bet-exact-toggle {font-size:12px;}
  #handActionDialog .quick-bets-modern {gap:5px;}
  #handActionDialog .quick-bets-modern button {font-size:12px;}
  #handActionDialog .action-stack-field {font-size:12px;gap:5px;}
  #handActionDialog .action-stack-field input {width:92px;}
  #handActionDialog .opponent-cards {gap:5px;}
  #handActionDialog .opponent-cards button {font-size:12px;}
  #handActionDialog .opponent-cards .poker-card {width:15px;height:21px;font-size:12px;}
  #handActionDialog .modal-actions button {min-height:40px;}
}
/* Sur un écran peu haut, l’ellipse reste horizontale et les sièges sont réduits. */
@media(max-height:560px) and (min-width:701px){
  #handWizard.action-open .table-seat {width:78px;min-height:59px;gap:1px;padding:3px;}
  #handWizard.action-open .seat-hole .poker-card {width:14px;height:18px;font-size:12px;}
  #handWizard.action-open .seat-position {font-size:12px;}
  #handWizard.action-open .seat-stack {font-size:12px;}
  #handWizard.action-open .table-pot-pile {display:none;}
  #handActionDialog.hand-action-dialog {max-height:48dvh;}
}

/* Les cartes d’une street sont une seule rangée, même dans la grille d’historique. */
#handWizard #wizardBody .hand-history>div>strong { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:4px; min-width:0; }
#handWizard #wizardBody .hand-history>div>strong>.river-playing-card { flex:0 0 auto; display:inline-flex; }
@media(max-width:700px){#handWizard #wizardBody .hand-history>div {grid-template-columns:minmax(0,1fr) auto;}#handWizard #wizardBody .hand-history>div>strong {justify-content:flex-end;} }

/* Agrandissement du seul rejeu dans la fenêtre, sans activer le plein écran
   du navigateur ni modifier l’affichage des autres pages du site. */
.hand-wizard.table-recorder .wizard-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; grid-column:3; grid-row:1; min-width:0; }
.hand-wizard .replay-fullscreen-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:8px 11px; }
.hand-wizard .replay-fullscreen-button svg { width:17px; height:17px; flex:none; }
.hand-wizard .replay-fullscreen-button[aria-pressed=true] { background:#452b2f; border-color:#a96a74; color:#ffe3e8; }
html.river-replay-fullscreen { overflow:hidden; }
#handWizard.hand-wizard.replay-fullscreen {
 position:fixed; inset:0; width:100vw; width:100dvw; height:100vh; height:100dvh;
 max-width:none; max-height:none; margin:0; border:0; border-radius:0;
 display:flex; flex-direction:column; overflow:hidden;
}
#handWizard.replay-fullscreen .wizard-top { position:relative; flex:none; padding:12px 20px; }
#handWizard.replay-fullscreen #handViewOptions { flex:none; padding:8px 20px 0; }
#handWizard.replay-fullscreen .hide-hero-toggle { margin:0; }
#handWizard.replay-fullscreen #wizardSteps { flex:none; padding:8px 20px; }
#handWizard.replay-fullscreen #wizardError:empty { display:none; }
#handWizard.replay-fullscreen #wizardBody { flex:1; min-height:0; padding:0 20px 16px; overflow:auto; overscroll-behavior:contain; scroll-padding-top:130px; }
#handWizard.replay-fullscreen .replay-toolbar { position:sticky; top:0; z-index:4; padding:10px 0 12px; margin-bottom:10px; background:#160d0ef5; border-bottom:1px solid #42292d; }
#handWizard.replay-fullscreen .replay-controls { margin:0; }
#handWizard.replay-fullscreen .replay-playback { margin:10px 0 0; gap:12px; }
#handWizard.replay-fullscreen .poker-table-wrap { width:100%; max-width:1200px; margin:0 auto 18px; }
#handWizard.replay-fullscreen .poker-table-scene { height:clamp(300px,calc(100dvh - 410px),700px); min-height:300px; }
#handWizard.replay-fullscreen .wizard-footer { position:relative; flex:none; padding:12px 20px max(12px,env(safe-area-inset-bottom)); }
#handWizard.replay-fullscreen .wizard-footer-tools { justify-content:flex-end; }
@media(max-width:700px){
 .hand-wizard.table-recorder .wizard-header-actions { grid-column:2; grid-row:1; gap:7px; }
 .hand-wizard .replay-fullscreen-button { width:36px; height:36px; padding:7px; }
 .hand-wizard .replay-fullscreen-label { display:none; }
 #handWizard.replay-fullscreen .wizard-top { padding:10px 12px; }
 #handWizard.replay-fullscreen #handViewOptions { padding:7px 12px 0; }
 #handWizard.replay-fullscreen #wizardSteps { padding:7px 12px; }
 #handWizard.replay-fullscreen #wizardBody { padding:0 8px 12px; scroll-padding-top:170px; }
 #handWizard.replay-fullscreen .replay-toolbar { padding:8px 4px 10px; }
 #handWizard.replay-fullscreen .replay-playback { gap:10px; margin-top:9px; }
 #handWizard.replay-fullscreen .replay-playback>span { display:none; }
 #handWizard.replay-fullscreen .poker-table-scene { height:clamp(330px,calc(100dvh - 430px),600px); min-height:330px; }
 #handWizard.replay-fullscreen .table-seat { width:70px; min-height:88px; padding:5px 3px; gap:3px; left:clamp(37px,var(--mobile-x),calc(100% - 37px)); top:clamp(46px,var(--mobile-y),calc(100% - 46px)); }
 #handWizard.replay-fullscreen .seat-stack { font-size:12px; }
 #handWizard.replay-fullscreen .seat-status { font-size:12px; }
 #handWizard.replay-fullscreen .wizard-footer { padding:10px 12px max(10px,env(safe-area-inset-bottom)); }
}
@media(max-height:560px) and (min-width:701px){
 #handWizard.replay-fullscreen .wizard-top { padding:8px 14px; }
 #handWizard.replay-fullscreen .wizard-top p { display:none; }
 #handWizard.replay-fullscreen .poker-table-scene { height:360px; min-height:360px; }
 #handWizard.replay-fullscreen .table-seat { width:94px; min-height:84px; padding:5px; gap:3px; }
 #handWizard.replay-fullscreen .seat-hole .poker-card { width:20px; height:28px; font-size:12px; }
}
#handWizard.action-open .wizard-header-actions { grid-column:3; grid-row:1; }
/* Le bas de la table reste au-dessus des commandes sur un téléphone courant. */
@media(max-width:700px){
 #handWizard.replay-fullscreen .poker-table-scene { height:clamp(300px,calc(100dvh - 430px),560px); min-height:300px; }
}
