/* Astral Command — client styles. Palette: dark navy #0a0e1a, cyan #4fd8eb, amber #f0b357 */
* { margin:0; padding:0; box-sizing:border-box; }
html,body { width:100%; height:100%; background:#000; overflow:hidden;
  font-family:"Segoe UI", Roboto, "Helvetica Neue", sans-serif; color:#cfe9f2;
  -webkit-user-select:none; user-select:none; }

/* spec mod: themed cyan-on-navy scrollbars everywhere instead of the OS default.
   Firefox uses scrollbar-color/width; Chromium/Edge/Safari use ::-webkit-*. */
* { scrollbar-width:thin; scrollbar-color:rgba(79,216,235,.45) rgba(8,14,26,.5); }
::-webkit-scrollbar { width:9px; height:9px; }
::-webkit-scrollbar-track { background:rgba(8,14,26,.55); border-radius:6px; }
::-webkit-scrollbar-thumb {
  background:linear-gradient(180deg, rgba(79,216,235,.55), rgba(79,216,235,.28));
  border-radius:6px; border:1px solid rgba(79,216,235,.18); background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover { background:rgba(79,216,235,.7); }
::-webkit-scrollbar-corner { background:transparent; }

/* ---------- 16:9 letterboxed stage (req 49) ---------- */
#stage { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  background:#0a0e1a; overflow:hidden; }
#c { width:100%; height:100%; display:block; cursor:crosshair; }
.hidden { display:none !important; }

/* ---------- cockpit frame (req 58) ---------- */
#cockpit { position:absolute; inset:0; pointer-events:none; }
.strut { position:absolute; top:-8%; bottom:22%; width:13%;
  background:linear-gradient(90deg, rgba(8,12,22,.96), rgba(8,12,22,0) 85%); }
.strut-l { left:-4%; transform:skewX(7deg); border-right:1px solid rgba(79,216,235,.18); }
.strut-r { right:-4%; transform:skewX(-7deg) scaleX(-1); border-right:1px solid rgba(79,216,235,.18); }
.canopy-top { position:absolute; top:-2px; left:0; right:0; height:9%;
  background:radial-gradient(120% 160% at 50% -60%, rgba(8,12,22,.97) 60%, rgba(8,12,22,0));
  border-bottom:1px solid rgba(79,216,235,.10); }
.dash { position:absolute; bottom:0; left:0; right:0; height:17%;
  background:linear-gradient(180deg, rgba(10,14,26,0), rgba(9,13,24,.94) 35%, #070b14);
  border-top:1px solid rgba(79,216,235,.25);
  clip-path:polygon(0 38%, 18% 12%, 82% 12%, 100% 38%, 100% 100%, 0 100%); }
.vignette { position:absolute; inset:0;
  background:radial-gradient(115% 115% at 50% 45%, transparent 62%, rgba(2,4,8,.55)); }

/* ---------- HUD ---------- */
#hud { position:absolute; inset:0; pointer-events:none; font-size:13px; }
/* ship brackets + offscreen triangles (spec mod) */
#marks { position:absolute; inset:0; width:100%; height:100%; }
/* damage tint (spec mod): red vignette, opacity scales with the hit */
#hurt { position:absolute; inset:0; pointer-events:none; z-index:24; opacity:0;
  background:radial-gradient(115% 115% at 50% 50%, rgba(255,42,20,.30) 0%,
    rgba(150,8,0,.62) 78%, rgba(90,0,0,.8) 100%); }
#crosshair { position:absolute; left:50%; top:50%; transform:translate(-50%,-52%);
  color:#4fd8eb; font-size:22px; text-shadow:0 0 6px #4fd8eb; opacity:.9; }
#cursorDot { position:absolute; width:10px; height:10px; border:1px solid #f0b357;
  border-radius:50%; transform:translate(-50%,-50%); opacity:.85;
  box-shadow:0 0 6px rgba(240,179,87,.6); }
#topbar { position:absolute; top:1.6%; left:50%; transform:translateX(-50%);
  display:flex; gap:26px; align-items:baseline; letter-spacing:.08em; }
#topbar #clock { font-size:21px; color:#fff; font-weight:600; }
#topbar #sceneName { color:#4fd8eb; } #topbar #goal { color:#9db4c4; font-size:11px; }

#vitals { position:absolute; left:2.2%; bottom:3%; width:230px; }
.bar { display:flex; align-items:center; gap:7px; margin:5px 0; }
.bar label { width:38px; font-size:10px; letter-spacing:.12em; color:#7e98a8; }
.track { flex:1; height:9px; background:rgba(79,216,235,.10);
  border:1px solid rgba(79,216,235,.25); }
.fill { height:100%; width:100%; transition:width .12s linear; }
.fill.hull { background:linear-gradient(90deg,#3ddc84,#9be15d); }
.fill.shield { background:linear-gradient(90deg,#3aa7ff,#6fe3ff); }
.fill.energy { background:linear-gradient(90deg,#b06fff,#e3b0ff); }
.fill.heat { background:linear-gradient(90deg,#f0b357,#ff5c47); }
.bar span { width:46px; text-align:right; font-size:11px; color:#9db4c4; }

#speedo { position:absolute; right:2.2%; bottom:3.2%; text-align:right; }
#speedo #spd { font-size:34px; color:#fff; font-weight:300; }
#speedo small { color:#7e98a8; margin-left:4px; }
#speedo em { display:block; color:#f0b357; font-style:normal; letter-spacing:.25em;
  text-shadow:0 0 8px rgba(240,179,87,.8); animation:pulse .5s infinite alternate; }
@keyframes pulse { from{opacity:.55} to{opacity:1} }

#radar { position:absolute; right:2.2%; top:2.2%; border-radius:50%;
  background:radial-gradient(circle, rgba(8,16,28,.78) 60%, rgba(8,16,28,.35));
  border:1px solid rgba(79,216,235,.35); }

#killfeed { position:absolute; right:2.2%; top:215px; width:280px; text-align:right; }
#killfeed div { margin:3px 0; opacity:.95; transition:opacity 1s; font-size:12px; }

#chat { position:absolute; left:2.2%; top:26%; width:330px; pointer-events:none; }
#chatLog div { margin:2px 0; font-size:12px; text-shadow:0 1px 2px #000; transition:opacity 1.5s; }
#chatInput { pointer-events:auto; width:100%; margin-top:6px; background:rgba(8,16,28,.85);
  border:1px solid #4fd8eb; color:#fff; padding:6px 8px; font-size:13px; outline:none; }
#hint { position:absolute; bottom:18.5%; left:50%; transform:translateX(-50%);
  font-size:11px; color:#5d7484; letter-spacing:.04em; }

.t0{color:#5ec8ff}.t1{color:#ff7a6b}.t2{color:#7dec8e}.t3{color:#f3c558}
.t4{color:#c79bff}.t5{color:#6befd6}.t6{color:#ff9ed2}.t7{color:#cfd66b}

/* ---------- ping compensation readout (req 64) ---------- */
#pingBox { margin-top:7px; font-size:10px; letter-spacing:.1em; color:#7e98a8; }
#pingBox b { color:#cfe9f2; font-weight:600; }
#pingBox #pingBonus.active { color:#7dec8e; text-shadow:0 0 6px rgba(125,236,142,.6); }

/* ---------- transient center banner (gate transit etc.) ---------- */
#notice { position:absolute; left:50%; top:32%; transform:translateX(-50%);
  color:#4fd8eb; font-size:20px; letter-spacing:.3em; text-shadow:0 0 14px #4fd8eb;
  animation:pulse .4s infinite alternate; }

/* ---------- Batch 6 command HUD ---------- */
#goalScore { position:absolute; top:5.4%; left:50%; transform:translateX(-50%);
  font-size:11px; letter-spacing:.14em; color:#9db4c4; display:flex; gap:14px;
  max-width:96vw; flex-wrap:wrap; justify-content:center; text-align:center; }
#campaignGuide { position:absolute; right:2.2%; top:212px; width:218px; z-index:9;
  padding:8px 10px; background:rgba(5,14,25,.88); border:1px solid rgba(213,154,255,.5);
  border-left:3px solid #d59aff; box-shadow:0 0 15px rgba(213,154,255,.12);
  color:#cfdeeb; font-size:10px; line-height:1.45; letter-spacing:.03em; }
#campaignGuide b { display:block; color:#e5baff; font-size:11px; letter-spacing:.1em; }
#campaignGuide span { display:block; margin-top:3px; }
#campaignGuide strong { color:#ffe19c; }
#hud.campaign #killfeed { top:320px; }
#goalScore.heldSeconds { padding:5px 10px; border:1px solid rgba(79,216,235,.4);
  border-radius:4px; background:rgba(5,14,25,.78); color:#e8f6fb; font-size:13px;
  box-shadow:0 0 18px rgba(79,216,235,.12); }
#goalScore.heldSeconds span { min-width:112px; text-align:center; font-variant-numeric:tabular-nums; }
#goalScore.heldSeconds small { display:block; margin-top:2px; color:#7dec8e;
  font-size:9px; letter-spacing:.08em; }
#goalScore.heldSeconds .pilotLive { border-left:1px solid rgba(79,216,235,.35);
  padding-left:14px; color:#d9f7ff; }
#goalScore.heldSeconds .pilotLive strong { color:#7dec8e; font-size:14px;
  font-variant-numeric:tabular-nums; letter-spacing:.06em; }
#goalScore.heldSeconds.ticking { animation:goal-score-tick .42s ease-out; }
@keyframes goal-score-tick {
  0% { border-color:#fff; box-shadow:0 0 24px rgba(79,216,235,.85); transform:translateX(-50%) scale(1.045); }
  100% { border-color:rgba(79,216,235,.4); box-shadow:0 0 18px rgba(79,216,235,.12); transform:translateX(-50%) scale(1); }
}
/* Nebula Veil: every team's level-100 flagship remains readable even when
   sensor fog hides the hull itself. Attacker feedback uses its own banner so
   it cannot be mistaken for ordinary ship damage. */
#flagshipBox, #convoyBox, #hubBox { position:absolute; top:8.8%; left:50%; transform:translateX(-50%);
  display:flex; flex-wrap:wrap; justify-content:center; gap:8px;
  width:min(94vw,1500px); z-index:10; }
#flagshipBox.hidden, #convoyBox.hidden, #hubBox.hidden { display:none; }
.flagshipCard { position:relative; width:176px; padding:6px 8px;
  border:1px solid rgba(79,216,235,.28);
  border-top:2px solid var(--team-colour,#4fd8eb); border-radius:3px;
  background:rgba(5,12,23,.82); box-shadow:0 0 14px rgba(0,0,0,.45);
  font-variant-numeric:tabular-nums; }
.flagshipCard.destroyed { opacity:.58; filter:saturate(.35); }
/* Planetary Ring War: a convoy that reached its destination is a WIN, not a
   loss — dim it like .destroyed but keep the tint positive, not red */
.flagshipCard.arrived { opacity:.58; filter:saturate(.6); }
.flagshipHead { display:flex; justify-content:space-between; align-items:baseline;
  gap:7px; margin-bottom:4px; white-space:nowrap; }
.flagshipHead b { overflow:hidden; text-overflow:ellipsis; color:var(--team-colour,#cfe9f2);
  font-size:9px; letter-spacing:.08em; }
.flagshipHead em { color:#f3c558; font-size:8px; font-style:normal; letter-spacing:.08em; }
.flagshipRow { display:grid; grid-template-columns:34px 1fr 35px; align-items:center;
  gap:5px; margin:3px 0; color:#7e98a8; font-size:8px; letter-spacing:.08em; }
.flagshipRow .track { height:5px; }
.flagshipRow strong { text-align:right; color:#d9f7ff; font-size:9px; }
.flagshipCard.destroyed .flagshipHead::after { content:attr(data-status); position:absolute;
  left:50%; top:27px; transform:translateX(-50%); color:#ff7a6b;
  font-size:8px; letter-spacing:.16em; }
.flagshipCard.arrived .flagshipHead::after { content:attr(data-status); position:absolute;
  left:50%; top:27px; transform:translateX(-50%); color:#7dec8e;
  font-size:8px; letter-spacing:.16em; }
#flagshipDamage { position:absolute; left:50%; top:25%; transform:translateX(-50%);
  padding:8px 13px; border:1px solid rgba(255,122,107,.62);
  border-left:4px solid #ff7a6b; background:rgba(20,6,10,.9);
  box-shadow:0 0 24px rgba(255,92,71,.28); text-align:center; z-index:24; }
#flagshipDamage b { display:block; color:#ff9a8a; font-size:13px; letter-spacing:.22em; }
#flagshipDamage span { display:inline-block; margin:4px 7px 0; font-size:11px;
  font-variant-numeric:tabular-nums; letter-spacing:.08em; }
#flagshipDamage .shieldDamage { color:#6fe3ff; }
#flagshipDamage .hullDamage { color:#f3c558; }
#flagshipDamage.eliminated { border-color:#ff3d55; border-left-width:6px;
  box-shadow:0 0 32px rgba(255,42,65,.55); }
#flagshipDamage.eliminated b { color:#ffb1ba; font-size:15px; }
#flagshipDamage.hit { animation:flagship-hit .24s ease-out; }
@keyframes flagship-hit {
  from { transform:translateX(-50%) scale(1.12); filter:brightness(1.7); }
  to { transform:translateX(-50%) scale(1); filter:brightness(1); }
}
#spectateBox { position:absolute; left:50%; bottom:9%; transform:translateX(-50%);
  display:flex; align-items:center; gap:10px; padding:6px 10px;
  border:1px solid rgba(255,217,74,.55); border-radius:3px;
  background:rgba(8,10,4,.82); box-shadow:0 0 20px rgba(255,217,74,.2);
  font-size:11px; letter-spacing:.14em; color:#ffd94a; z-index:20; }
#spectateBox.hidden { display:none; }
#spectateBox button { pointer-events:auto; cursor:pointer; background:transparent;
  border:1px solid rgba(255,217,74,.5); color:#ffd94a; border-radius:2px;
  padding:2px 9px; font-size:12px; }
#spectateBox button:hover { background:rgba(255,217,74,.15); }
#spectateLeave { border-color:rgba(255,122,107,.6) !important; color:#ff9a8a !important;
  font-size:9px !important; letter-spacing:.08em; margin-left:4px; }
#spectateLeave:hover { background:rgba(255,122,107,.15) !important; }
#rankBox { position:absolute; left:2.2%; top:2.2%; width:230px; font-size:10px;
  padding-left:48px; }   /* gutter for the insignia sprite */
#rankBox b { color:#f3c558; letter-spacing:.12em; font-size:11px; display:block;
  margin-bottom:3px; min-height:15px; padding-top:2px; }
/* rank insignia sprites (spec mod: ranks_insignia_a/b.png, 4×4 cells —
   sized UP for aesthetics) */
.rankIcon { display:inline-block; width:26px; height:26px;
  background-repeat:no-repeat; vertical-align:-8px;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.8)); }
#rankIcon { position:absolute; left:0; top:-2px; width:42px; height:42px; }
td .rankIcon { width:26px; height:26px; margin-right:5px; }
#rankBox .track { height:6px; background:rgba(243,197,88,.12); border:1px solid rgba(243,197,88,.3); }
#rankBox .fill.honor { background:linear-gradient(90deg,#f3c558,#ffe9b8); height:100%; transition:width .3s; }
#rankBox span { color:#7e98a8; }
#rankBox em { display:block; margin-top:3px; color:#7dec8e; font-style:normal; letter-spacing:.15em;
  text-shadow:0 0 8px rgba(125,236,142,.7); animation:pulse .6s infinite alternate; cursor:default; }
#orderBox { position:absolute; left:2.2%; top:11.5%; font-size:11px; color:#7e98a8; letter-spacing:.1em; }
#orderBox b { color:#4fd8eb; }
#formBox { position:absolute; left:2.2%; top:14.5%; font-size:11px; color:#7e98a8; letter-spacing:.1em; }
#formBox b { color:#c79bff; }
/* spec mod: AoE-field readout — names each field you're inside + its effect;
   red-edged ⚠ rows are hostile, green ✚ rows friendly, ‹n›s = time left */
#fieldBox { position:absolute; left:2.2%; top:21.5%; max-width:330px; z-index:12; }
#fieldBox .fld { position:relative; margin-bottom:5px; padding:5px 30px 5px 8px;
  border-left:3px solid; background:rgba(8,14,26,.72); }
#fieldBox .fld b { display:block; font-size:11px; letter-spacing:.14em; }
#fieldBox .fld span { display:block; color:#9db4c2; font-size:10px; margin-top:2px; letter-spacing:.04em; }
#fieldBox .fld em { position:absolute; top:5px; right:7px; font-style:normal; font-size:10px; color:#7e98a8; }
#fieldBox .fld.bad { border-color:#ff7a6b; box-shadow:0 0 10px rgba(255,122,107,.25); }
#fieldBox .fld.bad b { color:#ff9a8a; }
#fieldBox .fld.good { border-color:#7dec8e; }
#fieldBox .fld.good b { color:#8af0a0; }
body.touch #fieldBox { top:20.5%; max-width:215px; }
body.touch #fieldBox .fld b { font-size:9px; }
body.touch #fieldBox .fld span { font-size:8px; }
.slot .lv { position:absolute; bottom:2px; right:3px; color:#7dec8e; font-size:9px;
  background:rgba(8,14,26,.6); padding:0 2px; z-index:1; }
.slot .lock { position:absolute; bottom:2px; right:3px; color:#ff9a5a; font-size:9px;
  background:rgba(8,14,26,.6); padding:0 2px; z-index:1; }
.slot .up { position:absolute; top:1px; right:3px; color:#7dec8e; font-size:12px; cursor:pointer;
  text-shadow:0 0 6px rgba(125,236,142,.8); animation:pulse .6s infinite alternate; z-index:2; }
.slot.locked { opacity:.45; }
.dim.bonus { border-top:1px solid rgba(79,216,235,.15); padding-top:8px; }
/* spec mod: each bonus-upgrade description sits on its own line */
.dim.bonus span, .dim.bonus em { display:block; margin-top:3px; }
.dim.bonus em { color:#5d7484; }
/* spec mod: pilot entitlements listed one per line */
#accPerks span { display:block; margin-top:2px; }
/* spec mod: premium benefits listed one per line */
.premBenefits span { display:block; margin-top:3px; }

/* ---------- Batch 5 combat HUD ---------- */
#wpnBox { position:absolute; right:2.2%; bottom:12%; text-align:right; }
#wpnBox b { display:block; color:#cfe9f2; font-size:13px; letter-spacing:.14em; }
#wpnBox span { color:#7e98a8; font-size:10px; letter-spacing:.08em; }

/* spec mod: this pilot's own active drones — tiny text, bottom-right,
   stacked above the weapon readout so it never collides with it */
#droneList { position:absolute; right:2.2%; bottom:19%; max-width:220px;
  text-align:right; font-size:8px; letter-spacing:.05em; color:#8cffb0; }
#droneList div { margin:1px 0; opacity:.82; text-shadow:0 1px 2px #000;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#droneList.hidden { display:none; }

/* lock readout (spec mod): target name in TEAM COLOUR + distance in km +
   remaining hull/shield % as line bars */
#lockBox { position:absolute; left:50%; top:56%; transform:translateX(-50%);
  padding:5px 10px 6px; background:rgba(8,14,26,.55);
  border:1px solid rgba(255,154,90,.35); border-left:3px solid #ff9a5a; }
#lockHead { color:#ff9a5a; font-size:12px; letter-spacing:.2em;
  text-shadow:0 0 8px rgba(255,154,90,.8); white-space:nowrap; }
#lockHead b { color:#ffd27a; }
#lockHead #lockDist { margin-left:10px; color:#cfe9f2; letter-spacing:.08em;
  font-size:11.5px; }
#lockBars { margin-top:4px; }
.lkrow { display:flex; align-items:center; gap:6px; margin:2px 0; }
.lkrow i { width:30px; font-style:normal; font-size:8.5px; letter-spacing:.14em; color:#7e98a8; }
.lkrow em { width:34px; font-style:normal; font-size:9.5px; text-align:right; color:#9db4c4; }
.lktrack { width:120px; height:5px; background:rgba(79,216,235,.10);
  border:1px solid rgba(79,216,235,.25); }
.lkfill { height:100%; transition:width .15s linear; }
.lkfill.hull { background:linear-gradient(90deg,#3ddc84,#9be15d); }
.lkfill.shield { background:linear-gradient(90deg,#3aa7ff,#6fe3ff); }
#blind { position:absolute; inset:0; background:#fff; pointer-events:none; z-index:25; }
.slot { position:relative; overflow:hidden; }
.slot .cdveil { position:absolute; left:0; right:0; bottom:0; height:0;
  background:rgba(8,14,26,.85); color:#f0b357; font-size:13px; font-style:normal;
  display:flex; align-items:center; justify-content:center; pointer-events:none;
  border-top:1px solid rgba(240,179,87,.5); }
.slot.cooling { border-color:rgba(240,179,87,.5); }
.slot.armed { border-color:#f0b357; box-shadow:0 0 10px rgba(240,179,87,.45) !important; }
.slot em.on { position:absolute; top:2px; right:3px; color:#f0b357; font-size:8px;
  font-style:normal; letter-spacing:.1em; }
/* dual-wield (spec mod): the RMB-armed weapon glows red-orange */
.slot.armed2 { border-color:#ff7a6b; box-shadow:0 0 10px rgba(255,122,107,.5) !important; }
.slot.armed.armed2 { box-shadow:0 0 10px rgba(240,179,87,.45), inset 0 0 8px rgba(255,122,107,.5) !important; }
.slot em.on.alt { top:12px; bottom:auto; color:#ff7a6b; }

/* ---------- gauss scope (spec mod): railshot magnified view ---------- */
#scope { position:absolute; inset:0; pointer-events:none; z-index:24;
  background:radial-gradient(circle at 50% 50%, transparent 30%, rgba(2,6,12,.55) 46%, rgba(2,6,12,.92) 62%); }
#scope .ring { position:absolute; left:50%; top:50%; width:min(58vh,58vw); height:min(58vh,58vw);
  transform:translate(-50%,-50%); border:1px solid rgba(140,220,255,.55); border-radius:50%;
  box-shadow:0 0 0 3px rgba(2,6,12,.4), inset 0 0 26px rgba(79,216,235,.12); }
#scope .hline, #scope .vline { position:absolute; left:50%; top:50%; background:rgba(140,220,255,.5); }
#scope .hline { width:min(58vh,58vw); height:1px; transform:translate(-50%,-50%); }
#scope .vline { height:min(58vh,58vw); width:1px; transform:translate(-50%,-50%); }
#scope .tag { position:absolute; left:50%; top:calc(50% + min(30vh,30vw));
  transform:translateX(-50%); color:#8ce2ff; font-size:11px; letter-spacing:.22em; }

/* ---------- avatars (spec mod: bigger everywhere, shown in battle) ---------- */
.avatar { display:inline-block; background-color:#0a1120; border:1px solid rgba(79,216,235,.3);
  border-radius:3px; background-repeat:no-repeat; }
.avatar.chip { width:28px; height:28px; vertical-align:-9px; margin-right:6px; }
.avatar.big { width:76px; height:76px; border-radius:5px; border-color:rgba(79,216,235,.55); }
#lbAvatarBtn { width:58px; height:58px; cursor:pointer; flex:0 0 auto;
  background-color:#0a1120; border:1px solid rgba(79,216,235,.35);
  border-radius:3px; background-repeat:no-repeat; }
#lbAvatarBtn:hover { border-color:#4fd8eb; box-shadow:0 0 8px rgba(79,216,235,.4); }
#avatarPicker { display:grid; grid-template-columns:repeat(8, 66px); gap:7px;
  justify-content:center; margin:10px 0; padding:10px; background:rgba(8,14,26,.8);
  border:1px solid rgba(79,216,235,.25); }
#avatarPicker .pick { width:66px; height:66px; cursor:pointer; }
#avatarPicker .pick:hover { border-color:#4fd8eb; }
#avatarPicker .pick.sel { border-color:#f0b357; box-shadow:0 0 8px rgba(240,179,87,.7); }

/* speaker card: who's talking over TTS right now (big avatar + name) */
#speaker { display:flex; align-items:center; gap:12px; margin-bottom:8px;
  padding:8px 12px; background:rgba(6,12,22,.85); border:1px solid rgba(79,216,235,.45);
  border-left:3px solid #4fd8eb; box-shadow:0 0 18px rgba(79,216,235,.25); width:max-content; }
#speaker b { font-size:15px; letter-spacing:.08em; display:block; }
#speaker em { color:#7e98a8; font-size:10.5px; letter-spacing:.2em; font-style:normal; }
#speaker em::after { content:""; animation:dots 1.2s steps(4) infinite; }

/* ---------- ability bar (req 27) ---------- */
#abilityBar { position:absolute; left:50%; bottom:1.6%; transform:translateX(-50%);
  text-align:center; }
#pageStrip { margin-bottom:5px; }
#pageStrip b { display:inline-block; min-width:30px; padding:2px 4px; margin:0 2px;
  font-size:10px; color:#7e98a8; border:1px solid rgba(79,216,235,.18); cursor:pointer; }
#pageStrip b.on { color:#0a0e1a; background:#4fd8eb; border-color:#4fd8eb; }
#slotRow { display:flex; gap:6px; }
/* spec mod: square slots sized for the real icon sprites */
.slot { width:72px; height:72px; border:1px solid rgba(79,216,235,.3);
  background:rgba(10,18,30,.72); font-size:9.5px; color:#bcd7e2; cursor:pointer;
  display:flex; flex-direction:column; justify-content:space-between; padding:4px; }
.slot:hover { border-color:#4fd8eb; }
.slot .sicon { position:absolute; inset:0; background-repeat:no-repeat;
  pointer-events:none; }
.slot .key { position:absolute; top:2px; left:4px; color:#f0b357; font-size:10px;
  text-shadow:0 1px 3px #000, 0 0 4px #000; z-index:1; }
.slot .nm { line-height:1.1; overflow:hidden; margin-top:14px; }
.slot.cat-weapons{box-shadow:inset 0 -2px 0 #ff5c47}.slot.cat-bombs{box-shadow:inset 0 -2px 0 #f0b357}
.slot.cat-drones{box-shadow:inset 0 -2px 0 #3ddc84}.slot.cat-tech{box-shadow:inset 0 -2px 0 #b06fff}
.slot.cat-formations{box-shadow:inset 0 -2px 0 #4fd8eb}.slot.cat-system{box-shadow:inset 0 -2px 0 #7e98a8}
.slot.flash { background:#4fd8eb; color:#06121c; }

/* Spacious desktop viewports grow the ten icon cells while reserving 280px
   on each side for vitals and weapon/speed readouts. The height term keeps
   the bar clear of the hint and cockpit instruments on short PC windows. */
@media (min-width: 1360px) and (min-height: 600px) {
  #abilityBar {
    --desktop-slot-size: clamp(72px,
      min(calc((100vw - 614px) / 10), 10.5vh), 92px);
  }
  #abilityBar .slot {
    width:var(--desktop-slot-size);
    height:var(--desktop-slot-size);
  }
}

/* ---------- ability hover tooltip (spec mod): function + the numbers ------ */
#abilityTip { position:fixed; z-index:55; pointer-events:none; width:250px;
  background:rgba(8,13,24,.96); border:1px solid rgba(79,216,235,.45);
  box-shadow:0 6px 24px rgba(0,0,0,.6); padding:9px 11px 8px;
  font-size:11px; color:#bcd7e2; line-height:1.4; }
#abilityTip .tName { display:block; font-size:13px; letter-spacing:.08em;
  color:#e8f6fb; }
#abilityTip .tSub { display:block; font-style:normal; color:#7e98a8;
  font-size:9.5px; letter-spacing:.12em; text-transform:uppercase;
  margin:1px 0 6px; }
#abilityTip .tRow { display:flex; justify-content:space-between; gap:10px;
  border-bottom:1px solid rgba(79,216,235,.1); padding:1.5px 0; }
#abilityTip .tRow i { font-style:normal; color:#7e98a8; font-size:9.5px;
  letter-spacing:.1em; }
#abilityTip .tRow b { color:#e8f6fb; }
#abilityTip .tFx { margin-top:5px; color:#9fc3d8; }
#abilityTip .tPer { margin-top:5px; color:#7dec8e; font-size:10px; }
#abilityTip .tLv { margin-top:4px; color:#f0b357; font-size:10px;
  letter-spacing:.08em; }
#abilityTip .tLock { margin:2px 0 4px; color:#ff9a5a; font-size:10px; }
/* mobile: the panel opens on long-press and must be tappable for its FIRE·2
   arm action (spec mod); on PC it stays click-through */
#abilityTip.touchable { pointer-events:auto; }
#abilityTip .tArm { margin-top:8px; padding:9px 6px; text-align:center; cursor:pointer;
  border:1px solid #f0b357; color:#ffd27a; background:rgba(60,42,10,.55);
  font-size:11px; letter-spacing:.06em; }
#abilityTip .tArm:active { background:rgba(240,179,87,.85); color:#06121c; }
/* category accents on the tooltip name */
.tc-weapons{ text-shadow:0 0 8px rgba(255,92,71,.5) } .tc-bombs{ text-shadow:0 0 8px rgba(240,179,87,.5) }
.tc-drones{ text-shadow:0 0 8px rgba(61,220,132,.5) } .tc-tech{ text-shadow:0 0 8px rgba(176,111,255,.5) }
.tc-formations{ text-shadow:0 0 8px rgba(79,216,235,.5) } .tc-objectives{ text-shadow:0 0 8px rgba(243,197,88,.5) }

/* ---------- mobile (req 28) ---------- */
#mobileGrid { position:absolute; right:1.5%; top:50%; transform:translateY(-50%);
  display:grid; grid-template-columns:repeat(2,56px); gap:6px; }
#mobileGrid .slot { width:56px; height:46px; pointer-events:auto; }
#mobileGrid .pageBtns { grid-column:1 / span 2; display:grid;
  grid-template-columns:repeat(6,1fr); gap:3px; }
#mobileGrid .pageBtns b { font-size:9px; text-align:center; padding:3px 0;
  border:1px solid rgba(79,216,235,.2); color:#7e98a8; }
#mobileGrid .pageBtns b.on { background:#4fd8eb; color:#06121c; }
#touchControls { position:absolute; inset:0; pointer-events:none; }
#stickZone { position:absolute; left:3%; bottom:3%; width:130px; height:130px;
  border:1px solid rgba(79,216,235,.3); border-radius:50%; pointer-events:auto;
  background:rgba(10,18,30,.35); }
/* spec mod: the pad is a 16-way rotation stick — thin spokes at every 22.5°
   sector boundary make the 16 regions legible (top=up, right=yaw right, …) */
#stickZone::before { content:""; position:absolute; inset:0; border-radius:50%;
  pointer-events:none;
  background:repeating-conic-gradient(from -11.25deg,
    rgba(79,216,235,.22) 0deg 0.7deg, transparent 0.7deg 22.5deg); }
#stickKnob { position:absolute; left:50%; top:50%; width:48px; height:48px; margin:-24px;
  border-radius:50%; background:rgba(79,216,235,.45); z-index:1; }
/* steering surface (spec mod): drag anywhere in the open middle to aim */
#aimZone { position:absolute; left:26%; right:14%; top:12%; bottom:22%;
  pointer-events:auto; }
.tbtn { position:absolute; pointer-events:auto; padding:10px 14px; font-size:11px;
  background:rgba(10,18,30,.7); color:#cfe9f2; border:1px solid #4fd8eb; }
/* right-hand VERTICAL column (spec mod): STATS→LOCK on top, then the two
   forward-thrust HOLDS (THRUST/BOOST), big round FIRE toggle at the corner. */
.tbtn.fire { left:auto; right:2.5%; bottom:2.5%; width:78px; height:78px; padding:0;
  border-radius:50%; font-size:14px; letter-spacing:.1em;
  background:rgba(60,16,10,.78); border:2px solid #ff7a6b; color:#ffb4a8; }
/* the four stacked right buttons share ONE column: EQUAL width, packed LOW
   just above the FIRE cluster so they clear the minimap + weapon/speed text
   overhead (spec mod). THRUST nearest the thumb, then BOOST, LOCK, STATS. */
#btnTab, #btnLock, .tbtn.move { left:auto; right:2.5%; width:82px; padding:8px 4px;
  box-sizing:border-box; text-align:center; }
#btnThrust { bottom:90px; }
#btnBoost  { bottom:130px; }
#btnLock   { bottom:170px; top:auto; border-color:#f0b357; color:#ffd27a; }
#btnTab    { bottom:210px; top:auto; }
/* THRUST/BOOST green so they read as "go", distinct from red FIRE, amber LOCK */
.tbtn.move { border-color:#6be7a0; color:#8af0b4; background:rgba(12,34,24,.78); }
/* FIRE·2 (spec mod): the RMB weapon slot's trigger, left of the main FIRE */
.tbtn.fire.alt { right:calc(2.5% + 90px); bottom:3.4%; width:60px; height:60px;
  font-size:11px; border-color:#f0b357; color:#ffd27a; background:rgba(60,42,10,.78); }
.tbtn.on { background:rgba(240,179,87,.85); color:#06121c; border-color:#ffd27a;
  box-shadow:0 0 14px rgba(240,179,87,.8); font-weight:600; }
/* a lit FIRE toggle glows red so "armed & auto-firing" reads at a glance */
.tbtn.fire.on { background:rgba(255,122,107,.9); color:#1a0604; border-color:#ffd0c8;
  box-shadow:0 0 16px rgba(255,122,107,.85); }
/* touch devices use the ability grid — the desktop bottom bar would sit
   under the fire cluster, so it hides (spec mod) */
body.touch #abilityBar { display:none !important; }

/* small in-battle QUIT — opens the confirm menu (spec mod) */
/* spec mod: above the respawn overlay (z-index 30) so QUIT works while dead */
#btnQuit { position:absolute; left:2.2%; top:18%; pointer-events:auto; z-index:32;
  padding:5px 9px; font-size:10px; letter-spacing:.08em; cursor:pointer;
  background:rgba(10,18,30,.7); color:#ffb4a8; border:1px solid rgba(255,122,107,.45); }
/* the systems menu (with QUIT) must sit above the respawn overlay too */
#menu { z-index:40; }
#btnQuit:hover { border-color:#ff7a6b; }

/* ---------- touch battle layout v2 (spec mod) ----------
   vitals above the pad · minimap top-right with weapon + speed right under
   it · ability pages+slots along the BOTTOM CENTER · quit by the column */
body.touch #vitals { bottom:auto; top:34%; width:150px; }
body.touch #radar { width:88px; height:88px; }
body.touch #campaignGuide { top:calc(88px + 3.4% + 74px); right:2%; width:180px;
  padding:5px 7px; font-size:8px; }
body.touch #campaignGuide b { font-size:9px; }
body.touch #hud.campaign #killfeed { top:96px; }
body.touch #wpnBox { right:2%; bottom:auto; top:calc(88px + 3.4%); }
body.touch #wpnBox b { font-size:8.5px; letter-spacing:.06em; }
body.touch #wpnBox span { font-size:7px; }
body.touch #speedo { right:2%; bottom:auto; top:calc(88px + 3.4% + 26px); }
body.touch #speedo #spd { font-size:15px; }
body.touch #speedo small { font-size:8px; }
body.touch #droneList { right:2%; bottom:auto; top:calc(88px + 3.4% + 52px); }
body.touch #killfeed { right:calc(2.5% + 86px); top:96px; width:170px; }
body.touch #chat { top:11%; }
body.touch #btnQuit { left:auto; right:calc(2.2% + 100px); top:2%; bottom:auto; }
body.touch #mobileGrid { top:auto; bottom:1.2%; right:auto; left:50%;
  transform:translateX(-50%); grid-template-columns:repeat(10, 48px); gap:3px; }
body.touch #mobileGrid .slot { width:48px; height:48px; font-size:7.5px; padding:2px; }
body.touch #mobileGrid .pageBtns { grid-column:1 / -1;
  grid-template-columns:repeat(12, 1fr); gap:2px; }

/* ---------- overlays ---------- */
.overlay { position:absolute; inset:0; background:rgba(4,7,13,.82);
  display:flex; align-items:center; justify-content:center; z-index:30; }
.panel { background:#0c1322; border:1px solid rgba(79,216,235,.35); padding:28px 34px;
  max-width:680px; max-height:86%; overflow:auto; box-shadow:0 0 40px rgba(79,216,235,.12); }
.panel.center { text-align:center; }
.panel h1 { font-weight:300; letter-spacing:.18em; margin-bottom:14px; color:#fff; }
.panel h2 { font-weight:400; letter-spacing:.14em; margin-bottom:12px; color:#4fd8eb; }
.logo { font-size:34px; } .logo span { color:#4fd8eb; }
.row { display:flex; align-items:center; gap:12px; margin:11px 0; text-align:left; }
.row label { width:84px; font-size:11px; letter-spacing:.12em; color:#7e98a8; }
.row input,.row select { flex:1; background:#0a1120; border:1px solid rgba(79,216,235,.35);
  color:#e8f6fb; padding:8px 10px; font-size:14px; outline:none; }
/* guests fly the issued Pilot-<n> callsign — shown, not editable */
.row input[readonly] { color:#9fb6c2; border-style:dashed; cursor:default; }
/* spec mod: a native <select> insets its text a few px that padding-left can't
   reach, so the GAME TYPE dropdown's text didn't line up with the inputs above/
   below it. appearance:none renders the text at the padding edge (aligned) and
   a custom chevron replaces the native arrow. */
.row select { appearance:none; -webkit-appearance:none; -moz-appearance:none;
  padding-right:30px;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%3E%3Cpath%20d='M1%201l5%205%205-5'%20fill='none'%20stroke='%234fd8eb'%20stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; }
/* spec mod: GAME TYPE carries a long tagline — a slightly smaller font keeps it
   on one line and lined up cleanly with the input fields above/below it */
#lbScene, #lbScene option { font-size:12px; }
.row .fieldUnit { flex:0 0 auto; font-size:11px; letter-spacing:.12em; color:#7e98a8; }
button.big { margin-top:16px; padding:12px 34px; font-size:15px; letter-spacing:.2em;
  background:#4fd8eb; color:#06121c; border:0; cursor:pointer; font-weight:600; }
button.big:hover { background:#7ce6f4; }
.dim { color:#5d7484; font-size:11px; margin-top:12px; line-height:1.5; }
/* your own leaderboard row, highlighted so a renamed profile is findable (spec fix) */
tr.meRow td { background:rgba(79,216,235,.16); color:#e8f6fb; font-weight:600; }
/* in-battle hull picker on the respawn screen (spec mod) */
#respawnShips { display:flex; flex-wrap:wrap; gap:6px; justify-content:center;
  max-width:540px; margin:8px auto 6px; }
.shipPick { padding:6px 10px; font-size:11px; cursor:pointer; letter-spacing:.03em;
  background:rgba(10,18,30,.7); color:#cfe9f2; border:1px solid rgba(79,216,235,.35); }
.shipPick.sel { background:rgba(79,216,235,.85); color:#06121c; border-color:#4fd8eb; font-weight:600; }
.shipPick.locked { color:#5d7484; border-color:rgba(79,216,235,.12); cursor:not-allowed; }
#respawnTimer { min-height:18px; margin:10px 0 6px; color:#9fc3cf;
  font-size:12px; letter-spacing:.12em; text-transform:uppercase; }
#respawnProgress { width:min(420px,82vw); height:10px; margin:0 auto 4px;
  overflow:hidden; border:1px solid rgba(79,216,235,.42); border-radius:6px;
  background:rgba(2,8,16,.78); box-shadow:inset 0 0 8px rgba(0,0,0,.7); }
#respawnProgress i { display:block; width:0; height:100%; border-radius:5px;
  background:linear-gradient(90deg,#217a9a,#4fd8eb 68%,#d9fbff);
  box-shadow:0 0 12px rgba(79,216,235,.75); transition:width .12s linear; }
#respawnProgress.ready i { background:linear-gradient(90deg,#369e6b,#7dec8e,#e2ffe8);
  box-shadow:0 0 13px rgba(125,236,142,.8); }
/* portal banner ad slot on the respawn screen (spec mod). CrazyGames'
   300x250 banner occupies an exact supported size. A fixed footprint keeps
   the respawn panel from jumping when a fill arrives; .hidden collapses it. */
#respawnBanner { position:relative; width:300px; height:250px; margin:10px auto 0; }
#respawnBanner.hidden { display:none; }
/* portal banners: two stacked layers (AdSlotLayers in ads.js) — the last ad
   shows instantly, a fresh one paints over it; an empty layer is transparent */
#respawnBanner .adLayer { position:absolute; inset:0; overflow:hidden; }
/* first-party placeholder display creative filling the slot */
#respawnBanner .adInline { box-sizing:border-box; width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:1px dashed rgba(79,216,235,.4); background:rgba(2,4,8,.9); }
#respawnBanner .adTag { color:#5d7484; font-size:10px; letter-spacing:.4em; margin:0 0 14px; }
#respawnBanner .adBrand { font-size:24px; font-weight:800; letter-spacing:.06em; margin-bottom:6px; }
#respawnBanner .adBlurb { color:#9fb6c4; font-size:13px; letter-spacing:.14em; text-transform:lowercase; }
/* respawn screen: hull picker | timer bar + ad + RESPAWN, so the timer, the
   ad and the button are always on screen together (a 30+ hull list used to
   push the ad and the button out of the panel) */
#respawn .panel { max-width:min(1000px,94vw); max-height:94%; padding:20px 28px; }
#respawnCols { display:flex; gap:26px; align-items:flex-start; text-align:center; }
#respawnPick { flex:1 1 auto; min-width:0; }
#respawnPick .dim { margin-top:0; }
#respawnShips { max-height:calc(94vh - 190px); overflow-y:auto; }
#respawnSide { flex:0 0 320px; }
#respawnSide #respawnTimer { margin-top:0; }
#respawnSide #respawnProgress { width:100%; }
#respawnSide button.big { margin-top:12px; }
/* phones in landscape: a standard 320x50 banner keeps everything in view */
@media (max-height: 560px) {
  #respawn .panel { padding:10px 16px; }
  #respawn h1 { font-size:20px; margin-bottom:4px; }
  #respawnShips { max-height:calc(94vh - 110px); }
  #respawnBanner { width:320px; height:50px; }
  #respawnBanner .adInline { flex-direction:row; gap:10px; }
  #respawnBanner .adTag { display:none; }
  #respawnBanner .adBrand { font-size:16px; margin:0; }
  #respawnBanner .adBlurb { font-size:11px; }
  #respawnSide button.big { margin-top:8px; padding:8px 26px; }
  #respawnSide .dim { display:none; }
}
@media (max-width: 760px) {
  #respawnCols { flex-direction:column-reverse; align-items:center; gap:10px; }
  #respawnSide { flex:none; }
}
.shipPreview { position:fixed; z-index:1200; width:250px; pointer-events:none;
  padding:8px; border:1px solid rgba(79,216,235,.55); border-radius:5px;
  background:linear-gradient(155deg,rgba(7,17,29,.97),rgba(5,10,19,.94));
  box-shadow:0 12px 38px rgba(0,0,0,.65),inset 0 0 25px rgba(79,216,235,.05); }
.shipPreview canvas { width:220px; height:142px; display:block; margin:0 auto 5px;
  background:radial-gradient(ellipse at center,rgba(43,102,130,.2),transparent 67%); }
.shipPreviewStats { display:grid; gap:3px; color:#96adba; font-size:10px; letter-spacing:.035em; }
.shipPreviewStats b { color:#e8f6fb; font-size:12px; letter-spacing:.12em; }
.shipPreviewStats b em { float:right; color:#4fd8eb; font-style:normal; font-size:10px; }
.shipPreviewStats strong { color:#cceef5; font-weight:500; }
.amber { color:#f0b357; }
code { color:#9be15d; }
table { margin:10px auto; border-collapse:collapse; width:100%; font-size:13px; }
th,td { padding:5px 12px; border-bottom:1px solid rgba(79,216,235,.12); text-align:left; }
th { color:#7e98a8; font-weight:400; font-size:11px; letter-spacing:.1em; }
#tab .panel { width:min(96%, 1440px); max-width:96%; }
#tabTableScroll { width:100%; overflow-x:auto; }
#tabTable { min-width:1100px; }
#tabTable th,#tabTable td { white-space:nowrap; }
.dots::after { content:""; animation:dots 1.2s steps(4) infinite; }
@keyframes dots { 0%{content:""} 25%{content:"."} 50%{content:".."} 75%{content:"..."} }
#tabTeams,#endTeams { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin:8px 0; font-size:13px; }
.center { text-align:center; }

/* ---------- home screen (spec mod: full-bleed cover art + compact logo) ----
   #boot and #lobby are BODY children (outside the 16:9 stage) so the backdrop
   covers the entire window. JS picks loading_bg.png or keyart_title.png at
   random per visit and sets it as an inline background-image. */
#boot { position:absolute; inset:0; z-index:60; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:26px;
  background:#04070d url("../../assets/images/loading_bg.png") center/cover no-repeat; }
#boot .bootLogo { width:auto; max-width:70%; max-height:34vh;   /* phones: don't fill the screen */
  filter:drop-shadow(0 4px 30px rgba(79,216,235,.45)); }
#boot p { color:#9fc3d8; font-size:13px; letter-spacing:.4em; text-shadow:0 2px 8px #000; }

#lobby.home { background:#04070d center/cover no-repeat; /* image set by JS */
  justify-content:flex-end; gap:0; }
#lobby.home::before { content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(4,7,13,.05) 0%, rgba(4,7,13,.45) 55%, rgba(4,7,13,.85) 100%); }
/* logo kept small so the whole form panel fits the viewport with no scrolling */
#homeLogo { display:block; width:auto; max-width:72%; max-height:13vh;
  margin:0 auto 4px; filter:drop-shadow(0 3px 18px rgba(79,216,235,.35)); }
#lbMusic { position:absolute; top:10px; right:12px; z-index:2; opacity:.85; }
#lbMusic.off { color:#5d7484; border-color:rgba(94,116,132,.4); }
#btnFullscreen { position:fixed; left:12px; top:10px; z-index:65;
  padding:7px 11px; font-size:10px; letter-spacing:.1em; cursor:pointer;
  background:rgba(10,18,30,.8); color:#9eeef7;
  border:1px solid rgba(79,216,235,.5); }
#btnFullscreen:hover { border-color:#7ce6f4; color:#e8fbff; }
#btnFullscreen:disabled { opacity:.45; cursor:not-allowed; }
body.touch:not(.ingame) #btnFullscreen { left:120px; }
body.ingame #btnFullscreen { left:2.2%; top:13%; }
body.touch.ingame #btnFullscreen { left:calc(2.2% + 160px); top:2%; }
/* home-screen QUIT — mobile only (spec mod): top-left corner of the screen */
/* spec mod: pinned to the PANEL's upper-left corner (the panel is the offset
   parent), text centred on the button */
#lbQuit { display:none; position:absolute; top:12px; left:12px; z-index:3;
  width:96px; padding:8px 0; font-size:12px; letter-spacing:.1em; cursor:pointer;
  text-align:center; background:rgba(10,18,30,.75); color:#ffb4a8;
  border:1px solid rgba(255,122,107,.5); }
body.touch #lbQuit { display:block; }

/* ---------- lobby: host/join tabs + session directory ---------- */
#lobbyPanel { position:relative; width:680px; max-width:46%; height:100%; max-height:100%;
  margin:0; border-top:0; border-bottom:0; border-right:0;
  background:rgba(9,15,26,.92); padding:18px 30px 14px; overflow-y:auto; }
/* compact spacing so the whole form fits the viewport without scrolling */
#lobbyPanel .row { margin:8px 0; }
/* the callsign notice floats over the avatar line at its natural spot instead
   of reflowing the form: it appears/clears on the field's blur, and a reflow
   between mousedown and mouseup swallowed the click that caused the blur */
#lbNameError { position:absolute; left:0; right:0; z-index:3; margin:0; padding:2px 30px 4px;
  background:rgba(9,15,26,.97); }
#lobbyPanel .dim { margin-top:8px; line-height:1.45; }
#sessionList { max-height:24vh; }
/* (lobby panel + session list now use the global themed scrollbar above) */
#lbTabs { display:flex; margin:16px 0 10px; border-bottom:1px solid rgba(79,216,235,.25); }
#lbTabs b { flex:1; text-align:center; padding:8px 0; font-size:12px; letter-spacing:.18em;
  color:#7e98a8; cursor:pointer; font-weight:400; }
#lbTabs b.on { color:#4fd8eb; border-bottom:2px solid #4fd8eb; }
#sessionList { overflow:auto; margin:8px 0; }   /* max-height set above (24vh) */
.sessHead { margin-bottom:0 !important; }
.sessHead .spacer { flex:1; }
.sessRow { display:grid; grid-template-columns:1.3fr 1.2fr 1fr auto; gap:10px; align-items:center;
  padding:9px 12px; margin:5px 0; border:1px solid rgba(79,216,235,.25); cursor:pointer;
  background:rgba(10,18,30,.6); font-size:12px; }
.sessRow:hover { border-color:#4fd8eb; background:rgba(79,216,235,.08); }
.sessRow b { color:#e8f6fb; font-weight:600; }
.sessRow span { color:#9db4c4; }
.sessRow em { color:#f0b357; font-style:normal; }
#lbAi { flex:1; background:#0a1120; border:1px solid rgba(79,216,235,.35);
  color:#e8f6fb; padding:8px 10px; font-size:14px; outline:none; }

/* ---------- Batch 7: pilot account / rankings / premium ---------- */
button.mini { padding:7px 12px; font-size:11px; letter-spacing:.12em; cursor:pointer;
  background:rgba(10,18,30,.8); color:#cfe9f2; border:1px solid rgba(79,216,235,.4); }
button.mini:hover { border-color:#4fd8eb; }
#avatarInfo { margin:-4px 0 8px; font-size:10.5px; letter-spacing:.06em; color:#7dec8e; }
#pilotPane p { margin:9px 0; font-size:13px; }
#pilotPane b { color:#e8f6fb; }
#upgradeBreakdown { margin-top:12px; padding:10px 13px;
  border:1px solid rgba(79,216,235,.32); background:rgba(7,22,34,.56); }
#upgradeBreakdownTitle { color:#4fd8eb !important; letter-spacing:.12em; }
#upgradeBreakdownLines { margin-top:6px; line-height:1.4; }
#upgradeBreakdownLines .upTotal { display:block; font-size:15px; font-weight:600;
  color:#7dec8e; letter-spacing:.03em; margin-bottom:6px; }
#upgradeBreakdownLines .upSub { display:block; color:#6f8a9a; font-size:11px; }
#upgradeBreakdownLines .upSub:first-of-type { margin-top:8px;
  padding-top:8px; border-top:1px dashed rgba(79,216,235,.25); }
#premiumBox { margin-top:14px; padding:12px 14px; border:1px solid rgba(240,179,87,.4);
  background:rgba(30,22,8,.5); }
#premiumBox .big { margin-top:8px; padding:9px 20px; font-size:13px; background:#f0b357; }
#rankTable { max-height:220px; }
#rankPane table td:nth-child(3) { font-size:16px; }   /* flag (col 2 = avatar chip) */
.sessRow b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- ESC systems menu (spec mod) ---------- */
#menu .panel { min-width:420px; }
#menu button.big { display:block; width:100%; margin-top:14px; }
button.big.danger { background:#20242e; color:#ffb4a8; border:1px solid #ff7a6b; }
button.big.danger:hover { background:#33221f; }

/* ---------- Batch 8: host reliability badge (spec mod) ---------- */
.sessRow .trust { font-style:normal; font-size:10px; letter-spacing:.08em; white-space:nowrap; }
.sessRow .trust.good { color:#7dec8e; }
.sessRow .trust.mid { color:#f0b357; }
.sessRow .trust.low { color:#ff7b6b; }
.sessRow .trust.new { color:#7e98a8; }

/* ---------- Batch 7: rewarded-ad interstitial (generic adapter, req 11) ---------- */
#adOverlay { position:absolute; inset:0; background:rgba(2,4,8,.93); z-index:40;
  display:flex; align-items:center; justify-content:center; }
#adOverlay .adBox { text-align:center; width:60%; }
#adOverlay .adTag { color:#5d7484; font-size:10px; letter-spacing:.4em; margin-bottom:10px; }
#adOverlay .adSlot { border:1px dashed rgba(79,216,235,.4); padding:60px 20px;
  color:#7e98a8; font-size:13px; line-height:1.7; background:rgba(10,18,30,.6); }
#adOverlay .adCount { margin-top:12px; color:#f0b357; font-size:12px; letter-spacing:.15em; }
#adOverlay .adBrand { font-size:26px; font-weight:800; letter-spacing:.06em; margin-bottom:6px; }
#adOverlay .adBlurb { color:#9fb6c4; font-size:13px; letter-spacing:.14em; text-transform:lowercase; }
#adOverlay .adBar { margin-top:22px; height:5px; background:rgba(255,255,255,.14); border-radius:3px; overflow:hidden; }
#adOverlay .adBar i { display:block; height:100%; width:0; }

/* ---------- cross-promo (Quiz Jungle) ---------- */
.promo { color:#5d7484; font-size:11px; margin-top:14px; }
.promo a { color:#9be15d; text-decoration:none; letter-spacing:.08em; }
.promo a:hover { text-shadow:0 0 8px rgba(155,225,93,.7); text-decoration:underline; }

/* ---------- EU consent bar (client/js/consent.js) ---------- */
#consentBar { position:fixed; left:0; right:0; bottom:0; z-index:500;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:14px;
  background:#0c1322; border-top:1px solid rgba(79,216,235,.35);
  padding:14px 18px; box-shadow:0 -4px 24px rgba(0,0,0,.4); }
#consentBar p { margin:0; color:#b7d4dd; font-size:12.5px; max-width:560px; line-height:1.5; }
#consentBar p a { color:#4fd8eb; }
#consentBar .consentBtns { display:flex; gap:10px; flex:0 0 auto; }
#consentBar button { padding:8px 20px; font-size:12px; letter-spacing:.1em; cursor:pointer;
  font-weight:600; }
#consentBar #consentAccept { background:#4fd8eb; color:#06121c; border:0; }
#consentBar #consentAccept:hover { background:#7ce6f4; }
#consentBar #consentDecline { background:transparent; color:#cfe9f2; border:1px solid rgba(207,233,242,.4); }
#consentBar #consentDecline:hover { border-color:#cfe9f2; }

/* ---------- rotate-to-landscape prompt (spec mod) ----------
   Touch devices held in portrait DURING BATTLE get a full-screen ask;
   the home screen stays usable in portrait (panel goes full-width below). */
#rotate { display:none; position:fixed; inset:0; z-index:80;
  background:rgba(3,6,11,.96); align-items:center; justify-content:center;
  text-align:center; }
#rotate .rotIcon { display:block; font-size:64px; color:#4fd8eb;
  text-shadow:0 0 24px rgba(79,216,235,.8); animation:rotHint 2s ease-in-out infinite; }
#rotate b { display:block; margin-top:14px; font-size:19px; letter-spacing:.3em; color:#fff; }
#rotate p { margin-top:8px; color:#7e98a8; font-size:12px; letter-spacing:.12em; }
@keyframes rotHint { 0%,20%{transform:rotate(0)} 55%,75%{transform:rotate(-90deg)} 100%{transform:rotate(-90deg)} }
@media (orientation: portrait) and (pointer: coarse) {
  body.ingame #rotate { display:flex; }
}

/* ---------- responsive: small / mobile screens (spec mod) ---------- */

/* short windows: keep the whole home panel on screen without scrolling */
@media (max-height: 760px) {
  #homeLogo { max-height:10vh; }
  #lobbyPanel { padding:12px 22px 10px; }
  #lobbyPanel .row { margin:6px 0; }
  #lobbyPanel .row input, #lobbyPanel .row select, #lbAi { padding:5px 8px; font-size:13px; }
  #lobbyPanel .row select { padding-right:26px; }   /* keep room for the chevron */
  #lobbyPanel .dim { margin-top:6px; font-size:10px; line-height:1.35; }
  #lbTabs { margin:10px 0 6px; } #lbTabs b { padding:5px 0; }
  #sessionList { max-height:20vh; }
  .dim.bonus { display:none; }               /* headroom on tiny screens */
  #lbAvatarBtn { width:44px; height:44px; }
  button.big { margin-top:10px; padding:9px 24px; font-size:13px; }
  .promo { margin-top:8px; }
}

/* narrow windows / phones: full-width home panel, tighter picker */
@media (max-width: 820px) {
  #lobbyPanel { width:100%; max-width:100%; border-left:0; }
  #lobby.home::before { background:rgba(4,7,13,.62); }
  #avatarPicker { grid-template-columns:repeat(8, 1fr); gap:4px; padding:6px; }
  #avatarPicker .pick { width:100%; height:auto; aspect-ratio:1; }
  .row label { width:70px; font-size:10px; }
}

/* mobile landscape battle HUD: scale the instruments down */
@media (max-width: 980px), (max-height: 560px) {
  #hud { font-size:11px; }
  #vitals { width:150px; bottom:2.4%; }
  #vitals .bar { margin:3px 0; } #vitals .bar span { width:36px; font-size:9px; }
  #pingBox { font-size:8px; margin-top:4px; }
  #rankBox { width:150px; } #rankBox b { font-size:9px; }
  #radar { width:110px; height:110px; }
  #campaignGuide { top:130px; width:180px; padding:5px 7px; font-size:8px; }
  #campaignGuide b { font-size:9px; }
  #hud.campaign #killfeed { top:235px; }
  #killfeed { top:125px; width:190px; font-size:10px; }
  #killfeed div { font-size:10px; }
  #chat { width:230px; top:22%; } #chatLog div { font-size:10.5px; }
  #speedo #spd { font-size:22px; }
  #wpnBox b { font-size:10.5px; } #wpnBox span { font-size:8px; }
  #lockHead { font-size:10px; } .lktrack { width:90px; }
  #topbar { gap:14px; } #topbar #clock { font-size:15px; } #topbar #goal { display:none; }
  #flagshipBox { top:8%; gap:4px; width:94vw; }
  .flagshipCard { width:112px; padding:4px 5px; }
  .flagshipHead b { font-size:7px; } .flagshipHead em { font-size:6.5px; }
  .flagshipRow { grid-template-columns:27px 1fr 29px; gap:3px; font-size:6.5px; }
  .flagshipRow strong { font-size:7.5px; }
  #flagshipDamage { top:23%; padding:6px 9px; }
  #flagshipDamage b { font-size:10px; } #flagshipDamage span { font-size:9px; }
  #hint { display:none; }
  #speaker b { font-size:12px; } .avatar.big { width:52px; height:52px; }
  .slot { width:44px; height:44px; font-size:8px; }
  #mobileGrid { grid-template-columns:repeat(10, 44px); gap:3px; }
  #mobileGrid .slot { width:44px; height:44px; }
  #stickZone { width:100px; height:100px; }
  #stickKnob { width:36px; height:36px; margin:-18px; }
  .tbtn { padding:8px 10px; font-size:10px; }
  /* tighter equal-width column, packed just above the 60px FIRE button */
  #btnTab, #btnLock, .tbtn.move { width:68px; padding:6px 3px; font-size:9px; }
  #btnThrust { bottom:74px; }
  #btnBoost  { bottom:108px; }
  #btnLock   { bottom:142px; }
  #btnTab    { bottom:176px; }
  .tbtn.fire { width:60px; height:60px; padding:0; font-size:12px; }
  .tbtn.fire.alt { width:48px; height:48px; right:calc(2.5% + 68px); font-size:9px; }
  .panel { padding:16px 20px; max-width:92%; }
  .panel h1 { font-size:20px; } .panel h2 { font-size:15px; }
  th,td { padding:3px 7px; font-size:11px; }
}
