/* Hi-Lo : salon privé Pryve. Noir profond, cuir sang de bœuf, laiton et ivoire ; une table de feutre sous un spot.
   La scène (rideau, croupière, table, compteur, carte, réglette, cartes jouées) se dimensionne d'un bloc avec les unités
   de conteneur (cqw / cqh) de .hl-stage. Tout ce qui tourne en boucle n'anime que transform / opacity. */
:root {
  --bg: #080506;
  --panel: #171011;
  --panel-2: #110b0c;
  --panel-3: #0b0708;
  --border: #3b2a22;
  --border-light: #6b5334;
  --muted: #b5a696;
  --text: #f6efe2;
  --green: #c9a24e;
  --red: #e5193a;
  --orange: #9aa1ab;
  --accent: #d9b25f;
  --ink: #0a0708;
  --oxblood: #6b0f1d;
  --ruby: #e5193a;
  --ruby-hi: #ff6078;
  --brass: #c59a4a;
  --brass-hi: #f3dc9a;
  --brass-lo: #6f5220;
  --ivory: #f4ecd8;
  --chrome: #cfd6de;
  --card-red: #c1172b;
  --card-black: #17120f;
  --brass-grad: linear-gradient(180deg, #f6e3a6 0%, #c9a04f 24%, #8a6626 56%, #d8b566 80%, #7a5a22 100%);
  --mw: 50px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* didone pour les chiffres et les cartes ; repli sur Times (chiffres alignés), jamais sur une police à chiffres elzéviriens */
  --serif: "Bodoni 72", "Bodoni MT", Didot, "Playfair Display", "Times New Roman", Times, serif;
}
body { font-family: var(--font); --page-bg: radial-gradient(120% 70% at 50% 0%, #2a0a11 0%, #100608 46%, #080506 100%); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hl-sprite { position: absolute; }
kbd { font: 700 10px/1 var(--font); letter-spacing: .02em; }

/* ========= barre du haut, menu, modales : même matière ========= */
.topbar { background: linear-gradient(180deg, #1a1112, #0e090a); border-bottom: 1px solid #000; box-shadow: inset 0 -1px 0 rgba(197,154,74,.28); }
.logo .hl-logo { display: inline-flex; align-items: center; gap: 5px; font: italic 700 23px/1 var(--serif); letter-spacing: .01em; color: var(--ivory); }
.logo .hl-logo b { font-weight: 700; }
.logo .hl-logo .u { fill: var(--brass-hi); }
.logo .hl-logo .d { fill: var(--ruby); }
.topbar .balance { background: #0a0607; border: 1px solid rgba(197,154,74,.4); border-radius: 20px; padding: 6px 12px; color: var(--ivory); font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 3px rgba(0,0,0,.7); }
.topbar .balance .cur { color: var(--brass); }
.hub-link { border-color: rgba(197,154,74,.25); }
.avatar-btn { border-color: var(--border-light); }
.modal { border-color: rgba(197,154,74,.3); background: linear-gradient(180deg, #1b1213, #120c0d); }
.modal-head { background: linear-gradient(180deg, #2a1c18, #1d1312); box-shadow: inset 0 -1px 0 rgba(197,154,74,.3); }
.modal-title { font: 700 18px/1.2 var(--serif); letter-spacing: .01em; color: var(--ivory); }
.modal-body { color: #ded3c2; }
.modal-body h4 { color: var(--brass-hi); font-weight: 700; }
.modal-body b { color: var(--ivory); }
.btn { background: #2c201b; }
.btn.primary { background: var(--brass-grad); color: #1a1206; border-color: var(--brass); }
.btn.danger { background: #3a0b12; }
.modal input[type="radio"] { accent-color: #c59a4a; }
.step { background: var(--panel-2); box-shadow: inset 0 0 0 1px rgba(197,154,74,.14); }
.step .ico, .step .ico.g, .step .ico.r, .step .ico.o { background: radial-gradient(circle at 35% 28%, #2b1d18, #100a0b); color: var(--brass-hi); font: 700 26px/1 var(--serif); box-shadow: inset 0 0 0 2px var(--brass), 0 4px 10px rgba(0,0,0,.5); }
.kv .v, .fair-input input, .profile-field input { background: #0a0607; border-color: var(--border); }
.limits .row, .stat { background: var(--panel-2); }
.stat .v.pos, .mybets-table tr.won td { color: var(--brass-hi); }
.mybets-table td { border-bottom-color: #2a1d18; }
.avatar-grid button.active { border-color: var(--brass); }
.hl-verify code, .fair-rows code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #e7cf95; }
.fair-rows tr { cursor: pointer; }
.mybets-table tr[data-row]:hover td { background: rgba(197,154,74,.07); cursor: pointer; }
.hl-res.won { color: var(--brass-hi); }
.hl-res.lost { color: #ff6f86; }

/* ========= disposition générale : scène, puis pupitre ========= */
.hl { display: flex; flex-direction: column; gap: 8px; padding: 8px; width: 100%; max-width: 1560px; margin: 0 auto; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); min-height: 0; }
.hl-stage {
  --bw: 132px; --tt: 180px; --dh: 250px; --arc: 56px; --rail: 16px; --oh: 46px; --gapx: 80px;
  position: relative; flex: 1 1 0px; min-height: 0; overflow: hidden; isolation: isolate; border-radius: 16px;
  container-type: size; background: #0a0607; box-shadow: 0 0 0 1px rgba(197,154,74,.34), 0 0 0 4px #0a0607, 0 0 0 5px rgba(197,154,74,.12);
}
@supports (width: 1cqh) {
  .hl-stage { --bw: clamp(92px, min(23cqh, 20cqw), 190px); --tt: 31cqh; --dh: 46cqh; --arc: 8cqh; --oh: clamp(34px, 8.2cqh, 62px); --mw: clamp(40px, 7.6cqh, 58px); --gapx: calc(var(--bw) * .82); }
}

/* ---------- le salon : rideau de velours, appliques, cône du spot, enseignes qui dérivent ---------- */
.hl-room { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hl-drape { position: absolute; inset: 0; background:
    radial-gradient(120% 90% at 50% 8%, transparent 30%, rgba(0,0,0,.78) 100%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 2px, rgba(0,0,0,0) 2px 15px, rgba(255,150,150,.07) 22px, rgba(0,0,0,.34) 40px, rgba(0,0,0,0) 56px),
    linear-gradient(180deg, #6a101f 0%, #450913 34%, #1c060b 62%, #0a0607 100%); transition: filter .6s; }
.hl-sconce { position: absolute; top: 8%; width: 12px; height: 30px; border-radius: 3px 3px 9px 9px; background: var(--brass-grad); box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.hl-sconce.l { left: 9%; } .hl-sconce.r { right: 9%; }
.hl-sconce::before { content: ""; position: absolute; left: 50%; top: -34px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(255,205,130,.34), rgba(255,170,100,.1) 38%, transparent 68%); animation: hlGlow 5.5s ease-in-out infinite; }
.hl-sconce.r::before { animation-delay: -2.4s; }
.hl-sconce::after { content: ""; position: absolute; left: 50%; top: -15px; width: 18px; height: 17px; margin-left: -9px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 50% 62%, #fff8dc, #ffd58a 55%, #c78a35); box-shadow: 0 0 14px 3px rgba(255,205,130,.6); }
.hl-cone { position: absolute; left: 50%; top: -6%; width: 120%; height: 96%; margin-left: -60%; background: radial-gradient(ellipse 34% 74% at 50% 0%, rgba(255,226,178,.3), rgba(255,200,140,.09) 46%, transparent 72%); mix-blend-mode: screen; animation: hlGlow 9s ease-in-out infinite; transition: opacity .6s; }
/* série chaude : une lueur de braise monte de la table sur le rideau */
.hl-room::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 62% 56% at 50% var(--tt), rgba(255,140,50,.5), rgba(255,70,20,.16) 48%, transparent 76%); mix-blend-mode: screen; opacity: 0; transition: opacity 1.1s; }
.hl-stage[data-heat="1"] .hl-room::after { opacity: .22; }
.hl-stage[data-heat="2"] .hl-room::after { opacity: .5; }
.hl-stage[data-heat="3"] .hl-room::after { opacity: .8; }
.hl-stage[data-heat="4"] .hl-room::after { opacity: 1; }
.hl-suits { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--tt) + 14cqh); }
.hl-suits svg { position: absolute; bottom: -8%; left: var(--x); width: var(--s); height: var(--s); fill: var(--c); opacity: 0; animation: hlDrift var(--t) linear var(--dl) infinite; }

/* ---------- croupière ---------- */
.hl-dealer { position: absolute; left: 50%; top: calc(var(--tt) - var(--dh) * .655); width: calc(var(--dh) * .872); height: var(--dh); margin-left: calc(var(--dh) * -.436); z-index: 2; pointer-events: none; }
.hl-dealer-fig { position: absolute; inset: 0; transform-origin: 50% 70%; animation: hlBreath 5.2s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); transition: filter .5s; }
.hl-dealer-fig img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 0; }
/* la lumière du spot sur elle : chaude sur le haut, ombre vers la table ; découpée par sa silhouette */
.hl-dealer-light { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,214,160,.34) 0%, rgba(255,190,130,.08) 30%, rgba(20,4,6,.2) 52%, rgba(8,3,4,.74) 70%); mix-blend-mode: hard-light;
  -webkit-mask: url("../assets/tables/dealer-hilo.webp") 50% 0 / 100% 100% no-repeat; mask: url("../assets/tables/dealer-hilo.webp") 50% 0 / 100% 100% no-repeat; }
.hl-dealer.cheer .hl-dealer-fig { animation: hlCheer .75s cubic-bezier(.3,1.4,.5,1); }
.hl-dealer.pout .hl-dealer-fig { animation: hlPout 1.1s ease-out; }
.hl-dealer.nod .hl-dealer-fig { animation: hlNod .6s ease-out; }
.hl-stage[data-state="lost"] .hl-dealer-fig { filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) saturate(.6) brightness(.8); }
.hl-bubble { position: absolute; left: 80%; top: 17%; width: max-content; max-width: min(240px, 34cqw); padding: 8px 13px 9px; border-radius: 15px 15px 15px 4px; background: linear-gradient(180deg, #fffaf0, #efe4cd); color: #1c1210; font: italic 600 16px/1.2 var(--serif); box-shadow: 0 10px 22px rgba(0,0,0,.55), inset 0 0 0 1px rgba(111,82,32,.35); transform-origin: 0 100%; opacity: 0; transform: translateY(8px) scale(.6); transition: opacity .18s, transform .32s cubic-bezier(.2,1.5,.4,1); }
.hl-bubble::after { content: ""; position: absolute; left: -5px; bottom: 2px; width: 12px; height: 12px; background: #efe4cd; clip-path: polygon(100% 0, 0 100%, 100% 100%); }
.hl-bubble.show { opacity: 1; transform: none; }

/* ---------- table : bord en cuir piqué, jonc de laiton, feutre ---------- */
.hl-table { position: absolute; left: -9%; right: -9%; top: var(--tt); bottom: -2px; z-index: 3; pointer-events: none; border-radius: 50% 50% 0 0 / var(--arc) var(--arc) 0 0;
  background: radial-gradient(34% 34px at 50% 0, rgba(255,170,170,.55), transparent 78%), linear-gradient(180deg, #a01a2d 0, #6b0f1d 9px, #3a0810 22px, #2a060c 100%);
  box-shadow: 0 -1px 0 #000, 0 -16px 34px rgba(0,0,0,.6); }
.hl-table::before { content: ""; position: absolute; inset: 5px 0 0; border-radius: inherit; border-top: 1.5px dashed rgba(255,214,180,.36); }
.hl-felt { position: absolute; inset: var(--rail) 0 0; overflow: hidden; border-radius: inherit; border-top: 3px solid #d8b566;
  background:
    radial-gradient(ellipse 34% 58% at 50% 32%, rgba(255,222,172,.3), rgba(255,196,140,.1) 50%, transparent 78%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .93 0 0 0 0 .82 0 0 0 .5 -.2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 62% 86% at 50% 26%, transparent 34%, rgba(0,0,0,.72) 100%),
    linear-gradient(180deg, #2e2022 0%, #1e1517 38%, #100a0b 100%);
  box-shadow: inset 0 1px 0 rgba(255,244,200,.5), inset 0 5px 0 rgba(0,0,0,.55), inset 0 24px 34px rgba(0,0,0,.5); transition: filter .6s; }
/* filet doré imprimé dans le feutre, parallèle au bord */
.hl-felt::before { content: ""; position: absolute; inset: 15px 5% 0; border-radius: 50% 50% 0 0 / var(--arc) var(--arc) 0 0; border-top: 1px solid rgba(217,178,95,.42); }
.hl-felt-heat { position: absolute; inset: 0; background: radial-gradient(ellipse 40% 66% at 50% 30%, rgba(255,140,50,.62), rgba(255,80,30,.2) 50%, transparent 78%); mix-blend-mode: screen; opacity: 0; transition: opacity 1.1s; }
.hl-felt-sweep { position: absolute; top: -20%; bottom: -20%; left: 0; width: 22%; background: linear-gradient(100deg, transparent, rgba(255,236,196,.17) 50%, transparent); transform: translateX(-140%) skewX(-18deg); opacity: 0; }
.hl-stage[data-state="idle"] .hl-felt-sweep { opacity: 1; animation: hlSweep 7.5s ease-in-out infinite; }
.hl-stage[data-heat="1"] .hl-felt-heat { opacity: .3; }
.hl-stage[data-heat="2"] .hl-felt-heat { opacity: .58; }
.hl-stage[data-heat="3"] .hl-felt-heat { opacity: .84; }
.hl-stage[data-heat="4"] .hl-felt-heat { opacity: 1; }
.hl-stage[data-state="lost"] .hl-felt { filter: saturate(.5) brightness(.72); }
.hl-stage[data-state="lost"] .hl-cone { opacity: .35; }
.hl-stage[data-state="lost"] .hl-drape { filter: saturate(.55) brightness(.7); }

/* ---------- braises (série chaude), éclair plein cadre ---------- */
.hl-embers { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: none; }
.hl-embers i { position: absolute; left: var(--x); bottom: 6%; width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle, #fff6d0, #ffa040 50%, #ff5a14 100%); box-shadow: 0 0 9px 2px rgba(255,130,40,.75); opacity: 0; animation: hlEmber var(--t) linear var(--dl) infinite; }
.hl-stage[data-heat="2"] .hl-embers, .hl-stage[data-heat="3"] .hl-embers, .hl-stage[data-heat="4"] .hl-embers { display: block; }
.hl-stage[data-heat="2"] .hl-embers i:nth-child(n+8), .hl-stage[data-heat="3"] .hl-embers i:nth-child(n+15) { display: none; }
.hl-flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; }
.hl-flash.red { background: radial-gradient(ellipse 62% 62% at 50% 56%, rgba(229,25,58,0) 30%, rgba(229,25,58,.5) 100%); animation: hlFlash .75s ease-out; }
.hl-flash.gold { background: radial-gradient(ellipse 54% 52% at 50% 46%, rgba(255,220,130,.5), rgba(255,190,90,.12) 55%, transparent 76%); animation: hlFlash .95s ease-out; }
.hl-stage .toasts { top: 46px; left: 10px; right: 10px; align-items: flex-start; z-index: 7; }
.toast.error { background: #3a0b12; }
.toast.info { background: #1b1213; border-color: var(--brass); }

/* ---------- bandeau : historique des manches et seed serveur ---------- */
.hl-top { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 8; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
.hl-top > * { pointer-events: auto; }
.hl-history { flex: 0 1 34%; min-width: 0; }
.hl-history .history-bar { height: 30px; padding: 0 4px 0 10px; gap: 8px; border-radius: 15px; background: rgba(10,6,7,.66); box-shadow: inset 0 0 0 1px rgba(197,154,74,.26); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hl-history-ico { display: inline-flex; color: var(--brass); flex: 0 0 auto; }
.hl-history .history-chips { gap: 5px; align-items: center; }
.hl-history .history-chips:empty::before { content: attr(data-empty); font-size: 11px; color: var(--muted); white-space: nowrap; }
.hl-history .history-toggle { background: none; border: 0; border-radius: 50%; width: 24px; height: 24px; padding: 0; justify-content: center; color: var(--brass); }
.hl-history .history-toggle:hover, .hl-history .history-toggle.open { background: rgba(197,154,74,.16); color: var(--brass-hi); }
.hl-history .history-expanded { top: 36px; right: auto; width: min(420px, calc(100cqw - 16px)); background: #150e0f; border-color: rgba(197,154,74,.3); }
.hl-history .history-expanded .empty { width: 100%; }
.hl-history .chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; background: #150e0f; box-shadow: inset 0 0 0 1px rgba(197,154,74,.3); transition: transform .12s; }
.hl-history .chip:hover { outline: none; transform: translateY(-1px); }
.hl-history .chip.won { color: var(--brass-hi); }
.hl-history .chip.won.big { color: #1a1206; background: var(--brass-grad); box-shadow: none; }
.hl-history .chip.lost { color: #c9707d; box-shadow: inset 0 0 0 1px rgba(229,25,58,.28); }
.hl-history .history-bar .chip:first-child { animation: hlChipIn .34s cubic-bezier(.2,1.4,.4,1) both; }
.hl-hash { flex: 0 1 auto; min-width: 0; display: inline-flex; gap: 6px; align-items: center; height: 30px; font-size: 11px; color: var(--muted); padding: 0 12px 0 9px; border-radius: 15px; background: rgba(10,6,7,.66); box-shadow: inset 0 0 0 1px rgba(197,154,74,.26); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: color .15s, box-shadow .15s; white-space: nowrap; }
.hl-hash svg { color: var(--brass); flex: 0 0 auto; }
.hl-hash:hover { color: var(--ivory); box-shadow: inset 0 0 0 1px var(--brass); }
.hl-hash code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--brass-hi); overflow: hidden; text-overflow: ellipsis; }

/* ---------- tapis : grille des éléments de jeu ---------- */
.hl-lay { position: absolute; left: 0; right: 0; top: var(--tt); bottom: 0; z-index: 4; display: grid; justify-items: center; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: ". meter ." "lo card hi" "rule rule rule" "row row row"; row-gap: clamp(4px, 1.3cqh, 12px); padding: 0 12px clamp(6px, 1.6cqh, 14px); }
.hl-meter { grid-area: meter; }
.hl-slot { grid-area: card; }
.hl-cmd.lo { grid-area: lo; justify-self: end; margin-right: var(--gapx); }
.hl-cmd.hi { grid-area: hi; justify-self: start; margin-left: var(--gapx); }
/* « Skip » : sous le sabot, là d'où vient la carte de remplacement */
.hl-skip { position: absolute; z-index: 1; top: calc(clamp(34px, 6.5cqh, 62px) + var(--bw) * .616 + 22px); right: calc(max(18px, 6.5cqw) + var(--bw) * .22); translate: 50% 0; }
.hl-ruler { grid-area: rule; }
.hl-row-wrap { grid-area: row; }

/* ---------- dos de carte Pryve : treillis or sur sang de bœuf, médaillon au logo ---------- */
.hl-back { display: block; border-radius: calc(var(--cw) * .07); border: calc(var(--cw) * .05) solid #f6efdf;
  background:
    url("../assets/brand/p-logo.png") 50% 50% / 47% auto no-repeat,
    radial-gradient(circle closest-side at 50% 50%, #0d0809 0 57%, #f1d48a 58% 62%, #6f5220 63% 65%, transparent 66%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='none' stroke='%23f1d48a' stroke-width='1.3'%3E%3Cpath d='M12 0L24 12 12 24 0 12z' stroke-opacity='.62'/%3E%3Cpath d='M12 6l6 6-6 6-6-6z' stroke-opacity='.3'/%3E%3C/g%3E%3Cg fill='%23f1d48a'%3E%3Ccircle cx='12' cy='12' r='1.7' fill-opacity='.85'/%3E%3Ccircle cx='0' cy='0' r='1.6' fill-opacity='.6'/%3E%3Ccircle cx='24' cy='0' r='1.6' fill-opacity='.6'/%3E%3Ccircle cx='0' cy='24' r='1.6' fill-opacity='.6'/%3E%3Ccircle cx='24' cy='24' r='1.6' fill-opacity='.6'/%3E%3C/g%3E%3C/svg%3E") 50% 50% / 16.666% auto,
    linear-gradient(155deg, #a31c2f, #6b0f1d 55%, #40080f);
  box-shadow: inset 0 0 0 1px var(--brass), inset 0 0 0 calc(var(--cw) * .018) rgba(0,0,0,.25); }

/* ---------- sabot (à droite, d'où partent les cartes) et défausse (à gauche) ---------- */
.hl-shoe, .hl-discard { --cw: calc(var(--bw) * .44); position: absolute; top: clamp(34px, 6.5cqh, 62px); width: var(--cw); height: calc(var(--cw) * 1.4); z-index: 0; }
.hl-shoe { right: max(18px, 6.5cqw); transform: rotate(7deg); }
.hl-discard { left: max(18px, 6.5cqw); transform: rotate(-9deg); }
.hl-tray { position: absolute; inset: -14% -18% -16%; border-radius: 12%; background: linear-gradient(160deg, #1d1416, #0b0708); box-shadow: inset 0 0 0 1.5px rgba(197,154,74,.75), inset 0 0 0 4px rgba(0,0,0,.5), inset 0 8px 14px rgba(0,0,0,.7), 0 8px 16px rgba(0,0,0,.55); }
.hl-deck, .hl-pile { position: absolute; inset: 0; }
.hl-deck .hl-back, .hl-pile .hl-back { position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--brass), 0 1px 0 #cfc5ad, 0 2px 0 #8f8674, 0 3px 4px rgba(0,0,0,.5); }
.hl-deck .hl-back:nth-child(1) { transform: translate(3px, 4px); }
.hl-deck .hl-back:nth-child(2) { transform: translate(2px, 2.6px); }
.hl-deck .hl-back:nth-child(3) { transform: translate(1px, 1.3px); }
.hl-deck .hl-back.top { transform-origin: 50% 100%; }
.hl-shoe.pop .hl-back.top { animation: hlShoePop .34s ease-out; }
/* attente : le dessus du paquet se bat */
.hl-stage[data-state="idle"] .hl-deck .hl-back.top { animation: hlRiffle 4.6s ease-in-out infinite; }
.hl-stage[data-state="idle"] .hl-deck .hl-back:nth-child(3) { animation: hlRiffle2 4.6s ease-in-out infinite; }
.hl-pile .hl-back { transform: rotate(var(--r, 0deg)) translate(var(--px, 0), var(--py, 0)); }
.hl-pile .hl-back.in { animation: hlPileIn .3s ease-out both; }
.hl-discard:not(.has) .hl-pile { display: none; }

/* ---------- compteur : cadre de laiton, tambours qui roulent ---------- */
.hl-meter { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: calc((var(--oh) + 12px) * -.5); z-index: 3; }
/* halo de braise derrière le compteur, de plus en plus vif avec la série */
.hl-meter::before { content: ""; position: absolute; left: 50%; top: calc(var(--oh) * .5 + 6px); width: calc(var(--oh) * 7); height: calc(var(--oh) * 3.6); margin: calc(var(--oh) * -1.8) 0 0 calc(var(--oh) * -3.5); z-index: -1; pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,160,60,.7), rgba(255,90,20,.24) 42%, transparent 70%); opacity: 0; transition: opacity 1s; }
.hl-stage[data-heat="1"] .hl-meter::before { opacity: .35; }
.hl-stage[data-heat="2"] .hl-meter::before { opacity: .6; }
.hl-stage[data-heat="3"] .hl-meter::before { opacity: .85; animation: hlHalo 1.7s ease-in-out infinite; }
.hl-stage[data-heat="4"] .hl-meter::before { opacity: 1; animation: hlHalo 1.1s ease-in-out infinite; }
.hl-odo-frame { position: relative; display: flex; align-items: center; padding: 6px 15px; border-radius: 12px; background: var(--brass-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.45), 0 2px 0 #4a3613, 0 10px 22px rgba(0,0,0,.6); transition: transform .2s; }
.hl-screw { position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, #8a6626 60%, #4a3613); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.5); }
.hl-screw.l { left: 4.5px; } .hl-screw.r { right: 4.5px; }
.hl-odo { position: relative; display: flex; align-items: stretch; height: var(--oh); padding: 0 calc(var(--oh) * .16); border-radius: 7px; overflow: hidden; font: 700 calc(var(--oh) * .84)/1 var(--serif); color: #f8ecca; background: linear-gradient(180deg, #050304 0%, #1b1312 46%, #1b1312 54%, #050304 100%); box-shadow: inset 0 0 0 1px #000, inset 0 3px 8px rgba(0,0,0,.9); transition: color .5s; }
.hl-odo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, transparent 28%, rgba(255,255,255,.07) 46%, transparent 62%, rgba(0,0,0,.72) 100%); }
.hl-odo .d { position: relative; width: .6em; height: var(--oh); overflow: hidden; }
.hl-odo .d + .d { box-shadow: inset 1px 0 0 rgba(255,255,255,.05); }
.hl-odo .s { display: flex; flex-direction: column; transition: transform .7s cubic-bezier(.16,.9,.2,1); will-change: transform; }
.hl-odo .s i { flex: 0 0 var(--oh); height: var(--oh); display: flex; align-items: center; justify-content: center; font-style: normal; padding-top: .06em; }
.hl-odo .p { width: .26em; display: flex; align-items: flex-end; justify-content: center; padding-bottom: .16em; font-style: normal; }
.hl-odo .x { display: flex; align-items: center; padding: .04em 0 0 .1em; font: italic 700 .62em/1 var(--serif); font-style: italic; color: var(--brass); }
.hl-odo-crack { position: absolute; inset: 6px 15px; border-radius: 7px; opacity: 0; pointer-events: none; background:
    linear-gradient(115deg, transparent 48.6%, rgba(255,255,255,.75) 49.4%, rgba(255,255,255,.75) 50.2%, transparent 51%),
    linear-gradient(62deg, transparent 61%, rgba(255,255,255,.5) 61.7%, rgba(255,255,255,.5) 62.3%, transparent 63%),
    linear-gradient(160deg, transparent 30%, rgba(255,255,255,.4) 30.6%, rgba(255,255,255,.4) 31.2%, transparent 32%); }
.hl-meter-sub { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; text-shadow: 0 1px 2px #000; }
.hl-meter-sub em { font-style: normal; color: var(--ivory); font-variant-numeric: tabular-nums; }
.hl-meter.live .hl-odo { color: #ffe9a8; }
.hl-meter.live .hl-meter-sub em, .hl-meter.won .hl-meter-sub em { color: var(--brass-hi); }
.hl-meter.bump .hl-odo-frame { animation: hlBump .46s cubic-bezier(.2,1.6,.4,1); }
.hl-stage[data-heat="2"] .hl-odo { color: #ffd277; text-shadow: 0 0 12px rgba(255,170,60,.55); }
.hl-stage[data-heat="3"] .hl-odo { color: #ffb14e; text-shadow: 0 0 16px rgba(255,130,40,.8); }
.hl-stage[data-heat="4"] .hl-odo { color: #fff4d6; text-shadow: 0 0 10px #ffb14e, 0 0 24px rgba(255,110,30,.95); }
.hl-meter.won .hl-odo { color: #fff4d6; text-shadow: 0 0 14px rgba(255,214,120,.8); }
.hl-meter.lost .hl-odo { color: #7d5a5e; text-shadow: none; }
.hl-meter.lost .hl-odo-frame { filter: saturate(.45) brightness(.72); }
.hl-meter.lost .hl-odo-crack { opacity: 1; animation: hlCrack .3s steps(3) both; }
.hl-meter.lost .hl-meter-sub em { color: #ff6f86; }
.hl-meter.shatter .hl-odo .s { animation: hlDrop .5s cubic-bezier(.5,0,.9,.6) both; }
.hl-meter.shatter .hl-odo .d:nth-child(odd) .s { animation-name: hlDropB; animation-delay: .05s; }
.hl-meter.capped .hl-odo-frame { box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.45), 0 2px 0 #4a3613, 0 0 0 2px #fff4d6, 0 0 26px rgba(255,214,120,.7); }
/* série : badge à flamme accroché au compteur */
.hl-streak { position: absolute; left: calc(100% + 10px); top: 4px; display: inline-flex; align-items: center; gap: 4px; height: calc(var(--oh) + 4px); padding: 0 12px 0 8px; border-radius: 999px; white-space: nowrap; color: #1a0d05; background: linear-gradient(180deg, #ffd27a, #ff9a3c 60%, #e2581f); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px rgba(255,110,30,.4), 0 2px 0 #7a2c0c; font-size: 11px; font-weight: 700; line-height: 1.05; }
.hl-streak svg { width: 20px; height: 20px; fill: #7a1d05; flex: 0 0 auto; transform-origin: 50% 90%; animation: hlFlame 1.1s ease-in-out infinite; }
.hl-streak b { font: 700 22px/1 var(--serif); }
.hl-streak span { max-width: 52px; white-space: normal; }
.hl-streak.pop { animation: hlStreakPop .5s cubic-bezier(.2,1.7,.4,1); }
/* palier franchi : le chiffre jaillit du compteur */
.hl-mile { position: absolute; left: 50%; top: 50%; z-index: 4; pointer-events: none; opacity: 0; white-space: nowrap; font: italic 700 clamp(44px, 12cqh, 96px)/1 var(--serif); color: #fff4d6; text-shadow: 0 0 18px #ffb14e, 0 0 46px rgba(255,120,40,.9), 0 3px 0 #7a2c0c; transform: translate(-50%, -50%); }
.hl-mile.go { animation: hlMile 1.15s cubic-bezier(.2,.9,.3,1) both; }

/* ---------- carte courante : épaisseur, ombre, flottement, reflet, inclinaison au pointeur ---------- */
.hl-slot { position: relative; z-index: 4; align-self: stretch; justify-self: center; width: var(--bw); min-height: 0; display: grid; place-items: center; container-type: size; }
/* la carte prend toute la hauteur que la grille lui laisse (jamais plus large que son emplacement) : rien ne se chevauche,
   quelle que soit la hauteur de l'écran */
.hl-current { --bw: 132px; --cw: var(--bw); position: relative; width: var(--bw); height: calc(var(--bw) * 1.4); flex: 0 0 auto; }
@supports (width: 1cqh) { .hl-current { --bw: min(100cqw, 71.4cqh); } }
.hl-shadow { position: absolute; left: -8%; right: -8%; bottom: -9%; height: 16%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.72), rgba(0,0,0,.3) 45%, transparent 72%); animation: hlShadow 5s ease-in-out infinite; }
.hl-current::before { content: ""; position: absolute; inset: -22% -34%; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse, rgba(255,150,60,.5), rgba(255,90,20,.14) 46%, transparent 70%); opacity: 0; transition: opacity 1s; }
.hl-stage[data-heat="2"] .hl-current::before { opacity: .45; }
.hl-stage[data-heat="3"] .hl-current::before { opacity: .75; }
.hl-stage[data-heat="4"] .hl-current::before { opacity: 1; }
.hl-stage[data-attract] .hl-current::before { opacity: 0; }
.hl-big { position: absolute; inset: 0; perspective: 900px; }
.hl-big.away { opacity: 0; transition: opacity .18s; }
.hl-float, .hl-tilt, .hl-flip { position: absolute; inset: 0; transform-style: preserve-3d; }
.hl-float { animation: hlFloat 5s ease-in-out infinite; }
.hl-tilt { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out; }
.hl-flip.deal { animation: hlDeal .5s both; }
.hl-current.shake .hl-big { animation: hlShake .5s cubic-bezier(.36,.07,.19,.97) both; }
.hl-face { position: absolute; inset: 0; overflow: hidden; border-radius: calc(var(--cw) * .07); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.hl-face.front { background: linear-gradient(158deg, #fffdf7 0%, #f8f1e2 52%, #e7dcc6 100%); color: var(--card-black); box-shadow: inset 0 0 0 1px rgba(70,50,20,.2), inset 0 1px 0 #fff, 0 1px 0 #d6ccb5, 0 2px 0 #b9af98, 0 3px 0 #8f8674, 0 16px 26px rgba(0,0,0,.5); transition: filter .5s; }
.hl-face.back { transform: rotateY(180deg); box-shadow: inset 0 0 0 1px var(--brass), 0 1px 0 #d6ccb5, 0 2px 0 #b9af98, 0 3px 0 #8f8674, 0 16px 26px rgba(0,0,0,.5); }
/* reflet qui traverse la carte de temps en temps, et brillance qui suit le pointeur */
.hl-big .hl-face.front::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 46%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.62) 50%, transparent); transform: translateX(-160%) skewX(-16deg); animation: hlSheen 5.4s ease-in-out infinite; pointer-events: none; }
.hl-big .hl-face.front::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 12%), rgba(255,255,255,.5), transparent 46%); opacity: var(--go, 0); transition: opacity .3s; mix-blend-mode: soft-light; }
.cf { position: absolute; inset: 0; width: 100%; height: 100%; display: block; fill: currentColor; }
.cf.red { color: var(--card-red); }
.cf.blk { color: var(--card-black); }
.cf text { font-family: var(--serif); font-weight: 700; }
.cf .ct { fill: #fff6dc; stroke: #6f5220; stroke-width: .8px; paint-order: stroke; }
.cf .brand { font-size: 12px; letter-spacing: 5.5px; fill: #9a7a3a; }
.hl-stage[data-state="lost"] .hl-big .hl-face.front { filter: grayscale(.8) brightness(.6) contrast(.94); }
.hl-stage[data-state="lost"] .hl-float, .hl-stage[data-state="lost"] .hl-shadow, .hl-stage[data-state="lost"] .hl-big .hl-face.front::after { animation: none; }
.hl-stage[data-state="won"] .hl-big .hl-face.front { box-shadow: inset 0 0 0 1px rgba(70,50,20,.2), 0 0 0 3px #f3dc9a, 0 0 0 4px #6f5220, 0 0 38px 6px rgba(255,214,120,.6), 0 16px 26px rgba(0,0,0,.5); }
/* anneau du bon choix */
.hl-ring { position: absolute; inset: -6%; z-index: 3; border-radius: calc(var(--bw) * .11); pointer-events: none; opacity: 0; box-shadow: 0 0 0 3px #f3dc9a, 0 0 26px 6px rgba(255,214,120,.75), inset 0 0 22px rgba(255,214,120,.5); }
.hl-ring.go { animation: hlRing .7s cubic-bezier(.2,.8,.3,1) both; }
/* carte fantôme : l'ancienne carte qui part vers la rangée ou la défausse */
.hl-ghost { --cw: var(--gw, var(--bw)); position: absolute; z-index: 5; pointer-events: none; will-change: transform, opacity; }
/* verdict posé au pied de la carte */
.hl-verdict { position: absolute; left: 50%; bottom: -15px; z-index: 4; transform: translateX(-50%) rotate(-3deg); display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; padding: 6px 14px 7px; border-radius: 8px; font-size: 13px; font-weight: 700; animation: hlStamp .42s cubic-bezier(.2,1.6,.4,1) both; }
.hl-verdict b { font: 700 19px/1 var(--serif); }
.hl-verdict.won { background: var(--brass-grad); color: #1a1206; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px #4a3613, 0 8px 18px rgba(0,0,0,.5), 0 0 22px rgba(255,214,120,.45); }
.hl-verdict.won small { font: 700 10px/1 var(--font); letter-spacing: .04em; opacity: .75; }
.hl-verdict.lost { background: linear-gradient(180deg, #8f1424, #570a15); color: #ffe1e5; box-shadow: inset 0 0 0 1px rgba(255,120,140,.5), 0 8px 18px rgba(0,0,0,.55); }
.hl-verdict.lost b { font-size: 16px; font-style: italic; }

/* ---------- attente : cinq cartes en éventail qui respirent ---------- */
.hl-fan { position: absolute; inset: 0; display: none; transform: translateY(-1%) scale(var(--fs, .84)); transform-origin: 50% 62%; }
.hl-stage[data-state="idle"] .hl-meter-sub, .hl-stage:not([data-state="playing"]) .hl-skip { visibility: hidden; }
.hl-stage[data-attract] .hl-fan { display: block; }
.hl-stage[data-attract] .hl-big, .hl-stage[data-attract] .hl-shadow { opacity: 0; }
.hl-fan-c { position: absolute; inset: 0; transform-origin: 50% 132%; transform: rotate(calc(var(--i) * var(--fa, 12deg))); animation: hlFanIn .7s cubic-bezier(.2,1.1,.3,1) both, hlFan 6.4s ease-in-out .7s infinite; animation-delay: calc((var(--i) + 2) * .05s), calc(.7s + (var(--i) + 2) * .16s); }
.hl-fan-c .hl-face.front { box-shadow: inset 0 0 0 1px rgba(70,50,20,.2), inset 0 1px 0 #fff, 0 1px 0 #d6ccb5, 0 2px 0 #8f8674, -6px 10px 18px rgba(0,0,0,.45); }
.hl-fan-c:nth-child(5) .hl-face.front::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 46%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6) 50%, transparent); transform: translateX(-160%) skewX(-16deg); animation: hlSheen 5.4s ease-in-out 1.2s infinite; }
.hl-fan.out .hl-fan-c { animation: hlFanOut .26s ease-in both; animation-delay: calc((2 - var(--i)) * .012s); }

/* ---------- commandes Higher / Lower : touches de verre éclairées, serties de laiton ---------- */
.hl-cmd { --c: var(--brass-hi); --c2: #b8862f; --glow: 255, 205, 110; position: relative; isolation: isolate; display: grid; justify-items: center; align-content: center; gap: 4px; width: clamp(132px, 15.5cqw, 214px); min-height: clamp(128px, 29cqh, 208px); padding: 12px 12px 16px; border-radius: 22px; color: var(--ivory); text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 42%), linear-gradient(180deg, #1c1415, #0b0708);
  box-shadow: 0 2px 0 #000, 0 14px 26px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.14); transition: transform .12s, opacity .3s, filter .3s; }
.hl-cmd.lo { --c: var(--ruby-hi); --c2: #a50f25; --glow: 255, 50, 84; }
.hl-cmd.same { --c: #eef2f6; --c2: #8b939e; --glow: 220, 230, 245; }
.hl-cmd::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(120% 80% at 50% 0%, rgba(var(--glow), .5), rgba(var(--glow), .1) 55%, transparent 80%); opacity: .16; transition: opacity .35s; }
.hl-cmd::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(180deg, var(--c), var(--c2) 60%, rgba(0,0,0,.2)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; opacity: .55; pointer-events: none; transition: opacity .35s; }
.hl-cmd-pulse { position: absolute; inset: -3px; z-index: -2; border-radius: 25px; box-shadow: 0 0 0 2px rgba(var(--glow), .7), 0 0 22px 2px rgba(var(--glow), .5); opacity: 0; }
.hl-cmd-arrow { display: block; width: clamp(30px, 6cqh, 44px); height: clamp(30px, 6cqh, 44px); color: var(--c); filter: drop-shadow(0 0 6px rgba(var(--glow), .6)); }
.hl-cmd-arrow svg { width: 100%; height: 100%; display: block; }
.hl-cmd-arrow path { fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.hl-cmd > span, .hl-cmd > b { min-width: 0; max-width: 100%; }
.hl-cmd-lbl { font-size: 13px; font-weight: 600; line-height: 1.15; color: rgba(244,236,216,.82); }
.hl-cmd-pct { font: 700 clamp(26px, 5.8cqh, 42px)/1 var(--serif); color: var(--c); font-variant-numeric: lining-nums; letter-spacing: -.01em; text-shadow: 0 0 16px rgba(var(--glow), .35); }
.hl-cmd-meta { display: inline-flex; align-items: baseline; gap: 7px; margin-top: 2px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.5); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl-cmd-meta b { font-weight: 800; color: var(--ivory); }
.hl-cmd-meta em { font-style: normal; font-weight: 600; color: var(--c); }
.hl-cmd-meta em:empty { display: none; }
.hl-cmd-gauge { position: absolute; left: 16px; right: 16px; bottom: 7px; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,.1); }
.hl-cmd-gauge i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--c2), var(--c)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .5s cubic-bezier(.2,.9,.3,1); }
.hl-cmd.lo .hl-cmd-gauge i { transform-origin: 100% 50%; }
.hl-cmd kbd, .hl-skip kbd, .bet-btn kbd { display: none; }
.hl-cmd:disabled { opacity: .5; }
.hl-cmd:not(:disabled)::before { opacity: 1; }
.hl-cmd:not(:disabled)::after { opacity: 1; }
.hl-cmd:not(:disabled):active { transform: scale(.97); }
/* à toi de jouer : halo qui bat, chevrons qui montent ou descendent */
.hl-stage.ready .hl-cmd:not(:disabled) .hl-cmd-pulse { animation: hlPulse 1.9s ease-out infinite; }
.hl-stage.ready .hl-cmd.lo:not(:disabled) .hl-cmd-pulse { animation-delay: .95s; }
.hl-stage.ready .hl-cmd:not(:disabled) .hl-cmd-arrow path { animation: hlChevUp 1.3s ease-in-out infinite; }
.hl-stage.ready .hl-cmd.lo:not(:disabled) .hl-cmd-arrow path { animation-name: hlChevDown; }
.hl-stage.ready .hl-cmd.same:not(:disabled) .hl-cmd-arrow path { animation-name: hlChevEq; }
.hl-cmd-arrow path:nth-child(2) { animation-delay: .14s !important; }
.hl-cmd-arrow path:nth-child(3) { animation-delay: .28s !important; }
/* pendant la donne : les chances de la carte qui arrive restent voilées */
.hl-stage.dealing .hl-cmd { pointer-events: none; }
.hl-stage.dealing .hl-cmd-pct, .hl-stage.dealing .hl-cmd-meta { opacity: .25; }
.hl-cmd-pct, .hl-cmd-meta { transition: opacity .2s; }
.hl-cmd.picked { animation: hlPicked .4s ease-out; }
.hl-skip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #dfe4ea; background: linear-gradient(180deg, #343a42, #171a1e); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 0 1px rgba(207,214,222,.3), 0 2px 0 #000, 0 6px 12px rgba(0,0,0,.5); transition: opacity .3s, transform .1s, filter .15s; white-space: nowrap; }
.hl-skip .short { display: none; }
.hl-skip:not(:disabled):active { transform: scale(.96); }
.hl-skip:disabled { opacity: .38; }

/* ---------- réglette des rangs ---------- */
.hl-ruler { width: min(100%, 660px); display: flex; flex-direction: column; gap: 7px; }
.hl-ruler-tags { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 16px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hl-ruler-tags .lo { color: var(--ruby-hi); min-width: 96px; text-align: left; }
.hl-ruler-tags .hi { color: var(--brass-hi); min-width: 96px; text-align: right; }
.hl-ruler-tags .eq, .hl-ruler-tags .eq b { color: #e6ebf0; }
.hl-ruler-tags b { margin-left: 1px; }
.hl-ruler-tags small { font-size: 10px; font-weight: 600; color: var(--muted); margin: 0 4px; }
.hl-ruler-ends { display: inline-flex; gap: 20px; font: italic 600 12px/1 var(--serif); letter-spacing: .04em; color: rgba(217,178,95,.62); }
/* manche terminée : le verdict est posé à cet endroit */
.hl-stage[data-state="won"] .hl-ruler-ends, .hl-stage[data-state="lost"] .hl-ruler-ends { visibility: hidden; }
.hl-ruler-ends em:first-child::before { content: "◂ "; font-style: normal; }
.hl-ruler-ends em:last-child::after { content: " ▸"; font-style: normal; }
.hl-ruler-track { position: relative; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); height: clamp(30px, 5.6cqh, 40px); padding: 3px; border-radius: 10px; background: linear-gradient(180deg, #070405, #171011); box-shadow: inset 0 0 0 1px rgba(197,154,74,.5), inset 0 2px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.06), 0 8px 16px rgba(0,0,0,.4); }
.hl-ruler-track i { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 1px; border-radius: 6px; font: 700 clamp(13px, 2.6cqh, 17px)/1 var(--serif); font-style: normal; color: rgba(244,236,216,.4); background: rgba(255,255,255,.035); overflow: hidden; transition: color .3s; transition-delay: calc(var(--d, 0) * 26ms); }
.hl-ruler-track i::before, .hl-ruler-track i::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .32s; transition-delay: calc(var(--d, 0) * 26ms); }
.hl-ruler-track i::before { background: linear-gradient(180deg, #ff5670, #b3122a); }
.hl-ruler-track i::after { background: linear-gradient(180deg, #f8e4a4, #c59a4a); }
.hl-ruler-track i b { position: relative; z-index: 1; font-weight: 700; }
.hl-ruler-track i.lo { color: #fff; } .hl-ruler-track i.lo::before { opacity: 1; }
.hl-ruler-track i.hi { color: #1a1206; } .hl-ruler-track i.hi::after { opacity: 1; }
.hl-ruler-track i.cur { color: #1a1206; background: linear-gradient(90deg, #ff5670 0 50%, #f8e4a4 50% 100%); }
.hl-ruler-track i.cur.eq-lo { background: linear-gradient(180deg, #f4f7fa, #a9b1bb); }
.hl-ruler-track i.cur.eq-hi { background: linear-gradient(180deg, #f4f7fa, #a9b1bb); }
.hl-ruler-track i.dim::before, .hl-ruler-track i.dim::after { opacity: .22; }
.hl-ruler-track i.dim { color: rgba(244,236,216,.55); }
.hl-ruler-track i.hit { animation: hlCell .6s ease-out; }
.hl-ruler-track i.miss { color: #fff; background: #3a0b12; box-shadow: inset 0 0 0 2px var(--ruby); animation: hlCell .6s ease-out; }
.hl-ruler-track i.miss::before, .hl-ruler-track i.miss::after { opacity: 0; }
/* curseur de laiton sur la carte courante */
.hl-ruler-cur { position: absolute; top: -4px; bottom: -4px; left: 3px; width: calc((100% - 6px) / 13); border-radius: 9px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 2px #fff4d6, 0 0 0 3.5px #6f5220, 0 0 16px rgba(255,236,170,.75); transform: translateX(calc(var(--pos, 6) * 100%)); transition: transform .5s cubic-bezier(.3,1.35,.45,1), opacity .25s; }
.hl-ruler.on .hl-ruler-cur { opacity: 1; }
/* attente : guirlande qui court de l'As au Roi */
.hl-ruler.idle .hl-ruler-track i::after { animation: hlChase 3.9s ease-in-out infinite; animation-delay: calc(var(--n) * .11s); }
.hl-ruler.idle .hl-ruler-tags .lo, .hl-ruler.idle .hl-ruler-tags .hi { visibility: hidden; }

/* ---------- cartes jouées ---------- */
.hl-row-wrap { position: relative; width: min(100%, 760px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; min-height: calc(var(--mw) * 1.4 + 26px); border-radius: 12px; background: linear-gradient(180deg, rgba(217,178,95,.0), rgba(217,178,95,.05)); box-shadow: inset 0 -1px 0 rgba(217,178,95,.3), inset 1px 0 0 rgba(217,178,95,.12), inset -1px 0 0 rgba(217,178,95,.12); }
.hl-row-wrap::-webkit-scrollbar { display: none; }
.hl-row { display: flex; gap: calc(var(--mw) * .2); width: max-content; min-width: 100%; justify-content: center; padding: 20px 10px 5px; }
/* emplacements imprimés dans le feutre tant que rien n'est joué */
.hl-row-wrap.bare .hl-row::before { content: ""; flex: 0 0 auto; width: calc(var(--mw) * 8.2); max-width: 100%; height: calc(var(--mw) * 1.4); opacity: .8;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 70' preserveAspectRatio='none'%3E%3Crect x='5.5' y='.75' width='49' height='68.5' rx='5' fill='none' stroke='%23d9b25f' stroke-opacity='.34' stroke-width='1.2' stroke-dasharray='4 4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 50% 0 / calc(var(--mw) * 1.2) 100% repeat-x; }
.hl-card { position: relative; flex: 0 0 auto; width: var(--mw); height: calc(var(--mw) * 1.4); border-radius: calc(var(--mw) * .1); background: linear-gradient(158deg, #fffdf7, #f6eedd 58%, #e4d9c2); color: var(--card-black); box-shadow: inset 0 0 0 1px rgba(70,50,20,.22), 0 1px 0 #cfc5ad, 0 2px 0 #8f8674, 0 7px 10px rgba(0,0,0,.5); }
.hl-card.red { color: var(--card-red); }
.hl-card .rk { position: absolute; top: 6%; left: 9%; font: 700 calc(var(--mw) * .4)/1 var(--serif); letter-spacing: -.05em; }
.hl-card svg { display: block; fill: currentColor; }
.hl-card .st { position: absolute; top: 37%; left: 10%; width: 25%; height: auto; aspect-ratio: 1; }
.hl-card .wm { position: absolute; right: 8%; bottom: 6%; width: 50%; height: auto; aspect-ratio: 1; }
.hl-card .cp { position: absolute; right: 8%; bottom: 6%; width: 54%; height: 42%; border-radius: 14%; display: flex; align-items: center; justify-content: center; background: #1a1516; box-shadow: inset 0 0 0 1px var(--brass); }
.hl-card.red .cp { background: #8c1424; }
.hl-card .cp svg { width: 80%; height: auto; aspect-ratio: 100 / 64; }
.hl-card.in { animation: hlMiniIn .3s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--dl, 0s); }
.hl-card.dead { outline: 2px solid var(--ruby); outline-offset: 1px; filter: saturate(.7); }
/* annotation du choix fait depuis la carte : flèche or (plus haut) ou rubis (plus bas), « = », ou carte passée */
.hl-card .tag { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 2px; height: 19px; padding: 0 6px; border-radius: 10px; font: 800 10px/1 var(--font); font-style: normal; white-space: nowrap; background: #120c0d; box-shadow: inset 0 0 0 1px rgba(197,154,74,.4), 0 2px 5px rgba(0,0,0,.5); color: var(--ivory); z-index: 1; font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s; }
.hl-card .tag svg { width: 11px; height: 11px; flex: 0 0 auto; fill: none; }
.hl-card .tag.hi { color: var(--brass-hi); }
.hl-card .tag.lo { color: var(--ruby-hi); }
.hl-card .tag.eq { color: #e6ebf0; }
.hl-card .tag.win.hi { background: var(--brass-grad); color: #1a1206; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.hl-card .tag.win.lo { background: linear-gradient(180deg, #ff5670, #b3122a); color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.hl-card .tag.win.eq { background: linear-gradient(180deg, #f4f7fa, #a9b1bb); color: #14171a; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.hl-card .tag.lose { background: #2a0a10; color: #ff8fa0; box-shadow: inset 0 0 0 1px var(--ruby); text-decoration: line-through; }
.hl-card .tag.skip { width: 22px; padding: 0; justify-content: center; color: var(--chrome); }
.hl-card .tag.skip svg { fill: currentColor; }

/* ========= pupitre de mise : cuir sombre, puits de laiton, jetons ========= */
.hl-panel { position: relative; flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) minmax(0, 1fr); align-items: center; gap: 10px 22px; padding: 10px 18px 11px; border-radius: 16px;
  background: radial-gradient(60% 120% at 50% 0%, rgba(160,26,45,.3), transparent 70%), linear-gradient(180deg, #221516, #130c0d 60%, #0c0708);
  box-shadow: inset 0 0 0 1px rgba(197,154,74,.34), inset 0 1px 0 rgba(255,255,255,.08), 0 10px 26px rgba(0,0,0,.5); }
.hl-panel::before { content: ""; position: absolute; inset: 4px; border-radius: 12px; border: 1px dashed rgba(255,214,180,.14); pointer-events: none; }
.hl-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; justify-self: start; width: 100%; max-width: 440px; transition: opacity .3s; }
.hl-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.hl-label-r { font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(181,166,150,.7); }
.hl-stake { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* jetons : tranche à inserts, cercle intérieur, valeur gravée */
.hl-chips { display: flex; gap: 7px; flex: 0 0 auto; }
.hl-chips button { --c: #f1e7d0; --c2: #b9ae95; --ink: #2a1d12; position: relative; width: 40px; height: 40px; border-radius: 50%; font: 800 13px/1 var(--font); color: var(--ink); font-variant-numeric: tabular-nums;
  background: radial-gradient(circle, var(--c) 0 50%, rgba(0,0,0,.34) 51% 54%, transparent 55%), repeating-conic-gradient(from 11.25deg, var(--c2) 0 30deg, #fbf5e6 30deg 45deg);
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.42), inset 0 2px 1px rgba(255,255,255,.4), 0 2px 0 rgba(0,0,0,.75), 0 5px 9px rgba(0,0,0,.55); transition: transform .16s cubic-bezier(.3,1.6,.5,1), box-shadow .16s; }
.hl-chips button[data-set="5"] { --c: #d21b36; --c2: #96102a; --ink: #fff; }
.hl-chips button[data-set="10"] { --c: #2b3038; --c2: #15181c; --ink: #e6ebf0; }
.hl-chips button[data-set="50"] { --c: #e7c36a; --c2: #8a6626; --ink: #2a1a04; }
.hl-chips button.active { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.42), inset 0 2px 1px rgba(255,255,255,.4), 0 0 0 2px #fff4d6, 0 6px 0 rgba(0,0,0,.6), 0 12px 14px rgba(0,0,0,.5); }
.hl-chips button.drop { animation: hlChipDrop .42s cubic-bezier(.3,1.5,.5,1); }
.hl-amount { flex: 1 1 auto; min-width: 0; display: flex; height: 42px; border-radius: 12px; overflow: hidden; background: #070405; box-shadow: inset 0 0 0 1px rgba(197,154,74,.5), inset 0 3px 8px rgba(0,0,0,.9); transition: box-shadow .15s; }
.hl-amount:focus-within { box-shadow: inset 0 0 0 1.5px var(--brass-hi), inset 0 3px 8px rgba(0,0,0,.9), 0 0 0 3px rgba(197,154,74,.18); }
.hl-panel .amount-box { flex: 1; min-width: 0; height: 100%; padding: 0 6px 0 11px; gap: 7px; border: 0; border-radius: 0; background: transparent; }
.hl-panel .amount-input { text-align: left; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ivory); }
.ic-coin { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff6c2, #f5c531 50%, #b87a06); box-shadow: inset 0 0 0 1.5px rgba(140,90,0,.55); }
.hl-mod { flex: 0 0 auto; width: 46px; margin: 4px 4px 4px 0; border-radius: 8px; background: var(--brass-grad); color: #1a1206; font-size: 14px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 0 #000; transition: filter .12s, transform .08s; }
.hl-mod + .hl-mod { margin-left: -1px; }
.hl-mod:active { transform: translateY(1px); filter: brightness(.9); }
.locked #amountField { opacity: .42; pointer-events: none; }
/* Bet (rubis) / Cashout (or) */
.hl-actions { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hl-actions .bet-btn { position: relative; width: 100%; min-height: 60px; flex: 0 0 auto; border-radius: 16px; flex-direction: row; gap: 12px; text-shadow: none; transition: transform .08s, filter .15s, opacity .2s; }
.hl-actions .bet-btn .bet-btn-label { font-size: 17px; font-weight: 800; letter-spacing: .08em; }
.hl-actions .bet-btn .bet-btn-amount { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-actions .bet-btn.bet { color: #fff6ee; background: linear-gradient(180deg, #ff4460 0%, #e5193a 38%, #a50f25 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 1.5px #f3dc9a, 0 0 0 3px #4a3613, 0 4px 0 3px #1a0508, 0 12px 22px rgba(229,25,58,.34); }
.hl-actions .bet-btn.bet:not(:disabled)::after { content: ""; position: absolute; inset: -5px; border-radius: 21px; box-shadow: 0 0 0 2px rgba(255,96,120,.55), 0 0 26px 4px rgba(229,25,58,.5); opacity: 0; animation: hlBetGlow 2.4s ease-in-out infinite; pointer-events: none; }
.hl-actions .bet-btn.bet:hover { background: linear-gradient(180deg, #ff5c75 0%, #f02245 38%, #b3122a 100%); }
.hl-actions .bet-btn.cashout { color: #1a1206; background: linear-gradient(180deg, #fff3c4 0%, #f1d48a 22%, #c9a04f 62%, #a47b2e 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -3px 0 rgba(0,0,0,.2), 0 0 0 1.5px #fff4d6, 0 0 0 3px #4a3613, 0 4px 0 3px #1a1206, 0 12px 24px rgba(255,200,90,.3); }
.hl-actions .bet-btn.cashout:hover { background: linear-gradient(180deg, #fff8d8 0%, #f6dc98 22%, #d3aa57 62%, #ad8434 100%); }
.hl-actions .bet-btn.cashout .bet-btn-amount { font: 700 22px/1 var(--serif); }
.hl-actions .bet-btn.cashout.grow .bet-btn-amount { animation: hlGrow .5s cubic-bezier(.2,1.6,.4,1); }
.hl-actions .bet-btn.cashout.max { animation: hlMaxPulse 1.2s ease-in-out infinite; }
.hl-actions .bet-btn:active { transform: translateY(2px); }
.hl-actions .bet-btn:disabled { pointer-events: none; filter: saturate(.35) brightness(.6); }
.hl-panel-hint { font-size: 11px; color: var(--muted); text-align: center; min-height: 14px; line-height: 1.3; margin-top: 4px; }
/* lectures de profit : addition à points de conduite */
.hl-reads { display: flex; flex-direction: column; gap: 5px; min-width: 0; justify-self: end; width: 100%; max-width: 380px; }
.hl-read { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.hl-read .k { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-read i { flex: 1 1 12px; min-width: 12px; height: 1px; align-self: center; margin-top: 4px; background: repeating-linear-gradient(90deg, rgba(197,154,74,.45) 0 2px, transparent 2px 6px); }
.hl-read b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ivory); white-space: nowrap; }
.hl-read.hi b { color: var(--brass-hi); }
.hl-read.lo b { color: var(--ruby-hi); }
.hl-read.same b { color: #e6ebf0; }
.hl-read.total { padding-top: 5px; border-top: 1px solid rgba(197,154,74,.22); }
.hl-read.total b { font: 700 18px/1 var(--serif); color: var(--brass-hi); }

/* clavier : anneau de focus net sur toutes les commandes */
.hl-cmd:focus-visible, .hl-skip:focus-visible, .hl-actions .bet-btn:focus-visible, .hl-chips button:focus-visible, .hl-mod:focus-visible, .hl-hash:focus-visible, .hl-history .chip:focus-visible, .hl-history .history-toggle:focus-visible { outline: 2px solid #fff4d6; outline-offset: 3px; }

/* ========= modales propres au jeu ========= */
.hl-seq { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 2px 6px; margin-bottom: 10px; --mw: 46px; }

/* ========= ordinateur : raccourcis visibles, survols ========= */
@media (hover: hover) and (pointer: fine) {
  .hl-cmd kbd, .hl-skip kbd, .bet-btn kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; color: rgba(244,236,216,.7); background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
  .hl-cmd kbd { position: absolute; top: 10px; right: 10px; }
  .bet-btn kbd { position: absolute; top: 7px; right: 9px; height: 16px; min-width: 0; font-size: 9px; color: inherit; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); opacity: .8; }
  .hl-cmd:not(:disabled):hover { transform: translateY(-3px); filter: brightness(1.12); }
  .hl-skip:not(:disabled):hover { filter: brightness(1.25); }
  .hl-chips button:hover { transform: translateY(-3px); }
  .hl-mod:hover { filter: brightness(1.1); }
}
@container (max-width: 1120px) { .hl-skip .full { display: none; } .hl-skip .short { display: block; } .hl-skip { right: max(12px, 2cqw); translate: none; } }
@media (min-width: 1500px) and (min-height: 940px) { .hl-bubble { font-size: 18px; } .hl-cmd-lbl { font-size: 14px; } }

/* ========= téléphone en portrait : les commandes passent sur l'accoudoir de la table, le pupitre s'empile dessous ========= */
@media (max-width: 820px) and (min-height: 521px) {
  .hl { height: auto; min-height: calc(100vh - var(--topbar-h)); min-height: calc(100dvh - var(--topbar-h)); padding: 5px; gap: 6px; }
  .hl-stage { flex: 1 1 0px; min-height: 452px; border-radius: 14px; }
  @supports (width: 1cqh) { .hl-stage { --bw: clamp(88px, 31cqw, 156px); --tt: 22cqh; --dh: 33cqh; --arc: 5cqh; --rail: 13px; --oh: clamp(32px, 6.4cqh, 44px); --mw: clamp(38px, 7.4cqh, 50px); } }
  .hl-top { top: 6px; left: 6px; right: 6px; }
  .hl-stage .toasts { top: auto; bottom: 104px; align-items: center; }
  .hl-history { flex: 1 1 auto; }
  .hl-history .history-expanded { width: calc(100cqw - 12px); }
  .hl-hash span { display: none; }
  .hl-hash { padding: 0 10px 0 8px; max-width: 132px; }
  .hl-sconce.l { left: 6%; } .hl-sconce.r { right: 6%; }
  .hl-sconce::before { width: 180px; height: 180px; margin-left: -90px; }
  .hl-bubble { left: 84%; top: 20%; max-width: 34cqw; font-size: 14px; padding: 6px 10px 7px; }
  .hl-lay { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "meter meter meter" "card card card" "rule rule rule" "row row row" "lo skip hi"; column-gap: 8px; row-gap: clamp(3px, 1cqh, 8px); padding: 0 8px 9px; }
  /* accoudoir : bande de cuir piqué sous le feutre, où reposent les commandes */
  .hl-lay::before { content: ""; grid-area: 5 / 1 / 6 / -1; align-self: stretch; justify-self: stretch; margin: -7px -8px -9px; z-index: -1;
    background: linear-gradient(180deg, #000 0, #3a0810 2px, #7d1424 7px, #4a0a14 44%, #24050a 100%); box-shadow: inset 0 3px 0 -1px rgba(216,181,102,.9), inset 0 12px 14px -8px rgba(255,170,170,.3); border-top: 1px solid #000; }
  .hl-lay::after { content: ""; grid-area: 5 / 1 / 6 / -1; align-self: start; justify-self: stretch; margin: 2px 6px 0; border-top: 1.5px dashed rgba(255,214,180,.3); z-index: -1; }
  .hl-shoe, .hl-discard { --cw: calc(var(--bw) * .42); top: clamp(26px, 5.5cqh, 44px); }
  .hl-shoe { right: 14px; } .hl-discard { left: 14px; }
  .hl-fan { --fs: .74; transform: translateY(-3%) scale(var(--fs)); }
  .hl-fan-c { --fa: 9.5deg; }
  .hl-streak { left: calc(100% + 6px); padding: 0 9px 0 6px; }
  .hl-streak span { display: none; }
  .hl-cmd.lo, .hl-cmd.hi { justify-self: stretch; margin: 0; width: auto; min-height: 76px; padding: 8px 8px 12px; border-radius: 16px; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "arrow lbl" "arrow pct" "meta meta"; justify-items: start; column-gap: 6px; row-gap: 1px; align-items: center; text-align: left; margin-top: 7px; }
  .hl-cmd.hi { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lbl arrow" "pct arrow" "meta meta"; justify-items: end; text-align: right; }
  .hl-cmd-pulse { border-radius: 19px; }
  .hl-cmd-arrow { grid-area: arrow; width: 30px; height: 30px; }
  .hl-cmd-lbl { grid-area: lbl; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .hl-cmd-pct { grid-area: pct; font-size: 24px; }
  .hl-cmd-meta { grid-area: meta; justify-self: stretch; justify-content: space-between; margin-top: 3px; padding: 3px 8px; font-size: 11px; gap: 4px; }
  .hl-cmd-gauge { left: 12px; right: 12px; bottom: 5px; height: 2px; }
  .hl-stage:not([data-state="playing"]) .hl-skip { visibility: visible; }
  .hl-skip { grid-area: skip; position: static; translate: none; flex-direction: column; gap: 2px; width: 54px; height: 54px; padding: 0; border-radius: 50%; font-size: 9px; line-height: 1; margin-top: 7px; white-space: normal; text-align: center; }
  .hl-skip svg { width: 18px; height: 18px; }
  .hl-skip .full { display: none; }
  .hl-skip .short { display: block; }
  .hl-ruler { gap: 4px; }
  .hl-ruler-tags { font-size: 11px; min-height: 14px; }
  .hl-ruler-tags .lo, .hl-ruler-tags .hi { min-width: 74px; }
  .hl-ruler-tags .lo > span, .hl-ruler-tags .hi > span { display: none; }
  .hl-ruler-ends { display: none; }
  .hl-ruler-track { padding: 2px; border-radius: 9px; }
  .hl-ruler-track i { margin: 0 .5px; border-radius: 5px; }
  .hl-ruler-cur { left: 2px; width: calc((100% - 4px) / 13); }
  .hl-row { padding: 19px 6px 3px; }
  .hl-card .tag { top: -16px; height: 17px; font-size: 9px; padding: 0 5px; }
  .hl-verdict { font-size: 12px; padding: 5px 11px 6px; }
  .hl-verdict b { font-size: 17px; }
  .hl-panel { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 9px 10px 10px; border-radius: 14px; }
  .hl-field, .hl-reads { max-width: none; }
  .hl-label { display: none; }
  .hl-stake { gap: 8px; }
  .hl-chips { gap: 5px; }
  .hl-chips button { width: 36px; height: 36px; font-size: 12px; }
  .hl-amount { height: 40px; }
  .hl-mod { width: 40px; }
  .hl-actions .bet-btn { min-height: 56px; }
  .hl-reads { flex-direction: row; gap: 8px; }
  .hl-read { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 10px; }
  .hl-read i { display: none; }
  .hl-read b, .hl-read.total b { font: 700 13px/1.1 var(--font); }
  .hl-read.total { padding: 0 0 0 8px; border-top: 0; border-left: 1px solid rgba(197,154,74,.22); }
  .modal-body .mybets-table { font-size: 11px; }
  .modal-body .mybets-table td, .modal-body .mybets-table th { padding: 4px 3px; }
}
@media (max-width: 820px) and (min-height: 521px) and (max-height: 730px) {
  .hl-stage { min-height: 430px; --tt: 100px; --dh: 146px; --arc: 20px; }
  .hl-meter-sub, .hl-ruler-tags, .hl-reads, .hl-panel-hint { display: none; }
  .hl-bubble { top: 26%; font-size: 13px; }
  .hl-cmd.lo, .hl-cmd.hi { min-height: 64px; padding: 6px 8px 10px; }
  .hl-cmd-pct { font-size: 21px; }
  .hl-cmd-arrow { width: 26px; height: 26px; }
  .hl-skip { width: 48px; height: 48px; }
  .hl-row { padding-top: 18px; }
}
@media (max-width: 820px) and (min-height: 521px) and (max-width: 359px) {
  .hl-chips button { width: 32px; height: 32px; font-size: 11px; }
  .hl-mod { width: 34px; }
  .hl-skip { width: 46px; height: 46px; }
}

/* ========= téléphone en paysage : scène à gauche, pupitre à droite ; la croupière laisse la place à la table ========= */
@media (orientation: landscape) and (max-height: 520px) {
  .logo .hl-logo { font-size: 19px; }
  .hl { flex-direction: row; gap: 5px; padding: 4px; max-width: none; }
  .hl-stage { border-radius: 12px; --rail: 9px; }
  @supports (width: 1cqh) { .hl-stage { --bw: clamp(84px, 19cqw, 140px); --tt: 3cqh; --arc: 7cqh; --oh: clamp(26px, 9cqh, 36px); --mw: clamp(34px, 11cqh, 42px); --gapx: calc(var(--bw) * .5); } }
  .hl-dealer, .hl-sconce, .hl-suits, .hl-table::before { display: none; }
  .hl-fan { --fs: .8; }
  .hl-fan-c { --fa: 10deg; }
  .hl-top { top: 5px; left: 5px; right: 5px; }
  .hl-history .history-bar, .hl-hash { height: 24px; }
  .hl-history .chip { height: 17px; font-size: 10px; padding: 0 6px; }
  .hl-history .history-expanded { top: 28px; max-height: 70cqh; }
  .hl-hash span { display: none; }
  .hl-hash { font-size: 10px; }
  .hl-stage .toasts { top: auto; bottom: 8px; align-items: center; }
  .hl-lay { top: 30px; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "meter card ." "lo card hi" "rule rule rule" "row row row"; row-gap: 3px; padding: 0 8px 4px; }
  .hl-meter { margin-top: 4px; grid-area: meter; justify-self: end; margin-right: var(--gapx); align-self: end; }
  .hl-odo-frame { padding: 4px 11px; border-radius: 9px; }
  .hl-odo-crack { inset: 4px 11px; }
  .hl-screw { width: 4px; height: 4px; margin-top: -2px; } .hl-screw.l { left: 3.5px; } .hl-screw.r { right: 3.5px; }
  .hl-meter-sub { font-size: 10px; }
  .hl-streak { left: calc(100% + 6px); right: auto; top: calc(50% - 12px); height: 24px; padding: 0 7px 0 4px; z-index: 2; }      /* à droite du compteur : au-dessus, il passait sous la barre d'historique */
  .hl-streak span { display: none; }
  .hl-streak b { font-size: 17px; }
  .hl-streak svg { width: 16px; height: 16px; }
  .hl-slot { grid-row: 1 / span 2; grid-column: 2; margin-top: 6px; }
  .hl-cmd { width: clamp(118px, 24cqw, 150px); min-height: 0; padding: 6px 8px 11px; border-radius: 15px; gap: 1px; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "arrow lbl" "arrow pct" "meta meta"; justify-items: start; column-gap: 6px; text-align: left; align-self: start; }
  .hl-cmd-pulse { border-radius: 18px; }
  .hl-cmd-arrow { grid-area: arrow; width: 26px; height: 26px; align-self: center; }
  .hl-cmd-lbl { grid-area: lbl; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .hl-cmd-pct { grid-area: pct; font-size: 20px; }
  .hl-cmd-meta { grid-area: meta; justify-self: stretch; justify-content: space-between; padding: 2px 7px; font-size: 10px; margin-top: 2px; }
  .hl-cmd-gauge { left: 11px; right: 11px; bottom: 4px; height: 2px; }
  .hl-shoe { --cw: calc(var(--bw) * .32); top: 5px; right: 14px; }
  .hl-shoe .hl-tray { display: none; }
  .hl-discard { display: none; }
  .hl-skip { top: auto; right: 8px; bottom: 8px; translate: none; z-index: 3; flex-direction: column; gap: 1px; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 8px; line-height: 1; }
  .hl-skip svg { width: 16px; height: 16px; }
  .hl-skip .full { display: none; }
  .hl-skip .short { display: block; }
  .hl-ruler { width: min(100%, 520px); gap: 2px; }
  .hl-ruler-tags { font-size: 10px; min-height: 12px; }
  .hl-ruler-ends { display: none; }
  .hl-ruler-track { height: 24px; padding: 2px; border-radius: 8px; }
  .hl-ruler-track i { font-size: 12px; border-radius: 5px; margin: 0 .5px; }
  .hl-ruler-cur { top: -3px; bottom: -3px; left: 2px; width: calc((100% - 4px) / 13); }
  .hl-row-wrap { width: calc(100% - 104px); min-height: calc(var(--mw) * 1.4 + 20px); }
  .hl-row { padding: 16px 4px 2px; }
  .hl-card .tag { top: -14px; height: 15px; font-size: 8.5px; padding: 0 4px; }
  .hl-card .tag svg { width: 9px; height: 9px; }
  .hl-verdict { bottom: -9px; font-size: 11px; padding: 4px 9px 5px; }
  .hl-verdict b { font-size: 14px; }
  .hl-mile { font-size: 22cqh; }
  .hl-panel { flex: 0 0 248px; width: 248px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; align-items: start; gap: 6px; padding: 8px 9px; border-radius: 12px; overflow-y: auto; scrollbar-width: none; }
  .hl-panel::-webkit-scrollbar { display: none; }
  .hl-field, .hl-reads { max-width: none; }
  .hl-label { font-size: 10px; }
  .hl-stake { flex-direction: column; align-items: stretch; gap: 6px; }
  .hl-chips { justify-content: space-between; }
  .hl-chips button { width: 34px; height: 34px; font-size: 11px; }
  .hl-amount { height: 34px; flex: 0 0 auto; border-radius: 10px; }
  .hl-panel .amount-input { font-size: 14px; }
  .hl-mod { width: 38px; margin: 3px 3px 3px 0; font-size: 12px; }
  .hl-reads { order: 2; align-self: center; gap: 3px; }
  .hl-read { font-size: 10px; }
  .hl-read b { font-size: 12px; }
  .hl-read.total { padding-top: 3px; }
  .hl-read.total b { font-size: 15px; }
  .hl-actions { order: 3; }
  .hl-actions .bet-btn { min-height: 52px; border-radius: 13px; gap: 8px; }
  .hl-actions .bet-btn .bet-btn-label { font-size: 14px; }
  .hl-actions .bet-btn .bet-btn-amount { font-size: 14px; }
  .hl-actions .bet-btn.cashout .bet-btn-amount { font-size: 18px; }
  .hl-panel-hint { display: none; }
}

/* ========= animations ========= */
@keyframes hlGlow { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes hlDrift { 0% { transform: translate3d(0, 0, 0) rotate(var(--r0)); opacity: 0; } 12% { opacity: var(--o); } 80% { opacity: var(--o); } 100% { transform: translate3d(var(--dx), calc((var(--tt) + 24cqh) * -1), 0) rotate(var(--r1)); opacity: 0; } }
@keyframes hlBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012) translateY(-.4%); } }
@keyframes hlCheer { 0% { transform: none; } 30% { transform: translateY(-4%) rotate(-2deg) scale(1.03); filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) brightness(1.14); } 62% { transform: translateY(.6%) rotate(1.2deg); } 100% { transform: none; } }
@keyframes hlPout { 0% { transform: none; } 22% { transform: translateY(1.6%) rotate(2.4deg); } 70% { transform: translateY(1.2%) rotate(1.6deg); } 100% { transform: none; } }
@keyframes hlNod { 0% { transform: none; } 40% { transform: translateY(1.4%) rotate(-.8deg); } 100% { transform: none; } }
@keyframes hlSweep { 0%, 55% { transform: translateX(-140%) skewX(-18deg); } 100% { transform: translateX(620%) skewX(-18deg); } }
@keyframes hlEmber { 0% { transform: translate3d(0, 0, 0) scale(.5); opacity: 0; } 10% { opacity: .95; } 70% { opacity: .7; } 100% { transform: translate3d(var(--dx), -70cqh, 0) scale(.2); opacity: 0; } }
@keyframes hlFlash { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hlChipIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hlShoePop { 0% { transform: none; } 40% { transform: translate(-22%, 16%) rotate(-10deg); opacity: .4; } 41% { transform: none; opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes hlRiffle { 0%, 62%, 100% { transform: none; } 68% { transform: translate(-14%, -6%) rotate(-7deg); } 74% { transform: translate(10%, -3%) rotate(5deg); } 80% { transform: translate(-6%, -2%) rotate(-3deg); } 88% { transform: none; } }
@keyframes hlRiffle2 { 0%, 64%, 100% { transform: translate(1px, 1.3px); } 71% { transform: translate(12%, -2%) rotate(6deg); } 78% { transform: translate(-9%, -3%) rotate(-5deg); } 86% { transform: translate(1px, 1.3px); } }
@keyframes hlPileIn { from { transform: translate(60%, 40%) rotate(40deg) scale(1.3); opacity: 0; } }
@keyframes hlHalo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12, 1.2); } }
@keyframes hlBump { 0% { transform: scale(1); } 38% { transform: scale(1.13); } 100% { transform: scale(1); } }
@keyframes hlCrack { from { opacity: 0; } to { opacity: 1; } }
@keyframes hlDrop { 0% { transform: translateY(var(--y, 0)); opacity: 1; } 100% { transform: translateY(calc(var(--y, 0%) + 14%)) rotate(14deg); opacity: 0; } }
@keyframes hlDropB { 0% { transform: translateY(var(--y, 0)); opacity: 1; } 100% { transform: translateY(calc(var(--y, 0%) + 16%)) rotate(-18deg); opacity: 0; } }
@keyframes hlFlame { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.14, 1.2) rotate(4deg); } }
@keyframes hlStreakPop { 0% { transform: scale(.3) rotate(-14deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes hlMile { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 16% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; } 30% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 70% { transform: translate(-50%, -62%) scale(1.04); opacity: 1; } 100% { transform: translate(-50%, -110%) scale(1.3); opacity: 0; } }
@keyframes hlFloat { 0%, 100% { transform: translate3d(0, 0, 0) rotateZ(-.6deg); } 50% { transform: translate3d(0, -3.2%, 0) rotateZ(.6deg); } }
@keyframes hlShadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.88); opacity: .72; } }
/* la donne : la carte quitte le sabot face cachée, arrive au-dessus de sa place, puis se retourne */
@keyframes hlDeal {
  0% { transform: translate3d(var(--sx, 200px), var(--sy, -120px), 0) rotateZ(26deg) rotateY(180deg) scale(.44); animation-timing-function: cubic-bezier(.2,.75,.3,1); }
  52% { transform: translate3d(0, -7%, 40px) rotateZ(-3deg) rotateY(180deg) scale(1.05); animation-timing-function: cubic-bezier(.45,0,.3,1.25); }
  100% { transform: none; }
}
@keyframes hlShake { 10%, 90% { transform: translateX(-2%); } 20%, 80% { transform: translateX(4%) rotate(1.2deg); } 30%, 50%, 70% { transform: translateX(-6%) rotate(-1.6deg); } 40%, 60% { transform: translateX(6%) rotate(1.4deg); } }
@keyframes hlSheen { 0%, 64% { transform: translateX(-160%) skewX(-16deg); } 100% { transform: translateX(340%) skewX(-16deg); } }
@keyframes hlRing { 0% { transform: scale(.82); opacity: 0; } 22% { opacity: 1; } 100% { transform: scale(1.42); opacity: 0; } }
@keyframes hlStamp { 0% { transform: translateX(-50%) rotate(-12deg) scale(2); opacity: 0; } 100% { transform: translateX(-50%) rotate(-3deg) scale(1); opacity: 1; } }
@keyframes hlFanIn { from { transform: rotate(0deg) translateY(10%) scale(.86); opacity: 0; } to { transform: rotate(calc(var(--i) * var(--fa, 12deg))); opacity: 1; } }
@keyframes hlFan { 0%, 100% { transform: rotate(calc(var(--i) * var(--fa, 12deg))); } 50% { transform: rotate(calc(var(--i) * var(--fa, 12deg) * 1.16)) translateY(-2.4%); } }
@keyframes hlFanOut { from { transform: rotate(calc(var(--i) * var(--fa, 12deg))); opacity: 1; } to { transform: translate3d(var(--ox, -200px), var(--oy, -120px), 0) rotate(-30deg) scale(.4); opacity: 0; } }
@keyframes hlPulse { 0% { transform: scale(.97); opacity: .9; } 70% { transform: scale(1.07, 1.1); opacity: 0; } 100% { transform: scale(1.07, 1.1); opacity: 0; } }
@keyframes hlChevUp { 0%, 100% { opacity: .35; transform: translateY(2px); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes hlChevDown { 0%, 100% { opacity: .35; transform: translateY(-2px); } 40% { opacity: 1; transform: translateY(2px); } }
@keyframes hlChevEq { 0%, 100% { opacity: .5; } 40% { opacity: 1; } }
@keyframes hlPicked { 0% { filter: brightness(1.9); transform: scale(.95); } 100% { filter: none; transform: none; } }
@keyframes hlCell { 0% { transform: scale(1.5); filter: brightness(1.8); } 100% { transform: none; filter: none; } }
@keyframes hlChase { 0%, 100% { opacity: 0; } 12% { opacity: .85; } 30% { opacity: 0; } }
@keyframes hlMiniIn { from { transform: translateY(-40%) scale(1.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hlChipDrop { 0% { transform: translateY(-14px) rotate(-14deg); } 55% { transform: translateY(2px); } 100% { transform: translateY(-4px); } }
@keyframes hlGrow { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes hlBetGlow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes hlMaxPulse { 0%, 100% { filter: brightness(1); transform: scale(1); } 50% { filter: brightness(1.22); transform: scale(1.025); } }

/* ========= mouvement réduit (réglage système, ou « Animation » coupée dans le profil) : plus de boucles, états lisibles ========= */
@media (prefers-reduced-motion: reduce) {
  .hl-stage *, .hl-stage *::before, .hl-stage *::after, .hl-panel *, .hl-panel *::before, .hl-panel *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
  .hl-suits, .hl-embers, .hl-felt-sweep { display: none !important; }
  .hl-fan-c { transform: rotate(calc(var(--i) * var(--fa, 12deg))); }
}
.hl-calm .hl-stage *, .hl-calm .hl-stage *::before, .hl-calm .hl-stage *::after, .hl-calm .hl-panel *, .hl-calm .hl-panel *::before, .hl-calm .hl-panel *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
.hl-calm .hl-suits, .hl-calm .hl-embers, .hl-calm .hl-felt-sweep { display: none !important; }
