@media (max-width: 600px) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
  }

  .copy.copy-spirit {
    top: max(82px, calc(env(safe-area-inset-top) + 72px));
    left: 18px;
    width: min(72vw, 285px);
    opacity: 1 !important;
    pointer-events: none;
    filter: none !important;
    animation: none !important;
    transform: none !important;
  }

  .copy.copy-spirit .spirit-copy {
    max-width: 22ch;
    font-size: clamp(17px, 4.6vw, 20px);
    line-height: 1.24;
    opacity: 1 !important;
    filter: none !important;
    animation: none !important;
    transform: none !important;
  }

  .copy .category-note {
    margin-top: 13px;
    font-size: 7px;
  }

  .cosmos {
    transform:
      translate3d(calc(var(--px) * 1px), calc(var(--py) * 1px), 0)
      translateY(7vh)
      scale(.66);
  }

  .core {
    left: 52%;
    top: 43%;
    width: 104px;
  }

  .core-label {
    top: calc(100% + 7px);
    font-size: 6px;
  }

  .core-label b {
    font-size: 12px;
  }

  .planet-anchor.decoration {
    display: none;
  }

  .legend {
    left: 16px;
    right: 16px;
    bottom: max(14px, env(safe-area-inset-bottom));
    gap: 8px;
    font-size: 0;
    letter-spacing: .08em;
    opacity: .48 !important;
    pointer-events: none;
  }

  .legend::after {
    content: "Tap a planet to explore";
    font-size: 6px;
  }

  .legend i {
    flex: 0 0 22px;
  }

  .nav .day-toggle {
    top: max(70px, calc(env(safe-area-inset-top) + 60px));
    right: 18px;
    font-size: 7px;
  }
}

@media (max-width: 380px) {
  .copy.copy-spirit {
    width: min(75vw, 270px);
  }

  .cosmos {
    transform:
      translate3d(calc(var(--px) * 1px), calc(var(--py) * 1px), 0)
      translateY(8vh)
      scale(.61);
  }

  .legend {
    font-size: 5.5px;
  }
}

/* A dedicated touch composition: stable positions and readable labels. */
@media (max-width: 600px) {
  .copy.copy-spirit { top: max(104px, calc(env(safe-area-inset-top) + 92px)); left: 18px; width: calc(100% - 36px); }
  .copy.copy-spirit .spirit-copy { max-width: 30ch; font-size: 17px; line-height: 1.3; }
  .cosmos { inset: 270px 16px 72px; min-height: 270px; transform: none; transition: none; }
  .orbit-svg { opacity: .65; }
  .core { left: 50%; top: 46%; width: 68px; }
  .core-label { font-size: 0; }
  .core-label b { font-size: 10px; }
  .planet-anchor { left: 0; top: 0; }
  .planet, .planet .sphere { width: clamp(44px, 14vw, 72px); height: clamp(44px, 14vw, 72px); }
  .home-project-orb, .home-project-orb .sphere { width: clamp(28px, 9vw, 46px); height: clamp(28px, 9vw, 46px); }
  .core { width: clamp(48px, 15vw, 76px); }
  .planet-tag { white-space: nowrap; font-size: 0; top: calc(100% + 7px); letter-spacing: 0; }
  .planet-tag b { font-size: 9px; }
  .legend::after { font-size: 10px; }
  .legend { font-size: 0; }
  .legend span { display: none; }
  .planet:hover .planet-wrap, .planet:focus-visible .planet-wrap { transform: none; }
  .planet:hover .planet-tag, .planet:focus-visible .planet-tag { transform: translateX(-50%); }
  .hero { min-height: max(680px, 100svh); }
  .audio-panel { bottom: 44px; }
}
