/* Écran de partie sur téléphone et tablette (jusqu'à 1100 px ; au-delà, hud-desktop.css et ses thèmes), maquette
   « Salle de commandement » (pages En partie, portrait et paysage) : papier crème, encre marine, carte sur sa
   planche en bois, « Fin du tour » en orange, « À jouer » en jaune, camps Corail et Azur. Couleurs et matières
   seulement : la mise en page reste celle de style.css et mobile.css. Préfixe à deux id pour passer devant
   mobile.css sans !important. */
body:not(.home-mode){--mh-paper:#fdf6e4;--mh-paper-2:#efe3c4;--mh-ink:#22385a;--mh-ink-soft:#4b5a73;--mh-line:#d8c7a2;--mh-coral:#d9452f;--mh-coral-bg:#fbe0d9;--mh-azure:#2f6fd6;--mh-azure-bg:#dbe8fc;--mh-orange-hi:#f39a4a;--mh-orange-lo:#e0662d;--mh-orange-edge:#7e3420;--mh-wood-hi:#c8945c;--mh-wood-lo:#a8743f;--mh-gold:#f6d77a;--mh-green:#3f7d2c;background:linear-gradient(#e9d8b4,#dcc59a) fixed;color:var(--mh-ink)}

/* Barre du haut : titre en encre, boutons ronds marine (leurs icônes sont claires). */
body:not(.home-mode) #app-shell .topbar{background:none;border:0;box-shadow:none}
body:not(.home-mode) #app-shell .topbar :is(h1,#mission-name,#mission-name>span){color:var(--mh-ink);font-family:var(--font-heading);text-transform:uppercase}
body:not(.home-mode) #app-shell .topbar #mission-name>span:last-child{color:var(--mh-coral)}
body:not(.home-mode) #app-shell .topbar .icon-button{border:2px solid var(--mh-ink);border-radius:12px;background:var(--mh-ink);box-shadow:0 3px 0 #0d1b2c}

/* Paysage : même papier sable que le portrait, au lieu du fond marine. */
body.mobile-landscape:not(.home-mode){background:linear-gradient(#e9d8b4,#dcc59a) fixed}
/* La carte sur sa planche en bois, cadre crème ; la tablette sous la carte (zoom) reste sur le bois. */
body:not(.home-mode) #app-shell #game-screen .action-shelf{background:none}
body:not(.home-mode) #app-shell #game-screen .board-section{padding:6px;border:0;border-radius:14px;background:linear-gradient(var(--mh-wood-hi),var(--mh-wood-lo));box-shadow:inset 0 2px 0 #e2b47e,0 8px 18px #3b271a44}
body:not(.home-mode) #app-shell #game-screen .map-shell{border:3px solid #fbf3df;border-radius:8px;box-shadow:0 2px 0 #6b4a2a}
body:not(.home-mode) #app-shell #game-screen .coord-pill{border-radius:8px;background:#22385ae6;color:var(--mh-paper);font-family:var(--font-ui);font-weight:700}

/* Jour, alliés et ennemis : pastilles aux couleurs des camps. */
body:not(.home-mode) #app-shell #game-screen #game-day{border-radius:9px;background:var(--mh-ink);color:var(--mh-paper)}
body:not(.home-mode) #app-shell #game-screen .unit-counts :is(.own-count,.enemy-count){border:2px solid var(--mh-coral);border-radius:9px;background:var(--mh-coral-bg);color:#7e2416;font-family:var(--font-heading);text-transform:uppercase}
body:not(.home-mode) #app-shell #game-screen .unit-counts .enemy-count{border-color:var(--mh-azure);background:var(--mh-azure-bg);color:#163a72}
body:not(.home-mode) #app-shell #game-screen .unit-counts b{color:inherit}

/* Fonds, revenus et jauges de pouvoir : une carte crème. */
body:not(.home-mode) #app-shell #game-screen #field-hud{border:2px solid var(--mh-ink);border-radius:12px;background:var(--mh-paper);box-shadow:0 3px 0 var(--mh-ink);color:var(--mh-ink)}
body:not(.home-mode) #app-shell #game-screen #field-hud small,body:not(.home-mode) #app-shell #game-screen #field-hud strong>span{color:var(--mh-ink-soft)}
body:not(.home-mode) #app-shell #game-screen #field-hud #funds{color:var(--mh-ink)}
body:not(.home-mode) #app-shell #game-screen #field-hud #income{color:var(--mh-green)}
body:not(.home-mode) #app-shell #game-screen #field-hud .power-track{color:var(--mh-ink)}
body:not(.home-mode) #app-shell #game-screen #field-hud progress{border-radius:4px;background:var(--mh-paper-2)}
body:not(.home-mode) #app-shell #game-screen #field-hud progress::-webkit-progress-bar{border-radius:4px;background:var(--mh-paper-2)}
body:not(.home-mode) #app-shell #game-screen #field-hud .coral progress::-webkit-progress-value{border-radius:4px;background:var(--mh-coral)}
body:not(.home-mode) #app-shell #game-screen #field-hud .azure progress::-webkit-progress-value{border-radius:4px;background:var(--mh-azure)}
body:not(.home-mode) #app-shell #game-screen #field-hud .coral progress::-moz-progress-bar{background:var(--mh-coral)}
body:not(.home-mode) #app-shell #game-screen #field-hud .azure progress::-moz-progress-bar{background:var(--mh-azure)}

/* Panneaux repliables (commandant, journal, informations) : papier crème, en-tête papier sable. */
body:not(.home-mode) #app-shell #game-screen .sidebar>.fold,body:not(.home-mode) #app-shell #game-screen .mobile-rail-details>.fold{border:2px solid var(--mh-ink);border-radius:12px;background:var(--mh-paper);box-shadow:0 3px 0 var(--mh-ink);overflow:hidden}
body:not(.home-mode) #app-shell #game-screen .fold>summary{background:var(--mh-paper);color:var(--mh-ink)}
body:not(.home-mode) #app-shell #game-screen .fold[open]>summary{border-bottom:2px solid var(--mh-line)}
body:not(.home-mode) #app-shell #game-screen .fold>summary .fold-label{color:var(--mh-ink);font-family:var(--font-heading);text-transform:uppercase;letter-spacing:.02em}
body:not(.home-mode) #app-shell #game-screen .fold>summary span:not(.fold-label){color:var(--mh-ink-soft)}
body:not(.home-mode) #app-shell #game-screen :is(.battle-log,.notice-slot){background:var(--mh-paper);color:var(--mh-ink)}
body:not(.home-mode) #app-shell #game-screen #notice-details{border:2px solid var(--mh-ink);border-radius:10px;background:var(--mh-paper-2)}

/* Zoom : boutons crème à bord marine. */
body:not(.home-mode) #app-shell #game-screen .zoom button{border:2px solid var(--mh-ink);border-radius:11px;background:var(--mh-paper);box-shadow:0 3px 0 var(--mh-ink);color:var(--mh-ink);font-family:var(--font-heading);font-weight:800;text-transform:uppercase}
body:not(.home-mode) #app-shell #game-screen .zoom button:disabled{background:var(--mh-paper-2);color:#8a93a3;opacity:1;box-shadow:none}

/* Ordres : Infos crème, « À jouer » jaune, « Fin du tour » orange. */
body:not(.home-mode) #mobile-orders{background:none;border:0}
body:not(.home-mode) #mobile-orders button{border:2px solid var(--mh-ink);border-radius:12px;background:var(--mh-paper);box-shadow:0 3px 0 var(--mh-ink);color:var(--mh-ink);font:800 17px/1.05 var(--font-heading);text-transform:uppercase}
body:not(.home-mode) #mobile-orders #mobile-next{background:var(--mh-gold)}
body:not(.home-mode) #mobile-orders #mobile-end{border-color:var(--mh-orange-edge);background:linear-gradient(var(--mh-orange-hi),var(--mh-orange-lo));box-shadow:0 3px 0 var(--mh-orange-edge);color:#fff}
body:not(.home-mode) #mobile-orders button:disabled{opacity:.55;box-shadow:none}
body:not(.home-mode) #mobile-orders #mobile-next:disabled{opacity:1;filter:grayscale(1)}
body:not(.home-mode) #mobile-orders button:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 var(--mh-ink)}
body:not(.home-mode) #mobile-orders #mobile-end:active:not(:disabled){box-shadow:0 1px 0 var(--mh-orange-edge)}
/* Portrait : la barre du bas garde un fond, sur le papier sable. */
@media(orientation:portrait){body:not(.home-mode) #mobile-orders{background:#e3cfa5f2;border-top:2px solid var(--mh-ink)}}
@media(prefers-reduced-motion:reduce){body:not(.home-mode) #mobile-orders button:active{transform:none}}

/* Paysage : la barre du haut porte le résumé de la partie (placeHud y range .mission-header et #field-hud après le
   titre) : nom court de la mission, jour, effectifs, fonds et revenus, puis les deux jauges de pouvoir. La colonne de
   droite ne garde que le commandant, le journal, le zoom et les ordres. */
body.mobile-landscape:not(.home-mode) #app-shell .topbar{align-items:center;gap:6px}
body.mobile-landscape:not(.home-mode) #app-shell .topbar>.mission-title{flex:0 1 auto;min-width:56px}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .mission-name-lead{display:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .mission-title h1{font-size:18px}
body.mobile-landscape:not(.home-mode) #app-shell .topbar>.mission-header{flex:none;display:flex;align-items:center;gap:4px;min-height:0;margin:0;padding:0;border:0;background:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #game-day{position:static;display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 7px;border-radius:9px;background:var(--mh-ink);color:var(--mh-paper);font:800 13px/1 var(--font-heading);text-transform:uppercase;white-space:nowrap}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #game-day strong{font:inherit;color:inherit}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts{display:flex;gap:4px}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts>span{display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 7px;border:2px solid var(--mh-coral);border-radius:9px;background:var(--mh-coral-bg);color:#7e2416;font:800 14px/1 var(--font-heading)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts>.enemy-count{border-color:var(--mh-azure);background:var(--mh-azure-bg);color:#163a72}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts :is(.count-label,.count-short){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts>span::before{content:"";width:11px;height:11px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='3' r='2.5'/%3E%3Cpath d='M1 12c0-3.3 2.2-5.5 5-5.5s5 2.2 5 5.5z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='3' r='2.5'/%3E%3Cpath d='M1 12c0-3.3 2.2-5.5 5-5.5s5 2.2 5 5.5z'/%3E%3C/svg%3E") center/contain no-repeat}
body.mobile-landscape:not(.home-mode) #app-shell .topbar .unit-counts b{color:inherit;font:inherit}
body.mobile-landscape:not(.home-mode) #app-shell .topbar>#field-hud{flex:1 1 auto;min-width:0;display:flex!important;align-items:center;gap:8px;margin:0;padding:0;border:0;background:none;box-shadow:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview{flex:none;display:grid;grid-template-columns:auto;gap:1px;min-height:0;margin:0;padding:0 2px;border:0;background:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview>div{display:block}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview :is(small,.army-line){display:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview strong{display:block;font:800 16px/1 var(--font-heading);font-variant-numeric:tabular-nums;color:var(--mh-ink);white-space:nowrap}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview .income{font-size:13px;color:var(--mh-green)}
/* La pièce de l'ordinateur remplace le « G » (lu par les lecteurs d'écran). */
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview strong{display:flex;align-items:center;justify-content:flex-end;gap:4px}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview strong span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .economy-overview strong::after{content:"";flex:none;width:13px;height:13px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffeaa6'/%3E%3Cstop offset='1' stop-color='%23e9ad3a'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23d99a2b'/%3E%3Cstop offset='1' stop-color='%23a8650f'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='12' cy='12.6' r='11' fill='%236e430e'/%3E%3Ccircle cx='12' cy='11.4' r='11' fill='url(%23r)' stroke='%236e430e' stroke-width='1'/%3E%3Ccircle cx='12' cy='11.4' r='8.2' fill='url(%23f)'/%3E%3Ccircle cx='12' cy='11.4' r='6.6' fill='none' stroke='%23c98a24' stroke-width='.9'/%3E%3Cpath d='M12 6.9l1.3 2.7 2.9.4-2.1 2 .5 2.9-2.6-1.4-2.6 1.4.5-2.9-2.1-2 2.9-.4z' fill='%23b8771a'/%3E%3Cpath d='M6.2 8.6a7 7 0 0 1 4-3.4' fill='none' stroke='%23fff8dc' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-column{flex:1 1 auto;display:block;min-width:0;margin:0;padding:0 0 0 8px;border:0;border-left:2px solid var(--mh-line)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;border:0;background:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track{min-width:0;min-height:40px;display:grid;grid-template-rows:auto 8px;align-content:center;gap:3px;padding:0;border:0;background:none;color:var(--mh-ink)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track>span{display:flex;align-items:baseline;justify-content:space-between;gap:4px;font:700 12px/1 var(--font-ui);white-space:nowrap}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track>span>span{min-width:0;overflow:hidden;text-overflow:ellipsis;font:800 13px/1 var(--font-heading);text-transform:uppercase}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track :is(.power-label,.power-ready,.power-pct){display:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track b{font:800 12px/1 var(--font-heading);color:var(--mh-ink)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track b.ready{padding:1px 4px;border-radius:4px;background:var(--mh-gold)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track progress{display:block;width:100%;height:8px;margin:0;border:0;border-radius:4px;background:var(--mh-paper-2);-webkit-appearance:none;appearance:none;overflow:hidden}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track progress::-webkit-progress-bar{border-radius:4px;background:var(--mh-paper-2)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.coral progress::-webkit-progress-value{border-radius:4px;background:var(--mh-coral)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.azure progress::-webkit-progress-value{border-radius:4px;background:var(--mh-azure)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.coral progress::-moz-progress-bar{background:var(--mh-coral)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.azure progress::-moz-progress-bar{background:var(--mh-azure)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track:is(.full,.available) progress::-webkit-progress-value{background:linear-gradient(#ffe39a,#e2a93a)}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track:is(.full,.available) progress::-moz-progress-bar{background:linear-gradient(#ffe39a,#e2a93a)}
/* Activable : « ACTIVER » remplace le nom et la charge, sur un fond orange (zone tactile de 40 px). */
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.available{border-radius:8px;background:linear-gradient(var(--mh-orange-hi),var(--mh-orange-lo));padding:0 6px;cursor:pointer}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.available>span{visibility:hidden}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track .power-activate{display:none}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.available .power-activate{display:flex;grid-row:1;grid-column:1;align-items:center;justify-content:center;position:static;color:#fff;font:800 13px/1 var(--font-heading);font-style:normal}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.no-power{grid-template-rows:auto}
body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track.no-power :is(progress,b){display:none}
/* Téléphones étroits : sans les noms des commandants (la couleur de la jauge suffit). */
@media(max-width:760px){body.mobile-landscape:not(.home-mode) #app-shell .topbar #field-hud .power-track>span>span{display:none}}
/* Fiche sur papier clair (téléphone) : en-tête, sous-titre, terrain et étoiles de défense au contraste AA (recette C4). */
body:not(.home-mode) #app-shell #game-screen :is(.map-hud>aside.sidebar,#small-info) :is(.panel-kicker,.selected-heading p,.terrain-info),#small-info-dialog :is(.panel-kicker,.selected-heading p,.terrain-info){color:#4b5a73}
body:not(.home-mode) #app-shell #game-screen :is(.map-hud>aside.sidebar,#small-info) .terrain-info b,#small-info-dialog .terrain-info b{color:#9a6410}
