:root {
  --bg: #120a05;
  --bg2: #25160b;
  --panel: rgba(43, 27, 14, 0.9);
  --panel2: rgba(69, 43, 22, 0.82);
  --metal: #7a512d;
  --rust: #9d4d22;
  --sand: #d7b176;
  --bone: #f0d7a3;
  --ochre: #b77735;
  --orange: #ff8a32;
  --amber: #ffd166;
  --cyan: #ffb347;
  --magenta: #ff5b38;
  --green: #96d65b;
  --red: #ff4d3d;
  --text: #f1d7a3;
  --muted: #a98a5b;
  --border: rgba(255, 179, 71, 0.35);
  --grid: rgba(255, 179, 71, 0.08);
  --ring: rgba(255, 138, 50, 0.32);
  --fill: rgba(255, 179, 71, 0.16);
  --mono: "Share Tech Mono", "JetBrains Mono", "Courier New", monospace;
  --hud: "Orbitron", "Eurostile", Impact, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 112%, rgba(255, 138, 50, 0.2), transparent 32%),
    radial-gradient(circle at 18% 8%, rgba(255, 179, 71, 0.08), transparent 28%),
    linear-gradient(180deg, #2b190b 0%, #160d06 48%, #090604 100%);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

.pluk-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 18%, rgba(255, 138, 50, 0.18) 0 8%, transparent 24%),
    radial-gradient(ellipse at 22% 72%, rgba(255, 209, 102, 0.08) 0 12%, transparent 32%),
    linear-gradient(90deg, rgba(91, 52, 22, 0.18), transparent 32%, rgba(255, 138, 50, 0.1) 70%, transparent);
}

.pluk-sky::before,
.pluk-sky::after {
  content: "";
  position: absolute;
  inset: auto -10% -18% -10%;
  height: 42vh;
  background:
    radial-gradient(ellipse at 18% 80%, rgba(101, 58, 25, 0.9) 0 18%, transparent 19%),
    radial-gradient(ellipse at 48% 100%, rgba(125, 73, 32, 0.88) 0 22%, transparent 23%),
    radial-gradient(ellipse at 76% 82%, rgba(88, 49, 22, 0.92) 0 19%, transparent 20%);
  filter: blur(1px);
  opacity: 0.55;
}

.pluk-sky::after {
  inset: auto -20% -22% -20%;
  height: 28vh;
  opacity: 0.35;
  transform: rotate(1deg);
}

.crt {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.25) 68%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(90deg, rgba(255, 120, 40, 0.08), transparent 18% 82%, rgba(255, 120, 40, 0.08));
}

.crt-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
  mix-blend-mode: overlay;
  animation: scanMove 8s linear infinite;
}

.crt-noise {
  position: absolute;
  inset: -50%;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 209, 102, 0.8) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 60%, rgba(255, 91, 56, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 179, 71, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 60% 10%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 13px 13px, 17px 17px;
  animation: noiseShift 0.55s steps(2) infinite;
}

.crt-burn {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 138, 50, 0.08), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(160, 80, 28, 0.1), transparent 35%);
  filter: contrast(1.15);
}

@keyframes scanMove {
  from { transform: translateY(-18px); }
  to { transform: translateY(18px); }
}

@keyframes noiseShift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-2%, 1%, 0); }
  100% { transform: translate3d(1%, -2%, 0); }
}

.hud {
  position: relative;
  z-index: 2;
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.debug {
  position: fixed;
  left: 0.7rem;
  bottom: 0.65rem;
  z-index: 80;
  max-width: min(760px, calc(100vw - 1.4rem));
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 179, 71, 0.18);
  background: rgba(16, 9, 4, 0.78);
  color: rgba(240, 215, 163, 0.55);
  font-size: 0.68rem;
  letter-spacing: 1px;
  pointer-events: none;
}

.hud-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.panel,
.block {
  position: relative;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(74, 47, 24, 0.94), rgba(28, 17, 9, 0.94));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 18px 45px rgba(0, 0, 0, 0.35),
    inset 0 0 28px rgba(255, 138, 50, 0.055),
    inset 0 0 0 1px rgba(255, 209, 102, 0.06);
  backdrop-filter: blur(5px);
}

.panel::before,
.block::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 179, 71, 0.13);
  pointer-events: none;
  clip-path: polygon(0 12px, 12px 12px, 12px 0, calc(100% - 12px) 0, calc(100% - 12px) 12px, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 12px calc(100% - 12px), 0 calc(100% - 12px));
}

.panel::after,
.block::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18% 82%, rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 209, 102, 0.035) 18px 19px);
  opacity: 0.6;
  mix-blend-mode: screen;
}

.panel {
  padding: 0.75rem 0.9rem;
  min-height: 86px;
}

.p-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 138, 50, 0.45);
}

.alien {
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255, 138, 50, 0.75);
}

.lamp-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.2rem;
}

.lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(240, 215, 163, 0.25);
  box-shadow: 0 0 8px rgba(240, 215, 163, 0.18);
}

.lamp.red {
  background: rgba(255, 77, 61, 0.75);
  box-shadow: 0 0 12px rgba(255, 77, 61, 0.55);
  animation: lampBlink 0.65s infinite alternate;
}

.lamp.red.on {
  background: #ff5b38;
  box-shadow: 0 0 18px rgba(255, 91, 56, 0.95);
}

.lamp.amber {
  background: #ffb347;
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.8);
}

.lamp.bone {
  background: #f0d7a3;
  box-shadow: 0 0 12px rgba(240, 215, 163, 0.55);
}

.antenna {
  position: absolute;
  right: 0.85rem;
  bottom: 0.55rem;
  display: flex;
  gap: 0.22rem;
  align-items: end;
  height: 28px;
  opacity: 0.8;
}

.antenna span {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--amber), var(--rust));
  box-shadow: 0 0 10px rgba(255, 138, 50, 0.45);
  animation: antennaPulse 1.2s infinite ease-in-out;
}

.antenna span:nth-child(1) { height: 38%; animation-delay: 0s; }
.antenna span:nth-child(2) { height: 68%; animation-delay: 0.16s; }
.antenna span:nth-child(3) { height: 52%; animation-delay: 0.32s; }

.info-lines {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 1.1px;
  line-height: 1.65;
}

.info-lines span {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.65);
}

.info-lines .ok {
  color: var(--green);
  text-shadow: 0 0 10px rgba(150, 214, 91, 0.75);
}

.info-lines .err {
  color: var(--red);
  text-shadow: 0 0 10px rgba(255, 77, 61, 0.75);
}

.mono {
  font-size: 0.88rem;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(255, 179, 71, 0.6);
}

.date {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 2px;
}

.hud-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  flex: 1;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.block {
  padding: 0.9rem 1rem;
}

.bk {
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 138, 50, 0.45);
}

.v-lg {
  font-family: var(--hud);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow:
    0 0 22px rgba(255, 179, 71, 0.7),
    0 0 54px rgba(255, 91, 56, 0.28);
  animation: hudGlow 1.25s infinite alternate;
}

.stat-block .v-lg {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
}

.v-lg.warn {
  color: var(--amber);
  text-shadow:
    0 0 22px rgba(255, 209, 102, 0.65),
    0 0 54px rgba(255, 138, 50, 0.25);
}

.v-lg.magenta {
  color: var(--magenta);
  text-shadow:
    0 0 22px rgba(255, 91, 56, 0.7),
    0 0 54px rgba(255, 138, 50, 0.25);
}

.micro-label {
  margin-top: 0.35rem;
  color: rgba(240, 215, 163, 0.52);
  font-size: 0.62rem;
  letter-spacing: 1.2px;
}

.mono-sm {
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.5);
}

.mono-xs {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 1px;
}

.glyph-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.glyph-grid span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 179, 71, 0.18);
  background: rgba(13, 8, 4, 0.45);
  color: var(--amber);
  font-size: 0.85rem;
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.6);
  box-shadow: inset 0 0 12px rgba(255, 138, 50, 0.06);
}

.center-a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
}

.viewport {
  position: relative;
  width: min(520px, 92vw);
  height: min(520px, 92vw);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 179, 71, 0.38);
  background:
    radial-gradient(circle at center, rgba(255, 179, 71, 0.09) 0 5%, transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(255, 91, 56, 0.1), transparent 64%),
    radial-gradient(circle at center, rgba(10, 6, 3, 0.92), rgba(37, 22, 11, 0.9) 72%, rgba(10, 6, 3, 0.95) 100%);
  box-shadow:
    0 0 0 8px rgba(255, 179, 71, 0.055),
    0 0 0 12px rgba(0, 0, 0, 0.55),
    0 0 55px rgba(255, 138, 50, 0.18),
    inset 0 0 60px rgba(255, 138, 50, 0.1),
    inset 0 0 110px rgba(0, 0, 0, 0.8);
}

.viewport::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 4;
  border-radius: 50%;
  border: 1px dashed rgba(255, 209, 102, 0.2);
  animation: slowSpin 32s linear infinite;
}

.viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255, 209, 102, 0.08) 40%, transparent 43%),
    repeating-linear-gradient(105deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 23px);
  opacity: 0.36;
  mix-blend-mode: screen;
}

.viewport-frame {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 54px;
  height: 54px;
  border-color: rgba(255, 209, 102, 0.72);
  filter: drop-shadow(0 0 8px rgba(255, 138, 50, 0.55));
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--amber);
}

.corner.c1 {
  top: 12px;
  left: 12px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner.c2 {
  top: 12px;
  right: 12px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.corner.c3 {
  bottom: 12px;
  left: 12px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.corner.c4 {
  right: 12px;
  bottom: 12px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.radar {
  position: absolute;
  inset: 8%;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 28%, rgba(255, 179, 71, 0.08) 29% 30%, transparent 31% 52%, rgba(255, 179, 71, 0.08) 53% 54%, transparent 55% 76%, rgba(255, 179, 71, 0.08) 77% 78%, transparent 79%),
    repeating-conic-gradient(from 0deg, rgba(255, 179, 71, 0.1) 0deg 1deg, transparent 1deg 15deg);
  opacity: 0.85;
}

.radar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255, 209, 102, 0.18) 50%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, rgba(255, 209, 102, 0.18) 50%, transparent 50.4%);
}

.radar-sweep {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 138, 50, 0.48), rgba(255, 209, 102, 0.16) 18deg, transparent 82deg);
  mix-blend-mode: screen;
  animation: slowSpin 4.2s linear infinite;
}

.radar-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 179, 71, 0.18);
}

.radar-ring.r2 { inset: 24%; }
.radar-ring.r3 { inset: 36%; }

.radar-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.85);
  animation: lampBlink 1.1s infinite alternate;
}

.radar-dot.d1 { left: 62%; top: 28%; }
.radar-dot.d2 { left: 36%; top: 58%; animation-delay: 0.35s; }
.radar-dot.d3 { left: 72%; top: 68%; animation-delay: 0.7s; }

.reticle {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255, 138, 50, 0.35));
}

.tunnel {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

.reticle-data {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}

.r-label {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.45);
}

.r-big {
  font-family: var(--hud);
  font-size: clamp(3.8rem, 10vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow:
    0 0 34px rgba(255, 179, 71, 0.9),
    0 0 82px rgba(255, 91, 56, 0.45),
    0 0 130px rgba(255, 138, 50, 0.25);
  animation: hudGlow 1.15s infinite alternate;
}

.r-big.magenta {
  color: var(--magenta);
  text-shadow:
    0 0 34px rgba(255, 91, 56, 0.85),
    0 0 82px rgba(255, 138, 50, 0.4),
    0 0 130px rgba(255, 91, 56, 0.2);
}

.r-unit {
  margin-top: 0.4rem;
  color: var(--cyan);
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-shadow: 0 0 16px rgba(255, 179, 71, 0.65);
}

.r-sub {
  min-height: 1.05em;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 2px;
}

.bytes-hide {
  visibility: hidden;
}

.wave-panel {
  width: min(680px, 96vw);
  padding: 0.55rem;
  border: 1px solid rgba(255, 179, 71, 0.28);
  background:
    linear-gradient(180deg, rgba(18, 11, 5, 0.82), rgba(43, 27, 14, 0.86)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 5px);
  box-shadow:
    0 0 35px rgba(255, 138, 50, 0.12),
    inset 0 0 24px rgba(255, 138, 50, 0.06);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.wave-panel.wave-live {
  border-color: rgba(255, 179, 71, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 138, 50, 0.12), rgba(43, 27, 14, 0.9)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 5px);
  box-shadow:
    0 0 55px rgba(255, 138, 50, 0.28),
    inset 0 0 30px rgba(255, 138, 50, 0.12);
}

.wave-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.wave-code {
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.55);
}

#wave {
  display: block;
  width: 100%;
  height: 80px;
}

.wave-inf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 2px;
}

.live {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: lampBlink 0.55s infinite alternate;
}

.run-btn {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 58px;
  padding: 0.85rem 2rem;
  border: 1px solid rgba(255, 179, 71, 0.7);
  border-radius: 0;
  appearance: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  background:
    linear-gradient(180deg, rgba(255, 179, 71, 0.16), rgba(145, 72, 27, 0.42)),
    repeating-linear-gradient(90deg, rgba(255, 209, 102, 0.08) 0 8px, transparent 8px 18px);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(255, 179, 71, 0.8);
  box-shadow:
    0 0 34px rgba(255, 138, 50, 0.28),
    inset 0 0 24px rgba(255, 209, 102, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.run-btn::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 209, 102, 0.18);
  pointer-events: none;
}

.run-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  background:
    linear-gradient(180deg, rgba(255, 209, 102, 0.24), rgba(145, 72, 27, 0.5)),
    repeating-linear-gradient(90deg, rgba(255, 209, 102, 0.12) 0 8px, transparent 8px 18px);
  box-shadow:
    0 0 60px rgba(255, 138, 50, 0.5),
    inset 0 0 34px rgba(255, 209, 102, 0.18),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.run-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.35);
}

.run-core {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 209, 102, 0.75);
  background: rgba(0, 0, 0, 0.28);
  color: var(--orange);
  font-family: var(--hud);
  font-size: 1rem;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(255, 138, 50, 0.95);
  box-shadow: inset 0 0 14px rgba(255, 138, 50, 0.18);
}

.bar-item {
  display: grid;
  grid-template-columns: 34px 1fr 22px;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 2px;
}

.bar {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 71, 0.16);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65);
}

.fill {
  width: 0%;
  height: 100%;
  transition: width 0.25s;
}

.fill.cyan {
  background: linear-gradient(90deg, var(--ochre), var(--amber));
  box-shadow: 0 0 14px rgba(255, 179, 71, 0.65);
}

.fill.magenta {
  background: linear-gradient(90deg, var(--rust), var(--magenta));
  box-shadow: 0 0 14px rgba(255, 91, 56, 0.65);
}

.bar-code {
  color: var(--amber);
  font-weight: 400;
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.55);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(255, 179, 71, 0.12);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 1px;
}

.kv strong {
  max-width: 58%;
  overflow: hidden;
  color: var(--cyan);
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.55);
  white-space: nowrap;
}

.gauge-block .bk {
  text-align: center;
}

.gauge-row {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
}

.circular-gauge {
  position: relative;
  width: 104px;
  height: 104px;
  align-self: center;
}

.circular-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 10px rgba(255, 138, 50, 0.35));
}

.circular-gauge::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 179, 71, 0.18);
}

.gauge-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-family: var(--hud);
  font-size: 1.15rem;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(255, 179, 71, 0.65);
}

.gauge-lbl {
  margin-top: -0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-align: center;
}

.sensor-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.sensor-grid span {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 179, 71, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.55);
}

.sensor-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.36rem 0;
  border-bottom: 1px solid rgba(255, 179, 71, 0.1);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 1.2px;
}

.sensor-row strong {
  color: var(--amber);
  text-shadow: 0 0 8px rgba(255, 179, 71, 0.55);
}

@keyframes lampBlink {
  from { opacity: 0.28; }
  to { opacity: 1; }
}

@keyframes antennaPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.78); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hudGlow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(5deg); }
}

::selection {
  background: rgba(255, 179, 71, 0.35);
  color: var(--bone);
}

::-webkit-scrollbar {
  width: 5px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 179, 71, 0.5);
  border-radius: 3px;
}

@media (min-width: 860px) {
  .hud-top {
    grid-template-columns: 220px 1fr 260px;
  }

  .panel {
    min-height: 92px;
  }
}

@media (min-width: 1020px) {
  .hud-main {
    grid-template-columns: 210px 1fr 260px;
  }

  .left-a {
    grid-column: 1;
  }

  .center-a {
    grid-column: 2;
  }

  .right-a {
    grid-column: 3;
  }
}

@media (max-width: 1019px) {
  .hud {
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .left-a,
  .right-a {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .right-a .sys-block,
  .right-a .nav-block,
  .right-a .gauge-block,
  .right-a .sensor-block {
    grid-column: 1 / -1;
  }

  .center-a {
    order: 1;
  }

  .left-a {
    order: 2;
  }

  .right-a {
    order: 3;
  }

  .viewport {
    width: min(470px, 88vw);
    height: min(470px, 88vw);
  }

  .block,
  .panel {
    padding: 0.7rem 0.8rem;
  }
}

@media (max-width: 680px) {
  .hud {
    padding: 0.6rem;
  }

  .hud-top {
    gap: 0.35rem;
  }

  .panel {
    min-height: 64px;
    padding: 0.55rem 0.65rem;
  }

  .info-lines {
    font-size: 0.64rem;
    line-height: 1.35;
  }

  .hud-main {
    gap: 0.55rem;
  }

  .left-a,
  .right-a {
    grid-template-columns: 1fr;
  }

  .center-a {
    gap: 0.55rem;
  }

  .viewport {
    margin-top: 5%;
    margin-bottom: 5%;
    width: min(290px, 82vw);
    height: min(290px, 82vw);
  }

  .radar {
    inset: 0;
    opacity: 0.55;
  }

  .radar-ring {
    inset: 14%;
  }

  .radar-ring.r2 { inset: 28%; }
  .radar-ring.r3 { inset: 42%; }

  .radar-dot {
    width: 4px;
    height: 4px;
  }

  .r-big {
    font-size: clamp(2.5rem, 15vw, 3.8rem);
  }

  .r-unit {
    margin-top: 0.25rem;
  }

  .r-sub {
    margin-top: 0.35rem;
  }

  .glyph-grid,
  .sensor-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wave-panel {
    padding: 0.4rem;
  }

  .wave-head {
    font-size: 0.56rem;
    margin-bottom: 0.2rem;
  }

  #wave {
    height: 56px;
  }

  .wave-inf {
    margin-top: 0.15rem;
    font-size: 0.64rem;
  }

  .run-btn {
    min-height: 50px;
    width: min(420px, 94vw);
    font-size: 0.9rem;
    padding: 0.65rem 1.2rem;
  }
}

@media (max-width: 430px) {
  .p-head {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
  }

  .r-label {
    letter-spacing: 2px;
  }

  .r-unit {
    letter-spacing: 2px;
  }

  .run-btn {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
