.beacon-shell {
  position: relative;
  min-height: clamp(430px, 60vw, 700px);
  margin-top: 18px;
  border: 1px solid rgba(114, 213, 222, 0.34);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--beacon-x, 50%) var(--beacon-y, 40%), rgba(114, 213, 222, 0.2), transparent 28%),
    linear-gradient(180deg, #03070a 0%, #071319 52%, #050608 100%);
  touch-action: none;
}

.beacon-shell[hidden] {
  display: none;
}

.beacon-scene {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  user-select: none;
}

.beacon-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.beacon-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 9px),
    radial-gradient(ellipse at 50% 82%, rgba(255, 184, 77, 0.14), transparent 36%);
  mix-blend-mode: screen;
  opacity: 0.5;
}

.beacon-hud {
  position: absolute;
  inset: 16px 18px auto;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #d9fbff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
}

.beacon-stage {
  color: #72d5de;
}

.beacon-bearing {
  color: rgba(243, 240, 232, 0.66);
}

.beacon-signal {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 5vw, 42px);
  z-index: 2;
  width: min(92%, 880px);
  transform: translateX(-50%) scale(calc(0.98 + var(--beacon-breath, 0) * 0.05));
  color: rgba(255, 239, 190, 0.94);
  font-size: clamp(1.35rem, 6vw, 5.4rem);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    0 0 22px rgba(114, 213, 222, 0.34),
    0 0 42px rgba(255, 184, 77, 0.18);
  pointer-events: none;
}

.beacon-ticks {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(72vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.beacon-tick {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 18px;
  transform: translateX(-50%) rotate(var(--tick-angle)) translateY(0);
  transform-origin: 50% calc(min(72vw, 620px) / 2);
  background: rgba(114, 213, 222, 0.4);
  box-shadow: 0 0 18px rgba(114, 213, 222, 0.22);
}

.beacon-shell[data-beacon-stage="answer"] {
  border-color: rgba(255, 184, 77, 0.72);
  background:
    radial-gradient(circle at var(--beacon-x, 50%) var(--beacon-y, 40%), rgba(255, 184, 77, 0.2), transparent 30%),
    linear-gradient(180deg, #070604 0%, #10100b 56%, #050608 100%);
}

.beacon-shell[data-beacon-stage="storm"] {
  border-color: rgba(255, 111, 91, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 111, 91, 0.18), 0 0 52px rgba(255, 111, 91, 0.16);
}

.beacon-shell[data-beacon-stage="storm"] .beacon-stage {
  color: #ff8a76;
}

.beacon-shell[data-beacon-stage="answer"] .beacon-stage {
  color: #ffcc78;
}

@media (max-width: 760px) {
  .beacon-shell {
    min-height: 480px;
  }

  .beacon-hud {
    inset: 14px 14px auto;
    flex-direction: column;
    gap: 6px;
  }

  .beacon-ticks {
    width: min(86vw, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beacon-signal {
    transform: translateX(-50%);
  }
}
