.orrery-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  touch-action: none;
}

.orrery-canvas.is-grabbing {
  cursor: grabbing;
}

.orrery-field,
.orrery-phase-layer,
.orrery-planet-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orrery-field {
  pointer-events: none;
}

.orrery-copy {
  position: absolute;
  top: var(--s-8);
  left: 50%;
  z-index: 8;
  width: min(62vw, 680px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: auto;
}

.orrery-copy-kicker,
.orrery-copy-title,
.orrery-copy-instruction {
  margin: 0;
}

.orrery-copy-kicker {
  color: var(--muted);
}

.orrery-copy-title {
  margin-top: var(--s-2);
}

.orrery-copy-instruction {
  margin-top: var(--s-2);
  color: var(--fg-soft);
}

.orrery-phase-layer,
.orrery-planet-layer {
  pointer-events: none;
}

.orrery-phase {
  position: absolute;
  z-index: 2;
  margin: 0;
  border: 0;
  padding: var(--s-2) var(--s-3);
  transform: translate(-50%, -50%);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.9;
  opacity: 0.16;
  pointer-events: auto;
  white-space: nowrap;
}

.orrery-planet {
  position: absolute;
  z-index: 4;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--fg);
  cursor: grab;
  pointer-events: auto;
  user-select: none;
}

.orrery-planet:active {
  cursor: grabbing;
}

.orrery-planet-face {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  object-fit: cover;
}

.orrery-planet-label {
  position: absolute;
  top: calc(50% + var(--orrery-label-distance, 19px));
  left: 50%;
  min-width: 132px;
  transform: translateX(-50%);
  color: color-mix(in oklab, var(--fg-soft) calc((1 - var(--orrery-attention, 0)) * 100%), var(--marker));
  font-family: var(--font-sans);
  font-size: var(--orrery-label-size, 12px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
}

.orrery-planet-name,
.orrery-planet-number {
  display: block;
}

.orrery-planet-number {
  margin-top: 0.2em;
  font-size: 0.75em;
  font-weight: 400;
  opacity: 0.72;
}

.orrery-planet:focus-visible .orrery-planet-label {
  color: var(--marker);
}

.orrery-planet:focus-visible {
  outline: 1px solid var(--marker);
  outline-offset: 3px;
  border-radius: var(--r-pill);
}

@media (max-width: 600px) {
  .orrery-copy {
    top: var(--s-6);
    width: min(76vw, 480px);
  }

  .orrery-copy-instruction {
    display: none;
  }

  .orrery-phase {
    font-size: clamp(24px, 9vw, 48px);
  }
}

/* Groups in the sky: each group's name stands over it, faint, in the same
   quiet voice as the phase words. The layer sits under the planets. */
.orrery-group-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.orrery-group-label {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -100%);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
