/* Constellation: the app's night sky (ConstellationView), on the home page. The band is
   dark in both appearances, as the app's sky is. Palette is Theme.constellation*. */
.sky-band {
  --sky-star: #f5edff; --sky-glow: #b89cff; --sky-line: #c7aaf6; --sky-cool: #bfd3ff;
  background: linear-gradient(180deg, #07041a 0%, #120a33 55%, #1a0e44 100%);
  overflow: hidden; isolation: isolate;
}
.sky-band h2 { color: #f6f2ff; }
.sky-band .lead { text-shadow: 0 1px 14px #07041a; }
.sky-field { position: absolute; inset: -48px; z-index: -1; pointer-events: none; }
.sky-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky {
  position: relative; height: clamp(500px, 52vw, 640px); direction: ltr;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
.sky-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sky-lines line, .sky-lines path { stroke: var(--sky-line); stroke-width: .7; fill: none; stroke-linecap: round; }
.sky-lines .bridge { stroke-dasharray: 2 5; }
.sky-figures { position: absolute; inset: 0; }
.sky-star {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  transform: translate(var(--x, 0), var(--y, 0)); opacity: var(--o, 1);
  display: grid; place-items: center; z-index: 2; cursor: pointer;
}
.sky-star::before {
  content: ""; width: 3.4px; height: 3.4px; border-radius: 50%; background: var(--sky-star);
  box-shadow: 0 0 3px rgba(245,237,255,.6); transition: transform .5s var(--ease-settle);
}
.sky-star.lead::before { width: 5.2px; height: 5.2px; box-shadow: 0 0 6px 1px rgba(245,237,255,.55); }
.sky-star.recent::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(184,156,255,.55), rgba(184,156,255,0) 62%);
}
.sky-loose .sky-star::before { opacity: .62; }
.sky-star.is-lit::before { transform: scale(1.7); }
.sky-star.flare::before { animation: sky-flare 1.1s var(--ease-settle); }
@keyframes sky-flare { 0% { transform: scale(4); box-shadow: 0 0 16px 6px rgba(184,156,255,.9); } 100% { transform: scale(1); } }
.sky.is-live .sky-star.lead:not(.flare)::before { animation: sky-breathe 7s ease-in-out infinite; animation-delay: var(--breath, 0s); }
@keyframes sky-breathe { 0%, 70%, 100% { transform: scale(1); opacity: 1; } 82% { transform: scale(1.45); opacity: .75; } }
.sky-tip {
  position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translate(-50%, 4px);
  white-space: nowrap; padding: 6px 10px; border-radius: 10px; font-size: 14px; line-height: 1.2; color: var(--sky-star);
  background: rgba(26,14,68,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(199,170,246,.22); unicode-bidi: plaintext;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease-settle);
}
.sky-star.is-lit .sky-tip { opacity: 1; transform: translate(-50%, 0); }
.sky-star.tip-start .sky-tip { left: -6px; transform: translate(0, 4px); }
.sky-star.tip-end .sky-tip { left: auto; right: -6px; transform: translate(0, 4px); }
.sky-star.tip-start.is-lit .sky-tip, .sky-star.tip-end.is-lit .sky-tip { transform: translate(0, 0); }
.sky-star.tip-below .sky-tip { bottom: auto; top: calc(100% + 2px); }
.sky-open {
  position: absolute; left: 0; top: 0; transform: translate(var(--x, 0), var(--y, 0));
  width: var(--w, 140px); height: var(--h, 140px); opacity: var(--o, 1);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0; border: 0; background: none; color: var(--sky-star); font: inherit; cursor: pointer; border-radius: 40%;
}
.sky-glow {
  position: absolute; inset: 0 0 34px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(184,156,255,.2), rgba(184,156,255,.07) 60%, transparent);
  opacity: .5; transition: opacity .3s;
}
.sky-open:hover .sky-glow, .sky-figure.is-hot .sky-glow { opacity: 1; }
.sky-open:focus-visible { outline: 2px solid var(--sky-glow); outline-offset: 2px; }
.sky-name { font-size: 15px; line-height: 1.2; opacity: .9; text-align: center; max-width: 100%; transition: opacity .6s; }
.sky-count { font: 11px/1.4 var(--text); opacity: .45; transition: opacity .6s; }
.sky-page {
  position: absolute; right: 0; top: 50%; width: min(40%, 380px); transform: translateY(-50%);
  display: grid; gap: 14px; justify-items: start; color: var(--sky-star);
  opacity: 0; translate: 0 12px; transition: opacity .45s var(--ease-settle), translate .45s var(--ease-settle);
}
.sky-page[hidden] { display: none; }
.sky-page.is-in { opacity: 1; translate: 0 0; }
.sky-back {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px 6px 6px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--sky-star); font: 500 14px/1.2 var(--text); cursor: pointer;
}
.sky-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sky-page[dir=rtl] .sky-back { padding: 6px 6px 6px 12px; }
.sky-page[dir=rtl] .sky-back svg { transform: scaleX(-1); }
.sky-page-name { margin: 6px 0 0; font-size: clamp(28px, 3vw, 36px); font-weight: 400; line-height: 1.1; }
.sky-page-notes { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; }
.sky-page-notes li { border-top: 1px solid rgba(245,237,255,.12); }
.sky-page-notes button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 2px; border: 0; background: none;
  color: rgba(245,237,255,.88); font: 16px/1.3 var(--text); text-align: start; cursor: default;
}
.sky-page-notes button::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--sky-star); box-shadow: 0 0 6px rgba(184,156,255,.9); }
.sky-page-notes button:hover, .sky-page-notes button:focus-visible { color: #fff; outline: none; }
.sky-foot { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; min-height: 44px; }
.sky-foot .small { margin: 0; color: rgba(245,237,255,.6); }
.sky.is-flown ~ .sky-foot .small { visibility: hidden; }
.sky-points { margin-top: clamp(40px, 6vw, 64px); }
.sky-note { margin-top: 28px; color: rgba(245,237,255,.55); }
.sky-band noscript .small { margin-top: 16px; }
@media (max-width: 700px) {
  .sky { height: 680px; }
  .sky-name { font-size: 14px; }
  .sky-page { right: auto; left: 0; top: auto; bottom: 0; width: 100%; transform: none; }
  .sky-tip { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .sky .sky-star::before, .sky.is-live .sky-star.lead::before { animation: none !important; }
  .sky-page, .sky-tip, .sky-name, .sky-count { transition: none; }
}
