/* River — rubrique Mains d'après les maquettes choisies par le propriétaire (Superdesign, 22/11) :
   1. journal par session (liste des mains),
   2. table soignée, commune à la saisie et au rejeu (rebord, feutre à grain, sièges en verre, jetons),
   3. saisie « tout au pouce » (panneau d'action à droite sur ordinateur, dock en bas sur téléphone),
   4. rejeu « mode cinéma » (bandeau du résultat, bulle de l'action, barre de lecture sous la table).
   Chargé après theme.css : ces règles l'emportent sur les anciennes. */

/* =========================================================================================
   1. Journal par session
   ========================================================================================= */
#handsView .hj-list { display:block; }
.hj-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; margin:4px 0 18px; }
.hj-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:14px 6px; }
.hj-stats > div { display:grid; justify-items:center; align-content:center; gap:5px; min-width:0; padding:0 10px; text-align:center; }
.hj-stats > div + div { border-left:1px solid #ffffff12; }
.hj-stats small { color:var(--muted); font-size:12px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.hj-stats b { max-width:100%; color:var(--ink); font:740 clamp(17px, 1.7vw, 22px)/1.2 var(--font-display); font-variant-numeric:tabular-nums; text-wrap:balance; }
.hj-stats b.positive { color:#7be3a8; } .hj-stats b.negative { color:#ff9f8a; } .hj-stats b.hj-todo { color:#ff7d87; }
.hj-opp { display:flex; align-items:center; gap:12px; min-width:260px; padding:12px 16px; color:var(--ink); text-align:left; cursor:pointer; }
.hj-opp > svg { flex:none; width:40px; height:40px; padding:10px; border-radius:50%; background:#ffffff0d; color:#efe2d2; }
.hj-opp > span { display:grid; gap:3px; min-width:0; }
.hj-opp b { font:700 15px/1.2 var(--font-display); }
.hj-opp small { color:var(--muted); font-size:12px; }
.hj-opp em { margin-left:auto; min-width:30px; padding:3px 9px; border-radius:999px; background:#ffffff10; color:#e8d3d6; font-style:normal; font-weight:700; font-size:13px; text-align:center; }
@media (hover:hover) { .hj-opp:hover { border-color:#5a2a35; } }
/* Les notes sur les adversaires s'ouvrent depuis le bandeau, juste dessous. */
#handsView #opponentsPanel .opp-panel:not([open]) { display:none; }
#handsView #opponentsPanel .opp-panel { margin:0 0 18px; }

.hj-group { margin:0 0 30px; }
.hj-group-head { display:flex; align-items:center; gap:12px; min-width:0; margin:0 0 14px; }
.hj-pin { display:grid; place-items:center; flex:none; }
.hj-pin svg { width:18px; height:18px; }
.hj-pin.cash { color:var(--cash, #ffd166); } .hj-pin.mtt { color:var(--mtt, #6aa8ff); }
.hj-group-head h3 { min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#e8d3d6; font:700 13px/1.3 var(--font-display); letter-spacing:.08em; text-transform:uppercase; }
.hj-rule { flex:1; min-width:16px; height:1px; background:#3a1b22; }
.hj-group-head strong { white-space:nowrap; font:740 14px/1 var(--font-display); font-variant-numeric:tabular-nums; }
.hj-group-head strong.positive { color:#7be3a8; } .hj-group-head strong.negative { color:#ff9f8a; }
.hj-count { flex:none; color:var(--muted); font-size:12px; white-space:nowrap; }
.hj-row { display:grid; grid-template-columns:repeat(var(--hj-cols,4),minmax(0,1fr)); gap:16px; align-items:stretch; }
.hj-more { display:inline-flex; align-items:center; gap:8px; min-height:40px; margin-top:14px; padding:0 18px; border-radius:999px; font-size:13px; }
.hj-more svg { width:16px; height:16px; transition:rotate .25s cubic-bezier(.16,1,.3,1); }
.hj-more[aria-expanded="true"] svg { rotate:180deg; }
.hj-more-groups { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; width:100%; min-height:56px; margin:4px 0 12px; border-radius:999px; border-style:dashed; font-size:14px; }
.hj-more-groups span { color:var(--muted); font-size:12px; font-weight:500; }

/* Fiche d'une main : la donne posée sur une bande de tapis, puis le titre, une ligne et les actions. */
#handsView .hand-card.hj-card { display:flex; flex-direction:column; min-width:0; padding:0; overflow:visible; }
.hj-felt { position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:6px; height:136px; padding:10px 12px 10px;
  border-radius:calc(var(--radius-panel, 18px) - 1px) calc(var(--radius-panel, 18px) - 1px) 0 0; overflow:hidden;
  background:var(--felt-grain, none), radial-gradient(130% 120% at 30% 0%, #8a2232 0%, #5a1220 52%, #34090f 100%);
  box-shadow:inset 0 0 0 5px #2a070c80, inset 0 1px 0 #ffffff1a, inset 0 -22px 30px -22px #000d; }
.hj-top { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:6px; }
.hj-pos { padding:2px 8px; border-radius:6px; background:#000a; color:#fff; font:700 12px/1.4 var(--font-display); letter-spacing:.04em; }
.hj-flags { display:flex; gap:4px; min-width:0; }
.hj-flag { padding:1px 8px; border:1px solid #ff7d8766; border-radius:999px; background:#ff7d8724; color:#ffdfe2; font-size:12px; font-weight:650; white-space:nowrap; }
.hj-flag.done { border-color:#7be3a855; background:#7be3a81c; color:#7be3a8; }
.hj-flag.demo { border-color:#ffffff26; background:#0007; color:#e8d3d6; }
.hj-deal { display:flex; align-items:center; gap:10px; min-width:0; }
.hj-hole { display:flex; flex:none; padding-left:2px; }
.hj-hole .poker-card:first-child { rotate:-8deg; }
.hj-hole .poker-card + .poker-card { rotate:8deg; margin-left:-9px; }
.hj-board { display:flex; align-items:center; gap:6px; min-width:0; margin-left:auto; }
.hj-street { display:flex; gap:3px; }
#handsView .hj-card .poker-card, .hj-slot { flex:none; width:28px; height:39px; border-radius:4px; font-size:13px; }
#handsView .hj-card .poker-card { box-shadow:0 3px 6px -2px #000c; }
.hj-slot { border:1.5px dashed #efe2d23d; background:#00000024; }
.hj-result { position:relative; z-index:1; align-self:flex-end; padding:3px 10px; border:1px solid #ffffff1f; border-radius:999px; background:#0d0607d0; color:#e8d3d6; font:740 13px/1.3 var(--font-display); font-variant-numeric:tabular-nums; white-space:nowrap; }
.hj-result.positive { border-color:#7be3a855; color:#7be3a8; } .hj-result.negative { border-color:#ff9f8a55; color:#ff9f8a; }
.hj-body { display:flex; flex:1; flex-direction:column; gap:6px; min-width:0; padding:14px 16px 16px; }
#handsView .hj-body h4 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#f6efec; font:700 15px/1.3 var(--font-display); }
#handsView .hj-body .hj-line { display:-webkit-box; margin:0; overflow:hidden; -webkit-line-clamp:1; -webkit-box-orient:vertical; white-space:normal; color:var(--muted); font-size:13px; line-height:1.45; }
.hj-tags { display:flex; flex-wrap:wrap; gap:4px; }
.hj-actions { display:flex; align-items:center; gap:8px; margin-top:auto; padding-top:8px; }
.hj-play { display:inline-flex; flex:1; align-items:center; justify-content:center; gap:7px; min-width:0; min-height:40px; padding:0 14px; border-radius:999px; }
.hj-play svg { flex:none; width:14px; height:14px; }
.hj-icon { display:grid; flex:none; place-items:center; width:40px; height:40px; padding:0; border:1px solid #44222b; border-radius:50%; background:#1f1013; color:#f6efec; cursor:pointer; }
.hj-icon svg { width:18px; height:18px; }
@media (hover:hover) { .hj-icon:hover { border-color:#ff7d87; } }
#handsView .hj-menu > summary { width:40px; height:40px; min-height:40px; padding:0; border-radius:50%; }
#handsView .hj-menu > summary::after { content:none; }
#handsView .hj-menu > summary svg { width:18px; height:18px; }
.hj-actions > .hj-menu:only-child { margin-left:auto; }

@media (max-width:700px) {
  .hj-summary { grid-template-columns:1fr; gap:10px; }
  .hj-stats b { font-size:19px; }
  .hj-opp { min-width:0; }
  .hj-group-head { gap:8px; }
  .hj-group-head h3 { font-size:12px; letter-spacing:.06em; }
  .hj-count, .hj-rule { display:none; }
  .hj-group-head strong { margin-left:auto; }
  .hj-row { gap:12px; }
}
/* Filet de sécurité si la largeur change avant le nouveau calcul : jamais trop de colonnes. */
@media (max-width:1100px) { .hj-row { grid-template-columns:repeat(min(var(--hj-cols,4),3),minmax(0,1fr)); } }
@media (max-width:820px) { .hj-row { grid-template-columns:repeat(min(var(--hj-cols,4),2),minmax(0,1fr)); } }
@media (max-width:560px) { .hj-row { grid-template-columns:minmax(0,1fr); } }
@media (prefers-reduced-motion: reduce) { .hj-more svg { transition:none; } }
@media (max-width:700px) { .hj-stats b { white-space:normal; font-size:17px; line-height:1.2; } }

/* =========================================================================================
   2. Table soignée (saisie et rejeu) : rebord rembourré, feutre à grain, sièges en verre fumé,
      dos de cartes rayés bordés d'ivoire, bouton donneur ivoire, siège qui joue qui brille.
   ========================================================================================= */
.hand-wizard .poker-table-scene { background:radial-gradient(ellipse at 50% 45%, #1b0d11 0, #120809 68%, #0d0607 100%); }
.hand-wizard .poker-felt { border-color:#3a0d16;
  background:var(--felt-grain, none), radial-gradient(120% 90% at 50% 35%, #8a2232 0%, #5a1220 48%, #34090f 100%);
  box-shadow:inset 0 0 0 2px #b1404e5c, inset 0 14px 40px #000b, inset 0 -8px 26px #0008,
    0 0 0 1px #000a, 0 0 0 9px #22060b, 0 0 0 10px #ffffff12, 0 30px 60px -26px #000; }
.hand-wizard .poker-felt::after { border-color:#ffffff17; }
.hand-wizard .table-seat { border:1px solid #ffffff1c; border-radius:14px;
  background:linear-gradient(180deg, rgb(43 20 27 / .94), rgb(20 10 13 / .95));
  box-shadow:0 14px 26px -12px #000, inset 0 1px 0 #ffffff14; }
.hand-wizard .table-seat.hero-seat:not(.acting) { border-color:#e74953; box-shadow:0 14px 26px -12px #000, 0 0 0 3px #e7495324; }
.hand-wizard .table-seat.acting { border-color:#ff7d87; box-shadow:0 0 0 3px #e7495340, 0 0 26px 6px #e749534d, 0 14px 26px -12px #000; animation:mains-turn 1.8s ease-in-out infinite; }
@keyframes mains-turn { 50% { box-shadow:0 0 0 5px #e7495326, 0 0 34px 10px #e7495340, 0 14px 26px -12px #000; } }
.hand-wizard .table-seat.folded { border-style:dashed; border-color:#ffffff24; background:rgb(20 10 13 / .7); }
/* « À son tour » en pastille posée sur le haut du siège : elle ne recouvre jamais les cartes. */
.hand-wizard .table-seat.acting .seat-status { position:absolute; left:50%; top:0; z-index:2; translate:-50% -62%; min-height:0; max-height:none; margin:0; padding:2px 9px; border-radius:999px; background:#cf3a47; color:#fff; font-size:12px; font-weight:700; line-height:1.3; white-space:nowrap; box-shadow:0 6px 12px -6px #000; }
.hand-wizard .seat-status.won { display:inline-block; padding:0 8px; border:1px solid #7be3a866; border-radius:999px; background:#7be3a81c; color:#7be3a8; font-weight:700; }
.hand-wizard .river-playing-card.card-back { border:2px solid #efe2d2; box-shadow:0 3px 6px -2px #000c; }
.hand-wizard .dealer-button { border:0; background:radial-gradient(circle at 35% 30%, #ffffff, #e9e1d6); color:#1d212a; font-weight:800; box-shadow:inset 0 0 0 2px #00000014, inset 0 -2px 3px #0002, 0 4px 8px -2px #000c; }
.hand-wizard .wager-disc { border-color:#f1e6dd; box-shadow:0 2px 0 #1a0d10, 0 3px 4px #0009; }
.hand-wizard .seat-wager-value, .hand-wizard .table-pot-value { font-variant-numeric:tabular-nums; }
.hand-wizard .seat-wager-value { border-color:#ffffff24; background:#0d0607e6; }
@media (prefers-reduced-motion: reduce) { .hand-wizard .table-seat.acting { animation:none; } }

/* =========================================================================================
   3. Saisie « tout au pouce »
   ========================================================================================= */
/* Téléphone et tablette : le pied devient un dock — qui joue et combien à suivre, puis de grands boutons. */
.hand-wizard.is-recording .wizard-footer > .hand-action-panel { grid-template-columns:minmax(0,1fr); gap:10px; }
.hand-wizard.is-recording .wizard-footer .action-caption { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.hand-wizard.is-recording .wizard-footer .action-caption h3 { margin:0; font:700 15px/1.25 var(--font-display); }
.hand-wizard.is-recording .wizard-footer .action-caption > span { color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hand-wizard.is-recording .wizard-footer .table-action-buttons { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; }
.hand-wizard.is-recording .wizard-footer .table-action-buttons button { min-width:0; min-height:52px; padding:0 8px; font-size:15px; font-weight:750; letter-spacing:.04em; }
.hand-wizard.is-recording .wizard-footer .table-action-buttons button[data-betting="call"] { border-color:#ffffff33; }
.hand-wizard.is-recording .wizard-footer > .board-prompt { margin:0 0 10px; padding:12px 14px; border-radius:16px; }
.hand-wizard.is-recording .wizard-footer > .board-prompt .primary { width:100%; min-height:48px; }

/* Ordinateur : table à gauche, panneau d'action à droite (pied, invites du tableau, fenêtre de mise). */
@media (min-width:1100px) {
  #handWizard.hand-wizard.is-recording[open] { display:grid; grid-template-columns:minmax(0,1fr) 360px; grid-template-rows:auto auto auto auto minmax(0,1fr);
    width:min(1240px,97vw); height:min(94vh,940px); max-height:94vh; overflow:hidden; }
  #handWizard.is-recording > .wizard-top { grid-column:1 / -1; grid-row:1; }
  #handWizard.is-recording > #handViewOptions { grid-column:1; grid-row:2; min-width:0; }
  #handWizard.is-recording > #wizardSteps { grid-column:1; grid-row:3; min-width:0; }
  #handWizard.is-recording > #wizardError { grid-column:1; grid-row:4; }
  #handWizard.is-recording > #wizardBody { grid-column:1; grid-row:5; min-height:0; overflow:auto; overscroll-behavior:contain; }
  #handWizard.is-recording .poker-table-scene { height:clamp(420px, calc(94vh - 290px), 620px); min-height:0; }
  #handWizard.is-recording > #wizardFooter { grid-column:2; grid-row:2 / -1; position:static; display:flex; flex-direction:column; gap:18px; min-height:0; padding:24px 22px; overflow:auto;
    border-top:0; border-left:1px solid #3a1b22; background:linear-gradient(180deg,#170b0e,#120809); -webkit-backdrop-filter:none; backdrop-filter:none; }
  #handWizard.is-recording .wizard-footer > .hand-action-panel { margin:0; gap:14px; }
  #handWizard.is-recording .wizard-footer .action-caption { display:grid; gap:4px; }
  #handWizard.is-recording .wizard-footer .action-caption h3 { font-size:20px; }
  #handWizard.is-recording .wizard-footer .action-caption > span { font-size:14px; }
  #handWizard.is-recording .wizard-footer .table-action-buttons { grid-auto-flow:row; grid-template-columns:1fr 1fr; grid-auto-columns:auto; }
  #handWizard.is-recording .wizard-footer .table-action-buttons button { min-height:56px; }
  #handWizard.is-recording .wizard-footer .table-action-buttons button:nth-child(3) { grid-column:1 / -1; }
  #handWizard.is-recording .wizard-footer .fine-print { display:block; margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
  #handWizard.is-recording .wizard-footer-tools { margin-top:auto; padding-top:16px; border-top:1px solid #ffffff10; flex-wrap:wrap; }
  #handWizard.is-recording .wizard-footer-tools > .primary { flex:1 1 100%; min-height:48px; }
  /* Fenêtre de mise : elle prend la place du panneau à droite au lieu de passer sous la table. */
  #handWizard.hand-wizard.is-recording.action-open[open] { display:grid; position:fixed; inset:0; margin:auto; width:min(1240px,97vw); height:min(94vh,940px); max-height:94vh; padding:0; border-radius:var(--radius-panel, 18px); }
  #handWizard.is-recording.action-open > #wizardBody { grid-column:1; grid-row:2 / -1; display:flex; }
  #handWizard.is-recording.action-open > #wizardFooter { display:none; }
  #handWizard.is-recording.action-open .poker-table-wrap { flex:1; display:flex; flex-direction:column; min-height:0; margin:0 auto; }
  #handWizard.is-recording.action-open .poker-table-scene { flex:1; height:auto; min-height:0; }
  #handWizard.is-recording > #handActionDialog.hand-action-dialog { grid-column:2; grid-row:2 / -1; position:relative; z-index:3; width:auto; max-height:none; min-height:0; margin:0; padding:22px;
    border:0; border-left:1px solid #3a1b22; border-radius:0; background:linear-gradient(180deg,#170b0e,#120809); box-shadow:none; overflow:auto; }
}

/* =========================================================================================
   4. Rejeu « mode cinéma »
   ========================================================================================= */
/* Barre de lecture sous la table, en verre fumé, avec les repères des rues. */
#handWizard.replay-view .rp-bar--cinema { margin:10px 0 4px; padding:9px 12px 9px 9px; border-color:#ffffff14; border-radius:22px;
  background:rgb(22 10 13 / .88); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); box-shadow:0 18px 36px -22px #000; }
.rp-bar.has-streets { padding-bottom:26px; }
.rp-track { position:relative; }
.rp-notches { position:absolute; left:10px; right:10px; top:50%; height:0; pointer-events:none; }
.rp-notches i { position:absolute; top:-7px; width:2px; height:14px; margin-left:-1px; border-radius:2px; background:#ffffff4d; }
.rp-streets { position:absolute; left:10px; right:10px; top:calc(50% + 12px); height:14px; pointer-events:none; }
.rp-streets span { position:absolute; translate:-50% 0; color:#b29a9d; font-size:12px; font-weight:650; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; }
.rp-streets span:first-child { translate:-10px 0; }
.rp-streets span.is-past { color:#f3e1e3; }
.rp-streets span:last-child.is-past { color:#ff7d87; }
/* Bandeau du résultat : au-dessus de la table, il ne recouvre aucun siège. */
.rp-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px 14px; width:max-content; max-width:100%; margin:0 auto 10px; padding:8px 16px;
  border:1px solid #7be3a833; border-radius:16px; background:linear-gradient(180deg,#1d0f13,#140a0d); box-shadow:0 18px 36px -22px #000, 0 0 40px -18px #7be3a855; animation:mains-banner .45s cubic-bezier(.16,1,.3,1) both; }
@keyframes mains-banner { from { opacity:0; translate:0 -8px; } }
.rp-banner-label { color:#cdbcbf; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.rp-banner-main { color:#fff; font:700 16px/1.2 var(--font-display); }
.rp-banner-main em { color:#7be3a8; font-style:normal; font-variant-numeric:tabular-nums; }
.rp-banner-dot { margin:0 8px; color:#cdbcbf; }
.rp-banner-sep { width:1px; height:20px; background:#ffffff1a; }
.rp-banner-hand { color:#e8d3d6; font-size:14px; }
.rp-banner-cards { display:flex; gap:3px; }
#handWizard .rp-banner-cards .poker-card { width:22px; height:31px; font-size:12px; border-radius:3px; }
/* Hauteur de la table : la barre de lecture (et le bandeau à la fin) prennent leur place sous et au-dessus. */
#handWizard.replay-view .poker-table-scene { height:calc(100cqh - 142px); }
#handWizard.replay-view .rp-banner + .poker-table-wrap .poker-table-scene { height:calc(100cqh - 200px); }
@media (max-width:700px) {
  .rp-streets { display:none; }
  .rp-bar.has-streets { padding-bottom:6px; }
  .rp-banner { gap:4px 10px; padding:7px 12px; }
  .rp-banner-sep { display:none; }
  .rp-banner-main { font-size:14px; }
  .rp-banner-hand { font-size:13px; }
  #handWizard.replay-view .poker-table-scene { height:calc(100cqh - 158px); }
  #handWizard.replay-view .rp-banner + .poker-table-wrap .poker-table-scene { height:calc(100cqh - 232px); }
}
@media (prefers-reduced-motion: reduce) { .rp-banner { animation:none; } }
/* Mises : un peu plus loin du siège, qui a grandi avec les cartes (la pile ne recouvre plus le tapis du joueur). */
#handWizard.replay-view .seat-wager { margin-left:calc(var(--wager-x) * .95); margin-top:calc(var(--wager-y) * .92); }
@media (max-width:700px) { #handWizard.replay-view .seat-wager { margin-left:calc(var(--mobile-wager-x) * .95); margin-top:calc(var(--mobile-wager-y) * 1.04); } }

/* Action de la rue dans le siège (Call, Bet, Raise), écrite une seule fois ; celle qui vient d'être jouée ressort. */
.hand-wizard .seat-status.act-hot, .hand-wizard .seat-status.act-calm { display:inline-block; padding:0 8px; border:1px solid #ffffff2b; border-radius:999px; background:#0000004d; color:#f1e3e5; font-weight:700; letter-spacing:.03em; }
.hand-wizard .seat-status.act-hot { border-color:#e7495380; color:#ffb3b9; }
.hand-wizard .seat-status.is-last { box-shadow:0 0 0 2px #f6efec40, 0 0 14px -2px #f6efec66; }
.hand-wizard .seat-status.act-hot.is-last { background:#cf3a47; border-color:#cf3a47; color:#fff; }
.hand-wizard .seat-status.checked.is-last { background:#7ebdba2b; }
/* Téléphone : le tableau reste entre les sièges du bas (avant, ses bords touchaient HJ et BB en 6-max). */
@media (max-width:700px) {
  #handWizard.replay-view { --rp-board:clamp(24px, min(8.2cqw, 6cqh), 40px); }
  #handWizard.replay-view .table-board { gap:3px; }
}
@media (max-width:700px) {
  #handWizard.replay-view { --rp-board:clamp(22px, min(7.6cqw, 6cqh), 38px); }
  #handWizard.replay-view .seat-wager { margin-left:calc(var(--mobile-wager-x) * .6); margin-top:calc(var(--mobile-wager-y) * 1.04); }
}
@media (max-width:700px) {
  #handWizard.replay-view .seat-wager { margin-left:calc(var(--mobile-wager-x) * .5); }
  /* La rue est déjà écrite dans la barre de lecture : pas deux fois sur téléphone. */
  #handWizard.replay-view .table-street { display:none; }
}
/* Tables de 9 et 10 joueurs (ordinateur, tablette) : sièges et cartes un peu plus petits pour que les voisins ne se touchent pas. */
@media (min-width:701px) {
  #handWizard.replay-view .poker-table-scene[data-player-count="9"], #handWizard.replay-view .poker-table-scene[data-player-count="10"] { --rp-hole:clamp(20px, min(2.8cqw, 5.4cqh), 34px); }
  #handWizard.replay-view .poker-table-scene[data-player-count="9"] .table-seat, #handWizard.replay-view .poker-table-scene[data-player-count="10"] .table-seat { --sw:max(84px, calc(var(--rp-hole) * 2 + 16px)); }
}
/* Fin de main : le bandeau dit déjà qui gagne et combien. Le pot et la rue au centre feraient doublon : on ne garde que le tableau. */
#handWizard.replay-view .rp-banner + .poker-table-wrap :is(.table-potlabel, .table-pot-value, .table-street, .table-pot-pile) { display:none; }
@media (min-width:701px) {
  #handWizard.replay-view .rp-banner + .poker-table-wrap .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) { --rp-hole:clamp(18px, min(2.5cqw, 4.6cqh), 30px); }
}
/* Saisie sur téléphone : mises un peu plus près du siège (à 9-10 joueurs, elles touchaient le tableau). */
@media (max-width:700px) { #handWizard.is-recording .seat-wager { margin-left:calc(var(--mobile-wager-x) * .55); } }
/* Téléphone, 9-10 joueurs : les sièges sont serrés, « À son tour » reste dans le siège au lieu de déborder sur les voisins. */
@media (max-width:700px) { .hand-wizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat.acting .seat-status { position:static; translate:none; padding:0 6px; } }
.hand-wizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat.acting .seat-status { position:static; translate:none; padding:0 6px; }

/* Sièges plus aérés : le statut (Raise, Bet, Call, Check, Fold, All-in, Gagnant, À son tour) sort du cadre
   et se pose en onglet sur le bord haut du siège ; dedans il ne reste que la position, les cartes et le tapis. */
.hand-wizard .table-seat { gap:6px; padding:13px 10px 9px; }
#handWizard.replay-view .table-seat { padding:13px 10px 9px; gap:6px; }
.hand-wizard .table-seat .seat-status, #handWizard.replay-view .table-seat .seat-status { position:absolute; left:50%; top:0; z-index:2; translate:-50% -60%; display:inline-block; min-height:0; max-height:none; margin:0;
  padding:1px 9px; border:1px solid #ffffff2e; border-radius:999px; background:#1b0d11; color:#f1e3e5; font-size:12px; font-weight:700; line-height:1.35; white-space:nowrap; box-shadow:0 6px 12px -6px #000; }
.hand-wizard .table-seat.folded .seat-status { color:#b29a9d; }
.hand-wizard .table-seat .seat-status.won { background:#0f2a1d; border-color:#7be3a866; color:#7be3a8; }
.hand-wizard .table-seat .seat-status.act-hot { background:#2a0d13; border-color:#e7495380; color:#ffb3b9; }
.hand-wizard .table-seat .seat-status.act-hot.is-last { background:#cf3a47; border-color:#cf3a47; color:#fff; }
.hand-wizard .table-seat .seat-status.checked { background:#10211f; border-color:#7ebdba88; color:#c6ffff; }
.hand-wizard .table-seat.acting .seat-status { background:#cf3a47; border-color:#cf3a47; color:#fff; }
@media (max-width:700px) {
  .hand-wizard .table-seat, #handWizard.replay-view .table-seat { padding:11px 4px 7px; gap:4px; }
  .hand-wizard .table-seat .seat-status, #handWizard.replay-view .table-seat .seat-status { padding:0 7px; }
}
/* 9-10 joueurs : les sièges sont serrés, le statut reste dans le siège. */
#handWizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat .seat-status { position:static; translate:none; padding:0 6px; box-shadow:none; }
#handWizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat { padding-top:7px; padding-bottom:9px; }
/* Sièges du bas : l'onglet passe sous le siège (vers l'extérieur), pas sur le tableau. */
#handWizard .table-seat.seat-low .seat-status { top:auto; bottom:0; translate:-50% 60%; }
#handWizard .table-seat.seat-low { padding:9px 10px 13px; }
/* Siège du haut : l'onglet se pose sur son côté gauche (au-dessus, il serait coupé par le bord de la table). */
#handWizard .table-seat.seat-top .seat-status { top:50%; left:0; translate:calc(-100% - 6px) -50%; }
#handWizard .table-seat.seat-top { padding-top:9px; }
/* Bouton donneur : jamais sur l'onglet (en bas à droite quand l'onglet est en haut). */
#handWizard .table-seat:not(.seat-low):not(.seat-top) .dealer-button { top:auto; bottom:-9px; }
@media (max-width:700px) {
  #handWizard .table-seat.seat-low { padding:7px 4px 11px; }
  #handWizard .table-seat.seat-top { padding-top:7px; }
}
/* Téléphone : la table est trop serrée pour des onglets extérieurs — le statut reste dans le siège, comme avant. */
@media (max-width:700px) {
  #handWizard .table-seat .seat-status, #handWizard .table-seat.seat-low .seat-status, #handWizard .table-seat.seat-top .seat-status { position:static; translate:none; padding:0 6px; box-shadow:none; }
  #handWizard .table-seat, #handWizard .table-seat.seat-low, #handWizard .table-seat.seat-top, #handWizard.replay-view .table-seat { padding:4px 2px; gap:2px; }
  #handWizard .table-seat:not(.seat-low):not(.seat-top) .dealer-button { top:-9px; bottom:auto; }
}
/* Siège tout en bas : onglet sur le côté gauche, comme le siège tout en haut (dessous, il serait coupé). */
@media (min-width:701px) {
  #handWizard .table-seat.seat-bottom .seat-status { top:50%; left:0; bottom:auto; translate:calc(-100% - 6px) -50%; }
  #handWizard .table-seat.seat-bottom { padding-top:9px; }
}
/* 9-10 joueurs : sièges compacts (statut dedans), bouton donneur dans son coin d'origine. */
#handWizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat { padding:4px; gap:2px; }
#handWizard .poker-table-scene:is([data-player-count="9"], [data-player-count="10"]) .table-seat .dealer-button { top:-9px; bottom:auto; }
/* Téléphone, tête-à-tête : bouton donneur en bas du siège (en haut, il touchait la pastille « Gagnant »). */
@media (max-width:700px) { #handWizard .poker-table-scene[data-player-count="2"] .table-seat .dealer-button { top:auto; bottom:-9px; } }
