/* ═══════════════════════════════════════════════════════════════════════════════
   ✦✦✦ ANHAD — TRENDORA-EXTREME iOS PREMIUM DESIGN SYSTEM ✦✦✦
   
   Design Philosophy: RADICAL RESTRAINT × TRENDORA WARMTH
   - ONE accent color (warm spiritual gold)
   - 60%+ whitespace ratio
   - Maximum 3 information layers per card
   - iOS 18/26 SF Pro typography system
   - Trendora-inspired warm surfaces with depth
   - Zero decorative clutter — only functional beauty
   
   "The pinnacle of sophistication is simplicity."
═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   @FONT-FACE CUSTOM IMPORTS
═══════════════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Trajan Pro';
  src: url('../assets/fonts/TrajanPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Trajan Pro';
  src: url('../assets/fonts/TrajanPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Optimus Princeps';
  src: url('../assets/fonts/OptimusPrinceps.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Optimus Princeps';
  src: url('../assets/fonts/OptimusPrincepsSemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: optional;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   § 1. DESIGN TOKENS — TRENDORA ONE-ACCENT SYSTEM
═══════════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Surface System (Trendora-inspired warm grays) ── */
  --surface-primary: #F1F3F6;
  --surface-secondary: #F1F3F6;
  --surface-tertiary: #E8EAED;
  --surface-elevated: #F1F3F6;
  --surface-sunken: #E2E4E8;
  --surface-warm: #FFFDF9;

  /* ── Text System (iOS HIG precise) ── */
  --text-primary: #1A1A1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #AEAEB2;
  --text-quaternary: #C7C7CC;
  --text-inverse: #FFFFFF;

  /* ── ONE Spiritual Accent — Trendora Warm Gold ── */
  --accent: #D4943A;
  --accent-hover: #C4842A;
  --accent-pressed: #B47420;
  --accent-light: #F8ECDA;
  --accent-lighter: #FDF6ED;
  --accent-surface: #FFFAF3;
  --accent-gradient: linear-gradient(135deg, #E8A94E 0%, #C4842A 100%);
  --accent-gradient-subtle: linear-gradient(160deg, #FDF6ED 0%, #F8ECDA 100%);
  --accent-shadow: 0 8px 32px rgba(212, 148, 58, 0.25);
  --accent-shadow-sm: 0 4px 16px rgba(212, 148, 58, 0.18);
  --accent-glow: 0 0 40px rgba(212, 148, 58, 0.15);

  /* ── Semantic Colors (surgically applied) ── */
  --live: #FF3B30;
  --live-bg: rgba(255, 59, 48, 0.08);
  --live-shadow: 0 4px 16px rgba(255, 59, 48, 0.25);
  --success: #30D158;
  --success-bg: rgba(48, 209, 88, 0.08);
  --success-shadow: 0 4px 16px rgba(48, 209, 88, 0.2);
  --purple: #5856D6;
  --purple-bg: rgba(88, 86, 214, 0.06);
  --blue: #007AFF;
  --blue-bg: rgba(0, 122, 255, 0.06);
  --streak: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);

  /* ── Shadow System (Trendora depth layers) ── */
  --shadow-0: none;
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
  --shadow-2xl: none;
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-float: none;
  --shadow-inset: none;
  --shadow-clay-btn: none;
  --shadow-clay-btn-active: none;
  --shadow-clay-nav: none;

  /* ── Radii (Trendora generous curves) ── */
  --radius-xs: 16px;
  --radius-sm: 20px;
  --radius-md: 26px;
  --radius-lg: 32px;
  --radius-xl: 40px;
  --radius-2xl: 48px;
  --radius-3xl: 56px;
  --radius-full: 9999px;

  /* ── Typography Scale (iOS 18 HIG — SF Pro) ── */
  --font-system: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-rounded: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-gurmukhi: 'Noto Sans Gurmukhi', sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;

  --text-jumbo: 2.5rem;
  /* 40px — Hero moments */
  --text-large-title: 2.125rem;
  /* 34px — Page titles */
  --text-title-1: 1.75rem;
  /* 28px — Section titles */
  --text-title-2: 1.375rem;
  /* 22px — Card titles */
  --text-title-3: 1.25rem;
  /* 20px — Subsection */
  --text-headline: 1.0625rem;
  /* 17px — Headlines */
  --text-body: 1.0625rem;
  /* 17px — Body text */
  --text-callout: 1rem;
  /* 16px — Callouts */
  --text-subhead: 0.9375rem;
  /* 15px — Subheadlines */
  --text-footnote: 0.8125rem;
  /* 13px — Secondary info */
  --text-caption: 0.75rem;
  /* 12px — Captions */
  --text-caption-2: 0.6875rem;
  /* 11px — Small captions */
  --text-micro: 0.625rem;
  /* 10px — Badges */

  --weight-ultralight: 100;
  --weight-thin: 200;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --weight-black: 900;

  /* ── Spacing (4px micro-grid, 8px base grid) ── */
  --space-0: 0px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;

  /* ── Layout ── */
  --page-margin: 20px;
  --max-width: 430px;
  --nav-height: 84px;
  --mini-player-height: 68px;

  /* ── Animation (iOS-native spring physics) ── */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-ios-spring: cubic-bezier(0.28, 0.84, 0.42, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);

  --duration-instant: 0.1s;
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
  --duration-slow: 0.5s;
  --duration-slower: 0.7s;
  --duration-slowest: 1s;

  /* ── Safe Areas ── */
  --safe-top: max(env(safe-area-inset-top, 24px), 24px);
  --safe-bottom: max(env(safe-area-inset-bottom, 16px), 16px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* ── Z-Index Scale ───────────────────────────────────────────────────────
     THE layering contract for ANHAD. Ordered lowest to highest; every floating
     surface should use one of these rather than inventing a number.

       content            page content, in flow
       fab                floating page actions (Favorites "New Note")
       sticky             sticky section headers, page headers
       nav                the bottom navigation pill
       mini-player        the floating player — above the page, BELOW anything
                          that asks for the user's attention
       sheet-overlay      the dimming scrim behind a bottom sheet
       sheet              the bottom sheet itself
       modal              full-screen modals and dialogs
       banner             the install banner
       toast              transient confirmations
       system             app-level chrome: offline banner, update prompt, the
                          SPA loading overlay
       critical           blocking dialogs that must beat everything

     The rule that matters: MODALS ARE ABOVE THE MINI PLAYER. The player is
     ambient; a modal is a deliberate interruption. Before this, #gmp sat at
     9000 — above the Insights modal (2000), the Favorites note modal (1000) and
     Home's radio sheet (1000/999) — so it painted over every one of them.
     ──────────────────────────────────────────────────────────────────────── */
  --z-base: 0;
  --z-above: 10;
  --z-fab: 50;
  --z-sticky: 100;
  --z-nav: 200;
  --z-mini-player: 300;
  --z-sheet-overlay: 400;
  --z-sheet: 410;
  --z-modal: 500;
  --z-banner: 600;
  --z-toast: 700;
  --z-system: 800;
  --z-critical: 900;
  /* Retained: still referenced by older rules. Aliases the modal tier. */
  --z-overlay: 500;

  /* ── Blur Tokens ── */
  --blur-sm: 8px;
  --blur-md: 20px;
  --blur-lg: 40px;
  --blur-xl: 60px;
  --blur-2xl: 80px;

  /* ── Border ── */
  --border-hairline: 0.33px solid rgba(0, 0, 0, 0.08);
  --border-thin: 0.5px solid rgba(0, 0, 0, 0.06);
  --border-light: 1px solid rgba(0, 0, 0, 0.04);
  --border-card: 1px solid rgba(0, 0, 0, 0.03);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   § 2. RESET & BASE — Surgical Foundation
═══════════════════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  font-size: 16px !important;
  /* Lock base rem — immune to system Display Size */
  /* scroll-behavior: smooth — REMOVED: interferes with native iOS momentum scrolling, causes jank */
  text-size-adjust: 100% !important;
  -webkit-text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: manipulation;
  /* Prevents double-tap zoom on all pages */
}

body {
  font-family: var(--font-system);
  background-color: transparent;
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.47059;
  letter-spacing: -0.022em;

  position: relative;
}

/* iOS rubber-band scroll background match - DISABLED to prevent extra scroll height */
/* body::before {
  content: '';
  position: fixed;
  top: -100vh;
  left: 0;
  right: 0;
  height: 100vh;
  background: var(--surface-secondary);
  z-index: -2;
} */

/* Blue-gold ambient atmosphere — REMOVED to prevent visible bar beside header */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Selection */
::selection {
  background: var(--accent-light);
  color: var(--text-primary);
}

::-moz-selection {
  background: var(--accent-light);
  color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-touch-callout: none;
}

input,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2.5px solid var(--accent) !important;
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Active state universal */
.touchable:active,
button:active,
a:active {
  opacity: 0.88;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   § 3. APP CONTAINER — Trendora-Inspired Layout
═══════════════════════════════════════════════════════════════════════════════ */
.app {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-margin);
  padding-top: 0;
  margin-bottom: 0;
}

/* Staggered entrance — PERF: reduced to 6 children, removed blur filter */
.app>* {
  animation: anhad-enter 0.4s var(--ease-out-expo) backwards;
}

.app>*:nth-child(1) {
  animation-delay: 0.00s;
}

.app>*:nth-child(2) {
  animation-delay: 0.04s;
}

.app>*:nth-child(3) {
  animation-delay: 0.06s;
}

.app>*:nth-child(4) {
  animation-delay: 0.08s;
}

.app>*:nth-child(5) {
  animation-delay: 0.10s;
}

.app>*:nth-child(6) {
  animation-delay: 0.12s;
}

/* Children 7+ enter without delay */

@keyframes anhad-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
    /* PERF: blur filter REMOVED — forces GPU composition on every animating element */
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Opacity only — deliberately no transform.
   An element with an animation that TARGETS transform becomes a containing
   block for its position:fixed descendants in Chrome, even when a later
   `transform: none !important` wins the cascade for the value (see
   `.app:not(.app--exiting)` below). .page-enter sits on Home's <main class="app">
   and Favorites' #app, both of which contain fixed children — the radio sheet,
   its full-screen overlay and the "New Note" FAB. Those were being anchored to
   the page container instead of the viewport, so the radio sheet opened ~1600px
   down the document (invisible) while still locking body scroll, and the FAB
   drifted off-screen. The transform here was never visible anyway. */
@keyframes glassReveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.page-enter {
  animation: glassReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Page exit — GPU-composited ONLY (opacity + transform), no filter:blur for 120fps */
.app--exiting {
  animation: anhad-exit 0.18s var(--ease-smooth) forwards;
  will-change: opacity, transform;
  pointer-events: none !important;
}

@keyframes anhad-exit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.985) translateZ(0);
    /* NO filter:blur — forces main-thread repaint, kills 60fps */
  }
}

/* SPA page swaps - ULTRA INSTANT MODE (Phase 3) */
.app--fade-out {
  opacity: 0;
  transition: none !important; /* No fade - instant hide */
  pointer-events: none;
}
.app--fade-in {
  opacity: 1;
  transition: none !important; /* No fade - instant show */
}

/* Keep content visible during swap */
.app {
  opacity: 1 !important;
}

/* CAPACITOR INSTANT MODE: Zero transition for cached page returns */
.app--instant {
  opacity: 1 !important;
  transition: none !important;
  pointer-events: all !important;
}

/* CAPACITOR OPTIMIZATION: Force GPU compositing on all images
   to prevent repaint lag when navigating back to cached pages */
#app img,
#app .hero-card__image,
#app picture,
#app [style*="background-image"] {
  /* translateZ(0) already promotes these to their own layer; will-change on top
     of it just doubles the budget pressure across every image on the page. */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Keep decoded pixels in GPU memory - zero repaint on navigation */
#app img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Safety: if app--exiting gets stuck (bfcache), undo it on pageshow via JS.
   This CSS-only fallback also helps: animation won't replay on restore. */
.app:not(.app--exiting) {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 4. HEADER — Trendora-Inspired: Avatar | Brand | Actions
   Clean grid. Avatar with theme indicator. Centered brand. Right actions.

   Scoped to .home-header (a second class added to Home's own <header> tag in
   index.html) — this file is Home-exclusive but was never removed once
   loaded (smooth-navigation.js's syncHeadAssets() only ever adds
   stylesheets, never removes them), so its bare .header/.header__title/
   .header__btn rules used to override Favorites'/other pages' own
   same-named-but-unrelated rules via !important for the rest of the
   session (found by running this: Favorites' header padding and button
   background changed after any SPA visit to Home).
═══════════════════════════════════════════════════════════════════════════════ */
.header.home-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--space-3) 0 var(--space-2);
  margin-bottom: var(--space-1);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: backdrop-filter var(--duration-normal) var(--ease-smooth),
    opacity var(--duration-normal) var(--ease-smooth);
  background: transparent !important;
  pointer-events: auto !important;
}

/* Compact header on scroll — frosted glass with golden accent */
.header--compact {
  background: transparent !important;
  backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  border-bottom: none;
}


.dark-mode .header--compact {
  background: transparent !important;
  border-bottom-color: rgba(212, 148, 58, 0.12);
}

.header__left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header__logo-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid var(--surface-primary);
  background: var(--surface-primary);
  box-shadow: none;
  transition: transform var(--duration-normal) var(--ease-spring),
    box-shadow var(--duration-normal) var(--ease-spring);
  will-change: transform;
}

.header__logo-btn:active {
  transform: scale(0.88) rotate(-3deg);
  box-shadow: none;
}

/* Shimmer on press */
.header__logo-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0) 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.header__logo-btn:active::after {
  transform: translateX(100%);
}

.header__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.6);
}

/* Theme indicator — glowing dot */
.header__theme-dot {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 2.5px solid var(--surface-secondary);
  background: #FFD60A;
  transition: background var(--duration-normal) var(--ease-spring),
    box-shadow var(--duration-normal) var(--ease-spring);
  z-index: 2;
  box-shadow: none;
}

.dark-mode .header__theme-dot {
  background: #BF5AF2;
  box-shadow: none;
}

.header__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

/* ANHAD — iOS Clean Typography */
.home-header .header__title {
  font-family: 'Optimus Princeps', 'Trajan Pro', serif !important;
  font-size: clamp(2rem, 5.5vw, 2.8rem) !important;
  /* Dynamic fluid responsive text — larger for better visibility */
  font-weight: 900 !important;
  letter-spacing: 4px !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
  display: inline-block !important;
  background: linear-gradient(180deg, #8B4513 0%, #A0522D 50%, #654321 100%) !important;
  /* Rich brown gradient for visibility */
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 8px rgba(212, 148, 58, 0.4)) !important;
  /* Enhanced shadows for depth */
  animation: none !important;
  margin-top: 8px;
  transition: filter 0.3s ease;
}

/* Dark mode override */
.dark-mode .home-header .header__title {
  background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%) !important;
  /* Bright gold gradient for dark mode */
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.5)) !important;
}

.home-header .header__title-gurmukhi {
  font-family: var(--font-gurmukhi) !important;
  font-size: clamp(1rem, 2.8vw, 1.4rem) !important;
  /* Responsive dynamic Gurmukhi subtitle — larger */
  font-weight: 700 !important;
  color: #654321 !important;
  /* Dark brown for visibility on light bg */
  letter-spacing: 1px !important;
  opacity: 1 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  background-clip: initial !important;
  text-fill-color: initial !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  /* Dual shadow for contrast */
  filter: none !important;
  display: inline-block !important;
  transition: color 0.3s ease;
}

/* Dark mode for Gurmukhi subtitle */
.dark-mode .home-header .header__title-gurmukhi {
  color: #FFD700 !important;
  /* Bright gold in dark mode */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 8px rgba(255, 215, 0, 0.4) !important;
}

.header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.home-header .header__btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f3 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform var(--duration-fast) var(--ease-spring),
    background var(--duration-fast) var(--ease-spring) !important;
  will-change: transform;
  cursor: pointer;
  z-index: 101 !important;
  pointer-events: auto !important;
}

.dark-mode .home-header .header__btn,
[data-theme="dark"] .home-header .header__btn {
  background: #2a2a2d !important;
  border: none !important;
  box-shadow: none !important;
}

.home-header .header__btn:active {
  transform: scale(0.95) !important;
  box-shadow: none !important;
}

.dark-mode .home-header .header__btn:active,
[data-theme="dark"] .home-header .header__btn:active {
  box-shadow: none !important;
}

.home-header .header__btn svg {
  width: 22px;
  height: 22px;
  color: #000000 !important;
  transition: color var(--duration-fast) ease;
  stroke-width: 2.5px;
}

.dark-mode .home-header .header__btn svg,
[data-theme="dark"] .home-header .header__btn svg {
  color: #FFFFFF !important;
}

.home-header .header__btn:active svg {
  color: var(--accent) !important;
}

.home-header .header__btn img {
  width: 22px;
  height: 22px;
  transition: filter var(--duration-fast) ease;
}

.dark-mode .home-header .header__btn img,
[data-theme="dark"] .home-header .header__btn img {
  filter: brightness(0) invert(1) !important;
}

[data-theme-mode="auto"] .home-header .header__btn img {
  filter: brightness(0) invert(1) !important;
}

.header__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  background: var(--live);
  border-radius: var(--radius-full);
  font-size: var(--text-micro);
  font-weight: var(--weight-bold);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--surface-secondary);
  box-shadow: none;
  animation: badge-pop 0.4s var(--ease-spring) both;
}

@keyframes badge-pop {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 4.5. DECORATIVE LOGO — Floating Brand Accent (Home Screen)
   Subtle watermark-style logo between header and greeting.
═══════════════════════════════════════════════════════════════════════════════ */
.deco-logo-home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) 0 var(--space-1);
  pointer-events: none;
  user-select: none;
}

.deco-logo-home img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  opacity: 0.88;
  /* PERF FIX: filter:drop-shadow() removed from this element — it forces a
     repaint on every animation frame when combined with the float animation.
     Shadow is applied via ::after pseudo-element which does not animate. */
  filter: drop-shadow(0 0 14px rgba(212, 148, 58, 0.3)) drop-shadow(0 0 36px rgba(245, 200, 66, 0.12)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.15));
  animation: decoLogoFloat 6s ease-in-out infinite;
  transition: opacity 0.5s ease;
  /* GPU-promote the animating element for compositor-only float */
  will-change: transform;
}

.dark-mode .deco-logo-home img {
  opacity: 0.92;
  filter: drop-shadow(0 0 18px rgba(212, 160, 74, 0.45)) drop-shadow(0 0 44px rgba(245, 200, 66, 0.2)) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.4));
}

@keyframes decoLogoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

/* Reduced motion: no float */
@media (prefers-reduced-motion: reduce) {
  .deco-logo-home img {
    animation: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 5. GREETING — Premium Centered Hero Layout
   Guru portrait as the centred hero. Name below. Gurbani wisdom below that.
   Breathable, vertical, premium — like a spiritual profile card.
═══════════════════════════════════════════════════════════════════════════════ */
.greeting {
  margin-bottom: var(--space-4);
  padding: var(--space-2) 0 var(--space-1);
}

.greeting {
  margin-top: -12px !important;
  margin-bottom: 2px !important;
}

.greeting__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  touch-action: pan-y;
}

/* Ensure the portrait slider container also declares pan-y */
.greeting__portrait-slider {
  touch-action: pan-y;
  margin-bottom: 10px;
}

.greeting__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* ── Guru Portrait — Perfect Circular Frame ── */
.greeting__guru-portrait {
  order: -1;
  /* Always render portrait first (above text) */
  width: 152px;
  height: 152px;
  min-width: 152px;
  min-height: 152px;
  aspect-ratio: 1 / 1;
  position: relative;
  justify-self: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  /* CRITICAL: clips any image to perfect circle */
  margin-bottom: 10px;
  /* Sky blue orb now provides ambient effect - no filter needed */
}

.greeting__guru-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  /* JS overrides per-image for best crop */
  image-orientation: from-image;
  display: block;
  /* Elegant thin gold border — inside the overflow circle */
  border: 2.5px solid #D4A84B;
  box-sizing: border-box;
  transition: transform 0.4s ease, opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Unique royal frame — gradient ring behind the image */
.greeting__guru-portrait::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  /* Royal gradient - antique gold tones */
  background: linear-gradient(145deg,
      #B8860B 0%,
      #D4A84B 35%,
      #F4D03F 50%,
      #D4A84B 65%,
      #B8860B 100%);
  z-index: 0;
  /* Subtle decorative ring */
  box-shadow: none;
}

/* Outer subtle halo - minimal and elegant */
.greeting__guru-portrait::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(212, 168, 75, 0.2);
  z-index: -1;
}

.greeting__guru-img:hover {
  transform: scale(1.03);
}

/* ── Salutation / Guru Name ── */
.greeting__salutation {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  text-align: center;
  font-family: 'Trajan Pro', 'Cinzel', serif;
  padding: 0 16px;

  /* Premium gradient text effect */
  background: linear-gradient(135deg,
      #AF7D14 0%,
      #D4943A 30%,
      #FFD700 50%,
      #D4943A 70%,
      #AF7D14 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Shimmer animation */
  animation: textShimmer 4s ease-in-out infinite;
  /* Soft shadow for depth */
  filter: drop-shadow(0 2px 4px rgba(212, 148, 58, 0.3));
  transform: none;
}

@keyframes textShimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Dark mode: Rich gold with glow */
.dark-mode .greeting__salutation {
  background: linear-gradient(135deg,
      #E6B545 0%,
      #FFD700 30%,
      #FFEC8B 50%,
      #FFD700 70%,
      #E6B545 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(230, 181, 69, 0.5));
}

/* ── Gurbani Quote ── */
.greeting__gurbani {
  font-family: 'MFJashan', 'Noto Sans Gurmukhi', sans-serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: #D4943A;
  line-height: 1.25;
  margin: 0 0 2px 0;
  padding: 0 16px;
  max-width: 100%;
  text-align: center;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 8px rgba(212, 148, 58, 0.2);
}

.greeting__translation {
  font-size: var(--text-subhead);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  font-style: italic;
  line-height: 1.25;
  margin-bottom: var(--space-1);
  margin-top: 2px;
  max-width: 100%;
  letter-spacing: -0.2px;
  text-align: center;
  padding: 0 16px;
}

.greeting__nanakshahi {
  margin-top: 4px;
  text-align: center;
}

.greeting__context {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-footnote);
  color: var(--text-secondary);
}

.greeting__context-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-quaternary);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 5.4.1. SCATTERED PETALS — Floating around portrait (No Rose)
═══════════════════════════════════════════════════════════════════════════════ */
/* Petals decoration - concentrated cluster at center-bottom of portrait */
.greeting__rose-decoration {
  position: absolute;
  bottom: -15px;
  left: 60%;
  transform: translateX(-50%);
  width: 120px;
  height: 50px;
  z-index: 5;
  pointer-events: none;
}

/* Pink light orb glow behind the petals - REDUCED animation */
.greeting__rose-decoration::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 30px;
  background: radial-gradient(ellipse at center, rgba(255, 105, 180, 0.4) 0%, rgba(255, 182, 193, 0.2) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
  animation: pinkGlowPulse 4s ease-in-out infinite;
}

@keyframes pinkGlowPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.05);
  }
}

/* Scattered petals - STATIC (no animation), 35 petals placed */
.greeting__rose-decoration .petal-1,
.greeting__rose-decoration .petal-2,
.greeting__rose-decoration .petal-3,
.greeting__rose-decoration .petal-4,
.greeting__rose-decoration .petal-5,
.greeting__rose-decoration .petal-6,
.greeting__rose-decoration .petal-7,
.greeting__rose-decoration .petal-8,
.greeting__rose-decoration .petal-9,
.greeting__rose-decoration .petal-10,
.greeting__rose-decoration .petal-11,
.greeting__rose-decoration .petal-12,
.greeting__rose-decoration .petal-13,
.greeting__rose-decoration .petal-14,
.greeting__rose-decoration .petal-15,
.greeting__rose-decoration .petal-16,
.greeting__rose-decoration .petal-17,
.greeting__rose-decoration .petal-18,
.greeting__rose-decoration .petal-19,
.greeting__rose-decoration .petal-20,
.greeting__rose-decoration .petal-21,
.greeting__rose-decoration .petal-22,
.greeting__rose-decoration .petal-23,
.greeting__rose-decoration .petal-24,
.greeting__rose-decoration .petal-25,
.greeting__rose-decoration .petal-26,
.greeting__rose-decoration .petal-27,
.greeting__rose-decoration .petal-28,
.greeting__rose-decoration .petal-29,
.greeting__rose-decoration .petal-30,
.greeting__rose-decoration .petal-31,
.greeting__rose-decoration .petal-32,
.greeting__rose-decoration .petal-33,
.greeting__rose-decoration .petal-34,
.greeting__rose-decoration .petal-35 {
  position: absolute;
  background: radial-gradient(ellipse at 30% 30%, #FFB6C1 0%, #FF69B4 50%, #DC143C 100%);
  border-radius: 50% 0 50% 50%;
  opacity: 0.75;
  filter: drop-shadow(0 2px 4px rgba(220, 20, 60, 0.2));
  /* NO ANIMATION - static placement only */
}

/* 35 concentrated petals - clustered statically */
.greeting__rose-decoration .petal-1 {
  width: 14px;
  height: 14px;
  top: 20px;
  right: 80px;
  transform: rotate(45deg);
}

.greeting__rose-decoration .petal-2 {
  width: 12px;
  height: 12px;
  top: 15px;
  right: 60px;
  transform: rotate(120deg);
}

.greeting__rose-decoration .petal-3 {
  width: 16px;
  height: 16px;
  top: 25px;
  right: 95px;
  transform: rotate(200deg);
}

.greeting__rose-decoration .petal-4 {
  width: 10px;
  height: 10px;
  top: 10px;
  right: 45px;
  transform: rotate(30deg);
}

.greeting__rose-decoration .petal-5 {
  width: 13px;
  height: 13px;
  top: 30px;
  right: 70px;
  transform: rotate(90deg);
}

.greeting__rose-decoration .petal-6 {
  width: 11px;
  height: 11px;
  top: 18px;
  right: 30px;
  transform: rotate(150deg);
}

.greeting__rose-decoration .petal-7 {
  width: 15px;
  height: 15px;
  top: 8px;
  right: 75px;
  transform: rotate(210deg);
}

.greeting__rose-decoration .petal-8 {
  width: 9px;
  height: 9px;
  top: 28px;
  right: 50px;
  transform: rotate(270deg);
}

.greeting__rose-decoration .petal-9 {
  width: 12px;
  height: 12px;
  top: 12px;
  right: 100px;
  transform: rotate(330deg);
}

.greeting__rose-decoration .petal-10 {
  width: 14px;
  height: 14px;
  top: 32px;
  right: 85px;
  transform: rotate(15deg);
}

.greeting__rose-decoration .petal-11 {
  width: 10px;
  height: 10px;
  top: 5px;
  right: 55px;
  transform: rotate(75deg);
}

.greeting__rose-decoration .petal-12 {
  width: 13px;
  height: 13px;
  top: 22px;
  right: 20px;
  transform: rotate(135deg);
}

.greeting__rose-decoration .petal-13 {
  width: 11px;
  height: 11px;
  top: 35px;
  right: 40px;
  transform: rotate(195deg);
}

.greeting__rose-decoration .petal-14 {
  width: 14px;
  height: 14px;
  top: 15px;
  right: 110px;
  transform: rotate(255deg);
}

.greeting__rose-decoration .petal-15 {
  width: 9px;
  height: 9px;
  top: 28px;
  right: 65px;
  transform: rotate(315deg);
}

.greeting__rose-decoration .petal-16 {
  width: 12px;
  height: 12px;
  top: 5px;
  right: 90px;
  transform: rotate(25deg);
}

.greeting__rose-decoration .petal-17 {
  width: 10px;
  height: 10px;
  top: 38px;
  right: 75px;
  transform: rotate(85deg);
}

.greeting__rose-decoration .petal-18 {
  width: 13px;
  height: 13px;
  top: 8px;
  right: 35px;
  transform: rotate(145deg);
}

.greeting__rose-decoration .petal-19 {
  width: 11px;
  height: 11px;
  top: 25px;
  right: 105px;
  transform: rotate(205deg);
}

.greeting__rose-decoration .petal-20 {
  width: 14px;
  height: 14px;
  top: 35px;
  right: 55px;
  transform: rotate(265deg);
}

.greeting__rose-decoration .petal-21 {
  width: 10px;
  height: 10px;
  top: 12px;
  right: 45px;
  transform: rotate(325deg);
}

.greeting__rose-decoration .petal-22 {
  width: 12px;
  height: 12px;
  top: 30px;
  right: 25px;
  transform: rotate(35deg);
}

.greeting__rose-decoration .petal-23 {
  width: 9px;
  height: 9px;
  top: 20px;
  right: 120px;
  transform: rotate(155deg);
}

/* Additional 12 petals for fuller look */
.greeting__rose-decoration .petal-24 {
  width: 11px;
  height: 11px;
  top: 0px;
  right: 70px;
  transform: rotate(45deg);
}

.greeting__rose-decoration .petal-25 {
  width: 13px;
  height: 13px;
  top: 40px;
  right: 85px;
  transform: rotate(110deg);
}

.greeting__rose-decoration .petal-26 {
  width: 10px;
  height: 10px;
  top: 18px;
  right: 15px;
  transform: rotate(175deg);
}

.greeting__rose-decoration .petal-27 {
  width: 14px;
  height: 14px;
  top: 42px;
  right: 35px;
  transform: rotate(240deg);
}

.greeting__rose-decoration .petal-28 {
  width: 9px;
  height: 9px;
  top: 6px;
  right: 100px;
  transform: rotate(300deg);
}

.greeting__rose-decoration .petal-29 {
  width: 12px;
  height: 12px;
  top: 33px;
  right: 115px;
  transform: rotate(10deg);
}

.greeting__rose-decoration .petal-30 {
  width: 15px;
  height: 15px;
  top: 2px;
  right: 40px;
  transform: rotate(70deg);
}

.greeting__rose-decoration .petal-31 {
  width: 10px;
  height: 10px;
  top: 45px;
  right: 60px;
  transform: rotate(130deg);
}

.greeting__rose-decoration .petal-32 {
  width: 13px;
  height: 13px;
  top: 8px;
  right: 130px;
  transform: rotate(190deg);
}

.greeting__rose-decoration .petal-33 {
  width: 11px;
  height: 11px;
  top: 36px;
  right: 95px;
  transform: rotate(250deg);
}

.greeting__rose-decoration .petal-34 {
  width: 14px;
  height: 14px;
  top: 14px;
  right: 50px;
  transform: rotate(310deg);
}

.greeting__rose-decoration .petal-35 {
  width: 10px;
  height: 10px;
  top: 30px;
  right: 10px;
  transform: rotate(20deg);
}

/* REMOVED: petalFloat animation - no longer needed for static petals */
/* @keyframes petalFloat removed */

/* Dark mode adjustments */
.dark-mode .greeting__rose-decoration .petal-1,
.dark-mode .greeting__rose-decoration .petal-2,
.dark-mode .greeting__rose-decoration .petal-3 {
  opacity: 0.9;
  filter: drop-shadow(0 2px 6px rgba(255, 105, 180, 0.3));
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 5.5. DAILY PROGRESS — Elegant Inline Progress Bar
═══════════════════════════════════════════════════════════════════════════════ */
.progress-inline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3-5) var(--space-4);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  box-shadow: none;
  border: none;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer on progress card */
.progress-inline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--accent-light) 50%,
      transparent 100%);
  opacity: 0.7;
}

.progress-inline__label {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.progress-inline__bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-full);
  box-shadow: none;
  overflow: hidden;
  position: relative;
}

.progress-inline__fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  box-shadow: none;
  width: 0%;
  transition: width 1.4s var(--ease-out-expo);
  position: relative;
}

/* PERF: Shimmer animation REMOVED — was running 24/7 even when fill is 0% */
.progress-inline__fill::after {
  content: none;
}

.quick-card__streak {
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  color: #ff3b30;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Streak Saved State for Nitnem Tracker Card */
.quick-card.streak-saved {
  background: linear-gradient(145deg, #f0f4f8 0%, #d9e2ec 100%) !important;
  border: 2px solid rgba(82, 110, 150, 0.4) !important;
  box-shadow: none !important;
}

.quick-card__streak.saved {
  color: #243b53 !important;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: none;
}

.quick-card.streak-saved::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg,
      transparent 45%,
      rgba(255, 255, 255, 0.3) 50%,
      transparent 55%);
  animation: saved-shimmer 6s infinite linear;
  pointer-events: none;
  z-index: 0;
}

@keyframes saved-shimmer {
  0% {
    transform: translateX(-30%) translateY(-30%);
  }

  100% {
    transform: translateX(30%) translateY(30%);
  }
}

.quick-card.streak-saved .quick-card__icon {
  background: #ffffff;
  box-shadow: none;
}

.quick-card.streak-saved .quick-card__icon svg {
  color: #486581;
}

.progress-inline__text {
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 6. HERO CAROUSEL — Trendora-Inspired Premium Cards
   Full-bleed images. Warm overlays. Generous radius. Spring physics.
═══════════════════════════════════════════════════════════════════════════════ */
.hero-carousel {
  position: relative;
  margin-bottom: 0;
}

/* Golden Orb — REMOVED per user request, replaced with rose decoration */
.golden-orb-bg {
  display: none;
}

/* Legacy glow fallback — hidden */
.hero-carousel__glow {
  display: none;
}

.hero-carousel__track {
  position: relative;
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  will-change: scroll-position;

  padding: var(--space-1) var(--space-0-5) 0;
  scroll-padding: var(--space-0-5);
}

.hero-carousel__track::-webkit-scrollbar {
  display: none;
}

.hero-card {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: 24px;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-spring),
    box-shadow var(--duration-normal) ease;
  will-change: transform;
  border: none;
  z-index: 1;
}

.hero-card:active {
  transform: scale(0.975);
  box-shadow: none !important;
}

.hero-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: var(--accent-surface);
  border-radius: 24px;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  backface-visibility: hidden;
}

/* Hover zoom only on non-touch devices */
@media (hover: hover) {
  .hero-card:hover .hero-card__image {
    transform: scale(1.03);
    transition: transform 3s var(--ease-out);
  }
}

/* Disabled - no bottom fade for clean images */
.hero-card__image-wrapper::after {
  content: none;
  display: none;
}

/* Clean image display - no dark mask */
.hero-card__image-wrapper .hero-card__image {
  mask-image: none;
  -webkit-mask-image: none;
}

/* Subtle top gradient for badge readability only */
.hero-card__image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
  box-shadow: none;
  pointer-events: none;
  z-index: 3;
}

/* ═════════════════════════════════════════════════════════════════════════════
   HERO CARD — FROSTED GLASS BOTTOM BLUR (blur the IMAGE, not text)
   ════════════════════════════════════════════════════════════════════════════ */

/* Disabled blur layer for cleaner images */
.hero-card__image-wrapper::after {
  content: none;
  display: none;
}

/* The text container — sits on TOP of the blur */
.hero-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-6) var(--space-6) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 5;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.hero-card__overlay-info {
  flex: 1;
  min-width: 0;
  padding-right: var(--space-3);
}

.hero-card__title {
  font-size: 1.45rem;
  font-weight: var(--weight-semibold);
  color: #FFFFFF;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6),
    0 4px 40px rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.8);
  letter-spacing: -0.3px;
}

.hero-card__title--thin {
  font-weight: var(--weight-medium);
  letter-spacing: -0.2px;
}

.hero-card__subtitle {
  font-size: var(--text-subhead);
  color: rgba(255, 255, 255, 0.92);
  margin-top: 6px;
  font-weight: var(--weight-regular);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5),
    0 2px 24px rgba(0, 0, 0, 0.3),
    0 0 2px rgba(0, 0, 0, 0.7);
  letter-spacing: 0;
}

/* Badge — Trendora pill style */
.hero-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: var(--text-micro);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-inverse);
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 5;
  will-change: transform;
  backface-visibility: hidden;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.hero-card__badge--live {
  background: rgba(255, 59, 48, 0.92);
  box-shadow: none;
}

.hero-card__badge--curated {
  background: rgba(88, 86, 214, 0.88);
  box-shadow: none;
}

.hero-card__badge--dlive {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.95) 0%, rgba(255, 100, 80, 0.9) 100%);
  box-shadow: none;
  font-weight: var(--weight-bold);
  letter-spacing: 0.8px;
  padding: 7px 14px;
}

.hero-card__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--text-inverse);
  border-radius: 50%;
  animation: live-pulse 1.4s ease-in-out infinite;
  box-shadow: none;
}

@keyframes live-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

/* Play button — Trendora glassmorphic circle */
.hero-card__play-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(var(--blur-md)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(200%);
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-spring);
  will-change: transform;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

.hero-card__play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%);
  pointer-events: none;
}

.hero-card__play-btn:active {
  transform: scale(0.85);
  background: rgba(0, 0, 0, 0.5);
}

.hero-card__play-btn svg {
  width: 22px;
  height: 22px;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 1;
  margin-left: 2px;
  /* Optical centering for play icon */
}

.hero-card--playing .hero-card__play-btn {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
  animation: playing-pulse 2s ease-in-out infinite;
}

@keyframes playing-pulse {

  0%,
  100% {
    box-shadow: none;
  }

  50% {
    box-shadow: none;
  }
}

/* Carousel Dots — iOS Capsule Style (like reference image) */
.hero-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}

.hero-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--text-quaternary);
  opacity: 0.35;
  transition: width 0.4s var(--ease-spring),
    opacity 0.4s var(--ease-spring),
    background 0.4s var(--ease-spring);
  cursor: pointer;
  border: none;
  padding: 0;
}

.hero-carousel__dot--active {
  width: 22px;
  height: 7px;
  border-radius: var(--radius-full);
  opacity: 1;
  background: var(--accent);
  box-shadow: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 7. SECTION HEADERS — Trendora Clean Typography
═══════════════════════════════════════════════════════════════════════════════ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-0-5);
}

.section-header__title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.4px;
  font-family: var(--font-system);
  /* SF Pro */
}

.section-header__link {
  font-size: var(--text-footnote);
  font-weight: var(--weight-semibold);
  color: var(--accent);
  transition: opacity var(--duration-fast) ease;
  letter-spacing: -0.01em;
}

.section-header__link:active {
  opacity: 0.5;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 8. PRACTICE GRID — Trendora Premium Cards with Progress Rings
   Warm tinted surfaces. Generous padding. Meaningful motion.
═══════════════════════════════════════════════════════════════════════════════ */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.practice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 10px 14px;
  border-radius: 26px !important;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) ease;
  position: relative;
  overflow: hidden;
  border: var(--border-card);
}

.practice-card:active {
  transform: scale(0.95) translateY(2px) !important;
  box-shadow: 
    2px 4px 8px rgba(0, 0, 0, 0.08),
    inset 1px 1px 2px rgba(255, 255, 255, 0.7),
    inset -2px -2px 4px rgba(0, 0, 0, 0.1) !important;
}

.practice-card--nitnem {
  background: linear-gradient(165deg, #FFFDFB 0%, #FFEFD8 50%, #FFE5C0 100%) !important;
  border: 1px solid rgba(212, 148, 58, 0.22) !important;
  border-radius: 26px !important;
  box-shadow: 
    6px 10px 20px rgba(212, 148, 58, 0.15),
    2px 4px 8px rgba(139, 69, 19, 0.06),
    inset 2px 2px 4px rgba(255, 255, 255, 0.9),
    inset -3px -3px 6px rgba(212, 148, 58, 0.15) !important;
}

.practice-card--sehaj {
  background: linear-gradient(165deg, #FBF9FF 0%, #F0EBFF 50%, #E4DCFF 100%) !important;
  border: 1px solid rgba(88, 86, 214, 0.22) !important;
  border-radius: 26px !important;
  box-shadow: 
    6px 10px 20px rgba(88, 86, 214, 0.15),
    2px 4px 8px rgba(45, 0, 135, 0.06),
    inset 2px 2px 4px rgba(255, 255, 255, 0.9),
    inset -3px -3px 6px rgba(88, 86, 214, 0.15) !important;
}

.practice-card--hukam {
  background: linear-gradient(165deg, #FFFDFB 0%, #FFF0E8 50%, #FFE0CC 100%) !important;
  border: 1px solid rgba(255, 110, 74, 0.22) !important;
  border-radius: 26px !important;
  box-shadow: 
    6px 10px 20px rgba(255, 110, 74, 0.15),
    2px 4px 8px rgba(139, 45, 0, 0.06),
    inset 2px 2px 4px rgba(255, 255, 255, 0.9),
    inset -3px -3px 6px rgba(255, 110, 74, 0.15) !important;
}

/* Subtle inner glow */
.practice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Progress Ring */
.practice-card__ring {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-3);
}

.practice-card__ring svg {
  width: 60px;
  height: 60px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.practice-card__ring-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.05);
  stroke-width: 2.5;
}

.practice-card__ring-fill {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease-out-expo);
}

.practice-card--nitnem .practice-card__ring-fill {
  stroke: var(--accent);
}

.practice-card--sehaj .practice-card__ring-fill {
  stroke: var(--purple);
}

.practice-card--hukam .practice-card__ring-fill {
  stroke: #FF9500;
}

.practice-card__ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-card__ring-icon svg {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  opacity: 0.75;
}

.practice-card--nitnem .practice-card__ring-icon svg {
  color: var(--accent);
  opacity: 0.85;
}

.practice-card--sehaj .practice-card__ring-icon svg {
  color: var(--purple);
  opacity: 0.85;
}

.practice-card--hukam .practice-card__ring-icon svg {
  color: #FF9500;
  opacity: 0.85;
}

.practice-card__title {
  font-size: var(--text-footnote);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.practice-card__status {
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.practice-card__status--active {
  color: var(--success);
  font-weight: var(--weight-semibold);
}

.practice-card__status--accent {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

/* Completion checkmark — spring animation */
.practice-card__check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0) rotate(-180deg);
  transition: transform 0.5s var(--ease-spring), opacity 0.5s var(--ease-spring), background 0.5s var(--ease-spring);
  box-shadow: none;
  border: none;
}

.practice-card__check--visible {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.practice-card__check svg {
  width: 12px;
  height: 12px;
  color: var(--text-inverse);
  stroke-width: 3;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 9. QUICK ACCESS CARDS — Trendora Light Tinted Surfaces
   Each card has a unique warm/cool tint. Generous touch targets.
═══════════════════════════════════════════════════════════════════════════════ */
/* PERF: Cards render persistently */
.quick-card,
.event-card {
  /* Removed content-visibility to prevent scroll jank/reloading */
}

.quick-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) ease;
  border: var(--border-card);
  /* No will-change: this selector matches 7 cards on Home, and a permanent
     will-change holds a compositor layer for each one for the whole session.
     scroll-engine.css:7-11 documents this exact hazard. The tap transition is
     short-lived, so the browser can promote on demand. */
  position: relative;
  overflow: hidden;
}

.quick-card:active {
  transform: scale(0.975) translateY(1px);
}

.quick-card:last-child {
  margin-bottom: var(--space-8);
}

/* Light mode colored backgrounds - soft pastel versions */
:root:not([data-theme="dark"]):not(.dark):not(.dark-mode) .quick-card--green {
  background: linear-gradient(140deg, #E8F5E9 0%, #C8E6C9 100%);
  border-color: rgba(48, 209, 88, 0.25);
}

:root:not([data-theme="dark"]):not(.dark):not(.dark-mode) .quick-card--gold {
  background: linear-gradient(140deg, #FFF8E1 0%, #FFECB3 100%);
  border-color: rgba(212, 148, 58, 0.25);
}

:root:not([data-theme="dark"]):not(.dark):not(.dark-mode) .quick-card--purple {
  background: linear-gradient(140deg, #EDE7F6 0%, #D1C4E9 100%);
  border-color: rgba(88, 86, 214, 0.25);
}

:root:not([data-theme="dark"]):not(.dark):not(.dark-mode) .quick-card--blue {
  background: linear-gradient(140deg, #E3F2FD 0%, #BBDEFB 100%);
  border-color: rgba(0, 122, 255, 0.25);
}

:root:not([data-theme="dark"]):not(.dark):not(.dark-mode) .quick-card--rose {
  background: linear-gradient(140deg, #FFEBEE 0%, #FFCDD2 100%);
  border-color: rgba(255, 107, 107, 0.25);
}

/* Subtle glass highlight on top */
.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
}

.quick-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
  border: 0.5px solid rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.quick-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.quick-card--green .quick-card__icon svg {
  color: #30D158;
}

.quick-card--gold .quick-card__icon svg {
  color: var(--accent);
}

.quick-card--purple .quick-card__icon svg {
  color: var(--purple);
}

.quick-card--blue .quick-card__icon svg {
  color: var(--blue);
}

.quick-card--teal .quick-card__icon svg {
  color: #1ABC9C;
}

.quick-card--rose .quick-card__icon svg {
  color: #FF6B6B;
}

.quick-card:active .quick-card__icon {
  transform: scale(0.92);
}

.quick-card__content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.quick-card__title {
  font-size: var(--text-subhead);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.quick-card__subtitle {
  font-size: var(--text-caption);
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.quick-card__meta {
  flex-shrink: 0;
  text-align: right;
  position: relative;
  z-index: 1;
}

.quick-card__meta-value {
  font-size: var(--text-subhead);
  font-weight: var(--weight-bold);
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.quick-card__meta-label {
  font-size: var(--text-caption);
  color: var(--text-tertiary);
  margin-top: 1px;
}

.quick-card__chevron {
  width: 18px;
  height: 18px;
  color: var(--text-quaternary);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring);
  position: relative;
  z-index: 1;
}

.quick-card:active .quick-card__chevron {
  transform: translateX(4px);
  color: var(--text-tertiary);
}

/* Streak badge — Trendora warm pill */
.quick-card__streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--streak);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--weight-bold);
  color: var(--text-inverse);
  box-shadow: none;
  filter: none;
}

/* Progress pill */
.quick-card__progress {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--accent-light);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 10. CONTEXTUAL EVENT CARD — Upcoming Gurpurab
   Warm accent surface. Clean countdown. Elegant simplicity.
═══════════════════════════════════════════════════════════════════════════════ */
.event-card {
  position: relative;
  padding: var(--space-5) var(--space-5);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 32px;
  cursor: pointer;
  margin-top: 0;
  margin-bottom: var(--space-7);
  transition: transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast) var(--ease-spring);
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.event-card:active {
  transform: scale(0.98);
}

/* Top accent line - simplified */
.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-5);
  right: var(--space-5);
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
  opacity: 0.8;
}

/* Remove subtle warm glow */
.event-card::after {
  display: none;
}

.event-card__eyebrow {
  font-size: var(--text-caption-2);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.event-card__title {
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-1);
  max-width: 65%;
  letter-spacing: -0.2px;
  font-family: 'Cinzel', 'Georgia', serif;
}

.event-card__date {
  font-size: var(--text-caption);
  color: var(--text-secondary);
}

.event-card__countdown {
  font-size: var(--text-title-2);
  font-weight: var(--weight-heavy);
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-rounded);
}

.event-card__countdown-label {
  font-size: var(--text-caption-2);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 3px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 11. MINI PLAYER — Trendora Floating Bar
   Persistent. Premium glass. Musical warmth.
═══════════════════════════════════════════════════════════════════════════════ */
.mini-player {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  width: calc(100% - 28px);
  max-width: calc(var(--max-width) - 28px);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2-5) var(--space-3);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 9000;
  cursor: pointer;
  transition: transform 0.45s var(--ease-ios-spring), opacity 0.3s ease;
  border: 0.5px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mini-player--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Subtle top highlight */
.mini-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
}

.mini-player__thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.mini-player__info {
  flex: 1;
  min-width: 0;
}

.mini-player__title {
  font-size: var(--text-subhead);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.mini-player__subtitle {
  font-size: var(--text-caption);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.mini-player__live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  margin-right: 5px;
  animation: live-pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
}

.mini-player__controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.mini-player__btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast) var(--ease-spring), background var(--duration-fast) var(--ease-spring);
  will-change: transform;
}

.mini-player__btn:active {
  transform: scale(0.82);
}

.mini-player__btn svg {
  width: 17px;
  height: 17px;
  color: var(--text-primary);
}

.mini-player__btn--play {
  background: var(--accent-gradient);
  box-shadow: none;
}

.mini-player__btn--play svg {
  color: var(--text-inverse);
}

/* Progress bar on mini player */
.mini-player__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.mini-player__progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 1s linear;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 12. BOTTOM NAVIGATION — iOS 26 Liquid Glass Floating Pill
   Trendora-inspired floating tab bar. Refraction. Spring physics.
═══════════════════════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding: 0 var(--space-6);
  padding-bottom: calc(var(--space-3) + var(--safe-bottom));
  pointer-events: none;
}

.bottom-nav__glass {
  pointer-events: all;
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--space-2) var(--space-2);
  height: 64px;

  /* iOS Floating Pill — Premium Frosted Glass */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--blur-2xl)) saturate(260%) brightness(1.08);
  -webkit-backdrop-filter: blur(var(--blur-2xl)) saturate(260%) brightness(1.08);
  border-radius: var(--radius-full);
  border: 0.5px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 6px 32px rgba(0, 0, 0, 0.10),
    0 2px 10px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);

  position: relative;
  overflow: hidden;
}

/* Top refraction highlight */
.bottom-nav__glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 0.5px;
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.9) 30%,
      rgba(255, 255, 255, 1) 50%,
      rgba(255, 255, 255, 0.9) 70%,
      rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* Specular inner glow */
.bottom-nav__glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 40%,
      transparent 60%,
      rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
}

/* Animated pill indicator */
.nav-indicator {
  position: absolute;
  width: 56px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: var(--accent-light);
  box-shadow: 0 2px 8px rgba(212, 148, 58, 0.12);
  transition: transform 0.35s var(--ease-ios-spring);
  z-index: 0;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-1-5) var(--space-3);
  border-radius: var(--radius-lg);
  transition: transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast) var(--ease-spring), background var(--duration-fast) var(--ease-spring);
  min-width: 56px;
  position: relative;
  z-index: 1;
  will-change: transform;
}

.nav-tab:active {
  transform: scale(0.82);
}

.nav-tab svg {
  width: 23px;
  height: 23px;
  color: rgba(0, 0, 0, 0.32);
  transition: transform var(--duration-normal) var(--ease-spring), opacity var(--duration-normal) var(--ease-spring), background var(--duration-normal) var(--ease-spring);
}

.nav-tab__label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: rgba(0, 0, 0, 0.32);
  transition: transform var(--duration-normal) var(--ease-spring), opacity var(--duration-normal) var(--ease-spring), background var(--duration-normal) var(--ease-spring);
  letter-spacing: -0.01em;
}

/* Active tab — warm accent highlight */
.nav-tab--active svg {
  color: var(--accent);
  transform: translateY(-1px) scale(1.08);
  filter: drop-shadow(0 1px 4px rgba(212, 148, 58, 0.3));
}

.nav-tab--active .ios-emoji--nav {
  opacity: 1 !important;
  transform: scale(1.35) translateY(-3px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode .nav-tab--active .ios-emoji--nav {
  filter: none !important;
}

.nav-tab--active .nav-tab__label {
  color: var(--accent);
  font-weight: var(--weight-bold);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 13. BOTTOM SHEET — iOS-Native Pattern
   Clean. Spring-driven. Backdrop blur. Handle indicator.
═══════════════════════════════════════════════════════════════════════════════ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet-overlay);
  background: rgba(0, 0, 0, 0);
  visibility: hidden;
  transition: transform var(--duration-normal) ease, opacity var(--duration-normal) ease, background var(--duration-normal) ease;
  -webkit-tap-highlight-color: transparent;
}

.sheet-overlay--active {
  background: rgba(0, 0, 0, 0.35);
  visibility: visible;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sheet);
  background: var(--surface-primary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding-bottom: var(--safe-bottom);
  transform: translateY(100%) !important;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease-ios-spring), opacity 0.45s var(--ease-ios-spring);
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.12);
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-overlay--active+.sheet,
.sheet--active {
  transform: translateY(0) !important;
  opacity: 1;
  pointer-events: auto;
}

.sheet__handle {
  width: 38px;
  height: 5px;
  background: var(--surface-sunken);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-5);
  opacity: 0.5;
}

.sheet__header {
  padding: 0 var(--space-6) var(--space-4);
  text-align: center;
  border-bottom: var(--border-hairline);
}

.sheet__title {
  font-size: var(--text-headline);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sheet__subtitle {
  font-size: var(--text-footnote);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.sheet__body {
  padding: var(--space-4) var(--space-5);
}

.sheet__option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease, background var(--duration-fast) ease;
  margin-bottom: var(--space-1);
}

.sheet__option:active {
  background: var(--surface-tertiary);
  transform: scale(0.98);
}

.sheet__option-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sheet__option-icon--live {
  background: var(--live-bg);
  color: var(--live);
}

.sheet__option-icon--playlist {
  background: var(--purple-bg);
  color: var(--purple);
}

.sheet__option-text {
  flex: 1;
}

.sheet__option-title {
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.sheet__option-desc {
  font-size: var(--text-footnote);
  color: var(--text-secondary);
  margin-top: 2px;
}

.sheet__option-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-quaternary);
  flex-shrink: 0;
}

.sheet__cancel {
  display: block;
  width: calc(100% - var(--space-10));
  margin: var(--space-3) auto var(--space-4);
  padding: var(--space-4);
  background: var(--surface-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-align: center;
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease, background var(--duration-fast) ease;
}

.sheet__cancel:active {
  background: var(--surface-sunken);
  transform: scale(0.98);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 14. INSTALL BANNER — Trendora Minimal Floating
═══════════════════════════════════════════════════════════════════════════════ */
/* Floats ABOVE the nav pill, never over it. At bottom:0 this banner sat directly
   on top of .tab-bar (fixed, bottom:32px, ~80px tall — nav-glass.css:8-37),
   hiding the whole navigation and turning the lower ~140px of the screen into a
   fixed, non-scrollable dead zone. */
.install-banner {
  position: fixed;
  bottom: calc(32px + 80px + 12px);
  left: 12px;
  right: 12px;
  max-width: calc(var(--max-width) - 24px);
  margin: 0 auto;
  z-index: var(--z-banner);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(200%);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  opacity: 0;
  /* Own height plus its bottom offset, so it clears the viewport entirely. */
  transform: translateY(calc(100% + 124px));
  transition: transform 0.5s var(--ease-ios-spring), opacity 0.3s ease;
}

.install-banner--visible {
  opacity: 1;
  transform: translateY(0);
}

.install-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.install-banner__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-banner__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.install-banner__text {
  flex: 1;
  min-width: 0;
}

.install-banner__title {
  font-size: var(--text-subhead);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.install-banner__desc {
  font-size: var(--text-caption);
  color: var(--text-secondary);
  margin-top: 1px;
}

.install-banner__cta {
  padding: var(--space-2-5) var(--space-5);
  background: var(--accent-gradient);
  color: var(--text-inverse);
  border-radius: var(--radius-full);
  font-size: var(--text-footnote);
  font-weight: var(--weight-bold);
  box-shadow: var(--accent-shadow-sm);
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast) var(--ease-spring), background var(--duration-fast) var(--ease-spring);
  letter-spacing: -0.01em;
}

.install-banner__cta:active {
  transform: scale(0.92);
}

.install-banner__dismiss {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease, background var(--duration-fast) ease;
}

.install-banner__dismiss:active {
  background: var(--surface-tertiary);
}

.install-banner__dismiss svg {
  width: 15px;
  height: 15px;
  color: var(--text-tertiary);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 15. SVG ICON SYSTEM
═══════════════════════════════════════════════════════════════════════════════ */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--filled {
  fill: currentColor;
  stroke: none;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--md {
  width: 20px;
  height: 20px;
}

.icon--lg {
  width: 24px;
  height: 24px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 16. UTILITY CLASSES
═══════════════════════════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.text-accent {
  color: var(--accent);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-success {
  color: var(--success);
}

.text-live {
  color: var(--live);
}

.fw-regular {
  font-weight: var(--weight-regular);
}

.fw-medium {
  font-weight: var(--weight-medium);
}

.fw-semibold {
  font-weight: var(--weight-semibold);
}

.fw-bold {
  font-weight: var(--weight-bold);
}

/* Haptic feedback simulation */
@keyframes haptic-light {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-0.5px);
  }

  75% {
    transform: translateX(0.5px);
  }
}

@keyframes haptic-medium {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-1px);
  }

  40% {
    transform: translateX(1px);
  }

  60% {
    transform: translateX(-0.5px);
  }

  80% {
    transform: translateX(0.5px);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 17. AMBIENT BACKGROUND — Trendora Warm Atmospheric
   Barely-there. Warm. Spiritual. Not a light show.
═══════════════════════════════════════════════════════════════════════════════ */
/* PERF: ambient-bg — made static. Removed all 3 infinite animations + will-change.
   The radial gradients provide the same warm atmosphere without GPU compositing overhead. */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 600px at 90% -8%, rgba(212, 148, 58, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 600px 600px at -5% 50%, rgba(88, 86, 214, 0.035) 0%, transparent 55%),
    radial-gradient(ellipse 700px 400px at 50% 105%, rgba(0, 122, 255, 0.025) 0%, transparent 55%),
    radial-gradient(ellipse 400px 400px at 80% 60%, rgba(48, 209, 88, 0.015) 0%, transparent 50%);
  /* animation REMOVED — ran 25s infinite on fixed element */
}

.ambient-bg::before {
  content: none;
  /* PERF: removed animated pseudo-element — saved GPU composite layer */
}

.ambient-bg::after {
  content: none;
  /* PERF: removed animated pseudo-element — saved GPU composite layer */
}


/* ═══════════════════════════════════════════════════════════════════════════════
   § 18. RESPONSIVE & DARK MODE
═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  :root {
    --page-margin: 16px;
    --text-large-title: 1.875rem;
  }

  .practice-grid {
    gap: var(--space-2);
  }

  .practice-card {
    padding: var(--space-4) var(--space-2);
  }

  .practice-card__ring {
    width: 52px;
    height: 52px;
  }

  .practice-card__ring svg {
    width: 52px;
    height: 52px;
  }

  .greeting__salutation {
    font-size: var(--text-title-1);
  }

  .quick-card {
    padding: var(--space-3-5) var(--space-3);
  }
}

@media (max-width: 350px) {
  .practice-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-1-5);
  }

  .practice-card__ring {
    width: 46px;
    height: 46px;
  }

  .practice-card__ring svg {
    width: 46px;
    height: 46px;
  }

  .practice-card__ring-icon {
    font-size: 1.2rem;
  }

  .practice-card__title {
    font-size: var(--text-footnote);
  }
}

@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }

  /* No body padding-bottom here. It used to add 48px on top of the 110px that
     nav-glass.css already reserves on .app, producing 170px of empty space
     below the last card at tablet widths and in phone landscape. The floating
     .tab-bar is not hidden at this breakpoint, so that reservation is still
     needed — but only once. */

  .app {
    padding-top: var(--space-8);
  }
}

/* ── Dark Mode — Full System ── */
.dark-mode {
  --surface-primary: #1C1C1E;
  --surface-secondary: #000000;
  --surface-tertiary: #2C2C2E;
  --surface-elevated: #2C2C2E;
  --surface-sunken: #1A1A1C;
  --surface-warm: rgba(212, 148, 58, 0.06);

  --text-primary: #F2F2F7;
  --text-secondary: #98989D;
  --text-tertiary: #636366;
  --text-quaternary: #48484A;
  --text-inverse: #1C1C1E;

  --accent-surface: rgba(212, 148, 58, 0.10);
  --accent-light: rgba(212, 148, 58, 0.18);
  --accent-lighter: rgba(212, 148, 58, 0.08);

  --border-hairline: 0.33px solid rgba(255, 255, 255, 0.08);
  --border-thin: 0.5px solid rgba(255, 255, 255, 0.06);
  --border-light: 1px solid rgba(255, 255, 255, 0.04);
  --border-card: 1px solid rgba(255, 255, 255, 0.03);

  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 56px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.dark-mode .practice-card--nitnem {
  background: linear-gradient(165deg, #2A2215 0%, #302818 100%);
}

.dark-mode .practice-card--sehaj {
  background: linear-gradient(165deg, #1D1C2E 0%, #23213E 100%);
}

.dark-mode .practice-card--hukam {
  background: linear-gradient(165deg, #2C2215 0%, #312718 100%);
}

.dark-mode .practice-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
}

/* --- Practice Card Dark Mode Overrides --- */
.dark-mode .practice-card--nitnem {
  background: linear-gradient(165deg, #251D14 0%, #352B1C 50%, #1F170E 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 32px !important;
  box-shadow:
    8px 12px 28px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 148, 58, 0.15),
    inset 2px 2px 4px rgba(255, 255, 255, 0.12),
    inset -4px -4px 8px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .practice-card--sehaj {
  background: linear-gradient(165deg, #161525 0%, #22203B 50%, #11101E 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 32px !important;
  box-shadow:
    8px 12px 28px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(88, 86, 214, 0.15),
    inset 2px 2px 4px rgba(255, 255, 255, 0.12),
    inset -4px -4px 8px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .practice-card--hukam {
  background: linear-gradient(165deg, #251414 0%, #351C1C 50%, #1F0E0E 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 32px !important;
  box-shadow:
    8px 12px 28px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 110, 74, 0.15),
    inset 2px 2px 4px rgba(255, 255, 255, 0.12),
    inset -4px -4px 8px rgba(0, 0, 0, 0.6) !important;
}

.dark-mode .practice-card__ring-bg {
  stroke: rgba(255, 255, 255, 0.05);
}

.dark-mode .practice-card__title {
  color: #F5F5F7;
}

.dark-mode .practice-card__status {
  color: rgba(255, 255, 255, 0.5);
}

.dark-mode .practice-card__status--active {
  color: #30D158;
}

.dark-mode .practice-card__status--accent {
  color: #E8B84A;
}


[data-theme="dark"] .quick-card--green,
.dark .quick-card--green,
.dark-mode .quick-card--green {
  background: linear-gradient(140deg, #0C2616 0%, #11301C 100%) !important;
}

[data-theme="dark"] .quick-card--gold,
.dark .quick-card--gold,
.dark-mode .quick-card--gold {
  background: linear-gradient(140deg, #2A2215 0%, #302818 100%) !important;
}

[data-theme="dark"] .quick-card--purple,
.dark .quick-card--purple,
.dark-mode .quick-card--purple {
  background: linear-gradient(140deg, #1D1C2E 0%, #23213E 100%) !important;
}

[data-theme="dark"] .quick-card--blue,
.dark .quick-card--blue,
.dark-mode .quick-card--blue {
  background: linear-gradient(140deg, #0C1D2C 0%, #112434 100%) !important;
}

[data-theme="dark"] .quick-card--teal,
.dark .quick-card--teal,
.dark-mode .quick-card--teal {
  background: linear-gradient(140deg, #0A2520 0%, #0F302A 100%) !important;
}

[data-theme="dark"] .quick-card--rose,
.dark .quick-card--rose,
.dark-mode .quick-card--rose {
  background: linear-gradient(140deg, #2C1515 0%, #351A1A 100%) !important;
}

[data-theme="dark"] .quick-card::before,
.dark .quick-card::before,
.dark-mode .quick-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%) !important;
}

.dark-mode .quick-card__icon {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .ambient-bg {
  background:
    radial-gradient(ellipse 700px 500px at 85% -5%, rgba(212, 148, 58, 0.03) 0%, transparent 65%),
    radial-gradient(ellipse 500px 500px at 5% 55%, rgba(88, 86, 214, 0.02) 0%, transparent 65%);
}

.dark-mode .event-card {
  background: linear-gradient(160deg, rgba(212, 148, 58, 0.06) 0%, rgba(212, 148, 58, 0.03) 100%);
  border-color: rgba(212, 148, 58, 0.12);
}

.dark-mode .event-card::before {
  opacity: 0.3;
}

.dark-mode .progress-inline {
  border-color: rgba(255, 255, 255, 0.04);
}

.dark-mode .progress-inline::before {
  opacity: 0.3;
}

.dark-mode .mini-player {
  background: rgba(44, 44, 46, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ═══ Dark Mode Nav — Premium Clean Glass (mirrors light mode structure) ═══ */
.dark-mode .bottom-nav__glass {
  background: rgba(22, 22, 24, 0.98) !important;
  backdrop-filter: blur(var(--blur-2xl)) saturate(220%) brightness(0.95) !important;
  -webkit-backdrop-filter: blur(var(--blur-2xl)) saturate(220%) brightness(0.95) !important;
  border: 0.5px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow:
    0 6px 32px rgba(0, 0, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.15) !important;
}

.dark-mode .bottom-nav__glass::before {
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(255, 255, 255, 0.09) 50%,
      rgba(255, 255, 255, 0.06) 70%,
      transparent 100%) !important;
}

.dark-mode .nav-tab .ios-emoji--nav {
  opacity: 0.45;
}

.dark-mode .nav-tab__label {
  color: rgba(255, 255, 255, 0.35);
}

.dark-mode .nav-tab--active .ios-emoji--nav {
  opacity: 1 !important;
  transform: scale(1.35) translateY(-3px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 14px rgba(212, 168, 74, 0.7)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)) !important;
}

.dark-mode .nav-tab--active .nav-tab__label {
  color: #E8B84A !important;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(212, 148, 58, 0.4);
  transform: translateY(-2px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Explore removed — spacing retained */

.dark-mode .sheet {
  background: var(--surface-elevated);
}

.dark-mode .sheet__handle {
  background: rgba(255, 255, 255, 0.15);
}

.dark-mode .install-banner {
  background: rgba(28, 28, 30, 0.94);
  border-color: rgba(255, 255, 255, 0.06);
}


/* § 19. EXPLORE GRID — REMOVED (functionality consolidated into Quick Access) */


/* ═══════════════════════════════════════════════════════════════════════════════
   § 20. MICRO-INTERACTIONS & PREMIUM POLISH
   The details that make it feel native iOS.
═══════════════════════════════════════════════════════════════════════════════ */

/* Smooth scroll snap indicator */
@supports (animation-timeline: scroll()) {
  .hero-carousel__track {
    scroll-timeline-name: --hero-scroll;
    scroll-timeline-axis: inline;
  }
}

/* Card press depth effect */
.hero-card:active .hero-card__image {
  filter: brightness(0.95);
  transition: filter var(--duration-instant) ease;
}

.practice-card:active .practice-card__ring-icon {
  transform: scale(0.9);
  transition: transform var(--duration-fast) var(--ease-spring);
}

/* Ripple effect for touch feedback */
@keyframes touch-ripple {
  0% {
    transform: scale(0);
    opacity: 0.12;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Scroll Reveal — Staggered Entrance ── */
.scroll-revealed {
  animation: fadeSlideUp 0.5s var(--ease-ios-spring) both;
}

/* Revisit within the same session: reveal instantly, no entrance animation.
   Set by js/scroll-engine.js in place of an inline `style.animation = none`,
   which stuck to every card permanently because nothing ever cleared it. */
.anhad-reveal-instant,
.anhad-reveal-instant.scroll-revealed {
  animation: none !important;
}

.quick-card:nth-child(1).scroll-revealed {
  animation-delay: 0ms;
}

.quick-card:nth-child(2).scroll-revealed {
  animation-delay: 60ms;
}

.quick-card:nth-child(3).scroll-revealed {
  animation-delay: 120ms;
}

.quick-card:nth-child(4).scroll-revealed {
  animation-delay: 180ms;
}

.quick-card:nth-child(5).scroll-revealed {
  animation-delay: 240ms;
}

.quick-card:nth-child(6).scroll-revealed {
  animation-delay: 300ms;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Content fade on scroll (native scroll-driven) */
@supports (animation-timeline: view()) {

  .greeting,
  .progress-inline,
  .hero-carousel,
  .event-card,
  .practice-grid,
  .quick-card {
    animation: scroll-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  @keyframes scroll-reveal {
    from {
      opacity: 0.4;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* PERF: Chevron idle animation REMOVED — was infinite animation on every card */
/* Visual hint now via CSS transition on hover/active only */

/* ── Practice Card — Enhanced Touch Depth ── */
/* Practice Card active shadow is styled in core components */

.practice-card:active .practice-card__ring-icon {
  transform: scale(0.85);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.practice-card:active .practice-card__ring-icon svg {
  filter: brightness(1.15);
}

/* ── Section Headers — Premium Styling ── */
.section-header {
  margin-bottom: var(--space-1);
}

.section-header__title {
  font-size: var(--text-title-3);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: -0.4px;
  position: relative;
  display: inline-block;
}

/* ── Last Quick Card — Bottom Breathing Room ── */
.quick-card:last-of-type {
  margin-bottom: 0;
}

/* Skeleton loading states */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg,
      var(--surface-tertiary) 25%,
      var(--surface-secondary) 50%,
      var(--surface-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-xs);
}

/* System-level transitions for page navigation */
.page-transition-enter {
  animation: page-in 0.35s var(--ease-ios-spring) forwards;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-transition-leave {
  animation: page-out 0.25s var(--ease-smooth) forwards;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateX(-15px);
  }
}

/* Pull to refresh indicator area */
.app::before {
  content: '';
  display: block;
  height: 0;
  transition: height var(--duration-normal) ease;
}

/* Print styles */
@media print {

  .bottom-nav,
  .mini-player,
  .install-banner,
  .ambient-bg,
  .sheet,
  .sheet-overlay {
    display: none !important;
  }

  body {
    background: var(--bg-primary, white);
    padding-bottom: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   § PERF: MOBILE PERFORMANCE KILL-SWITCHES
   Disable expensive GPU effects on mobile devices for 60 FPS scrolling.
═══════════════════════════════════════════════════════════════════════════════ */

/* Mobile: kill expensive effects */
.reduce-motion .ambient-bg {
  display: none !important;
}

/* Mobile: simplified shadows (single layer) */
.is-mobile .hero-card {
  box-shadow: none !important;
}

.is-mobile .bottom-nav__glass {
  box-shadow: none;
}

/* Mobile: disable backdrop-filter on non-essential elements */
.is-mobile .quick-card__icon {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.is-mobile .hero-card__play-btn {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(0, 0, 0, 0.35);
}

/* Mobile: simplify entrance animations */
.is-mobile .app>* {
  animation-duration: 0.25s !important;
}

.is-mobile .scroll-revealed {
  animation-duration: 0.3s !important;
}

/* Reduced motion: kill everything */
.reduce-motion .app>* {
  animation: none !important;
}

.reduce-motion .scroll-revealed {
  animation: none !important;
  opacity: 1;
  transform: none;
}

.reduce-motion .hero-card__badge-dot {
  animation: none !important;
}

.reduce-motion .mini-player__live-dot {
  animation: none !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   DESKTOP: Clean hero card images without dark overlays
   ════════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1024px) {

  /* COMPLETELY remove the extreme cinematic dark gradient */
  .hero-card__image-wrapper::after {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
    display: none !important;
  }

  /* COMPLETELY remove image mask that darkens the image */
  .hero-card__image-wrapper .hero-card__image {
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  /* COMPLETELY remove top dark gradient */
  .hero-card__image-wrapper::before {
    background: transparent !important;
    box-shadow: none !important;
    display: none !important;
  }

  /* Clean image display without any filters */
  .hero-card__image {
    filter: none !important;
  }

  /* Subtle text shadow for readability instead of dark overlay */
  .hero-card__title,
  .hero-card__subtitle {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
}