.home-button{background:none;border:0;color:var(--yellow);font-size:24px;font-weight:900;letter-spacing:-1px;padding:0}
.topbar{gap:20px}.topbar #mode-name{margin-right:auto;color:var(--muted)}
.lobby-screen{padding:48px 0;max-width:1200px;width:100%;margin:auto}
.mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.mode-card{position:relative;text-align:left;padding:32px 26px;border:1px solid var(--raise-3);border-radius:15px;min-height:230px;background:radial-gradient(ellipse at top right,color-mix(in srgb,var(--raise-3) 19%,transparent),transparent),var(--panel);box-shadow:0 6px 0 var(--shadow-ink);transition:transform .18s,border-color .18s}
.mode-card:hover{transform:translateY(-5px);border-color:var(--yellow)}
.mode-card kbd{position:absolute;right:20px;top:20px;font-size:16px;color:var(--yellow)}
.mode-card h2{font-size:29px;letter-spacing:-1px;margin:12px 0;color:var(--cream)}
.mode-card p{font-size:16px;color:var(--muted);margin:0 0 30px}
.mode-card strong{font:800 22px var(--mono);color:var(--yellow)}
.mode-card small{display:block;margin-top:10px;color:var(--teal);font-size:13px}
.mode-card[aria-disabled=true]{opacity:.55;cursor:not-allowed}
.mode-card[aria-disabled=true]:hover{transform:none;border-color:var(--raise-3)}
.mode-card[data-state=import]{opacity:.8}.mode-card[data-state=import] small{color:var(--yellow)}
.mode-rush{border-color:var(--yellow);background:radial-gradient(ellipse at top left,color-mix(in srgb,var(--accent) 14%,transparent),transparent),var(--panel)}
#nash-settings{display:flex;align-items:center;gap:25px;margin:32px 0 0;border:1px solid var(--line);border-radius:12px;padding:22px;font-size:16px;flex-wrap:wrap}
#nash-settings legend{color:var(--teal);padding:0 10px;font-weight:750}
#nash-settings select,#ante{font:700 17px var(--mono);background:var(--raise-3);color:var(--cream);border:1px solid var(--raise-3);border-radius:5px;padding:8px}
#nash-settings>span{color:var(--muted);font-size:12px}
#data-status:empty{display:none}
.profile-screen{max-width:1100px;width:100%;margin:30px auto}.profile-screen h1{font-size:44px}
.profile-screen h2{margin-top:44px;font-size:28px}.profile-row{display:flex;justify-content:space-between;gap:28px;border-bottom:1px solid var(--line);padding:22px 0;font-size:20px}
.profile-row strong{margin-left:auto;color:var(--yellow);font:800 28px var(--mono)}
.profile-row span{color:var(--teal);font:700 20px var(--mono)}
#mode-reveal{font-size:25px;font-weight:850;line-height:1.3;color:var(--teal);margin:12px 0}#mode-reveal:empty{display:none}
#accuracy{margin-left:auto;font:800 22px var(--mono);color:var(--teal)}
.result-top>strong{font-size:42px}.loss{font-size:29px}.play-layout{grid-template-columns:minmax(0,1fr) 390px}
#finish-run{background:var(--raise-3);color:var(--cream);border:1px solid var(--raise-3);margin:20px 0 0 auto}
#level{font-size:14px;color:var(--yellow)}.source-line>span:first-child{max-width:100%}
@media(max-width:1100px){.mode-grid{grid-template-columns:repeat(2,1fr)}.play-layout{grid-template-columns:minmax(0,1fr) 330px}}
@media(max-width:900px){.play-layout{grid-template-columns:1fr}.mode-grid{grid-template-columns:1fr 1fr}.topbar #mode-name{display:none}}
.solver-panel:has(.loss:not([hidden])) .grid-cell{aspect-ratio:1.9}
#mode-reveal{font-size:24px;line-height:1.28}#mode-reveal b{color:var(--yellow)}
/* New modes keep the original table and controls intact. */
#mode-stage{display:none;position:absolute;inset:0;z-index:8}
.table-stage[data-mode]:not([data-mode=""])>:not(#mode-stage):not(.table-feedback):not(.fly-chip):not(.poker-table){visibility:hidden}
.table-stage[data-mode]:not([data-mode=""]) #mode-stage{display:block}
.opening{position:absolute;top:8%;left:0;right:0;text-align:center;display:flex;justify-content:center;align-items:center;gap:22px;font-size:32px;font-weight:900}
.opening span{color:var(--yellow);font:900 50px var(--mono)}
.mode-pot{position:absolute;top:38%;left:0;right:0;text-align:center;font:800 22px var(--mono)}
.mode-pot b{font-size:48px;color:var(--yellow)}
.mode-cards{position:absolute;top:65%;left:0;right:0;display:flex;justify-content:center;gap:8px}
.mode-cards .card{width:82px;height:114px}
#mode-reveal small{display:block;font:13px/1.45 var(--body);color:var(--muted);margin-top:9px}
.real-hand,.mistake-real{font:13px/1.5 var(--body);color:var(--teal);overflow-wrap:anywhere}
.real-hand:not([hidden]){display:block;margin:10px 0;max-width:min(100%,50vw)}
.mistake-real{display:block;margin:0 0 14px;text-align:left}
.mode-delta{font:850 29px/1.25 var(--mono);margin-top:12px;color:var(--cream)}
.icm-prizes{position:absolute;top:0;left:0;right:0;text-align:center;font:850 25px var(--body);color:var(--yellow)}
.icm-seat{position:absolute;transform:translate(-50%,-50%);text-align:center;min-width:115px;padding:8px 14px;background:color-mix(in srgb,var(--raise-2) 92%,transparent);border:1px solid var(--raise-3);border-radius:9px}
.icm-seat span{display:block;font:800 17px var(--body)}
.icm-seat b{font:900 38px/1.1 var(--mono)}
.icm-seat small{font-size:17px;color:var(--muted)}
.icm-seat.you{border:2px solid var(--yellow);color:var(--yellow)}
.icm-seat.shover{border:2px solid var(--red)}
.icm-seat em{display:block;color:var(--red);font:900 19px var(--body)}
.icm-cards{position:absolute;top:43%;left:0;right:0;display:flex;gap:7px;justify-content:center}
.icm-verdict{font-size:30px;font-weight:900;color:var(--cream)}
.icm-verdict.flip{color:var(--yellow)}
.equity-duel{display:flex;align-items:center;justify-content:center;gap:28px;padding-top:24px}
.equity-duel>div>b{display:block;text-align:center;font:900 38px var(--mono);color:var(--yellow);margin-bottom:10px}
.equity-duel>div>div,.equity-board{display:flex;justify-content:center;gap:8px}
.equity-duel>strong{font:900 32px var(--mono);color:var(--muted)}
.equity-duel .card{width:82px;height:114px}
.equity-board{margin-top:28px}
.equity-board .card{width:66px;height:93px}
.equity-value{font:900 43px var(--mono);color:var(--yellow);margin:20px 0}
.equity-bar{height:34px;background:var(--red);border-radius:5px;overflow:hidden}
.equity-bar i{display:block;height:100%;background:var(--teal);transform-origin:left;animation:equity-fill .5s ease-out both}
.equity-labels{display:flex;justify-content:space-between;font:800 15px var(--mono);margin:10px 0}
@keyframes equity-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
/* Eight modes stay visible on a laptop. */
.mode-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.mode-card{min-height:215px;padding:25px 21px}
.mode-card h2{font-size:25px;max-width:90%}.mode-card p{font-size:14px;margin-bottom:24px}
@media(max-width:1100px){.mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.solver-panel:has(#mode-reveal .mode-delta) .grid-cell{aspect-ratio:1.9}

/* La partie réserve sa hauteur ; seule la correction peut défiler. */
@media(min-width:768px){
  .shell:has(#game-screen:not([hidden])){height:100dvh;min-height:0;overflow:clip}
  #game-screen:not([hidden]){flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;padding:8px 0}
  .game-screen .hud{height:clamp(64px,10dvh,98px);margin:0}
  .game-screen .score-block strong{font-size:clamp(46px,7dvh,74px)}
  .game-screen .clock-block strong{font-size:clamp(32px,5dvh,43px)}
  .game-screen .play-layout{min-height:0;grid-template-columns:minmax(0,1fr) clamp(270px,28vw,390px);gap:18px}
  .game-screen .arena{min-height:0;display:grid;grid-template-rows:32px minmax(0,1fr) auto}
  .game-screen .arena-top{height:32px}
  .game-screen .table-stage{height:auto;min-height:0;--card-height:clamp(64px,10dvh,106px)}
  .game-screen .board .card,.game-screen .mode-cards .card,.game-screen .equity-duel .card,.game-screen .icm-cards .card{
    height:var(--card-height);width:calc(var(--card-height)*.717)
  }
  .game-screen .hero-cards .card{height:calc(var(--card-height)*1.08);width:calc(var(--card-height)*.774)}
  .game-screen .card-corner,.game-screen .card-bottom{font-size:clamp(16px,2.4dvh,25px)}
  .game-screen .card-corner small,.game-screen .card-bottom small{font-size:clamp(11px,1.6dvh,17px)}
  .game-screen .card-suit,.game-screen .hero-cards .card-suit{font-size:clamp(30px,4.7dvh,51px)}
  .game-screen .decision-area{padding-top:8px}
  .game-screen .situation{height:clamp(96px,14dvh,140px);gap:4px 12px;margin-bottom:8px}
  .game-screen .matchup{font-size:clamp(16px,2.4dvh,26px)}
  .game-screen .effective>strong{font-size:clamp(22px,3dvh,32px)}
  .game-screen .facing{font-size:clamp(18px,2.6dvh,30px)}
  .game-screen .story-line{font-size:clamp(14px,1.9dvh,22px)}
  .game-screen .actions{min-height:clamp(64px,9dvh,80px)}
  .game-screen .action{padding:8px 7px}
  .game-screen .action-label{font-size:clamp(12px,1.5vw,15px)}
  .game-screen .source-line{margin-top:8px}
  .game-screen .coach{min-height:0;align-self:stretch;gap:10px}
  .game-screen .solver-panel{min-height:0;flex:1;overflow:visible}
  .game-screen .loss{font:clamp(12px,1.8dvh,15px)/1.35 var(--mono);margin:6px 0 4px;padding-top:6px}
  .game-screen .solver-panel:has(.loss:not([hidden])) .grid-cell,
  .game-screen .solver-panel:has(#mode-reveal .mode-delta) .grid-cell{aspect-ratio:2.6}
  .game-screen .result-top{margin-top:8px}
  .game-screen .result-top>strong{font-size:32px}
  .game-screen .why{font-size:10px;line-height:1.3;margin-top:5px}
  .game-screen .why p{margin-bottom:3px}
  .game-screen #mode-reveal{font-size:clamp(11px,1.4dvh,15px);line-height:1.25;margin:4px 0}
  .game-screen .mode-delta,.game-screen .icm-verdict{font-size:clamp(14px,2dvh,18px)}
  .game-screen .freq-row{font-size:9px;margin:4px 0 2px}
  .game-screen .freq-row b{font-size:9px}
  .game-screen .freq-bar{height:3px}
  .game-screen .result-board .card{width:22px;height:31px}
  .game-screen .result-board .card-corner{font-size:10px}
  .game-screen .result-board .card-corner small{font-size:8px}
  .game-screen .combo-card,.game-screen .streak-footer{flex-shrink:0}
  .game-screen #finish-run,.game-screen #back-results{margin:0 0 0 auto;padding:10px 20px}
  .game-screen .opening{font-size:clamp(22px,3dvh,32px)}
  .game-screen .opening span,.game-screen .mode-pot b,.game-screen .pot-display b{font-size:clamp(32px,4.7dvh,48px)}
  .game-screen .icm-seat{min-width:90px;padding:5px 8px}
  .game-screen .icm-seat b{font-size:clamp(24px,3.5dvh,38px)}
  .game-screen .icm-prizes{font-size:clamp(17px,2.3dvh,25px)}
  .game-screen .equity-duel{padding-top:12px;gap:18px}
  .game-screen .equity-duel>div>b{font-size:clamp(25px,3.5dvh,38px)}
  .game-screen .equity-board{margin-top:clamp(12px,2dvh,28px)}
  .game-screen .equity-board .card{height:calc(var(--card-height)*.88);width:calc(var(--card-height)*.623)}
}
.result-board{display:flex;align-items:center;gap:4px;margin-top:10px}
.result-board:empty{display:none}
.result-board .card{width:30px;height:42px;border-radius:4px;box-shadow:none;animation:none;transform:none}
.result-board .card-corner{left:4px;top:3px;font-size:13px}
.result-board .card-corner small{font-size:10px}
.result-board .card-suit,.result-board .card-bottom{display:none}
.result-sep{width:8px}
.site-nav{display:flex;gap:14px}.site-nav a{color:var(--muted);font:10px var(--mono);letter-spacing:1px;text-transform:uppercase;text-decoration:none}.site-nav a:hover,.site-nav a:focus-visible{color:var(--teal)}
@media(max-width:599px){.topbar{gap:10px}.site-nav a+a{display:none}}

.why{font-size:14px;line-height:1.45;color:var(--cream);margin-top:10px}
.why p{margin:0 0 8px}

/* Keep desktop corrections readable while the range uses spare panel height. */
.next-hand{width:100%;margin-top:10px;padding:13px 16px;border:1px solid var(--accent);border-radius:7px;background:var(--yellow);color:var(--accent-ink);font-size:16px;font-weight:850}
.next-hand kbd{font-size:12px;border-color:var(--line)}
.fullhand-controls{display:flex;gap:8px;margin-top:10px}
.fullhand-controls[hidden]{display:none}
.fullhand-controls .next-hand{width:auto;flex:1;min-height:48px;margin-top:0;padding:10px 12px;font-size:12px}
.fullhand-signal{font-size:18px;font-weight:850}
.fullhand-signal.perfect{color:var(--teal)}
.fullhand-signal.correct{color:var(--yellow)}
.fullhand-signal.error{color:var(--red)}
.fullhand-action{font-size:14px;font-weight:750}
body[data-mode="fullhand"] .fullhand-replay-seat{position:absolute;z-index:6;display:flex;min-width:58px;flex-direction:column;align-items:center;gap:3px;transform:translate(-50%,-50%);color:var(--text-1);text-align:center;font:700 11px/1.15 var(--mono);pointer-events:none}
.fullhand-seat-cards{display:flex;justify-content:center;height:43px;gap:4px}
.fullhand-seat-cards .card{width:35px;height:49px;padding:2px;transform:none}
body[data-mode="fullhand"] .opponent-seat{display:none}
.fullhand-replay-seat b,.fullhand-seat-stack,.fullhand-replay-status{padding:4px 6px;border:1px solid var(--raise-3);background:color-mix(in srgb,var(--raise-3) 95%,transparent);border-radius:5px;box-shadow:0 3px 8px color-mix(in srgb,var(--shadow-ink) 53%,transparent);white-space:nowrap}
.fullhand-seat-stack{color:var(--accent-text);font-size:10px}
.fullhand-replay-status{color:var(--accent-text);min-height:14px}
.fullhand-replay-status:empty{display:none}
.fullhand-replay-seat[data-player="hero"] .fullhand-replay-status{color:var(--accent-text)}
.fullhand-replay-seat[data-player="hero"]{left:22%;top:85%}
.fullhand-replay-seat[data-player="villain"]{left:78%;top:15%}
@media(max-width:650px){body[data-mode="fullhand"] .fullhand-replay-seat{font-size:10px}body[data-mode="fullhand"] .fullhand-replay-seat b,body[data-mode="fullhand"] .fullhand-seat-stack,body[data-mode="fullhand"] .fullhand-replay-status{padding:3px 4px}body[data-mode="fullhand"] .fullhand-seat-cards{height:46px;gap:3px}body[data-mode="fullhand"] .fullhand-seat-cards .card{width:32px;height:45px}.pot-display{top:19%}body[data-mode="fullhand"] .fullhand-replay-seat[data-player="villain"]{left:68%;top:max(6%,22px)}}
#fullhand-settings{display:flex;align-items:center;gap:12px;justify-content:center;margin:10px auto;padding:8px 12px}
#fullhand-settings[hidden]{display:none}
#fullhand-settings label,#fullhand-settings select{font-size:13px}
body[data-mode="fullhand"] #solver-panel .grid-cell{font-size:12px}
@media(min-width:768px){
  #game-screen .solver-panel.has-result{display:flex;flex-direction:column}
  #game-screen .solver-panel #solver-result{display:flex;flex:1;min-height:0;flex-direction:column}
  #game-screen .solver-panel .solver-head .eyebrow{font-size:12px}
  #game-screen .solver-panel .result-top>span{font-size:13px}
  #game-screen .solver-panel .result-board .card-corner,
  #game-screen .solver-panel .result-board .card-corner small{font-size:12px}
  #game-screen .solver-panel .loss,#game-screen .solver-panel .why,
  #game-screen .solver-panel .solver-sentence,#game-screen .solver-panel #mode-reveal,
  #game-screen .solver-panel .freq-row,#game-screen .solver-panel .freq-row b,
  #game-screen .solver-panel .grid-heading,#game-screen .solver-panel .grid-heading small,
  #game-screen .solver-panel .grid-legend{font-size:12px}
  #game-screen .solver-panel .why{line-height:1.3}
  #game-screen .solver-panel .why p{margin-bottom:3px}
  #game-screen .solver-panel .freq-row{margin:3px 0 2px}
  #game-screen .solver-panel .freq-bar{height:4px}
  #game-screen .solver-panel .range-grid{flex:1 1 auto;min-height:0;grid-template-rows:repeat(13,minmax(0,1fr))}
  #game-screen .solver-panel .grid-cell{aspect-ratio:auto;font-size:11px}
  #game-screen .solver-panel #frequencies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
  #game-screen .solver-panel .freq-row{margin:0 0 2px;gap:4px}
  #game-screen .solver-panel .freq-row>span{min-width:0}
  #game-screen .solver-panel .result-board{margin-top:5px}
  #game-screen .solver-panel .loss{margin-top:3px;padding-top:4px}
  #game-screen .solver-panel #mode-reveal{margin:2px 0}
  #game-screen .solver-panel .grid-heading{margin:4px 0}
  #game-screen .solver-panel .grid-legend{margin-top:4px}
}
.language-button{min-width:44px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font:700 13px var(--mono);cursor:pointer}

/* Les cartes appartiennent au siège actif, jamais à un emplacement décoratif. */
.table-stage:has(.replay-seat)>.opponent-seat{display:none}
.replay-cards{position:absolute;bottom:calc(100% + 5px);display:flex;gap:4px}
.replay-cards .card{width:32px;height:45px;padding:2px}
.replay-seat-top .replay-cards{bottom:auto;top:calc(100% + 5px)}
.opponent-seat:after{content:attr(data-pos);display:block;font:700 12px var(--mono);color:var(--cream)}
.hero-seat{left:50%;top:94%;padding:5px 9px;background:color-mix(in srgb,var(--raise-2) 95%,transparent);border:1px solid var(--raise-3);gap:8px}
.hero-seat .hero-position{font:700 12px var(--mono)}
.hero-seat .effective>strong{font:750 14px var(--mono)}
.hero-seat .effective>span,
.mode-hero-seat .effective>span,
.arena:has(.table-stage[data-mode="icm"]) .effective,
.arena:has(.table-stage:is([data-mode=""],[data-mode="icm"],[data-mode="reshove"])) .matchup,
.arena:has(.table-stage:is([data-mode=""],[data-mode="icm"],[data-mode="reshove"])) .facing{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.arena .situation{height:auto;min-height:0;margin:0;gap:0}
body[data-mode="fullhand"] .hero-seat{display:none}
.table-feedback.fullhand-signal{inset:57% auto auto 50%;transform:translateX(-50%);width:max-content;max-width:90%;padding:9px 14px;border-radius:7px;background:color-mix(in srgb,var(--raise-2) 96%,transparent);border:1px solid currentColor;box-shadow:0 4px 12px color-mix(in srgb,var(--shadow-ink) 47%,transparent);font:800 16px/1.3 var(--body)}
@media(max-width:599px){
  .game-screen .hero-seat{top:91%}
  .game-screen .hero-seat .effective>strong{font-size:13px}
  .game-screen .arena .situation{height:auto;margin:0;gap:0}
  .table-feedback.fullhand-signal{font-size:14px;padding:6px 10px}
}

.decision-area{position:relative}
.decision-area>.table-feedback.fullhand-signal{inset:0;transform:none;width:auto;max-width:none;min-height:48px}
body[data-mode="fullhand"] .fullhand-replay-seat[data-player="hero"]{left:50%!important;top:95%;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:90%}
.fullhand-replay-seat[data-player="hero"] .fullhand-seat-cards{display:none}

.mode-hero-seat{position:absolute;top:94%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;font:700 13px var(--mono);white-space:nowrap}
.mode-hero-seat .effective>strong{font:750 14px var(--mono)}

/* Numéros de parole et halo marquent qui parle pendant les décisions postflop ; les sièges du replay gardent leur position. */
.action-order{position:absolute;right:calc(100% + 6px);top:0;display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--accent);background:var(--felt-deep);color:var(--text-1);border-radius:50%;font:800 13px var(--body);font-style:normal}
.replaying .action-order{display:none}
.table-stage[data-hero-order] .hero-position,
body[data-mode="fullhand"] .table-stage[data-hero-order] .fullhand-replay-seat>b{position:absolute;width:1px;height:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
.table-stage[data-hero-order] .opponent-seat:after{display:none}
.ready-to-play #hero-cards{filter:drop-shadow(0 0 8px transparent)}
.ready-to-play .hero-seat,.ready-to-play .fullhand-replay-seat[data-player="hero"] .fullhand-seat-stack{border-color:var(--accent);box-shadow:0 0 12px transparent}

.custom-bet{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.custom-bet[hidden]{display:none}
.custom-bet label{font-size:12px;color:var(--muted)}
.custom-bet input{width:100px;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--cream);font:700 14px var(--body)}
.custom-bet button{min-height:44px;padding:8px 14px;border:1px solid var(--teal);border-radius:6px;background:var(--felt-deep);color:var(--cream);font-weight:750;cursor:pointer}
#custom-status{flex-basis:100%;font-size:12px;color:var(--cream)}
#custom-status:empty{display:none}
.actions.many-actions{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))}

@media(max-width:650px){
  .custom-bet{display:grid;grid-template-columns:minmax(0,1fr) 84px auto;gap:6px}
  .custom-bet input{width:100%;min-width:0}
  #custom-status{grid-column:1 / -1}
}
/* Les commandes natives gardent une rangée ; les cartes restent séparées sur écran court. */
@media(max-width:650px) and (max-height:650px){
  body[data-mode="fullhand"] .pot-display{top:15%;left:35%;gap:8px}
  body[data-mode="fullhand"] .pot-display b{font-size:28px}
  body[data-mode="fullhand"] .pot-display>span{font-size:12px}
  body[data-mode="fullhand"] .pot-display small{font-size:14px}
  body[data-mode="fullhand"] .pot-display .chip-stacks{display:none}
  body[data-mode="fullhand"] .fullhand-replay-seat[data-player="villain"]{left:70%}
  body[data-mode="fullhand"] .board .card{width:37px;height:52px}
  body[data-mode="fullhand"] .hero-cards .card{width:46px;height:64px}
}

/* Les cartes adverses préflop gardent chacune leur espace, sans éventail sous le badge. */
body:not([data-mode="fullhand"]) .table-stage[data-street="preflop"] .opponent-cards{gap:6px;height:auto}
body:not([data-mode="fullhand"]) .table-stage[data-street="preflop"] .opponent-cards .card{transform:none}
body:not([data-mode="fullhand"]) .table-stage[data-street="preflop"] .opponent-seat>span{margin-top:5px}

/* Le recentrage mobile du BTN postflop ne doit pas rejoindre les cartes du héros préflop. */
@media(max-width:650px){
  body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .replay-seat-hero-center[data-pos="BTN"]{top:12%}
}

/* Sans board préflop, le pot occupe le centre libre, loin des sièges. */
body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .pot-display{top:44%}
@media(orientation:landscape) and (max-height:500px){
  body:not([data-mode="fullhand"]) .table-stage[data-street="preflop"] .dealer-button{right:4%;top:6%}
  /* Deux rangées réservent le bas aux cartes, même avec six sièges ICM. */
  .game-screen .icm-seat{left:calc(16.67% + var(--seat-column)*33.33%)!important;top:calc(25% + var(--seat-row)*33%)!important}
  .game-screen .icm-seat{min-width:90px;padding:3px 6px}
  .game-screen .icm-seat span{font-size:12px}
  .game-screen .icm-seat b{font-size:22px}
  .game-screen .icm-seat small,.game-screen .icm-seat em{font-size:11px}
  .game-screen .icm-cards{top:75%}
  .game-screen .icm-cards .card{height:52px;width:37px}
  .game-screen .icm-prizes{font-size:11px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .topbar{height:44px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .game-screen .hud{height:32px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .game-screen .score-block strong{font-size:28px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .hud .eyebrow{display:none}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .play-layout{grid-template-columns:minmax(0,1fr) 180px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .arena{grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:24px minmax(0,1fr);column-gap:12px}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .arena-top{grid-column:1/-1}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .decision-area{padding-top:0}
  body:is([data-mode="nash"],[data-mode="reshove"],[data-mode="icm"]) .situation{height:auto;margin-bottom:4px}
  body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .pot-display{left:65%;top:30%;gap:6px}
  body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .pot-display b{font-size:24px}
  body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .replay-seat-villain{left:16%!important;top:25%!important}
  body:not([data-mode="fullhand"]) .game-screen .table-stage[data-street="preflop"] .replay-seat-villain .replay-cards{top:calc(100% + 5px);bottom:auto}
}

#custom-presets{display:flex;flex-wrap:wrap;gap:6px}
#custom-presets-menu{flex-basis:100%;grid-column:1/-1}
#custom-presets-menu summary{display:none}
#custom-range,#custom-status{flex-basis:100%;grid-column:1/-1}
.action-amount{display:block;font-size:12px;font-weight:400;opacity:.8}
@media(max-width:650px) and (max-height:650px){
  .custom-bet label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .custom-bet{position:relative;grid-template-columns:auto minmax(44px,1fr) auto auto;margin-top:4px;gap:4px}
  #custom-presets-menu{grid-column:auto;flex-basis:auto}
  #custom-presets-menu summary{display:block;min-width:44px;min-height:44px;padding:12px 5px;border:1px solid var(--teal);border-radius:6px;cursor:pointer}
  #custom-presets{flex-wrap:nowrap;overflow-x:auto;min-width:0}
  #custom-presets button{flex-shrink:0}
  #custom-presets-menu[open] .custom-sizes{position:absolute;bottom:100%;left:0;right:0;z-index:12;background:var(--panel);padding:6px;border:1px solid var(--teal);border-radius:6px}
  #custom-range{font-size:10px;line-height:12px}
  body[data-mode="fullhand"]:has(#custom-bet:not([hidden])) .fullhand-replay-seat[data-player="villain"]{
    left:84%;top:max(6%,28px)
  }
  body[data-mode="fullhand"] .pot-display{top:12%}
  body[data-mode="fullhand"] .hero-cards{top:66%}
  body[data-mode="fullhand"] .hero-cards .card{width:37px;height:52px}
}
