/* ===================================================
   عضّولي (Adhdhouli) — Design System v3
   Palette and shapes sampled from the official mascot sheet:
   near-black surfaces, lime glow, cream speech bubbles.
   =================================================== */

:root {
  /* Surfaces */
  --bg: #080f0f;
  --surface-1: #0e1514;
  --surface-2: #131a19;
  --surface-3: #1a2221;
  --surface-4: #232c2b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* Brand lime (from the mascot's leaf & chest) */
  --lime: #b4ec50;
  --lime-bright: #c9fb6e;
  --lime-deep: #8fc931;
  --lime-soft: rgba(180, 236, 80, 0.12);
  --lime-glow: rgba(180, 236, 80, 0.35);
  --on-lime: #0b1406;

  /* Bubbles */
  --cream: #faf7ed;
  --on-cream: #111712;

  /* Text */
  --text: #f2f6f1;
  --muted: #9aa6a0;
  --dim: #66726c;

  /* Data colors */
  --c-cal: var(--lime);
  --c-protein: #ff9b5c;
  --c-carbs: #ffd25c;
  --c-fat: #b99bff;
  --c-water: #5cc8ff;
  --gold: #f5b83d;
  --danger: #ff6b5e;

  /* Type */
  --font-ar: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'Outfit', 'Cairo', sans-serif;

  /* Shape & motion */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-full: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 320ms;

  --nav-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font-ar);
  background: radial-gradient(1200px 700px at 50% -10%, #12201a 0%, #050909 60%) fixed, #050909;
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
/* "consumed / target" pairs must read left-to-right ("0 / 135g", not "135g / 0") */
.ltr-pair { direction: ltr; unicode-bidi: isolate; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.lime-text { color: var(--lime); }
.gold-text { color: var(--gold); }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }

/* Press feedback — every tappable surface */
.pressable { transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast); }
.pressable:active { transform: scale(0.965); filter: brightness(0.95); }

/* ===================================================
   DEVICE FRAME (desktop preview only)
   =================================================== */
.desktop-preview-bar {
  position: fixed; inset: 16px 24px auto; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-radius: var(--r-full);
  background: rgba(14, 21, 20, 0.7); border: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.brand-preview { display: flex; align-items: center; gap: 10px; }
.brand-preview-logo { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; }
.preview-title { font-size: 0.95rem; color: var(--muted); }
.preview-title strong { color: var(--lime); font-weight: 900; }
.frame-controls { display: flex; gap: 8px; }
.frame-toggle {
  padding: 7px 14px; border-radius: var(--r-full); font-size: 0.78rem; font-weight: 700;
  color: var(--muted); border: 1px solid var(--border); transition: all var(--t-fast);
}
.frame-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.frame-toggle.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }

.device-wrapper { height: 100%; display: grid; place-items: center; padding: 76px 16px 16px; }
.device-phone {
  position: relative; width: 393px; height: min(852px, calc(100vh - 100px));
  padding: 11px; border-radius: 58px;
  background: linear-gradient(145deg, #2a3130, #0c1110 40%, #1d2322);
  box-shadow: 0 0 0 1.5px #3a4241, 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 80px rgba(180, 236, 80, 0.06);
}
.dynamic-island {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 60;
  width: 112px; height: 32px; border-radius: var(--r-full); background: #000;
}
.view-full { padding: 0; }
.view-full .device-phone { width: 100%; height: 100%; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.view-full .dynamic-island { display: none; }
.view-full .app-screen { border-radius: 0; max-width: 520px; margin: 0 auto; }
.view-full ~ .desktop-preview-bar, .view-full .desktop-preview-bar { display: none; }

/* Real phones: no frame, the app is the screen */
@media (max-width: 520px) {
  .desktop-preview-bar, .dynamic-island { display: none; }
  .device-wrapper { padding: 0; display: block; }
  .device-phone { width: 100%; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .app-screen { border-radius: 0 !important; }
  .app-status-bar { display: none !important; }
  .app-top-bar { padding-top: max(12px, env(safe-area-inset-top)) !important; }
}

/* ===================================================
   APP SHELL
   =================================================== */
.app-screen {
  /* clip (not just hidden) so focusing a field can't scroll the whole screen */
  position: relative; height: 100%; overflow: hidden; overflow: clip;
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 47px;
}
.app-status-bar {
  flex-shrink: 0; height: 50px; padding: 16px 30px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; font-weight: 700;
}
.status-icons { display: flex; gap: 6px; align-items: center; }
.status-icons svg { height: 12px; width: auto; fill: currentColor; }

.app-top-bar {
  flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 18px 10px;
}
.user-chip { display: flex; align-items: center; gap: 10px; text-align: start; }
.user-avatar {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--lime-glow); color: var(--lime); font-weight: 900; font-size: 1.1rem;
}
.user-texts { display: flex; flex-direction: column; line-height: 1.25; }
.greeting-sub { font-size: 0.72rem; color: var(--muted); }
.greeting-name { font-size: 1.05rem; font-weight: 800; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.streak-chip {
  display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px;
  border-radius: var(--r-full); background: rgba(255, 155, 92, 0.12); color: var(--c-protein);
  font-weight: 800; font-size: 0.9rem;
}
.streak-chip .icon { width: 17px; height: 17px; }
.crown-btn {
  width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, #f8cd5f, #e09b1f); color: #2a1a00;
  box-shadow: 0 6px 18px rgba(245, 184, 61, 0.3);
}
.crown-btn .icon { width: 19px; height: 19px; }

.app-body {
  flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: 4px 16px calc(var(--nav-h) + 24px);
  scrollbar-width: none;
}
.app-body::-webkit-scrollbar { display: none; }

/* Tab transitions: fade + rise, children stagger in */
.tab-view { display: none; }
.tab-view.active { display: block; animation: tabIn var(--t-med) var(--ease-out); }
.tab-view.active .stagger { animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ===================================================
   SHARED COMPONENTS
   =================================================== */
.card {
  display: block; width: 100%; text-align: start;
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px; margin-bottom: 14px;
}
.card-head, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-head { margin-top: 6px; }
.card-title { font-size: 1.02rem; font-weight: 800; }
.card-sub { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.eyebrow { font-size: 0.7rem; font-weight: 800; color: var(--lime); letter-spacing: 0.02em; }
.link-btn { font-size: 0.78rem; font-weight: 700; color: var(--lime); }
.chevron { color: var(--dim); width: 18px; height: 18px; }

/* Speech bubbles — cream (welcome/nutrition) and dark glass (everything else) */
.speech-bubble {
  position: relative; padding: 12px 14px; border-radius: 18px; max-width: 220px;
  animation: bubblePop 520ms var(--ease-spring) both; animation-delay: 140ms;
  transform-origin: bottom left;
}
.speech-bubble p { font-size: 0.78rem; line-height: 1.55; margin-top: 2px; }
.bubble-title { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 0.98rem; }
.bubble-title .icon { width: 18px; height: 18px; }
.speech-bubble.cream { background: var(--cream); color: var(--on-cream); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.speech-bubble.cream p { color: #4a524c; }
.speech-bubble.dark { background: rgba(35, 44, 43, 0.85); border: 1px solid var(--border-strong); backdrop-filter: blur(8px); }
.speech-bubble.dark p { color: var(--muted); }
.speech-bubble::after {
  content: ''; position: absolute; bottom: -7px; left: 26px; width: 14px; height: 14px;
  background: inherit; border: inherit; border-top: 0; border-right: 0; transform: rotate(-45deg);
  border-bottom-left-radius: 3px;
}
@keyframes bubblePop { from { opacity: 0; transform: scale(0.85) translateY(6px); } to { opacity: 1; transform: none; } }

.float { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Primary lime pill with dark orb — the sheet's "ابدأ رحلتك" button */
.btn-primary {
  width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px 0 7px; border-radius: var(--r-full);
  background: linear-gradient(180deg, var(--lime-bright), var(--lime));
  color: var(--on-lime); font-weight: 900; font-size: 1.02rem;
  box-shadow: 0 10px 28px var(--lime-glow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary:disabled { opacity: 0.6; }
.btn-orb {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--on-lime); color: var(--lime);
}
.btn-orb .icon { width: 19px; height: 19px; }
.btn-primary:hover .btn-orb .icon { animation: nudge 700ms var(--ease-out); }
@keyframes nudge { 50% { transform: translateX(-4px); } }

.btn-small {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px;
  border-radius: var(--r-full); font-size: 0.78rem; font-weight: 800;
  background: var(--surface-3); border: 1px solid var(--border);
}
.btn-small.lime { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.btn-small .icon { width: 16px; height: 16px; }

.icon-btn {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
}
.icon-btn.lime { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.icon-btn .icon { width: 18px; height: 18px; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: var(--r-full); background: var(--lime-soft); color: var(--lime);
  font-size: 0.76rem; font-weight: 800; border: 1px solid rgba(180, 236, 80, 0.25);
}
.chip-btn .icon { width: 16px; height: 16px; }

.bar { height: 7px; border-radius: var(--r-full); background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar-fill {
  display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime);
  transition: width 900ms var(--ease-out);
}
.bar-fill.protein { background: var(--c-protein); }
.bar-fill.carbs { background: var(--c-carbs); }
.bar-fill.fat { background: var(--c-fat); }
.bar-fill.water { background: var(--c-water); }

/* Calorie ring */
.ring-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring-wrap svg, .call-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 11; }
.ring-fill {
  fill: none; stroke: var(--lime); stroke-width: 11; stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--lime-glow));
  transition: stroke-dashoffset 1100ms var(--ease-out);
}
.ring-fill.over { stroke: var(--c-protein); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .big { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.ring-center small { font-size: 0.68rem; color: var(--muted); margin-top: 4px; }

.today-grid { display: flex; align-items: center; gap: 16px; }
.macro-bars { flex: 1; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.macro-row-labels { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 5px; }
.macro-row-labels span { color: var(--muted); font-weight: 700; }
.macro-row-labels b { font-weight: 700; font-size: 0.78rem; }
.macro-row-labels b small { color: var(--dim); font-weight: 600; }

.water-row {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.water-icon { color: var(--c-water); width: 24px; height: 24px; }
.water-info { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; }
.water-label { font-size: 0.8rem; font-weight: 800; }
.water-val { font-size: 0.8rem; color: var(--muted); justify-self: end; }
.water-info .bar { grid-column: 1 / -1; }

/* Daily tip */
.tip-card {
  display: flex; align-items: flex-end; gap: 4px; margin-bottom: 14px; padding: 8px 4px 0;
}
.tip-mascot { width: 92px; height: auto; flex-shrink: 0; }
.tip-bubble {
  flex: 1; position: relative; margin-bottom: 16px; padding: 12px 14px; border-radius: 18px;
  background: rgba(35, 44, 43, 0.85); border: 1px solid var(--border-strong);
  animation: bubblePop 520ms var(--ease-spring) both 200ms; transform-origin: bottom right;
}
.tip-bubble::after {
  content: ''; position: absolute; right: -6px; bottom: 16px; width: 12px; height: 12px;
  background: inherit; border: inherit; border-left: 0; border-bottom: 0; transform: rotate(45deg);
}
.tip-bubble p { font-size: 0.82rem; line-height: 1.6; margin-top: 3px; }

/* Workout card (sheet: قسم التمارين) */
.workout-card { position: relative; overflow: hidden; padding: 0; }
.workout-card::before {
  content: ''; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(180, 236, 80, 0.22), transparent 65%);
}
.workout-inner { position: relative; display: flex; align-items: stretch; }
.workout-texts { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.workout-mascot { width: 128px; object-fit: contain; align-self: flex-end; margin-inline-start: -8px; }
.workout-chip {
  align-self: flex-start; font-size: 0.7rem; font-weight: 800; color: var(--lime);
  background: var(--lime-soft); padding: 4px 10px; border-radius: var(--r-full);
}
.workout-title { font-size: 1.12rem; font-weight: 900; line-height: 1.35; }
.workout-meta { display: flex; gap: 12px; font-size: 0.74rem; color: var(--muted); }
.workout-meta span { display: flex; align-items: center; gap: 4px; }
.workout-meta .icon { width: 14px; height: 14px; }
.workout-card .btn-primary { height: 50px; font-size: 0.95rem; margin-top: 4px; }
.workout-card .btn-orb { width: 38px; height: 38px; }
.workout-done { display: flex; align-items: center; gap: 8px; color: var(--lime); font-weight: 800; font-size: 0.9rem; margin-top: 4px; }

/* Progress (sheet: قسم متابعة التقدم) */
.progress-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.progress-top .speech-bubble { flex: 1; max-width: none; margin-bottom: 26px; }
.progress-mascot { width: 104px; margin: -10px -6px -8px 0; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 92px; margin: 12px 0 8px; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bar {
  width: 100%; max-width: 26px; border-radius: 8px; background: rgba(255, 255, 255, 0.06);
  height: 10%; transition: height 900ms var(--ease-out);
}
.week-bar.done { background: linear-gradient(180deg, var(--lime-bright), var(--lime-deep)); box-shadow: 0 0 12px var(--lime-glow); }
.week-col.today .week-day { color: var(--lime); }
.week-day { font-size: 0.66rem; color: var(--dim); font-weight: 700; }
.progress-stats { display: flex; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.mini-stat { display: flex; flex-direction: column; align-items: flex-start; }
.mini-stat .num { font-size: 1.15rem; font-weight: 800; }
.mini-stat span:last-child { font-size: 0.68rem; color: var(--muted); }
.progress-stats .chip-btn { margin-inline-start: auto; }

/* Coach call card */
.call-card { display: flex; align-items: center; gap: 12px; }
.call-icon {
  position: relative; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  background: var(--lime); color: var(--on-lime);
}
.call-icon .icon { width: 22px; height: 22px; }
.pulse-ring { position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--lime); animation: ripple 2s var(--ease-out) infinite; }
@keyframes ripple { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.5); opacity: 0; } }
.call-texts { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.call-texts strong { font-size: 0.92rem; }
.call-texts small { font-size: 0.74rem; color: var(--muted); }
.live-tag { font-size: 0.66rem; color: var(--lime); font-weight: 800; }

/* Horizontal mini course cards */
.h-scroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.mini-course {
  flex: 0 0 150px; scroll-snap-align: start; text-align: start;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.mini-course img { width: 64px; height: 64px; object-fit: contain; }
.mini-course strong { font-size: 0.82rem; line-height: 1.4; }
.mini-course small { font-size: 0.68rem; color: var(--muted); }

.badge { align-self: flex-start; font-size: 0.64rem; font-weight: 800; padding: 3px 8px; border-radius: var(--r-full); }
.badge.pro { background: rgba(245, 184, 61, 0.14); color: var(--gold); }
.badge.free { background: var(--lime-soft); color: var(--lime); }

.coaches-teaser { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; }
.coaches-teaser img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  background: radial-gradient(circle, rgba(226, 253, 92, 0.15) 0%, rgba(18, 22, 28, 0.8) 100%);
  border: 1px solid rgba(226, 253, 92, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(226, 253, 92, 0.12);
  flex-shrink: 0;
}
.coaches-teaser span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.coaches-teaser strong { font-size: 0.9rem; }
.coaches-teaser small { font-size: 0.74rem; color: var(--muted); }

/* Section hero (mascot + bubble) */
.section-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  min-height: 150px; margin-bottom: 10px; padding: 0 4px;
}
.section-hero .speech-bubble { margin-bottom: 40px; }
.hero-mascot {
  width: 135px; height: auto; object-fit: contain; margin-bottom: -6px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 18px rgba(226, 253, 92, 0.16));
}

.filter-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 36px; padding: 0 16px; border-radius: var(--r-full); font-size: 0.8rem; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); transition: all var(--t-fast);
}
.chip.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }

.course-list { display: flex; flex-direction: column; gap: 12px; }
.course-card { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 0; animation: rise 480ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
.course-thumb {
  position: relative; width: 84px; height: 96px; flex-shrink: 0; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 50% 70%, rgba(180, 236, 80, 0.25), var(--surface-3) 70%);
  display: grid; place-items: end center;
}
.course-thumb img { width: 84px; }
.course-thumb .lock {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: var(--gold);
}
.course-thumb .lock .icon { width: 14px; height: 14px; }
.course-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.course-info strong { font-size: 0.92rem; line-height: 1.4; }
.course-info p { font-size: 0.74rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; gap: 10px; font-size: 0.68rem; color: var(--dim); }

/* ===================================================
   AI COACH
   =================================================== */
.tab-chat.active { display: flex; flex-direction: column; min-height: 100%; }
.ai-header { transition: all var(--t-med) var(--ease-out); }
.ai-hero { position: relative; display: flex; align-items: flex-end; gap: 4px; margin-bottom: 12px; }
.ai-mascot { width: 170px; margin-inline-start: -10px; transition: width var(--t-med) var(--ease-out); }
.ai-bubble { margin-bottom: 64px; }
.ai-bubble .typing-dots { margin-top: 6px; }
.ai-new { display: none !important; }
.ai-header.compact .ai-new { display: flex !important; }
.ai-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-action {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.82rem; font-weight: 800;
}
.ai-action .icon { color: var(--lime); }
.disclaimer { font-size: 0.66rem; color: var(--dim); text-align: center; margin: 10px 0 6px; }

/* After the first message the header compacts into a single scrolling row */
.ai-header.compact .ai-hero { display: none; }
.ai-header.compact .ai-actions { display: flex; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.ai-header.compact .ai-action { flex: 0 0 auto; height: 38px; padding: 0 14px; border-radius: var(--r-full); font-size: 0.76rem; }
.ai-header.compact .disclaimer { margin: 8px 0 2px; }

.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 10px 0 12px; }
.msg { display: flex; align-items: flex-end; gap: 8px; animation: msgIn 380ms var(--ease-spring) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.msg.user { flex-direction: row-reverse; }
.msg-avatar { width: 46px; height: 50px; flex-shrink: 0; object-fit: contain; }
.msg-bubble { max-width: 80%; padding: 11px 14px; border-radius: 20px; font-size: 0.85rem; line-height: 1.7; }
.msg.bot .msg-bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-right-radius: 6px; }
.msg.user .msg-bubble { background: linear-gradient(180deg, var(--lime-bright), var(--lime)); color: var(--on-lime); font-weight: 700; border-bottom-left-radius: 6px; }
.msg-name { display: block; font-size: 0.68rem; color: var(--lime); font-weight: 800; margin-bottom: 2px; }
.msg-time { display: block; font-size: 0.62rem; opacity: 0.55; margin-top: 4px; direction: rtl; }
.msg-bubble strong { font-weight: 800; }
.msg.bot.warn .msg-bubble { border-color: rgba(255, 107, 94, 0.35); background: linear-gradient(180deg, rgba(255, 107, 94, 0.08), var(--surface-2)); }

.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: dot 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }
.typing-dots.static i { animation-duration: 2.4s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }

.chat-input-bar {
  /* sticky offsets are measured inside .app-body's padding, which already clears the nav */
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; gap: 8px; padding: 7px;
  border-radius: var(--r-full); background: rgba(19, 26, 25, 0.92); border: 1px solid var(--border-strong);
  backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.chat-input-bar .icon-btn { border-radius: 50%; }
.chat-input-bar input { flex: 1; min-width: 0; height: 40px; background: none; border: 0; outline: none; font-size: 0.88rem; }
.chat-input-bar input::placeholder { color: var(--dim); }
.send-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--on-lime); }
.send-btn .icon { transform: scaleX(-1); width: 19px; height: 19px; }

/* ===================================================
   NUTRITION
   =================================================== */
.meals-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.meal-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--border); animation: rise 420ms var(--ease-out) both;
}
.meal-time { font-size: 0.7rem; color: var(--dim); width: 40px; flex-shrink: 0; }
.meal-info { flex: 1; min-width: 0; }
.meal-info strong { display: block; font-size: 0.88rem; }
.meal-info small { font-size: 0.72rem; color: var(--muted); }
.meal-kcal { text-align: end; font-size: 0.82rem; font-weight: 800; }
.meal-kcal small { display: block; font-size: 0.68rem; color: var(--c-protein); font-weight: 700; }
.meal-row .icon-btn { width: 32px; height: 32px; border-radius: 10px; color: var(--dim); }
.empty-state { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px dashed var(--border-strong); }
.empty-state img { width: 70px; }
.empty-state p { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }

.plan-card .plan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.plan-stat { background: var(--surface-3); border-radius: 14px; padding: 10px 6px; text-align: center; }
.plan-stat .num { display: block; font-size: 1.05rem; font-weight: 800; }
.plan-stat span:last-child { font-size: 0.66rem; color: var(--muted); }
.plan-stat.main { grid-column: 1 / -1; border: 1px solid var(--lime-glow); }
.plan-stat.main .num { font-size: 1.6rem; color: var(--lime); }
.plan-note { font-size: 0.72rem; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }

/* ===================================================
   COACHES
   =================================================== */
.coach-list { display: flex; flex-direction: column; gap: 14px; }
.coach-card { margin: 0; animation: rise 480ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
.coach-head { display: flex; gap: 12px; align-items: center; }
.coach-avatar {
  width: 58px; height: 58px; border-radius: 20px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 900; color: var(--on-lime);
  background: linear-gradient(145deg, var(--lime-bright), var(--lime-deep));
}
.coach-name { font-size: 1rem; font-weight: 900; }
.coach-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.coach-meta span { display: flex; align-items: center; gap: 3px; }
.coach-meta .icon { width: 13px; height: 13px; }
.coach-meta .star { color: var(--gold); fill: var(--gold); stroke: none; }
.coach-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.coach-tag { font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--muted); }
.coach-bio { font-size: 0.8rem; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.offers { display: flex; flex-direction: column; gap: 8px; }
.offer {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; text-align: start;
  background: var(--surface-3); border: 1px solid var(--border); width: 100%;
}
.offer.featured { border-color: var(--lime-glow); background: linear-gradient(180deg, rgba(180, 236, 80, 0.08), var(--surface-3)); }
.offer-texts { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.offer-texts strong { font-size: 0.84rem; }
.offer-texts small { font-size: 0.7rem; color: var(--muted); line-height: 1.5; }
.offer-price { text-align: end; font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.offer-price small { display: block; font-size: 0.64rem; color: var(--dim); font-family: var(--font-ar); }

/* ===================================================
   SUBSCRIPTION
   =================================================== */
.pro-card {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 22px 18px 18px; margin-bottom: 14px;
  background: linear-gradient(160deg, #1b2a12 0%, var(--surface-2) 55%);
  border: 1px solid var(--lime-glow);
}
.pro-glow { position: absolute; top: -80px; left: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(180, 236, 80, 0.3), transparent 65%); }
.pro-mascot {
  position: absolute; top: 12px; left: 12px; width: 105px; height: auto; object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 18px rgba(226, 253, 92, 0.28));
}
.pro-tag { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 800; color: var(--gold); }
.pro-tag .icon { width: 16px; height: 16px; }
.pro-title { position: relative; font-size: 1.35rem; font-weight: 900; line-height: 1.4; margin: 8px 0 6px; max-width: 200px; }
.pro-price { position: relative; margin-bottom: 16px; }
.pro-price .num { font-size: 2rem; font-weight: 800; color: var(--lime); }
.pro-price small { color: var(--muted); }
.pro-features { position: relative; list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pro-features li { display: flex; gap: 8px; font-size: 0.8rem; line-height: 1.6; color: var(--muted); }
.pro-features li strong { color: var(--text); }
.pro-features .icon { color: var(--lime); width: 18px; height: 18px; margin-top: 3px; }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface-3); font-size: 0.78rem; font-weight: 700; }
.pay-chip .icon { width: 16px; height: 16px; color: var(--lime); }

/* ===================================================
   BOTTOM NAV
   =================================================== */
.bottom-nav {
  position: absolute; z-index: 20; left: 12px; right: 12px; bottom: 22px; height: 66px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  border-radius: 26px; background: rgba(16, 23, 22, 0.86); border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.nav-item {
  position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.64rem; font-weight: 700; color: var(--dim); transition: color var(--t-fast);
}
.nav-item .icon { width: 22px; height: 22px; transition: transform var(--t-med) var(--ease-spring); }
.nav-item.active { color: var(--lime); }
.nav-item.active .icon { transform: translateY(-2px); }
.nav-item::after {
  content: ''; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--lime); opacity: 0; transform: scale(0); transition: all var(--t-med) var(--ease-spring);
}
.nav-item.active::after { opacity: 1; transform: scale(1); }
.nav-ai::after { display: none; }
.nav-ai-orb {
  width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #1f2a1a, #0b100c); border: 2px solid var(--lime);
  box-shadow: 0 0 0 5px var(--bg), 0 0 24px var(--lime-glow);
  animation: orbGlow 3s ease-in-out infinite; transition: transform var(--t-med) var(--ease-spring);
}
.nav-ai-orb img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.nav-ai.active .nav-ai-orb { transform: scale(1.06); }
@keyframes orbGlow { 50% { box-shadow: 0 0 0 5px var(--bg), 0 0 34px rgba(180, 236, 80, 0.55); } }
.home-indicator { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); z-index: 21; }
@media (max-width: 520px) { .home-indicator { display: none; } .bottom-nav { bottom: max(12px, env(safe-area-inset-bottom)); } }

/* ===================================================
   NOTIFICATION BANNERS (sheet: الإشعارات)
   =================================================== */
.toast-host { position: absolute; top: 56px; left: 12px; right: 12px; z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 22px;
  background: rgba(21, 27, 25, 0.95); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); backdrop-filter: blur(14px);
  transform: translateY(-120%) scale(0.96); opacity: 0;
  transition: transform 520ms var(--ease-spring), opacity 260ms;
}
.toast.show { transform: none; opacity: 1; }
.toast img { width: 52px; height: 50px; object-fit: contain; flex-shrink: 0; }
.toast strong { display: block; font-size: 0.86rem; font-weight: 900; }
.toast small { font-size: 0.74rem; color: var(--muted); line-height: 1.5; }
.toast.warn { border-color: rgba(245, 184, 61, 0.4); }

/* ===================================================
   ONBOARDING
   =================================================== */
.onboarding {
  position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column;
  padding: 58px 20px 28px; background: radial-gradient(500px 420px at 70% 30%, rgba(180, 236, 80, 0.14), transparent 70%), var(--bg);
  animation: tabIn 400ms var(--ease-out);
}
.ob-top { display: flex; justify-content: space-between; align-items: center; height: 40px; margin-bottom: 8px; }
.ob-step { display: none; flex: 1; flex-direction: column; gap: 14px; overflow-y: auto; scrollbar-width: none; }
.ob-step.active { display: flex; animation: slideIn 420ms var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.ob-welcome { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.ob-mascot {
  width: 270px; max-width: 85vw; height: auto; object-fit: contain;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 24px rgba(226, 253, 92, 0.25));
}
.ob-bubble { align-self: flex-start; max-width: 230px; margin-bottom: -18px; z-index: 1; padding: 16px 18px; }
.ob-bubble .bubble-title { font-size: 1.15rem; }
.ob-name { display: block; font-size: 1.5rem; font-weight: 900; margin-top: 2px; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.ob-head {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 14px;
}
.ob-head h2 { font-size: 1.35rem; font-weight: 900; line-height: 1.3; }
.ob-head p { font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.ob-head h2 em { font-style: normal; font-size: 0.64rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-full); vertical-align: middle; margin-inline-start: 6px; }
.ob-step-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800;
  color: var(--lime); background: rgba(226, 253, 92, 0.1); border: 1px solid rgba(226, 253, 92, 0.25);
  padding: 3px 12px; border-radius: var(--r-full); margin-bottom: 4px; box-shadow: 0 0 10px rgba(226, 253, 92, 0.1);
}
.ob-step .btn-primary { margin-top: auto; flex-shrink: 0; }
.ob-building { align-items: center; justify-content: center; text-align: center; }
.ob-think {
  width: 170px; height: auto; object-fit: contain; margin: 0 auto 16px;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 24px rgba(226, 253, 92, 0.25));
}
.ob-building h2 { font-size: 1.2rem; font-weight: 900; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 0.76rem; font-weight: 800; color: var(--muted); }
.field input, .field select {
  height: 50px; width: 100%; padding: 0 14px; border-radius: 16px; outline: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 0.95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field select:focus { border-color: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.field select option { background: var(--surface-2); }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.field-row.two { grid-template-columns: 1fr 1fr; }
input.ltr { direction: ltr; text-align: left; font-family: var(--font-num); letter-spacing: 0.04em; }

.segmented { display: flex; padding: 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.segmented button {
  flex: 1; height: 42px; border-radius: 12px; font-weight: 800; font-size: 0.88rem; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-med) var(--ease-out);
}
.segmented button.active { background: var(--lime); color: var(--on-lime); box-shadow: 0 6px 16px var(--lime-glow); }
.segmented .icon { width: 17px; height: 17px; }

.goal-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.goal-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border-radius: 20px; text-align: center;
  background: var(--surface-2); border: 1.5px solid var(--border); transition: all var(--t-med) var(--ease-out);
}
.goal-option img { width: 70px; height: 74px; object-fit: contain; transition: transform var(--t-med) var(--ease-spring); }
.goal-option strong { font-size: 0.84rem; }
.goal-option small { font-size: 0.64rem; color: var(--muted); line-height: 1.4; }
.goal-option.active { border-color: var(--lime); background: linear-gradient(180deg, rgba(180, 236, 80, 0.12), var(--surface-2)); }
.goal-option.active img { transform: scale(1.08) translateY(-2px); }

/* ===================================================
   SHEETS
   =================================================== */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity var(--t-med);
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 86%;
  display: flex; flex-direction: column; gap: 12px; padding: 8px 18px 28px; overflow-y: auto; scrollbar-width: none;
  background: var(--surface-1); border-top: 1px solid var(--border-strong); border-radius: 30px 30px 0 0;
  transform: translateY(105%); transition: transform 460ms var(--ease-out); visibility: hidden;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.open { transform: none; visibility: visible; }
.sheet.tall { height: 86%; }
.sheet.full { top: 0; max-height: none; border-radius: 0; padding-top: 54px; background: var(--bg); }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-4); align-self: center; flex-shrink: 0; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; }
.sheet-header h3 { display: flex; align-items: center; gap: 6px; font-size: 1.1rem; font-weight: 900; }
.sheet-note { font-size: 0.72rem; color: var(--dim); text-align: center; }

/* Course sheet */
.course-hero { display: flex; gap: 12px; align-items: flex-end; }
.course-hero img { width: 110px; }
.course-hero h3 { font-size: 1.15rem; font-weight: 900; line-height: 1.4; margin: 6px 0; }
.course-hero p { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }
.course-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.course-facts span { font-size: 0.7rem; font-weight: 700; padding: 5px 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--muted); }
.lesson { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); width: 100%; text-align: start; }
.lesson-num { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-4); font-weight: 800; font-size: 0.82rem; flex-shrink: 0; }
.lesson-texts { flex: 1; min-width: 0; }
.lesson-texts strong { display: block; font-size: 0.84rem; line-height: 1.45; }
.lesson-texts small { font-size: 0.7rem; color: var(--muted); }
.lesson-play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--on-lime); flex-shrink: 0; }
.lesson-play.locked { background: var(--surface-4); color: var(--gold); }
.lesson-play .icon { width: 15px; height: 15px; }
.locked-banner { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(245, 184, 61, 0.08); border: 1px solid rgba(245, 184, 61, 0.3); font-size: 0.78rem; line-height: 1.6; }
.locked-banner .icon { color: var(--gold); }

/* Food sheet */
.search-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong); flex-shrink: 0; }
.search-field .icon { color: var(--dim); }
.search-field input { flex: 1; background: none; border: 0; outline: none; font-size: 0.9rem; }
.food-list { display: flex; flex-direction: column; gap: 8px; }
.food-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); transition: border-color var(--t-fast); }
.food-item.has-qty { border-color: var(--lime-glow); }
.food-texts { flex: 1; min-width: 0; }
.food-texts strong { display: block; font-size: 0.86rem; }
.food-texts small { font-size: 0.68rem; color: var(--muted); }
.food-texts .macros { color: var(--dim); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty .icon-btn { width: 32px; height: 32px; border-radius: 10px; }
.qty .num { min-width: 22px; text-align: center; font-weight: 800; }
.food-add-bar { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(transparent, var(--surface-1) 30%); }

/* Steppers */
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper-val { display: flex; align-items: baseline; gap: 6px; }
.stepper.big .num { font-size: 2.6rem; font-weight: 800; }
.stepper.big .icon-btn { width: 52px; height: 52px; border-radius: 18px; }
.stepper-val small { color: var(--muted); font-size: 0.85rem; }

/* Workout player */
.player-top { display: flex; align-items: center; justify-content: space-between; }
.player-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.player-progress { font-size: 0.85rem; color: var(--muted); min-width: 38px; text-align: end; }
.player-track { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex-shrink: 0; }
.player-track span { display: block; height: 100%; width: 0; background: var(--lime); transition: width 600ms var(--ease-out); }
.player-body { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.ex-head { text-align: center; }
.ex-head .eyebrow { display: block; margin-bottom: 4px; }
.ex-head h2 { font-size: 1.45rem; font-weight: 900; line-height: 1.35; }
.ex-head small { color: var(--dim); font-family: var(--font-num); }
.ex-stage { position: relative; display: grid; place-items: center; height: 200px; }
.ex-stage::before { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(180, 236, 80, 0.2), transparent 70%); }
.ex-stage img { position: relative; width: 170px; }
.set-dots { display: flex; justify-content: center; gap: 8px; }
.set-dots i { width: 30px; height: 6px; border-radius: 3px; background: var(--surface-4); transition: background var(--t-med); }
.set-dots i.done { background: var(--lime); }
.set-dots i.current { background: var(--lime-soft); box-shadow: inset 0 0 0 1.5px var(--lime); }
.set-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.set-input > span { font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.set-input .stepper { gap: 10px; }
.set-input .num { font-size: 1.6rem; font-weight: 800; min-width: 52px; text-align: center; }
.set-input .icon-btn { width: 36px; height: 36px; }
.set-input.single { grid-column: 1 / -1; }
.player-body .btn-primary { margin-top: auto; }

.rest-view { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.rest-ring { position: relative; width: 220px; height: 220px; }
.rest-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rest-ring .ring-fill { transition: stroke-dashoffset 1000ms linear; }
.rest-ring img { position: absolute; inset: 30px; width: 160px; margin: auto; }
.rest-time { font-size: 2.4rem; font-weight: 800; }
.rest-next { font-size: 0.82rem; color: var(--muted); }
.rest-actions { display: flex; gap: 10px; }

.finish-view { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; position: relative; }
.finish-view img { width: 170px; animation: popIn 700ms var(--ease-spring) both; }
.finish-view h2 { font-size: 1.5rem; font-weight: 900; }
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 8px 0 14px; }
.finish-stats div { background: var(--surface-2); border-radius: 16px; padding: 12px 6px; }
.finish-stats .num { display: block; font-size: 1.3rem; font-weight: 800; color: var(--lime); }
.finish-stats span:last-child { font-size: 0.68rem; color: var(--muted); }
@keyframes popIn { from { opacity: 0; transform: scale(0.5) rotate(-8deg); } to { opacity: 1; transform: none; } }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 900px) rotate(var(--rot)); opacity: 0.2; } }

/* Coach call */
.call-screen { background: radial-gradient(420px 420px at 50% 28%, rgba(180, 236, 80, 0.16), transparent 70%), var(--bg) !important; }
.call-top { text-align: center; }
.call-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--muted); padding: 6px 12px; border-radius: var(--r-full); background: var(--surface-2); }
.call-secure .icon { width: 14px; height: 14px; color: var(--lime); }
.call-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 16px; }
.call-avatar { position: relative; width: 108px; height: 108px; display: grid; place-items: center; }
.call-initial { position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; font-weight: 900; color: var(--on-lime); background: linear-gradient(145deg, var(--lime-bright), var(--lime-deep)); }
.call-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--lime); animation: ripple 2.2s var(--ease-out) infinite; }
.call-ring.r2 { animation-delay: 1.1s; }
.call-name { font-size: 1.3rem; font-weight: 900; margin-top: 8px; }
.call-role { font-size: 0.78rem; color: var(--muted); }
.call-timer { position: relative; width: 120px; height: 120px; margin: 8px 0; }
.call-timer .ring-fill { transition: stroke-dashoffset 1000ms linear; }
.call-timer .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.call-prompt { width: 100%; padding: 14px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.call-prompt p { font-size: 0.88rem; line-height: 1.7; margin-top: 6px; }
.call-eval { display: flex; gap: 10px; width: 100%; margin-top: 4px; }
.btn-eval { flex: 1; height: 46px; border-radius: 16px; font-weight: 800; font-size: 0.84rem; }
.btn-eval.good { background: var(--lime-soft); color: var(--lime); border: 1px solid var(--lime-glow); }
.btn-eval.warn { background: rgba(245, 184, 61, 0.1); color: var(--gold); border: 1px solid rgba(245, 184, 61, 0.35); }
.hangup { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--danger); color: #fff; margin-top: auto; box-shadow: 0 10px 30px rgba(255, 107, 94, 0.4); }
.hangup .icon { transform: rotate(135deg); width: 26px; height: 26px; }

/* Payment */
.order-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.order-summary strong { display: block; font-size: 0.92rem; margin: 2px 0; }
.order-summary small { font-size: 0.72rem; color: var(--lime); }
.order-amount { font-size: 1.05rem; font-weight: 800; white-space: nowrap; }
.demo-banner { padding: 9px 12px; border-radius: 14px; font-size: 0.72rem; font-weight: 700; line-height: 1.6; background: rgba(245, 184, 61, 0.1); border: 1px solid rgba(245, 184, 61, 0.35); color: var(--gold); }
.pay-tabs { flex-shrink: 0; }
#formMastercard, #formZainCash { display: flex; flex-direction: column; gap: 12px; }
.card-3d { position: relative; height: 190px; perspective: 1000px; transform-style: preserve-3d; transition: transform 700ms var(--ease-out); }
.card-3d.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0; border-radius: 20px; padding: 18px; direction: ltr; backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #22301a, #0d1210 55%, #1a2416); border: 1px solid var(--lime-glow);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.card-face.back { transform: rotateY(180deg); padding: 22px 0; justify-content: flex-start; gap: 18px; }
.card-row { display: flex; justify-content: space-between; align-items: flex-end; }
.card-row small { display: block; font-size: 0.55rem; color: var(--dim); letter-spacing: 0.1em; }
.card-row b { font-family: var(--font-num); font-size: 0.9rem; letter-spacing: 0.06em; }
.card-chip { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #e9c46a, #b88a2a); }
.card-brand { display: flex; }
.card-brand i { width: 30px; height: 30px; border-radius: 50%; background: #eb001b; opacity: 0.9; }
.card-brand i + i { background: #f79e1b; margin-left: -12px; }
.card-number { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.12em; }
.card-stripe { height: 40px; background: #000; }
.card-cvv { margin: 0 18px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 36px; padding: 0 12px; border-radius: 6px; background: var(--cream); color: var(--on-cream); font-size: 0.7rem; }
.zain-box { padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #1e1030, #121a18); border: 1px solid rgba(190, 120, 255, 0.3); }
.zain-box strong { font-family: var(--font-num); font-size: 1.15rem; }
.zain-box p { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.info-note { display: flex; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: 0.74rem; line-height: 1.7; color: var(--muted); }
.info-note .icon { color: var(--lime); margin-top: 2px; }
.info-note strong { color: var(--text); }
#payCheckoutView { display: flex; flex-direction: column; gap: 12px; }
.receipt { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.receipt-mascot { width: 120px; animation: popIn 700ms var(--ease-spring) both; }
.receipt h3 { font-size: 1.2rem; font-weight: 900; }
.receipt-slip { width: 100%; margin: 8px 0 12px; padding: 6px 14px; border-radius: 18px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.receipt-slip div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 0.78rem; border-bottom: 1px solid var(--border); }
.receipt-slip div:last-child { border-bottom: 0; }
.receipt-slip span { color: var(--muted); }
.receipt-slip b { text-align: end; }

/* ===================================================
   V3.1 — profile, progress history, dialogs, polish
   =================================================== */

/* Tip card: cream bubble like the sheet's welcome bubble, tap for the next tip */
.tip-card { width: 100%; text-align: start; }
.tip-bubble { background: var(--cream); color: var(--on-cream); border: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.tip-bubble > span { display: block; }
.tip-bubble .eyebrow { color: #4f7f12; }
.tip-text { font-size: 0.86rem; line-height: 1.65; margin-top: 3px; font-weight: 600; }
.tip-hint { font-size: 0.66rem; color: #8a9086; margin-top: 6px; }

.progress-more {
  width: 100%; margin-top: 12px; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-radius: 14px; background: var(--surface-3); font-size: 0.8rem; font-weight: 800; color: var(--muted);
}
.progress-more .icon { width: 16px; height: 16px; }

.call-icon.muted { background: rgba(245, 184, 61, 0.14); color: var(--gold); }
.live-tag.gold { color: var(--gold); }

/* Custom meal */
.custom-food-toggle {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px;
  border-radius: 14px; border: 1px dashed var(--border-strong); color: var(--lime); font-size: 0.82rem; font-weight: 800;
}
.custom-food-toggle .icon { width: 16px; height: 16px; }
.custom-food { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--lime-glow); animation: rise 320ms var(--ease-out); }
.custom-food .field input { height: 44px; }
.custom-food-actions { display: flex; justify-content: flex-end; gap: 8px; }
.food-texts small { display: block; }

/* Dialog */
.dialog-layer {
  position: absolute; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity 220ms;
}
.dialog-layer.show { opacity: 1; }
.dialog {
  width: 100%; max-width: 320px; padding: 18px 18px 16px; border-radius: 28px; text-align: center;
  background: var(--surface-1); border: 1px solid var(--border-strong); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(10px); transition: transform 380ms var(--ease-spring);
}
.dialog-layer.show .dialog { transform: none; }
.dialog img { width: 96px; margin: 0 auto 4px; }
.dialog h3 { font-size: 1.12rem; font-weight: 900; }
.dialog p { font-size: 0.82rem; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dialog-btn { height: 48px; border-radius: 16px; font-weight: 800; font-size: 0.9rem; }
.dialog-btn.primary { background: var(--lime); color: var(--on-lime); }
.dialog-btn.ghost { background: var(--surface-3); }
.dialog-btn.danger { background: rgba(255, 107, 94, 0.12); color: var(--danger); }

/* Progress sheet */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-tiles > div { background: var(--surface-2); border-radius: 16px; padding: 12px 6px; text-align: center; }
.stat-tiles .num { display: block; font-size: 1.25rem; font-weight: 800; color: var(--lime); }
.stat-tiles span:last-child { font-size: 0.72rem; color: var(--muted); }
.sheet-section-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }
.sheet-section-head h4 { font-size: 0.98rem; font-weight: 900; }
.weight-chart { display: block; width: 100%; height: 140px; border-radius: 16px; background: var(--surface-2); }
.chart-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.76rem; color: var(--muted); }
.chart-legend b { color: var(--text); margin-inline-start: 4px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.history-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime); }
.history-icon.gold { background: rgba(245, 184, 61, 0.12); color: var(--gold); }
.history-icon .icon { width: 18px; height: 18px; }
.history-texts { flex: 1; min-width: 0; }
.history-texts strong { display: block; font-size: 0.86rem; }
.history-texts em { font-style: normal; color: var(--gold); font-size: 0.72rem; }
.history-texts small { font-size: 0.74rem; color: var(--muted); }
.history-stats { text-align: end; font-size: 0.72rem; color: var(--muted); line-height: 1.6; white-space: nowrap; }
.history-stats b { color: var(--text); font-size: 0.84rem; }

/* Profile sheet */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.profile-avatar {
  width: 66px; height: 66px; border-radius: 22px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 900; color: var(--on-lime); background: linear-gradient(145deg, var(--lime-bright), var(--lime-deep));
  box-shadow: 0 10px 26px var(--lime-glow);
}
.profile-head strong { display: block; font-size: 1.2rem; font-weight: 900; }
.profile-head small { display: block; font-size: 0.78rem; color: var(--muted); margin: 2px 0 6px; }
.settings-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.settings-row {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px;
  border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); flex-shrink: 0;
}
.settings-row > span:not(.switch) { flex: 1; text-align: start; font-size: 0.88rem; font-weight: 700; }
.settings-row > .icon:first-child { color: var(--lime); }
.settings-row.danger { margin-top: 18px; color: var(--danger); }
.settings-row.danger > .icon:first-child { color: var(--danger); }
.switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; border-radius: var(--r-full); background: var(--surface-4); transition: background var(--t-med); }
.switch i { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--t-med) var(--ease-spring); }
.switch.on { background: var(--lime); }
.switch.on i { transform: translateX(-18px); }

/* Coaches: compact cards, packages live in a sheet */
.coach-tag.lime { background: var(--lime-soft); color: var(--lime); }
.coach-bio.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coach-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.coach-from { font-size: 0.78rem; color: var(--muted); }
.coach-from b { color: var(--text); font-size: 1rem; }
.coach-foot .btn-small .icon { width: 15px; height: 15px; }
#coachSheetBody { display: flex; flex-direction: column; gap: 4px; }
.offer-texts .badge { vertical-align: middle; margin-inline-start: 4px; }

/* Banner with an action button (undo, start…) */
.toast.has-action { pointer-events: auto; }
.toast-texts { flex: 1; min-width: 0; }
.toast-action { flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: var(--r-full); background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 0.8rem; }

/* Player extras */
.ex-stage { height: 170px; }
.ex-stage img { width: 150px; }
.ex-stage::before { width: 170px; height: 170px; }
.ex-tip { display: flex; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 0.82rem; line-height: 1.65; color: var(--muted); }
.ex-tip .icon { width: 16px; height: 16px; color: var(--lime); margin-top: 4px; }
.last-hint { font-size: 0.68rem; color: var(--dim); }
.skip-link { align-self: center; padding: 4px 10px; font-size: 0.8rem; font-weight: 700; color: var(--dim); }
.player-body .btn-primary { margin-top: auto; flex-shrink: 0; }
.lesson-play.soon { background: var(--surface-4); color: var(--muted); }

/* Readability: lift the smallest text sizes a notch */
.card-sub { font-size: 0.78rem; }
.course-info p, .coach-bio, .offer-texts small, .meal-info small, .call-texts small, .coaches-teaser small { font-size: 0.8rem; }
.coach-meta, .workout-meta, .course-meta { font-size: 0.76rem; }
.nav-item { font-size: 0.7rem; }
.week-day, .mini-stat span:last-child, .plan-stat span:last-child, .disclaimer { font-size: 0.72rem; }
.badge { font-size: 0.68rem; }
.macro-row-labels { font-size: 0.78rem; }

/* ===================================================
   V3.2 — Player dossier (stepper), meal plan & swaps
   =================================================== */

/* Stepper progress replaces the dots */
.ob-progress { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 14px; }
.ob-progress-label { font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.ob-progress-track { width: 100%; max-width: 220px; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.ob-progress-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lime-deep), var(--lime-bright)); transition: width 420ms var(--ease-out); }

.ob-q { display: flex; flex-direction: column; gap: 8px; }
.ob-q-title { font-size: 0.86rem; font-weight: 900; }
.ob-q-title em, .ob-head h2 em { font-style: normal; font-size: 0.64rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-full); vertical-align: middle; margin-inline-start: 6px; }
em.req { background: rgba(255, 107, 94, 0.12); color: #ff8a80; }
em.opt { background: var(--surface-3); color: var(--muted); }
.ob-hint { font-size: 0.76rem; line-height: 1.7; color: var(--muted); padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.ob-error { min-height: 1px; font-size: 0.8rem; font-weight: 800; color: #ff8a80; text-align: center; }
.ob-error:empty { display: none; }
.ob-error.shake { animation: shake 420ms var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.ob-step .skip-link { margin-top: -6px; }
.emoji { font-size: 1.1rem; line-height: 1; }

/* Multi-select chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-full);
  background: var(--surface-2); border: 1.5px solid var(--border-strong); font-size: 0.82rem; font-weight: 700;
  transition: all var(--t-fast) var(--ease-out);
}
.choice-chip .emoji { font-size: 1rem; }
.choice-chip.active { background: var(--lime-soft); border-color: var(--lime); color: var(--lime-bright); }
.choice-chip:active { transform: scale(0.95); }

/* Single-select rows with radio */
.option-list { display: flex; flex-direction: column; gap: 8px; }
.choice-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border-radius: 18px; text-align: start;
  background: var(--surface-2); border: 1.5px solid var(--border); transition: all var(--t-fast) var(--ease-out);
}
.choice-row .emoji { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--surface-3); font-size: 1.15rem; }
.choice-texts { flex: 1; min-width: 0; }
.choice-texts strong { display: block; font-size: 0.9rem; }
.choice-texts small { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 1px; }
.radio { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--surface-4); transition: all var(--t-fast); }
.choice-row.active { border-color: var(--lime); background: linear-gradient(180deg, rgba(180, 236, 80, 0.1), var(--surface-2)); }
.choice-row.active .radio { border-color: var(--lime); background: radial-gradient(circle, var(--lime) 45%, transparent 50%); }
.choice-row:active { transform: scale(0.98); }

/* Sport tiles */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 20px; text-align: start;
  background: var(--surface-2); border: 1.5px solid var(--border); transition: all var(--t-med) var(--ease-out);
}
.choice-tile .icon { width: 30px; height: 30px; color: var(--lime); margin-bottom: 6px; transition: transform var(--t-med) var(--ease-spring); }
.choice-tile strong { font-size: 0.9rem; }
.choice-tile small { font-size: 0.72rem; color: var(--muted); }
.choice-tile:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
.choice-tile:last-child:nth-child(odd) .icon { margin: 0; }
.choice-tile.active { border-color: var(--lime); background: linear-gradient(160deg, rgba(180, 236, 80, 0.14), var(--surface-2)); }
.choice-tile.active .icon { transform: scale(1.12) rotate(-6deg); }

/* Goal: 4 mascot cards in a 2×2 grid */
.ob-step .goal-options { grid-template-columns: 1fr 1fr; }
.ob-step .goal-option img { width: 84px; height: 84px; }

/* Physique: illustrated body cards */
.physique-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.physique-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; border-radius: 20px; text-align: center;
  background: var(--surface-2); border: 1.5px solid var(--border); transition: all var(--t-med) var(--ease-out);
}
.physique-card strong { font-size: 0.86rem; }
.physique-card small { font-size: 0.66rem; color: var(--muted); line-height: 1.5; }
.physique-card.active { border-color: var(--lime); background: linear-gradient(180deg, rgba(180, 236, 80, 0.12), var(--surface-2)); }
.body-svg { width: 100%; max-width: 86px; height: 128px; overflow: visible; transition: transform var(--t-med) var(--ease-spring), filter var(--t-med); }
.physique-card.active .body-svg { transform: scale(1.05); filter: drop-shadow(0 0 10px var(--lime-glow)); }
.body-fill { fill: var(--surface-4); }
.body-line { fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-linejoin: round; }
.body-arm-line { fill: none; stroke: var(--lime); stroke-linecap: round; }
.body-arm { fill: none; stroke: var(--surface-4); stroke-linecap: round; }
.body-arm.zone { stroke: #6f8f39; }
.body-zone { fill: var(--lime); opacity: 0.5; }
.body-hair { fill: var(--surface-3); stroke: var(--lime); stroke-width: 1.2; }
.body-motion { stroke: var(--lime); stroke-width: 1.6; stroke-linecap: round; opacity: 0.7; }
.physique-card:not(.active) .body-zone { opacity: 0.3; }

/* Home banner for profiles without the dossier */
.dossier-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-color: var(--lime-glow); background: linear-gradient(160deg, rgba(180, 236, 80, 0.12), var(--surface-2)); }
.dossier-banner img { width: 54px; }
.dossier-banner span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dossier-banner strong { font-size: 0.92rem; }
.dossier-banner small { font-size: 0.76rem; color: var(--muted); line-height: 1.5; }

.dossier-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.dossier-tags span { font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); }

.adapted-badge { display: inline-block; margin-top: 6px; font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: var(--r-full); background: rgba(92, 200, 255, 0.12); color: var(--c-water); }

/* Meal plan card */
.badge.budget { background: rgba(92, 200, 255, 0.12); color: var(--c-water); }
.mealplan-meta { font-size: 0.78rem; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.mealplan-meta .num { color: var(--text); font-weight: 700; }
.mealplan-warn { font-size: 0.76rem; line-height: 1.6; color: var(--gold); padding: 8px 12px; border-radius: 12px; background: rgba(245, 184, 61, 0.08); margin-bottom: 10px; }
.plan-meals { display: flex; flex-direction: column; gap: 8px; }
.plan-meal { padding: 12px; border-radius: 18px; background: var(--surface-3); border: 1px solid var(--border); transition: opacity var(--t-med), transform var(--t-med) var(--ease-out); animation: rise 380ms var(--ease-out) both; }
.plan-meal-top { display: flex; gap: 10px; align-items: flex-start; }
.plan-meal-texts { flex: 1; min-width: 0; }
.plan-meal-texts strong { display: block; font-size: 0.9rem; margin-top: 2px; }
.plan-meal-texts small { font-size: 0.74rem; color: var(--muted); }
.plan-meal-kcal { text-align: end; font-weight: 800; font-size: 0.95rem; }
.plan-meal-kcal small { display: block; font-size: 0.7rem; color: var(--c-protein); font-weight: 700; }
.plan-meal-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-action { flex: 1; height: 36px; border-radius: 12px; font-size: 0.78rem; font-weight: 800; background: var(--surface-4); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mini-action.lime { background: var(--lime-soft); color: var(--lime); border: 1px solid rgba(180, 236, 80, 0.3); }
.mini-action:disabled { opacity: 0.5; cursor: default; }
.plan-meal.eaten { opacity: 0.6; }
.plan-meal.missing p { font-size: 0.8rem; color: var(--muted); margin: 4px 0 8px; }
.mealplan-card .empty-state { margin-bottom: 10px; }

/* ===================================================
   V3.3 — avatar body, guest entry, richer dossier, Pro, guardrails
   =================================================== */

/* Header avatar: head-and-shoulders of the player's build (or the mascot for guests) */
.user-avatar { overflow: hidden; padding: 0; background: radial-gradient(circle at 50% 30%, #1f2b1a, var(--surface-2) 70%); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--lime-glow); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.body-svg.avatar { width: 100%; height: 100%; max-width: none; margin-top: 4px; }
.body-svg.avatar .body-line, .body-svg.avatar .body-arm-line { stroke-width: 1.8; }
.profile-avatar { overflow: hidden; background: radial-gradient(circle at 50% 30%, #2a3a20, var(--surface-2) 70%); border: 2px solid var(--lime); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* "Your body now → your goal" */
.body-journey {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 6px 0 4px; padding: 14px 10px;
  border-radius: 22px; background: linear-gradient(160deg, rgba(180, 236, 80, 0.08), var(--surface-2)); border: 1px solid var(--border);
}
.journey-col { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.journey-col .body-svg { height: 140px; max-width: 96px; }
.journey-col strong { font-size: 0.86rem; }
.journey-col small { font-size: 0.7rem; color: var(--muted); }
.journey-col.goal strong { color: var(--lime); }
.journey-col.goal .body-svg { filter: drop-shadow(0 0 12px var(--lime-glow)); animation: float 4.5s ease-in-out infinite; }
.journey-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--lime); }
.journey-arrow .icon { width: 26px; height: 26px; animation: nudge 1.6s ease-in-out infinite; }
.journey-arrow small { font-size: 0.64rem; color: var(--muted); }
.journey-note { font-size: 0.68rem; color: var(--dim); text-align: center; line-height: 1.6; margin-bottom: 10px; }
.body-svg.current .body-line, .body-svg.current .body-arm-line { stroke: var(--muted); }
.body-svg.current .body-hair { stroke: var(--muted); }

/* Guest entry on the welcome screen */
.guest-link { align-self: center; padding: 10px 16px; font-size: 0.86rem; font-weight: 800; color: var(--muted); border-radius: var(--r-full); }
.guest-link:hover { color: var(--text); }

/* Free-text answers inside the dossier */
.ob-text, .ob-textarea {
  width: 100%; padding: 0 14px; height: 46px; border-radius: 14px; outline: none; font-size: 0.86rem;
  background: var(--surface-2); border: 1px dashed var(--border-strong); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ob-textarea { height: auto; min-height: 64px; padding: 10px 14px; resize: vertical; line-height: 1.6; font-family: inherit; color: inherit; }
.ob-text:focus, .ob-textarea:focus { border-style: solid; border-color: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.ob-text::placeholder, .ob-textarea::placeholder { color: var(--dim); }
.ob-parsed { font-size: 0.74rem; color: var(--lime); line-height: 1.6; }
.ob-parsed:empty { display: none; }

/* Goals that don't fit this body are shown but locked, with the reason */
.goal-option.blocked { opacity: 0.45; cursor: not-allowed; }
.goal-option.blocked img { filter: grayscale(1); }
.block-reason { color: #ff8a80 !important; font-weight: 700; }
.ob-step .goal-options { grid-template-columns: 1fr 1fr; }
.ob-step .goal-options .goal-option:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px; }
.ob-step .goal-options .goal-option:last-child:nth-child(odd) img { width: 56px; height: 56px; }
#obGoalHint { color: var(--text); }
#obGoalHint strong { color: var(--lime); }

/* Exact daily budget slider */
.budget-slider { padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--lime-glow); display: flex; flex-direction: column; gap: 10px; animation: rise 320ms var(--ease-out); }
.budget-slider-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 800; }
.budget-slider-head strong { font-size: 1.15rem; color: var(--lime); }
.budget-slider-scale { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--dim); }
.budget-slider-scale span:nth-child(2) { color: var(--muted); font-weight: 700; }
.budget-slider input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: var(--r-full); outline: none;
  background: linear-gradient(to left, var(--lime) var(--fill, 10%), var(--surface-4) var(--fill, 10%));
}
.budget-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lime-bright);
  border: 4px solid var(--on-lime); box-shadow: 0 0 0 2px var(--lime), 0 4px 12px var(--lime-glow); cursor: grab;
}
.budget-slider input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--lime-bright); border: 4px solid var(--on-lime); box-shadow: 0 0 0 2px var(--lime);
}

/* Pro lock over the meal plan */
.mealplan-card { position: relative; overflow: hidden; }
.mealplan-card.locked > :not(.pro-lock) { filter: blur(5px); pointer-events: none; user-select: none; }
.pro-lock {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 20px; text-align: center; background: linear-gradient(180deg, rgba(8, 15, 15, 0.35), rgba(8, 15, 15, 0.85));
}
.pro-lock-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, #f8cd5f, #e09b1f); color: #2a1a00; box-shadow: 0 10px 26px rgba(245, 184, 61, 0.35); }
.pro-lock-icon .icon { width: 26px; height: 26px; }
.pro-lock strong { font-size: 1.05rem; font-weight: 900; }
.pro-lock small { font-size: 0.8rem; color: var(--muted); max-width: 240px; line-height: 1.6; margin-bottom: 4px; }
.pro-features li.soon { opacity: 0.85; }
.pro-features li.soon .icon { color: var(--gold); }
.pro-features li em { font-style: normal; font-size: 0.66rem; font-weight: 800; color: var(--gold); background: rgba(245, 184, 61, 0.12); padding: 2px 8px; border-radius: var(--r-full); margin-inline-start: 4px; }

/* Weekly program */
.week-link { align-self: flex-start; font-size: 0.78rem; font-weight: 800; color: var(--lime); padding: 4px 0; }
.week-plan { display: flex; flex-direction: column; gap: 8px; }
.week-day-card { padding: 12px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.week-day-card.today { border-color: var(--lime-glow); background: linear-gradient(160deg, rgba(180, 236, 80, 0.1), var(--surface-2)); }
.week-day-card.rest { opacity: 0.75; }
.week-day-card.rest .badge { background: var(--surface-4); color: var(--muted); }
.week-day-head { display: flex; justify-content: space-between; align-items: center; }
.week-day-head strong { font-size: 0.9rem; }
.week-day-title { font-size: 0.82rem; font-weight: 800; color: var(--lime); }
.week-day-card small { font-size: 0.76rem; color: var(--muted); }
.week-day-card ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.week-day-card li { font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.week-day-card li .num { color: var(--text); }
.week-day-card .btn-small { align-self: flex-start; margin-top: 4px; }

/* Meal proof photos */
.meal-photo {
  position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--lime-glow);
}
.meal-photo img { width: 100%; height: 100%; object-fit: cover; }
.meal-photo span { position: absolute; bottom: 1px; left: 2px; font-size: 0.7rem; }
.meal-photo.empty { border: 1px dashed var(--border-strong); color: var(--muted); }
.meal-photo.empty .icon { width: 20px; height: 20px; }
.meal-info small .num { font-size: 0.72rem; }
.proof { color: var(--lime); font-weight: 800; }
.msg-photo { display: block; width: 100%; max-width: 200px; border-radius: 14px; margin-bottom: 2px; }
.photo-viewer { cursor: zoom-out; }
.photo-viewer figure { max-width: 100%; text-align: center; transform: scale(0.92); transition: transform 380ms var(--ease-spring); }
.photo-viewer.show figure { transform: none; }
.photo-viewer img { max-width: 100%; max-height: 70vh; border-radius: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }
.photo-viewer figcaption { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }

/* Diet system: recommendation in onboarding, box in the plan card */
.diet-reco { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 18px; background: linear-gradient(160deg, rgba(180, 236, 80, 0.12), var(--surface-2)); border: 1px solid var(--lime-glow); }
.diet-reco img { width: 54px; flex-shrink: 0; }
.diet-reco strong { display: block; font-size: 0.9rem; color: var(--lime); }
.diet-reco small { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.choice-row.blocked { opacity: 0.5; cursor: not-allowed; }
.choice-row .badge { margin-inline-start: 6px; vertical-align: middle; }
.diet-box { margin: 4px 0 10px; padding: 12px; border-radius: 16px; background: var(--surface-3); }
.diet-box strong { display: block; font-size: 0.9rem; }
.diet-box > small { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.cycle-days { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cycle-days > div { padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.cycle-days > div.today { border-color: var(--lime); background: linear-gradient(160deg, rgba(180, 236, 80, 0.12), var(--surface-2)); }
.cycle-days span { display: block; font-size: 0.74rem; color: var(--muted); }
.cycle-days b { display: block; font-size: 1.2rem; font-weight: 800; margin: 2px 0; }
.cycle-days small { font-size: 0.68rem; color: var(--dim); }

/* Body scan */
.scan-result { padding: 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--lime-glow); margin-bottom: 12px; }
.scan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.scan-stats > div { padding: 10px; border-radius: 14px; background: var(--surface-3); text-align: center; }
.scan-stats span { display: block; font-size: 0.72rem; color: var(--muted); }
.scan-stats b { display: block; font-size: 1.05rem; color: var(--lime); margin-top: 2px; }
.scan-result p { font-size: 0.82rem; line-height: 1.7; margin-top: 4px; }
.scan-summary { color: var(--muted); }
.scan-steps { padding: 12px; border-radius: 16px; background: var(--surface-2); margin-bottom: 12px; }
.scan-steps p { font-size: 0.82rem; line-height: 1.8; }
.scan-consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px dashed var(--border-strong); margin-bottom: 12px; font-size: 0.78rem; line-height: 1.7; color: var(--muted); cursor: pointer; }
.scan-consent input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--lime); margin-top: 2px; }

/* Steps card */
.steps-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.steps-count { display: flex; align-items: baseline; gap: 8px; }
.steps-count .big { font-size: 2rem; font-weight: 800; color: var(--lime); line-height: 1; }
.steps-count small { font-size: 0.78rem; color: var(--muted); }
.steps-extra { display: flex; gap: 12px; font-size: 0.76rem; color: var(--muted); }
.steps-extra .num { color: var(--text); font-weight: 700; }
.steps-bar { margin: 12px 0 8px; height: 9px; }
.bar-fill.steps { background: linear-gradient(90deg, var(--lime-deep), var(--lime-bright)); box-shadow: 0 0 10px var(--lime-glow); }
.steps-status { font-size: 0.76rem; color: var(--muted); margin-bottom: 10px; }
.steps-live { color: var(--lime); font-weight: 800; animation: blink 1.6s infinite; }
.steps-actions { display: flex; gap: 8px; align-items: center; }
.steps-manual { flex: 1; display: flex; gap: 6px; }
.steps-manual input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: var(--r-full); outline: none; font-size: 0.8rem;
  background: var(--surface-3); border: 1px solid var(--border);
}
.steps-manual input:focus { border-color: var(--lime); }
.steps-manual .icon-btn { width: 36px; height: 36px; border-radius: 50%; }
.steps-note { font-size: 0.74rem; color: var(--gold); margin-top: 10px; line-height: 1.6; }

/* Gym directory (real OpenStreetMap data) */
.gym-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.gym-tools .btn-small { flex-shrink: 0; height: 44px; }
.gym-search { flex: 1; height: 44px; }
.gym-govs .chip .num { font-size: 0.7rem; opacity: 0.7; margin-inline-start: 2px; }
.gym-name-en { display: block; font-size: 0.72rem; color: var(--dim); margin-top: 1px; }
.gym-km { color: var(--lime); font-weight: 800; }
.gym-more, .gym-source { font-size: 0.74rem; color: var(--muted); text-align: center; line-height: 1.7; margin: 10px 0; }
.gym-source a { color: var(--lime); font-weight: 800; }

/* Which model answered (Gemini, its fallback, or the built-in replies) */
.msg-model { display: block; margin-top: 6px; font-size: 0.62rem; font-weight: 700; color: var(--dim); }

/* Respect the OS "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ================= GYMS DIRECTORY & EXP STYLES ================= */
.coaches-switch {
  margin-bottom: 16px;
}
.gym-city-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.gym-city-filters::-webkit-scrollbar { display: none; }
.gym-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gym-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise 480ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.gym-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.gym-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(180, 236, 80, 0.15), rgba(180, 236, 80, 0.05));
  border: 1px solid rgba(180, 236, 80, 0.3);
  color: var(--lime-bright);
}
.gym-avatar .icon {
  width: 26px;
  height: 26px;
}
.gym-info {
  flex: 1;
  min-width: 0;
}
.gym-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gym-name {
  font-size: 1.02rem;
  font-weight: 900;
  margin: 0;
  color: var(--text);
}
.gym-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(180, 236, 80, 0.15);
  color: var(--lime-bright);
  border: 1px solid rgba(180, 236, 80, 0.3);
}
.gym-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3px;
}
.gym-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gym-tag {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.gym-timing {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}
.gym-timing .icon {
  width: 14px;
  height: 14px;
  color: var(--lime-bright);
}
.gym-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.gym-price-box {
  display: flex;
  flex-direction: column;
}
.gym-price-box small {
  font-size: 0.65rem;
  color: var(--muted);
}
.gym-price-box strong {
  font-size: 0.85rem;
  color: var(--lime-bright);
}
.gym-actions {
  display: flex;
  gap: 8px;
}
.gym-call-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.gym-call-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ===================================================
   ENHANCEMENTS: Prominent Guest Button, Workout Anim,
   Nearest Gym Badge, and Bundle Upsell
   =================================================== */

.btn-guest-prominent {
  width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; border-radius: var(--r-full);
  background: rgba(35, 44, 43, 0.75); border: 1.5px solid var(--border-strong);
  color: var(--text); font-weight: 800; font-size: 0.95rem;
  transition: all 0.2s var(--ease-out);
}
.btn-guest-prominent:hover {
  border-color: var(--lime); background: rgba(180, 236, 80, 0.12); color: var(--lime);
  transform: translateY(-2px);
}
.guest-orb { font-size: 1.25rem; }

/* Dynamic Workout Animation for Adhdhouli */
.mascot-lifting-anim {
  animation: mascotPump 1.7s ease-in-out infinite alternate;
  transform-origin: bottom center;
  filter: drop-shadow(0 10px 24px rgba(180, 236, 80, 0.38));
  max-height: 190px;
  object-fit: contain;
}
@keyframes mascotPump {
  0% { transform: translateY(8px) scale(0.96) rotate(-1deg); }
  35% { transform: translateY(0px) scale(1) rotate(0deg); }
  70% { transform: translateY(-14px) scale(1.06) rotate(1deg); filter: drop-shadow(0 16px 32px rgba(180, 236, 80, 0.55)); }
  100% { transform: translateY(-10px) scale(1.04) rotate(0deg); }
}
.ex-stage {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 200px; padding: 20px 0; margin-bottom: 12px;
}
.ex-stage::before {
  content: ''; position: absolute; width: 140px; height: 32px; bottom: 8px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.65) 0%, transparent 70%);
  border-radius: 50%;
}
.ex-stage-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 0.72rem; font-weight: 800; color: var(--lime);
  background: rgba(180, 236, 80, 0.14); border: 1px solid var(--lime-glow);
  padding: 4px 10px; border-radius: var(--r-full);
  animation: pulseGlow 1.5s infinite;
}
@keyframes pulseGlow { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }

/* Nearest Gym Distance Badge & Directory Styles */
.gym-card.nearest-gym {
  border-color: var(--lime);
  box-shadow: 0 8px 30px rgba(180, 236, 80, 0.16);
  background: linear-gradient(170deg, rgba(30, 42, 28, 0.95), var(--surface-2));
}
.nearest-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--r-full); font-size: 0.74rem; font-weight: 900;
  background: linear-gradient(135deg, var(--lime), #84cc16); color: #0d140b;
  margin-bottom: 8px; width: fit-content;
  box-shadow: 0 2px 10px rgba(180, 236, 80, 0.35);
}
.location-detector-bar {
  display: flex; gap: 8px; align-items: center; margin-bottom: 14px;
}
.btn-detect-loc {
  width: 100%; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-full); font-size: 0.84rem; font-weight: 800;
  background: linear-gradient(135deg, rgba(180, 236, 80, 0.16), rgba(92, 200, 255, 0.16));
  border: 1.5px solid var(--lime); color: var(--lime-bright);
  cursor: pointer; transition: all 0.2s var(--ease-out);
}
.btn-detect-loc:hover {
  background: rgba(180, 236, 80, 0.25); transform: translateY(-2px);
}
.gym-area-filters {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px;
  scrollbar-width: none;
}
.gym-actions-row {
  display: flex; gap: 8px; margin-top: 14px;
}
.btn-gym-call, .btn-gym-map {
  flex: 1; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-full); font-size: 0.8rem; font-weight: 800; text-decoration: none;
}
.btn-gym-call { background: var(--lime); color: var(--on-lime); }
.btn-gym-map { background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); }

/* Bundle Upsell Card */
.bundle-upsell-box {
  background: linear-gradient(145deg, rgba(35, 44, 43, 0.95), rgba(180, 236, 80, 0.12));
  border: 1.5px solid var(--lime); border-radius: 16px; padding: 14px; margin: 14px 0;
  box-shadow: 0 4px 18px rgba(180, 236, 80, 0.12);
}
.bundle-upsell-box label {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
}
.bundle-upsell-box input[type="checkbox"] {
  width: 22px; height: 22px; accent-color: var(--lime); margin-top: 3px; flex-shrink: 0;
}
.bundle-title { font-weight: 900; font-size: 0.92rem; color: #fff; margin-bottom: 4px; display: block; }
.bundle-sub { font-size: 0.78rem; color: var(--muted); line-height: 1.45; display: block; }
.bundle-savings { color: var(--lime); font-weight: 800; font-size: 0.82rem; margin-top: 4px; display: block; }

/* Clean Empty Coaches Card */
.empty-coaches-card {
  text-align: center; padding: 32px 18px; margin: 16px 0;
}
.empty-coaches-mascot {
  width: 100px; height: auto; margin: 0 auto 16px; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.3));
}
.empty-coaches-card h3 {
  font-size: 1.1rem; font-weight: 900; margin-bottom: 8px; color: #fff;
}
.empty-coaches-card p {
  font-size: 0.84rem; color: var(--muted); line-height: 1.6; max-width: 320px; margin: 0 auto 18px;
}


/* AI Meal Logger action box */
.ai-meal-log-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(226, 253, 92, 0.08);
  border: 1px solid rgba(226, 253, 92, 0.25);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-meal-log-header {
  font-size: 0.85rem;
  color: var(--text);
}
.ai-meal-log-header strong {
  color: var(--lime);
}
.btn-log-meal-ai {
  background: var(--lime);
  color: #0c0f14;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-log-meal-ai:active {
  transform: scale(0.96);
  filter: brightness(0.9);
}

/* Welcome Pro Hook */
.btn-pro-direct {
  background: linear-gradient(135deg, rgba(226, 253, 92, 0.25) 0%, rgba(226, 253, 92, 0.08) 100%);
  border: 1px solid var(--lime);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.btn-pro-direct:active { transform: scale(0.97); }

.pro-home-hook {
  background: linear-gradient(135deg, rgba(226, 253, 92, 0.12) 0%, rgba(18, 22, 28, 0.95) 100%);
  border: 1px solid rgba(226, 253, 92, 0.3);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pro-home-hook-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pro-home-hook-top img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--lime);
}
.pro-home-hook-top h4 {
  font-size: 0.95rem;
  margin: 0;
  color: #fff;
}
.pro-home-hook-top p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.4;
}

/* Environment Switcher & Equipment Customizer */
.env-card-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.env-card-opt.active, .env-card-opt:has(input:checked) {
  border-color: var(--lime);
  background: var(--surface-3);
  box-shadow: 0 0 12px rgba(180, 236, 80, 0.15);
}
.env-card-opt input[type="radio"] {
  accent-color: var(--lime);
  width: 18px;
  height: 18px;
}
.env-card-opt .env-icon {
  font-size: 1.6rem;
}
.env-card-opt .env-texts strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}
.env-card-opt .env-texts small {
  font-size: 0.78rem;
  color: var(--muted);
}

.core-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: rgba(255, 155, 92, 0.15);
  border: 1px solid rgba(255, 155, 92, 0.35);
  color: #ff9b5c;
  font-size: 0.74rem;
  font-weight: 700;
  margin-top: 4px;
}
.core-lock-badge .icon {
  width: 13px;
  height: 13px;
}
.core-lock-badge.done {
  background: var(--lime-soft);
  border-color: var(--lime);
  color: var(--lime);
}

.chip-mini {
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--surface-4);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t-fast);
}
.chip-mini:hover, .chip-mini:active {
  color: var(--lime);
  border-color: var(--lime);
  background: var(--surface-3);
}

.env-mode-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(180, 236, 80, 0.08) 0%, rgba(14, 21, 20, 0.7) 100%);
  border: 1px solid rgba(180, 236, 80, 0.25);
  padding: 12px 14px;
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.env-mode-header span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.env-mode-header strong {
  font-size: 0.92rem;
  color: var(--lime);
}


/* ===================================================
   Coach memory sheet (injuries, PRs, learned facts)
   =================================================== */
.memory-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.memory-row.active { border-color: rgba(245, 184, 61, 0.35); }
.memory-row.resolved { opacity: 0.72; }
.memory-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: var(--lime-soft); font-size: 1rem; }
.memory-texts { flex: 1; min-width: 0; }
.memory-texts strong { display: block; font-size: 0.86rem; line-height: 1.5; overflow-wrap: anywhere; }
.memory-texts small { font-size: 0.72rem; color: var(--muted); }
.memory-stat { font-size: 0.86rem; white-space: nowrap; color: var(--lime); }
.memory-row .btn-small { flex-shrink: 0; }
.btn-small.ghost { background: transparent; }
.icon-btn.small { width: 30px; height: 30px; border-radius: 10px; }
.icon-btn.small .icon { width: 14px; height: 14px; }
.memory-form { display: flex; gap: 8px; margin: 4px 0 14px; }
.memory-form input, .memory-form select {
  min-width: 0; height: 38px; padding: 0 10px; border-radius: 12px; outline: none; font-size: 0.8rem;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.memory-form input:focus, .memory-form select:focus { border-color: var(--lime); }
.memory-form select { flex: 0 0 96px; }
.memory-form select option { background: var(--surface-2); }
.memory-form input { flex: 1; }
.memory-form input[type="number"] { flex: 0 0 64px; }
.memory-form .btn-small { height: 38px; flex-shrink: 0; }

.diet-by-coach { margin-inline-start: 6px; padding: 2px 8px; border-radius: var(--r-full); font-size: 0.66rem; font-weight: 800; color: var(--lime); background: var(--lime-soft); vertical-align: middle; }

.scan-changes { display: grid; gap: 6px; margin: 10px 0 4px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.scan-changes > strong { font-size: 0.86rem; }
.scan-changes p, .scan-changes small { font-size: 0.74rem; color: var(--muted); line-height: 1.6; }
.scan-change { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.scan-change b { white-space: nowrap; color: var(--lime); }
.scan-change s { color: var(--muted); font-weight: 600; }

.steps-manual { display: flex; gap: 6px; flex: 1; min-width: 0; }
.steps-manual input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: var(--r-full); outline: none; font-size: 0.78rem; background: var(--surface-2); border: 1px solid var(--border-strong); }
.steps-manual input:focus { border-color: var(--lime); }
.steps-manual .icon-btn.small { width: 34px; height: 34px; border-radius: 50%; }
.steps-reset { display: block; margin: 8px auto 0; font-size: 0.72rem; color: var(--muted); }
