/* BUT IT'S MATH — mini-jeux ARCADE (ORBIT · SEVEN BAG · SKEE-BALL) : canvas 720×1280 + panneau de formules KaTeX */
.ag-root { position: absolute; inset: 0; overflow: hidden; background: #050a08; touch-action: none;
  user-select: none; -webkit-user-select: none; font-family: 'Barlow Semi Condensed', system-ui, sans-serif; color: #e9eee8; }
.ag-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; }
/* formules en direct (valeurs réelles du code) : sous la barre de l'infra, au-dessus du terrain */
.ag-fx { position: absolute; left: 14px; right: 14px; top: 174px; padding: 8px 14px 6px; border-radius: 16px;
  background: rgba(5,12,9,.78); border: 1px solid rgba(92,240,138,.22); pointer-events: none; z-index: 2;
  box-shadow: 0 0 28px rgba(92,240,138,.08) inset; }
.ag-fx .ag-r { font-size: 21px; line-height: 1.3; min-height: 37px; white-space: nowrap; overflow: hidden; color: #e9eee8;
  display: flex; align-items: center; }
.ag-fx .ag-r0 { color: #5cf08a; font-size: 22px; }
.ag-fx .ag-r3 { color: #ffcf3d; }
.ag-fx .katex { font-size: 1em; }
.ag-fx .katex .mfrac { font-size: .92em; }
/* boutons (≥ 88 px de scène = 44 px CSS à 360 px de large) */
.ag-btn { position: absolute; z-index: 3; border: 2px solid rgba(92,240,138,.55); background: rgba(10,22,17,.82); color: #5cf08a;
  font: 900 24px/1 Montserrat, sans-serif; letter-spacing: 1px; border-radius: 18px; touch-action: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0; }
.ag-btn:active { background: rgba(92,240,138,.22); }
.ag-btn:disabled { opacity: .35; }
.ag-btn svg { width: 44px; height: 44px; }
.ag-orbit-reset { left: 18px; bottom: 16px; width: 108px; height: 88px; flex-direction: column; gap: 3px; font-size: 15px; letter-spacing: 2px;
  color: #8ff6ff; border-color: rgba(143,246,255,.42); background: linear-gradient(180deg, rgba(16,32,30,.86), rgba(6,14,12,.86)); }
.ag-orbit-reset svg { width: 36px; height: 36px; }
/* SEVEN BAG : 4 grosses touches (icône + libellé), relief + appui */
.ag-sb-bar { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 112px; display: flex; gap: 10px; z-index: 3; }
.ag-sb-bar .ag-btn { position: relative; flex: 1; height: 100%; flex-direction: column; gap: 4px; border-radius: 20px; border-width: 2px;
  background: linear-gradient(180deg, rgba(22,40,32,.92), rgba(7,15,12,.92)); box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 6px 0 rgba(0,0,0,.45);
  transition: transform .06s ease-out, box-shadow .06s ease-out; }
.ag-sb-bar .ag-btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.05), 0 2px 0 rgba(0,0,0,.45); }
.ag-sb-bar .ag-btn svg { width: 50px; height: 50px; filter: drop-shadow(0 0 6px currentColor); }
.ag-sb-bar .ag-btn span { font: 800 15px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: 2px; opacity: .8; }
.ag-sb-btn.rot { color: #ffcf3d; border-color: rgba(255,207,61,.6); }
.ag-sb-btn.drop { color: #8ff6ff; border-color: rgba(143,246,255,.6); }
/* UX3 : niveau de détail 'full' → l'ancien panneau 4 lignes, sous le HUD commun (MG.ArcKit.hud) */
.ag-fx.ux3 { padding: 4px 12px; }
.ag-fx.ux3 .ag-r, .ag-fx.ux3 .ag-r0 { font-size: 19px; min-height: 33px; }

/* ===== formules GLOW (MG.ArcKit.glow, js/arcade/phasespace.js) : texte lumineux flottant, 0,3 s / ~2,5 s / 0,6 s ===== */
/* annonce de boss / de phase (VECTOR SQUAD, DOWNBEAT) : le panneau 'full' et NOW PLAYING laissent la place, le temps de l'annonce */
#arcade.bossann .akh-p, #arcade.bossann .btnow { visibility: hidden !important; }
.mg-glowl { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.mg-glowf { --gc: #8ff6ff; position: absolute; width: max-content; max-width: 700px; transform: translate(-50%, -50%) scale(.94); opacity: 0; white-space: nowrap; text-align: center;
  font-size: 30px; color: #fff; text-shadow: 0 0 4px var(--gc), 0 0 12px var(--gc), 0 0 28px var(--gc);
  transition: opacity .3s ease-out, transform .3s ease-out; will-change: opacity, transform; }
.mg-glowf.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.mg-glowf.out { opacity: 0; transition: opacity .6s ease-in; }
.mg-glowf small { display: block; margin-top: 4px; font: 700 19px/1.1 'Barlow Semi Condensed', sans-serif; letter-spacing: 3px; color: var(--gc); text-shadow: 0 0 10px var(--gc); }
.mg-glowf .katex { font-size: 1em; }
.mg-glowf.boxed { background: rgba(5,12,9,.84); border: 1px solid var(--gc); border-radius: 14px; padding: 8px 16px; text-shadow: none; }
.mg-glowf.boxed small { text-shadow: none; }
.mg-glowf.minimal { font: 800 24px 'Barlow Semi Condensed', sans-serif; letter-spacing: 2px; color: var(--gc); text-shadow: 0 0 10px var(--gc); }
/* panneaux de formules en direct : GLOW = sans cadre, texte lumineux, en retrait tant que rien ne se passe (.hot = un évènement) */
.ms-glow .ag-fx { background: none; border-color: transparent; box-shadow: none; opacity: .66; transition: opacity .3s ease-out; }
.ms-glow .ag-fx.hot { opacity: 1; transition: opacity .3s ease-out; }
.ms-glow .ag-fx .ag-r { text-shadow: 0 0 5px rgba(255,255,255,.45), 0 0 16px rgba(143,246,255,.35); }
.ms-glow .ag-fx .ag-r0 { text-shadow: 0 0 6px rgba(92,240,138,.8), 0 0 18px rgba(92,240,138,.4); }
.ms-glow .ag-fx .ag-r3 { text-shadow: 0 0 6px rgba(255,207,61,.8), 0 0 18px rgba(255,207,61,.4); }
.ms-minimal .ag-fx { background: none; border-color: transparent; box-shadow: none; padding-top: 2px; }
.ms-minimal .ag-fx .ag-r:not(.ag-r0) { display: none; }
.ms-minimal .ag-fx .ag-r0 { font-size: 17px; min-height: 0; opacity: .8; }
/* ANGLE OF ATTACK / POISSON MOLES : formules du plateau en lumière */
.ms-glow .aof, .ms-glow .mlf { text-shadow: 0 0 6px rgba(143,246,255,.85), 0 0 20px rgba(143,246,255,.45); }
.ms-glow .aoa2 { text-shadow: 0 0 6px rgba(255,207,61,.85), 0 0 20px rgba(255,207,61,.4); }
.ms-glow .mlf2 { text-shadow: 0 0 6px rgba(201,211,204,.6), 0 0 16px rgba(92,240,138,.35); }
.ms-boxed .aof, .ms-boxed .mlf { left: 14px; right: 14px; padding: 8px 10px; border-radius: 14px; background: rgba(5,12,9,.8); border: 1px solid rgba(143,246,255,.25); }
.ms-minimal .aoa2, .ms-minimal .mlf2 { display: none; }
.ms-minimal .aof, .ms-minimal .mlf { font-size: 19px; opacity: .75; }
.ag-root .hidden { display: none !important; }

/* =====================================================================================================
   UX3 (13/10) — HUD COMMUN des jeux d'arcade (MG.ArcKit.hud, js/arcade/phasespace.js)
   haut-gauche = VITALS · haut-droite = SCORE · une ligne de formule lumineuse · ⓘ = infos secondaires · bandeau d'évènement
   ===================================================================================================== */
.akh { --acc: #ffcf3d; --fc: #8ff6ff; --akt: 112px; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  font-family: 'Barlow Semi Condensed', system-ui, sans-serif; color: #e9eee8; }
.akh.hidden { display: none; }
.akh-l { position: absolute; left: 18px; top: var(--akt); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.akh-r { position: absolute; right: 18px; top: var(--akt); display: flex; flex-direction: column; align-items: flex-end; }
.akh-sc { font: 900 46px/1 Montserrat, sans-serif; color: var(--acc); font-variant-numeric: tabular-nums; letter-spacing: -.5px;
  text-shadow: 0 0 18px color-mix(in srgb, var(--acc) 45%, transparent), 0 2px 0 rgba(0,0,0,.6); }
.akh-ss { margin-top: 2px; font: 800 16px/1 'Barlow Semi Condensed'; letter-spacing: 2px; color: #a9b8af; text-transform: uppercase; }
.akv { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 5px 8px; border-radius: 10px; background: rgba(4,9,7,.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); --vc: #5cf08a; }
.akv small { font: 800 14px/1 'Barlow Semi Condensed'; letter-spacing: 2px; color: #8fa59a; text-transform: uppercase; }
.akv b { font: 900 28px/1 Montserrat, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.akv-dots b { color: var(--vc); letter-spacing: 3px; font-size: 24px; text-shadow: 0 0 10px color-mix(in srgb, var(--vc) 60%, transparent); }
.akv-bar { align-items: center; }
.akv-bar i { position: relative; display: block; width: 200px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.1); overflow: hidden; }
.akv-bar u { position: absolute; inset: 0; transform-origin: 0 50%; background: linear-gradient(90deg, color-mix(in srgb, var(--vc) 70%, #000), var(--vc));
  box-shadow: 0 0 12px var(--vc); transition: transform .25s cubic-bezier(.2,.9,.3,1); }
.akv-bar b { font-size: 22px; min-width: 44px; }
.akv-bar.low u { background: linear-gradient(90deg, #a11b33, #ff3d5e); box-shadow: 0 0 14px #ff3d5e; animation: akLow .6s ease-in-out infinite alternate; }
@keyframes akLow { from { opacity: .6; } to { opacity: 1; } }
.akv.bump { animation: akBump .32s cubic-bezier(.2,1.6,.4,1); }
@keyframes akBump { 0% { transform: scale(1.18); } 100% { transform: none; } }
.akh-f { position: absolute; left: 16px; right: 16px; top: calc(var(--akt) + 92px); display: flex; justify-content: center; align-items: center; gap: 10px; }
.akh-fm { max-width: 600px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 25px; color: #fff; opacity: .78;
  text-shadow: 0 0 5px var(--fc), 0 0 16px color-mix(in srgb, var(--fc) 55%, transparent); transition: opacity .4s ease-out; }
.akh-fm.hot { animation: akHot 1.6s ease-out; }
@keyframes akHot { 0% { opacity: 1; transform: scale(1.06); } 30% { opacity: 1; transform: none; } 100% { opacity: .78; } }
.akh-fm .katex { font-size: 1em; }
.akh-i { pointer-events: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.28); background: rgba(4,9,7,.6);
  color: #cfe0d6; font: italic 900 22px/1 Georgia, serif; padding: 0; cursor: pointer; }
.akh-i.on { border-color: var(--acc); color: var(--acc); }
.akh-i.hidden, .akh-p.hidden { display: none; }
.akh-p { pointer-events: auto; position: absolute; left: 50%; top: calc(var(--akt) + 144px); transform: translateX(-50%); max-width: 680px; min-width: 360px;
  padding: 10px 16px; border-radius: 14px; background: rgba(4,9,7,.9); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 6px; font-size: 19px; color: #dfe8e2; animation: akIn .22s cubic-bezier(.2,.9,.3,1); }
.akh-p > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.akh-p .katex { font-size: 1em; }
@keyframes akIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
.akh-e { --ec: #ffcf3d; position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 900 44px/1 Montserrat, sans-serif; letter-spacing: 1px;
  color: #fff; text-shadow: 0 0 8px var(--ec), 0 0 26px var(--ec), 0 3px 0 rgba(0,0,0,.6); opacity: 0; transform: scale(.8); }
.akh-e.on { animation: akEv 1.4s cubic-bezier(.2,.9,.3,1) forwards; }
@keyframes akEv { 0% { opacity: 0; transform: scale(.7); } 12% { opacity: 1; transform: scale(1.06); } 22% { transform: none; } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
.akh.land .akh-l { left: 24px; }
.akh.land .akh-r { right: 24px; }
.akh.land .akh-f { top: calc(var(--akt) + 4px); left: 300px; right: 300px; }
.akh.land .akh-p { top: calc(var(--akt) + 56px); }
.akh.land .akh-e { top: 30%; font-size: 40px; }
@media (prefers-reduced-motion: reduce) { .akh-e.on, .akv.bump, .akh-fm.hot { animation-duration: .01s; } }

/* pilules de la coquille (api.hud.set) alignées sur le même plan : vitals à gauche, SCORE gros à droite, le reste discret */
.arhud { justify-content: flex-start !important; gap: 6px !important; padding: 0 18px; }
.arpill { min-width: 0 !important; padding: 4px 10px 5px !important; background: rgba(4,9,7,.5) !important; border: 0 !important; align-items: flex-start !important; }
.arpill small { font-size: 13px !important; }
.arpill b { font-size: 24px !important; }
.arpill.vt b { color: #5cf08a; }
.arpill.sc { order: 99; margin-left: auto; align-items: flex-end !important; background: none !important; }
.arpill.sc b { font-size: 44px !important; color: #ffcf3d; text-shadow: 0 0 18px rgba(255,207,61,.45); }
/* niveau de détail (MG.Settings.mathDetail) : full = infos dépliées en permanence (non cliquables), minimal = pas de formule */
.akh.md-full .akh-p { pointer-events: none; background: rgba(4,9,7,.55); box-shadow: none; animation: none; font-size: 17px; }
.akh.md-minimal .akh-f, .akh.md-minimal .akh-p, .akh.md-minimal .akh-ss { display: none; }
