/* ═══════════════════════════════════════════════════════════════════════════
   ANHAD — Majestic Sky Background System v4.0 (PERFORMANCE SPECIAL EDITION)
   Background image variables + Card palettes.
   Stars/Moon/Sun/Celestial elements REMOVED — background WebPs handle visuals.
   ─────────────────────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────────────────────
   §1  TEXT CONTRAST SYSTEM
   ─────────────────────────────────────────────────────────────────────────── */

/* MORNING — warm dark espresso/mahogany on a peach-orange sky (HOME ONLY) */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="morning"] {
  --sky-txt-primary:   #1A0402;
  --sky-txt-secondary: #3A0F05;
  --sky-txt-label:     #5C1E0A;
  --sky-txt-accent:    #822508;
  --sky-txt-gold:      #A83800;
  --sky-text-shadow-dark: none;
  --sky-text-shadow-light: none;
  --sky-greeting-bg:   transparent;
  --sky-bg-glass:      rgba(255, 230, 200, 0.52);
  --sky-bg-glass-border: rgba(220, 110, 50, 0.22);
}

/* DAY — deep midnight navy on a bright azure sky (HOME ONLY) */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="day"] {
  --sky-txt-primary:   #000814;
  --sky-txt-secondary: #02162E;
  --sky-txt-label:     #05284D;
  --sky-txt-accent:    #0A4078;
  --sky-txt-gold:      #0C5096;
  --sky-text-shadow-dark: none;
  --sky-text-shadow-light: none;
  --sky-greeting-bg:   transparent;
  --sky-bg-glass:      rgba(220, 244, 255, 0.52);
  --sky-bg-glass-border: rgba(80, 160, 230, 0.22);
}

/* EVENING — deep burgundy-wine on a crimson-gold sunset sky (HOME ONLY) */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="evening"] {
  --sky-txt-primary:   #140205;
  --sky-txt-secondary: #38050C;
  --sky-txt-label:     #5C0A15;
  --sky-txt-accent:    #821415;
  --sky-txt-gold:      #A82205;
  --sky-text-shadow-dark: none;
  --sky-text-shadow-light: none;
  --sky-greeting-bg:   transparent;
  --sky-bg-glass:      rgba(255, 228, 198, 0.50);
  --sky-bg-glass-border: rgba(190, 80, 20, 0.22);
}

/* NIGHT — Matches Pure Dark Mode Exactly */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="night"] {
  --sky-txt-primary:   #F5F5F7;
  --sky-txt-secondary: #8E8E93;
  --sky-txt-label:     #8E8E93;
  --sky-txt-accent:    #D4943A;
  --sky-txt-gold:      #FFD60A;
  --sky-text-shadow-dark: none;
  --sky-text-shadow-light: none;
  --sky-greeting-bg:   transparent;
  --sky-bg-glass:      rgba(28, 28, 30, 0.88);
  --sky-bg-glass-border: rgba(255, 255, 255, 0.08);
}

/* Clean high-contrast typography for ANHAD Header (Home Morning/Day/Evening) - ZERO dark shadows */
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .home-header .header__title,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .home-header .header-title {
  color: #3D260D !important;
  -webkit-text-fill-color: #3D260D !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 700 !important;
}

/* MORNING TIME: Deep warm bronze title — crisp & completely shadowless */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="morning"] .home-header .header__title,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="morning"] .home-header .header-title {
  color: #3D260D !important;
  -webkit-text-fill-color: #3D260D !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 700 !important;
}

/* DAY TIME: Sharp dark title on bright sky — no shadow */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="day"] .home-header .header__title,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="day"] .home-header .header-title {
  color: #000814 !important;
  -webkit-text-fill-color: #000814 !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 700 !important;
}

/* EVENING TIME: Warm golden brown title — crisp & completely shadowless */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="evening"] .home-header .header__title,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="evening"] .home-header .header-title {
  color: #3B2406 !important;
  -webkit-text-fill-color: #3B2406 !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 700 !important;
}

[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .home-header .header__title-gurmukhi,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .home-header .gurmukhi-title {
  color: #5C2408 !important;
  -webkit-text-fill-color: #5C2408 !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 600 !important;
}

/* MORNING TIME: Deep earthy gold Gurmukhi subtitle */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="morning"] .home-header .header__title-gurmukhi,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="morning"] .home-header .gurmukhi-title {
  color: #5C2408 !important;
  -webkit-text-fill-color: #5C2408 !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 600 !important;
}

/* DAY TIME: Deep navy Gurmukhi subtitle on bright sky */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="day"] .home-header .header__title-gurmukhi,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="day"] .home-header .gurmukhi-title {
  color: #02162E !important;
  -webkit-text-fill-color: #02162E !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 600 !important;
}

/* EVENING TIME: Deep warm amber Gurmukhi subtitle */
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="evening"] .home-header .header__title-gurmukhi,
[data-anhad-home][data-theme-mode="auto"][data-time-of-day="evening"] .home-header .gurmukhi-title {
  color: #5C2E05 !important;
  -webkit-text-fill-color: #5C2E05 !important;
  text-shadow: none !important;
  filter: none !important;
  font-weight: 600 !important;
}
/* DAYTIME / MORNING / EVENING Sky contrast overrides (Excluded at NIGHT so night mode is 100% identical to pure dark mode) */
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .english-title {
  color: var(--sky-txt-gold, #D4943A) !important;
  text-shadow: var(--sky-text-shadow-light, 0 1px 8px rgba(0,0,0,0.18)) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .header-subtitle {
  color: var(--sky-txt-secondary, #4A1508) !important;
  text-shadow: var(--sky-text-shadow-dark, 0 1px 4px rgba(0,0,0,0.12)) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) #greetingSalutation,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .greeting__salutation {
  color: var(--sky-txt-accent, #9C3610) !important;
  text-shadow: var(--sky-text-shadow-dark, 0 1px 6px rgba(0,0,0,0.16)) !important;
  font-weight: 700 !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) #greetingGurbani,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .greeting__gurbani {
  color: var(--sky-txt-primary, #260804) !important;
  text-shadow: var(--sky-text-shadow-dark, 0 1px 8px rgba(0,0,0,0.12)) !important;
  font-weight: 600 !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) #greetingTranslation,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .greeting__translation {
  color: var(--sky-txt-secondary, #4A1508) !important;
  text-shadow: var(--sky-text-shadow-dark, none) !important;
  font-weight: 600 !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .progress-inline__label {
  color: var(--sky-txt-label, #6B2810) !important;
  text-shadow: var(--sky-text-shadow-dark, none) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .progress-inline__text {
  color: var(--sky-txt-secondary, #4A1508) !important;
  text-shadow: var(--sky-text-shadow-dark, none) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .greeting__text {
  background: var(--sky-greeting-bg, transparent);
  border-radius: 50%;
  padding: 15px 0 !important;
  margin-top: -10px;
}

/* Nitnem Tracker specific text visibility (HOME ONLY - daytime only) */
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .card-title,
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .card-subtitle {
  color: var(--sky-txt-primary, #1A0402) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .app-header {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
[data-anhad-home][data-theme-mode="auto"]:not([data-time-of-day="night"]) .header-blur-bg {
  background: rgba(0, 0, 0, 0.4) !important;
}

/* Auto/dynamic mode intentionally matches light/dark mode's greeting layout:
   guru name + Gurbani line + translation visible, portrait the same 152px
   size as the base .greeting__guru-portrait rule. (Previously this hid the
   text and enlarged the portrait to 170px — removed per explicit request:
   the size/text mismatch between auto and light/dark was itself the bug.) */

/* Hide celestial elements entirely so they never waste GPU */
#anhad-sky-canvas,
#anhad-sun,
#anhad-moon,
.anhad-cloud,
.anhad-star,
.anhad-shooting-star {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
