/* Écran de jeu, carte dégagée (maquette A2, docs/HUD.md), sur tous les écrans. placeHud (game.js) pose sur la carte,
   dans .map-hud : la fiche de la sélection (#intel-fold, visible seulement après un choix), la ligne du bas (.map-dock :
   Objectifs, Journal en une ligne, et la fiche Commandant ouverte depuis la barre du haut), les ordres (.map-orders).
   Une seule fiche secondaire ouverte à la fois (details name="map-sheet"). Préfixe à deux id pour passer devant les
   feuilles précédentes sans !important ; modals.css reste la dernière. */
body:not(.home-mode) #app-shell #game-screen{--pl-paper:#fdf6e4;--pl-paper-2:#efe3c4;--pl-ink:#22385a;--pl-ink-soft:#4b5a73;--pl-line:#d8c7a2;--pl-coral:#d9452f;--pl-coral-bg:#fbe0d9;--pl-azure:#2f6fd6;--pl-gap:10px}

/* Plus de colonne de droite : la carte prend toute la largeur. */
body:not(.home-mode) #app-shell #game-screen .game-layout{grid-template-columns:minmax(0,1fr)}
body:not(.home-mode) #app-shell #game-screen .map-shell{position:relative}

/* Calque posé sur la carte : seuls ses éléments captent les clics, la carte reste jouable entre eux. */
body:not(.home-mode) #app-shell #game-screen .map-hud{position:absolute;inset:var(--pl-gap);z-index:7;pointer-events:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>*{pointer-events:auto}
body:not(.home-mode) #app-shell #game-screen .map-hud [hidden]{display:none!important}

/* Indicateur de case : en haut à droite, semi-transparent mais lisible. */
body:not(.home-mode) #app-shell #game-screen .map-shell>.coord-pill{top:calc(var(--pl-gap) + 4px);right:calc(var(--pl-gap) + 4px);left:auto;bottom:auto;z-index:8;padding:5px 9px;border:0;border-radius:8px;background:#22385a99;color:#fdf6e4;font:800 15px/1 var(--font-heading);letter-spacing:.02em;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);box-shadow:none;pointer-events:none}

/* Cartes crème communes : fiche de la sélection, ligne du bas, fiches secondaires. */
body:not(.home-mode) #app-shell #game-screen .map-hud :is(aside.sidebar,.map-dock>details>summary,.sheet-body){box-sizing:border-box;border:2px solid var(--pl-ink);border-radius:12px;background:var(--pl-paper);color:var(--pl-ink);box-shadow:0 3px 0 var(--pl-ink),0 10px 24px #0d1b2c33}

/* Fiche de la sélection : la colonne d'origine (.sidebar, ses styles de fiche) devient une carte en bas à gauche ;
   elle ne garde que la fiche et les ordres de l'unité, sans en-tête repliable (lu par les lecteurs d'écran), avec ✕. */
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{position:absolute;left:0;bottom:0;top:auto;display:block;width:min(380px,100%);height:auto;max-height:calc(100% - 64px);min-height:0;margin:0;padding:0;overflow:auto;grid-template-columns:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>:not(#intel-fold,.sidebar-orders){display:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>#intel-fold{margin:0;border:0;border-radius:0;background:none;box-shadow:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>#intel-fold>summary{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;padding:0;border:0}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel{padding:10px 12px 12px}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .panel-kicker{display:none}
body:not(.home-mode) #app-shell #game-screen .map-hud .intel-close{flex:none;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:2px solid var(--pl-ink);border-radius:12px;background:var(--pl-paper);box-shadow:0 3px 0 var(--pl-ink);color:var(--pl-ink);font:700 15px/1 var(--font-ui)}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>.sidebar-orders:empty{display:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>.sidebar-orders{padding:0 12px 12px}

/* Ligne du bas : Objectifs (bouton compact) et Journal (dernier message sur une ligne), au centre de la carte. */
body:not(.home-mode) #app-shell #game-screen .map-dock{position:absolute;left:50%;bottom:0;transform:translateX(-50%);display:flex;align-items:stretch;gap:8px;max-width:calc(100% - 720px);min-width:300px}
body:not(.home-mode) #app-shell #game-screen .map-dock>details{position:static;margin:0;padding:0;border:0;background:none;box-shadow:none;min-width:0}
body:not(.home-mode) #app-shell #game-screen .map-dock>details>summary{display:flex;align-items:center;gap:7px;height:46px;min-height:46px;padding:0 12px;cursor:pointer;list-style:none;white-space:nowrap}
body:not(.home-mode) #app-shell #game-screen .map-dock>details>summary::-webkit-details-marker{display:none}
body:not(.home-mode) #app-shell #game-screen .map-dock>details>summary::after{content:none}
body:not(.home-mode) #app-shell #game-screen .map-dock>details[open]>summary{background:var(--pl-ink);color:var(--pl-paper)}
body:not(.home-mode) #app-shell #game-screen .map-dock>.objectives-fold>summary .fold-label{font:800 16px/1 var(--font-heading);text-transform:uppercase;color:inherit;letter-spacing:.02em}
body:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold{flex:1 1 auto;min-width:0}
body:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>summary .fold-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
body:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>summary #log-summary{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font:500 13px/1.2 var(--font-ui);color:inherit}
body:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>summary::before{content:"";flex:none;order:2;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(2px) rotate(-135deg)}
body:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold[open]>summary::before{transform:translateY(-2px) rotate(45deg)}
/* La fiche Commandant s'ouvre depuis les portraits de la barre du haut : pas de bouton dans la ligne. */
body:not(.home-mode) #app-shell #game-screen .map-dock>.commander-fold>summary{display:none}
body:not(.home-mode) #app-shell #game-screen .map-dock>.commander-fold{flex:0 0 0;width:0;min-width:0;overflow:visible}
body:not(.home-mode) #app-shell #game-screen .map-dock .objectives-icon{flex:none;width:20px;height:20px}
body:not(.home-mode) #app-shell #game-screen .map-dock>.objectives-fold{flex:none}

/* Fiche secondaire ouverte : au-dessus de la ligne du bas, centrée, défilante si elle est longue. */
body:not(.home-mode) #app-shell #game-screen .map-dock>details>.sheet-body{position:absolute;left:50%;bottom:calc(100% + 8px);transform:translateX(-50%);width:min(520px,calc(100vw - 40px));max-height:min(60vh,520px);overflow:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px}
body:not(.home-mode) #app-shell #game-screen .map-dock>details:not([open])>.sheet-body{display:none}

/* Objectifs : briefing, victoire et défaite, conseil. */
body:not(.home-mode) #app-shell #game-screen .objectives-panel p{margin:0;font:500 14px/1.4 var(--font-ui);white-space:pre-line}
body:not(.home-mode) #app-shell #game-screen .objectives-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
body:not(.home-mode) #app-shell #game-screen .objectives-list li{padding:8px 10px;border-radius:9px;background:var(--pl-paper-2);font:500 13px/1.35 var(--font-ui)}
body:not(.home-mode) #app-shell #game-screen .objectives-list li.win{background:var(--pl-coral-bg);border:2px solid var(--pl-coral)}
body:not(.home-mode) #app-shell #game-screen .objectives-list li b{font:800 14px/1 var(--font-heading);text-transform:uppercase}
body:not(.home-mode) #app-shell #game-screen .objectives-hint{color:var(--pl-ink-soft)}

/* Journal déplié : message en cours puis historique. */
body:not(.home-mode) #app-shell #game-screen .log-fold .sheet-body .battle-log{max-height:none;margin:0;padding:0;background:none;border:0;color:var(--pl-ink);font:500 13px/1.45 var(--font-ui)}
body:not(.home-mode) #app-shell #game-screen .log-fold .sheet-body .notice-slot{margin:0;border-radius:9px;background:var(--pl-paper-2)}

/* Commandant : portrait, citation, pouvoir et talents, resserrés. */
body:not(.home-mode) #app-shell #game-screen .commander-fold .sheet-body .commander{margin:0;border-radius:10px}
body:not(.home-mode) #app-shell #game-screen .commander-fold .sheet-body :is(.commander-power,.commander-talents){margin:0;padding:10px;border-radius:10px;background:var(--pl-paper-2);color:var(--pl-ink)}

/* Ordres, dessinés comme la maquette : zoom en boutons crème, « Unités à jouer » en jaune (nombre, touche N, note),
   « Fin du tour » en orange. Les mêmes boutons de zoom servent sur téléphone. */
body:not(.home-mode) #app-shell #game-screen .map-hud>.map-orders{position:absolute;right:0;bottom:0;width:min(320px,40%);display:flex;flex-direction:column;align-items:stretch;gap:9px;margin:0;padding:0}
body:not(.home-mode) #app-shell #game-screen .map-hud>.map-orders:empty{display:none}
body:not(.home-mode) #app-shell #game-screen .map-hud .zoom{position:static;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:6px;width:auto;height:auto;margin:0;padding:0;border:0;background:none;box-shadow:none}
body:not(.home-mode) #app-shell #game-screen .map-hud .zoom button{height:44px;min-height:44px;width:auto;min-width:0;margin:0;padding:0 8px;border:2px solid var(--pl-ink);border-radius:11px;background:var(--pl-paper);box-shadow:0 3px 0 var(--pl-ink);color:var(--pl-ink);font:800 15px/1 var(--font-heading);text-transform:uppercase;letter-spacing:.02em;filter:none}
body:not(.home-mode) #app-shell #game-screen .map-hud .zoom :is(#zoomout,#zoomin){font-size:21px}
body:not(.home-mode) #app-shell #game-screen .map-hud .zoom button:disabled{background:var(--pl-paper-2);color:#8a93a3;box-shadow:none;opacity:1}
body:not(.home-mode) #app-shell #game-screen .map-hud .zoom button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 var(--pl-ink)}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-auto-flow:row;align-items:center;column-gap:10px;row-gap:2px;width:100%;height:auto;min-height:58px;margin:0;padding:8px 12px 8px 14px;border:2px solid var(--pl-ink);border-radius:12px;background:#f6d77a;box-shadow:0 3px 0 var(--pl-ink);color:var(--pl-ink);font:800 20px/1.05 var(--font-heading);text-transform:uppercase;text-align:left;overflow:hidden}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit .next-label{display:contents}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit b{grid-row:1;grid-column:2;min-width:0;height:auto;padding:0;border:0;background:none;color:var(--pl-ink);font:800 26px/1 var(--font-heading)}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit kbd{grid-row:1;grid-column:3;display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 4px;border:1.5px solid var(--pl-ink);border-radius:5px;background:none;color:var(--pl-ink);font:700 11px/1 var(--font-ui)}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit #end-note{grid-row:2;grid-column:1/-1;margin:0;max-width:none;min-height:0;color:var(--pl-ink);font:500 11px/1.3 var(--font-ui);text-transform:none;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit #end-note:empty{display:none}
body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit:disabled{background:var(--pl-paper-2);box-shadow:none;cursor:default}
body:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:auto;min-height:64px;margin:0;padding:0 16px;border:2px solid #7e3420;border-radius:14px;background:linear-gradient(#f39a4a,#e0662d);box-shadow:0 4px 0 #7e3420;color:#fff;font:800 30px/1 var(--font-heading);text-transform:uppercase;letter-spacing:.01em;filter:none}
body:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn::before,body:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn b{display:none}
body:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn:disabled{opacity:.55;box-shadow:none}
body:not(.home-mode) #app-shell #game-screen .map-orders>:is(.next-unit,.end-turn):active:not(:disabled){transform:translateY(2px)}
body:not(.home-mode) #app-shell #game-screen .map-orders>:is(.next-unit,.end-turn):focus-visible{outline:3px solid #f39a4a;outline-offset:3px}

/* Grand écran de bureau : le bloc des ordres (zoom, Unités à jouer, Fin du tour) grandit pour rester la cible principale. */
@media(min-width:1100px) and (min-height:700px){
 body:not(.home-mode) #app-shell #game-screen .map-hud>.map-orders{width:min(380px,40%);gap:11px}
 body:not(.home-mode) #app-shell #game-screen .map-hud .zoom{grid-template-columns:56px minmax(0,1fr) 56px;gap:8px}
 body:not(.home-mode) #app-shell #game-screen .map-hud .zoom button{height:50px;min-height:50px;font-size:17px}
 body:not(.home-mode) #app-shell #game-screen .map-hud .zoom :is(#zoomout,#zoomin){font-size:24px}
 body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit{min-height:68px;padding:10px 14px 10px 16px;font-size:23px}
 body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit b{font-size:30px}
 body:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit #end-note{font-size:12px}
 body:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn{min-height:76px;font-size:36px}
}
/* Fiche de la sélection : boutons (i) et ✕ crème, chiffres en cases sable, comme la maquette. */
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(.intel-details,.intel-close){width:44px;height:44px;min-height:44px;border:2px solid var(--pl-ink);border-radius:12px;background:var(--pl-paper);box-shadow:0 3px 0 var(--pl-ink);color:var(--pl-ink)}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>div{border:2px solid var(--pl-line);border-radius:9px;background:#fff9ec;color:var(--pl-ink)}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(.terrain-info,.forecast){border:0;border-radius:9px;background:var(--pl-paper-2);color:var(--pl-ink)}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #selected-name{color:var(--pl-ink);font-family:var(--font-heading);text-transform:uppercase}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .selected-heading{border-bottom:0}

/* Portraits des commandants : ouvrent leur fiche. */
/* Portrait du commandant : carré parfait (--pf) centré dans le bouton, qui garde sa hauteur tactile. */
body:not(.home-mode) #app-shell .camp-open{--pf:42px;--pr:9px;flex:none;position:relative;width:var(--pf);min-width:var(--pf);padding:0;border:0;background:none;cursor:pointer;box-shadow:none}
body:not(.home-mode) #app-shell .camp-open::before{content:"";position:absolute;left:0;top:50%;width:var(--pf);height:var(--pf);transform:translateY(-50%);box-sizing:border-box;border:2px solid var(--camp,#d9452f);border-radius:var(--pr);background:#f3c9bd no-repeat center/cover;box-shadow:0 2px 0 #0d1b2c33}
/* Visages carrés taillés dans les bustes illustrés (béret ou casquette compris, jusqu'au menton). */
body:not(.home-mode) #app-shell .camp-open[data-commander=maya]::before{background-image:url(assets/illustrated/commanders/maya-face.webp?v=20261126)}
body:not(.home-mode) #app-shell .camp-open[data-commander=viktor]::before{background-image:url(assets/illustrated/commanders/viktor-face.webp?v=20261126)}
body:not(.home-mode) #app-shell .camp-open[data-commander=konrad]::before{background-image:url(assets/illustrated/commanders/konrad-face.webp?v=20261126)}
body:not(.home-mode) #app-shell .camp-open[data-commander=iris]::before{background-image:url(assets/illustrated/commanders/iris-face.webp?v=20261126)}
body:not(.home-mode) #app-shell #camp-open-1{--camp:#2f6fd6}
body:not(.home-mode) #app-shell #camp-open-1::before{background-color:#c9daf5}
/* Camp sans commandant : un pion sur la couleur du camp (partie neutre). */
body:not(.home-mode) #app-shell .camp-open[data-commander=""]::before{background-image:url(assets/ui/no-commander.svg);background-size:78% auto;background-position:center}
body:not(.home-mode) #app-shell .camp-open{outline:0}
/* Radio relay bonus held by the camp, pinned to the portrait corner. */
body:not(.home-mode) #app-shell .camp-open .relay-badge{position:absolute;right:-6px;bottom:-4px;z-index:1;padding:1px 4px 1px 13px;border-radius:999px;background:#242f43 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M5 5v7M2 12h6' stroke='%23fff6e3' stroke-width='1.6' fill='none'/%3E%3Cpath d='M1 1.5q4 5 8 0' stroke='%23fff6e3' stroke-width='1.4' fill='none'/%3E%3Ccircle cx='5' cy='4.5' r='1.3' fill='%23fff6e3'/%3E%3C/svg%3E") no-repeat 3px 50%/8px 10px;color:#fff6e3;font:700 10px/1.3 var(--font-ui,system-ui,sans-serif);white-space:nowrap;pointer-events:none;box-shadow:0 0 0 2px #fff6e3}
body:not(.home-mode) #app-shell .camp-open .relay-badge[hidden]{display:none}
body:not(.home-mode) #app-shell .camp-open[aria-expanded=true]::before{outline:3px solid #f39a4a;outline-offset:2px}
body:not(.home-mode) #app-shell .camp-open:focus-visible::before{outline:3px solid #f39a4a;outline-offset:2px}

/* Écrans moyens (moins de 1200 px) : la ligne du bas passe à gauche, sous la fiche de la sélection ; ses fiches
   s'ouvrent au-dessus d'elle. */
@media(max-width:1199px){
 body:not(.home-mode) #app-shell #game-screen .map-dock{left:0;bottom:0;transform:none;max-width:none;min-width:0;width:min(520px,calc(100% - 320px))}
 /* La fiche ouverte garde la largeur de la ligne du bas : elle ne passe plus sur le zoom, À jouer et Fin du tour. */
 body:not(.home-mode) #app-shell #game-screen .map-dock>details>.sheet-body{left:0;transform:none;width:100%}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{bottom:56px;max-height:calc(100% - 120px)}
 body:not(.home-mode) #app-shell #game-screen .map-hud:has(details[name=map-sheet][open])>aside.sidebar{display:none}
}

/* Téléphone portrait : la ligne du bas tient toute la largeur, la fiche de la sélection juste au-dessus, le zoom en
   colonne en haut à droite ; une fiche secondaire ouverte masque la fiche de la sélection (elle revient ensuite). */
@media(max-width:760px){
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen{--pl-gap:8px}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-dock{left:0;right:0;top:auto;bottom:0;transform:none;width:auto;max-width:none;min-width:0}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-dock>details>summary{height:44px;min-height:44px;padding:0 10px}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-dock>details>.sheet-body{left:0;right:0;top:auto;bottom:calc(100% + 6px);transform:none;width:auto;max-height:calc(100vh - 330px)}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar{left:0;right:0;width:auto;bottom:50px;max-height:calc(100% - 110px)}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud:has(details[name=map-sheet][open])>aside.sidebar{display:none}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>.zoom{position:absolute;right:0;top:40px;display:flex;flex-direction:column;gap:6px;margin:0;padding:0;border:0;background:none}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>.zoom button{width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>.zoom #zoomfit span{font-size:10px}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud:has(details[name=map-sheet][open])>.zoom{display:none}
 body:not(.home-mode) #mobile-orders #mobile-info{display:none}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-viewport{height:var(--board-h,60dvh);aspect-ratio:auto}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen :is(.action-shelf:empty,.board-bottom){display:none}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>.zoom{left:auto}
 /* Résumé du haut : chaque jauge précédée du portrait de son commandant. */
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen #field-hud .power-overview{grid-template-columns:30px minmax(0,1fr) 30px minmax(0,1fr);column-gap:6px;row-gap:0;align-items:center}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen #field-hud .camp-open{--pf:30px;--pr:8px}
}

/* Téléphone paysage : la carte prend toute la largeur ; ordres et zoom à droite, la ligne du bas à gauche, la fiche
   de la sélection au-dessus d'elle ; une fiche secondaire s'ouvre en panneau à gauche. */
body.mobile-landscape:not(.home-mode) #app-shell #game-screen{--pl-gap:6px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .game-layout{grid-template-columns:minmax(0,1fr)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock{left:0;right:auto;top:auto;bottom:0;transform:none;width:min(380px,calc(100% - 210px));max-width:none;min-width:0}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock>details>summary{height:44px;min-height:44px;padding:0 9px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock>details>.sheet-body{left:0;top:auto;bottom:calc(100% + 6px);transform:none;width:min(360px,calc(100vw - 230px));max-height:calc(100vh - 120px)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{width:min(360px,calc(100% - 210px));bottom:48px;max-height:calc(100% - 56px)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud:has(details[name=map-sheet][open])>aside.sidebar{display:none}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders{width:196px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders>.zoom{grid-template-columns:44px minmax(0,1fr) 44px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders>.zoom button{height:44px;min-height:44px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders #mobile-orders{position:static;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;width:auto;height:auto;margin:0;padding:0}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders #mobile-orders #mobile-info{display:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-overview{grid-template-columns:28px minmax(0,1fr) 28px minmax(0,1fr);column-gap:6px;align-items:center}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .camp-open{--pf:28px;--pr:7px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>.tutorial-coach{position:absolute;left:0;top:0;max-width:min(420px,60%);margin:0}

/* Téléphones : fiche de la sélection compacte (une ligne d'en-tête, chiffres en ligne), pour laisser les cases voisines
   de la sélection accessibles ; game.js borne aussi sa hauteur à la place libre de l'autre côté de la sélection. */
@media(max-width:760px),(max-height:540px){
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{overflow:auto}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel{padding:6px 8px 7px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .selected-heading{min-height:0;padding:0 0 4px;gap:7px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .selected-heading canvas{width:34px;height:34px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #selected-name{font-size:17px;line-height:1.05}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #selected-sub{margin:1px 0 0;font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(.intel-details,.intel-close){width:44px;height:44px;min-height:44px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats{display:flex;flex-wrap:wrap;gap:4px;padding:0 0 4px;border:0}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>div{flex:1 1 auto;flex-direction:row;gap:5px;padding:3px 6px;border-width:1px;border-radius:7px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats small{display:none}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats strong{font-size:14px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(.terrain-info,.forecast,.intel-alert,.unit-supplies){margin:0 0 4px;padding:3px 7px;font-size:11px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>.sidebar-orders{padding:0 8px 8px}
 body:not(.home-mode) #app-shell #game-screen .map-hud #zoomfit span{font-size:10px;line-height:1.05}
}

@media(prefers-reduced-motion:reduce){body:not(.home-mode) #app-shell #game-screen .map-dock>details>summary::before{transition:none}}

/* Barre du haut (ordinateur, tablette) : le portrait du camp devient un bouton qui ouvre la fiche du commandant. */
body:not(.home-mode) #app-shell #top-hud .side-group::before{display:none}
body:not(.home-mode) #app-shell #top-hud .side-group>.camp-open{grid-column:1;grid-row:1;align-self:center;--pf:var(--portrait);--pr:10px}
@media(max-width:960px){body:not(.home-mode) #app-shell #top-hud .side-group>.camp-open{grid-row:1/3}}
@media(max-width:860px){
 body:not(.home-mode) #app-shell #top-hud .side-group{grid-template-columns:30px minmax(0,1fr);column-gap:6px}
 body:not(.home-mode) #app-shell #top-hud .side-group>.camp-open{--pf:30px;--pr:8px}
 body:not(.home-mode) #app-shell #top-hud .side-group>span,body:not(.home-mode) #app-shell #top-hud .side-group .power-track{grid-column:2}
}

/* Téléphone paysage : ordres lisibles, fiche de la sélection plus basse. */
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders #mobile-orders #mobile-next{height:46px;font-size:18px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-orders #mobile-orders #mobile-end{height:50px;font-size:21px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .selected-heading{padding-bottom:4px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>div{padding:3px 4px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats strong{font-size:15px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(.intel-details,.intel-close){width:44px;height:44px;min-height:44px}

/* Ordres de l'unité rangés dans la fiche de la sélection (tous écrans). commands.css place le menu rangé sous la carte
   avec des !important ; ici il redevient un bloc de la fiche. */
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #quick-actions.sidebar-docked{position:static!important;inset:auto!important;top:auto!important;left:auto!important;display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;width:100%;height:auto;max-height:none;margin:0;padding:0;overflow:visible;background:none;border:0;box-shadow:none}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #quick-actions.sidebar-docked button{flex:none;width:100%;min-width:0;min-height:44px;white-space:normal;text-align:left}
/* Téléphones : une rangée de parts égales sur toute la largeur de la fiche, comme l'ancienne barre sous la carte. */
@media(max-width:760px),(max-height:540px){
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #quick-actions.sidebar-docked{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px}
 body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #quick-actions.sidebar-docked button{width:auto;padding:6px 4px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}
}

/* Sélection dans la moitié basse de la carte : la fiche passe en haut (la ligne du bas et les ordres ne bougent pas). */
body:not(.home-mode) #app-shell #game-screen .map-hud.card-top>aside.sidebar{top:0;bottom:auto;max-height:calc(100% - 64px)}
/* Tablette et ordinateur : la fiche peut aussi se placer en haut à droite, si elle y masque moins d'unités (game.js, placeIntelCard). */
body:not(.home-mode) #app-shell #game-screen .map-hud.card-right>aside.sidebar{left:auto;right:0}
/* En haut à gauche, la fiche passe sous les outils tactiques (menaces) au lieu de les recouvrir. */
body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen:not([data-small-mode]) .map-hud.card-top:not(.card-right)>aside.sidebar{top:64px;max-height:calc(100% - 128px)}
@media(max-width:760px){body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud.card-top>aside.sidebar{right:56px;top:0}}

/* Téléphone portrait : la fiche de la sélection recouvre le résumé du haut (jour, fonds, jauges), au-dessus de la
   carte, et les ordres de l'unité prennent la place de la barre du bas : la carte reste entièrement dégagée. */
@media(max-width:760px){
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar,body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud.card-top>aside.sidebar{position:fixed;z-index:60;top:var(--pl-card-top,72px);bottom:auto;left:8px;right:8px;width:auto;max-height:var(--pl-card-max,180px)}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud:has(details[name=map-sheet][open])>aside.sidebar{display:block}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-shell>#quick-actions.docked{position:fixed!important;z-index:45;top:auto!important;bottom:0!important;left:0!important;right:0;width:100%;height:auto;max-height:none;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px;margin:0;padding:10px 10px calc(10px + env(safe-area-inset-bottom));overflow:hidden;border:0;border-top:2px solid var(--pl-ink);border-radius:0;background:#e3cfa5}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-shell>#quick-actions.docked button{width:auto;min-width:0;min-height:46px;padding:6px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
}
/* Téléphone paysage : la fiche dans la marge de gauche (colonne étroite), ses ordres sur deux colonnes. */
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar,body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud.card-top>aside.sidebar{top:auto;bottom:52px;width:min(270px,calc(50% - 100px));max-height:calc(100% - 52px)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #quick-actions.sidebar-docked{display:grid;grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-columns:auto}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock{width:min(270px,calc(50% - 100px))}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock>.objectives-fold>summary .fold-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Tablette portrait : plus de panneaux sous la carte, elle prend la hauteur disponible (calculée par fitLayout). */
@media(min-width:761px) and (max-width:1100px) and (orientation:portrait){body:not(.home-mode) #app-shell #game-screen .map-viewport{height:var(--board-h,70dvh)}}

/* Ordres rangés dans la fiche (génie avant déplacement, choix d'une cible) : en tête de fiche, toujours visibles. */
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{display:flex;flex-direction:column}
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar>.sidebar-orders:not(:empty){order:-1;padding:10px 12px 0}

/* Débarquer : portrait du passager à gauche, verbe puis ses PV dessous, sans chevauchement quelle que soit la langue. */
body:not(.home-mode) #quick-actions .cargo-order{display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:auto auto;column-gap:7px;row-gap:1px;align-items:center;justify-content:stretch;text-align:left;min-height:52px}
body:not(.home-mode) #quick-actions .cargo-order canvas{grid-row:1/3;width:32px;height:32px}
body:not(.home-mode) #quick-actions .cargo-order>span:not(.cargo-hp){grid-column:2;grid-row:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:not(.home-mode) #quick-actions .cargo-order .cargo-hp{grid-column:2;grid-row:2;font-size:.75em;line-height:1;opacity:.8}

/* Ordres contextuels à côté de l'unité, sur tous les écrans : une colonne compacte (game.js la place). Sur téléphone,
   style.css en faisait une rangée sous la carte. */
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions:not(.docked):not(:empty){right:auto;bottom:auto;flex-direction:column;align-items:stretch;width:max-content;max-width:min(240px,70vw);gap:4px}
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions:not(.docked) button{min-height:44px;white-space:nowrap}
body:not(.home-mode) #quick-actions .cargo-order{min-width:0;max-width:100%;box-sizing:border-box}
body:not(.home-mode) #quick-actions .cargo-order>span:not(.cargo-hp){min-width:0;white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip}
body:not(.home-mode) #quick-actions .cargo-order .cargo-hp{min-width:0;white-space:normal;overflow-wrap:anywhere}
/* All zooms share the same local command list. Long labels wrap; long lists scroll inside it. */
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual{position:absolute!important;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:flex-start;box-sizing:border-box;inset:auto;max-width:calc(100% - 12px);gap:4px;padding:5px;overflow:auto;overscroll-behavior:contain;background:#142e42e6;border:2px solid #fff0c1;border-radius:6px;box-shadow:3px 4px 0 #112c3a80;pointer-events:auto;z-index:8}
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual button{flex:none;box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:9px 10px;border:2px solid #22385a;border-radius:9px;box-shadow:0 2px 0 #102b3b66;color:#22385a;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;font:700 14px/1.25 var(--font-ui)}
/* Liste d'ordres déplaçable (retour du 14 novembre 2026) : plus de barre en haut, qui allongeait la liste. Le cadre
   lui-même se saisit (game.js setupMenuDrag) : bordure en tirets et petit repère centré dans la marge du haut. */
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual{padding:8px 6px 6px;border-style:dashed;cursor:grab;touch-action:none}
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual button{cursor:pointer;touch-action:none}
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual::before{content:'';position:absolute;top:2px;left:50%;width:26px;height:3px;border-radius:2px;background:#fff0c1;translate:-50% 0;pointer-events:none}
/* Held then dragged by the player (game.js setupMenuDrag): lifted look, no text selection or callout. */
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body:not(.home-mode) #app-shell #game-screen .map-shell>#quick-actions.contextual.dragging{outline:3px dashed #f7d77b;outline-offset:3px;box-shadow:0 14px 28px #0b1a2a80;cursor:grabbing}

/* Téléphone en paysage : fiche de la sélection compacte et du côté libre.
   La fiche ne garde que l'essentiel (portrait, nom, PV, déplacement, portée, terrain) ; le détail reste derrière (i).
   Même largeur et même bord que la ligne Objectifs/Journal, 6 px au-dessus d'elle ; quand l'unité choisie est dans la
   moitié basse de la carte, la fiche monte en haut à gauche pour ne pas la masquer (classe card-top, game.js). */
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{left:0;width:var(--pl-land-w,min(270px,calc(50% - 100px)));bottom:50px;max-height:calc(100% - 50px)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-dock{width:var(--pl-land-w,min(270px,calc(50% - 100px)))}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud.card-top>aside.sidebar{top:0;bottom:auto;max-height:calc(100% - 56px)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel{padding:6px 8px 8px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar :is(#selected-sub,#engineer-capabilities){display:none}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #selected-art{width:34px;height:34px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #selected-name{font-size:16px;line-height:1.1}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .selected-heading{gap:6px;padding-bottom:2px;align-items:center}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:4px 0}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>div{min-height:0;padding:2px 4px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>.metric-card{flex-direction:row!important;align-items:center;justify-content:center;gap:4px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats .metric-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats .stat-icon{width:16px;height:16px}
body.mobile-landscape:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar .terrain-info{margin:0;padding:2px 8px;font-size:12px}

/* Fiche de la sélection : texte lisible. La carte (.map-shell) a une hauteur de ligne nulle pour coller les canevas ;
   la fiche en héritait, et ses lignes (Défense, Revenu) se superposaient sur une barre de 6 px. */
body:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{line-height:1.35}
/* Téléphone portrait : la fiche remplace tout le résumé du haut (jour, effectifs, fonds, jauges) au lieu d'en laisser
   dépasser des morceaux : elle descend jusqu'au-dessus de la carte, et le résumé, caché derrière elle, ne passe plus
   par-dessus (pastille du jour). */
@media(max-width:760px){
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar{min-height:calc(var(--pl-card-max,180px) - 44px)}
 body:not(.home-mode):not(.mobile-landscape):has(#game-screen .map-hud>aside.sidebar:not([hidden])) #field-hud{visibility:hidden}
 /* La fiche passe aussi devant la pastille du jour et l'indicateur de case (ils restaient par-dessus). */
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud:has(>aside.sidebar:not([hidden])){z-index:20}
}

/* Téléphone portrait : une ligne de moins dans la fiche. Le terrain (nom et étoiles) se range au bout de la ligne des
   chiffres (PV, déplacement, portée), qui gardent leurs icônes ; les libellés restent lus par les lecteurs d'écran. */
@media(max-width:760px){
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;align-items:center}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel>*{grid-column:1/-1}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel>#unit-stats:not(:empty){grid-column:1;flex-wrap:nowrap}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar .intel-panel>#unit-stats:not(:empty)~#terrain-info{grid-column:2;grid-row:auto;align-self:stretch;display:flex;align-items:center;gap:4px;margin:0 0 4px;white-space:nowrap}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats .metric-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar #unit-stats>.metric-card{min-width:0;justify-content:center}
}

/* Transparent HUD groups never intercept a map tap between their actual controls. */
body:not(.home-mode) #app-shell #game-screen .map-hud :is(.zoom,.map-orders,.map-dock){pointer-events:none}
body:not(.home-mode) #app-shell #game-screen .map-hud :is(.zoom button,.map-orders>button,.map-orders>#mobile-orders,.map-dock>details){pointer-events:auto}
@media(max-width:760px){
 /* Restore the in-map zoom column, while keeping its hit area limited to the actual controls. */
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>.zoom{bottom:auto;height:auto}
}
/* The fallback uses the catalogue as a single construction entry instead of squeezing every building into the card. */
body:not(.home-mode) #app-shell #game-screen .sidebar-orders #quick-actions.sidebar-docked .build-order{display:none}
@media(max-width:760px){
 body:not(.home-mode):not(.mobile-landscape) #app-shell #game-screen .map-hud>aside.sidebar>.sidebar-orders:not(:empty){padding:4px 8px 0}
}
/* Jour, phase, puis météo, dans tous les formats (avant : « Jour [Clair → Neige · J3] 1 »). La météo est une
   étiquette compacte : temps actuel, puis prévision sur une ligne. */
body:not(.home-mode) #game-day>#day-label{order:0}
body:not(.home-mode) #game-day>#day{order:1}
body:not(.home-mode) #game-day>#day-phase{order:2}
body:not(.home-mode) #game-day>#terrain-warning{order:4;grid-column:1/-1}
body:not(.home-mode) #game-day>#weather-status{order:3;max-width:none;min-height:0;padding:3px 8px;border:1px solid #fff4d566;border-radius:8px;background:#203c50;color:#fff4d5;font:700 12px/1.15 var(--font-ui);text-transform:none;letter-spacing:0;white-space:nowrap}
body:not(.home-mode) #game-day>#weather-status[data-forecast]:not([data-forecast=""])::after{font-size:10.5px;font-weight:600;opacity:.88;white-space:nowrap}
/* Vue entière avec de la place sur les côtés (hud-layout.js) : la carte à gauche, une colonne d'informations à
   droite, de haut en bas : fiche de la sélection, objectifs et journal dépliés, puis zoom, unités à jouer et fin du
   tour. Le journal prend la hauteur restante et les commandes restent au pied de la colonne. */
body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud{--side-sheet-heading:42px;left:auto;width:calc(var(--side-w) - 2 * var(--pl-gap));display:flex;flex-direction:column;gap:10px;overflow-y:auto;overscroll-behavior:contain}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud>*{position:static;inset:auto;transform:none;width:auto;max-width:none;min-width:0}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud>aside.sidebar{position:static;order:0;flex:none;width:auto;max-height:none;overflow:visible}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock{order:1;flex:1 1 0;flex-direction:column;align-items:stretch;gap:inherit;min-height:0;overflow-y:auto}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details{flex:none}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.commander-fold:not([open]){display:none}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.commander-fold[open]{position:absolute;inset:0 0 auto;z-index:2;width:auto}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>:is(.objectives-fold,.log-fold){border:2px solid var(--pl-ink);border-radius:12px;background:var(--pl-paper);overflow:hidden}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.objectives-fold{flex:0 1 auto;min-height:min(100%,116px);overflow-y:auto}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.objectives-fold>summary{position:sticky;top:0;z-index:1}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold{position:relative;flex:1 0 auto;min-height:calc(var(--side-sheet-heading) + 48px)}
body.hud-side:not(.home-mode) #app-shell #game-screen #map-hud .map-dock>:is(#objectives-fold,#log-fold)>:is(summary,.sheet-body){border:0;border-radius:0;background:none;box-shadow:none}
body.hud-side:not(.home-mode) #app-shell #game-screen #map-hud .map-dock>:is(#objectives-fold,#log-fold)[open]>summary{height:var(--side-sheet-heading);min-height:var(--side-sheet-heading);border-bottom:1px solid var(--pl-line);background:var(--pl-paper-2)}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>.sheet-body{position:static;transform:none;width:auto;max-height:none}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.commander-fold>.sheet-body{max-height:min(48vh,350px)}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>.sheet-body{position:absolute;inset:var(--side-sheet-heading) 0 0;overscroll-behavior:contain}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>.sheet-body>*{flex:none}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold .battle-log{overflow:visible}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold .battle-log>div+div{margin-top:6px;padding-top:6px;border-top:1px solid var(--pl-line)}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud>.map-orders{order:2;flex:none}
/* Commandes posées sur le plateau : légèrement transparentes ; une commande qu'une unité vise s'efface. */
body:not(.home-mode):not(.hud-side) #app-shell #game-screen .map-hud>:is(aside.sidebar,.map-dock,.map-orders){opacity:.93;transition:opacity .15s}
body:not(.home-mode):not(.hud-side) #app-shell #game-screen .map-hud>:is(aside.sidebar,.map-dock,.map-orders):is(:hover,:focus-within){opacity:1}
body:not(.home-mode) #app-shell #game-screen :is(.map-hud>*,#threat-toggle,#recap-open).hud-yield{opacity:.12!important;pointer-events:none!important}
@media(prefers-reduced-motion:reduce){body:not(.home-mode) #app-shell #game-screen .map-hud>*{transition:none}}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>summary{justify-content:flex-start;color:var(--pl-ink)}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>summary .fold-label{position:static;width:auto;height:auto;overflow:visible;clip:auto;margin:0;font:800 16px/1 var(--font-heading);text-transform:uppercase;letter-spacing:.02em;color:var(--pl-ink)}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>summary #log-summary{display:none}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>.log-fold>summary::before{margin-left:auto}
body.hud-side:not(.home-mode) #app-shell #game-screen #coords{right:auto;left:68px}
body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>summary{cursor:default}body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>summary::before{display:none}
/* Unité sélectionnée (hud-layout.js) : les commandes posées sur la carte s'effacent pour laisser désigner n'importe
   quelle case ; elles reviennent à l'annulation ou une fois l'ordre donné. */
body.hud-aiming:not(.home-mode) #app-shell #game-screen :is(#map-hud>*,#tactical-tools,#recap-open){opacity:0!important;pointer-events:none!important;transition:opacity .16s ease}
body:not(.home-mode) #app-shell #game-screen :is(#map-hud>*,#tactical-tools,#recap-open){transition:opacity .16s ease}
@media(prefers-reduced-motion:reduce){body:not(.home-mode) #app-shell #game-screen :is(#map-hud>*,#tactical-tools,#recap-open){transition:none}}
/* Audit des écrans de jeu : au doigt, le portrait du commandant (30 px de large sur téléphone) garde une zone de
   toucher de 44 px, sans déplacer le bandeau. */
@media(pointer:coarse){body:not(.home-mode) #app-shell .camp-open::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:44px;transform:translateX(-50%)}}
/* Sur un écran bas, réduire les espacements et les boutons surdimensionnés pour garder la place des textes. */
@media(max-height:860px){
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud{--side-sheet-heading:38px;gap:8px}
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud>.map-orders{gap:8px}
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-hud .zoom button{height:44px;min-height:44px}
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-orders>.next-unit{min-height:58px;padding-block:8px}
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-orders>.end-turn{min-height:64px}
 body.hud-side:not(.home-mode) #app-shell #game-screen .map-dock>details>.sheet-body{padding-block:8px}
}

/* « En savoir plus » sous les objectifs (21 novembre 2026) : conseil de la mission et règles de l'objectif, repliés. */
#objectives-panel .objectives-more{margin:8px 0 0}
#objectives-panel .objectives-more>summary{display:flex;align-items:center;min-height:44px;padding:0 2px;cursor:pointer;font:700 13px/1.2 var(--font-ui);color:#22385a;text-decoration:underline;text-underline-offset:3px;list-style:none}
#objectives-panel .objectives-more>summary::-webkit-details-marker{display:none}
#objectives-panel .objectives-more[open]>summary{margin-bottom:6px}
#objectives-panel .objectives-more .objectives-hint{margin:6px 0 0}
