.numerology-gematria-page {
  padding-bottom: 32px;
}

/* Submit button: show spinner without injecting HTML */
.numerology-gematria-page #ng-submit.ng-calculating::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.55em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.15em;
  opacity: 0.9;
  animation: ng-submit-spin 800ms linear infinite;
}

@keyframes ng-submit-spin {
  to { transform: rotate(360deg); }
}

/* Focus Mode: when a control panel tool is open, give it most of the screen */
body.ng-ng-focus-lock {
  overflow: hidden;
}

.numerology-gematria-page[data-ng-focus-tool]::after {
  content: "";
  position: fixed;
  inset: 0;
  /* Fully opaque backdrop: when a tool is "Open" the page beneath should not show through. */
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 900;
  pointer-events: none;
}

.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="core"],
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="results"] {
  /* Hide underlying columns entirely in focus mode. */
  opacity: 0;
  filter: none;
  visibility: hidden;
}

/* In focus mode, keep the rest of the page non-interactive. */
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="core"],
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="results"] {
  pointer-events: none;
}

/* Keep Results non-interactive while focused */
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="results"] {
  pointer-events: none;
}

/* Light mode: also use an opaque backdrop. */
body:not(.dark-mode) .numerology-gematria-page[data-ng-focus-tool]::after {
  background: #fff;
}

.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] {
  position: fixed;
  left: 24px;
  right: 24px;
  top: 96px;
  bottom: 24px;
  z-index: 901;
  overflow: auto;
}

@media (max-width: 768px) {
  .numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] .cosmic-card {
  height: 100%;
  overflow: auto;
}

/* Hide non-open tool cards in focus mode to maximize workspace */
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] .ng-teaser-card[data-ng-tool-open="false"] {
  display: none;
}

/* Make the open tool feel like a full workstation */
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] .ng-teaser-card[data-ng-tool-open="true"] {
  padding: 18px;
}

.numerology-gematria-page[data-ng-focus-tool] .ng-tool-breakdown {
  max-height: 50vh;
}

@media (prefers-reduced-motion: no-preference) {
  .numerology-gematria-page[data-ng-focus-tool]::after {
    animation: ng-focus-backdrop-in 220ms ease both;
  }

  .numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] {
    animation: ng-focus-panel-in 260ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  }

  .numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="core"],
  .numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="results"] {
    transition: opacity 220ms ease, filter 220ms ease;
  }

  @keyframes ng-focus-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes ng-focus-panel-in {
    from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
}

/* The site applies a large global top margin to .chart-container to clear the logo banner.
   This page has its own header block, so we tighten the offset to reduce empty space. */
.chart-container.numerology-gematria-page {
  margin-top: 0px !important;
  max-width: 100% !important;
  overflow: visible;
}

/* Desktop: keep content clear of the fixed glass menu toggle/credits pill. */
@media (min-width: 992px) {
  .chart-container.numerology-gematria-page {
    margin-top: 0px !important;
  }
}

@media (max-width: 768px) {
  .chart-container.numerology-gematria-page {
    margin-top: 0px !important;
  }
}

@media (max-width: 480px) {
  .chart-container.numerology-gematria-page {
    margin-top: 0px !important;
  }
}

/* ==============================
   Compact layout overrides
   ============================== */

.container-numerology {
  padding-top: 1.1rem;
  padding-bottom: 1.5rem;
  max-width: 1440px;
}

.ng-hero-header {
  margin-bottom: 1.25rem;
}

/* ==============================
   Command Console layout
   ============================== */

.ng-command-console {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.ng-console-col {
  min-width: 0;
}

.ng-console-col .cosmic-card {
  height: auto;
}

/* Tablet: compact split, tools below */
@media (min-width: 768px) {
  .ng-command-console {
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    grid-template-areas:
      "core results"
      "tools tools";
  }

  .ng-console-col[data-ng-col="core"] {
    grid-area: core;
  }

  .ng-console-col[data-ng-col="tools"] {
    grid-area: tools;
  }

  .ng-console-col[data-ng-col="results"] {
    grid-area: results;
  }
}

/* Desktop/Tablet wide: true 3-column console */
@media (min-width: 1100px) {
  .ng-command-console {
    grid-template-columns:
      minmax(360px, 0.95fr)
      minmax(380px, 1.00fr)
      minmax(420px, 1.15fr);
    grid-template-areas: "core tools results";
  }
}

/* ==============================
   Tool tabs (mobile-first)
   ============================== */

.ng-tools-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body:not(.dark-mode) .ng-tools-tabs {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.ng-tools-tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body:not(.dark-mode) .ng-tools-tab {
  color: rgba(20, 20, 30, 0.80);
}

.ng-tools-tab:hover {
  transform: translateY(-1px);
}

.ng-tools-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body:not(.dark-mode) .ng-tools-tab.is-active {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(20, 20, 30, 0.92);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.ng-tools-stack {
  display: grid;
  gap: 12px;
}

/* On wide desktop the tools are always visible; hide the mobile tab-strip */
@media (min-width: 1100px) {
  .ng-tools-tabs {
    display: none;
  }
}

.ng-breadcrumb-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.ng-breadcrumb-wrapper .breadcrumb {
  margin: 0;
  padding: 0.5rem 0;
}

.ng-title-main {
  font-size: clamp(2.15rem, 2.8vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.18);
}

.ng-hero-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.ng-hero-lead {
  font-size: 1rem;
  opacity: 0.82;
  max-width: 700px;
  margin: 0 auto;
}

.numerology-gematria-page .mb-3 {
  margin-bottom: 1rem !important;
}

.numerology-gematria-page .mb-4 {
  margin-bottom: 1.5rem !important;
}

.numerology-gematria-page .g-4 {
  --bs-gutter-y: 1.25rem;
  --bs-gutter-x: 1.25rem;
}

.numerology-gematria-page .mt-5 {
  margin-top: 2.5rem !important;
}

@media (max-width: 768px) {
  .container-numerology {
    padding-top: 1rem;
  }

  .ng-hero-header {
    margin-bottom: 1.5rem;
  }

  .ng-title-main {
    font-size: 2.25rem;
  }

  .ng-breadcrumb-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ==============================
   Premium density enhancements
   ============================== */

.ng-hero-main {
  position: relative;
  padding: 1.25rem;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    linear-gradient(to bottom, transparent, rgba(10, 14, 23, 0.22));
}

/* Desktop density: keep the console mostly above the fold */
@media (min-width: 992px) {
  .container-numerology {
    padding-top: 0.9rem;
    padding-bottom: 1.25rem;
  }

  .ng-hero-main {
    padding: 1rem;
  }

  .ng-hero-header {
    margin-bottom: 1rem;
  }

  .ng-breadcrumb-wrapper {
    margin-bottom: 1rem;
  }

  .numerology-gematria-page .cosmic-card {
    padding: 1.25rem !important;
  }
}

.numerology-gematria-page .cosmic-card {
  padding: 1.5rem !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.numerology-gematria-page .cosmic-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.numerology-gematria-page .form-label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.92;
  margin-bottom: 0.5rem;
}

.numerology-gematria-page .form-control {
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body:not(.dark-mode) .numerology-gematria-page .form-control {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.numerology-gematria-page .form-control:focus {
  border-color: rgba(212, 175, 55, 0.60);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

body:not(.dark-mode) .numerology-gematria-page .form-control:focus {
  background: rgba(255, 255, 255, 0.85);
}

#ng-state-badge {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ng-result-card {
  padding: 0.875rem !important;
}

.ng-result-value {
  font-size: 1.75rem;
  line-height: 1.2;
}

.ng-results-intro {
  font-size: 0.92rem;
}

.ng-results-howto {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

body:not(.dark-mode) .ng-results-howto {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.ng-results-howto-title {
  font-weight: 650;
  opacity: 0.92;
  margin-bottom: 0.35rem;
}

.ng-results-howto-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.25rem;
  font-size: 0.92rem;
  opacity: 0.86;
}

.ng-results-howto-note {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.78;
}

.ng-result-desc {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.78;
}

.ng-gematria-desc {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.ng-explain-lead {
  font-size: 0.92rem;
  opacity: 0.82;
  margin-bottom: 0.75rem;
}

.ng-explain-stack {
  display: grid;
  gap: 10px;
}

.ng-explain-item {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

body:not(.dark-mode) .ng-explain-item {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.72);
}

.ng-explain-item > summary {
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  list-style: none;
}

.ng-explain-item > summary::-webkit-details-marker {
  display: none;
}

.ng-explain-body {
  padding: 0 0.9rem 0.9rem;
}

.ng-explain-meaning {
  font-size: 0.92rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.ng-explain-apply {
  font-size: 0.92rem;
  opacity: 0.86;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
}

body:not(.dark-mode) .ng-explain-apply {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.03);
}

.ng-explain-math {
  display: grid;
  gap: 0.5rem;
}

.ng-explain-p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.85;
}

.ng-explain-line {
  font-size: 0.92rem;
  opacity: 0.9;
}

.ng-explain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ng-explain-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .ng-explain-chip {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.04);
}

.ng-explain-step {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
}

body:not(.dark-mode) .ng-explain-step {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.03);
}

.ng-explain-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ng-explain-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

body:not(.dark-mode) .ng-explain-pill {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.65);
}

.ng-explain-eq {
  font-weight: 650;
  opacity: 0.9;
}

.ng-explain-reduce {
  display: grid;
  gap: 8px;
}

/* System theme variables */
.numerology-gematria-page {
  --ng-accent-color: #1E6B7F;
  --ng-primary-glow: rgba(30, 107, 127, 0.26);
  --ng-secondary-glow: rgba(135, 206, 235, 0.18);
}

.numerology-gematria-page.ng-system-vedic {
  --ng-accent-color: #4A3C8C;
  --ng-primary-glow: rgba(74, 60, 140, 0.28);
  --ng-secondary-glow: rgba(161, 140, 209, 0.18);
}

/* Prestige header */
.ng-prestige-header .breadcrumb {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.45);
}

.ng-prestige-header .breadcrumb a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

body:not(.dark-mode) .ng-prestige-header .breadcrumb a {
  color: rgba(20, 20, 30, 0.82);
}

.ng-prestige-header .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.65);
}

body:not(.dark-mode) .ng-prestige-header .breadcrumb-item.active {
  color: rgba(20, 20, 30, 0.55);
}

.ng-certification-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.86);
  width: fit-content;
}

body:not(.dark-mode) .ng-certification-badge {
  background: rgba(255, 255, 255, 0.75);
  color: rgba(20, 20, 30, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ng-badge-icon {
  color: #D4AF37;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

.ng-title-glow {
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.18);
}

.ng-amp {
  color: var(--ng-accent-color);
  text-shadow: 0 0 22px var(--ng-primary-glow);
}

.ng-hero-subtitle {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.ng-subtitle-word {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

body:not(.dark-mode) .ng-subtitle-word {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: no-preference) {
  .ng-subtitle-word {
    opacity: 0;
    transform: translateY(8px);
    animation: ng-subtitle-in 700ms ease forwards;
  }
  .ng-subtitle-word:nth-child(1) { animation-delay: 40ms; }
  .ng-subtitle-word:nth-child(2) { animation-delay: 120ms; }
  .ng-subtitle-word:nth-child(3) { animation-delay: 200ms; }
  .ng-subtitle-word:nth-child(4) { animation-delay: 280ms; }
  .ng-subtitle-word:nth-child(5) { animation-delay: 360ms; }

  @keyframes ng-subtitle-in {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ==============================
   Celestial Codex environment
   (lightweight CSS-only layers)
   ============================== */

.numerology-gematria-page {
  position: relative;
  isolation: isolate;
}

.numerology-gematria-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.9;
  background:
    radial-gradient(circle at 18% 12%, rgba(212, 175, 55, 0.07) 0%, transparent 35%),
    radial-gradient(circle at 82% 20%, rgba(135, 206, 235, 0.06) 0%, transparent 32%),
    radial-gradient(circle at 50% 85%, rgba(161, 140, 209, 0.06) 0%, transparent 38%),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
}

body.dark-mode .numerology-gematria-page::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(212, 175, 55, 0.10) 0%, transparent 42%),
    radial-gradient(circle at 78% 22%, rgba(135, 206, 235, 0.08) 0%, transparent 38%),
    radial-gradient(circle at 55% 88%, rgba(161, 140, 209, 0.10) 0%, transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10, 14, 23, 1) 0%, rgba(0, 0, 0, 1) 100%);
}

.numerology-gematria-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(60deg, rgba(212, 175, 55, 0.35) 1px, transparent 1px),
    linear-gradient(-60deg, rgba(212, 175, 55, 0.35) 1px, transparent 1px),
    linear-gradient(0deg, rgba(212, 175, 55, 0.18) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: 0 0, 0 0, 0 0;
  filter: blur(0.2px);
}

/* Optional particle field (DOM injected) */
.ng-particle-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.65;
}

.ng-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.85) 0%, transparent 70%);
  will-change: transform;
  animation-name: ng-particle-float;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.numerology-gematria-page.ng-system-vedic .ng-particle {
  background: radial-gradient(circle, rgba(161, 140, 209, 0.72) 0%, transparent 70%);
}

@keyframes ng-particle-float {
  from { transform: translate3d(0, 105vh, 0); }
  to { transform: translate3d(0, -120vh, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .numerology-gematria-page::before {
    animation: ng-bg-drift 18s linear infinite;
    background-size: 140% 140%;
  }

  @keyframes ng-bg-drift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 80%; }
  }
}

/* Make the existing cosmic card feel more premium on this page */
.numerology-gematria-page .cosmic-card {
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.18) !important;
  /* Increased opacity for better legibility - nearly solid */
  background: #121216 !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  overflow: visible;
}

/* In Focus Mode, make the active tool card nearly opaque to block distractions */
.numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] .cosmic-card {
  background: #121216 !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
  border-color: rgba(212, 175, 55, 0.35) !important;
  opacity: 1 !important;
}

body:not(.dark-mode) .numerology-gematria-page[data-ng-focus-tool] .ng-console-col[data-ng-col="tools"] .cosmic-card {
  background: #ffffff !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.15) !important;
}

body:not(.dark-mode) .numerology-gematria-page .cosmic-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
}

.numerology-gematria-page .cosmic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(212,175,55,0.08), transparent 40%, rgba(255,255,255,0.06));
  opacity: 0.55;
}

.numerology-gematria-page h1,
.numerology-gematria-page h2,
.numerology-gematria-page h3 {
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.12);
}

.ng-input-wrap {
  position: relative;
}

.ng-gematria-counter {
  position: absolute;
  right: 10px;
  top: 10px;
  pointer-events: none;
}

.ng-results-panel {
  transition: opacity 220ms ease;
}

.ng-results-panel.ng-fade {
  opacity: 0;
}

.ng-result-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

body:not(.dark-mode) .ng-result-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.ng-result-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

.ng-result-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Number reveal ceremony (GPU-friendly: transform/opacity only) */
.ng-result-value {
  color: var(--ng-accent-color);
  text-shadow: 0 0 16px var(--ng-secondary-glow);
}

.ng-result-value.ng-revealing {
  animation: ng-ceremonial-reveal 980ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ng-ceremonial-reveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.92) rotateY(-70deg);
    text-shadow: 0 0 0 var(--ng-primary-glow);
  }
  35% {
    opacity: 0.85;
    transform: translate3d(0, 0, 0) scale(1.06) rotateY(18deg);
    text-shadow: 0 0 28px var(--ng-primary-glow);
  }
  75% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.98) rotateY(-8deg);
    text-shadow: 0 0 30px var(--ng-primary-glow);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0);
    text-shadow: 0 0 18px var(--ng-secondary-glow);
  }
}

/* System transition hook */
#ng-results.ng-transitioning {
  position: relative;
}

#ng-results.ng-transitioning::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(212,175,55,0.14) 0%, transparent 55%);
  animation: ng-wave 520ms ease both;
}

@keyframes ng-wave {
  0% { opacity: 0; transform: scale(0.96); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.02); }
}

/* ==============================
   The Axis toggle (custom)
   ============================== */

.ng-axis-toggle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.ng-axis-option {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

body:not(.dark-mode) .ng-axis-option {
  color: rgba(20, 20, 30, 0.92);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.ng-axis-option:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.ng-axis-option.is-active {
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.10);
}

.ng-axis-rod {
  position: relative;
  width: 110px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 107, 127, 0.28), rgba(155, 138, 109, 0.18), rgba(74, 60, 140, 0.28));
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.numerology-gematria-page.ng-system-western .ng-axis-rod {
  background: linear-gradient(90deg, rgba(30, 107, 127, 0.34), rgba(155, 138, 109, 0.18), rgba(30, 107, 127, 0.30));
}

.numerology-gematria-page.ng-system-vedic .ng-axis-rod {
  background: linear-gradient(90deg, rgba(74, 60, 140, 0.34), rgba(155, 138, 109, 0.18), rgba(74, 60, 140, 0.30));
}

.ng-axis-gem {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 45%),
    linear-gradient(135deg, rgba(212,175,55,0.95), rgba(184,134,11,0.75));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.32), 0 0 20px rgba(212,175,55,0.18);
  transition: left 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.numerology-gematria-page.ng-system-vedic .ng-axis-gem {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 45%),
    linear-gradient(135deg, rgba(161, 140, 209, 0.95), rgba(74, 60, 140, 0.78));
  box-shadow: 0 10px 28px rgba(0,0,0,0.32), 0 0 22px rgba(161, 140, 209, 0.20);
}

/* Premium calculating button: keep backgrounds from interfering with label/spinner */
#ng-submit.ng-calculating {
  position: relative;
  overflow: hidden;
}

/* Ensure no secondary spinner or vortex effect */
#ng-submit.ng-calculating::after {
  display: none !important;
  content: none !important;
}

/* Brute-force hide the global UIEnhancer spinner if it gets injected */
#ng-submit .loading-spinner {
  display: none !important;
}

@keyframes ng-vortex {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ng-axis-toggle.ng-system-vedic .ng-axis-gem {
  left: calc(100% - 42px);
}

@media (max-width: 480px) {
  .ng-axis-toggle {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ng-axis-rod {
    width: 100%;
    height: 14px;
  }
  .ng-axis-gem {
    width: 28px;
    height: 28px;
    border-radius: 10px;
  }
}

.ng-gematria-panel {
  border-left: 3px solid rgba(212, 175, 55, 0.35);
  padding-left: 14px;
}

/* Exploration teaser cards */
.ng-teaser-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  /* Darker background for better contrast against the card */
  background: rgba(0, 0, 0, 0.25);
  max-width: 100%;
  overflow: hidden;
}

body:not(.dark-mode) .ng-teaser-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 250, 0.6);
}

.ng-teaser-title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ng-teaser-sub {
  opacity: 0.85;
  margin: 6px 0 10px;
}

/* Exploration Halls tools */
.ng-teaser-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ng-teaser-head > div {
  min-width: 0;
}

.ng-teaser-title,
.ng-teaser-sub {
  overflow-wrap: anywhere;
}

.ng-tool-toggle {
  flex: 0 0 auto;
}

.ng-tool-toggle {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

body:not(.dark-mode) .ng-tool-toggle {
  color: rgba(20, 20, 30, 0.92);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.ng-tool-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.ng-tool-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  max-width: 100%;
}

.ng-console-col[data-ng-col="tools"] .form-control,
.ng-console-col[data-ng-col="tools"] .form-select {
  max-width: 100%;
}

/* Long select text (like the English/Hebrew mode label) should not force width */
.ng-console-col[data-ng-col="tools"] .form-select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Force solid background for the select input itself */
  background-color: #121216 !important;
  color: #ffffff !important;
}

body:not(.dark-mode) .ng-console-col[data-ng-col="tools"] .form-select {
  background-color: #ffffff !important;
  color: #121216 !important;
}

.ng-tool-body .form-select.form-select-sm {
  background-color: #121216 !important;
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff !important;
}

/* Ensure dropdown options are solid and readable */
.ng-tool-body .form-select.form-select-sm option {
  background-color: #1a1a2e;
  color: #fff;
}

body:not(.dark-mode) .ng-tool-body .form-select.form-select-sm option {
  background-color: #ffffff;
  color: #1a1a2e;
}

.ng-tool-body .form-select.form-select-sm:focus {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

/* Custom select (used for Gematria Mode) so the opened menu is fully opaque */
.ng-select {
  position: relative;
}

.ng-select-trigger {
  width: 100%;
  text-align: left;
}

.ng-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2000;
  border-radius: 12px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #121216 !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ng-select-option {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 10px;
  padding: 10px 10px;
  background: #121216 !important;
  color: inherit;
}

.ng-select-option:hover,
.ng-select-option[aria-selected="true"] {
  background: #1a1a22 !important;
}

body:not(.dark-mode) .ng-select-menu {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

body:not(.dark-mode) .ng-select-option {
  background: #ffffff !important;
  color: rgba(20, 20, 30, 0.92);
}

body:not(.dark-mode) .ng-select-option:hover,
body:not(.dark-mode) .ng-select-option[aria-selected="true"] {
  background: #f3f4f8 !important;
}

/* Gematria compare UI (A / B / C) */
.ng-gem-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 992px) {
  .ng-gem-compare-grid {
    grid-template-columns: 1fr;
  }
}

.ng-gem-slot {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px;
  background: rgba(18, 18, 22, 0.35);
}

body:not(.dark-mode) .ng-gem-slot {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.ng-gem-slot-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ng-gem-slot-badge {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

body:not(.dark-mode) .ng-gem-slot-badge {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.04);
}

.ng-gem-slot-label {
  font-size: 12px;
  opacity: 0.86;
}

.ng-gem-computed {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.86;
  line-height: 1.3;
}

.ng-gem-totals-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.75fr repeat(3, minmax(54px, 0.6fr));
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body:not(.dark-mode) .ng-gem-totals-grid {
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.ng-gem-totals-row {
  display: contents;
}

.ng-gem-totals-cell {
  padding: 10px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

body:not(.dark-mode) .ng-gem-totals-cell {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ng-gem-totals-grid .ng-gem-totals-cell:nth-child(4n) {
  border-right: 0;
}

.ng-gem-totals-grid .ng-gem-totals-cell:nth-last-child(-n+4) {
  border-bottom: 0;
}

.ng-gem-totals-head .ng-gem-totals-cell {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.82;
  background: rgba(255, 255, 255, 0.04);
}

body:not(.dark-mode) .ng-gem-totals-head .ng-gem-totals-cell {
  background: rgba(0, 0, 0, 0.03);
}

.ng-gem-totals-note {
  grid-column: 2 / span 3;
  padding: 0 10px 10px;
  font-size: 12px;
  opacity: 0.78;
}

.ng-gem-compare {
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.92;
}

.ng-gem-breakdown-head {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ng-gem-breakdown-label {
  font-weight: 700;
  font-size: 13px;
}

.ng-gem-breakdown-tabs {
  display: flex;
  gap: 8px;
}

.ng-gem-breakdown-tab {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.ng-gem-breakdown-tab.is-active {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
}

body:not(.dark-mode) .ng-gem-breakdown-tab {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
}

body:not(.dark-mode) .ng-gem-breakdown-tab.is-active {
  background: rgba(0, 0, 0, 0.07);
}

.ng-gem-words {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.ng-gem-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

body:not(.dark-mode) .ng-gem-word-row {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.02);
}

.ng-gem-word-text {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ng-gem-word-vals {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ng-tool-sub {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.8;
}

body:not(.dark-mode) .ng-tool-body {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==============================
   Control Panels: solid surfaces
   (no see-through backgrounds)
   ============================== */

/* Make the entire Control Panels column fully opaque */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .cosmic-card {
  background: #121216 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Remove decorative shine layer that can look like translucency */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .cosmic-card::before {
  opacity: 0 !important;
}

/* Solid tool cards inside Control Panels */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-teaser-card {
  background: #1a1a22 !important;
}

body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .cosmic-card {
  background: #ffffff !important;
}

body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-teaser-card {
  background: #ffffff !important;
}

/* Solid inputs/selects in Control Panels */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .form-control,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .form-select,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-toggle {
  background: #121216 !important;
  background-color: #121216 !important;
  color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .form-control,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .form-select,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-toggle {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #121216 !important;
}

/* Solid dropdown list items (where browser allows styling) */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] select option {
  background-color: #121216 !important;
  color: #ffffff !important;
}

body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] select option {
  background-color: #ffffff !important;
  color: #121216 !important;
}

/* Solid tool output surfaces (kv/steps/breakdowns) inside Control Panels.
   These were using low-alpha rgba() backgrounds, which read as translucency
   over the page's glass/gradient layers. */
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-kv,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-step,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-breakdown,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-letter,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-mini,
.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-nav {
  background: #1a1a22 !important;
  background-color: #1a1a22 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-kv,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-step,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-breakdown,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-letter,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-mini,
body:not(.dark-mode) .numerology-gematria-page .ng-console-col[data-ng-col="tools"] .ng-tool-nav {
  background: #ffffff !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.ng-tool-output {
  margin-top: 10px;
}

.ng-tool-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

body:not(.dark-mode) .ng-tool-kv {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

.ng-tool-k {
  font-size: 0.85rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ng-tool-v {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ng-accent-color);
  text-shadow: 0 0 14px var(--ng-secondary-glow);
}

.ng-tool-sub {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  opacity: 0.8;
}

.ng-tool-steps {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.ng-tool-step {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

body:not(.dark-mode) .ng-tool-step {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

.ng-tool-step-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.85;
  margin-bottom: 8px;
}

.ng-tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ng-tool-pill {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.20);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

body:not(.dark-mode) .ng-tool-pill {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.ng-tool-eq {
  margin-top: 8px;
  opacity: 0.9;
}

.ng-tool-strong {
  font-weight: 800;
  color: var(--ng-accent-color);
}

.ng-tool-totals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .ng-tool-totals {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* In the Control Panels column, keep totals stacked to avoid squeezing/overflow */
.ng-console-col[data-ng-col="tools"] .ng-tool-totals {
  grid-template-columns: 1fr !important;
}

.ng-tool-breakdown {
  margin-top: 10px;
  max-height: 190px;
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  max-width: 100%;
}

body:not(.dark-mode) .ng-tool-breakdown {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

.ng-tool-breakdown-empty {
  opacity: 0.8;
  font-size: 0.9rem;
  padding: 6px 2px;
}

.ng-tool-letter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

body:not(.dark-mode) .ng-tool-letter {
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.ng-tool-letter + .ng-tool-letter {
  margin-top: 8px;
}

.ng-tool-letter-ch {
  font-weight: 900;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}

.ng-tool-letter-vals {
  display: inline-flex;
  gap: 6px;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ng-tool-mini {
  min-width: 28px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
  font-size: 0.8rem;
}

body:not(.dark-mode) .ng-tool-mini {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

.ng-tool-cycle-nav {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.ng-tool-nav {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 10px 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body:not(.dark-mode) .ng-tool-nav {
  color: rgba(20, 20, 30, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.7);
}

.ng-tool-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.ng-tool-cycles {
  display: grid;
  gap: 10px;
}

.ng-gematria-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .ng-gematria-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ng-gematria-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

body:not(.dark-mode) .ng-gematria-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

.ng-gematria-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

.ng-gematria-value {
  font-size: 1.4rem;
  font-weight: 700;
}

/* Final override: global stylesheets also style .cosmic-card with glass/opacity.
   Force the Control Panels "popup" surfaces AND the custom dropdowns to be fully opaque. */
html body .chart-container.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .cosmic-card,
html body .chart-container.numerology-gematria-page .ng-select-menu {
  background: #121216 !important;
  background-color: #121216 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9) !important;
}

html body .chart-container.numerology-gematria-page .ng-select-menu .ng-select-option {
  background: #121216 !important;
  background-color: #121216 !important;
  opacity: 1 !important;
}

html body .chart-container.numerology-gematria-page .ng-select-menu .ng-select-option:hover {
  background: #2a2a35 !important;
  background-color: #2a2a35 !important;
}

/* Light mode overrides */
body:not(.dark-mode) .chart-container.numerology-gematria-page .ng-console-col[data-ng-col="tools"] .cosmic-card,
body:not(.dark-mode) .chart-container.numerology-gematria-page .ng-select-menu {
  background: #ffffff !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  color: #14141e !important;
}

body:not(.dark-mode) .chart-container.numerology-gematria-page .ng-select-menu .ng-select-option {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #14141e !important;
}

body:not(.dark-mode) .chart-container.numerology-gematria-page .ng-select-menu .ng-select-option:hover {
  background: #f0f0f5 !important;
  background-color: #f0f0f5 !important;
}

/* ==============================
   Flatpickr (date popup) — fully opaque
   ============================== */

.numerology-gematria-page .flatpickr-calendar {
  background: #121216 !important;
  color: rgba(255, 255, 255, 0.92);
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.65) !important;
}

.numerology-gematria-page .flatpickr-months .flatpickr-month,
.numerology-gematria-page .flatpickr-weekdays {
  background: #121216 !important;
}

.numerology-gematria-page .flatpickr-day,
.numerology-gematria-page .flatpickr-weekday {
  color: rgba(255, 255, 255, 0.9) !important;
}

.numerology-gematria-page .flatpickr-day.selected,
.numerology-gematria-page .flatpickr-day.startRange,
.numerology-gematria-page .flatpickr-day.endRange {
  background: rgba(212, 175, 55, 0.20) !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  color: rgba(255, 255, 255, 0.96) !important;
}

body:not(.dark-mode) .numerology-gematria-page .flatpickr-calendar {
  background: #ffffff !important;
  color: rgba(20, 20, 30, 0.92) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18) !important;
}

body:not(.dark-mode) .numerology-gematria-page .flatpickr-months .flatpickr-month,
body:not(.dark-mode) .numerology-gematria-page .flatpickr-weekdays {
  background: #ffffff !important;
}

body:not(.dark-mode) .numerology-gematria-page .flatpickr-day,
body:not(.dark-mode) .numerology-gematria-page .flatpickr-weekday {
  color: rgba(20, 20, 30, 0.92) !important;
}
