/* MSK Developers — Astronomy Console premium dark theme */

.astro-page,
body.astro-page {
  margin: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #0b1020, #020617);
  color: #e5e7eb;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.astro-page *,
.astro-page *::before,
.astro-page *::after {
  box-sizing: border-box;
}

.astro-page a {
  text-decoration: none;
  color: inherit;
}

/* Back navigation */
.back-btn,
.back {
  position: fixed;
  top: 16px;
  left: 16px;
  padding: 8px 16px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid #1e293b;
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 0 18px rgba(110, 231, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-btn:hover,
.back:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(167, 139, 250, 0.35);
}

/* Hero / header */
.astro-page .hero,
.astro-page header.hero {
  text-align: center;
  padding: 48px 16px 28px;
}

.astro-page header:not(.hero) {
  text-align: center;
  padding: 56px 16px 28px;
}

.astro-page header h1,
.astro-page .hero h1 {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: #6ee7ff;
  line-height: 1.2;
}

/* Gradient title text only — keeps emoji/icons visible (clip-text hides them) */
.astro-page header h1 .title-gradient,
.astro-page .hero h1 .title-gradient {
  background: linear-gradient(135deg, #6ee7ff, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.astro-page .hero-emoji {
  display: inline-block;
  vertical-align: middle;
  -webkit-text-fill-color: initial;
  color: #6ee7ff;
  filter: drop-shadow(0 0 10px rgba(110, 231, 255, 0.45));
}

.astro-page .sub,
.astro-page header .sub {
  opacity: 0.85;
  margin-top: 8px;
}

.astro-page .company {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #a78bfa;
}

/* Layout */
.astro-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.astro-page .grid.astro-legacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px 16px 35px;
}

/* Cards */
.astro-page .card,
.astro-page .form-card,
.astro-page .info-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 0 30px rgba(110, 231, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.astro-page .grid.astro-legacy-grid .card {
  text-align: center;
  padding: 24px 20px;
  touch-action: manipulation;
}

.astro-page .grid .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(110, 231, 255, 0.2);
}

.astro-page .grid .card:active {
  transform: scale(0.97);
}

.astro-page .grid .card .icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.astro-page .grid .card h2 {
  margin: 0 0 8px;
  color: #6ee7ff;
  font-size: 1.15rem;
}

.astro-page .grid .card p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.8;
}

/* Icon animations */
.astro-page .icon.rotate { animation: astro-rotate 4s linear infinite; }
.astro-page .icon.glow { animation: astro-glow 2s ease-in-out infinite; }
.astro-page .icon.bounce { animation: astro-bounce 2s ease infinite; }
.astro-page .icon.orbit { animation: astro-orbit 6s linear infinite; }
.astro-page .icon.pulse { animation: astro-pulse 2.5s ease infinite; }

@keyframes astro-rotate { to { transform: rotate(360deg); } }
@keyframes astro-glow { 0%, 100% { filter: drop-shadow(0 0 4px #6ee7ff); } 50% { filter: drop-shadow(0 0 12px #a78bfa); } }
@keyframes astro-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes astro-orbit { 0% { transform: rotate(0deg) translateX(4px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(4px) rotate(-360deg); } }
@keyframes astro-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.85; } }

/* Forms */
.astro-page .form-title {
  font-size: 1.3rem;
  color: #a78bfa;
  margin-bottom: 18px;
}

.astro-page .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 768px) {
  .astro-page .form-grid { grid-template-columns: 1fr; }
}

.astro-page .form-group,
.astro-page .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  position: relative;
}

.astro-page label {
  font-size: 0.8rem;
  opacity: 0.75;
}

.astro-page input,
.astro-page select,
.astro-page textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.astro-page input:focus,
.astro-page select:focus,
.astro-page textarea:focus {
  outline: none;
  border-color: #6ee7ff;
  box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.2);
}

.astro-page button,
.astro-page .allow-btn,
.astro-page .submit-wrap button {
  width: 100%;
  padding: 15px;
  border-radius: 26px;
  border: none;
  background: linear-gradient(135deg, #6ee7ff, #38bdf8);
  color: #020617;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.astro-page button:hover,
.astro-page .allow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(110, 231, 255, 0.3);
}

.astro-page .allow-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Map */
.astro-page #map {
  width: 100%;
  height: 280px;
  border-radius: 16px;
  margin-top: 18px;
  border: 1px solid #1e293b;
}

/* Timezone dropdown */
.astro-page .tz-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 14px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
  z-index: 20;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.astro-page .tz-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.astro-page .tz-item:hover {
  background: #0f172a;
}

/* Errors */
.astro-page .error,
.astro-page .error-box {
  background: #2a0f14;
  border: 1px solid #7f1d1d;
  color: #fecaca;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.astro-page .error-box { display: none; max-width: 1200px; margin-left: auto; margin-right: auto; }

/* Metrics */
.astro-page .metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.astro-page .metric {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.astro-page .metric:hover {
  transform: translateY(-2px);
  border-color: #6ee7ff;
}

.astro-page .metric span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 4px;
}

.astro-page .metric strong {
  font-size: 1.1rem;
  color: #6ee7ff;
}

.astro-page .metric.highlight strong {
  color: #a78bfa;
}

.astro-page .section-title {
  font-size: 1.2rem;
  color: #a78bfa;
  margin: 24px 0 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.astro-page .live-time {
  font-size: 1.4rem;
  color: #6ee7ff;
  margin-top: 6px;
}

/* Tables */
.astro-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.astro-page th,
.astro-page td {
  padding: 10px;
  border-bottom: 1px solid #1e293b;
  text-align: center;
}

.astro-page th {
  color: #a78bfa;
}

/* CSV / export buttons */
.astro-page .csv-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.astro-page .csv-btn,
.astro-page .csv-buttons button {
  flex: 1;
  min-width: 200px;
  padding: 14px;
  border-radius: 26px;
  border: none;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  color: #020617;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.astro-page .csv-btn:hover,
.astro-page .csv-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.35);
}

/* Moon phases */
.astro-page .phase-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  transition: transform 0.2s;
}

.astro-page .phase-card:hover {
  transform: translateY(-3px);
}

.astro-page .phase-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.astro-page .stat-box {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.astro-page .calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

/* Skeleton */
.astro-page .skeleton {
  background: linear-gradient(90deg, #020617 25%, #0f172a 37%, #020617 63%);
  background-size: 400% 100%;
  animation: astro-shimmer 1.4s ease-in-out infinite;
  border-radius: 12px;
  min-height: 18px;
  height: 18px;
}

@keyframes astro-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Info card on hub */
.astro-page .info-card {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 24px;
}

.astro-page .info-card h2 {
  color: #a78bfa;
  margin-top: 0;
}

.astro-page .info-card .example {
  background: #020617;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  border: 1px dashed rgba(110, 231, 255, 0.35);
  margin-top: 12px;
}

.astro-page .info-card code {
  color: #6ee7ff;
  font-weight: 600;
}

/* Footer */
.astro-page footer {
  text-align: center;
  padding: 24px;
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Search */
.astro-page .search {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #1e293b;
  background: #020617;
  color: #e5e7eb;
  margin-bottom: 14px;
}

/* Status (planet page) */
.astro-page .status {
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.astro-page .status.fetch { color: #6ee7ff; }
.astro-page .status.error { color: #fecaca; background: #2a0f14; }

/* Form layout helpers */
.astro-page .form-grid > div {
  display: flex;
  flex-direction: column;
}

.astro-page .form-grid label {
  margin-bottom: 6px;
}

.astro-page .form-grid input,
.astro-page .form-grid select {
  width: 100%;
  appearance: auto;
  -webkit-appearance: auto;
}

.astro-page .form-grid input[type="date"] {
  padding-right: 14px;
}

.astro-page .submit-wrap {
  margin-top: 22px;
}

.astro-page .card,
.astro-page .form-card {
  margin-bottom: 26px;
}

.astro-page .notice {
  font-size: 0.85rem;
  opacity: 0.85;
  border-left: 4px solid #6ee7ff;
  padding-left: 12px;
}

.astro-page .notice p {
  margin: 6px 0 0;
}

.astro-page .highlight {
  border: 1px solid rgba(110, 231, 255, 0.35);
}

.astro-page .result strong {
  color: #6ee7ff;
}

.astro-page input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.astro-page #errorBox.error {
  display: none;
}

.astro-page .tz-item {
  border-bottom: 1px solid #1e293b;
}

.astro-page .tz-item:last-child {
  border-bottom: none;
}

/* Planet page */
.astro-page .planet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 20px;
}

.astro-page .planet-grid .card h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.astro-page .data {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.astro-page .box {
  background: #020617;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.astro-page .box span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
}

.astro-page .box strong {
  display: block;
  margin-top: 4px;
  color: #6ee7ff;
  font-size: 1.05rem;
}

.astro-page .status.error {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #1e293b;
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.25);
}

.astro-page button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.astro-page #locBtn {
  width: auto;
  padding: 14px 22px;
  display: inline-block;
}

/* Moon phases */
.astro-page .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.astro-page .stat-box {
  background: #020617;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.astro-page .stat-box span {
  font-size: 1.8rem;
}

.astro-page .stat-box strong {
  display: block;
  margin-top: 6px;
  color: #6ee7ff;
}

.astro-page .month {
  margin-top: 34px;
}

.astro-page .month h2 {
  color: #a78bfa;
  margin-bottom: 16px;
}

.astro-page .phase-name {
  margin-top: 6px;
  font-weight: 700;
  color: #6ee7ff;
}

.astro-page .phase-time {
  margin-top: 6px;
  font-size: 0.85rem;
  opacity: 0.85;
}

.astro-page .csv-btn {
  width: auto;
  padding: 12px 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
}

/* PDF loader */
.astro-page.pdf-loader header,
.astro-page.pdf-loader footer {
  padding: 18px 26px;
  text-align: center;
  opacity: 0.8;
  font-size: 0.9rem;
}

.astro-page.pdf-loader main {
  max-width: 1100px;
  margin: auto;
  padding: 30px 22px 60px;
}

.astro-page.pdf-loader .pdf-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

@media (max-width: 900px) {
  .astro-page.pdf-loader .pdf-grid {
    grid-template-columns: 1fr;
  }
}

.astro-page.pdf-loader .panel {
  background: linear-gradient(145deg, #0f172a, #020617);
  border-radius: 22px;
  padding: 28px;
}

.astro-page.pdf-loader .bar {
  height: 14px;
  border-radius: 14px;
  background: #020617;
  overflow: hidden;
}

.astro-page.pdf-loader .bar span {
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, #22d3ee, #38bdf8);
  animation: astro-bar-move 1.2s infinite;
}

@keyframes astro-bar-move {
  from { margin-left: -40%; }
  to { margin-left: 100%; }
}

.astro-page.pdf-loader .info {
  background: #020617;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid #1e293b;
}

.astro-page.pdf-loader #downloadBtn,
.astro-page.pdf-loader #openBtn {
  width: auto;
  padding: 14px 26px;
  border-radius: 28px;
  display: none;
}

.astro-page.pdf-loader #openBtn.secondary {
  background: #1e293b;
  color: #e5e7eb;
}

@media (prefers-reduced-motion: reduce) {
  .astro-page .icon.rotate,
  .astro-page .icon.glow,
  .astro-page .icon.bounce,
  .astro-page .icon.orbit,
  .astro-page .icon.pulse,
  .astro-page .skeleton,
  .astro-page.pdf-loader .bar span {
    animation: none !important;
  }
}


/* ========================================================
   MSK Developers Unified Theme Integration for Astronomy
   ======================================================== */
[data-theme] body.astro-page,
[data-theme] .astro-page {
  background: hsl(var(--b1)) !important;
  color: hsl(var(--bc)) !important;
  font-family: var(--msk-font-body) !important;
}

[data-theme] .astro-page .back-btn,
[data-theme] .astro-page .back {
  display: none !important;
}

[data-theme] .astro-page header:not(.hero) h1,
[data-theme] .astro-page .hero h1 {
  font-family: var(--msk-font-display) !important;
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page .sub,
[data-theme] .astro-page header .sub {
  color: hsl(var(--bc) / 0.75) !important;
}

[data-theme] .astro-page .company {
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page .card,
[data-theme] .astro-page .form-card,
[data-theme] .astro-page .info-card,
[data-theme] .astro-page .phase-card {
  background: hsl(var(--b2)) !important;
  border: 1px solid hsl(var(--bc) / 0.12) !important;
  color: hsl(var(--bc)) !important;
  box-shadow: 0 4px 20px hsl(var(--n) / 0.08) !important;
  border-radius: var(--msk-radius-lg) !important;
}

[data-theme] .astro-page .grid .card h2 {
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page .form-title,
[data-theme] .astro-page .section-title,
[data-theme] .astro-page th {
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page input,
[data-theme] .astro-page select,
[data-theme] .astro-page textarea {
  background: hsl(var(--b1)) !important;
  color: hsl(var(--bc)) !important;
  border: 1px solid hsl(var(--bc) / 0.2) !important;
  border-radius: 0.75rem !important;
}

[data-theme] .astro-page input:focus,
[data-theme] .astro-page select:focus,
[data-theme] .astro-page textarea:focus {
  border-color: hsl(var(--p)) !important;
  box-shadow: 0 0 0 3px hsl(var(--p) / 0.2) !important;
}

[data-theme] .astro-page button,
[data-theme] .astro-page .allow-btn,
[data-theme] .astro-page .submit-wrap button,
[data-theme] .astro-page .csv-btn,
[data-theme] .astro-page .csv-buttons button {
  background: hsl(var(--p)) !important;
  color: hsl(var(--pc)) !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px hsl(var(--p) / 0.25) !important;
}

[data-theme] .astro-page button:hover,
[data-theme] .astro-page .allow-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 24px hsl(var(--p) / 0.35) !important;
}

[data-theme] .astro-page .metric,
[data-theme] .astro-page .stat-box {
  background: hsl(var(--b3) / 0.45) !important;
  border: 1px solid hsl(var(--bc) / 0.1) !important;
  color: hsl(var(--bc)) !important;
  border-radius: 0.875rem !important;
}

[data-theme] .astro-page .metric strong,
[data-theme] .astro-page .live-time {
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page .tz-list {
  background: hsl(var(--b1)) !important;
  border: 1px solid hsl(var(--bc) / 0.2) !important;
  color: hsl(var(--bc)) !important;
}

[data-theme] .astro-page .tz-item:hover {
  background: hsl(var(--b2)) !important;
}

[data-theme] .astro-page table {
  border-collapse: collapse;
}

[data-theme] .astro-page th,
[data-theme] .astro-page td {
  border-bottom: 1px solid hsl(var(--bc) / 0.1) !important;
  color: hsl(var(--bc)) !important;
}

[data-theme] .astro-page th {
  background: hsl(var(--b3) / 0.5) !important;
  color: hsl(var(--p)) !important;
}

[data-theme] .astro-page .card.notice {
  background: hsl(var(--p) / 0.08) !important;
  border-left: 4px solid hsl(var(--p)) !important;
  border-top: 1px solid hsl(var(--p) / 0.2) !important;
  border-right: 1px solid hsl(var(--p) / 0.2) !important;
  border-bottom: 1px solid hsl(var(--p) / 0.2) !important;
  color: hsl(var(--bc)) !important;
}

/* Global emoji visibility & crisp font fallback across all themes */
.astro-page .icon,
.astro-page .phase-icon,
.astro-page .stat-box span,
.astro-page .hero-emoji,
.astro-page .phase-card .phase-icon,
.phase-stats-grid span,
.astro-icon-card .icon,
.icon.rotate,
.icon.glow,
.icon.bounce,
.icon.orbit,
.icon.pulse {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
  -webkit-text-fill-color: initial !important;
  color: initial !important;
  display: inline-block;
}

/* Animations standalone (usable anywhere) */
.icon.rotate { animation: astro-rotate 4s linear infinite; }
.icon.glow { animation: astro-glow 2s ease-in-out infinite; }
.icon.bounce { animation: astro-bounce 2s ease infinite; }
.icon.orbit { animation: astro-orbit 6s linear infinite; }
.icon.pulse { animation: astro-pulse 2.5s ease infinite; }

/* Moon phases statistics grid - prevents collision with DaisyUI .stats */
.phase-stats-grid,
.astro-page .phase-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 18px !important;
}

/* DaisyUI .hero stack prevention for astro pages */
.astro-page .hero > * {
  grid-column-start: auto !important;
  grid-row-start: auto !important;
  max-width: none !important;
}

/* Protect top navbar buttons on astro pages */
.astro-page #main-nav .btn {
  font: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}
.astro-page #main-nav .btn-ghost {
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  min-height: 2.5rem !important;
  height: 2.5rem !important;
  width: 2.5rem !important;
  padding: 0 !important;
}
.astro-page #main-nav .btn-outline {
  background: transparent !important;
  border: 1px solid hsl(var(--bc) / 0.25) !important;
  color: hsl(var(--bc)) !important;
  min-height: 2rem !important;
  height: 2rem !important;
  padding: 0 0.85rem !important;
  font-size: 0.875rem !important;
  border-radius: 9999px !important;
}


/* Modern 3-Column Astronomy Tools Grid */
.astro-tools-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.5rem !important;
  margin-bottom: 3rem !important;
}

@media (max-width: 1024px) {
  .astro-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .astro-tools-grid {
    grid-template-columns: 1fr !important;
  }
}

.astro-tools-grid .astro-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  background: hsl(var(--b2)) !important;
  border: 1px solid hsl(var(--bc) / 0.12) !important;
  color: hsl(var(--bc)) !important;
  border-radius: 1.25rem !important;
  padding: 1.75rem !important;
  text-align: left !important;
  text-decoration: none !important;
  box-shadow: 0 4px 20px hsl(var(--n) / 0.08) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.astro-tools-grid .astro-card:hover {
  transform: translateY(-5px) !important;
  border-color: hsl(var(--p) / 0.6) !important;
  box-shadow: 0 16px 36px hsl(var(--n) / 0.16) !important;
  text-decoration: none !important;
}

.astro-tools-grid .astro-card h2 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.5rem 0 !important;
  color: hsl(var(--bc)) !important;
  transition: color 0.2s ease !important;
}

.astro-tools-grid .astro-card:hover h2 {
  color: hsl(var(--p)) !important;
}

.astro-tools-grid .astro-card p {
  font-size: 0.925rem !important;
  color: hsl(var(--bc) / 0.78) !important;
  line-height: 1.6 !important;
  margin: 0 0 1.5rem 0 !important;
  text-align: left !important;
}

.astro-tools-grid .astro-card-footer {
  padding-top: 1rem !important;
  border-top: 1px solid hsl(var(--bc) / 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: hsl(var(--p)) !important;
}

/* Premium Celestial Icon Badges — Fixed & Unified Animations */
.celestial-badge {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1rem;
  background: hsl(var(--b1));
  border: 1px solid hsl(var(--bc) / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1.25rem;
  /* overflow:hidden clips the drop-shadow glow — keep visible but use contain:layout */
  overflow: visible;
  box-shadow: 0 2px 10px hsl(var(--n) / 0.08);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  /* Inner children animate, badge itself does NOT transform — avoids overflow clipping */
}

/* Duo badge: stack sun large + moon small in bottom-right corner */
.celestial-badge-duo {
  position: relative;
}

.celestial-badge-duo .celestial-sun {
  font-size: 1.7rem;
}

.celestial-moon-sm {
  font-size: 0.95rem !important;
  position: absolute;
  bottom: 4px;
  right: 4px;
  animation: astro-moon-float 3.2s ease-in-out infinite !important;
  filter: drop-shadow(0 0 4px rgba(110, 231, 255, 0.75)) !important;
}

.astro-tools-grid .astro-card:hover .celestial-badge {
  box-shadow: 0 0 20px hsl(var(--p) / 0.25);
  border-color: hsl(var(--p) / 0.4);
}

/* ── Sun: gentle slow spin with warm glow ── */
.celestial-sun {
  display: inline-block;
  animation: astro-sun-spin 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center center;
  filter: drop-shadow(0 0 5px rgba(255, 190, 0, 0.7));
  line-height: 1;
}

/* ── Moon: gentle float with cyan glow ── */
.celestial-moon {
  display: inline-block;
  animation: astro-moon-float 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(110, 231, 255, 0.7));
  line-height: 1;
}

/* ── Almanac (📅🌕): scale-pulse with purple glow ── */
.celestial-almanac {
  display: inline-block;
  animation: astro-scale-glow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.65));
  line-height: 1;
}

/* ── Angle Finder (📐): bob up/down with teal glow ── */
.celestial-angle {
  display: inline-block;
  animation: astro-moon-float 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.65));
  line-height: 1;
}

/* ── Planet (🪐): gentle rock side-to-side + orange glow ── */
.celestial-planet {
  display: inline-block;
  animation: astro-planet-rock 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.65));
  line-height: 1;
}

/* ── Moon Phases (🌑🌗🌕): fade-pulse with cool purple glow ── */
.celestial-phases {
  display: inline-block;
  animation: astro-scale-glow 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.6));
  line-height: 1;
  letter-spacing: -0.05em;
  font-size: 1.55rem;  /* slightly smaller so 3 emojis fit nicely */
}

/* ── Aviation (🚁📡): float with green teal glow ── */
.celestial-aviation {
  display: inline-block;
  animation: astro-moon-float 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.6));
  line-height: 1;
  letter-spacing: -0.05em;
  font-size: 1.55rem;
}

/* ── Keyframes ── */

@keyframes astro-sun-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes astro-moon-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-4px); }
}

/* Scale + filter-glow pulse (replaces astro-glow which uses filter: drop-shadow but
   gradient-text can invert it — use scale instead to universally look good) */
@keyframes astro-scale-glow {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.4)); }
  50%       { transform: scale(1.1); filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.8)); }
}

/* Planet gentle tilt/rock — fully contained, no translateX */
@keyframes astro-planet-rock {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%       { transform: rotate(8deg)  scale(1.05); }
}

/* Quick Location Presets Button */
.preset-btn {
  background: hsl(var(--b3)) !important;
  color: hsl(var(--bc)) !important;
  border: 1px solid hsl(var(--bc) / 0.15) !important;
  border-radius: 9999px !important;
  padding: 4px 12px !important;
  font-size: 0.8rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.preset-btn:hover {
  background: hsl(var(--p)) !important;
  color: hsl(var(--pc)) !important;
  border-color: hsl(var(--p)) !important;
}
