/* PEAK FITNESS ARCHITECT // MODERN PREMIUM DESIGN SYSTEM */

:root {
  --bg-obsidian: #f0f4fa; /* רקע רך כחול-אפור עדין */
  --bg-card: rgba(255, 255, 255, 0.85); /* רקע קארד לבן חצי שקוף, מקצועי */
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(250, 250, 250, 0.9);
  --border-color: rgba(15, 23, 42, 0.1); /* קו-שיער כהה עדין על רקע בהיר */
  --border-active: rgba(16, 185, 129, 0.4);

  /* Accent Colors */
  --accent-emerald: #10b981; /* Deficit growth, healthy items */
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-gold: #f59e0b; /* Health Coins, VIP elements */
  --accent-gold-glow: rgba(245, 158, 11, 0.15);
  --accent-red: #ef4444; /* Streak fire, loss alerts */
  --accent-red-glow: rgba(239, 68, 68, 0.2);
  --accent-cyan: #06b6d4; /* Science evidence, charts */
  --accent-cyan-glow: rgba(6, 182, 212, 0.2);

  /* Text Colors */
  --text-primary: #2d3748; /* טקסט כהה לקריאה */
  --text-secondary: #6b7280; /* כהה יותר */
  --text-muted: #4b5563;

  /* Shadows and Glass */
  --glass-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.08); /* צל רך לערכה הבהירה */
  --card-blur: blur(16px);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Aliases for compatibility */
  --card-bg: var(--bg-card);
  --border-subtle: var(--border-color);
  --bg-hover: var(--bg-card-hover);
}

/* ===== ערכה כהה (הגרסה הראשונה) — מופעלת ע"י המתג ☀️/🌙 בכותרת ===== */
:root[data-theme='dark'] {
  --bg-obsidian: #090c15;
  --bg-card: rgba(18, 24, 40, 0.65);
  --bg-card-hover: rgba(26, 34, 56, 0.8);
  --bg-input: rgba(10, 14, 26, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* אלמנטים מבניים עם רקע קשיח — משוחזרים לכהה המקורי במצב כהה */
:root[data-theme='dark'] body {
  background: radial-gradient(circle at 50% 50%, #151e33 0%, #060911 100%);
}
:root[data-theme='dark'] .app-header {
  background: linear-gradient(180deg, rgba(9, 12, 21, 1) 0%, rgba(9, 12, 21, 0.8) 100%);
}
:root[data-theme='dark'] .app-nav-bar {
  background: rgba(10, 14, 26, 0.85);
}
:root[data-theme='dark'] .status-bar .notch {
  background: #1e293b;
}

/* מעבר רך בין המצבים */
body {
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

/* מתג ערכת-הצבעים בכותרת (מתאים לסגנון signout-btn) */
.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.15s;
}
.theme-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.theme-toggle-btn:active {
  transform: scale(0.88);
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    'Rubik',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(circle at 50% 50%, #f0f4fa 0%, #dbe3ee 100%);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* App Container - Mock Phone Screen for Desktop & Responsive Native on Mobile */
.app-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
}

.phone-frame {
  width: 412px;
  max-width: 100vw;
  height: 890px;
  max-height: calc(100vh - 40px);
  background: var(--bg-obsidian);
  border: 10px solid #1e293b;
  border-radius: 42px;
  position: relative;
  box-shadow:
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Responsive Scaling: Full screen on real mobile devices */
@media (max-width: 450px) {
  body {
    background: var(--bg-obsidian);
  }
  .app-container {
    height: 100vh;
    height: 100dvh;
  }
  .phone-frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border: none;
    border-radius: 0;
    /* keep content clear of the real OS status bar when installed as a standalone app */
    padding-top: env(safe-area-inset-top, 0px);
  }
  /* Hide the SIMULATED iPhone status bar + notch on real phones — the device already has a real one */
  .status-bar {
    display: none;
  }
}

/* Status Bar Simulator */
.status-bar {
  height: 44px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 10;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-bar .notch {
  width: 130px;
  height: 24px;
  background: #dbe3ee;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
}

/* ===== אפליקציה מותקנת (PWA/standalone): מסך מלא אמיתי, בלי מסגרת-טלפון מדומה ===== */
@media (display-mode: standalone) {
  html,
  body {
    height: 100%;
  }
  .app-container {
    width: 100%;
    height: 100vh;
  }
  .phone-frame {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important; /* מסך פיזי מלא (כולל אזור סרגל-המחוות התחתון) */
    max-height: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-top: env(safe-area-inset-top, 0px);
  }
  /* השורה המדומה מיותרת במסך-מלא — יש שורת-מערכת אמיתית */
  .status-bar {
    display: none !important;
  }
  /* nav bar / FABs / scroll-padding are now safe-area-aware in the BASE styles
     (so they're correct in the browser too) — no standalone overrides needed. */
}

.status-icons {
  display: flex;
  gap: 6px;
  font-size: 11px;
}

/* App Header styling */
.app-header {
  padding: 12px 18px 8px 18px;
  background: linear-gradient(180deg, #f0f4fa 0%, rgba(240, 244, 250, 0.85) 100%);
  border-bottom: 1px solid var(--border-color);
  z-index: 5;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-accent {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-light {
  color: var(--text-primary);
}

.active-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Streak fire badge */
.streak-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.streak-badge:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.05);
}

.fire-icon {
  color: var(--accent-red);
  font-size: 14px;
  animation: fire-flicker 1.5s ease-in-out infinite alternate;
}

@keyframes fire-flicker {
  0% {
    transform: scale(1) rotate(-2deg);
    filter: drop-shadow(0 0 2px var(--accent-red));
  }
  100% {
    transform: scale(1.15) rotate(2deg);
    filter: drop-shadow(0 0 8px var(--accent-red));
  }
}

.streak-count {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

/* Gamification Header Stats Dashboard */
.gamification-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
}

.stat-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.coin-icon {
  color: var(--accent-gold);
  font-size: 15px;
  filter: drop-shadow(0 0 4px var(--accent-gold-glow));
}

.coins-count {
  font-size: 16px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}

.completion-percent {
  font-size: 16px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-emerald);
}

/* Coin & Completion Bar */
.coin-bar-bg,
.progress-bar-bg {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}

.coin-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d97706, var(--accent-gold));
  border-radius: 3px;
  transition: width 0.5s ease-in-out;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, var(--accent-emerald));
  border-radius: 3px;
  transition: width 0.5s ease-in-out;
}

/* Shake Coin Animation for Loss Aversion */
@keyframes shake-coins {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px) rotate(-3deg);
  }
  40% {
    transform: translateX(6px) rotate(3deg);
  }
  60% {
    transform: translateX(-6px) rotate(-2deg);
  }
  80% {
    transform: translateX(4px) rotate(2deg);
  }
  100% {
    transform: translateX(0);
  }
}

.coins-lost-alert {
  animation: shake-coins 0.6s ease-in-out;
  border-color: var(--accent-red) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

/* Main Content Area */
.app-main-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  /* clear the bottom nav + the floating SOS/deviation FABs, in browser and installed PWA */
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}

.app-main-content::-webkit-scrollbar {
  display: none;
}

/* Navigation Tabs Top */
.navigation-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

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

.nav-tab {
  flex: 1 0 auto;
  min-width: max-content;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dashboard Cards (Premium Obsidian Glass) */
.dashboard-card {
  background: var(--bg-card);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.dashboard-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-header-row h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header-row h3 i {
  color: var(--accent-emerald);
}

/* Bio-Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.grid-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid-label {
  font-size: 11px;
  letter-spacing: 0.8px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.grid-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.edit-profile-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.edit-profile-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bmr-calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.bmr-box {
  display: flex;
  flex-direction: column;
}

.bmr-title {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.bmr-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.bmr-value small {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Projection Card */
.projection-card h3 i {
  color: var(--accent-cyan);
}

.projection-main {
  text-align: center;
  margin: 10px 0 14px 0;
}

.projection-number {
  font-size: 34px;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1;
}

.projection-number small {
  font-size: 16px;
  font-weight: 700;
  -webkit-text-fill-color: var(--text-primary);
}

.projection-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-top: 4px;
}

.deficit-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}

.summary-line span:first-child {
  color: var(--text-secondary);
}

.highlight-green {
  color: var(--accent-emerald);
  font-weight: 700;
}

.projection-progress-wrapper {
  margin-top: 14px;
}

.projection-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.projection-visual-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.proj-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  width: 0%;
  border-radius: 3px;
  transition: width 0.5s ease-in-out;
}

.proj-start-marker,
.proj-end-marker {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
}

.proj-end-marker {
  right: 0;
}

.projection-footer-text {
  font-size: 8.5px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}

/* Mini checklist on Dashboard */
.mini-checklist-card h3 i {
  color: var(--accent-emerald);
}

.mini-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.mini-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
}

.mini-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-check-indicator {
  color: var(--text-muted);
}

.mini-check-indicator.checked {
  color: var(--accent-emerald);
}

.mini-item-title {
  font-weight: 500;
  color: var(--text-primary);
}

.mini-item-val {
  font-weight: 700;
  color: var(--accent-emerald);
}

.mini-item-val.neutral {
  color: var(--accent-cyan);
}

.view-all-checklist-btn {
  width: 100%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.view-all-checklist-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

/* Checklist group section headers */
.checklist-group-header {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 4px 2px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
}

/* CHECKLIST PANEL SPECIFICS */
.tab-introduction {
  margin-bottom: 4px;
}

.tab-introduction h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tab-introduction p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checklist-items-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-card-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.checklist-card-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.checklist-card-item.checked {
  border-color: var(--border-active);
  background: rgba(16, 185, 129, 0.04);
}

.checklist-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding-right: 10px;
}

/* Custom Checkbox Design */
.custom-checkbox-wrapper {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.custom-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark-box {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.checklist-card-item.checked .checkmark-box {
  background-color: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.checkmark-box::after {
  content: '';
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checklist-card-item.checked .checkmark-box::after {
  display: block;
}

/* Freebie locked status style */
.checklist-card-item.locked {
  cursor: default;
}
.checklist-card-item.locked .checkmark-box {
  background-color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  opacity: 0.6;
}
.checklist-card-item.locked .checkmark-box::after {
  display: block;
}

/* Checklist Titles */
.checklist-text-col {
  display: flex;
  flex-direction: column;
}

.checklist-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.checklist-card-item.checked .checklist-title {
  color: var(--text-secondary);
}

.checklist-subtitle {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-emerald);
  display: block;
}

.checklist-subtitle.neutral {
  color: var(--accent-cyan);
}

.checklist-right-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-circle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.info-circle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* RIVALRY TAB & P2P SPECIFICS */
.rival-match-card {
  position: relative;
  overflow: hidden;
}

.rival-badge {
  position: absolute;
  top: 10px;
  right: -25px;
  background: linear-gradient(90deg, #b91c1c, var(--accent-red));
  color: white;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 28px;
  transform: rotate(45deg);
}

.rival-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.user-vs-avatar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: white;
}

.user-avatar {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.rival-avatar {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.vs-text {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
}

.rival-info h3 {
  font-size: 16px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

.rival-stats {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0 4px 0;
}

.match-percentage {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rivalry-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  text-align: center;
}

.riv-stat {
  display: flex;
  flex-direction: column;
}

.riv-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.riv-stat-lbl {
  font-size: 8.5px;
  color: var(--text-secondary);
}

/* Notifications Feed */
.live-notifications-card h3 i {
  color: var(--accent-red);
}

.notifications-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: none;
}

.notifications-feed::-webkit-scrollbar {
  display: none;
}

.alert-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 10.5px;
}

.alert-item.primary-alert {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.15);
}

.alert-icon {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.alert-item.primary-alert .alert-icon {
  color: var(--accent-red);
}

.alert-item:not(.primary-alert) .alert-icon {
  color: var(--accent-cyan);
}

.alert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.alert-title {
  font-weight: 700;
  color: var(--text-primary);
}

.alert-desc {
  color: var(--text-secondary);
  margin-top: 2px;
}

.alert-time {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 4px;
  align-self: flex-end;
}

/* Bottom App Navigation Bar */
.app-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--card-blur);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  padding: 6px 0;
}

.nav-item i {
  font-size: 16px;
  margin-bottom: 4px;
}

.nav-item span {
  font-size: 9px;
  font-weight: 600;
}

.nav-item:hover,
.nav-item.active {
  color: var(--accent-emerald);
}

/* MODAL OVERLAYS AND MODAL CARDS */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Mobile drawer feel */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  background: var(--bg-obsidian);
  border-top: 2px solid var(--border-color);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 24px;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  scrollbar-width: none;
}

.modal-card::-webkit-scrollbar {
  display: none;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.close-modal-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.modal-header {
  margin-bottom: 20px;
  padding-right: 28px;
}

.modal-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-active);
  color: var(--accent-emerald);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.modal-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.detail-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h3 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-section h3 i {
  color: var(--accent-cyan);
}

/* Specific Detail Sections styling */
.calc-box-result {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--text-primary);
  padding: 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

.science-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
}

.science-source {
  font-size: 9.5px;
  color: var(--accent-cyan);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-list li {
  font-size: 12px;
  position: relative;
  padding-left: 16px;
  color: var(--text-primary);
  line-height: 1.4;
}

.tips-list li::before {
  content: '•';
  color: var(--accent-emerald);
  position: absolute;
  left: 4px;
  font-weight: 900;
}

/* Configure Profile Form */
.profile-setup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
}

.submit-profile-btn {
  background: var(--accent-emerald);
  border: none;
  color: white;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: var(--transition-smooth);
}

.submit-profile-btn:hover {
  background: #059669;
}

/* Streak and Loss Aversion Details Modal styles */
.text-center {
  text-align: center;
}

.modal-header-icon {
  width: 50px;
  height: 50px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  font-size: 22px;
}

.fire-glow i {
  color: var(--accent-red);
}

.loss-aversion-p {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-red);
  margin-bottom: 10px;
}

.explanation-p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.streak-stakes-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 12px;
  border-radius: 14px;
  text-align: right;
}

.streak-stakes-box h4 {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.streak-stakes-box p {
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-primary);
}

/* DOPAMINE EXPLOSION CARD */
.dopamine-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  border-radius: 24px;
}

.dopamine-card {
  width: 90%;
  background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #030712 100%);
  border: 2px solid #6366f1;
  border-radius: 24px;
  padding: 24px;
  box-shadow:
    0 0 40px rgba(99, 102, 241, 0.4),
    0 0 100px rgba(99, 102, 241, 0.15);
  text-align: center;
  transform: scale(0.7);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.modal-overlay.active .dopamine-card {
  transform: scale(1);
  opacity: 1;
}

.dopamine-icon-container {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
  animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.dopamine-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #c084fc;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.dopamine-body {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.dopamine-fact {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-style: italic;
}

.dopamine-xp-gain {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-emerald);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.DNA-icon {
  color: white;
  animation: spin-dna 8s linear infinite;
}

@keyframes spin-dna {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.dopamine-close-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
  transition: var(--transition-smooth);
}

.dopamine-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
}

/* Matchmaking Radar Styling */
.matchmaking-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.matchmaking-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-active);
  color: var(--accent-emerald);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 12px;
}

.radar-scan-wrapper {
  margin: 30px 0 20px 0;
  display: flex;
  justify-content: center;
}

.radar-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px dashed rgba(16, 185, 129, 0.3);
  position: relative;
  background: rgba(16, 185, 129, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.05);
}

.radar-beam {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 0;
  right: 0;
  background: linear-gradient(45deg, rgba(16, 185, 129, 0.3), transparent 70%);
  transform-origin: bottom left;
  border-top-right-radius: 100%;
  animation: radar-sweep 4s linear infinite;
  display: block;
}

/* Pause the sweep when scanning is finished */
.radar-circle.scan-complete .radar-beam {
  animation-play-state: paused;
  opacity: 0.15;
}

.radar-avatar-center {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: white;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  z-index: 2;
}

.radar-pulse-ring {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--accent-emerald);
  animation: radar-pulse 2s infinite ease-out;
  z-index: 1;
}

.radar-circle.scan-complete .radar-pulse-ring {
  animation-play-state: paused;
  opacity: 0.2;
}

@keyframes radar-sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes radar-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.matchmaking-status-box {
  margin-bottom: 20px;
}

.matchmaking-status-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.matchmaking-status-box p {
  font-size: 11px;
  color: var(--text-secondary);
}

.search-params-tagline {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.search-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Disclaimer panel styles */
.matchmaking-disclaimer {
  display: flex;
  gap: 12px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 14px;
  border-radius: 14px;
  text-align: right;
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease-out forwards;
}

.disclaimer-icon {
  color: var(--accent-red);
  font-size: 16px;
  display: flex;
  align-items: center;
}

.disclaimer-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.retry-search-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  animation: fadeIn 0.4s ease-out forwards;
}

.retry-search-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Personal Greeting */
.greeting-row {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 8px;
  padding: 0 2px;
  letter-spacing: 0.2px;
}

/* Weekly History Card */
.history-card h3 i {
  color: var(--accent-gold);
}

.history-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 4px 0;
}

.history-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.history-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7.5px;
  font-weight: 800;
  border: 2px solid;
  font-family: 'Outfit', sans-serif;
  transition: var(--transition-smooth);
}

.history-circle.empty {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.history-circle.low {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.08);
}

.history-circle.medium {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.08);
}

.history-circle.high {
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
}

.history-circle.today {
  box-shadow: 0 0 10px currentColor;
}

.history-day-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* No Rival Found Card */
.no-rival-card {
  text-align: center;
  padding: 32px 20px;
  direction: rtl;
}
.no-rival-icon {
  font-size: 42px;
  margin-bottom: 12px;
}
.no-rival-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.no-rival-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}
.no-rival-hint {
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

/* Rivalry Tab Disclaimer */
.rivalry-disclaimer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-muted);
  direction: rtl;
  margin-bottom: 12px;
}
.rivalry-disclaimer i {
  color: #818cf8;
  flex-shrink: 0;
}

/* History Legend */
.history-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.high {
  background: var(--accent-emerald);
}
.legend-dot.medium {
  background: #f59e0b;
}
.legend-dot.low {
  background: #ef4444;
}

/* Daily Wisdom Card Styling */
.wisdom-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(18, 24, 40, 0.7) 100%);
  border-color: rgba(6, 182, 212, 0.2);
}

.wisdom-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.wisdom-bulb-icon {
  animation: bulb-glow 2s infinite alternate;
}

@keyframes bulb-glow {
  from {
    filter: drop-shadow(0 0 1px var(--accent-cyan));
  }
  to {
    filter: drop-shadow(0 0 6px var(--accent-cyan));
  }
}

.wisdom-content {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
  min-height: 44px;
  transition: opacity 0.25s ease-out;
  text-align: right; /* RTL Hebrew */
}

.next-wisdom-btn {
  align-self: flex-end;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.next-wisdom-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  transform: translateY(-1px);
}

.wisdom-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.wisdom-info-btn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.wisdom-info-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}

/* WISDOM DETAIL MODAL */
.wisdom-detail-card {
  max-height: 88vh;
  overflow-y: auto;
}

.wisdom-modal-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
}

.wisdom-modal-quote {
  font-style: italic;
  color: var(--text-secondary);
  border-right: 3px solid var(--accent-gold);
  padding-right: 12px;
  text-align: right;
  line-height: 1.6;
}

.wisdom-detail-section {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}

.wisdom-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wisdom-section-label i {
  color: var(--accent-gold);
}

.wisdom-section-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0;
}

.wisdom-tips-list {
  margin: 0;
  padding-right: 18px;
  list-style: none;
}

.wisdom-tips-list li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.wisdom-tips-list li:last-child {
  border-bottom: none;
}

.wisdom-tips-list li::before {
  content: '✓';
  color: var(--accent-emerald);
  font-weight: 800;
  position: absolute;
  right: -18px;
}

.wisdom-personal-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--accent-emerald);
  font-weight: 600;
}

.wisdom-source-box {
  font-size: 13px;
  color: var(--text-secondary);
}

.research-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  transition: var(--transition-smooth);
}

.research-link:hover {
  color: #fff;
  border-bottom-color: var(--accent-cyan);
}

/* RTL OVERRIDES */
[dir='rtl'] .matchmaking-badge {
  right: auto;
  left: 16px;
}

[dir='rtl'] .close-modal-btn {
  right: auto;
  left: 18px;
}

[dir='rtl'] .modal-header {
  padding-right: 0;
  padding-left: 28px;
}

[dir='rtl'] .tips-list li {
  padding-left: 0;
  padding-right: 16px;
}

[dir='rtl'] .tips-list li::before {
  left: auto;
  right: 4px;
}

[dir='rtl'] .view-all-checklist-btn i {
  transform: scaleX(-1);
}

[dir='rtl'] .chat-bubble.coach,
[dir='rtl'] .chat-bubble.rival {
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 12px;
}

[dir='rtl'] .chat-bubble.user {
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 12px;
}

[dir='rtl'] .chat-status-dot {
  margin-left: 6px;
  margin-right: 0;
}

[dir='rtl'] .rival-badge {
  right: auto;
  left: -25px;
  transform: rotate(-45deg);
}

[dir='rtl'] .active-dot {
  margin-right: 6px;
  margin-left: 0;
}

/* CHECKLIST CUSTOMIZER & TASK SELECTOR STYLING */
.checklist-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.manage-tasks-btn {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.manage-tasks-btn:hover {
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

.preset-selector-container {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.preset-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.preset-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  padding: 8px 2px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.preset-btn.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.task-toggle-list {
  /* removed max-height so it can stretch fully inside the modal */
  padding-right: 2px;
  padding-left: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom Scrollbar for Toggle List */
.task-toggle-list::-webkit-scrollbar {
  width: 5px;
}
.task-toggle-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
  border-radius: 10px;
}
.task-toggle-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.task-toggle-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.task-toggle-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.task-toggle-item.locked-task {
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.02);
}

.task-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  flex: 1;
  padding-left: 12px;
}

.task-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.task-toggle-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.group-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.group-badge.group-a {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

.group-badge.group-b {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.2);
}

.group-badge.group-c {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.2);
}

.group-badge.locked-badge {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.2);
}

/* Premium Custom Switch Toggles */
.switch-wrapper {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  direction: ltr; /* Keeps switch direction consistent left-to-right */
  flex-shrink: 0;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #121829;
  border: 1px solid var(--border-color);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.switch-slider::before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #6b7280;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.switch-input:checked + .switch-slider {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
}

.switch-input:checked + .switch-slider::before {
  transform: translateX(20px);
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.switch-input:disabled + .switch-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

.save-task-selection-btn {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  border: none;
  border-radius: 14px;
  color: #040815;
  font-weight: 800;
  font-size: 13.5px;
  width: 100%;
  padding: 12px;
  margin-top: 18px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  transition: var(--transition-smooth);
  text-align: center;
}

.save-task-selection-btn:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.save-task-selection-btn:active {
  transform: translateY(0);
}

/* RESEARCH LINK STYLING */
.research-link {
  color: var(--accent-cyan) !important;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dashed var(--accent-cyan);
  transition: var(--transition-smooth);
  margin-right: 4px;
  display: inline-block;
}

.research-link:hover {
  color: #22d3ee !important;
  border-bottom-style: solid;
  transform: translateY(-0.5px);
}

/* DIET RULES OF THUMB GRID & CARDS */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--card-blur);
}

.rule-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.rule-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-num {
  width: 24px;
  height: 24px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.rule-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.rule-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rule-detail-btn {
  align-self: flex-start;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
  margin-top: 4px;
}

.rule-detail-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-gold);
  transform: translateX(-2px);
}

.dashboard-section-title {
  margin: 24px 0 12px 0;
  text-align: right;
  padding: 0 6px;
}

.dashboard-section-title h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-section-title h3 i {
  color: var(--accent-gold);
}

.dashboard-section-title p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

/* Modal research details cards */
.research-detail-card {
  max-height: 85vh;
  overflow-y: auto;
}

.research-modal-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-gold);
}

.research-highlight-box {
  background: rgba(245, 158, 11, 0.04);
  border-right: 3px solid var(--accent-gold);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 14px 0;
}

.research-highlight-box h4 {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 700;
}

.research-highlight-box p,
.research-highlight-box ul {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.research-tip-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.research-tip-box h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.research-tip-box p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

#research-modal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 6px;
}

#research-modal-body p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

#research-modal-body ul {
  padding-right: 18px;
  margin-bottom: 12px;
}

#research-modal-body li {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* LOGIN / SIGNUP SCREEN OVERLAY */
.login-screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 18, 0.97);
  backdrop-filter: blur(15px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
  opacity: 1;
  pointer-events: auto;
}

.login-screen-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.login-container {
  width: 85%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  animation: fadeInLogin 0.5s ease-out;
}

@keyframes fadeInLogin {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Google Sign-in button */
.google-login-btn {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background-color 0.2s,
    transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.google-login-btn:hover {
  background-color: #f9fafb;
  transform: translateY(-1px);
}

.google-icon-img {
  width: 18px;
  height: 18px;
}

/* Separator */
.login-separator {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  margin: 8px 0;
}

.login-separator::before,
.login-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-separator::before {
  margin-left: 0.5em;
}

.login-separator::after {
  margin-right: 0.5em;
}

/* Form inputs */
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-field-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.login-field-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.login-field-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 13px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  text-align: right;
  direction: rtl;
}

.login-field-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}
.login-field-group input[dir='ltr'] {
  text-align: left;
  direction: ltr;
  unicode-bidi: plaintext;
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #0d0e12;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  margin-top: 8px;
}

.login-submit-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Auth tab row */
.auth-tab-row {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--accent-gold);
  color: #0d0e12;
}

/* Auth error / success messages */
.auth-error-msg {
  width: 100%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #f87171;
  text-align: right;
  direction: rtl;
  line-height: 1.4;
}
.auth-success-msg {
  width: 100%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #34d399;
  text-align: right;
  direction: rtl;
}

/* Forgot password link */
.forgot-password-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: -8px;
}
.forgot-password-btn:hover {
  color: var(--accent-gold);
}

/* Sign-out button in header */
.signout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s,
    background 0.2s;
  margin-right: auto;
}
.signout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Disabled submit button */
.login-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Profile Onboarding Overrides */
#profile-modal.onboarding-active #close-profile-modal-btn {
  display: none !important;
}

/* Profile modal & Task selection modal — true full-screen within app frame */
#profile-modal,
#task-selection-modal {
  position: absolute; /* Revert to absolute so it stays inside phone-frame */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: stretch; /* Stretches modal-card to full height */
  flex-direction: column;
}
#profile-modal .modal-card,
#task-selection-modal .modal-card {
  max-height: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  transform: translateY(100%);
  flex: 1; /* Ensure it takes all available space */
}
#profile-modal.active .modal-card,
#task-selection-modal.active .modal-card {
  transform: translateY(0);
}

/* SOS STRESS PANIC BUTTON & BREATHING OVERLAY */
.sos-panic-btn {
  position: absolute;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  left: 16px;
  z-index: 90;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  animation: sosPulse 2s infinite;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

@keyframes sosPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 22px rgba(239, 68, 68, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  }
}

.sos-panic-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #f87171, #dc2626);
}

/* breathing screen */
.sos-breathing-overlay-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  transition: opacity 0.3s ease-out;
  opacity: 1;
  pointer-events: auto;
  box-sizing: border-box;
}

.sos-breathing-overlay-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

/* header row */
.sos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.sos-info-trigger-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--accent-gold);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.sos-info-trigger-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--accent-gold);
  transform: scale(1.05);
}

.sos-exit-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition-smooth);
}

.sos-exit-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* body contents */
.sos-body-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 20px 0;
}

.sos-title-section {
  text-align: center;
}

.sos-title-section h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.sos-title-section p {
  font-size: 11px;
  color: var(--text-muted);
}

/* circle wrapper and animation */
.sos-circle-wrapper {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-circle-element {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 70%);
  border: 2px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
  transition:
    transform 4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 1s,
    background 1s,
    box-shadow 1s;
  transform: scale(1);
}

/* phase styles dynamically driven by JS class */
.breathing-circle-element.inhale {
  border-color: var(--accent-emerald);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.1) 70%);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.45);
}

.breathing-circle-element.hold {
  border-color: var(--accent-gold);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0.08) 70%);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.4);
}

.breathing-circle-element.exhale {
  border-color: #3b82f6;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.08) 70%);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.4);
}

.breathing-circle-element.hold-empty {
  border-color: rgba(255, 255, 255, 0.2);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 70%);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.breathing-phase-sec {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* instruction text */
.sos-instruction-section {
  text-align: center;
  height: 60px;
}

.sos-instruction-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  transition: color 0.5s;
}

.sos-instruction-section p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* timer bar */
.sos-timer-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sos-timer-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.sos-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.sos-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), #3b82f6);
  border-radius: 3px;
  transition: width 1s linear;
}

/* THE SHIELDED DESSERT CARD */
.shielded-dessert-card {
  border: 1px dashed rgba(245, 158, 11, 0.25);
  transition: var(--transition-smooth);
}

.shielded-dessert-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.dessert-info-btn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--accent-gold);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: var(--transition-smooth);
}

.dessert-info-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
}

.dessert-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dessert-calculator-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 12px;
  text-align: right;
  direction: rtl;
}

.dessert-cal-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dessert-values-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
}

.dessert-val-calories {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-gold);
}

.dessert-val-separator {
  color: var(--text-muted);
  font-weight: 300;
}

.dessert-val-grams {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans Hebrew', sans-serif;
}

.dessert-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  direction: rtl;
}

.dessert-status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.status-pending {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.status-shielded {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.status-exposed {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.dessert-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dessert-action-btn {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  transition: var(--transition-smooth);
}

.dessert-action-btn small {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
}

.dessert-action-btn.shielded {
  background: rgba(16, 185, 129, 0.04);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.15);
}

.dessert-action-btn.shielded:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
}

.dessert-action-btn.exposed {
  background: rgba(239, 68, 68, 0.04);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.15);
}

.dessert-action-btn.exposed:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  transform: translateY(-1px);
}

.dessert-action-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
  transform: none !important;
}

/* Joker Card (קלף הג'וקר) Styling */
.joker-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Glowing purple/gold border for active/unlocked state */
.joker-card.unlocked-glow {
  border: 1px solid transparent;
  background-image:
    linear-gradient(var(--card-bg), var(--card-bg)),
    linear-gradient(135deg, #a855f7 0%, #f59e0b 100%);
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
  animation: jokerGlow 3s ease-in-out infinite alternate;
}

@keyframes jokerGlow {
  0% {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
  }
  100% {
    box-shadow:
      0 0 25px rgba(168, 85, 247, 0.35),
      0 0 10px rgba(245, 158, 11, 0.15);
  }
}

.joker-info-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.joker-info-btn:hover {
  color: #a855f7;
  transform: scale(1.1);
}

.joker-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.joker-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.joker-locked-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.joker-progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.joker-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.joker-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a855f7, #6366f1);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.joker-streak-status {
  font-size: 11px;
  color: var(--text-secondary);
}

.joker-unlocked-box,
.joker-used-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.joker-status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.status-unlocked {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}

.status-used {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.joker-action-btn {
  width: 100%;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.04);
  color: #c084fc;
  border-radius: 12px;
  padding: 12px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13.5px;
  transition: all 0.2s ease;
  gap: 2px;
}

.joker-action-btn:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: #a855f7;
  transform: translateY(-1px);
}

.joker-action-btn small {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text-secondary);
}

.joker-used-msg {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin: 0;
}

/* Bottom Sheet Overlay */
.bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(0px);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(5px);
}

/* Bottom Sheet Container */
.bottom-sheet {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  border-radius: 24px 24px 0 0;
  padding: 16px 20px 30px 20px;
  z-index: 1001;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.bottom-sheet.active {
  bottom: 0;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin: 0 auto 16px auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  direction: rtl;
}

.sheet-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-header h3 i {
  color: #a855f7;
}

.sheet-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.sheet-close-btn:hover {
  color: var(--text-primary);
}

.sheet-body {
  direction: rtl;
  text-align: right;
}

.sheet-prompt {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Food Selection Grid */
.rebalance-food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.food-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.food-btn:hover {
  background: rgba(168, 85, 247, 0.05);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

.food-icon {
  font-size: 24px;
}

.food-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.food-cals {
  font-size: 11px;
  color: #f87171;
}

/* Fact Box inside sheet */
.rebalance-fact-box {
  background: rgba(239, 68, 68, 0.06);
  border-right: 3px solid #ef4444;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.rebalance-fact-box i {
  color: #ef4444;
  margin-top: 2px;
}

/* Offset Actions List */
.offset-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offset-action-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  width: 100%;
}

.offset-action-btn:hover {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.offset-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.offset-benefit {
  font-size: 11px;
  color: var(--accent-emerald);
}

/* Trigger Button styling */
.rebalance-trigger-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.rebalance-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

/* Offset task badge / styling in checklist */
.offset-badge {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.checklist-card-item.offset-task-card {
  border: 1px dashed rgba(168, 85, 247, 0.3) !important;
  background: rgba(168, 85, 247, 0.02) !important;
}

/* ==========================================================================
   Tab Info Banners (Contextual Onboarding)
   ========================================================================== */
.tab-info-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-info-banner.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.info-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-content i {
  color: #a855f7;
  font-size: 1.4rem;
  margin-top: 2px;
}

.info-content p {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.dismiss-info-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.dismiss-info-btn:hover {
  color: var(--text-primary);
}

/* TTS Play Button */
.tts-play-btn {
  background: var(--bg-hover);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tts-play-btn:hover {
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-1px);
}

.tts-play-btn i {
  font-size: 0.9rem;
}

.tts-play-btn.playing {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
  animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

/* =========================================
   ONBOARDING WELCOME SCREEN
   ========================================= */
.welcome-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-obsidian);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
}

.onboarding-slider {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.onboarding-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  opacity: 0;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  transform: translateX(20px);
  pointer-events: none;
}

.onboarding-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slide-icon-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.slide-icon {
  font-size: 3rem;
}

.slide-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.slide-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 400px;
}

.slide-highlight-box {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: right;
  max-width: 400px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slide-highlight-box i {
  font-size: 1.5rem;
  color: var(--accent-emerald);
  margin-top: 2px;
}

.slide-highlight-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.onboarding-controls {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(to top, var(--bg-obsidian) 50%, transparent);
}

.slide-indicators {
  display: flex;
  gap: 8px;
}

.slide-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.slide-indicators .dot.active {
  width: 24px;
  background: var(--accent-emerald);
}

.onboarding-next-btn,
.onboarding-start-btn {
  width: 100%;
  max-width: 300px;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-next-btn {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.onboarding-next-btn:hover {
  background: var(--border-color);
}

.onboarding-start-btn {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.onboarding-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* ═══════════ "Choose your path" picker + honest projection (v11) ═══════════ */

/* Baseline weight-trend selector */
.path-trend-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.path-trend-q {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-align: center;
}
.path-trend-opts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.trend-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}
.trend-opt:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.trend-opt.active {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  color: #fff;
  box-shadow: 0 0 0 1px var(--accent-emerald) inset;
}
.trend-opt-label {
  font-size: 12px;
  font-weight: 800;
}
.trend-opt-sub {
  font-size: 9px;
  opacity: 0.8;
}

/* Live net-projection card (sticky at top of the list) */
.live-projection-box {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 14px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 16px;
  position: sticky;
  top: -12px;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.live-proj-label {
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.live-proj-val {
  font-size: 2em;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
  line-height: 1.1;
}
.live-proj-val small {
  font-size: 0.42em;
  font-weight: 700;
  opacity: 0.85;
}
.live-proj-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
  min-height: 15px;
}

/* Section headers inside the picker */
.picker-section-header {
  font-weight: 800;
  color: var(--accent-gold);
  margin: 18px 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 5px;
  font-size: 13px;
}
.picker-section-header.qw-header {
  color: #fbbf24;
  border-bottom-color: rgba(251, 191, 36, 0.25);
}

/* Picker item enhancements */
.task-toggle-item.is-active {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}
.task-toggle-item.is-already {
  opacity: 0.55;
}
.task-toggle-titlerow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.qw-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  white-space: nowrap;
}
.overlap-badge {
  display: none;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.14);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
  white-space: nowrap;
}
.task-toggle-item.has-overlap .overlap-badge {
  display: inline-flex;
}
.impact-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}
.ease-dots {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--accent-emerald);
  opacity: 0.85;
}
.already-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
}
.already-chip:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}
.already-chip.on {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

/* Empty-state hero (no habits chosen yet) */
.empty-path-hero {
  text-align: center;
  padding: 34px 22px;
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.06), rgba(255, 255, 255, 0.01));
  margin: 10px 0;
}
.eph-emoji {
  font-size: 42px;
  margin-bottom: 8px;
}
.eph-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}
.eph-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto 18px;
}
.eph-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.eph-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(16, 185, 129, 0.55);
}

.mini-empty-cta {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
  color: var(--accent-emerald);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mini-empty-cta:hover {
  background: rgba(16, 185, 129, 0.12);
}

/* Baseline note on the dashboard projection card */
.proj-baseline-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 7px 10px;
}
.proj-baseline-note b {
  color: var(--accent-emerald);
}

/* "Read the research" link inside the Joker card */
.joker-research-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 12px;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.28);
  transition: all 0.15s ease;
}
.joker-research-link:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.5);
}

/* ═══════════════ RETENTION ENGINE — matches app design system ═══════════════ */

/* Streak shield badge next to the fire counter */
.shield-indicator {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
}

/* Weekly history: perfect (gold) + active (emerald) tiers for Minimum-Viable-Day */
.history-circle.perfect {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1206;
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}
.history-circle.active {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.45);
}
.legend-dot.perfect {
  background: #fbbf24;
}
.legend-dot.active {
  background: var(--accent-emerald);
}

/* Retention modals reuse .modal-overlay/.modal-card; this centers content */
.ret-modal .ret-card {
  text-align: center;
  max-width: 380px;
  padding: 26px 22px 22px;
}
.ret-hero-icon {
  font-size: 46px;
  line-height: 1;
  margin-bottom: 8px;
  animation: retPop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
@keyframes retPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.ret-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin: 4px 0 8px;
}
.ret-sub {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}
.ret-sub b {
  color: var(--text-primary);
}

.ret-btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.ret-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(16, 185, 129, 0.55);
}
.ret-btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.ret-btn-ghost {
  display: block;
  width: 100%;
  padding: 11px;
  margin-top: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}
.ret-btn-ghost:hover {
  color: var(--text-primary);
}

/* First-tick spotlight card */
.ret-spotlight-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

/* Fortune wheel */
.ret-wheel-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 6px auto 18px;
}
.ret-wheel {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.1);
  transform: rotate(0deg);
}
.ret-wheel-lbl {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -12px;
  width: 24px;
  height: 24px;
  font-size: 18px;
  text-align: center;
  transform-origin: center;
  pointer-events: none;
}
.ret-wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid #fbbf24;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.ret-spin-result {
  min-height: 6px;
}
.ret-spin-result.show {
  min-height: auto;
  margin-bottom: 12px;
}
.ret-prize {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  padding: 12px;
  animation: retPop 0.4s both;
}
.ret-prize b {
  color: #fff;
}

/* Retention toast (bottom) */
.ret-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 20px);
  z-index: 9999;
  max-width: 88%;
  text-align: center;
  background: var(--bg-card, rgba(18, 24, 40, 0.95));
  color: var(--text-primary, #fff);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}
.ret-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ret-toast b {
  color: var(--accent-emerald);
}

/* ═══════════════ "תכל'ס" explain button on checklist items ═══════════════ */
.tachles-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 800;
  font-family: inherit;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  transition: all 0.15s ease;
}
.tachles-btn:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
}
.tachles-btn i {
  font-size: 11px;
}
/* Drill-down explanation must sit ABOVE the path-picker modal (same base z-index) */
#drill-down-modal {
  z-index: 200;
}

/* ═══════════════ Deviation Report — floating FAB ═══════════════ */
.deviation-fab {
  position: absolute;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  color: #ffb000;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid #ffb000;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(255, 176, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.deviation-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 7px 22px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 176, 0, 0.3);
}
.deviation-fab i {
  font-size: 13px;
}

/* ═══════════════ Deviation bottom sheet ═══════════════ */
.dev-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.dev-sheet-overlay.open {
  opacity: 1;
}
.dev-sheet {
  width: 100%;
  max-width: 460px;
  background: #020617; /* slate-950 */
  border-top: 1px solid rgba(255, 176, 0, 0.25);
  border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  direction: rtl;
  text-align: right;
}
.dev-sheet-overlay.open .dev-sheet {
  transform: translateY(0);
}
.dev-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 16px;
}
.dev-sheet-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.dev-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dev-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: right;
  padding: 14px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 176, 0, 0.22);
  transition: all 0.15s ease;
}
.dev-chip:hover {
  background: rgba(255, 176, 0, 0.1);
  border-color: #ffb000;
  transform: translateY(-2px);
}
.dev-chip-emoji {
  font-size: 20px;
}

/* Neon-green deviation toast */
.dev-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 18px);
  z-index: 4000;
  max-width: 90%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 6, 23, 0.96);
  color: #00ff5f;
  border: 1px solid rgba(0, 255, 95, 0.4);
  border-radius: 14px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(0, 255, 95, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}
.dev-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ═══════════════ Course Correction modal (morning after) ═══════════════ */
.dev-cc-card {
  background: #000; /* OLED black */
  border: 1px solid rgba(255, 176, 0, 0.28);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  max-width: 400px;
  text-align: center;
  padding: 28px 22px;
}
.dev-cc-icon {
  font-size: 30px;
  color: #ffb000;
  margin-bottom: 10px;
  width: 62px;
  height: 62px;
  line-height: 62px;
  margin-inline: auto;
  border-radius: 50%;
  background: rgba(255, 176, 0, 0.1);
  border: 1px solid rgba(255, 176, 0, 0.3);
}
.dev-cc-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin: 6px 0 6px;
}
.dev-cc-sub {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 20px;
}
.dev-cc-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dev-cc-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 176, 0, 0.22);
  transition: all 0.16s ease;
}
.dev-cc-option:hover {
  background: rgba(255, 176, 0, 0.09);
  border-color: #ffb000;
  transform: translateY(-2px);
}
.dev-cc-opt-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.dev-cc-opt-desc {
  font-size: 0.85rem;
  color: #94a3b8;
}
.dev-cc-check {
  font-size: 46px;
  font-weight: 900;
  color: #00ff5f;
  line-height: 1;
  width: 84px;
  height: 84px;
  margin: 6px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 95, 0.1);
  border: 2px solid #00ff5f;
  box-shadow: 0 0 24px rgba(0, 255, 95, 0.3);
  animation: retPop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.dev-cc-done {
  color: #00ff5f;
}

/* ═══════════════ Rivalry — head-to-head weight-loss race ═══════════════ */
.rivalry-weightloss-race {
  margin-top: 14px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.wl-race-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 12px;
}
.wl-race-title i {
  margin-left: 5px;
}
.wl-race-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wl-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.wl-side .wl-kg {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}
.wl-side .wl-unit {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  margin-top: 1px;
}
.wl-side .wl-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 600;
}
.wl-you .wl-kg,
.wl-you .wl-unit {
  color: var(--accent-emerald);
}
.wl-rival .wl-kg,
.wl-rival .wl-unit {
  color: #00d2ff;
}
.wl-side.leading {
  background: rgba(255, 176, 0, 0.08);
  border-color: rgba(255, 176, 0, 0.45);
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.15);
}
.wl-vs {
  font-size: 22px;
  flex: 0 0 auto;
}
.wl-race-status {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 12px;
  line-height: 1.4;
}

/* ═══════════════ Streak-at-risk (loss aversion) ═══════════════ */
.streak-badge.at-risk {
  border-color: #ffb000 !important;
  box-shadow:
    0 0 0 1px rgba(255, 176, 0, 0.5),
    0 0 14px rgba(255, 176, 0, 0.35);
  animation: streakRiskPulse 1.8s ease-in-out infinite;
}
.streak-badge.at-risk .fire-icon {
  color: #ffb000 !important;
}
@keyframes streakRiskPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 176, 0, 0.4),
      0 0 10px rgba(255, 176, 0, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 176, 0, 0.7),
      0 0 18px rgba(255, 176, 0, 0.5);
  }
}
.streak-risk-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 176, 0, 0.09);
  border: 1px solid rgba(255, 176, 0, 0.35);
  color: #ffb000;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.streak-risk-banner i {
  font-size: 15px;
  flex-shrink: 0;
}

/* ═══════════════ Investment Graph (sunk cost) ═══════════════ */
.invest-total {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.investment-graph-wrap {
  position: relative;
  width: 100%;
  margin-top: 6px;
}
.investment-svg {
  width: 100%;
  height: 130px;
  display: block;
  overflow: visible;
}
.ig-line {
  stroke: #10b981;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgba(16, 185, 129, 0.4));
}
.ig-grid {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}
.ig-dot {
  fill: #10b981;
  stroke: var(--bg-obsidian, #0b0f1a);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.6));
}
.ig-tooltip {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  background: rgba(2, 6, 23, 0.96);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  z-index: 5;
}
.ig-tooltip b {
  color: var(--accent-emerald);
  font-size: 13px;
}
.invest-caption {
  font-size: 11.5px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
}
.invest-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 26px 12px;
}

/* ═══════════════════════════════════════════════════════════════
   CHOICE GROUP CARD — accordion style
   Title bar you tap → options slide open/closed
   ═══════════════════════════════════════════════════════════════ */

/* Outer wrapper */
.choice-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Subtle right accent line */
.choice-group-card::before {
  content: '';
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
}

/* Title row — clickable accordion header */
.choice-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}
.choice-group-title:active {
  background: rgba(255, 255, 255, 0.04);
}

/* Chevron arrow that rotates on open */
.choice-group-chevron {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* child-combinator so an OPEN domain tab doesn't rotate the chevrons of nested groups */
.choice-group-card.open > .choice-group-title > .choice-group-chevron {
  transform: rotate(180deg);
}

/* Badge showing current selection */
.choice-group-badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.choice-group-card.has-selection .choice-group-badge {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Options container — accordion body */
.choice-options-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 14px 0 14px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
/* child-combinator: an OPEN card expands ONLY its own body, never a nested group's body */
.choice-group-card.open > .choice-options-row {
  max-height: 400px; /* enough for 4 options */
  padding: 0 14px 14px 14px;
}

/* Solo habit rendered as a compact row (toggle instead of chevron) — matches accordion header */
.solo-choice-title {
  cursor: default;
}
.solo-choice-title .push-left {
  margin-right: auto;
}
.solo-choice-title .qw-badge,
.solo-choice-title .tachles-btn,
.solo-choice-title .switch-wrapper {
  flex-shrink: 0;
}
.solo-choice-title > span:first-of-type {
  min-width: 0;
}

/* ── Domain tab (תזונה / כושר): opens to reveal sub-sections; taller body for nested content ── */
.choice-group-card.domain-accordion.open > .domain-body {
  max-height: 3000px; /* room for sub-headings + nested groups (even when expanded) */
  padding: 4px 12px 14px 12px;
}
.domain-title {
  font-size: 13px;
}
/* sub-heading inside a domain tab (תוספות / הפחתות / מאומץ / שוטף) */
.picker-subhead {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
  padding: 8px 4px 2px 4px;
}
/* divider before the single-toggle habits at the end of a domain tab */
.picker-subhead-extra {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}
/* nested cards inside a domain: quiet the accent line so the tab's own accent leads */
.domain-body .choice-group-card::before,
.domain-body .solo-choice-card::before {
  opacity: 0.2;
}

/* Individual option button */
.choice-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: right;
  font-family: inherit;
}
.choice-opt-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* Radio indicator circle */
.choice-opt-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.choice-opt-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: var(--transition-smooth);
}

/* Selected state */
.choice-opt-btn.selected {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
}
.choice-opt-btn.selected .choice-opt-radio {
  border-color: var(--accent-emerald);
}
.choice-opt-btn.selected .choice-opt-radio::after {
  background: var(--accent-emerald);
}

/* Text column inside each option */
.choice-opt-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1px;
}
.choice-opt-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.choice-opt-desc {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Checked state for the whole card */
.choice-group-card.has-selection {
  border-color: rgba(16, 185, 129, 0.25);
}

/* tachles btn inside option — same as global but smaller */
.choice-opt-btn .tachles-btn {
  flex-shrink: 0;
  padding: 4px 9px;
  font-size: 10.5px;
}

/* ===== STICKER BANNER ===== */
/* ===== רצועת מדבקות נעה (ירקות/פירות גולשים על המסך) ===== */
.veg-marquee {
  overflow: hidden;
  width: 100%;
  direction: ltr; /* גלישה עקבית גם באפליקציה RTL */
  padding: 10px 0 4px;
}
.veg-track {
  display: flex;
  width: max-content;
  direction: ltr;
  animation: vegScroll 16s linear infinite;
}
.veg-track:hover {
  animation-play-state: paused;
}
.veg-item {
  flex: none;
  padding: 0 14px;
  cursor: pointer;
}
.veg-item svg {
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
  animation: vegBob 2.6s ease-in-out infinite;
}
.veg-item:nth-child(2n) svg {
  animation-delay: -1.3s;
}
.veg-item:nth-child(3n) svg {
  animation-delay: -0.7s;
}
@keyframes vegScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes vegBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .veg-track {
    animation: none;
  }
  .veg-item svg {
    animation: none;
  }
}

@keyframes sticker-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* inline stickers in headings */
.sticker-inline {
  display: inline-block;
  font-size: 1em;
  vertical-align: middle;
  animation: sticker-bounce 2.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}
