.relay-page,
.games-page {
  --relay-cyan: #4ee8ff;
  --relay-cyan-soft: rgba(78, 232, 255, 0.16);
  --relay-amber: #ffc45f;
  --relay-life: #64e8ff;
  --relay-power: #ffc45f;
  --relay-noise: #ff7387;
  --relay-green: #a8ff78;
  --relay-ink: #eaffff;
}

.relay-page {
  background:
    radial-gradient(circle at 78% 14%, rgba(38, 217, 255, 0.085), transparent 27rem),
    radial-gradient(circle at 10% 72%, rgba(255, 190, 83, 0.045), transparent 24rem),
    linear-gradient(180deg, #06131a 0%, #02070b 74%, #040a0e 100%);
}

.relay-page::before {
  opacity: 0.45;
  background-size: 56px 56px, 56px 56px, 14px 14px, 14px 14px, 100% 9px;
}

.relay-page main:focus,
.games-page main:focus {
  outline: none;
}

.relay-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.relay-page .site-shell {
  width: min(calc(100% - 2.5rem), 1320px);
}

.relay-page .site-header {
  min-height: 4.45rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(151, 214, 222, 0.1);
}

.relay-shift-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 20.5rem);
  gap: 1rem;
  align-items: stretch;
  padding: clamp(1.15rem, 2.5vw, 2rem) 0 2.5rem;
}

.relay-shift-layout .panel {
  border-color: rgba(151, 214, 222, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 20%),
    linear-gradient(180deg, rgba(9, 23, 29, 0.95), rgba(3, 10, 14, 0.98));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
}

.relay-stage-panel {
  min-width: 0;
  padding: clamp(0.9rem, 1.7vw, 1.25rem);
}

.relay-stage-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.relay-stage-header .panel-kicker {
  display: block;
  margin-bottom: 0.18rem;
}

.relay-stage-header h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.45rem, 4.7vw, 4.2rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.shift-tagline {
  margin: 0.38rem 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.shift-stage-state {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.shift-state-label {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.relay-status {
  position: relative;
  z-index: 2;
  min-height: 1.45rem;
  margin: 0 0 0.7rem;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.79rem;
}

.relay-status.is-success {
  color: var(--relay-green);
}

.relay-status.is-failure {
  color: var(--relay-noise);
}

.shift-setup-note {
  position: relative;
  z-index: 2;
  margin: -0.3rem 0 0.58rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
}

.shift-setup-note b {
  color: var(--relay-amber);
  font-weight: 600;
  text-transform: uppercase;
}

.shift-rules {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.68rem;
}

.shift-rules span {
  min-width: 0;
  padding: 0.38rem 0.48rem;
  border: 1px solid rgba(151, 214, 222, 0.1);
  border-radius: 4px;
  color: var(--text-muted);
  background: rgba(3, 10, 14, 0.42);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  line-height: 1.35;
}

.shift-rules b {
  color: var(--relay-cyan);
  font-weight: 600;
  text-transform: uppercase;
}

#relay-status-pill[data-state="running"] {
  border-color: rgba(78, 232, 255, 0.42);
  color: var(--relay-cyan);
  background: rgba(78, 232, 255, 0.08);
}

#relay-status-pill[data-state="success"] {
  border-color: rgba(168, 255, 120, 0.4);
  color: var(--relay-green);
  background: rgba(168, 255, 120, 0.075);
}

#relay-status-pill[data-state="failed"] {
  border-color: rgba(255, 115, 135, 0.4);
  color: var(--relay-noise);
  background: rgba(255, 115, 135, 0.075);
}

.relay-board {
  position: relative;
  min-height: clamp(21rem, 32vw, 28rem);
  overflow: hidden;
  border: 1px solid rgba(78, 232, 255, 0.18);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 48%, rgba(78, 232, 255, 0.07), transparent 31%),
    linear-gradient(rgba(108, 197, 210, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 197, 210, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 22, 28, 0.97), rgba(2, 9, 13, 0.99));
  background-size: auto, 26px 26px, 26px 26px, auto;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.52), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
  isolation: isolate;
}

.relay-board::before,
.relay-board::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.relay-board::before {
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0 6px, rgba(255, 255, 255, 0.012) 7px);
}

.relay-board::after {
  inset: 0.65rem;
  border: 1px solid rgba(151, 214, 222, 0.055);
  clip-path: polygon(0 0, 2rem 0, 2rem 1px, calc(100% - 2rem) 1px, calc(100% - 2rem) 0, 100% 0, 100% 2rem, calc(100% - 1px) 2rem, calc(100% - 1px) calc(100% - 2rem), 100% calc(100% - 2rem), 100% 100%, 0 100%, 0 calc(100% - 2rem), 1px calc(100% - 2rem), 1px 2rem, 0 2rem);
}

.relay-board[aria-busy="true"] {
  border-color: rgba(78, 232, 255, 0.4);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.5), 0 0 30px rgba(78, 232, 255, 0.07);
}

.relay-board-chrome {
  position: absolute;
  top: 0.68rem;
  right: 0.8rem;
  left: 0.8rem;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  color: rgba(174, 211, 218, 0.4);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  pointer-events: none;
}

.relay-wires,
.relay-edge-labels,
.relay-nodes,
.relay-pulses {
  position: absolute;
  inset: 0;
}

.relay-wires {
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.relay-wire {
  stroke: rgba(139, 181, 190, 0.14);
  stroke-width: 2;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
  transition: stroke 110ms ease, stroke-width 110ms ease, filter 110ms ease, opacity 110ms ease;
}

.relay-wire.is-selected {
  stroke: rgba(78, 232, 255, 0.34);
  stroke-width: 2.15;
  filter: drop-shadow(0 0 4px rgba(78, 232, 255, 0.22));
}

.relay-wire.is-reachable {
  stroke: rgba(78, 232, 255, 0.64);
  stroke-width: 2.55;
  filter: drop-shadow(0 0 6px rgba(78, 232, 255, 0.4));
}

.relay-wire.is-active {
  stroke: var(--relay-cyan);
  stroke-width: 3.2;
  filter: drop-shadow(0 0 8px rgba(78, 232, 255, 0.88));
}

.relay-wire.is-command-stage {
  stroke: var(--relay-amber);
  stroke-width: 4;
  filter: drop-shadow(0 0 10px rgba(255, 196, 95, 0.82));
}

.relay-wire.is-collision,
.relay-wire.is-failed {
  stroke: var(--relay-noise);
  filter: drop-shadow(0 0 7px rgba(255, 115, 135, 0.68));
}

.relay-wires .is-life {
  stroke: var(--relay-life);
}

.relay-wires .is-power {
  stroke: var(--relay-power);
}

.relay-wires .is-noise {
  stroke: var(--relay-noise);
}

.relay-edge-labels {
  z-index: 2;
  pointer-events: none;
}

.relay-edge-label {
  position: absolute;
  padding: 0.12rem 0.24rem;
  border: 1px solid rgba(151, 214, 222, 0.09);
  border-radius: 2px;
  color: rgba(174, 211, 218, 0.42);
  background: rgba(3, 10, 14, 0.88);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translate(-50%, -50%);
  transition: border-color 110ms ease, color 110ms ease, box-shadow 110ms ease, opacity 110ms ease;
  white-space: nowrap;
}

.relay-edge-label.is-selected {
  border-color: rgba(78, 232, 255, 0.28);
  color: var(--relay-cyan);
}

.relay-edge-label.is-bonus-requested {
  border-color: rgba(255, 196, 95, 0.6);
  color: var(--relay-amber);
  box-shadow: 0 0 14px rgba(255, 196, 95, 0.28);
}

.relay-edge-label.is-bonus-requested::after {
  content: " +10";
  color: var(--relay-green);
}

.relay-nodes {
  z-index: 3;
  pointer-events: none;
}

.relay-pulses {
  z-index: 4;
  pointer-events: none;
}

.relay-node {
  position: absolute;
  display: grid;
  width: 5rem;
  min-width: 0;
  min-height: 4.35rem;
  padding: 0;
  border: 0;
  color: var(--relay-ink);
  background: transparent;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  touch-action: manipulation;
  appearance: none;
}

button.relay-node {
  cursor: pointer;
  pointer-events: auto;
}

button.relay-node:hover,
button.relay-node:focus-visible {
  transform: translate(-50%, -50%);
}

button.relay-node:focus-visible .relay-node-core {
  box-shadow: var(--focus-ring), 0 0 24px rgba(78, 232, 255, 0.28);
}

button.relay-node:disabled {
  cursor: wait;
  opacity: 0.72;
}

.relay-node-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  margin: 0 auto;
  border: 1px solid rgba(151, 214, 222, 0.38);
  border-radius: 50%;
  color: var(--relay-cyan);
  background: rgba(4, 14, 18, 0.97);
  box-shadow: 0 0 0 5px rgba(78, 232, 255, 0.025), 0 8px 28px rgba(0, 0, 0, 0.38);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  line-height: 1;
  transition: border-color 100ms ease, color 100ms ease, background-color 100ms ease, box-shadow 100ms ease, transform 100ms ease;
}

.relay-node-label {
  align-self: end;
  margin-top: 0.3rem;
  color: rgba(219, 239, 242, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.57rem;
  line-height: 1.15;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.relay-node-meta {
  display: block;
  margin-top: 0.14rem;
  color: var(--relay-amber);
  font-size: 0.59rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: pre-line;
}

button.relay-node.is-command-stage .relay-node-core {
  border-color: var(--relay-amber);
  color: #071014;
  background: var(--relay-amber);
  box-shadow: 0 0 0 7px rgba(255, 196, 95, 0.1), 0 0 34px rgba(255, 196, 95, 0.62);
  animation: none;
}

.relay-node-source .relay-node-core,
.relay-node-entry .relay-node-core {
  border-color: rgba(78, 232, 255, 0.72);
  background: var(--relay-cyan);
  color: #021116;
  box-shadow: 0 0 0 6px rgba(78, 232, 255, 0.075), 0 0 25px rgba(78, 232, 255, 0.44);
}

.relay-node-switch .relay-node-core,
.relay-node-junction .relay-node-core {
  border-radius: 4px;
  border-color: rgba(255, 196, 95, 0.72);
  color: var(--relay-amber);
  transform: rotate(45deg);
}

.relay-node-switch .relay-node-core > *,
.relay-node-junction .relay-node-core > * {
  transform: rotate(-45deg);
}

.relay-node-switch:hover .relay-node-core,
.relay-node-switch:focus-visible .relay-node-core,
.relay-node-junction:hover .relay-node-core,
.relay-node-junction:focus-visible .relay-node-core {
  border-color: var(--relay-cyan);
  color: var(--relay-cyan);
  background: rgba(8, 31, 38, 0.98);
  box-shadow: 0 0 0 5px rgba(78, 232, 255, 0.06), 0 0 24px rgba(78, 232, 255, 0.24);
}

.relay-node-delay .relay-node-core,
.relay-node-buffer .relay-node-core {
  border-radius: 5px;
  border-color: rgba(255, 196, 95, 0.58);
  color: var(--relay-amber);
}

.relay-node-delay .relay-node-core::after,
.relay-node-buffer .relay-node-core::after {
  content: "";
  position: absolute;
  inset: 0.33rem;
  border: 1px dashed rgba(255, 196, 95, 0.32);
  border-radius: 50%;
}

.relay-node-relay .relay-node-core,
.relay-node-hub .relay-node-core,
.relay-node-bottleneck .relay-node-core {
  width: 2.35rem;
  height: 2.35rem;
  border-style: dashed;
}

.relay-node-terminal .relay-node-core,
.relay-node-sink .relay-node-core {
  width: 3.35rem;
  height: 3.35rem;
  border-width: 2px;
  box-shadow: inset 0 0 0 5px rgba(78, 232, 255, 0.035), 0 0 22px rgba(78, 232, 255, 0.11);
}

.relay-node[data-accepts="LIFE"] .relay-node-core,
.relay-node-terminal-life .relay-node-core {
  border-color: var(--relay-life);
  color: var(--relay-life);
}

.relay-node[data-accepts="POWER"] .relay-node-core,
.relay-node-terminal-power .relay-node-core {
  border-color: var(--relay-power);
  color: var(--relay-power);
}

.relay-node[data-accepts="NOISE"] .relay-node-core,
.relay-node-sink .relay-node-core {
  border-color: var(--relay-noise);
  color: var(--relay-noise);
  border-style: dashed;
}

.relay-node.is-active .relay-node-core {
  border-color: var(--relay-cyan);
  color: var(--relay-cyan);
  box-shadow: 0 0 0 6px rgba(78, 232, 255, 0.09), 0 0 30px rgba(78, 232, 255, 0.54);
}

.relay-node.is-holding .relay-node-core {
  border-color: var(--relay-amber);
  color: var(--relay-amber);
  background: rgba(41, 29, 8, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 196, 95, 0.08), 0 0 30px rgba(255, 196, 95, 0.4);
  animation: relay-delay-hold 620ms ease-in-out infinite alternate;
}

.relay-node.is-decision-node .relay-node-core {
  border-color: var(--relay-amber);
  color: var(--relay-amber);
  box-shadow: 0 0 0 7px rgba(255, 196, 95, 0.1), 0 0 34px rgba(255, 196, 95, 0.55);
  animation: relay-decision-pulse 780ms ease-in-out infinite alternate;
}

.relay-node.is-success .relay-node-core {
  border-color: var(--relay-green);
  color: var(--relay-green);
  box-shadow: 0 0 0 6px rgba(168, 255, 120, 0.08), 0 0 32px rgba(168, 255, 120, 0.46);
}

.relay-node.is-failed .relay-node-core,
.relay-node.is-collision .relay-node-core {
  border-color: var(--relay-noise);
  color: var(--relay-noise);
  box-shadow: 0 0 0 6px rgba(255, 115, 135, 0.07), 0 0 28px rgba(255, 115, 135, 0.42);
}

.relay-pulse,
.relay-signal,
.shift-signal {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.18rem;
  height: 1.18rem;
  margin: -0.59rem 0 0 -0.59rem;
  border: 2px solid #d9fbff;
  border-radius: 50%;
  color: #031016;
  background: var(--relay-cyan);
  box-shadow: 0 0 6px #fff, 0 0 17px rgba(78, 232, 255, 0.95), 0 0 30px rgba(78, 232, 255, 0.55);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
}

.relay-pulse.is-life,
.relay-signal.is-life,
.shift-signal.is-life {
  border-radius: 50%;
  background: var(--relay-life);
  box-shadow: 0 0 6px #fff, 0 0 17px rgba(100, 232, 255, 0.95), 0 0 30px rgba(100, 232, 255, 0.55);
}

.relay-pulse.is-power,
.relay-signal.is-power,
.shift-signal.is-power {
  border-radius: 3px;
  background: var(--relay-power);
  box-shadow: 0 0 6px #fff, 0 0 17px rgba(255, 196, 95, 0.95), 0 0 30px rgba(255, 196, 95, 0.5);
}

.relay-pulse.is-noise,
.relay-signal.is-noise,
.shift-signal.is-noise {
  border-color: #ffdfe4;
  border-radius: 2px;
  background: var(--relay-noise);
  box-shadow: 0 0 6px #fff, 0 0 17px rgba(255, 115, 135, 0.92), 0 0 30px rgba(255, 115, 135, 0.48);
}

.relay-pulse.is-static,
.relay-signal.is-static,
.shift-signal.is-static {
  transform: translate(var(--signal-x), var(--signal-y));
}

.relay-pulse.is-stationary,
.relay-signal.is-stationary,
.shift-signal.is-stationary {
  transform: translate(-50%, -50%);
}

.relay-pulse.is-fallback-moving,
.relay-signal.is-fallback-moving,
.shift-signal.is-fallback-moving {
  animation: relay-pulse-fallback 420ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.shift-signal-glyph {
  display: grid;
  place-items: center;
}

.shift-signal-due {
  position: absolute;
  bottom: calc(100% + 0.22rem);
  left: 50%;
  padding: 0.08rem 0.2rem;
  border: 1px solid rgba(151, 214, 222, 0.24);
  border-radius: 2px;
  color: var(--text-soft);
  background: rgba(3, 10, 14, 0.9);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
}

.shift-signal-due.is-urgent {
  border-color: rgba(255, 115, 135, 0.58);
  color: #ffd9de;
  background: rgba(48, 8, 15, 0.94);
  box-shadow: 0 0 10px rgba(255, 115, 135, 0.25);
}

.relay-beat-track {
  position: absolute;
  right: 0.9rem;
  bottom: 0.58rem;
  left: 0.9rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.24rem;
  pointer-events: none;
}

.relay-beat-track span {
  height: 0.25rem;
  border: 1px solid rgba(151, 214, 222, 0.16);
  border-radius: 999px;
  background: rgba(151, 214, 222, 0.055);
  transition: background-color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}

.relay-beat-track span.is-past {
  border-color: rgba(78, 232, 255, 0.28);
  background: rgba(78, 232, 255, 0.38);
}

.relay-beat-track span.is-current {
  border-color: var(--relay-cyan);
  background: var(--relay-cyan);
  box-shadow: 0 0 10px rgba(78, 232, 255, 0.7);
}

.relay-beat-track span.is-damaged {
  border-color: var(--relay-noise);
  background: rgba(255, 115, 135, 0.72);
}

.shift-result[hidden] {
  display: none !important;
}

.shift-result {
  position: absolute;
  inset: clamp(1.25rem, 8%, 3.5rem);
  z-index: 12;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border: 1px solid rgba(78, 232, 255, 0.28);
  border-radius: 7px;
  color: var(--relay-ink);
  background:
    radial-gradient(circle at 50% 25%, rgba(78, 232, 255, 0.12), transparent 38%),
    rgba(3, 11, 15, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), inset 0 0 60px rgba(78, 232, 255, 0.035);
  text-align: center;
}

.shift-result-rating {
  margin: 0 0 0.25rem;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.shift-result-rating strong {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--relay-amber);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
}

.shift-result h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

.shift-result h2:focus {
  outline: none;
}

.shift-result > p:not(.shift-result-rating) {
  color: var(--text-soft);
}

.shift-result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(5rem, 1fr));
  gap: 0.55rem;
  width: min(100%, 32rem);
  margin: 0.6rem 0 0.8rem;
}

.shift-result-stats div {
  padding: 0.58rem;
  border: 1px solid rgba(151, 214, 222, 0.12);
  border-radius: 5px;
  background: rgba(78, 232, 255, 0.035);
}

.shift-result-stats dt,
.shift-result-stats dd {
  margin: 0;
}

.shift-result-stats dt {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  text-transform: uppercase;
}

.shift-result-stats dd {
  margin-top: 0.2rem;
  color: var(--relay-ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.shift-best-result {
  margin-bottom: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.shift-result .button::after {
  content: none;
}

.shift-board-help {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.56rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.shift-key-hint {
  color: rgba(174, 211, 218, 0.48);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
}

.relay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.78rem;
}

.shift-actions .button {
  min-height: 2.65rem;
  padding: 0.68rem 0.86rem;
  font-size: 0.86rem;
}

.shift-actions .button::after,
.relay-quiet-button::after {
  content: none;
}

.shift-actions #hold-button {
  min-width: 8.5rem;
}

.relay-sidebar {
  min-width: 0;
}

.shift-hud {
  height: 100%;
  min-height: 0;
  padding: 1.05rem;
}

.shift-hud-header {
  align-items: center;
  margin-bottom: 0.75rem;
}

.shift-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
  margin: 0 0 0.9rem;
}

.shift-stats div {
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(151, 214, 222, 0.11);
  border-radius: 5px;
  background: rgba(3, 10, 14, 0.58);
}

.shift-stats dt,
.shift-stats dd {
  margin: 0;
}

.shift-stats dt {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shift-stats dd {
  margin-top: 0.2rem;
  color: var(--relay-ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
}

.shift-objectives,
.shift-forecast,
.shift-events {
  padding-top: 0.76rem;
  border-top: 1px solid rgba(151, 214, 222, 0.1);
}

.shift-objectives,
.shift-forecast {
  margin-bottom: 0.78rem;
}

.shift-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.shift-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.shift-section-heading span {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
}

.shift-objectives ul,
.shift-forecast ol,
.relay-log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shift-objectives ul {
  display: grid;
  gap: 0.38rem;
}

.shift-objectives li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2rem;
  padding: 0.36rem 0.5rem;
  border: 1px solid rgba(151, 214, 222, 0.09);
  border-radius: 4px;
  background: rgba(3, 10, 14, 0.48);
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
}

.shift-objectives li span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.shift-objectives li i {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  font-style: normal;
}

.shift-objectives .signal-life i {
  color: var(--relay-life);
}

.shift-objectives .signal-power i {
  color: var(--relay-power);
}

.shift-objectives .signal-noise i {
  color: var(--relay-noise);
}

.shift-objectives li.is-complete {
  border-color: rgba(168, 255, 120, 0.3);
  color: var(--relay-green);
  background: rgba(168, 255, 120, 0.05);
}

.shift-bonus-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.48rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 196, 95, 0.2);
  border-radius: 4px;
  color: var(--relay-amber);
  background: rgba(255, 196, 95, 0.045);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
}

.shift-bonus-meter strong {
  color: var(--relay-green);
}

.shift-forecast ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

.shift-forecast li {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.4rem 0.2rem;
  border: 1px solid rgba(151, 214, 222, 0.11);
  border-radius: 4px;
  background: rgba(3, 10, 14, 0.62);
  text-align: center;
}

.shift-forecast li > span {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.54rem;
}

.shift-forecast li strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-forecast li.is-life strong {
  color: var(--relay-life);
}

.shift-forecast li.is-power strong {
  color: var(--relay-power);
}

.shift-forecast li.is-noise strong {
  color: var(--relay-noise);
}

.shift-forecast li.is-now {
  border-color: rgba(78, 232, 255, 0.32);
  background: rgba(78, 232, 255, 0.065);
}

.shift-traffic-manifest {
  position: relative;
  z-index: 2;
  margin: 0 0 0.68rem;
  padding: 0.56rem;
  border: 1px solid rgba(151, 214, 222, 0.12);
  border-radius: 5px;
  background: rgba(3, 10, 14, 0.44);
}

.shift-traffic-manifest .shift-section-heading {
  margin-bottom: 0.42rem;
}

.shift-traffic-manifest .shift-section-heading h2 {
  font-size: 0.7rem;
}

.shift-traffic-manifest .shift-section-heading span {
  color: var(--relay-amber);
}

.shift-traffic-manifest ol {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.34rem;
}

.shift-traffic-manifest li {
  position: relative;
  place-items: stretch;
  align-content: start;
  min-height: 4.15rem;
  padding: 0.42rem 0.46rem;
  text-align: left;
}

.traffic-card-top,
.traffic-card-route,
.traffic-card-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.traffic-card-top span,
.traffic-card-top b,
.traffic-card-route,
.traffic-card-state {
  font-family: "IBM Plex Mono", monospace;
}

.traffic-card-top span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.61rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-traffic-manifest li.is-life .traffic-card-top span {
  color: var(--relay-life);
}

.shift-traffic-manifest li.is-power .traffic-card-top span {
  color: var(--relay-power);
}

.shift-traffic-manifest li.is-noise .traffic-card-top span {
  color: var(--relay-noise);
}

.traffic-card-top b {
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 600;
}

.traffic-card-route {
  margin-top: 0.24rem;
  color: var(--relay-amber);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.traffic-card-state {
  margin-top: 0.23rem;
  color: var(--text-muted);
  font-size: 0.53rem;
  line-height: 1.25;
}

.shift-traffic-manifest li.is-active {
  border-color: rgba(78, 232, 255, 0.36);
  background: rgba(78, 232, 255, 0.06);
}

.shift-traffic-manifest li.is-active .traffic-card-state {
  color: var(--relay-cyan);
}

.shift-traffic-manifest li.is-directive-met .traffic-card-route,
.shift-traffic-manifest li.is-delivered {
  border-color: rgba(168, 255, 120, 0.3);
}

.shift-traffic-manifest li.is-directive-met .traffic-card-route,
.shift-traffic-manifest li.is-delivered .traffic-card-state {
  color: var(--relay-green);
}

.shift-traffic-manifest li.is-directive-missed .traffic-card-route {
  color: var(--text-muted);
  text-decoration: line-through;
}

.shift-traffic-manifest li.is-lost,
.shift-traffic-manifest li.is-purged {
  opacity: 0.68;
}

.shift-traffic-manifest li.is-lost {
  border-color: rgba(255, 115, 135, 0.28);
}

.shift-traffic-manifest li.is-lost .traffic-card-state {
  color: var(--relay-noise);
}

.shift-traffic-manifest li.is-lost.is-directive-met .traffic-card-route,
.shift-traffic-manifest li.is-purged.is-directive-met .traffic-card-route {
  color: var(--text-muted);
  text-decoration: line-through;
}

.relay-log {
  display: grid;
  gap: 0.3rem;
}

.relay-log-entry {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  line-height: 1.38;
}

.relay-log-entry:first-child {
  color: var(--text-soft);
}

.relay-noscript {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

.relay-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(151, 214, 222, 0.1);
}

.relay-footer p strong {
  color: var(--text);
}

.relay-footer p span {
  margin-left: 0.55rem;
}

.relay-footer a {
  color: var(--text-soft);
}

/* Featured card used by the Games & Labs directory. */
.relay-directory-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(22rem, 1.22fr);
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: center;
  min-height: 25rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.relay-directory-feature .card-meta {
  justify-content: flex-start;
}

.relay-directory-feature h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.045em;
}

.relay-directory-feature p {
  max-width: 43ch;
}

.relay-directory-action {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  color: var(--relay-amber);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.relay-directory-preview {
  position: relative;
  min-height: 17.5rem;
  overflow: hidden;
  border: 1px solid rgba(78, 232, 255, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(rgba(151, 214, 222, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 214, 222, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 21, 27, 0.98), rgba(2, 9, 13, 0.98));
  background-size: 25px 25px, 25px 25px, auto;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
}

.relay-directory-preview::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 12%;
  left: 11%;
  height: 2px;
  background: linear-gradient(90deg, var(--relay-cyan), var(--relay-cyan) 49%, transparent 49% 54%, var(--relay-cyan) 54%);
  box-shadow: 0 0 12px rgba(78, 232, 255, 0.52);
}

.relay-directory-preview .preview-node {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--relay-cyan);
  border-radius: 50%;
  color: var(--relay-cyan);
  background: #061218;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(78, 232, 255, 0.2);
}

.relay-directory-preview .preview-source {
  left: 11%;
  background: var(--relay-cyan);
  color: #021116;
}

.relay-directory-preview .preview-switch {
  left: 50%;
  border-color: var(--relay-amber);
  border-radius: 4px;
  color: var(--relay-amber);
  transform: translate(-50%, -50%) rotate(45deg);
}

.relay-directory-preview .preview-switch span {
  transform: rotate(-45deg);
}

.relay-directory-preview .preview-terminal {
  left: 88%;
  width: 3.4rem;
  height: 3.4rem;
  border-width: 2px;
}

.relay-directory-preview .preview-pulse {
  position: absolute;
  top: 50%;
  left: 31%;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #eaffff;
  box-shadow: 0 0 6px #fff, 0 0 18px var(--relay-cyan), 0 0 35px var(--relay-cyan);
  transform: translate(-50%, -50%);
}

@keyframes relay-pulse-fallback {
  0% {
    opacity: 0;
    transform: translate(var(--relay-pulse-start-x), var(--relay-pulse-start-y)) scale(0.65);
  }
  12% {
    opacity: 1;
    transform: translate(var(--relay-pulse-start-x), var(--relay-pulse-start-y)) scale(1);
  }
  84% {
    opacity: 1;
    transform: translate(var(--relay-pulse-end-x), var(--relay-pulse-end-y)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--relay-pulse-end-x), var(--relay-pulse-end-y)) scale(0.65);
  }
}

@keyframes relay-delay-hold {
  from {
    filter: brightness(0.9);
  }
  to {
    filter: brightness(1.18);
  }
}

@keyframes relay-decision-pulse {
  from {
    box-shadow: 0 0 0 5px rgba(255, 196, 95, 0.07), 0 0 22px rgba(255, 196, 95, 0.34);
  }
  to {
    box-shadow: 0 0 0 9px rgba(255, 196, 95, 0.12), 0 0 38px rgba(255, 196, 95, 0.62);
  }
}

@media (max-width: 860px) {
  .relay-shift-layout {
    grid-template-columns: 1fr;
  }

  .relay-board {
    min-height: clamp(24rem, 52vw, 31rem);
  }

  .shift-hud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    height: auto;
  }

  .shift-hud-header,
  .shift-events {
    grid-column: 1 / -1;
  }

  .shift-stats,
  .shift-objectives {
    margin: 0;
  }

  .shift-objectives {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 780px) {
  .relay-page .site-shell {
    width: min(calc(100% - 1.25rem), 1320px);
  }

  .relay-page .site-header {
    align-items: flex-start;
  }

  .relay-page .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .relay-page .site-nav a {
    display: grid;
    place-items: center;
    min-width: 0;
    padding-right: 0.45rem;
    padding-left: 0.45rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .shift-hud {
    grid-template-columns: 1fr 1fr;
  }

  .shift-hud-header,
  .shift-events {
    grid-column: 1 / -1;
  }

  .relay-directory-feature {
    grid-template-columns: 1fr;
  }

  .relay-directory-preview {
    min-height: 14rem;
  }

  .shift-traffic-manifest ol {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scroll-snap-type: x proximity;
  }

  .shift-traffic-manifest li {
    flex: 0 0 8.8rem;
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .relay-page .site-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .relay-shift-layout {
    padding-top: 0.75rem;
  }

  .relay-stage-panel {
    display: flex;
    flex-direction: column;
    padding: 0.72rem;
  }

  .relay-stage-header {
    align-items: flex-start;
  }

  .relay-stage-header h1 {
    font-size: clamp(2.6rem, 15vw, 3.6rem);
  }

  .shift-tagline {
    font-size: 0.8rem;
  }

  .shift-rules {
    display: flex;
    overflow-x: auto;
  }

  .shift-rules span {
    flex: 0 0 auto;
  }

  .shift-state-label {
    display: none;
  }

  .relay-board {
    order: 2;
    min-height: 29rem;
    background-size: auto, 22px 22px, 22px 22px, auto;
  }

  .relay-board-chrome span:last-child,
  .shift-key-hint {
    display: none;
  }

  .relay-node {
    width: 4.1rem;
    min-height: 4rem;
  }

  .relay-node-core {
    width: 2.55rem;
    height: 2.55rem;
  }

  .relay-node-terminal .relay-node-core,
  .relay-node-sink .relay-node-core {
    width: 2.85rem;
    height: 2.85rem;
  }

  .relay-node-label {
    font-size: 0.56rem;
  }

  .relay-node-meta {
    font-size: 0.55rem;
  }

  .relay-controls {
    position: sticky;
    top: 0.45rem;
    z-index: 20;
    order: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 0.65rem;
    padding: 0.46rem;
    border: 1px solid rgba(78, 232, 255, 0.2);
    border-radius: 6px;
    background: rgba(3, 10, 14, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.44);
  }

  .relay-controls .button {
    width: 100%;
  }

  .shift-actions #hold-button {
    min-width: 0;
  }

  .shift-board-help {
    order: 3;
  }

  .relay-controls.is-result {
    position: static;
    order: 3;
  }

  .shift-hud {
    grid-template-columns: 1fr;
  }

  .shift-hud-header,
  .shift-events {
    grid-column: auto;
  }

  .shift-objectives,
  .shift-events {
    padding-top: 0.72rem;
    border-top: 1px solid rgba(151, 214, 222, 0.1);
  }

  .shift-result {
    inset: 0.8rem;
  }

  .shift-result-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .shift-result-stats div {
    padding: 0.42rem 0.25rem;
  }

  .relay-footer {
    flex-direction: column;
  }

  .relay-footer p span {
    display: block;
    margin: 0.25rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .relay-wire,
  .relay-node-core,
  .relay-beat-track span {
    transition-duration: 0.01ms;
  }

  .relay-page .panel-scan {
    display: none;
  }

  .relay-node.is-holding .relay-node-core {
    animation: none;
  }

  .relay-node.is-decision-node .relay-node-core {
    animation: none;
  }
}

/* Last Light narrative run */
.relay-shift-layout {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 70rem);
  margin-inline: auto;
}

.relay-stage-panel {
  isolation: isolate;
}

.relay-stage-panel.is-briefing > .shift-transmission,
.relay-stage-panel.is-briefing > .shift-vitals,
.relay-stage-panel.is-briefing > .shift-outcome,
.relay-stage-panel.is-briefing > .shift-decision,
.relay-stage-panel.is-briefing > .shift-actions,
.relay-stage-panel.is-briefing > .shift-board-help,
.relay-stage-panel.is-briefing > .shift-traffic-manifest,
.relay-stage-panel.is-result > .shift-transmission,
.relay-stage-panel.is-result > .shift-vitals,
.relay-stage-panel.is-result > .shift-outcome,
.relay-stage-panel.is-result > .shift-decision,
.relay-stage-panel.is-result > .shift-actions,
.relay-stage-panel.is-result > .shift-board-help,
.relay-stage-panel.is-result > .shift-traffic-manifest {
  display: none;
}

.shift-story-progress {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shift-story-progress li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem;
  min-width: 5.25rem;
  padding: 0.38rem 0.5rem;
  border: 1px solid rgba(151, 214, 222, 0.11);
  border-radius: 4px;
  color: rgba(174, 211, 218, 0.52);
  background: rgba(3, 10, 14, 0.5);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shift-story-progress li span {
  color: rgba(174, 211, 218, 0.32);
}

.shift-story-progress li.is-current {
  border-color: rgba(78, 232, 255, 0.34);
  color: var(--relay-ink);
  background: rgba(78, 232, 255, 0.07);
}

.shift-story-progress li.is-current span {
  color: var(--relay-cyan);
}

.shift-story-progress li.is-complete {
  border-color: rgba(168, 255, 120, 0.22);
  color: var(--relay-green);
}

.shift-transmission {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(8.8rem, auto) 1fr;
  gap: 0.8rem;
  align-items: center;
  min-height: 3.3rem;
  margin: 0.65rem 0;
  padding: 0.65rem 0.78rem;
  overflow: hidden;
  border: 1px solid rgba(78, 232, 255, 0.17);
  border-left: 3px solid var(--relay-cyan);
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(78, 232, 255, 0.075), transparent 42%),
    rgba(3, 10, 14, 0.68);
}

.shift-transmission::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(78, 232, 255, 0.09), transparent);
  opacity: 0;
  transform: translateX(-100%);
}

.shift-transmission.is-new::after {
  animation: relay-story-scan 760ms ease-out;
}

.shift-transmission span {
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shift-transmission p {
  margin: 0;
  color: var(--relay-ink);
  font-size: 0.88rem;
  line-height: 1.45;
}

.shift-vitals {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.38rem;
  margin: 0 0 0.55rem;
}

.shift-vitals div {
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(151, 214, 222, 0.12);
  border-radius: 4px;
  background: rgba(3, 10, 14, 0.76);
}

.shift-vitals dt,
.shift-vitals dd {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
}

.shift-vitals dt {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.shift-vitals dd {
  margin-top: 0.18rem;
  color: var(--relay-ink);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.shift-vitals div:nth-child(2) dd,
.shift-vitals div:nth-child(3) dd {
  color: var(--relay-green);
}

.shift-vitals div:nth-child(5) dd {
  color: var(--relay-amber);
}

.shift-vitals div.is-forfeited {
  border-color: rgba(255, 115, 135, 0.3);
  background: rgba(255, 115, 135, 0.055);
}

.shift-vitals div.is-forfeited dt,
.shift-vitals div.is-forfeited dd {
  color: var(--relay-noise);
}

.shift-outcome {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 1.35rem;
  margin: 0 0 0.42rem;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
}

.shift-outcome b {
  flex: 0 0 auto;
  color: var(--relay-cyan);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shift-outcome.is-success,
.shift-outcome.is-success b {
  color: var(--relay-green);
}

.shift-outcome.is-failure,
.shift-outcome.is-failure b {
  color: var(--relay-noise);
}

.shift-decision {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(12rem, 1.25fr) minmax(0, 2fr);
  gap: 0.75rem;
  margin-bottom: 0.58rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(78, 232, 255, 0.2);
  border-radius: 5px;
  background: rgba(3, 10, 14, 0.78);
}

.shift-decision-heading {
  display: grid;
  align-content: center;
  gap: 0.22rem;
  padding-right: 0.7rem;
  border-right: 1px solid rgba(151, 214, 222, 0.12);
}

#relay-status-pill {
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shift-decision .relay-status {
  min-height: 0;
  margin: 0;
  color: var(--relay-ink);
  font-size: 0.72rem;
  line-height: 1.42;
}

.shift-decision-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
}

.shift-decision-facts div {
  min-width: 0;
  padding: 0.34rem 0.42rem;
  border: 1px solid rgba(151, 214, 222, 0.09);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
}

.shift-decision-facts dt,
.shift-decision-facts dd {
  margin: 0;
}

.shift-decision-facts dt {
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shift-decision-facts div:nth-child(2) dt {
  color: var(--relay-amber);
}

.shift-decision-facts div:nth-child(3) dt {
  color: var(--relay-noise);
}

.shift-decision-facts dd {
  margin-top: 0.2rem;
  color: var(--text-soft);
  font-size: 0.64rem;
  line-height: 1.36;
}

.shift-decision-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(151, 214, 222, 0.1);
  color: rgba(174, 211, 218, 0.72);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  line-height: 1.4;
}

.shift-decision.is-first-command {
  border-color: rgba(78, 232, 255, 0.38);
  background: linear-gradient(100deg, rgba(78, 232, 255, 0.075), rgba(3, 10, 14, 0.82) 42%);
  box-shadow: inset 3px 0 0 rgba(78, 232, 255, 0.72);
}

.shift-decision.is-first-command .shift-decision-facts div:nth-child(2) dt {
  color: var(--relay-green);
}

.shift-decision.is-first-command .shift-decision-facts div:nth-child(3) dt {
  color: var(--relay-ink);
}

.shift-board {
  min-height: clamp(25rem, 40vw, 31rem);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}

.shift-board[data-phase="surge"] {
  border-color: rgba(255, 115, 135, 0.24);
  box-shadow: inset 0 0 90px rgba(255, 115, 135, 0.035), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.shift-board[data-phase="handoff"] {
  border-color: rgba(255, 196, 95, 0.28);
  box-shadow: inset 0 0 100px rgba(255, 196, 95, 0.045), inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.relay-node.is-restored .relay-node-core {
  border-color: var(--relay-green);
  color: var(--relay-green);
  background: rgba(28, 62, 23, 0.9);
  box-shadow: 0 0 0 6px rgba(168, 255, 120, 0.07), 0 0 30px rgba(168, 255, 120, 0.28);
}

.shift-briefing {
  position: absolute;
  inset: clamp(1rem, 5%, 2.6rem);
  z-index: 14;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(1.1rem, 4vw, 2.4rem);
  overflow: auto;
  border: 1px solid rgba(78, 232, 255, 0.3);
  border-radius: 7px;
  background:
    radial-gradient(circle at 85% 15%, rgba(78, 232, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(7, 25, 31, 0.98), rgba(2, 8, 12, 0.985));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.76), inset 0 0 70px rgba(78, 232, 255, 0.035);
}

.shift-briefing[hidden] {
  display: none;
}

.shift-briefing h2 {
  max-width: 17ch;
  margin: 0.35rem 0 0.48rem;
  color: var(--relay-ink);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.shift-briefing > p {
  max-width: 49rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.52;
}

.shift-briefing-rules {
  display: grid;
  gap: 0.36rem;
  margin: 0.85rem 0;
  padding: 0;
  list-style: none;
}

.shift-briefing-rules li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.shift-briefing-rules li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--relay-cyan);
}

.shift-briefing-rules b {
  color: var(--relay-ink);
}

.shift-briefing blockquote {
  max-width: 42rem;
  margin: 0 0 0.95rem;
  padding: 0.58rem 0.72rem;
  border-left: 2px solid var(--relay-cyan);
  background: rgba(78, 232, 255, 0.055);
}

.shift-briefing blockquote b {
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.shift-briefing blockquote p {
  margin: 0.24rem 0 0;
  color: var(--relay-ink);
  font-size: 0.8rem;
}

.shift-actions {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(11rem, auto) auto;
  align-items: stretch;
  margin: 0 0 0.42rem;
}

.shift-actions > .button {
  width: 100%;
}

.shift-actions #hold-button.is-command-stage {
  border-color: var(--relay-green);
  color: #071014;
  background: var(--relay-green);
  box-shadow: 0 0 0 3px rgba(168, 255, 120, 0.08), 0 0 24px rgba(168, 255, 120, 0.34);
  opacity: 1;
}

.shift-utilities {
  display: flex;
  gap: 0.42rem;
  margin-left: auto;
}

.shift-utilities .button {
  min-height: 2.65rem;
  padding-inline: 0.68rem;
  color: var(--text-muted);
  background: transparent;
}

.shift-board-help {
  align-items: center;
  margin: 0 0 0.58rem;
}

.shift-command-legend {
  display: grid;
  grid-template-columns: auto auto minmax(12rem, 1fr);
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}

.shift-command-legend span,
.shift-command-legend strong {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 0.38rem 0.5rem;
  border: 1px solid rgba(151, 214, 222, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
}

.shift-command-legend b {
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shift-command-legend span:nth-child(2) b {
  color: var(--relay-green);
}

.shift-command-legend small {
  margin-top: 0.1rem;
  color: var(--text-soft);
  font-size: 0.61rem;
  line-height: 1.25;
}

.shift-command-legend strong {
  border-color: rgba(255, 196, 95, 0.16);
  color: var(--relay-amber);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1.35;
}

.shift-traffic-manifest {
  margin: 0.78rem 0 0;
}

.shift-traffic-manifest li {
  min-height: 3.8rem;
}

.shift-traffic-manifest .traffic-card-top span {
  font-size: 0.65rem;
}

.shift-traffic-manifest .traffic-card-top b,
.shift-traffic-manifest .traffic-card-route,
.shift-traffic-manifest .traffic-card-state {
  font-size: 0.57rem;
}

@keyframes relay-story-scan {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  32% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@media (max-width: 780px) {
  .relay-stage-header {
    display: grid;
  }

  .shift-story-progress {
    width: 100%;
  }

  .shift-story-progress li {
    flex: 1 1 0;
    min-width: 0;
  }

  .shift-transmission {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .shift-vitals {
    grid-template-columns: repeat(5, minmax(4.5rem, 1fr));
    overflow-x: auto;
  }

  .shift-decision {
    grid-template-columns: 1fr;
  }

  .shift-decision-heading {
    padding: 0 0 0.5rem;
    border-right: 0;
    border-bottom: 1px solid rgba(151, 214, 222, 0.12);
  }

  .shift-command-legend {
    grid-template-columns: 1fr 1fr;
  }

  .shift-command-legend strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .relay-stage-header,
  .shift-transmission,
  .shift-vitals,
  .shift-outcome,
  .shift-decision {
    order: 0;
  }

  .shift-vitals {
    position: sticky;
    top: 0.35rem;
    z-index: 24;
    margin-inline: -0.2rem;
    padding: 0.25rem;
    border: 1px solid rgba(78, 232, 255, 0.18);
    border-radius: 5px;
    background: rgba(3, 10, 14, 0.97);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
  }

  .shift-vitals div {
    padding: 0.38rem 0.42rem;
  }

  .shift-vitals dt {
    font-size: 0.49rem;
  }

  .shift-vitals dd {
    font-size: 0.72rem;
  }

  .shift-decision-facts {
    grid-template-columns: 1fr;
  }

  .relay-board {
    min-height: 29rem;
  }

  .relay-controls {
    top: 4.15rem;
    bottom: auto;
    grid-template-columns: 1fr;
  }

  .shift-utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 0;
  }

  .shift-board-help {
    order: 1;
  }

  .shift-traffic-manifest {
    order: 4;
  }

  .shift-briefing {
    inset: 0.55rem;
    align-content: start;
    padding: 1rem;
  }

  .shift-briefing h2 {
    font-size: 1.8rem;
  }

  .shift-briefing > p {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shift-transmission.is-new::after {
    animation: none;
  }
}

/* Focused command rail and reward feedback */
.relay-wire.is-bonus-armed {
  stroke: var(--relay-amber);
  stroke-width: 3.25;
  filter: drop-shadow(0 0 9px rgba(255, 196, 95, 0.72));
}

button.relay-node.is-first-locked:disabled {
  cursor: default;
  opacity: 0.42;
}

.relay-beat-track span.is-clean {
  border-color: rgba(168, 255, 120, 0.42);
  background: rgba(168, 255, 120, 0.55);
  box-shadow: 0 0 7px rgba(168, 255, 120, 0.24);
}

.shift-header-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
}

.shift-header-side .shift-utilities {
  display: flex;
  gap: 0.32rem;
  width: auto;
  margin: 0;
}

.shift-header-side .shift-utilities .button {
  min-height: 1.85rem;
  width: auto;
  padding: 0.32rem 0.55rem;
  border-color: rgba(151, 214, 222, 0.1);
  font-size: 0.62rem;
}

.relay-stage-panel.is-briefing #reset-button {
  visibility: hidden;
}

.relay-stage-panel.is-result .shift-header-side .shift-utilities {
  visibility: hidden;
}

.shift-transmission {
  grid-template-columns: minmax(8.2rem, auto) 1fr;
  min-height: 2.55rem;
  margin: 0.48rem 0;
  padding: 0.48rem 0.68rem;
}

.shift-transmission p {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-vitals {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shift-vitals dd {
  font-size: 0.82rem;
}

.shift-vitals div.is-rewarded,
.shift-manifest-bonus.is-rewarded {
  animation: shift-metric-reward 820ms ease-out;
}

.shift-vitals div.is-damaged {
  animation: shift-metric-damage 820ms ease-out;
}

.shift-outcome[hidden] {
  display: none;
}

.shift-outcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 0.75rem;
  min-height: 0;
  margin: 0 0 0.42rem;
  padding: 0.5rem 0.62rem;
  border: 1px solid rgba(151, 214, 222, 0.12);
  border-left: 3px solid rgba(78, 232, 255, 0.52);
  border-radius: 4px;
  background: rgba(3, 10, 14, 0.7);
}

.shift-outcome.is-new {
  animation: shift-receipt-in 260ms ease-out;
}

.shift-outcome > span:not(.shift-outcome-chips) {
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.66rem;
  line-height: 1.35;
}

.shift-outcome.is-success {
  border-color: rgba(168, 255, 120, 0.22);
  border-left-color: var(--relay-green);
  background: linear-gradient(90deg, rgba(168, 255, 120, 0.07), rgba(3, 10, 14, 0.72) 40%);
}

.shift-outcome.is-failure {
  border-color: rgba(255, 115, 135, 0.24);
  border-left-color: var(--relay-noise);
  background: linear-gradient(90deg, rgba(255, 115, 135, 0.07), rgba(3, 10, 14, 0.72) 40%);
}

.shift-outcome-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.shift-outcome-chip {
  padding: 0.24rem 0.38rem;
  border: 1px solid rgba(151, 214, 222, 0.13);
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.shift-outcome-chip.is-reward {
  border-color: rgba(168, 255, 120, 0.28);
  color: var(--relay-green);
  background: rgba(168, 255, 120, 0.055);
}

.shift-outcome-chip.is-bonus {
  border-color: rgba(255, 196, 95, 0.3);
  color: var(--relay-amber);
  background: rgba(255, 196, 95, 0.055);
}

.shift-outcome-chip.is-warning {
  border-color: rgba(255, 115, 135, 0.3);
  color: var(--relay-noise);
  background: rgba(255, 115, 135, 0.055);
}

.shift-decision {
  grid-template-columns: minmax(13rem, 0.9fr) minmax(0, 2fr);
  gap: 0;
  margin-bottom: 0.42rem;
  padding: 0;
  overflow: hidden;
  border-color: rgba(78, 232, 255, 0.26);
  background: rgba(3, 10, 14, 0.84);
}

.shift-decision-heading {
  gap: 0.3rem;
  padding: 0.68rem 0.78rem;
  border-right-color: rgba(78, 232, 255, 0.16);
  background: linear-gradient(100deg, rgba(78, 232, 255, 0.08), transparent);
}

.shift-decision .relay-status {
  color: var(--relay-ink);
  font-size: 0.78rem;
  font-weight: 650;
}

.shift-decision-copy {
  display: grid;
  align-content: center;
  gap: 0.22rem;
  min-width: 0;
  padding: 0.62rem 0.78rem;
}

.shift-decision-copy p {
  margin: 0;
}

.shift-decision-action {
  color: var(--relay-ink);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
}

.shift-decision-detail {
  color: var(--text-soft);
  font-size: 0.64rem;
  line-height: 1.38;
}

.shift-decision.is-first-command {
  background: rgba(3, 10, 14, 0.84);
  box-shadow: inset 3px 0 0 var(--relay-cyan), 0 0 24px rgba(78, 232, 255, 0.06);
}

.shift-actions {
  grid-template-columns: minmax(14rem, 22rem) auto;
  gap: 0.42rem;
  margin-bottom: 0.32rem;
}

.shift-board-help {
  display: block;
  margin: 0 0 0.42rem;
}

.shift-command-help-disclosure {
  width: fit-content;
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
}

.shift-command-help-disclosure summary {
  width: fit-content;
  cursor: pointer;
  color: rgba(174, 211, 218, 0.62);
  user-select: none;
}

.shift-command-help-disclosure[open] {
  width: 100%;
  padding: 0.38rem 0.48rem;
  border: 1px solid rgba(151, 214, 222, 0.1);
  border-radius: 4px;
  background: rgba(3, 10, 14, 0.52);
}

.shift-command-help-disclosure p {
  display: inline;
  margin: 0 0.6rem 0 0.4rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.shift-command-help-disclosure p b {
  color: var(--relay-cyan);
}

.shift-command-help-disclosure .shift-key-hint {
  font-size: 0.56rem;
}

.shift-reward-burst[hidden] {
  display: none;
}

.shift-reward-burst {
  position: absolute;
  top: 22%;
  left: 50%;
  z-index: 11;
  display: grid;
  justify-items: center;
  min-width: 11rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(168, 255, 120, 0.34);
  border-radius: 6px;
  color: var(--relay-green);
  background: rgba(4, 18, 17, 0.94);
  box-shadow: 0 0 50px rgba(168, 255, 120, 0.18), 0 16px 45px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translate(-50%, 0.6rem) scale(0.92);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.shift-reward-burst.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.shift-reward-burst.is-bonus {
  border-color: rgba(255, 196, 95, 0.4);
  color: var(--relay-amber);
  background: rgba(24, 18, 5, 0.95);
  box-shadow: 0 0 50px rgba(255, 196, 95, 0.18), 0 16px 45px rgba(0, 0, 0, 0.48);
}

.shift-reward-burst strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.shift-reward-burst span {
  margin-top: 0.16rem;
  color: var(--relay-ink);
  font-size: 0.66rem;
}

.shift-traffic-manifest {
  margin-top: 0.58rem;
  padding: 0;
}

.shift-traffic-manifest > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.58rem 0.68rem;
  cursor: pointer;
  list-style: none;
}

.shift-traffic-manifest > summary::-webkit-details-marker {
  display: none;
}

.shift-traffic-manifest > summary::before {
  content: "+";
  flex: 0 0 auto;
  color: var(--relay-cyan);
  font-family: "IBM Plex Mono", monospace;
}

.shift-traffic-manifest[open] > summary::before {
  content: "−";
}

.shift-traffic-manifest > summary > span:first-of-type {
  display: grid;
  margin-right: auto;
}

.shift-traffic-manifest > summary b {
  color: var(--relay-ink);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.shift-traffic-manifest > summary small {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.54rem;
}

.shift-manifest-bonus {
  display: grid;
  justify-items: end;
  padding: 0.28rem 0.42rem;
  border: 1px solid rgba(255, 196, 95, 0.13);
  border-radius: 4px;
  color: var(--relay-amber);
  background: rgba(255, 196, 95, 0.035);
}

.shift-manifest-bonus strong {
  margin-top: 0.08rem;
  color: var(--relay-amber);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
}

.shift-manifest-bonus.is-forfeited,
.shift-manifest-bonus.is-forfeited strong {
  border-color: rgba(255, 115, 135, 0.22);
  color: var(--relay-noise);
}

.shift-traffic-manifest[open] > summary {
  border-bottom: 1px solid rgba(151, 214, 222, 0.1);
}

.shift-traffic-manifest ol {
  margin: 0.58rem;
}

@keyframes shift-receipt-in {
  from {
    opacity: 0;
    transform: translateY(-0.2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shift-metric-reward {
  0%, 100% {
    border-color: rgba(151, 214, 222, 0.12);
    box-shadow: none;
  }
  28% {
    border-color: var(--relay-green);
    background: rgba(168, 255, 120, 0.11);
    box-shadow: 0 0 24px rgba(168, 255, 120, 0.22);
  }
}

@keyframes shift-metric-damage {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    border-color: var(--relay-noise);
    background: rgba(255, 115, 135, 0.1);
    transform: translateX(-0.18rem);
  }
  50% {
    transform: translateX(0.16rem);
  }
  75% {
    transform: translateX(-0.08rem);
  }
}

@media (max-width: 780px) {
  .shift-header-side {
    width: 100%;
    justify-content: space-between;
  }

  .shift-header-side .shift-story-progress {
    flex: 1 1 auto;
    width: auto;
  }

  .shift-header-side .shift-utilities {
    justify-content: flex-end;
  }

  .shift-outcome {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .shift-outcome-chips {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .shift-decision {
    grid-template-columns: 1fr;
  }

  .shift-decision-heading {
    border-right: 0;
    border-bottom: 1px solid rgba(78, 232, 255, 0.14);
  }
}

@media (max-width: 560px) {
  .shift-header-side .shift-utilities {
    display: flex;
    width: auto;
  }

  .shift-transmission p {
    white-space: normal;
  }

  .shift-vitals {
    grid-template-columns: repeat(4, minmax(4.5rem, 1fr));
  }

  .shift-actions {
    grid-template-columns: 1fr;
  }

  .shift-command-help-disclosure[open] {
    width: auto;
  }

  .shift-command-help-disclosure p {
    display: block;
    margin: 0.35rem 0 0;
  }

  .shift-traffic-manifest > summary {
    align-items: flex-start;
  }

  .shift-traffic-manifest > summary > span:first-of-type small {
    display: none;
  }

  .shift-manifest-bonus {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shift-outcome.is-new,
  .shift-vitals div.is-rewarded,
  .shift-vitals div.is-damaged,
  .shift-manifest-bonus.is-rewarded {
    animation: none;
  }

  .shift-reward-burst,
  .shift-reward-burst.is-visible {
    transition: none;
  }
}

/* Clear danger states for consequential commands */
.relay-node.is-danger-node .relay-node-core {
  border-color: var(--relay-noise);
  color: var(--relay-noise);
  background: rgba(44, 8, 15, 0.96);
  box-shadow: 0 0 0 7px rgba(255, 115, 135, 0.1), 0 0 34px rgba(255, 115, 135, 0.55);
  animation: relay-decision-pulse 620ms ease-in-out infinite alternate;
}

.shift-decision.is-danger {
  border-color: rgba(255, 115, 135, 0.34);
  box-shadow: inset 3px 0 0 var(--relay-noise);
}

.shift-decision.is-danger .shift-decision-heading {
  background: linear-gradient(100deg, rgba(255, 115, 135, 0.1), transparent);
}

.shift-actions #hold-button.is-dangerous {
  border-color: rgba(255, 115, 135, 0.58);
  color: var(--relay-noise);
  background: rgba(255, 115, 135, 0.07);
  box-shadow: none;
}

.shift-actions #hold-button.is-dangerous:hover,
.shift-actions #hold-button.is-dangerous:focus-visible {
  border-color: var(--relay-noise);
  color: #ffd9de;
  background: rgba(255, 115, 135, 0.13);
  box-shadow: 0 0 0 3px rgba(255, 115, 135, 0.08);
}

.shift-reward-burst.is-damage {
  border-color: rgba(255, 115, 135, 0.42);
  color: var(--relay-noise);
  background: rgba(40, 8, 14, 0.96);
  box-shadow: 0 0 50px rgba(255, 115, 135, 0.2), 0 16px 45px rgba(0, 0, 0, 0.48);
}

@media (prefers-reduced-motion: reduce) {
  .relay-node.is-danger-node .relay-node-core {
    animation: none;
  }
}
