/* atmosphere.css — Context-reactive Elemental Atmosphere & Editorial Motion
 *
 * Driven by <body data-element="fire|earth|air|water" data-atmosphere="on|off">
 * across all 17 themes (dark + light). GPU-composited transforms only (60fps
 * on mobile & desktop), strictly pointer-events:none on backdrop layers, and
 * honours both prefers-reduced-motion and the Tweaks "Elemental atmosphere" toggle.
 */

:root {
  --elem-rgb: 214, 182, 118;
  --elem-secondary-rgb: 238, 220, 178;
  --elem-accent: var(--accent-gold, #c9a86b);
  --elem-aura-opacity: 1;
}

/* Equalized perceptual luminance across all 4 elements on dark obsidian */
body[data-element="fire"] {
  --elem-rgb: 222, 108, 78;
  --elem-secondary-rgb: 235, 172, 86;
  --elem-accent: var(--fire, #d8674e);
}

body[data-element="water"] {
  --elem-rgb: 96, 152, 196;
  --elem-secondary-rgb: 140, 182, 228;
  --elem-accent: var(--water, #5d8eb1);
}

body[data-element="air"] {
  --elem-rgb: 218, 186, 122;
  --elem-secondary-rgb: 242, 224, 184;
  --elem-accent: var(--air, #c9a86b);
}

body[data-element="earth"] {
  --elem-rgb: 138, 170, 106;
  --elem-secondary-rgb: 196, 174, 118;
  --elem-accent: var(--earth, #7a8e5e);
}

/* ── Fixed ambient elemental veil ───────────────────────────────────────── */
.elemental-aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--elem-aura-opacity);
  transition: opacity 420ms ease;
}

body[data-atmosphere="off"] .elemental-aura {
  display: none;
}

.elemental-aura-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  filter: blur(68px);
}

/* Balanced, restrained intensity across Fire, Water, Air, Earth */
.elemental-aura-orb--a {
  width: 70vmax;
  height: 50vmax;
  top: -22vmax;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  background: radial-gradient(
    ellipse at center,
    rgba(var(--elem-rgb), 0.13) 0%,
    rgba(var(--elem-secondary-rgb), 0.05) 42%,
    transparent 74%
  );
  animation: elem-drift-a 24s ease-in-out infinite alternate;
}

.elemental-aura-orb--b {
  width: 54vmax;
  height: 44vmax;
  bottom: -20vmax;
  right: -10vmax;
  transform: translate3d(0, 0, 0);
  background: radial-gradient(
    ellipse at center,
    rgba(var(--elem-secondary-rgb), 0.08) 0%,
    rgba(var(--elem-rgb), 0.03) 48%,
    transparent 74%
  );
  animation: elem-drift-b 30s ease-in-out infinite alternate;
}

/* Element-specific spatial placement & cadence (all keep visible upper/mid presence) */
body[data-element="fire"] .elemental-aura-orb--a {
  top: -20vmax;
  animation: elem-drift-fire 20s ease-in-out infinite alternate;
}

body[data-element="water"] .elemental-aura-orb--a {
  top: -12vmax;
  left: 44%;
  animation: elem-drift-water 26s ease-in-out infinite alternate;
}

body[data-element="air"] .elemental-aura-orb--a {
  top: -16vmax;
  left: 52%;
  animation: elem-drift-air 24s ease-in-out infinite alternate;
}

body[data-element="earth"] .elemental-aura-orb--a {
  top: -14vmax;
  left: 48%;
  animation: elem-drift-earth 28s ease-in-out infinite alternate;
}

body[data-element="earth"] .elemental-aura-orb--b {
  bottom: -16vmax;
  left: 10%;
  right: auto;
  width: 66vmax;
}

/* Subtle top hairline shimmer + scroll-progress bar tuned to active element */
body[data-atmosphere="on"]::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  z-index: 65;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(var(--read-progress, 1));
  opacity: var(--read-progress-opacity, 0.72);
  background: linear-gradient(
    90deg,
    rgba(var(--elem-rgb), 0.35) 0%,
    rgba(var(--elem-rgb), 0.85) 55%,
    rgba(var(--elem-secondary-rgb), 0.95) 100%
  );
  transition: transform 90ms linear;
}

/* Light themes (Parchment, Porcelain, Dawn, Moonstone): soft paper wash */
[data-scheme="light"] .elemental-aura-orb--a {
  background: radial-gradient(
    ellipse at center,
    rgba(var(--elem-rgb), 0.13) 0%,
    rgba(var(--elem-secondary-rgb), 0.05) 46%,
    transparent 74%
  );
}

[data-scheme="light"] .elemental-aura-orb--b {
  background: radial-gradient(
    ellipse at center,
    rgba(var(--elem-secondary-rgb), 0.09) 0%,
    rgba(var(--elem-rgb), 0.04) 48%,
    transparent 74%
  );
}

/* ── Slice 2: Living Hero & Editorial Surfaces ──────────────────────────── */

/* Breathing elemental halo inside the Hero orbital mark & Demo wheel */
body[data-atmosphere="on"] .hero-mark::before {
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle at 50% 48%,
    rgba(var(--elem-rgb), 0.14) 0%,
    rgba(var(--elem-secondary-rgb), 0.05) 45%,
    transparent 72%
  );
  animation: asteria-breathe 8s ease-in-out infinite;
}

body[data-atmosphere="on"] .hm-spark,
body[data-atmosphere="on"] .dw-spark {
  animation: asteria-spark-pulse 5.5s ease-in-out infinite;
}

body[data-atmosphere="on"] .dw-glow {
  background: radial-gradient(
    circle at 50% 46%,
    rgba(var(--elem-rgb), 0.16) 0%,
    rgba(var(--elem-secondary-rgb), 0.05) 45%,
    transparent 72%
  );
  animation: asteria-breathe 9s ease-in-out infinite;
}

/* Crisp above-the-fold hero entrance */
body[data-atmosphere="on"] .hero-copy > .eyebrow {
  animation: asteria-fade-up 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
body[data-atmosphere="on"] .hero-title {
  animation: asteria-fade-up 620ms cubic-bezier(0.22, 1, 0.36, 1) 70ms both;
}
body[data-atmosphere="on"] .hero-lead {
  animation: asteria-fade-up 640ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}
body[data-atmosphere="on"] .hero-actions {
  animation: asteria-fade-up 660ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
}

/* Elevated observatory glass surfaces & specular cursor glow */
body[data-atmosphere="on"] .y27-card,
body[data-atmosphere="on"] .plan-pane,
body[data-atmosphere="on"] .cf-purpose-opt,
body[data-atmosphere="on"] .ref-list,
body[data-atmosphere="on"] .lun-card {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease;
}

[data-scheme="light"] body[data-atmosphere="on"] .y27-card,
[data-scheme="light"] body[data-atmosphere="on"] .plan-pane,
[data-scheme="light"] body[data-atmosphere="on"] .cf-purpose-opt,
[data-scheme="light"] body[data-atmosphere="on"] .ref-list {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Whisper-quiet pointer specular highlight on interactive cards (desktop) */
@media (hover: hover) and (pointer: fine) {
  body[data-atmosphere="on"] .y27-card::before,
  body[data-atmosphere="on"] .plan-pane::before,
  body[data-atmosphere="on"] .cf-purpose-opt::before,
  body[data-atmosphere="on"] .lun-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 280ms ease;
    background: radial-gradient(
      260px circle at var(--mx, 50%) var(--my, 50%),
      rgba(var(--elem-rgb), 0.12),
      transparent 70%
    );
  }

  body[data-atmosphere="on"] .y27-card:hover::before,
  body[data-atmosphere="on"] .plan-pane:hover::before,
  body[data-atmosphere="on"] .cf-purpose-opt:hover::before,
  body[data-atmosphere="on"] .lun-card:hover::before {
    opacity: 1;
  }
}

/* Tactile hover & active polish */
body[data-atmosphere="on"] .y27-card:hover {
  border-color: rgba(var(--elem-rgb), 0.52);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(var(--elem-secondary-rgb), 0.14),
    0 10px 30px -18px rgba(var(--elem-rgb), 0.38);
}
body[data-atmosphere="on"] .y27-go {
  transition: color 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .y27-card:hover .y27-go {
  transform: translateX(4px);
}

body[data-atmosphere="on"] .cf-purpose-opt:hover {
  border-color: rgba(var(--elem-rgb), 0.45);
  transform: translateY(-1px);
}
body[data-atmosphere="on"] .cf-purpose-opt:has(input:checked) {
  border-color: var(--accent-gold);
  background: linear-gradient(
    180deg,
    rgba(var(--elem-rgb), 0.08) 0%,
    var(--bg-surface) 100%
  );
  box-shadow:
    inset 0 0 0 0.5px var(--accent-gold),
    0 8px 24px -16px rgba(var(--elem-rgb), 0.35);
}

body[data-atmosphere="on"] .plan-pane:hover {
  border-color: rgba(var(--elem-rgb), 0.48);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(var(--elem-secondary-rgb), 0.14),
    0 14px 36px -20px rgba(var(--elem-rgb), 0.34);
}

body[data-atmosphere="on"] .hero-cta {
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease;
}
body[data-atmosphere="on"] .hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(var(--elem-rgb), 0.45);
}
body[data-atmosphere="on"] .hero-cta:active {
  transform: translateY(0) scale(0.985);
}

body[data-atmosphere="on"] .ref-row,
body[data-atmosphere="on"] .feat-row.is-link {
  transition:
    background 160ms ease,
    padding-left 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 160ms ease;
}
body[data-atmosphere="on"] .ref-row:hover {
  padding-left: calc(var(--space-4) + 5px);
}
body[data-atmosphere="on"] .feat-row.is-link:hover .feat-name {
  color: var(--accent-gold);
}

/* Scroll-triggered editorial reveal (progressively enhanced by motion.js) */
body[data-atmosphere="on"] .asteria-reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 540ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .asteria-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ── Slice 3: Living Chart Wheel & /moon Experience ─────────────────────── */

/* Smooth entrance on /moon/<slug> lunation wheels (no extra shine on wheels) */
body[data-atmosphere="on"] .lp-moment-chart svg.chart {
  animation: asteria-wheel-enter 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Subtle breathing lunar glow on the live Moon disc (/moon) */
body[data-atmosphere="on"] .mn-fig {
  position: relative;
}
body[data-atmosphere="on"] .mn-fig::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent 38%,
    rgba(var(--elem-rgb), 0.07) 54%,
    rgba(var(--elem-secondary-rgb), 0.025) 66%,
    transparent 76%
  );
  filter: blur(16px);
  animation: asteria-breathe 9s ease-in-out infinite;
}

/* /moon lunation tracker cards & lunation report blocks */
body[data-atmosphere="on"] .mc-lun,
body[data-atmosphere="on"] .lp-pull,
body[data-atmosphere="on"] .lp-fact,
body[data-atmosphere="on"] .mn-carry {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  body[data-atmosphere="on"] .mc-lun::before,
  body[data-atmosphere="on"] .lp-fact::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 280ms ease;
    background: radial-gradient(
      240px circle at var(--mx, 50%) var(--my, 50%),
      rgba(var(--elem-rgb), 0.13),
      transparent 70%
    );
  }
  body[data-atmosphere="on"] .mc-lun:hover::before,
  body[data-atmosphere="on"] .lp-fact:hover::before {
    opacity: 1;
  }
}

body[data-atmosphere="on"] .mc-lun:hover {
  border-color: rgba(var(--elem-rgb), 0.50);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(var(--elem-secondary-rgb), 0.14),
    0 12px 30px -18px rgba(var(--elem-rgb), 0.36);
}
body[data-atmosphere="on"] .mc-lun-go {
  transition: color 180ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .mc-lun:hover .mc-lun-go {
  transform: translateX(4px);
}

body[data-atmosphere="on"] .lp-pull {
  border-left-color: rgba(var(--elem-rgb), 0.82);
  background: linear-gradient(
    90deg,
    rgba(var(--elem-rgb), 0.09) 0%,
    rgba(var(--elem-secondary-rgb), 0.02) 60%,
    transparent 100%
  );
}

body[data-atmosphere="on"] .lp-asp {
  transition: background-color 160ms ease, padding-left 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .lp-asp:hover {
  background-color: rgba(var(--elem-rgb), 0.06);
  padding-left: 8px;
}

@keyframes asteria-wheel-halo {
  0%, 100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.78; }
  50%      { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
@keyframes asteria-wheel-enter {
  from { opacity: 0; transform: scale(0.975); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Slice 5: Tactile Observatory Details (Forms, FAQ, Live Dot, Touch) ─── */

/* Calm observatory heartbeat on the active reading-bar dot & live ticker dot */
body[data-atmosphere="on"] .reading-dot,
body[data-atmosphere="on"] .rb-dot,
body[data-atmosphere="on"] .tt-dot {
  position: relative;
  animation: asteria-live-pulse 3.6s ease-in-out infinite;
}

@keyframes asteria-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--elem-rgb), 0.45); opacity: 0.9; }
  50%      { box-shadow: 0 0 0 5px rgba(var(--elem-rgb), 0);   opacity: 1; }
}

/* Precision instrument inputs & form controls */
body[data-atmosphere="on"] input[type="text"],
body[data-atmosphere="on"] input[type="number"],
body[data-atmosphere="on"] input[type="date"],
body[data-atmosphere="on"] input[type="time"],
body[data-atmosphere="on"] input[type="email"],
body[data-atmosphere="on"] select,
body[data-atmosphere="on"] textarea {
  transition:
    border-color 180ms ease,
    box-shadow 220ms ease,
    background-color 180ms ease;
}

body[data-atmosphere="on"] input[type="text"]:focus,
body[data-atmosphere="on"] input[type="number"]:focus,
body[data-atmosphere="on"] input[type="date"]:focus,
body[data-atmosphere="on"] input[type="time"]:focus,
body[data-atmosphere="on"] input[type="email"]:focus,
body[data-atmosphere="on"] select:focus,
body[data-atmosphere="on"] textarea:focus {
  border-color: rgba(var(--elem-rgb), 0.72);
  box-shadow: 0 0 0 3px rgba(var(--elem-rgb), 0.14);
  outline: none;
}

/* Smooth FAQ disclosure & icon rotation */
body[data-atmosphere="on"] .home-faq-q {
  transition: color 180ms ease;
}
body[data-atmosphere="on"] .home-faq-q::after {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms ease;
}
body[data-atmosphere="on"] .home-faq-item[open] .home-faq-q::after {
  content: "+";
  transform: rotate(45deg);
}
body[data-atmosphere="on"] .home-faq-item[open] .home-faq-a {
  animation: asteria-fade-up 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Smooth dropdown / Tweaks panel reveal */
body[data-atmosphere="on"] details[open] > .tweaks-panel,
body[data-atmosphere="on"] details[open] > .nav-menu-panel,
body[data-atmosphere="on"] details[open] > .cn-menu-panel {
  animation: asteria-panel-in 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes asteria-panel-in {
  from { opacity: 0; transform: translate3d(0, -4px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Native-app tactile tap feedback on buttons, pills & shortcut tiles */
body[data-atmosphere="on"] .btn,
body[data-atmosphere="on"] .lun-badge,
body[data-atmosphere="on"] .tweaks-trigger,
body[data-atmosphere="on"] .nav-toggle,
body[data-atmosphere="on"] .rb-tab,
body[data-atmosphere="on"] .cf-purpose-opt,
body[data-atmosphere="on"] .mc-lun {
  -webkit-tap-highlight-color: transparent;
}
body[data-atmosphere="on"] .btn:active,
body[data-atmosphere="on"] .rb-tab:active,
body[data-atmosphere="on"] .lun-badge:active,
body[data-atmosphere="on"] .tweaks-trigger:active {
  transform: scale(0.975);
}

/* Active reading shortcut pill carries subtle elemental highlight */
body[data-atmosphere="on"] .rb-tab.is-active,
body[data-atmosphere="on"] .rb-tab[aria-current="page"] {
  border-color: rgba(var(--elem-rgb), 0.72);
  background: linear-gradient(
    180deg,
    rgba(var(--elem-rgb), 0.12) 0%,
    rgba(var(--elem-rgb), 0.03) 100%
  );
  box-shadow: inset 0 1px 0 rgba(var(--elem-secondary-rgb), 0.16);
}

/* ── Batch A: Flagship Observatory Landing Heroes (/synastry, /calendar, /sky) ── */
.pg-head.pg-head-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 240px);
  align-items: center;
  gap: var(--space-5, 24px);
  padding: var(--space-6, 28px) var(--space-6, 28px);
  margin: 0 0 var(--space-5, 24px);
  border-radius: var(--radius-lg, 12px);
  border: 0.5px solid var(--ink-quaternary);
  background: linear-gradient(
    135deg,
    rgba(var(--elem-rgb), 0.07) 0%,
    var(--bg-surface) 48%,
    rgba(var(--elem-secondary-rgb), 0.04) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

[data-scheme="light"] .pg-head.pg-head-hero {
  background: linear-gradient(
    135deg,
    rgba(var(--elem-rgb), 0.08) 0%,
    var(--bg-surface) 58%,
    rgba(var(--elem-secondary-rgb), 0.05) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.pg-head.pg-head-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--elem-rgb), 0.55) 28%,
    rgba(var(--elem-secondary-rgb), 0.65) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.pgh-copy {
  min-width: 0;
}

.pgh-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 var(--space-2, 8px);
}

.pg-head.pg-head-hero h1 {
  margin-top: 0;
  margin-bottom: var(--space-3, 12px);
}

.pg-head.pg-head-hero .pg-intro {
  margin-bottom: 0;
  max-width: 58ch;
}

.pgh-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pgh-svg {
  width: 100%;
  max-width: 224px;
  height: auto;
  display: block;
}

body[data-atmosphere="on"] .pgh-orbit-a {
  animation: pgh-spin 42s linear infinite;
}
body[data-atmosphere="on"] .pgh-orbit-b {
  animation: pgh-spin 34s linear infinite reverse;
}
body[data-atmosphere="on"] .pgh-sky-outer {
  animation: pgh-spin 96s linear infinite;
}
body[data-atmosphere="on"] .pgh-sky-inner {
  animation: pgh-spin 58s linear infinite reverse;
}
body[data-atmosphere="on"] .pgh-star,
body[data-atmosphere="on"] .pgh-full-disc {
  animation: asteria-spark-pulse 6s ease-in-out infinite;
}

@keyframes pgh-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .pg-head.pg-head-hero {
    grid-template-columns: 1fr;
    text-align: left;
    padding: var(--space-5, 20px) var(--space-4, 16px);
    gap: var(--space-3, 12px);
  }
  .pgh-visual {
    order: -1;
    justify-content: flex-start;
  }
  .pgh-svg {
    max-width: 156px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pgh-orbit-a,
  .pgh-orbit-b,
  .pgh-sky-outer,
  .pgh-sky-inner,
  .pgh-star,
  .pgh-full-disc {
    animation: none !important;
  }
}

/* ── Batch B: Shared Observatory Thread for /2027, /saturn, /today, /cycles */
body[data-atmosphere="on"] .ys-night {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 20px 56px -36px rgba(var(--elem-rgb), 0.24);
  border-color: color-mix(in srgb, rgba(var(--elem-rgb), 0.26) 40%, var(--ys-line));
}
body[data-atmosphere="on"] .ys-seasons a {
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease;
}
body[data-atmosphere="on"] .ys-seasons a:hover {
  border-color: rgba(var(--elem-rgb), 0.48);
  transform: translateY(-2px);
}
body[data-atmosphere="on"] .td-empty-preview {
  border-color: color-mix(in srgb, var(--ink-quaternary) 70%, rgba(var(--elem-rgb), 0.32));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 48px -32px rgba(var(--elem-rgb), 0.26);
}
body[data-atmosphere="on"] .sat-event,
body[data-atmosphere="on"] .sat-depth-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .sat-event:hover,
body[data-atmosphere="on"] .sat-depth-card:hover {
  border-color: rgba(var(--elem-rgb), 0.42);
  transform: translateY(-1px);
}
body[data-atmosphere="on"] .cy-row {
  transition:
    background-color 180ms ease,
    border-color 200ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .cy-row:hover {
  border-color: rgba(var(--elem-rgb), 0.38);
  transform: translateX(2px);
}

/* ── Batch C: Tactile Polish for /celebrities, /glossary, /archetypes, /plus */
body[data-atmosphere="on"] .plus-card,
body[data-atmosphere="on"] .plus-benefits,
body[data-atmosphere="on"] .gl-codex a.gl-entry,
body[data-atmosphere="on"] .arch-cell {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .plus-card:hover,
body[data-atmosphere="on"] .gl-codex a.gl-entry:hover,
body[data-atmosphere="on"] .arch-cell:hover {
  border-color: rgba(var(--elem-rgb), 0.46);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(var(--elem-secondary-rgb), 0.14),
    0 12px 28px -18px rgba(var(--elem-rgb), 0.34);
}
body[data-atmosphere="on"] .cdb-row {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .cdb-row:hover {
  border-color: rgba(var(--elem-rgb), 0.38);
  transform: translateX(2px);
}

/* ── Upgrade 1: Active-Reading Observatory Dossier Seal & View Transitions ── */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.obs-seal-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto var(--space-5, 20px);
  padding: 12px 18px;
  border-radius: var(--radius-lg, 14px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 78%, rgba(var(--elem-rgb), 0.28));
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 32px -24px rgba(var(--elem-rgb), 0.32);
  overflow: hidden;
}
.obs-seal-bar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--elem-rgb), 0.48) 32%,
    color-mix(in srgb, var(--accent-gold) 55%, transparent) 68%,
    transparent 100%
  );
  pointer-events: none;
}
.obs-seal-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 46px;
  flex: none;
  border-radius: var(--radius-md, 10px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 75%, transparent);
  background: color-mix(in srgb, var(--bg-deep) 62%, transparent);
  padding: 4px;
}
.obs-seal-mark .pgh-svg {
  width: 100%;
  height: 100%;
  max-width: none;
}
.obs-seal-meta {
  min-width: 0;
}
.obs-seal-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.obs-seal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.obs-seal-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--ink-primary);
}
.obs-seal-big3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
}
.obs-seal-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 0.5px solid color-mix(in srgb, rgba(var(--elem-rgb), 0.45) 60%, var(--ink-quaternary));
  background: color-mix(in srgb, rgba(var(--elem-rgb), 0.10) 70%, var(--bg-deep));
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-primary);
  white-space: nowrap;
}
.obs-seal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--elem-accent, var(--accent-gold));
  box-shadow: 0 0 8px rgba(var(--elem-rgb), 0.65);
}

@media (max-width: 720px) {
  .obs-seal-bar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    padding: 12px 14px;
  }
  .obs-seal-mark {
    width: 54px;
    height: 38px;
  }
  .obs-seal-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1ms !important;
  }
}

/* ── Keyframes (GPU-only) ───────────────────────────────────────────────── */
@keyframes elem-drift-a {
  0%   { transform: translate3d(-50%, 0, 0) scale(1); opacity: 0.90; }
  100% { transform: translate3d(-47%, 3vmax, 0) scale(1.06); opacity: 1; }
}
@keyframes elem-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  100% { transform: translate3d(-4vmax, -3vmax, 0) scale(1.08); opacity: 1; }
}
@keyframes elem-drift-fire {
  0%   { transform: translate3d(-50%, 2vmax, 0) scale(0.98); opacity: 0.88; }
  100% { transform: translate3d(-48%, -2vmax, 0) scale(1.08); opacity: 1; }
}
@keyframes elem-drift-water {
  0%   { transform: translate3d(-54%, 0, 0) scale(1); opacity: 0.86; }
  100% { transform: translate3d(-44%, 2vmax, 0) scale(1.06); opacity: 1; }
}
@keyframes elem-drift-air {
  0%   { transform: translate3d(-52%, 0, 0) scale(1); opacity: 0.90; }
  100% { transform: translate3d(-46%, 2.5vmax, 0) scale(1.06); opacity: 1; }
}
@keyframes elem-drift-earth {
  0%   { transform: translate3d(-50%, 0, 0) scale(0.98); opacity: 0.88; }
  100% { transform: translate3d(-48%, 2vmax, 0) scale(1.06); opacity: 1; }
}
@keyframes asteria-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.82; }
  50%      { transform: scale(1.05); opacity: 1; }
}
@keyframes asteria-spark-pulse {
  0%, 100% { opacity: 0.88; filter: drop-shadow(0 0 10px rgba(var(--elem-rgb), 0.35)); }
  50%      { opacity: 1;    filter: drop-shadow(0 0 18px rgba(var(--elem-rgb), 0.65)); }
}
@keyframes asteria-fade-up {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Mobile optimization: lighter blur radius for silky 60fps & battery life */
@media (max-width: 720px) {
  .elemental-aura-orb {
    filter: blur(46px);
  }
  .elemental-aura-orb--a {
    width: 96vw;
    height: 68vw;
  }
  .elemental-aura-orb--b {
    width: 82vw;
    height: 60vw;
  }

  /* ── Slice 4: Mobile Shell, Zero-Overflow & Touch Polish ──────────────── */
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
  }

  body.chart-page main,
  body.chart-page .chart-stage,
  body.chart-page .chart-controls {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  body.chart-page .chart-controls {
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 6px;
  }

  /* Compact, single-row mobile chart toolbar (removes dead vertical gap) */
  .chart-toolbar {
    padding: 4px var(--space-3) !important;
    gap: 4px 10px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .chart-toolbar .cn-tools {
    width: auto !important;
    gap: 6px !important;
  }
  .chart-toolbar .cn-tools-note {
    flex: 0 1 auto !important;
    font-size: 10px !important;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  .chart-toolbar .cn-tool,
  .chart-toolbar .cn-tool-menu > .cn-menu-summary {
    min-height: 36px !important;
    padding: 0 8px !important;
  }

  /* Sleeker, glass-frosted mobile topbar */
  .topbar {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .nav-instruments .lun-badge,
  .nav-instruments .tweaks-trigger,
  .nav-toggle {
    min-height: 38px !important;
    padding: 4px 9px !important;
  }

  /* Clean single-line Live Sky ticker on mobile */
  .transit-ticker,
  .ticker-bar {
    white-space: nowrap;
    overflow: hidden;
  }
  .transit-ticker .ticker-track,
  .transit-ticker .ticker-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .transit-ticker .ticker-label {
    white-space: nowrap;
    flex: none;
  }
}

/* ── 10-Improvement Observatory Elevation System ────────────────────────── */

/* Improvement 1: Light-Theme "Letterpress Almanac" Calibration (Parchment/Porcelain) */
html[data-scheme="light"] .pg-head.pg-head-hero,
html[data-scheme="light"] .obs-seal-bar,
html[data-scheme="light"] .ob-empty-gate {
  background: color-mix(in srgb, var(--bg-surface) 94%, var(--bg-deep));
  border-color: color-mix(in srgb, var(--ink-primary) 16%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 28px -20px color-mix(in srgb, var(--ink-primary) 22%, transparent);
}
html[data-scheme="light"] .pg-head.pg-head-hero::before,
html[data-scheme="light"] .obs-seal-bar::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--accent-gold) 65%, var(--ink-primary) 25%) 38%,
    rgba(var(--elem-rgb), 0.52) 66%,
    transparent 100%
  );
}
html[data-scheme="light"] .obs-seal-mark {
  background: color-mix(in srgb, var(--bg-deep) 78%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--ink-primary) 14%, transparent);
}
html[data-scheme="light"] .obs-seal-pill {
  background: color-mix(in srgb, rgba(var(--elem-rgb), 0.12) 60%, var(--bg-surface));
  border-color: color-mix(in srgb, var(--ink-primary) 18%, transparent);
  color: var(--ink-primary);
}
html[data-scheme="light"] .elemental-aura-orb {
  opacity: 0.42;
}

/* Improvement 2: Thumb-First Mobile Observatory Dock (hidden on desktop) */
.mob-dock {
  display: none;
}
@media (max-width: 720px) {
  .mob-dock {
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 2px;
    max-width: calc(100vw - 24px);
    padding: 5px 6px;
    border-radius: 999px;
    border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 75%, rgba(var(--elem-rgb), 0.34));
    background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    backdrop-filter: blur(18px) saturate(1.15);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 14px 36px -12px rgba(0, 0, 0, 0.55);
  }
  html[data-scheme="light"] .mob-dock {
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    border-color: color-mix(in srgb, var(--ink-primary) 16%, transparent);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 10px 28px -12px rgba(0, 0, 0, 0.18);
  }
  .mob-dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--ink-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 160ms ease, background-color 160ms ease, transform 120ms ease;
  }
  .mob-dock-item:active {
    transform: scale(0.95);
  }
  .mob-dock-item.is-active {
    color: var(--accent-gold);
    background: color-mix(in srgb, rgba(var(--elem-rgb), 0.14) 70%, transparent);
  }
  .mob-dock-item.is-active::after {
    content: "";
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--elem-accent, var(--accent-gold));
  }
  .footer {
    padding-bottom: 84px !important;
  }
}

/* Improvement 3: Editorial Monograph Typography & Pull-Quote Framing */
body[data-atmosphere="on"] .ys-read .epi,
body[data-atmosphere="on"] .lp-pull,
body[data-atmosphere="on"] .lv-quote {
  border-left: 2px solid color-mix(in srgb, var(--elem-accent, var(--accent-gold)) 68%, var(--accent-gold));
  background: color-mix(in srgb, var(--bg-surface) 46%, transparent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-md, 10px) var(--radius-md, 10px) 0;
}

/* Improvement 4 & 5: Cast Form Elevation & "Calculating ephemeris..." Micro-Interaction */
body[data-atmosphere="on"] .cast-panel,
body[data-atmosphere="on"] .cast-card,
body[data-atmosphere="on"] form[action="/cast"] {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 46px -34px rgba(var(--elem-rgb), 0.28);
}
.btn-primary,
.cast-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 140ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    filter 160ms ease;
}
.btn-primary:hover,
.cast-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(var(--elem-rgb), 0.45);
}
.btn-primary:active,
.cast-submit:active {
  transform: translateY(0) scale(0.985);
}
.is-casting {
  pointer-events: none;
  opacity: 0.92;
}
.cast-reticle {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  animation: pgh-spin 0.8s linear infinite;
}

/* Improvement 6: Precision Tabular-Nums Ephemeris Tables & Hour Schedules */
.sky-table,
.cal-list,
.ph-list,
.ys-read table,
table {
  font-variant-numeric: tabular-nums;
}
body[data-atmosphere="on"] .ph-row,
body[data-atmosphere="on"] .cal-row,
body[data-atmosphere="on"] .sky-row,
body[data-atmosphere="on"] tbody tr {
  transition: background-color 150ms ease, border-color 150ms ease;
}
body[data-atmosphere="on"] .ph-row:hover,
body[data-atmosphere="on"] .cal-row:hover,
body[data-atmosphere="on"] .sky-row:hover,
body[data-atmosphere="on"] tbody tr:hover {
  background-color: color-mix(in srgb, rgba(var(--elem-rgb), 0.07) 65%, transparent);
}

/* Improvement 7: Frosted Glass Dropdowns, Tweaks Drawer & Reading Bar */
.nav-menu-panel,
.tweaks-panel,
.tweaks-drawer,
.readingbar {
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
body[data-atmosphere="on"] .nav-menu-panel,
body[data-atmosphere="on"] .tweaks-panel,
body[data-atmosphere="on"] .tweaks-drawer {
  border-color: color-mix(in srgb, var(--ink-quaternary) 72%, rgba(var(--elem-rgb), 0.30));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 50px -20px rgba(0, 0, 0, 0.65);
}

/* Improvement 8: Interactive Dossier Seal Link */
a.obs-seal-name {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
a.obs-seal-name:hover {
  color: var(--accent-gold);
  border-bottom-color: color-mix(in srgb, var(--accent-gold) 55%, transparent);
}

/* Improvement 9: Framed Obsidian-Glass Chart-Gate Action Plate */
.ob-empty-gate {
  position: relative;
  max-width: 900px;
  margin: 0 auto var(--space-8, 32px);
  padding: var(--space-5, 20px) var(--space-6, 24px);
  border-radius: var(--radius-lg, 14px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 78%, rgba(var(--elem-rgb), 0.24));
  background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 14px 36px -26px rgba(var(--elem-rgb), 0.28);
  overflow: hidden;
}
.ob-gate-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin: 0 0 var(--space-3, 12px);
}
.ob-empty-gate .empty-actions.is-inline {
  margin-top: 0;
}

/* Improvement 10: Observatory Footer Sign-Off */
body[data-atmosphere="on"] .footer {
  position: relative;
  border-top: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 75%, rgba(var(--elem-rgb), 0.26));
}
body[data-atmosphere="on"] .footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(var(--elem-rgb), 0.36) 35%,
    color-mix(in srgb, var(--accent-gold) 42%, transparent) 65%,
    transparent 100%
  );
  pointer-events: none;
}
body[data-atmosphere="on"] .footer-nav a {
  transition: color 160ms ease;
}
body[data-atmosphere="on"] .footer-nav a:hover {
  color: var(--accent-gold);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WAVES 1–4: IMPROVEMENTS #11–#49 — OBSERVATORY SYSTEM-WIDE CRAFT
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Wave 1 (#11–#20): Global Chrome, Navigation, Forms & Micro-Craft ───── */

/* #11 Topbar Active-Route Gold Underline Indicator */
.nav-link.is-active,
.nav-menu.is-active > .nav-menu-summary,
.nav-menu-summary[aria-current="page"] {
  position: relative;
  color: var(--accent-gold);
}
.nav-link.is-active::after,
.nav-menu.is-active > .nav-menu-summary::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -2px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* #12 Frosted Sticky Topbar Depth on Scroll */
body.is-scrolled .navchrome,
body.is-scrolled .topbar {
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.72);
  border-bottom-color: color-mix(in srgb, var(--ink-quaternary) 70%, rgba(var(--elem-rgb), 0.28));
}
html[data-scheme="light"] body.is-scrolled .navchrome,
html[data-scheme="light"] body.is-scrolled .topbar {
  box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.14);
}

/* #13 Live Sky Ticker Precision Telemetry Polish */
body[data-atmosphere="on"] .tt-bar {
  border-bottom: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 80%, rgba(var(--elem-rgb), 0.22));
  transition: background-color 200ms ease, border-color 200ms ease;
}
body[data-atmosphere="on"] .tt-bar [data-tt-body] {
  transition: opacity 220ms ease;
}

/* #14 Custom Elemental Branded Text Selection */
::selection {
  background: rgba(var(--elem-rgb), 0.28);
  color: var(--ink-primary);
}
html[data-scheme="light"] ::selection {
  background: rgba(var(--elem-rgb), 0.22);
  color: var(--ink-primary);
}

/* #15 Custom Ultra-Slim Observatory Scrollbars */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink-quaternary) 85%, transparent) transparent;
  }
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink-quaternary) 80%, transparent);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent-gold) 65%, var(--ink-tertiary));
}

/* #16 Universal Keyboard Focus-Visible Observatory Ring */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* #17 Form Input, Select & Textarea Tactile Elevation */
body[data-atmosphere="on"] input[type="text"],
body[data-atmosphere="on"] input[type="search"],
body[data-atmosphere="on"] input[type="email"],
body[data-atmosphere="on"] input[type="number"],
body[data-atmosphere="on"] input[type="date"],
body[data-atmosphere="on"] input[type="time"],
body[data-atmosphere="on"] select,
body[data-atmosphere="on"] textarea {
  transition:
    border-color 180ms ease,
    box-shadow 200ms ease,
    background-color 180ms ease;
}
body[data-atmosphere="on"] input[type="text"]:focus,
body[data-atmosphere="on"] input[type="search"]:focus,
body[data-atmosphere="on"] input[type="email"]:focus,
body[data-atmosphere="on"] input[type="number"]:focus,
body[data-atmosphere="on"] select:focus,
body[data-atmosphere="on"] textarea:focus {
  border-color: color-mix(in srgb, var(--accent-gold) 78%, rgba(var(--elem-rgb), 0.5));
  box-shadow: 0 0 0 3px rgba(var(--elem-rgb), 0.14);
}

/* #18 Segmented Controls & Filter Pills Micro-Interactions */
.cdb-cat-btn,
.arch-chip,
.je-view,
.solar-tab,
.gl-quick a {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 180ms ease,
    transform 130ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cdb-cat-btn:hover,
.arch-chip:hover,
.je-view:hover,
.gl-quick a:hover {
  border-color: rgba(var(--elem-rgb), 0.45);
}
.cdb-cat-btn:active,
.arch-chip:active,
.je-view:active {
  transform: scale(0.97);
}

/* #19 Toast & Status Notice Observatory Framing */
.cdb-toast,
.claim-banner,
.plus-signal {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body[data-atmosphere="on"] .cdb-toast {
  border-left: 2px solid var(--accent-gold);
}

/* #20 Back-to-Top Observatory Compass Button */
.obs-back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 88;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-primary);
  background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 72%, rgba(var(--elem-rgb), 0.35));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease,
    color 180ms ease;
}
.obs-back-top.is-shown {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.obs-back-top:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: translate3d(0, -2px, 0);
}
@media (max-width: 720px) {
  .obs-back-top {
    right: 14px;
    bottom: 78px;
    width: 38px;
    height: 38px;
  }
}

/* ── Wave 2 (#21–#30): Reading Modules, Synastry, Moon, Sky & Chart Chrome ─ */

/* #21 Collapsible Reading Module Accordion Polish */
body[data-atmosphere="on"] details.rk-mod,
body[data-atmosphere="on"] .rk-mod {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 200ms ease, box-shadow 220ms ease;
}
body[data-atmosphere="on"] details.rk-mod[open] {
  border-color: color-mix(in srgb, var(--ink-quaternary) 65%, rgba(var(--elem-rgb), 0.36));
}
body[data-atmosphere="on"] details.rk-mod > summary {
  transition: color 160ms ease, background-color 160ms ease;
}

/* #22 "Read Me" Compact Note Plate Elevation */
body[data-atmosphere="on"] .rmw,
body[data-atmosphere="on"] .rmw-line {
  border-color: color-mix(in srgb, var(--ink-quaternary) 78%, rgba(var(--elem-rgb), 0.22));
  transition: border-color 180ms ease, background-color 180ms ease;
}
body[data-atmosphere="on"] .rmw:hover {
  border-color: rgba(var(--elem-rgb), 0.38);
}

/* #23 "Where Next" Neighboring Reading Cards */
body[data-atmosphere="on"] .rn-card,
body[data-atmosphere="on"] .read-next a {
  transition:
    border-color 200ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms ease;
}
body[data-atmosphere="on"] .rn-card:hover,
body[data-atmosphere="on"] .read-next a:hover {
  border-color: rgba(var(--elem-rgb), 0.45);
  transform: translateY(-2px);
}

/* #24 Synastry Selector & Aspect Rows */
body[data-atmosphere="on"] .syn-card,
body[data-atmosphere="on"] .syn-pair,
body[data-atmosphere="on"] .syn-aspect {
  transition: border-color 180ms ease, background-color 180ms ease;
}
body[data-atmosphere="on"] .syn-aspect:hover {
  border-color: rgba(var(--elem-rgb), 0.38);
}

/* #25–#26 Live Moon & Lunation Monograph Polish (zero glow on chart wheels) */
body[data-atmosphere="on"] .lp-fact {
  border-top: 1px solid color-mix(in srgb, var(--accent-gold) 32%, var(--ink-quaternary));
}

/* #27–#28 Sky Timezone Bar & Transit Calendar Badges */
body[data-atmosphere="on"] .sky-ctrl,
body[data-atmosphere="on"] .cal-head,
body[data-atmosphere="on"] .cal-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body[data-atmosphere="on"] .cal-card:hover {
  border-color: rgba(var(--elem-rgb), 0.42);
}

/* #29–#30 Chart Toolbar Controls & Sticky Reading Bar Polish */
body[data-atmosphere="on"] .cn-tool,
body[data-atmosphere="on"] .cn-menu-summary {
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
body[data-atmosphere="on"] .cn-tool:hover,
body[data-atmosphere="on"] .cn-menu-summary:hover {
  border-color: rgba(var(--elem-rgb), 0.45);
  color: var(--accent-gold);
}

/* ── Wave 3 (#31–#40): 2027, Archive, Glossary, Archetypes, Plus & Journal ─ */

/* #31–#32 /2027 Rising Wheel & Chapter Timeline Polish */
body[data-atmosphere="on"] .ys-wheel a {
  transition: opacity 160ms ease;
}
body[data-atmosphere="on"] .ys-read .two > div {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 200ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .ys-read .two > div:hover {
  border-color: rgba(var(--elem-rgb), 0.48);
  transform: translateY(-1px);
}

/* #33 Public Chart Archive Search & Save Pill Polish */
body[data-atmosphere="on"] .cdb-search {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body[data-atmosphere="on"] .cdb-num {
  font-variant-numeric: tabular-nums;
}
body[data-atmosphere="on"] .cdb-save {
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 120ms ease;
}
body[data-atmosphere="on"] .cdb-save:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
body[data-atmosphere="on"] .cdb-save:active {
  transform: scale(0.96);
}

/* #34–#35 Glossary Codex, Quick-Jump Pills & Term Accordions */
body[data-atmosphere="on"] .gl-quick a {
  padding: 2px 8px;
  border-radius: 999px;
  border: 0.5px solid transparent;
}
body[data-atmosphere="on"] .gl-quick a:hover {
  background: color-mix(in srgb, rgba(var(--elem-rgb), 0.12) 70%, transparent);
  text-decoration: none;
}
body[data-atmosphere="on"] .gl-acc details[open] {
  border-left: 2px solid color-mix(in srgb, var(--elem-accent, var(--accent-gold)) 65%, var(--accent-gold));
}

/* #36 Archetype Library Matched Highlight & Element Badges */
body[data-atmosphere="on"] .arch-cell.is-match,
body[data-atmosphere="on"] .arch-matched {
  border-color: color-mix(in srgb, var(--accent-gold) 70%, rgba(var(--elem-rgb), 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 36px -22px rgba(var(--elem-rgb), 0.42);
}

/* #37 Asteria Plus Best-Value Card Framing */
body[data-atmosphere="on"] .plus-card.is-featured,
body[data-atmosphere="on"] .plus-card:first-child {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent-gold) 58%, rgba(var(--elem-rgb), 0.35));
}
body[data-atmosphere="on"] .plus-card.is-featured::before,
body[data-atmosphere="on"] .plus-card:first-child::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), rgba(var(--elem-rgb), 0.65), transparent);
}

/* #38–#40 Journal Composer, Saved Charts, Auth & Widgets Cards */
body[data-atmosphere="on"] .je-form,
body[data-atmosphere="on"] .je-card,
body[data-atmosphere="on"] .saved-card,
body[data-atmosphere="on"] .auth-card,
body[data-atmosphere="on"] .wdg-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: border-color 200ms ease, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
body[data-atmosphere="on"] .je-card:hover,
body[data-atmosphere="on"] .saved-card:hover,
body[data-atmosphere="on"] .wdg-card:hover {
  border-color: rgba(var(--elem-rgb), 0.42);
  transform: translateY(-1px);
}

/* ── Wave 4 (#41–#49): 17-Theme Light, Tablet, Touch, Print & Motion ────── */

/* #41 Secondary Light-Theme (Porcelain / Alabaster / Parchment) Card Contrast */
html[data-scheme="light"] .plus-card,
html[data-scheme="light"] .plus-benefits,
html[data-scheme="light"] .gl-codex a.gl-entry,
html[data-scheme="light"] .arch-cell,
html[data-scheme="light"] .je-form,
html[data-scheme="light"] .je-card,
html[data-scheme="light"] .obs-back-top {
  border-color: color-mix(in srgb, var(--ink-primary) 15%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 6px 20px -16px color-mix(in srgb, var(--ink-primary) 20%, transparent);
}
html[data-scheme="light"] .footer {
  border-top-color: color-mix(in srgb, var(--ink-primary) 14%, transparent);
}

/* #43 Responsive Tablet Breakpoint (721px–1024px) Balance */
@media (min-width: 721px) and (max-width: 1024px) {
  .pg-head.pg-head-hero {
    padding: var(--space-5, 20px) var(--space-5, 20px);
    gap: var(--space-4, 16px);
  }
  .pgh-svg {
    max-width: 176px;
  }
  .obs-seal-bar {
    padding: 12px 16px;
  }
}

/* #44–#45 Mobile Touch Ergonomics & Typography Calibration (<= 720px) */
@media (max-width: 720px) {
  a, button, summary, input, select {
    -webkit-tap-highlight-color: transparent;
  }
  .pg-head.pg-head-hero h1 {
    font-size: clamp(1.75rem, 7.2vw, 2.35rem);
    line-height: 1.12;
  }
  .pg-head.pg-head-hero .pg-intro {
    line-height: 1.62;
  }
  .ob-empty-gate {
    padding: var(--space-4, 16px);
  }
}

/* #47 Clean Minimalist Fallback when Elemental Atmosphere is OFF */
body[data-atmosphere="off"] .elemental-aura,
body[data-atmosphere="off"] .pg-head.pg-head-hero::before,
body[data-atmosphere="off"] .obs-seal-bar::before,
body[data-atmosphere="off"] .footer::before {
  display: none !important;
}

/* Strict zero-glow rule on the main chart wheel only */
body.chart-page .elemental-aura {
  display: none !important;
  opacity: 0 !important;
}
.chart-stage,
.chart-stage svg,
.lp-moment-chart,
.lp-moment-chart svg {
  box-shadow: none !important;
}

/* ── Interactive Full-Screen Chart Mode (Observatory Canvas) ────────────── */
.chart-control-fs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: color-mix(in srgb, var(--accent-gold) 46%, var(--ink-quaternary)) !important;
  color: var(--accent-gold) !important;
}
.chart-control-fs:hover {
  background: color-mix(in srgb, var(--accent-gold) 12%, transparent) !important;
}

body.is-chart-fullscreen {
  overflow: hidden !important;
}
body.is-chart-fullscreen .navchrome,
body.is-chart-fullscreen .tt-bar,
body.is-chart-fullscreen .chart-toolbar,
body.is-chart-fullscreen .mob-dock,
body.is-chart-fullscreen .obs-back-top,
body.is-chart-fullscreen .chart-controls,
body.is-chart-fullscreen .cfm-plate-cap {
  display: none !important;
}

body.is-chart-fullscreen .chart-layout {
  position: fixed !important;
  inset: 0 !important;
  z-index: 160 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--bg-deep) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body.is-chart-fullscreen .chart-stage {
  position: relative !important;
  width: 100% !important;
  height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 28px 28px 84px !important;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
body.is-chart-fullscreen .chart-stage.is-panning {
  cursor: grabbing;
}
body.is-chart-fullscreen .chart-stage svg.chart {
  width: min(86vw, 84dvh) !important;
  height: min(86vw, 84dvh) !important;
  max-width: none !important;
  max-height: none !important;
  transform-origin: center center;
  transition: transform 90ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
body.is-chart-fullscreen .chart-stage.is-panning svg.chart {
  transition: none;
}

/* Docked slide-in Inspector Panel inside Full-Screen Mode */
body.is-chart-fullscreen .chart-panel-container {
  position: relative !important;
  z-index: 170 !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
  background: color-mix(in srgb, var(--bg-surface) 94%, var(--bg-deep));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
body.is-chart-fullscreen .chart-panel-container:not(:empty) {
  width: min(410px, 34vw);
  border-left: 0.5px solid var(--ink-quaternary);
  padding: 16px;
}

/* Top-Left Minimal Chart Plate Badge */
.fs-plate-badge {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 175;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border-radius: var(--radius-md, 10px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 78%, transparent);
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  pointer-events: none;
}
.fs-plate-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink-primary);
  line-height: 1.15;
}
.fs-plate-hint {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

/* Bottom-Center Floating Frosted HUD Pill */
.fs-hud {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 175;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 74%, var(--accent-gold-soft));
  background: color-mix(in srgb, var(--bg-surface) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 42px -14px rgba(0, 0, 0, 0.65);
}
html[data-scheme="light"] .fs-hud,
html[data-scheme="light"] .fs-plate-badge {
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  border-color: color-mix(in srgb, var(--ink-primary) 16%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 28px -12px rgba(0, 0, 0, 0.16);
}
.fs-hud-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
}
.fs-hud-sep {
  width: 1px;
  height: 18px;
  background: var(--ink-quaternary);
  opacity: 0.55;
  flex: none;
}
.fs-btn,
.fs-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0.5px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.fs-btn:hover,
.fs-theme-btn:hover {
  color: var(--ink-primary);
  background: color-mix(in srgb, var(--ink-primary) 8%, transparent);
}
.fs-btn.is-active,
.fs-theme-btn.is-active {
  color: var(--accent-gold);
  border-color: color-mix(in srgb, var(--accent-gold) 45%, transparent);
  background: color-mix(in srgb, var(--accent-gold) 12%, transparent);
}
.fs-zoom-readout {
  min-width: 48px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-primary);
}
.fs-btn-exit {
  color: var(--ink-primary);
  border-color: color-mix(in srgb, var(--ink-quaternary) 80%, transparent);
}
.fs-btn-exit:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

@media (max-width: 720px) {
  body.is-chart-fullscreen .chart-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  body.is-chart-fullscreen .chart-stage {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 56px 10px 76px !important;
  }
  body.is-chart-fullscreen .chart-stage svg.chart {
    width: min(92vw, 66dvh) !important;
    height: min(92vw, 66dvh) !important;
  }
  body.is-chart-fullscreen .chart-panel-container:not(:empty) {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-height: 44dvh !important;
    border-left: 0;
    border-top: 0.5px solid var(--ink-quaternary);
  }
  .fs-plate-badge {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
  }
  .fs-plate-hint {
    display: none;
  }
  .fs-hud {
    bottom: max(10px, env(safe-area-inset-bottom));
    border-radius: 16px;
    padding: 5px 8px;
    scrollbar-width: none;
  }
  .fs-hud::-webkit-scrollbar {
    display: none;
  }
  .fs-btn-exit {
    position: sticky;
    right: 0;
    background: var(--bg-surface);
  }
}

/* ── Moon Observatory Upgrades (/moon & /moon/<slug>) ───────────────────── */

/* 1. Interactive 29.5-Day Phase Scrubber */
.mn-track {
  position: relative;
}
.mn-scrubber {
  position: absolute;
  inset: -12px 0;
  width: 100%;
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
}
.mn-scrub-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.mn-scrub-reset {
  padding: 2px 9px;
  border-radius: 999px;
  border: 0.5px solid color-mix(in srgb, var(--accent-gold) 55%, transparent);
  background: color-mix(in srgb, var(--accent-gold) 12%, transparent);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.mn-scrub-reset:hover {
  background: color-mix(in srgb, var(--accent-gold) 22%, transparent);
}

/* 2. 4-Cell Lunar Telemetry Strip */
.mn-telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: var(--space-5, 20px) 0 var(--space-4, 16px);
  font-variant-numeric: tabular-nums;
}
.mn-tel-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-md, 10px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 78%, rgba(var(--elem-rgb), 0.24));
  background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  text-decoration: none;
  color: inherit;
  transition: border-color 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mn-tel-link:hover {
  border-color: rgba(var(--elem-rgb), 0.48);
  transform: translateY(-2px);
}
.mn-tel-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.mn-tel-v {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--ink-primary);
}
.mn-tel-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
}
.mn-tel-link .mn-tel-sub {
  color: var(--accent-gold);
}
.mn-tel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--elem-accent, var(--accent-gold));
  flex: none;
}
.mn-tel-dot.is-voc {
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(var(--elem-rgb), 0.65);
}

/* 3. Upgraded 8-Lunation Cards (Elemental Pills, Eclipse Rings & Natal House Tags) */
.mc-lun-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0 2px;
}
.mc-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 0.5px solid var(--ink-quaternary);
  color: var(--ink-secondary);
  background: color-mix(in srgb, var(--bg-deep) 55%, transparent);
}
.mc-tag-el[data-el="fire"]  { border-color: rgba(235, 134, 72, 0.42); color: #f0a875; }
.mc-tag-el[data-el="earth"] { border-color: rgba(132, 184, 136, 0.42); color: #9ecfa2; }
.mc-tag-el[data-el="air"]   { border-color: rgba(134, 178, 224, 0.42); color: #a4c8ee; }
.mc-tag-el[data-el="water"] { border-color: rgba(126, 174, 214, 0.45); color: #9ec4e6; }
html[data-scheme="light"] .mc-tag-el[data-el="fire"]  { color: #9e4714; }
html[data-scheme="light"] .mc-tag-el[data-el="earth"] { color: #2f6636; }
html[data-scheme="light"] .mc-tag-el[data-el="air"]   { color: #265985; }
html[data-scheme="light"] .mc-tag-el[data-el="water"] { color: #234f78; }
.mc-tag-ecl {
  border-color: color-mix(in srgb, var(--accent-gold) 65%, transparent);
  color: var(--accent-gold);
  background: color-mix(in srgb, var(--accent-gold) 10%, transparent);
}
.mc-tag-house {
  border-color: color-mix(in srgb, var(--accent-gold) 45%, var(--ink-quaternary));
  color: var(--ink-primary);
}
.mc-lun.is-eclipse .mc-seal {
  border-radius: 50%;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-gold) 45%, transparent);
}

/* 4. Natal Moon <-> Sky Moon Resonance Bridge */
.mn-bridge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: var(--space-4, 16px) 0 var(--space-5, 20px);
  padding: 14px 18px;
  border-radius: var(--radius-lg, 14px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 75%, rgba(var(--elem-rgb), 0.30));
  background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.mn-bridge-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mn-bridge-sky {
  text-align: right;
}
.mn-bridge-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.mn-bridge-v {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink-primary);
}
.mn-bridge-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
}
.mn-bridge-arc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 10px;
  border-left: 0.5px solid var(--ink-quaternary);
  border-right: 0.5px solid var(--ink-quaternary);
}
.mn-bridge-sym {
  font-size: 1.15rem;
  color: var(--accent-gold);
  line-height: 1;
}
.mn-bridge-rel {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  white-space: nowrap;
}

/* 5. Lunation Monograph Header Polish (/moon/<slug>) */
body[data-atmosphere="on"] .lp-head {
  position: relative;
  padding: var(--space-5, 20px) var(--space-6, 24px);
  border-radius: var(--radius-lg, 14px);
  border: 0.5px solid color-mix(in srgb, var(--ink-quaternary) 78%, rgba(var(--elem-rgb), 0.28));
  background: color-mix(in srgb, var(--bg-surface) 84%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-width: 720px) {
  .mn-telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .mn-bridge {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }
  .mn-bridge-sky {
    text-align: left;
  }
  .mn-bridge-arc {
    flex-direction: row;
    justify-content: flex-start;
    border-left: 0;
    border-right: 0;
    border-top: 0.5px solid var(--ink-quaternary);
    border-bottom: 0.5px solid var(--ink-quaternary);
    padding: 6px 0;
    gap: 8px;
  }
}

/* #48 Pure Ink-on-Paper Print & PDF Stylesheet Harmony */
@media print {
  .mob-dock,
  .obs-back-top,
  .elemental-aura,
  .starfield,
  #galaxy-canvas {
    display: none !important;
  }
  .footer {
    padding-bottom: 16px !important;
  }
}

/* #49 Subtle GPU-Composited Observatory Hero Entrance */
body[data-atmosphere="on"] .pg-head.pg-head-hero,
body[data-atmosphere="on"] .obs-seal-bar {
  animation: asteria-fade-up 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .cast-reticle,
  .pg-head.pg-head-hero,
  .obs-seal-bar {
    animation: none !important;
  }
  .obs-back-top,
  .mob-dock-item {
    transition: none !important;
  }
  .elemental-aura-orb,
  .hero-mark::before,
  .hm-spark,
  .dw-spark,
  .dw-glow,
  .chart-stage::before,
  .lp-moment-chart::before,
  .lp-moment-chart svg.chart,
  .mn-fig::before,
  .hero-copy > .eyebrow,
  .hero-title,
  .hero-lead,
  .hero-actions {
    animation: none !important;
  }
  .asteria-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
