/* PHASE SPACE (js/arcade/phasespace.js) — commandes et écrans du prototype, en px de scène (×2 des px CSS du prototype) */
.ar-phasespace { background: #040806; }
.ar-phasespace .hidden { display: none !important; }
#psCtl { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#psJoy { position: absolute; left: 0; bottom: 0; width: 60%; height: 52%; pointer-events: auto; touch-action: none; }
#psBase { position: absolute; width: 248px; height: 248px; margin: -124px 0 0 -124px; border-radius: 50%; display: none;
  border: 3px solid rgba(143,246,255,.35); background: radial-gradient(circle, rgba(143,246,255,.10), rgba(143,246,255,.02) 70%); }
#psBase.on { display: block; }
#psKnob { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e9fdff, #8ff6ff 45%, rgba(42,108,203,.9)); box-shadow: 0 0 36px rgba(143,246,255,.55); }
#psHint { position: absolute; left: 52px; bottom: 68px; width: 208px; height: 208px; border-radius: 50%; border: 3px dashed rgba(143,246,255,.28);
  display: flex; align-items: center; justify-content: center; transition: opacity .4s; }
#psHint span { font: 800 24px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: 4px; color: rgba(143,246,255,.55); }
#psHint.off { opacity: 0; }
.psbtn { position: absolute; border-radius: 50%; border: 0; pointer-events: auto; touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .06s, filter .06s; cursor: pointer; font-family: inherit; color: #fff; }
.psbtn span { font: 900 34px/1 Montserrat, sans-serif; letter-spacing: 1px; }
.psbtn i { font: 700 20px/1 'Barlow Semi Condensed', sans-serif; font-style: normal; opacity: .7; margin-top: 6px; letter-spacing: 2px; text-transform: uppercase; }
#psFire { right: 36px; bottom: 60px; width: 184px; height: 184px; background: radial-gradient(circle at 40% 35%, #ff6f88, #e8274c 60%, #9c1230);
  box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 0 52px rgba(232,39,76,.5); opacity: .6; }
#psFire.on, #psSpec.on { opacity: .95; }
#psFire.on { transform: scale(.9); filter: brightness(1.35); box-shadow: 0 0 0 6px rgba(255,255,255,.35), 0 0 68px rgba(232,39,76,.9); }
#psSpec { --cd: 0; right: 244px; bottom: 82px; width: 140px; height: 140px; background: rgba(4,8,6,.5); border: 6px solid #ffcf3d; color: #ffcf3d; overflow: hidden; opacity: .62; }
#psSpec span { font-size: 48px; }
#psSpec::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(4,8,6,.72) calc(var(--cd) * 360deg), transparent 0); }
#psSpec.ready { box-shadow: 0 0 36px rgba(255,207,61,.55); }
#psSpec.on { transform: scale(.9); filter: brightness(1.4); }

.psscr { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 120px 44px 40px; text-align: center; background: radial-gradient(ellipse at 50% 45%, rgba(4,8,6,.72), rgba(4,8,6,.94)); color: #e9eee8; }
#psMenu { background: radial-gradient(ellipse at 50% 45%, rgba(4,8,6,.25), rgba(4,8,6,.82)); }
.pslab { margin: 0; font: 800 22px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: 6px; color: #7d8f86; }
.psscr h1 { margin: 0; font: 900 88px/1 Montserrat, sans-serif; letter-spacing: 2px; }
.psscr h1 span { display: inline-block; background: #e8274c; padding: 6px 24px 10px; border-radius: 16px; transform: rotate(-2.5deg); margin-top: 12px; }
.psscr h2 { margin: 0; font: 900 64px/1 Montserrat, sans-serif; }
.pstag { margin: 0; color: #9fb3a8; font-size: 30px; line-height: 1.35; }
.psbig { font: 900 42px/1 Montserrat, sans-serif; padding: 30px 80px; border-radius: 24px; border: 0; background: #ff3d5e; color: #fff; box-shadow: 0 0 46px rgba(255,61,94,.45); min-width: 420px; cursor: pointer; }
.psbig:active { transform: scale(.96); }
.psghost { font: 800 26px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: 3px; color: #9fb3a8; padding: 22px 30px; min-height: 88px; border: 2px solid rgba(255,255,255,.16); border-radius: 18px; background: none; cursor: pointer; }
.pshi { margin: 0; font: 800 28px/1 Montserrat, sans-serif; color: #ffcf3d; min-height: 28px; }
#psSeed { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; max-width: 640px; padding: 14px 18px; border-radius: 22px;
  border: 2px solid rgba(143,246,255,.22); background: rgba(4,8,6,.55); }
#psSeed span { font: 800 20px 'Barlow Semi Condensed', sans-serif; letter-spacing: 4px; color: #7d8f86; }
#psSeed b { font: 900 34px Montserrat, sans-serif; letter-spacing: 4px; color: #8ff6ff; min-width: 120px; }
#psSeed.daily b, #psSeed.daily span { color: #ffcf3d; }
#psSeed small { width: 100%; font-size: 22px; color: #8a9c93; }
.pschip { font: 800 22px 'Barlow Semi Condensed', sans-serif; letter-spacing: 3px; padding: 0 18px; min-height: 76px; border-radius: 14px; border: 2px solid rgba(255,255,255,.18); background: none; color: #cfe0d6; cursor: pointer; }
.pschip:active { transform: scale(.95); }
.pshow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 640px; text-align: left; }
.pshow li { display: flex; align-items: center; gap: 20px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); border-radius: 20px; padding: 14px 20px; font-size: 26px; color: #c9d4cc; }
.pshow b { width: 54px; height: 54px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 900 26px Montserrat, sans-serif; color: #8ff6ff; border: 3px solid rgba(143,246,255,.4); }
.pshow b.pk { color: #e8274c; border-color: rgba(232,39,76,.6); }
.pshow b.gd { color: #ffcf3d; border-color: rgba(255,207,61,.6); }
.pshow em { font-style: normal; font-weight: 800; color: #fff; }
.psrow { display: flex; gap: 14px; }
.psmel { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 0 12px; border-bottom: 2px solid rgba(143,246,255,.25); }
.psmel b { width: 20px; border-radius: 4px; background: #8ff6ff; box-shadow: 0 0 16px rgba(143,246,255,.6); }
.psmel .none { color: #7d8f86; font-size: 24px; }
#psClearT { color: #8ff6ff; }
.psstats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 620px; }
.psstats div { background: rgba(255,255,255,.04); border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.psstats span { font-size: 20px; letter-spacing: 3px; color: #7d8f86; font-weight: 800; }
.psstats b { font: 900 34px/1 Montserrat, sans-serif; }
.psshead { display: flex; align-items: baseline; justify-content: space-between; width: 100%; max-width: 660px; }
.psshead b { font: 900 42px Montserrat, sans-serif; color: #ffcf3d; }
#psNext { margin: 0; font-size: 25px; color: #c9d4cc; line-height: 1.35; }
#psNext b { color: #8ff6ff; letter-spacing: 2px; }
#psNext span { color: #8a9c93; font-size: 22px; }
#psGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; max-width: 660px; }
.pscard { --c: #ffcf3d; display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 20px 20px 18px; border-radius: 22px; min-height: 200px; cursor: pointer;
  background: rgba(255,255,255,.045); border: 2px solid rgba(255,255,255,.1); border-top: 6px solid var(--c); color: #e9eee8; font-family: inherit; }
.pscard.pink { --c: #e8274c; } .pscard.green { --c: #5cf08a; } .pscard.cyan { --c: #8ff6ff; } .pscard.yellow { --c: #fad03f; }
.pscard .nm { font: 900 24px/1.1 Montserrat, sans-serif; color: #fff; display: flex; justify-content: space-between; gap: 8px; }
.pscard .nm em { font: 800 20px 'Barlow Semi Condensed', sans-serif; font-style: normal; color: var(--c); }
.pscard .mt { font-size: 23px; line-height: 1.25; color: #b8c6be; flex: 1; }
.pscard .pr { font: 900 28px Montserrat, sans-serif; color: #ffcf3d; }
.pscard:not([disabled]):active { transform: scale(.97); background: rgba(255,255,255,.09); }
.pscard.poor { opacity: .5; } .pscard.poor .pr { color: #ff3d5e; } .pscard.max { opacity: .35; }
/* gaucher (MG.Settings.controls.lefty) : joystick à droite, FIRE / BOMB à gauche */
.ar-phasespace.lefty #psJoy { left: auto; right: 0; }
.ar-phasespace.lefty #psHint { left: auto; right: 52px; }
.ar-phasespace.lefty #psFire { right: auto; left: 36px; }
.ar-phasespace.lefty #psSpec { right: auto; left: 244px; }
/* PAUSE : réglage rapide de la sensibilité du stick (injecté dans la boîte de pause de la coquille) */
.arpause .pssens { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 16px 18px; border-radius: 18px; background: rgba(143,246,255,.06); border: 1px solid rgba(143,246,255,.22); text-align: left; }
.arpause .pssens label { display: flex; justify-content: space-between; align-items: baseline; font: 800 22px/1 'Barlow Semi Condensed', sans-serif; letter-spacing: 3px; color: #9fb3a8; }
.arpause .pssens b { font: 900 30px/1 Montserrat, sans-serif; color: #8ff6ff; letter-spacing: 0; }
.arpause .pssens input { width: 100%; height: 44px; accent-color: #8ff6ff; }
.arpause .pssens small { font: 600 19px/1.2 'Barlow Semi Condensed', sans-serif; color: #7d8f86; }

/* ===================== UX3 (13/10) — HUD compact (MG.ArcKit.hud) + commandes lisibles ===================== */
/* vitals : 3 barres fines empilées (bouclier / armure / énergie), libellé + valeur alignés */
.ar-phasespace .pshud .akh-l { gap: 4px; }
.ar-phasespace .pshud .akv { padding: 3px 10px 4px 8px; gap: 8px; border-radius: 9px; background: rgba(4,9,7,.6); }
.ar-phasespace .pshud .akv small { width: 64px; font-size: 13px; letter-spacing: 1.5px; }
.ar-phasespace .pshud .akv-bar i { width: 156px; height: 10px; border-radius: 5px; }
.ar-phasespace .pshud .akv-bar b { font-size: 18px; min-width: 38px; text-align: right; }
.ar-phasespace .pshud .akv-bar u { transition: transform .12s linear; }
.ar-phasespace .pshud .akh-sc { font-size: 44px; color: #fff; text-shadow: 0 0 16px rgba(255,61,94,.55), 0 2px 0 rgba(0,0,0,.6); }
.ar-phasespace .pshud .akh-ss { color: #ffcf3d; font-size: 18px; margin-top: 4px; }
.ar-phasespace .pshud .akh-f { top: calc(var(--akt) + 100px); }
.ar-phasespace .pshud .akh-fm { font-size: 24px; max-width: 560px; }
/* détail 'full' : le panneau ⓘ toujours ouvert passe sous la barre du boss */
.ar-phasespace .pshud .akh-p { top: calc(var(--akt) + 200px); font-size: 18px; }
.ar-phasespace .pshud.md-full .akh-p { background: rgba(4,9,7,.42); padding: 6px 14px; gap: 3px; }

/* commandes : icônes nettes, libellés courts ; la zone du joystick reste sous la voie du vaisseau */
#psJoy { height: 38%; }
#psHint { color: rgba(143,246,255,.5); flex-direction: column; gap: 2px; }
#psHint svg { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
#psHint span { font-size: 22px; }
.psbtn svg { width: 66px; height: 66px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
#psFire { opacity: .72; }
#psFire i { opacity: .9; font-weight: 800; font-size: 22px; margin-top: 4px; }
#psSpec { opacity: .75; }
#psSpec i { font-size: 17px; opacity: .85; letter-spacing: 1px; }
#psSpec span { font-size: 54px; text-shadow: 0 0 14px rgba(255,207,61,.6); }
#psSpec:not(.ready) span { opacity: .55; }

/* ===================== PS2 (29/10) — CAMPAGNE : titre, carte, outfitter, data cube, fin de niveau (px de scène 720×1280) ===================== */
#psMenu { gap: 16px; }
#psMenu .pshow li { padding: 8px 16px; font-size: 22px; }
#psMenu .pshow b { width: 44px; height: 44px; font-size: 22px; }
.psbig small { display: block; font: 700 21px/1.1 'Barlow Semi Condensed', sans-serif; letter-spacing: 2px; opacity: .85; margin-top: 8px; }
.pscampb { display: flex; gap: 14px; align-items: stretch; }
.pscampb #psNew { min-width: 140px; }
#psCont { background: linear-gradient(135deg, #8ff6ff, #3d7cff); color: #04101a; box-shadow: 0 0 50px rgba(143,246,255,.45); }
.psbig.psend { padding: 20px 60px; font-size: 34px; background: none; border: 3px solid #ff3d5e; color: #ff7f95; box-shadow: 0 0 26px rgba(255,61,94,.25); }
.psbig[disabled] { opacity: .35; box-shadow: none; }
.pscamp { justify-content: flex-start; gap: 14px; padding: 112px 22px 22px; background: #05060c; }
.pschead { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; }
.pschead h2 { flex: 1; text-align: left; font-size: 40px; letter-spacing: 2px; }
.pscr { font: 900 34px Montserrat, sans-serif; color: #ffcf3d; text-shadow: 0 0 14px rgba(255,207,61,.45); }
.psico { width: 76px; height: 76px; border-radius: 18px; border: 2px solid rgba(255,255,255,.18); background: none; color: #e9eee8; font: 900 44px/1 Montserrat, sans-serif; cursor: pointer; }
.pscube { display: flex; align-items: center; gap: 8px; height: 66px; padding: 0 16px; border-radius: 16px; border: 2px solid rgba(255,127,166,.45); background: rgba(255,127,166,.08); color: #ff9fbe; cursor: pointer; }
.pscube i { font-style: normal; font-size: 30px; } .pscube b { font: 900 26px Montserrat, sans-serif; }
#psMapC { position: relative; inset: auto; width: 720px; height: 680px; flex: none; margin: 0 -22px; touch-action: manipulation; cursor: pointer; }
.pssheet { --pa: #8ff6ff; width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; border-radius: 24px; background: rgba(255,255,255,.035); border: 2px solid rgba(255,255,255,.08); border-top: 5px solid var(--pa); }
.psshd { display: flex; align-items: baseline; gap: 14px; text-align: left; }
.psshd b { font: 900 34px Montserrat, sans-serif; letter-spacing: 1px; }
.psshd span { flex: 1; font-size: 22px; color: #9fb3a8; }
.psshd em { font: 800 19px 'Barlow Semi Condensed', sans-serif; font-style: normal; letter-spacing: 2px; color: #ff9fbe; }
.pslvs { display: flex; align-items: center; gap: 6px; }
.pslvc { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.psarr { font: 900 30px Montserrat, sans-serif; color: rgba(255,255,255,.3); }
.pslv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 78px; justify-content: center; border-radius: 16px; cursor: pointer;
  border: 2px solid rgba(255,255,255,.14); background: rgba(4,8,6,.5); color: #e9eee8; font-family: inherit; }
.pslv b { font: 900 24px/1 Montserrat, sans-serif; } .pslv small { font: 700 16px 'Barlow Semi Condensed', sans-serif; letter-spacing: 1px; color: #9fb3a8; }
.pslv i { font: 600 14px/1.1 'Barlow Semi Condensed', sans-serif; font-style: normal; color: #7d8f86; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pslv.done { border-color: var(--pa); } .pslv.done small { color: var(--pa); }
.pslv.cur { box-shadow: 0 0 18px var(--pa); }
.pslv.sel { background: var(--pa); color: #04080a; border-color: #fff; } .pslv.sel small, .pslv.sel i { color: #04080a; }
.pslv.lock { opacity: .35; cursor: default; }
.pslocked { margin: 8px 0; font-size: 26px; color: #9fb3a8; }
#psOutfit { padding: 22px 40px; font-size: 34px; }
/* outfitter */
.psslots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; }
.psslot { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; min-height: 96px; border-radius: 14px; border: 2px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: #cfe0d6; cursor: pointer; font-family: inherit; overflow: hidden; }
.psslot i { font-style: normal; font-size: 26px; color: #8ff6ff; } .psslot b { font: 900 15px/1 Montserrat, sans-serif; letter-spacing: .5px; }
.psslot small { font: 600 13px/1.05 'Barlow Semi Condensed', sans-serif; color: #8a9c93; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psslot.on { border-color: #8ff6ff; background: rgba(143,246,255,.12); box-shadow: 0 0 16px rgba(143,246,255,.3); }
.psdet { display: flex; gap: 16px; width: 100%; align-items: stretch; text-align: left; }
#psPrevC { position: relative; inset: auto; width: 220px; height: 220px; flex: none; border-radius: 18px; border: 2px solid rgba(143,246,255,.25); }
.psdtx { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.psdtx .dn { font: 900 32px/1 Montserrat, sans-serif; color: #fff; }
.psdtx .dtx { font-size: 26px; color: #8ff6ff; text-shadow: 0 0 12px rgba(143,246,255,.5); overflow: hidden; }
.psdtx p { margin: 0; font-size: 19px; line-height: 1.25; color: #9fb3a8; }
.psdtx .psskin { color: #c9a7ff; } .psdtx .psok { color: #5cf08a; font: 900 24px Montserrat, sans-serif; }
.psact { font: 900 24px/1 Montserrat, sans-serif; padding: 14px 18px; min-height: 64px; border-radius: 16px; border: 2px solid #ffcf3d; background: rgba(255,207,61,.12); color: #ffcf3d; cursor: pointer; }
.psact small { display: block; font: 700 16px 'Barlow Semi Condensed', sans-serif; letter-spacing: 1px; margin-top: 4px; opacity: .85; }
.psact.buy { background: #ffcf3d; color: #140f02; }
.psact.ghost { border-color: rgba(255,255,255,.2); background: none; color: #9fb3a8; font-size: 20px; min-height: 52px; }
.psact[disabled] { opacity: .35; }
.psstep { display: flex; align-items: center; gap: 10px; }
.psstep .psact { min-width: 92px; font-size: 32px; }
.psstep > b { flex: 1; text-align: center; font: 900 34px Montserrat, sans-serif; color: #fff; } .psstep > b small { font-size: 18px; color: #7d8f86; }
.pslist { flex: 1; min-height: 0; width: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; overscroll-behavior: contain; }
.psitem { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'nm pr' 'tx pr'; gap: 2px 12px; align-items: center; text-align: left; padding: 10px 16px; min-height: 76px; border-radius: 16px;
  border: 2px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); color: #e9eee8; cursor: pointer; font-family: inherit; flex: none; }
.psitem .nm { grid-area: nm; font: 900 23px/1.1 Montserrat, sans-serif; display: flex; gap: 10px; align-items: baseline; }
.psitem .nm em { font: 800 17px 'Barlow Semi Condensed', sans-serif; font-style: normal; letter-spacing: 1.5px; color: #5cf08a; }
.psitem .tx { grid-area: tx; font-size: 19px; color: #8ff6ff; opacity: .85; overflow: hidden; white-space: nowrap; }
.psitem .pr { grid-area: pr; font: 900 24px Montserrat, sans-serif; color: #ffcf3d; }
.psitem.sel { border-color: #8ff6ff; background: rgba(143,246,255,.1); }
.psitem.eq { border-left: 6px solid #5cf08a; }
.psitem.poor .pr { color: #ff3d5e; opacity: .7; }
#psGo { width: 100%; padding: 24px 20px; font-size: 32px; flex: none; }
/* data cube */
#psCube { --pa: #ff7fa6; justify-content: center; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--pa) 14%, #05060c), #05060c 70%); }
#psCube h2 { color: var(--pa); text-shadow: 0 0 26px var(--pa); }
.pscubeart { position: relative; width: 170px; height: 170px; margin: 10px 0; perspective: 600px; }
.pscubeart i { position: absolute; inset: 20px; border: 4px solid var(--pa); border-radius: 10px; box-shadow: 0 0 24px var(--pa); animation: pscube 6s linear infinite; }
.pscubeart i:nth-child(2) { inset: 44px; animation-duration: 4s; animation-direction: reverse; }
.pscubeart i:nth-child(3) { inset: 66px; background: var(--pa); animation-duration: 3s; }
@keyframes pscube { from { transform: rotateX(20deg) rotateY(0) rotateZ(45deg); } to { transform: rotateX(20deg) rotateY(360deg) rotateZ(45deg); } }
.pscubef { font-size: 40px; color: #fff; text-shadow: 0 0 18px var(--pa); min-height: 60px; }
#psCubeTx { max-width: 600px; font-size: 28px; }
#psCube .psrow { align-items: center; }
#psCube .psghost { min-width: 90px; font-size: 40px; }
/* fin de niveau campagne */
#psCEnd { justify-content: center; background: radial-gradient(ellipse at 50% 40%, rgba(10,24,30,.92), rgba(4,8,6,.97)); }
#psCEndT { color: #8ff6ff; text-shadow: 0 0 24px rgba(143,246,255,.5); }
.pscubebtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 30px; border-radius: 22px; border: 3px solid #ff7fa6; background: rgba(255,127,166,.1); color: #ff9fbe; cursor: pointer; font-family: inherit; animation: pspulse 1.2s ease-in-out infinite; }
.pscubebtn i { font-style: normal; font-size: 44px; } .pscubebtn b { font: 900 30px Montserrat, sans-serif; } .pscubebtn small { font-size: 20px; color: #c9a7b4; }
@keyframes pspulse { 50% { box-shadow: 0 0 34px rgba(255,127,166,.6); } }
.pscnote { font-size: 20px; color: #7d8f86; letter-spacing: 1px; }
/* SIGMA (coin) masquée sur les écrans de campagne (carte / outfitter / cube / fin) : elle couvrait la fiche et l'aperçu */
#stage:has(.pscamp:not(.hidden)) #sigmaCorner { display: none !important; }

/* POLISH : écran CAMPAIGN COMPLETE (après le boss final) */
#psCEnd.pscomplete { background: radial-gradient(ellipse at 50% 38%, rgba(40,8,50,.92), rgba(4,4,12,.97)); }
#psCEnd.pscomplete #psCEndT { color: #ff7ae8; font-size: 1.25em; letter-spacing: 4px; text-shadow: 0 0 18px rgba(255,61,214,.8), 0 0 46px rgba(143,246,255,.5); animation: pscpl 2.2s ease-in-out infinite alternate; }
#psCEnd.pscomplete .psstats div { box-shadow: inset 0 0 0 1px rgba(255,122,232,.35), 0 0 14px rgba(143,246,255,.18); }
#psCEnd.pscomplete .pscnote { color: #8ff6ff; }
@keyframes pscpl { from { text-shadow: 0 0 12px rgba(255,61,214,.6), 0 0 30px rgba(143,246,255,.3); } to { text-shadow: 0 0 22px rgba(255,61,214,.95), 0 0 60px rgba(143,246,255,.7); } }

/* ===================== v3 CONTENT : modes, étoiles, médailles, intro de planète, secret ===================== */
#psMap { gap: 10px; }
#psMap .pschead h2 { font-size: 28px; line-height: 1; letter-spacing: 1px; min-width: 0; }
#psMapC { height: 590px; }
#psMap.pshard { background: radial-gradient(ellipse at 50% 0, rgba(70,8,20,.75), #05060c 60%); }
#psMap.pshard .pschead h2 { color: #ff7f95; }
.psstarb { border-color: rgba(255,207,61,.45); background: rgba(255,207,61,.08); color: #ffcf3d; }
.psmodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.psmode { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 72px; padding: 6px 4px; border-radius: 14px; border: 2px solid rgba(255,61,94,.45); background: rgba(255,61,94,.07); color: #ffc2cc; cursor: pointer; font-family: inherit; overflow: hidden; }
.psmode b { font: 900 21px/1 Montserrat, sans-serif; letter-spacing: 1px; }
.psmode small { font: 700 15px/1.05 'Barlow Semi Condensed', sans-serif; letter-spacing: .5px; color: #a59aa0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psmode.on { background: #ff3d5e; border-color: #fff; color: #18040a; box-shadow: 0 0 18px rgba(255,61,94,.55); }
.psmode.on small { color: #3a0b16; }
.psmode.lock { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.025); color: #7d8f86; }
.psmode.lock small { color: #6c7a73; }
.psinfo { width: 44px; height: 44px; flex: none; align-self: center; border-radius: 50%; border: 2px solid var(--pa); background: none; color: var(--pa); font: 900 24px/1 Montserrat, sans-serif; cursor: pointer; padding: 0; }
.psshd { align-items: center; }
.psmd { display: block; text-decoration: none; font-size: 15px; line-height: 1; letter-spacing: 2px; margin-top: 2px; }
.psmd s { text-decoration: none; color: rgba(255,255,255,.2); }
.psmd s.on { color: #ffcf3d; }
.pslv.sel .psmd s { color: rgba(4,8,10,.28); } .pslv.sel .psmd s.on { color: #04080a; }
.pslv.sec { border-color: #ffcf3d; background: rgba(255,207,61,.09); } .pslv.sec b { color: #ffcf3d; font-size: 18px; }
.pslv.sec.sel { background: #ffcf3d; } .pslv.sec.sel b { color: #04080a; }
/* fin de niveau : médailles, notes de paliers */
#psCEnd { gap: 12px; }
#psCEnd .psstats { gap: 8px; }
#psCEnd .psstats div { padding: 9px 16px; gap: 4px; }
#psCEnd .psstats b { font-size: 28px; }
.psmeds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 620px; }
.psmeds:empty { display: none; }
.psmed { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 2px solid rgba(255,255,255,.1); color: rgba(255,255,255,.25); }
.psmed i { font-style: normal; font-size: 44px; line-height: 1; }
.psmed small { font: 800 16px/1.05 'Barlow Semi Condensed', sans-serif; letter-spacing: 1px; color: #7d8f86; text-align: center; }
.psmed.on { border-color: #ffcf3d; color: #ffcf3d; background: rgba(255,207,61,.08); }
.psmed.on small { color: #e7d9a4; }
.psmed.new { animation: psmednew 1s ease-out 2; box-shadow: 0 0 22px rgba(255,207,61,.55); }
@keyframes psmednew { 40% { transform: scale(1.1); } }
.psrws { display: flex; flex-direction: column; gap: 5px; }
.psrws:empty { display: none; }
.psrw { margin: 0; font: 900 22px/1.15 Montserrat, sans-serif; color: #ffcf3d; }
.psrw.sec { color: #fff; text-shadow: 0 0 14px #ffcf3d; }
/* intro de planète / modes */
#psIntro { --pa: #8ff6ff; gap: 12px; }
#psIntro .pschead { justify-content: flex-start; }
#psIntro .pslab { flex: 1; text-align: left; letter-spacing: 3px; color: var(--pa); }
#psIntroC { position: relative; inset: auto; width: 720px; height: 300px; flex: none; margin: 0 -22px; }
#psIntroT { color: var(--pa); text-shadow: 0 0 26px var(--pa); font-size: 56px; }
#psIntroF { font-size: 34px; min-height: 44px; }
#psIntroTx { font-size: 25px; max-width: 640px; line-height: 1.25; }
#psIntro .psstats { gap: 8px; }
#psIntro .psstats div { padding: 9px 16px; gap: 4px; }
#psIntro .psstats span { font-size: 16px; letter-spacing: 2px; }
#psIntro .psstats b { font-size: 23px; line-height: 1.1; }
#psIntroGo { width: 100%; max-width: 620px; padding: 24px 20px; font-size: 34px; margin-top: auto; flex: none; }
/* étoiles et paliers */
.psstarv { color: #ffcf3d; }
.psleg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font: 800 20px 'Barlow Semi Condensed', sans-serif; letter-spacing: 1px; color: #9fb3a8; }
.psleg b { color: #ffcf3d; font-size: 24px; } .psleg i { font-style: normal; }
#psStarsSub { font-size: 22px; }
.pstier { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; min-height: 70px; flex: none; text-align: left; border-radius: 16px; border: 2px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: #9fb3a8; }
.pstier b { font: 900 26px Montserrat, sans-serif; color: #ffcf3d; opacity: .7; }
.pstier span { font: 900 22px/1.1 Montserrat, sans-serif; }
.pstier em { font: 800 18px 'Barlow Semi Condensed', sans-serif; font-style: normal; letter-spacing: 1px; color: #7d8f86; }
.pstier.on { border-color: rgba(255,207,61,.5); color: #fff; } .pstier.on b { opacity: 1; } .pstier.on em { color: #5cf08a; font-size: 26px; }
/* la rangée des modes prend de la hauteur : fiche de planète compactée (tout tient dans 1280 avec L2a + L2b + médailles) */
#psMap .pssheet { gap: 10px; padding: 10px 14px 12px; }
#psMap .pslv { padding: 5px 3px; min-height: 66px; gap: 1px; }
#psMap .pslvc { gap: 5px; }
#psMap #psOutfit { padding: 15px 30px; font-size: 30px; }
#psMap .psshd span { font-size: 20px; }
/* passe balance : offres de pub (une à la fois) */
.psadbtn { display: block; width: 100%; max-width: 560px; margin: 10px auto; }
.psadbtn.hidden { display: none; }
#psCEnd .psadbtn { background: rgba(255,207,61,.12); }
.pssupk { display: flex; gap: 18px; justify-content: center; margin: 22px 0; }
.pssupc { flex: 1; max-width: 270px; background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.16); border-radius: 18px; padding: 18px 10px; color: #cfe; cursor: pointer; opacity: 1; }
.pssupc.on { border-color: #ffcf3d; background: rgba(255,207,61,.14); color: #ffcf3d; }
.pssupc i { display: block; font: 900 44px/1.1 Montserrat, sans-serif; font-style: normal; }
.pssupc small { display: block; font: 700 19px/1.15 'Barlow Semi Condensed', sans-serif; letter-spacing: 1px; margin-top: 6px; }
.pssupc[disabled] { opacity: .35; }
#psSupply .psbig { margin-top: 14px; }

/* ===== LOT 6 ===== */
.psbig.pssec { background: linear-gradient(180deg, #ffd96b, #ffb020); color: #1a1204; box-shadow: 0 0 46px rgba(255,207,61,.4); }
.psbig.pssec small { color: rgba(26,18,4,.72); }
#psFire.auto { box-shadow: 0 0 0 5px rgba(255,255,255,.5), 0 0 46px rgba(232,39,76,.65); opacity: .82; }
#psFire.auto i { color: #fff; opacity: 1; }
#psMenu { justify-content: flex-start; padding-top: 112px; gap: 12px; }
#psMenu .pslab { display: none; }
#psMenu h1 { margin: 0; font-size: 104px; line-height: 1; }
#psMenu .pstag { margin: 0; font-size: 26px; line-height: 1.2; }
#psMenu .psbig { padding: 18px 44px; font-size: 36px; }
#psMenu .pshow li:nth-child(n+3) { display: none; }
#psMenu .pshi { margin: 0; }
