/* Opaque form surfaces keep their existing contrast; the sky sits behind UI. */
.starfield-page {
  --ink: #e5eaf5;
  --muted: #b8c3da;
  isolation: isolate;
  background: #0b1025;
  color: #e5eaf5;
}
.starfield-background {
  --starfield-x: 50%;
  --starfield-y: 45%;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
  background: radial-gradient(ellipse at 75% 20%, #25203e 0%, transparent 62%),
    linear-gradient(145deg, #0d1830, #11132b 60%, #19122d);
}
.starfield-background canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.starfield-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 42vw 35vh at var(--starfield-x) var(--starfield-y), #b5d5ff 0%, transparent 75%);
  opacity: 0;
  transition: opacity 650ms ease;
  pointer-events: none;
}
.starfield-background.is-focused::after { opacity: 0.035; }
.starfield-background.is-typing::after { opacity: 0.065; }
.starfield-background[data-mode="fallback"] canvas { visibility: hidden; }
.starfield-page :is(.card, .metrics, .hero-panel, .workspace-header, .celebration-panel, .notice, .live-event, .qr-poster, .growth-insight) {
  --ink: #182822;
  --muted: #617068;
  color: #182822;
}
.starfield-page :is(input, textarea, select, .btn.secondary, .count-pill, .flash, .toast) {
  --ink: #182822;
  --muted: #617068;
}
.starfield-page :is(.topbar, .footer, .language-switch, .page-heading, .hero-copy) { --ink: #e5eaf5; --muted: #b8c3da; }
.starfield-page .topbar .brand { color: #e5eaf5; }
.starfield-page :is(.topbar nav > a:not(.btn), .footer, .footer a, .language-switch > label, .page-heading > p, .plan-trial-note) { color: #b8c3da; }
.starfield-page .hero h1 > span, .starfield-page .container > p > a:not(.btn), .starfield-page .container > .section-heading > a { color: #a2d1bd; }
.starfield-page .auth-intro { background: linear-gradient(145deg, #192846e8, #201b3bd9); border: 1px solid #ffffff14; }
@media (prefers-reduced-motion: reduce) {
  .starfield-background::after { transition-duration: 800ms; }
  .starfield-background.is-focused::after { opacity: 0.025; }
  .starfield-background.is-typing::after { opacity: 0.035; }
}
@media print {
  .starfield-background { display: none; }
  .starfield-page { --ink: #182822; --muted: #617068; color: #182822; background: white; }
  .starfield-page :is(.topbar, .footer, .language-switch, .page-heading, .hero-copy) { --ink: #182822; --muted: #617068; }
  .starfield-page .container > :is(h1, h2, h3, p), .starfield-page .section-heading { color: #182822; }
}
