/* The defense readouts share the existing telemetry rail and its compact height. */
.b8-wave-badge {
  --b8-ink: #d0f4e8;
  --b8-edge: #5d938d;
  --b8-base: #172e34;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 0 5px 0 4px;
  border: 1px solid var(--b8-edge);
  border-radius: 3px 6px 3px 3px;
  color: var(--b8-ink);
  background: linear-gradient(155deg, #ffffff13, transparent 65%), var(--b8-base);
  font: 650 clamp(.59rem, calc(var(--screen-w) * .012), .74rem)/1 Menlo, Consolas, monospace;
  white-space: nowrap;
}

.b8-wave-badge::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background: var(--b8-icon) center / contain no-repeat;
}

[data-b8-hud="shield"] { --b8-icon: url("../assets/deep-space/ui/batch-eight/wave-shield.svg"); }
[data-b8-hud="shield"][data-state="spent"] {
  --b8-ink: #b9c5cf;
  --b8-edge: #687987;
  --b8-base: #212934;
  border-style: dashed;
}
[data-b8-hud="shield"][data-state="spent"]::before { filter: saturate(.18) brightness(.8); }

[data-b8-hud="supply"] {
  --b8-icon: url("../assets/deep-space/ui/batch-eight/final-supply.svg");
  --b8-ink: #f8d9b0;
  --b8-edge: #9d795b;
  --b8-base: #322a2a;
}
[data-b8-hud="supply"][data-state="pending"] {
  --b8-edge: #c89a6d;
  box-shadow: inset 0 -2px #b87e4f45;
}

/* Footer utility faces use the same buttons and pressed states as the game. */
#touch-preview .utility-icon,
#sound .sound-glyph {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  background: var(--b8-icon) center / contain no-repeat;
  font-size: 0;
  clip-path: none;
  pointer-events: none;
}

#touch-preview .utility-icon { --b8-icon: url("../assets/deep-space/ui/batch-eight/touch-preview.svg"); }
#sound .sound-glyph { --b8-icon: url("../assets/deep-space/ui/batch-eight/sound.svg"); }
#touch-preview[aria-pressed="false"] .utility-icon { opacity: .78; }
#touch-preview[aria-pressed="true"],
#sound[aria-pressed="true"] { box-shadow: inset 0 -2px #79bbc477; }
#sound[aria-pressed="false"] .sound-glyph::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 1px;
  width: 18px;
  height: 2px;
  background: #f7b393;
  box-shadow: 0 0 0 1px #16202b;
  transform: rotate(42deg);
}

/* Trim remains inside the original room, menu and pause bounds. */
.mast .location {
  border-inline-start-color: transparent;
  background: url("../assets/deep-space/ui/batch-eight/location-rail.svg") left center / 5px 100% no-repeat;
}

#flow[data-flow-screen="menu"] .mf-panel::after {
  content: "";
  position: absolute;
  inset: 1px 12px auto auto;
  width: clamp(48px, 20%, 96px);
  height: 10px;
  transform: rotate(180deg);
  background: url("../assets/deep-space/ui/batch-eight/menu-latch.svg") center / contain no-repeat;
  pointer-events: none;
}

#flow[data-flow-screen="pause"] .mf-pause-details > summary {
  background: url("../assets/deep-space/ui/batch-eight/pause-divider.svg") right center / min(24%, 46px) 7px no-repeat;
}
