.hud-screen {
  position: relative;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(53, 214, 255, 0.12), transparent 30%),
    linear-gradient(160deg, rgba(5, 8, 11, 0.98), rgba(12, 15, 20, 0.98));
}

.hud-screen:focus {
  transform: scale(0.995);
}

.hud-header,
.hud-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-header {
  min-height: 58px;
}

.hud-header h1 {
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.hud-clock {
  min-width: 112px;
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--accent-strong);
}

.hud-clock strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.hud-clock span,
.hud-footer span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
}

.hud-stage {
  min-height: 0;
  flex: 1;
  display: grid;
  gap: 9px;
}

.hud-footer {
  min-height: 24px;
}

.layout-glance {
  grid-template-columns: 1.08fr 0.92fr;
  grid-template-rows: 164px repeat(2, 82px);
}

.layout-metric {
  grid-template-columns: 190px 1fr;
  grid-template-rows: 1fr 1fr;
}

.layout-sensor {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 138px 96px 96px;
}

.layout-alert {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.layout-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 94px 94px 126px;
}

.hud-card {
  min-width: 0;
  min-height: 0;
  position: relative;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.058);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.hud-card.emphasis {
  grid-row: span 2;
  background: linear-gradient(150deg, rgba(53, 214, 255, 0.16), rgba(255, 255, 255, 0.055));
  border-color: rgba(112, 231, 255, 0.22);
}

.hud-card.wide {
  grid-column: 1 / -1;
}

.hud-card.tall {
  grid-row: span 2;
}

.hud-label {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.hud-value {
  display: block;
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.hud-value.hero {
  margin-top: 15px;
  font-size: 58px;
  letter-spacing: 0;
}

.hud-note {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hud-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.hud-chip {
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(112, 231, 255, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.hud-chip.good {
  background: rgba(74, 222, 128, 0.13);
  color: var(--success);
}

.hud-chip.warn {
  background: rgba(255, 209, 102, 0.13);
  color: var(--warm);
}

.meter-track {
  width: 100%;
  height: 10px;
  margin-top: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.ring {
  width: 158px;
  height: 158px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(8, 11, 15, 0.96) 52%, transparent 53%),
    conic-gradient(var(--accent-strong) var(--value), rgba(255, 255, 255, 0.08) 0);
}

.ring strong {
  color: var(--text-primary);
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.spark {
  height: 54px;
  display: flex;
  align-items: end;
  gap: 6px;
  margin-top: 13px;
}

.spark i {
  flex: 1;
  min-width: 0;
  border-radius: 999px 999px 3px 3px;
  background: rgba(112, 231, 255, 0.74);
}

.sensor-dot {
  width: 86px;
  height: 86px;
  margin: 12px auto 0;
  border-radius: 50%;
  border: 2px solid rgba(112, 231, 255, 0.45);
  position: relative;
}

.sensor-dot::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  left: calc(50% + var(--x) * 1px - 9px);
  top: calc(50% + var(--y) * 1px - 9px);
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 18px rgba(112, 231, 255, 0.5);
}

.alert-line {
  display: grid;
  grid-template-columns: 64px 1fr 84px;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 11px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  border-left: 5px solid var(--accent);
}

.alert-line strong {
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
}

.alert-line span {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.1;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.alert-line em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  text-align: right;
}

.alert-line.warn {
  border-left-color: var(--warm);
}

.alert-line.bad {
  border-left-color: var(--danger);
}

.control-button {
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segmented span {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
}

.segmented span.active {
  background: rgba(112, 231, 255, 0.16);
  color: var(--accent-strong);
}

.mini-log {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mini-log div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.23);
}

.mini-log span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

.mini-log strong {
  display: block;
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}
