/* Tint the surface only. Type, focus rings, portraits and state colors
   stay fully visible over bright water or sky. */
:root {
  --glass-top: #102c42c2;
  --glass-base: #081a2dcf;
  --glass-board: #05142591;
  --glass-card: #0a1d30ce;
  --glass-lobby: #061a29d6;
  --glass-sheet: #071726ed;
  --glass-rim: #b6e8ff59;
  --glass-panel: linear-gradient(145deg, var(--glass-top), var(--glass-base));
}

/* Keep the scene open around the character. In portrait, tint the
   article itself so scrolling won't move text off its backing. */
#lobby {
  background:
    linear-gradient(90deg, var(--glass-lobby) 39%, transparent 68%),
    linear-gradient(0deg, #06152561, transparent 26% 83%, #06152578);
}
#lobby header { text-shadow: 0 1px 4px #061724; }
#lobby #heroes .selected { background: #081b2b85; }
#lobby #poses, #lobby #badge span, #lobby #openMenu {
  background: var(--glass-card);
}
@media (max-width: 1050px), (max-height: 610px) {
  #lobby {
    background:
      linear-gradient(90deg, var(--glass-lobby) 48%, transparent 70%),
      linear-gradient(#06152578, transparent 22%);
  }
}
@media (max-aspect-ratio: 1/1) {
  #lobby { background: linear-gradient(#06152588, transparent 19%); }
  #lobby article { background: var(--glass-lobby); }
}

.panel, dialog, #menu {
  background: var(--glass-panel);
  border-color: var(--glass-rim);
  box-shadow: inset 0 1px #efffff28, 0 22px 66px #020d2080;
}
dialog::backdrop, #menu::backdrop { background: #0413234d; }
#menu { --sub: #d0e0eb; --border: #b3deff35; }
#menu .menuTop, #actions, #leavePrompt, #lost { background: #05162273; }
#menu .armorList li, #coachMenu { background: #0b253980; }
#menu .haloPickup { background: linear-gradient(112deg, #14445199, #0b1d2c73); }
#surgeOption, #voiceOption, #bombOption { background: #10253978; }
#surgeOption:has(:checked), #voiceOption:has(:checked), #joinMicMode {
  background: #124454a1;
}
/* Blur only open desktop dialogs, never the full-screen backdrop or HUD. */
@media (pointer: fine) and (min-width: 700px) {
  dialog[open] { backdrop-filter: blur(3px); }
}

/* Live panels use two light layers instead of two nearly opaque ones.
   Sticky column labels keep their solid background over scrolling rows. */
#report {
  --muted: #cbdae8;
  background: var(--glass-card);
  border-color: var(--glass-rim);
}
#report.sb { background: var(--glass-board); }
#report .rs-head, #report.sb .rs-head {
  background: linear-gradient(106deg, #114358a6, #0b2037ab 70%);
}
#report .rs-damage, #report.sb .rs-damage { background: #091d31a6; }
#report .rs-drill { background: #142e4266; }
.sb-ally { --sb-tint: #0c5e5fa3; --sb-dark: #093743a3; }
.sb-enemy { --sb-tint: #873748a6; --sb-dark: #4f213ba6; }
.sb-rival { --sb-tint: #1c3c5ca3; --sb-dark: #122a43a3; }
.sb-row.sb-me { --sb-tint: #126e65bf; --sb-dark: #144652b0; }
.sb-who > span { color: #e9f8ffec; }
.sb-band, .sb-key { background: #071829b0; }

.cr-panel { background: var(--glass-card); }
.cr-head {
  background: linear-gradient(120deg, transparent 68%, #ff9b8b10 68% 73%, transparent 73%),
    linear-gradient(110deg, #21324880, #662b4099);
}
.cr-pair { background: linear-gradient(100deg, #15414962, #19304547 49%, #492e4062); }
.cr-list > .fatal .cr-pair {
  background: linear-gradient(100deg, #18505885, #21354a66 48%, #5b303e85);
}
@media (max-width: 950px) {
  /* The expanded sheet can sit directly over scoreboard text. */
  #hud #report:not([hidden]) ~ #combat.cr-expanded .cr-panel {
    background: var(--glass-sheet);
  }
}

#hud #tools, #hud #train, #hud #watch, #coach,
#hud #dispatch #messages #log, .clip-foot {
  background: var(--glass-card);
}
#podium article { background: var(--glass-panel); }
#podium article:first-child {
  background: linear-gradient(150deg, #95591f78, transparent), var(--glass-card);
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  :root {
    --glass-top: #102c42;
    --glass-base: #081a2d;
    --glass-board: #051425;
    --glass-card: #0a1d30;
    --glass-lobby: #061a29;
    --glass-sheet: #071726;
    --glass-rim: #92bad2;
  }
  #lobby article, #lobby header { background: var(--glass-lobby); }
  dialog[open] { backdrop-filter: none; }
  dialog::backdrop, #menu::backdrop { background: #041323ac; }
}
