.app[data-scene="tap-constellation"] .visual-shell,
.app[data-scene="tap-constellation"] .energy-control {
  display: none;
}

.tap-constellation-shell {
  position: relative;
  min-height: clamp(500px, 64vw, 740px);
  margin-top: 18px;
  border: 1px solid rgba(127, 212, 255, 0.34);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--tap-x, 50%) var(--tap-y, 52%), rgba(255, 232, 132, 0.22), transparent 22%),
    radial-gradient(circle at 15% 18%, rgba(127, 212, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #04070d 0%, #0b1015 46%, #160b13 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 0 52px rgba(0, 0, 0, 0.32);
  touch-action: none;
}

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

.tap-constellation-shell[data-charge="spark"] {
  border-color: rgba(255, 232, 132, 0.78);
  background:
    radial-gradient(circle at var(--tap-x, 50%) var(--tap-y, 52%), rgba(255, 232, 132, 0.36), transparent 20%),
    radial-gradient(circle at 82% 24%, rgba(255, 122, 102, 0.16), transparent 28%),
    linear-gradient(135deg, #070807 0%, #12120e 48%, #1c1011 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 132, 0.18), 0 0 72px rgba(255, 232, 132, 0.16);
}

.tap-constellation {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}

.tap-constellation:focus-visible {
  outline: 3px solid rgba(255, 232, 132, 0.34);
  outline-offset: -7px;
}

.tap-constellation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.052) 0 1px, transparent 1px 8.33%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 20%);
  opacity: 0.52;
  mix-blend-mode: screen;
}

.tap-constellation::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 40%, rgba(127, 212, 255, 0.13) 47%, transparent 54%),
    linear-gradient(76deg, transparent 0 42%, rgba(255, 232, 132, 0.11) 49%, transparent 57%);
  opacity: 0.78;
  animation: tap-sky-scan 7.4s linear infinite;
}

.tap-constellation-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.tap-constellation-hud {
  position: absolute;
  inset: 16px 16px auto;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  color: rgba(243, 240, 232, 0.72);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.tap-constellation-title {
  color: #7fd4ff;
}

.tap-constellation-meter {
  color: #ffe884;
  text-align: right;
}

.tap-constellation-badges {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.tap-constellation-badges span {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 10px 6px;
  color: rgba(243, 240, 232, 0.68);
  background: rgba(4, 7, 13, 0.58);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.tap-constellation-badges span.is-hot {
  color: #18100b;
  border-color: rgba(255, 232, 132, 0.86);
  background: #ffe884;
}

.tap-constellation-prompt {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(92%, 820px);
  transform: translate(-50%, -50%);
  color: rgba(255, 247, 204, 0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.6rem, 5.8vw, 5.2rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
  filter: drop-shadow(0 0 24px rgba(255, 232, 132, 0.14));
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.tap-constellation-shell[data-armed="true"] .tap-constellation-prompt {
  opacity: 0.2;
  transform: translate(-50%, -50%) scale(0.94);
}

@keyframes tap-sky-scan {
  0% {
    transform: translateX(-16%) skewX(-5deg);
  }

  100% {
    transform: translateX(16%) skewX(-5deg);
  }
}

@media (max-width: 760px) {
  .tap-constellation-shell {
    min-height: 540px;
  }

  .tap-constellation-hud {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .tap-constellation-meter {
    text-align: left;
  }
}
