.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hud__title {
  position: absolute;
  top: 24px;
  left: 24px;
  letter-spacing: 0.08em;
  font-weight: 650;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--ui-text-strong);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.hud__hint {
  position: absolute;
  bottom: 22px;
  left: 24px;
  font-size: 12px;
  color: var(--ui-text-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.hud__meta {
  position: absolute;
  bottom: 40px;
  left: 24px;
  font-size: 12px;
  color: var(--ui-text-subtle);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
  white-space: pre-wrap;
}

:root[data-theme='light'] .hud__title,
:root[data-theme='light'] .hud__hint {
  text-shadow: none;
}

@media (max-width: 600px) {
  .hud__title,
  .hud__hint {
    left: 16px;
  }

  .hud__title {
    /* Avoid overlapping the fixed nav on small screens */
    top: 72px;
  }

  .hud__hint {
    bottom: 16px;
  }

  .hud__meta {
    left: 16px;
    bottom: 34px;
  }
}

.cd-hud {
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;

  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--ui-border);
  background: color-mix(in srgb, var(--scene-bg-0) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cd-hud__event {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  font-size: 12px;
  color: var(--ui-text-strong);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.cd-hud__grid {
  display: grid;
  grid-auto-flow: column;
  gap: 18px;
  align-items: end;
}

.cd-hud__cell {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 72px;
}

.cd-hud__value {
  font-size: clamp(28px, 7vw, 76px);
  font-weight: 650;
  color: var(--ui-text-strong);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

.cd-hud__label {
  font-size: 12px;
  color: var(--ui-text-muted);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

@media (max-width: 480px) {
  .cd-hud__grid {
    gap: 10px;
  }

  .cd-hud__cell {
    min-width: 56px;
  }
}

.cd-hud__message {
  font-size: clamp(18px, 4.5vw, 32px);
  font-weight: 650;
  color: var(--ui-text-strong);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

:root[data-theme='light'] .cd-hud__message,
:root[data-theme='light'] .cd-hud__event,
:root[data-theme='light'] .cd-hud__value,
:root[data-theme='light'] .cd-hud__label {
  text-shadow: none;
}
