/* Adaptation du système validé au moteur réel. Aucun contrôle de revue dans le jeu. */
.live-board{display:block!important;max-width:100%;padding:0!important;object-fit:fill;touch-action:none}
.live-next{display:block;width:56px;height:168px;max-width:100%;margin:8px auto;background:#10102a}
.live-hold{display:block;width:56px;height:56px;max-width:100%;margin:8px auto;background:#10102a}
.battle-central .live-next{height:140px;width:47px}.battle-central .live-hold{height:47px;width:47px}
.control-pressed{background:var(--gold)!important;color:#172437!important;transform:translateY(2px)}
.footer-action{border:0;background:none;color:var(--muted);min-height:44px;font:11px var(--font-body);cursor:pointer}
.header-actions[hidden]{display:none}.journey-toast{pointer-events:none;bottom:max(16px,env(safe-area-inset-bottom))}
.journey-screen.scene-enter{animation:screen-enter 150ms ease-out}.journey-art[data-motion=attack] .fighter-svg{animation:arena-strike 520ms ease-out}.journey-art[data-motion=hurt] .fighter-svg{animation:arena-hit 620ms ease-out}.journey-art[data-motion=win] .fighter-svg{animation:arena-win 600ms ease-out}
@keyframes screen-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes arena-strike{20%{transform:translateX(-5%) scale(.96)}45%{transform:translateX(7%) scale(1.04)}100%{transform:none}}
@keyframes arena-hit{20%{transform:translateX(-8%) rotate(-5deg)}100%{transform:none}}
@keyframes arena-win{35%{transform:translateY(-12px)}100%{transform:none}}
@media(max-width:760px){.piece-rail .live-next{height:120px;width:40px}.piece-rail .live-hold{height:40px;width:40px}.battle-central .live-next{height:112px;width:38px}.battle-central .live-hold{height:38px;width:38px}.journey-touch{padding-bottom:max(8px,env(safe-area-inset-bottom))}.battle-central{padding-bottom:0}}
@media(orientation:landscape) and (max-height:600px){.battle-central .live-next,.piece-rail .live-next{height:96px;width:32px}.battle-central .live-hold,.piece-rail .live-hold{height:32px;width:32px}}
.motion-reduced .journey-screen,.motion-reduced .journey-art .fighter-svg{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.journey-screen,.journey-art .fighter-svg{animation:none!important;transition:none!important}}
#fx-layer{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
#journey-dialog form{display:grid;gap:14px}#journey-dialog form>div:last-child{display:flex;flex-wrap:wrap;gap:12px}
#journey-dialog label{font-size:13px;font-weight:800}#journey-dialog input[type=password]{box-sizing:border-box;width:100%;min-height:48px;margin:10px 0;padding:12px;border:2px solid var(--gold);background:#10182a;color:#fff;font:18px var(--font-body);border-radius:8px}
#journey-dialog [hidden]{display:none!important}#journey-dialog [role=alert]{color:#ffb6b6;margin:0;min-height:1em}#journey-dialog input[aria-invalid=true]{border-color:#ff9999}
.room-row b>[role=img]{display:inline!important;font-size:inherit!important}
@media(orientation:landscape) and (max-height:600px) and (min-width:600px){.game-screen .journey-screen{padding-right:316px}.journey-touch,.battle-local .battle-power,.piece-rail .battle-power{width:300px}.journey-touch button{min-width:44px}.touch-move{gap:6px}}

/* Lot tactile 18/10 : séparation de la chute, HOLD à l'autre main, place au plateau.
   Lot 19/10 : rotation et chute côte à côte sur la même rangée, à droite ; directions et
   HOLD à gauche. Conserve DOM, Pointer Events et physique. Native dp/pt != CSSpx : cible web48px. */
@media (pointer:coarse), (max-width:1050px) {
 .game-screen .journey-shell{padding-top:env(safe-area-inset-top);padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .game-screen .journey-touch{display:grid;position:static;width:100%;max-width:620px;grid-template-columns:repeat(3,minmax(48px,1fr)) minmax(0,2.7fr);grid-template-rows:48px 64px;gap:24px 8px;margin:10px auto 0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .game-screen .touch-move,.game-screen .touch-actions{display:contents}
 .game-screen .touch-move>span{display:none}
 .game-screen #touch button{min-width:48px;min-height:48px;margin:0;font-size:14px;touch-action:none}
 .game-screen #touch [data-control=left]{grid-column:1;grid-row:2}
 .game-screen #touch [data-control=down]{grid-column:2;grid-row:2}
 .game-screen #touch [data-control=right]{grid-column:3;grid-row:2}
 .game-screen #touch [data-control=hold]{grid-column:1/4;grid-row:1;justify-self:start;width:96px}
 .game-screen #touch [data-control=rotate]{grid-column:4;grid-row:2;justify-self:start;width:calc(50% - 12px);margin-left:0}
 .game-screen #touch [data-control=drop]{grid-column:4;grid-row:2;justify-self:end;width:calc(50% - 12px);margin-left:0}
 .game-screen #touch small{font-size:9px}
 .game-screen .battle-power>.action-button{min-height:48px}
}
@media(max-width:760px) and (orientation:portrait){
 .journey.game-screen,.journey.game-screen:has(#game-battle){--play-height:min(calc(100dvh - 360px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),calc((100vw - 120px)*2))}
 .game-screen .journey-battle{position:relative}
 .game-screen .battle-local .battle-power{position:absolute;right:0;bottom:0;width:72px;margin:0}
 .game-screen .battle-local .battle-power>span{font-size:7px;gap:2px;letter-spacing:0}
 .game-screen .battle-local .battle-power>span>b{font-size:7px}
 .game-screen .battle-local .battle-power>.action-button{min-height:48px;padding:6px 3px;font-size:8px}
 .game-screen .battle-central{padding-bottom:92px}
}
@media(min-width:761px) and (max-width:1050px) and (orientation:portrait){
 .journey.game-screen,.journey.game-screen:has(#game-battle){--play-height:min(calc(100dvh - 380px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),680px)}
 .game-screen .solo-layout{grid-template-columns:minmax(100px,1fr) calc(var(--play-height)/2) 100px;gap:16px}
 .game-screen .piece-rail{padding:8px}
 .game-screen .piece-rail .battle-power>.action-button{min-height:48px;font-size:9px;padding:6px}
 .game-screen .journey-battle{position:relative}
 .game-screen .battle-local .battle-power{position:absolute;right:0;bottom:0;width:100px;margin:0}
 .game-screen .battle-local .battle-power>.action-button{min-height:48px;font-size:9px;padding:6px}
}
@media(min-width:761px) and (max-width:1050px) and (orientation:landscape) and (min-height:601px){
 .game-screen .journey-header{display:flex;position:absolute;left:0;top:6px;min-height:48px;width:48px;border:0;z-index:2}
 .game-screen .journey-header .journey-brand,.game-screen .journey-header .header-trail,.game-screen .journey-header .profile-button{display:none}
 .game-screen .journey-screen{padding:8px 16px 6px}
 .game-screen .game-topline{min-height:44px;margin-bottom:6px}
 .game-screen .game-topline h1{display:none}
 .game-screen .game-topline .eyebrow{font-size:10px;margin:0}
 .game-screen .game-topline>div:first-child{padding-left:40px}
 .journey.game-screen,.journey.game-screen:has(#game-battle){--play-height:clamp(320px,calc(100dvh - 262px - env(safe-area-inset-top) - env(safe-area-inset-bottom)),520px)}
 .game-screen .solo-layout{grid-template-columns:minmax(0,220px) calc(var(--play-height)/2) 150px;gap:24px;justify-content:center}
 .game-screen .journey-touch{margin-top:10px;padding-bottom:max(2px,env(safe-area-inset-bottom))}
 .game-screen .journey-battle{position:relative;grid-template-columns:minmax(70px,1fr) calc(var(--play-height)/2) 116px calc(var(--play-height)/2) minmax(70px,1fr);gap:12px}
 .game-screen .battle-local .battle-power{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:116px;margin:0}
 .game-screen .battle-local .battle-power>.action-button{min-height:48px;font-size:9px;padding:6px}
 .game-screen .battle-foe .player-score{margin-bottom:4px}
 .game-screen .battle-foe .foe-power{margin-top:4px;padding-bottom:4px;border-bottom-width:2px}
}
/* Téléphone en paysage (<=600px de haut, <=1050px de large) : trois zones lisibles —
   commandes à gauche (déplacements + HOLD), grande grille centrale, commandes à droite
   (pause/quitter, pouvoir, aperçu adverse compact, rotation au-dessus de la chute).
   La grille est bornée par la largeur réellement disponible entre les deux bandes.
   Cadrans d'identité locale : solo-emblem (grille locale) et aile locale du duel, réutilisés
   sans DOM ni JS nouveau. Textes utiles et actions de ce mode à 12px minimum (retour du 19/10) ;
   seuls les glyphes de lecture (scores, chiffres) conservent leur grand gabarit. */
@media(orientation:landscape) and (max-height:600px) and (max-width:1050px){
 .journey.game-screen{--land-edge-l:max(4px,env(safe-area-inset-left));--land-edge-r:max(4px,env(safe-area-inset-right));--land-h:calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));--land-center:calc(100vw - 324px - var(--land-edge-l) - var(--land-edge-r));--play-height:min(var(--land-h),calc(2*(var(--land-center) - 56px)))}
 .journey.game-screen:has(#game-battle){--play-height:min(var(--land-h),calc(2*(var(--land-center) - 44px)))}
 .game-screen .journey-shell{padding:0}
 .game-screen .journey-screen{position:relative;padding:0;height:100dvh}
 .game-screen #journey-view{min-height:0}
 .game-screen .journey-footer,.game-screen .game-hint{display:none}
 /* En-tête masqué : la boîte son 48x48 recouvrait le bandeau gauche (score/eyebrow) ;
    le son reste réglable au menu, le retour passe par QUITTER. */
 .game-screen .journey-header{display:none}
 .game-screen .game-topline{position:absolute;inset:0;margin:0;min-height:0;display:block;pointer-events:none}
 .game-screen .game-topline>div:first-child{position:absolute;left:var(--land-edge-l);top:max(6px,env(safe-area-inset-top));width:156px}
 .game-screen .game-topline h1{display:none}
 .game-screen .game-topline .eyebrow{font-size:12px;line-height:1.15;margin:0;letter-spacing:.3px;overflow-wrap:break-word}
 .game-screen .game-actions{position:absolute;right:var(--land-edge-r);top:max(4px,env(safe-area-inset-top));width:156px;display:flex;gap:4px;pointer-events:auto;z-index:3}
 .game-screen .game-actions>.action-button{flex:1;min-height:44px;padding:6px 4px;font-size:12px}
  /* État réseau (CONNEXION / rtt / JOUEUR DÉCONNECTÉ) lisible comme les actions ;
     il peut se replier sur deux lignes dans la colonne de 156px sans écraser QUITTER. */
  .game-screen .game-actions>.status-tag{font-size:12px;padding:4px 6px;flex:0 1 auto;min-width:0}
 .game-screen .solo-layout{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 calc(162px + var(--land-edge-r)) 0 calc(162px + var(--land-edge-l));pointer-events:none}
 .game-screen .solo-stats{position:absolute;left:var(--land-edge-l);top:max(34px,calc(env(safe-area-inset-top) + 34px));width:156px;display:block;margin:0}
 .game-screen .score-plaque{padding:4px 5px;margin-bottom:4px;line-height:1.15}
 .game-screen .score-plaque small{font-size:12px}
 .game-screen .score-plaque strong{font-size:20px;margin:1px 0}
 .game-screen .score-plaque>span{font-size:12px}
 .game-screen .pace-card{display:none}
 .game-screen .stat-pair{gap:6px}
 .game-screen .stat-pair>div{padding:4px 5px;line-height:1.15}
 .game-screen .stat-pair small{font-size:12px}
 .game-screen .stat-pair b{font-size:18px;margin-top:2px}
 /* Cadran d'identité locale : réutilise l'illustration et le nom existants (aucun asset,
    DOM ni JS nouveau), sans réduire la grille ni déplacer les commandes. */
 .game-screen .solo-emblem{display:flex;align-items:center;gap:6px;margin-top:2px;padding:2px 5px;border:1px solid #60708d74;border-radius:6px;background:#22314ae8}
 .game-screen .solo-emblem>.journey-art{height:24px;width:24px;flex:0 0 24px}
 .game-screen .solo-emblem>span{font-size:12px;line-height:1.05}
 .game-screen .solo-emblem small{display:block;font-size:12px;line-height:1.05;margin-top:0;letter-spacing:.3px}
 .game-screen .piece-rail{width:48px;padding:4px 2px}
 .game-screen .piece-rail .rail-section{margin-bottom:4px}
 .game-screen .piece-rail .rail-section h2{font-size:12px;margin:0 0 2px;letter-spacing:0;line-height:1.15}
 .game-screen .piece-rail .live-hold{width:36px;height:36px;margin:0 auto}
 .game-screen .piece-rail .live-next{width:36px;height:108px;margin:0 auto}
 .game-screen .journey-battle{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 calc(162px + var(--land-edge-r)) 0 calc(162px + var(--land-edge-l));pointer-events:none}
 .game-screen .battle-wing{display:none}
 /* Le cadran local (illustration + nom + style existants) remplace l'aile masquée ;
    l'aile adverse reste absente, l'aperçu adverse restant la miniature à droite. */
 .game-screen .journey-battle .battle-wing.local-wing{display:block;position:absolute;left:var(--land-edge-l);top:max(64px,calc(env(safe-area-inset-top) + 64px));width:156px;margin:0;padding:3px 5px;border:1px solid #60708d74;border-radius:6px;background:#22314ae8;text-align:center}
 .game-screen .local-wing>.journey-art{height:40px;margin:0 auto}
 .game-screen .local-wing>h2{font-size:12px;line-height:1.1;margin:3px 0 1px;color:var(--volt)}
 .game-screen .local-wing>p{font-size:12px;line-height:1.1;letter-spacing:.3px;margin:0;color:#b5c3d9}
 .game-screen .battle-local .player-score{position:absolute;left:var(--land-edge-l);top:max(34px,calc(env(safe-area-inset-top) + 34px));width:172px;height:22px;margin:0}
 .game-screen .battle-local .player-score>span{font-size:12px;line-height:1.15;max-width:none;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .game-screen .battle-local .player-score>b{font-size:14px}
 .game-screen .journey-battle .battle-local{width:auto;flex:0 0 auto}
 .game-screen .battle-central{align-self:center;flex:0 0 36px;display:flex;flex-direction:column;align-items:center;gap:2px;width:36px;padding:0}
 .game-screen .battle-central>b{display:none}
 .game-screen .battle-central .rail-section{margin-bottom:2px}
 .game-screen .battle-central .rail-section h2{font-size:12px;margin:0 0 2px;letter-spacing:0;line-height:1.15}
 .game-screen .battle-central .live-next{width:32px;height:96px;margin:0 auto}
 .game-screen .battle-central .live-hold{width:32px;height:32px;margin:0 auto}
 .game-screen .battle-central>span{display:block;font-size:12px;line-height:1.15}
 .game-screen .journey-battle .battle-foe{position:absolute;right:calc(var(--land-edge-r) + 100px);top:max(50px,calc(env(safe-area-inset-top) + 50px));width:56px;display:block;text-align:center}
 .game-screen .journey-battle .battle-foe .journey-playfield{--play-height:80px;height:80px;width:40px;margin:0 auto;border-width:2px;padding:1px}
 .game-screen .battle-foe .player-score{display:block;height:auto;margin:0 0 1px;overflow:visible}
 .game-screen .battle-foe .player-score>span{display:block;font-size:12px;line-height:1.15;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .game-screen .battle-foe .player-score>b{display:block;font-size:12px;line-height:1.15;white-space:nowrap}
 .game-screen .battle-foe .foe-power{display:flex;align-items:center;justify-content:center;margin:1px 0 0;padding-bottom:1px;min-height:10px}
 .game-screen .battle-foe .foe-power>span{display:none}
 .game-screen .battle-foe .foe-power>b{font-size:12px;line-height:1.15}
 .game-screen .battle-local .battle-power,.game-screen .piece-rail .battle-power{position:absolute;right:var(--land-edge-r);top:max(50px,calc(env(safe-area-inset-top) + 50px));width:96px;margin:0;pointer-events:auto}
 .game-screen .battle-power>span{font-size:12px;gap:0;letter-spacing:.3px;flex-direction:column;align-items:center;line-height:1.15}
 .game-screen .battle-power>span>b{font-size:12px}
 .game-screen .battle-power>.action-button{min-height:48px;padding:6px 3px;font-size:12px;line-height:1.15}
 .game-screen .battle-power .energy-track{margin:2px 0}
 .game-screen .board-state{pointer-events:auto}
 .game-screen .journey-touch{position:absolute;left:var(--land-edge-l);right:var(--land-edge-r);bottom:max(4px,env(safe-area-inset-bottom));top:auto;display:grid;width:auto;max-width:none;margin:0;padding:0;grid-template-columns:48px 48px 48px minmax(0,1fr) 156px;grid-template-rows:48px 24px 64px;gap:0 6px;pointer-events:none;z-index:2}
 .game-screen .touch-move,.game-screen .touch-actions{display:contents}
 .game-screen .touch-move>span{display:none}
 .game-screen #touch button{pointer-events:auto;margin:0}
 .game-screen #touch small{font-size:12px}
 .game-screen #touch [data-control=hold]{grid-column:1/4;grid-row:1;justify-self:start;width:96px}
 .game-screen #touch [data-control=left]{grid-column:1;grid-row:3}
 .game-screen #touch [data-control=down]{grid-column:2;grid-row:3}
 .game-screen #touch [data-control=right]{grid-column:3;grid-row:3}
 .game-screen #touch [data-control=rotate]{grid-column:5;grid-row:3;width:calc(50% - 12px);margin-left:0;justify-self:start}
 .game-screen #touch [data-control=drop]{grid-column:5;grid-row:3;width:calc(50% - 12px);margin-left:0;justify-self:end}
}

/* Les notifications ne capturent jamais une commande ni la zone des pouces. */
.game-screen .journey-toast{top:max(8px,env(safe-area-inset-top));bottom:auto;max-width:calc(100vw - 120px);pointer-events:none;padding:8px 12px}
@media(orientation:landscape) and (max-height:600px) and (max-width:1050px){.game-screen .journey-toast{left:max(8px,env(safe-area-inset-left));top:64px;transform:none;width:156px;font-size:12px}}

/* État réseau distinct de la pastille verte de connexion. */
.game-screen .status-tag[data-quality=bad]{background:#302433;color:var(--danger);border-color:#70404c}
.game-screen .status-tag[data-quality=mid]{background:#302c24;color:var(--gold);border-color:#706040}

/* Le mot PRÊT doit tenir dans la colonne centrale sans couvrir les combattants. */
#countdown-number[data-word]{font-size:clamp(22px,6vw,70px);line-height:1.2;overflow-wrap:normal}

/* MOBILE-002a — plein écran optionnel : contrôle réel, jamais automatique.
   Le libellé s'efface sur téléphone ; l'icône garde une cible de 44 px. */
.fullscreen-help{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.game-screen .game-actions .fullscreen-toggle{display:flex;align-items:center;justify-content:center;gap:6px}
.game-screen .game-actions .fullscreen-toggle[aria-pressed=true]{border-color:var(--gold);color:var(--gold)}
.game-screen .fullscreen-toggle[aria-disabled=true]{opacity:.55;cursor:not-allowed}
.game-screen .board-state .fullscreen-in-pause{display:none}
@media(max-width:760px) and (orientation:portrait){
 .game-screen .game-actions .fullscreen-toggle{display:none}
 .game-screen .board-state .fullscreen-in-pause{display:flex;align-items:center;justify-content:center;gap:6px;min-width:100%;min-height:48px;margin-top:8px}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1050px){
 .game-screen .game-actions .fullscreen-toggle{position:absolute;right:160px;top:0;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;flex:0 0 44px}
 .game-screen .game-actions .fullscreen-toggle .fs-label{display:none}
}
/* MOBILE-002b — très basse hauteur paysage (barre du navigateur) : le HUD gauche
   reste au-dessus du HOLD. On masque seulement l'emblème et le « MEILLEUR »
   secondaires ; score, niveau et lignes restent lisibles, cibles et grille intactes. */
@media(orientation:landscape) and (max-height:310px) and (max-width:1050px){
 .game-screen .solo-stats{top:max(32px,calc(env(safe-area-inset-top) + 32px))}
 .game-screen .score-plaque{padding:2px 5px;margin-bottom:2px;line-height:1.05}
 .game-screen .score-plaque small{font-size:12px;line-height:1.05}
 .game-screen .score-plaque strong{font-size:18px;margin:0;line-height:1.05}
 .game-screen .score-plaque>span{display:none}
 .game-screen .stat-pair{gap:4px}
 .game-screen .stat-pair>div{padding:2px 5px;line-height:1.05}
 .game-screen .stat-pair small{font-size:12px;line-height:1.05}
 .game-screen .stat-pair b{font-size:16px;margin-top:0;line-height:1.1}
 .game-screen .solo-emblem{display:none}
 /* Cadran local du duel : le nom et le style restent, l'illustration secondaire
    s'efface à cette hauteur pour ne pas entrer dans la zone HOLD. */
 .game-screen .journey-battle .battle-wing.local-wing{padding:2px 5px}
 .game-screen .local-wing>.journey-art{display:none}
 .game-screen .local-wing>h2{font-size:12px;line-height:1.1;margin:0}
 .game-screen .local-wing>p{font-size:12px;line-height:1.1;margin:0}
}

/* MOBILE-002b — portrait court (clavier virtuel, petite fenêtre) : le pad ne
   déborde plus. Les aperçus HOLD/NEXT et les marges se compactent, jamais les
   cibles ni le score/niveau/lignes. À moins de 600 px, l'en-tête décoratif
   s'efface comme en paysage ; pause et quitter restent dans la ligne de jeu. */
@media(orientation:portrait) and (max-height:700px) and (max-width:760px){
 .game-screen .piece-rail{padding:6px 3px}
 .game-screen .piece-rail .rail-section{margin-bottom:4px}
 .game-screen .piece-rail .live-hold{margin:4px auto}
 .game-screen .piece-rail .live-next{height:80px;margin:4px auto}
 .game-screen .journey-touch{margin-top:6px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .game-screen .battle-local .battle-power{margin-top:6px}
}
@media(orientation:portrait) and (max-height:600px) and (max-width:760px){
 .game-screen .journey-header{display:none}
 .game-screen .piece-rail .live-next{height:64px}
 .game-screen .journey-touch{gap:8px 8px}
 .game-screen .battle-central{padding-bottom:0}
}
