/* app.css — Kriya Guide Design System — Light Theme Focus */

/* ═══════════════════════════════════════════════════════════════════════════
   FONTS
   ═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — Light Theme (Primary / Default)
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Backgrounds */
  --bg-base:       #f4efe5;
  --bg-surface:    #fffdf7;
  --bg-card:       rgba(255, 252, 244, 0.80);
  --bg-card-hover: rgba(255, 248, 232, 0.96);
  --bg-overlay:    rgba(244, 239, 229, 0.92);
  --bg-glass:      rgba(255, 254, 250, 0.72);

  /* Borders */
  --border:        rgba(168, 136, 76, 0.22);
  --border-subtle: rgba(168, 136, 76, 0.11);
  --border-strong: rgba(168, 136, 76, 0.38);

  /* Saffron / Gold accents */
  --gold:          #c46200;
  --gold-light:    #e07a10;
  --gold-dim:      #f5ddb8;
  --gold-glow:     rgba(196, 98, 0, 0.18);

  /* Indigo / Purple accents */
  --purple:        #5448a8;
  --purple-light:  #7266cc;
  --purple-dim:    #eae7f8;
  --purple-glow:   rgba(84, 72, 168, 0.14);

  /* Teal accents */
  --teal:          #1a7a72;
  --teal-dim:      #d2eeeb;
  --teal-glow:     rgba(26, 122, 114, 0.14);

  /* Text */
  --text-primary:  #1c1409;
  --text-secondary:#4a3e2c;
  --text-muted:    #8a7860;
  --text-gold:     var(--gold);

  /* Semantic */
  --success:       #15803d;
  --error:         #dc2626;
  --warning:       #d97706;

  /* Phase colors */
  --phase-meditate: var(--purple);
  --phase-hold:     var(--teal);
  --phase-bow:      var(--gold);
  --phase-lift:     #2563eb;
  --phase-release:  #15803d;
  --phase-counting: var(--teal);
  --phase-complete: var(--success);

  /* Typography */
  --font-heading:  'Cinzel', Georgia, serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-serif:    'Lora', Georgia, serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* Shadows (warm-toned) */
  --shadow-sm:     0 1px 4px rgba(100, 64, 8, 0.07), 0 1px 2px rgba(100, 64, 8, 0.05);
  --shadow-md:     0 4px 16px rgba(100, 64, 8, 0.10), 0 2px 6px rgba(100, 64, 8, 0.06);
  --shadow-lg:     0 8px 32px rgba(100, 64, 8, 0.12), 0 4px 10px rgba(100, 64, 8, 0.08);
  --shadow-gold:   0 4px 24px rgba(196, 98, 0, 0.22);
  --shadow-purple: 0 4px 24px rgba(84, 72, 168, 0.18);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 260ms ease;
  --transition-slow: 420ms ease;

  /* Session ring */
  --ring-size:   clamp(200px, min(62vw, 44dvh), 270px);
  --ring-stroke: 11;

  /* Bottom nav height — used to offset main content */
  --bottom-nav-h: 68px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME OVERRIDE
   ═══════════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-base:       #070b14;
  --bg-surface:    #0f1623;
  --bg-card:       rgba(26, 34, 53, 0.85);
  --bg-card-hover: rgba(33, 45, 69, 0.95);
  --bg-overlay:    rgba(7, 11, 20, 0.88);
  --bg-glass:      rgba(15, 22, 35, 0.70);
  --border:        rgba(42, 53, 80, 0.80);
  --border-subtle: rgba(30, 42, 64, 0.70);
  --border-strong: rgba(60, 76, 112, 0.90);
  --gold:          #c9a847;
  --gold-light:    #e8c96a;
  --gold-dim:      #7a6428;
  --gold-glow:     rgba(201, 168, 71, 0.18);
  --purple:        #8b7cd4;
  --purple-light:  #a99de8;
  --purple-dim:    #3d3566;
  --purple-glow:   rgba(139, 124, 212, 0.18);
  --teal:          #4ecdc4;
  --teal-dim:      #1d5c58;
  --teal-glow:     rgba(78, 205, 196, 0.14);
  --text-primary:  #e8e6f0;
  --text-secondary:#9ba3bf;
  --text-muted:    #4a5568;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.28);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.42);
  --shadow-gold:   0 4px 24px rgba(201, 168, 71, 0.22);
  --shadow-purple: 0 4px 24px rgba(139, 124, 212, 0.28);
  --phase-meditate: var(--purple);
  --phase-hold:     var(--teal);
  --phase-bow:      var(--gold);
  --phase-lift:     #60a5fa;
  --phase-release:  #a3e635;
  --phase-counting: var(--teal);
  --phase-complete: #4ade80;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════════════════ */
html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  /* Reserve space at the bottom for the navigation bar */
  padding-bottom: var(--bottom-nav-h);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND — Soft warm radials
   ═══════════════════════════════════════════════════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-bg::before {
  content: '';
  position: absolute;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(84, 72, 168, 0.09) 0%, transparent 68%);
  top: -120px;
  right: -120px;
  border-radius: 50%;
  animation: ambient-drift 22s ease-in-out infinite alternate;
}

.ambient-bg::after {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(196, 98, 0, 0.07) 0%, transparent 68%);
  bottom: -80px;
  left: -80px;
  border-radius: 50%;
  animation: ambient-drift 28s ease-in-out infinite alternate-reverse;
}

[data-theme="dark"] .ambient-bg::before {
  background: radial-gradient(circle, rgba(139, 124, 212, 0.12) 0%, transparent 70%);
}
[data-theme="dark"] .ambient-bg::after {
  background: radial-gradient(circle, rgba(201, 168, 71, 0.08) 0%, transparent 70%);
}

@keyframes ambient-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.12); }
}

/* Floating Om particles layer */
.particles-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 1.1rem;
  opacity: 0;
  animation: particle-float linear infinite;
  color: var(--gold);
  filter: blur(0.5px);
  user-select: none;
}

@keyframes particle-float {
  0%   { opacity: 0;    transform: translateY(100vh) rotate(0deg); }
  10%  { opacity: 0.18; }
  85%  { opacity: 0.10; }
  100% { opacity: 0;    transform: translateY(-60px) rotate(180deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOP NAVIGATION BAR — Brand only
   ═══════════════════════════════════════════════════════════════════════════ */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.app-nav .brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.app-nav .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: var(--shadow-purple);
}

.app-nav .brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

/* Persistent install button in top nav */
.nav-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--purple-dim), var(--gold-dim));
  border: 1.5px solid var(--purple);
  color: var(--purple);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  animation: fade-in 0.4s ease;
}

.nav-install-btn:hover {
  background: var(--purple);
  color: #fff;
  box-shadow: var(--shadow-purple);
  transform: scale(1.04);
}

[data-theme="dark"] .nav-install-btn {
  color: var(--purple-light);
}

/* Hide top nav-links — navigation is now in bottom bar */
.nav-links {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--bottom-nav-h);
  background: var(--bg-overlay);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding: 0 var(--space-4);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(100, 64, 8, 0.08);
}

[data-theme="dark"] .bottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  margin: var(--space-2) var(--space-1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  border: none;
  background: none;
}

.bottom-nav-item .nav-icon {
  font-size: 1.4rem;
  transition: transform var(--transition-base);
  line-height: 1;
}

.bottom-nav-item .nav-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
}

.bottom-nav-item:hover {
  color: var(--text-secondary);
  background: var(--bg-card);
}

.bottom-nav-item.active {
  color: var(--purple);
  background: var(--purple-dim);
}

.bottom-nav-item.active .nav-icon {
  transform: scale(1.15);
}

.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: var(--radius-full);
  opacity: 0.9;
}

[data-theme="dark"] .bottom-nav-item.active {
  color: var(--purple-light);
  background: var(--purple-dim);
}

/* Hide bottom nav during session */
.bottom-nav.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   VIEWS
   ═══════════════════════════════════════════════════════════════════════════ */
.view {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: var(--space-5) var(--space-6) var(--space-8);
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  animation: fade-in var(--transition-slow) ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOME VIEW
   ═══════════════════════════════════════════════════════════════════════════ */
.home-hero {
  text-align: center;
  padding: var(--space-8) 0 var(--space-5);
  position: relative;
}

/* Decorative mandala ring behind Om */
.home-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.5;
  animation: hero-ring-spin 40s linear infinite;
}

.home-hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px dashed var(--gold-dim);
  opacity: 0.6;
  animation: hero-ring-spin 25s linear infinite reverse;
}

@keyframes hero-ring-spin {
  from { transform: translate(-50%, -60%) rotate(0deg); }
  to   { transform: translate(-50%, -60%) rotate(360deg); }
}

.home-hero .om-symbol {
  position: relative;
  z-index: 1;
  font-size: 4.5rem;
  line-height: 1.5;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--purple-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px var(--purple-glow));
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 16px var(--purple-glow)); }
  50%       { filter: drop-shadow(0 0 36px var(--gold-glow)); }
}

.home-hero h1 {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.07em;
  margin-bottom: var(--space-2);
}

.home-hero .subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-serif);
  font-style: italic;
}

/* Divider ornament */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--gold-dim);
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-strong));
}

.ornament-divider::after {
  background: linear-gradient(to left, transparent, var(--border-strong));
}

.ornament-divider span {
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.7;
}

/* Breath count info card */
.breath-count-info {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.breath-count-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--purple), var(--teal));
  border-radius: var(--radius-full);
}

.breath-count-info .bc-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.breath-count-info .bc-text { flex: 1; }

.breath-count-info .bc-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.breath-count-info .bc-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.breath-count-info .bc-month {
  text-align: right;
  flex-shrink: 0;
}

/* Session summary card */
.session-summary-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-2) 0 var(--space-5);
  box-shadow: var(--shadow-md);
}

.session-summary-card h3 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

/* Step list */
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.step-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-base);
}

.step-item:hover {
  background: var(--bg-card-hover);
}

.step-item .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dim), var(--gold-dim));
  border: 1.5px solid var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple);
  flex-shrink: 0;
}

.step-item .step-info {
  flex: 1;
  min-width: 0;
}

.step-item .step-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.step-item .step-duration {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-item.disabled {
  opacity: 0.35;
}

/* Start-from quick button */
.start-from-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple-dim);
  border: 1.5px solid var(--purple);
  color: var(--purple);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
  cursor: pointer;
}

.start-from-btn:hover {
  background: var(--purple);
  color: #fff;
  transform: scale(1.08);
  box-shadow: var(--shadow-purple);
}

/* Home actions */
.home-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Start-from row */
.start-from-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  margin-top: var(--space-2);
}

.start-from-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.start-from-select { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   SESSION VIEW — Immersive full-screen
   ═══════════════════════════════════════════════════════════════════════════ */
.session-view {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top, 16px) var(--space-5) 0;
  overflow: hidden;
  gap: var(--space-3);
}

/* Top bar */
.session-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0 var(--space-2);
  flex-shrink: 0;
}

.session-step-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-card);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.session-step-progress {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Step name */
.session-step-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-align: center;
  flex-shrink: 0;
}

/* Center area */
.session-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
  min-height: 0;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

/* SVG Timer Ring */
.timer-ring-container {
  position: relative;
  width: var(--ring-size);
  height: var(--ring-size);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timer-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: var(--ring-stroke);
}

.ring-progress {
  fill: none;
  stroke-width: var(--ring-stroke);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.6s ease;
  filter: drop-shadow(0 0 10px currentColor);
}

.ring-progress[data-phase="meditate"]        { stroke: var(--phase-meditate); }
.ring-progress[data-phase="hold"]            { stroke: var(--phase-hold); }
.ring-progress[data-phase="bow"]             { stroke: var(--phase-bow); }
.ring-progress[data-phase="lift"]            { stroke: var(--phase-lift); }
.ring-progress[data-phase="release"]         { stroke: var(--phase-release); }
.ring-progress[data-phase="counting"]        { stroke: var(--phase-counting); }
.ring-progress[data-phase="chakra_focus"]    { stroke: var(--purple-light); }
.ring-progress[data-phase="open_meditation"] { stroke: var(--gold); }
.ring-progress[data-phase="complete"]        { stroke: var(--phase-complete); }
.ring-progress[data-phase="transition"]      { stroke: var(--border-strong); animation: ring-spin 2.2s linear infinite; }

/* Breathing orb inside ring */
.breath-orb {
  width: calc(var(--ring-size) * 0.57);
  height: calc(var(--ring-size) * 0.57);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%,
    var(--purple-dim) 0%,
    var(--gold-dim) 45%,
    var(--bg-base) 100%
  );
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: orb-breathe 7s ease-in-out infinite;
  position: relative;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .breath-orb {
  background: radial-gradient(circle at 38% 32%,
    rgba(139, 124, 212, 0.28) 0%,
    rgba(78, 205, 196, 0.18) 45%,
    rgba(7, 11, 20, 0.6) 100%
  );
}

.breath-orb::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  animation: orb-glow 7s ease-in-out infinite;
}

@keyframes orb-breathe {
  0%, 100% { transform: scale(1);    box-shadow: var(--shadow-md); }
  50%       { transform: scale(1.07); box-shadow: var(--shadow-lg), 0 0 24px var(--purple-glow); }
}

@keyframes orb-glow {
  0%, 100% { transform: scale(1);    opacity: 0.4; }
  50%       { transform: scale(1.25); opacity: 0.9; }
}

.timer-display {
  font-size: clamp(1.9rem, 10vw, 3.2rem);
  font-weight: 300;
  color: var(--text-primary);
  font-feature-settings: 'tnum';
  letter-spacing: -0.02em;
  line-height: 1;
}

.timer-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Phase label */
.session-phase {
  text-align: center;
  flex-shrink: 0;
}

.phase-label {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 5vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition-slow);
}

.phase-label[data-phase="meditate"]       { color: var(--phase-meditate); }
.phase-label[data-phase="hold"]           { color: var(--phase-hold); }
.phase-label[data-phase="bow"]            { color: var(--phase-bow); }
.phase-label[data-phase="lift"]           { color: var(--phase-lift); }
.phase-label[data-phase="release"]        { color: var(--phase-release); }
.phase-label[data-phase="counting"]       { color: var(--phase-counting); }
.phase-label[data-phase="chakra_focus"]   { color: var(--purple-light); }
.phase-label[data-phase="open_meditation"]{ color: var(--gold-light); }
.phase-label[data-phase="complete"]       { color: var(--phase-complete); }

.phase-detail {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  font-weight: 500;
  font-family: var(--font-serif);
  font-style: italic;
}

/* Chakra dots */
.chakra-dots {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
}

.chakra-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all var(--transition-base);
}

.chakra-dot.active {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scale(1.4);
}

.chakra-dot.done {
  background: var(--purple-dim);
  border: 1.5px solid var(--purple);
}

/* Progress bar */
.session-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.session-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  border-radius: var(--radius-full);
  transition: width 1s linear;
}

/* Bottom floating control pill */
.session-bottom {
  width: 100%;
  flex-shrink: 0;
  padding: var(--space-3) 0 calc(env(safe-area-inset-bottom, 0px) + var(--space-4));
}

.session-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  box-shadow: var(--shadow-lg);
  margin: 0 var(--space-4);
  margin-top: var(--space-3);
}

/* Paused overlay */
.paused-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  z-index: 10;
}

.paused-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Complete overlay */
.complete-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  z-index: 10;
}

.complete-icon {
  font-size: 5rem;
  animation: complete-pop 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes complete-pop {
  from { transform: scale(0) rotate(-12deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.complete-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-align: center;
}

.complete-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.95rem;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS VIEW
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-view {
  padding-bottom: var(--space-16);
}

.settings-view h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  letter-spacing: 0.05em;
}

/* Tabs */
.settings-tabs {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-6);
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 40px;
}

.tab-btn:hover {
  color: var(--text-secondary);
  border-color: var(--border);
  background: var(--bg-card-hover);
}

.tab-btn.active {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: var(--purple);
  font-weight: 600;
  box-shadow: var(--shadow-purple);
}

[data-theme="dark"] .tab-btn.active {
  color: var(--purple-light);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Settings sections */
.settings-section {
  margin-bottom: var(--space-6);
}

.settings-section-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-gold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

/* Accordion */
.accordion {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  background: var(--bg-surface);
  user-select: none;
  min-height: 52px;
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.accordion-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.accordion.expanded .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 var(--space-5);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.accordion.expanded .accordion-content {
  padding: var(--space-4) var(--space-5);
  max-height: 2000px;
  opacity: 1;
}

/* Form controls */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-label span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: var(--space-2);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7860' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.5rem;
}

/* Range slider */
.form-range-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.form-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-full);
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.form-range::-webkit-slider-thumb:active {
  transform: scale(1.25);
}

.range-value {
  min-width: 3.2rem;
  text-align: right;
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 600;
}

/* Toggle switch */
.toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  min-height: 56px;
}

.toggle-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.toggle-label small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--purple), var(--gold-dim));
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Date picker */
.date-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  min-height: 48px;
}

.date-display .date-val {
  color: var(--gold);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  cursor: pointer;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active::after { opacity: 0.1; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--gold) 100%);
  color: #fff;
  box-shadow: var(--shadow-purple);
  font-size: 1.05rem;
  padding: var(--space-4) var(--space-8);
  width: 100%;
  letter-spacing: 0.04em;
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(84, 72, 168, 0.35);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

[data-theme="dark"] .btn-primary {
  box-shadow: 0 4px 24px rgba(139, 124, 212, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Icon buttons for session controls */
.btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-base);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
}

/* Large central pause button */
.btn-icon.btn-pause {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--purple-dim), var(--gold-dim));
  border: 2px solid var(--purple);
  color: var(--purple);
  font-size: 1.6rem;
  box-shadow: var(--shadow-purple);
}

[data-theme="dark"] .btn-icon.btn-pause {
  color: var(--purple-light);
}

.btn-icon.btn-pause:hover {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 0 28px var(--purple-glow);
  transform: scale(1.08);
}

.btn-danger {
  color: var(--error);
  border-color: rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--error);
  color: var(--error);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  min-height: 38px;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  box-shadow: 0 6px 28px var(--gold-glow);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════════════════════ */
.text-gold    { color: var(--gold); }
.text-purple  { color: var(--purple); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.875rem; }

[data-theme="dark"] .text-purple { color: var(--purple-light); }

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   TESTING / SPECIAL STATES
   ═══════════════════════════════════════════════════════════════════════════ */
.test-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.10), rgba(196, 98, 0, 0.06));
  border: 1px solid rgba(217, 119, 6, 0.30);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: var(--space-4);
}

.test-mode-off-btn {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
}

.test-mode-off-btn:hover { color: var(--text-secondary); }

.test-mode-pill {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.32);
  color: var(--warning);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  align-self: center;
}

.btn-test-active {
  border-color: rgba(217, 119, 6, 0.45) !important;
  color: var(--warning) !important;
  background: rgba(217, 119, 6, 0.08) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes ring-spin {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -553; }
}

.timer-ring-container.is-transition .breath-orb {
  animation: orb-breathe 2.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(100, 64, 8, 0.18);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: modal-fade-in 200ms ease;
  /* Absorb ALL touches on the backdrop — nothing behind it is reachable */
  pointer-events: all;
  touch-action: none;
}

/* Re-enable interaction only on the modal card itself */
.modal-backdrop .modal {
  pointer-events: all;
  touch-action: auto;
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.55);
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6) var(--space-6);
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
  text-align: center;
  animation: modal-pop-in 240ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop-in {
  from { transform: scale(0.88) translateY(16px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.modal-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
}

.modal-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  font-family: var(--font-serif);
  font-style: italic;
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
}

.modal-actions .btn {
  flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PWA INSTALL MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* Slide up from bottom on mobile */
.pwa-install-backdrop {
  align-items: flex-end;
  padding: 0;
}

@media (min-width: 480px) {
  .pwa-install-backdrop {
    align-items: center;
    padding: var(--space-6);
  }
}

.pwa-install-modal {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-width: 100%;
  width: 100%;
  padding: var(--space-6) var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  animation: pwa-slide-up 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  text-align: center;
}

@media (min-width: 480px) {
  .pwa-install-modal {
    border-radius: var(--radius-xl);
    max-width: 360px;
    padding: var(--space-8) var(--space-6) var(--space-6);
    animation: modal-pop-in 260ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
}

@keyframes pwa-slide-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Close button top-right */
.pwa-close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.pwa-close-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* App icon */
.pwa-install-icon {
  margin: 0 auto var(--space-3);
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border);
}

.pwa-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Install App" badge pill */
.pwa-install-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-dim), var(--gold-dim));
  border: 1px solid var(--purple);
  color: var(--purple);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

[data-theme="dark"] .pwa-install-badge {
  color: var(--purple-light);
}

/* iOS share icon */
.pwa-share-icon {
  display: inline-block;
  font-size: 1rem;
  vertical-align: middle;
  color: var(--gold);
}

/* Exit animations */
@keyframes modal-fade-out {
  to { opacity: 0; }
}

@keyframes modal-pop-out {
  to { transform: scale(0.9) translateY(12px); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .view { padding: var(--space-4) var(--space-4) var(--space-8); }
  .home-hero h1 { font-size: 1.65rem; }
  .app-nav { padding: var(--space-3) var(--space-4); }
  .session-controls { margin: 0 var(--space-2); padding: var(--space-3) var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
