/* ==============================
   ELIZABETH MULKEY COACHING
   Premium Execution Dashboard
============================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

/* ==============================
   DESIGN TOKENS
============================== */
:root {
  /* Refined off-white — soft, breathable, never harsh */
  --bg:        #F7F5F3;
  --bg2:       #F0EDE9;
  --bg3:       #E8E4DE;
  --bg4:       #DDD8D1;
  --surface:   #FDFCFB;
  --surface2:  #F4F1ED;
  --border:    rgba(60,55,50,0.055);
  --border-mid: rgba(60,55,50,0.09);
  --border-strong: rgba(60,55,50,0.15);

  /* Slate blue — calm, confident, used sparingly as accent only */
  --accent:       #3D5A8A;
  --accent-light: #5272A8;
  --accent-dim:   rgba(61,90,138,0.07);
  --accent-mid:   rgba(61,90,138,0.12);
  --accent-glow:  rgba(61,90,138,0.16);

  /* Champagne gold — warmth, used sparingly */
  --gold:      #A8843E;
  --gold-light: #BF9A55;
  --gold-dim:  rgba(168,132,62,0.08);
  --gold-mid:  rgba(168,132,62,0.14);

  /* Text hierarchy — soft charcoal, never pure black */
  --text:      #1E1C19;
  --text-mid:  #302E2A;
  --text-muted: #80796F;
  --text-sub:  #5C5852;

  /* Card elevation — layered, soft */
  --card-shadow: 0 2px 20px rgba(30,28,25,0.06), 0 1px 6px rgba(30,28,25,0.04);
  --card-shadow-hover: 0 8px 32px rgba(30,28,25,0.10), 0 2px 10px rgba(30,28,25,0.06);

  /* Theme transition */
  --theme-transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;

  /* Unified 8-pt spacing grid — generous whitespace */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Rounded radius system — soft, feminine, premium */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 999px;

  /* Shadow system — layered depth, soft and diffused */
  --shadow-xs: 0 1px 4px rgba(30,28,25,0.04), 0 2px 10px rgba(30,28,25,0.03);
  --shadow-sm: 0 2px 12px rgba(30,28,25,0.06), 0 1px 4px rgba(30,28,25,0.03);
  --shadow-md: 0 6px 24px rgba(30,28,25,0.08), 0 2px 8px rgba(30,28,25,0.04);
  --shadow-lg: 0 16px 48px rgba(30,28,25,0.10), 0 4px 14px rgba(30,28,25,0.06);
  --shadow-accent: 0 4px 20px rgba(61,90,138,0.16), 0 1px 6px rgba(61,90,138,0.10);

  /* Transitions — smooth, fluid, never aggressive */
  --ease-spring: cubic-bezier(0.34, 1.46, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s var(--ease-out);
  --transition-base: 0.26s var(--ease-out);
  --transition-slow: 0.38s var(--ease-out);
}

/* ==============================
   APP SHELL
============================== */
#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Light theme meta-color override */
meta[name="theme-color"] { content: "#F5F3EE"; }

/* ==============================
   DARK MODE TOKEN OVERRIDES
============================== */
[data-theme="dark"] {
  --tab-bar-bg: rgba(18,17,22,0.97);
  /* Deep blue-charcoal — rich, not flat, not cold */
  --bg:        #16151C;
  --bg2:       #1E1D25;
  --bg3:       #26252F;
  --bg4:       #30303C;
  --surface:   #1A1920;
  --surface2:  #222130;
  --border:    rgba(180,175,210,0.065);
  --border-mid: rgba(180,175,210,0.10);
  --border-strong: rgba(180,175,210,0.18);

  /* Slate blue — lifted for dark-mode legibility */
  --accent:       #5272A8;
  --accent-light: #6B8BC4;
  --accent-dim:   rgba(82,114,168,0.10);
  --accent-mid:   rgba(82,114,168,0.17);
  --accent-glow:  rgba(82,114,168,0.24);

  /* Champagne — warm, rich in dark */
  --gold:      #C8A060;
  --gold-light: #D4B070;
  --gold-dim:  rgba(200,160,96,0.10);
  --gold-mid:  rgba(200,160,96,0.18);

  /* Text hierarchy — warm off-white, never pure white */
  --text:      #EDE9E3;
  --text-mid:  #C8C4BC;
  --text-muted: #7A7670;
  --text-sub:  #969088;

  /* Card elevation — warm dark glow */
  --card-shadow: 0 2px 16px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.32);
  --card-shadow-hover: 0 6px 28px rgba(0,0,0,0.58), 0 2px 8px rgba(0,0,0,0.38);

  /* Shadows deeper in dark — blue-tinted for depth */
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.28), 0 2px 10px rgba(10,8,20,0.22);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.36), 0 1px 4px rgba(10,8,20,0.24);
  --shadow-md: 0 5px 24px rgba(0,0,0,0.44), 0 2px 10px rgba(10,8,20,0.28);
  --shadow-lg: 0 14px 44px rgba(0,0,0,0.58), 0 4px 14px rgba(10,8,20,0.36);
  --shadow-accent: 0 4px 22px rgba(82,114,168,0.28), 0 1px 8px rgba(82,114,168,0.14);
}

/* Smooth theme transition on all elements */
[data-theme="dark"] *,
[data-theme="light"] * {
  transition: background-color 0.30s ease, color 0.25s ease, border-color 0.30s ease, box-shadow 0.30s ease !important;
}

/* Global text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.view {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  z-index: 1;
}
.view.active { display: block; }

.scroll-container {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* Ensure content clears the fixed tab bar on all devices */
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

/* ==============================
   BOTTOM TAB BAR
============================== */
.tab-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  min-height: 68px;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  background: var(--tab-bar-bg, rgba(246,245,242,0.96));
  backdrop-filter: blur(56px) saturate(160%);
  -webkit-backdrop-filter: blur(56px) saturate(160%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  z-index: 9999;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: visible;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(128,121,111,0.45);
  font-size: 9px;
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
  padding: 10px 0 8px;
  cursor: pointer;
  transition: color 0.26s ease, opacity 0.26s ease;
  user-select: none;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  position: relative;
}
.tab-item svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  transition: transform 0.26s ease, opacity 0.26s ease;
  opacity: 0.38;
}
.tab-item.active {
  color: var(--accent);
  font-weight: 600;
}
.tab-item.active svg {
  opacity: 1;
  transform: none;
}
.tab-item:active {
  opacity: 0.38;
}
.tab-label {
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ==============================
   BUTTONS
============================== */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px 32px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  min-height: 52px;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-spring), box-shadow 0.22s;
  letter-spacing: 0.3px;
  text-transform: none;
  box-shadow: var(--shadow-accent);
}
.btn-primary:active { transform: scale(0.972); opacity: 0.88; box-shadow: none; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 15px 28px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  min-height: 52px;
  letter-spacing: 0.2px;
  text-transform: none;
  transition: background var(--transition-base), opacity 0.18s;
}
.btn-ghost:active { opacity: 0.68; background: var(--bg2); }
.btn-outline {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 15px 28px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  min-height: 52px;
  letter-spacing: 0.2px;
  text-transform: none;
  transition: opacity 0.18s, border-color var(--transition-base);
}
.btn-outline:active { opacity: 0.65; }
.full-w { width: 100%; }

/* ==============================
   EM DASHBOARD — PREMIUM LIGHT THEME
============================== */

/* HEADER */
.em-header {
  padding: 56px 22px 18px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-mid);
}
.em-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.em-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.em-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.05;
}
.em-brand-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
.em-profile-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.em-profile-btn:active { opacity: 0.6; transform: scale(0.92); }

/* Quick theme toggle in home header */
.em-theme-quick-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mid);
  background: var(--bg2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.18s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.em-theme-quick-btn:active { opacity: 0.6; transform: scale(0.92); }

/* Sun icon shown in light mode, moon in dark mode */
.em-theme-quick-btn .theme-sun-icon  { display: block; }
.em-theme-quick-btn .theme-moon-icon { display: none; }
[data-theme="dark"] .em-theme-quick-btn .theme-sun-icon  { display: none; }
[data-theme="dark"] .em-theme-quick-btn .theme-moon-icon { display: block; }
[data-theme="dark"] .em-theme-quick-btn { color: var(--accent-light); border-color: var(--border-mid); background: var(--bg3); }

/* COACH SIGNAL */
.em-coach-signal {
  margin: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.em-signal-bar {
  display: none;
}
.em-signal-body { flex: 1; }
.em-signal-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.em-signal-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-mid);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* TODAY'S STANDARD CARD */
.em-standard-card {
  margin: 0 20px 18px;
  background: linear-gradient(160deg, #1E1D26 0%, #19181F 100%);
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.18), 0 2px 10px rgba(0,0,0,0.10);
}
.em-standard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.em-standard-eyebrow {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(242,240,234,0.45);
}
.em-standard-day {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.40);
}
.em-standard-workout {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.2px;
  line-height: 1.15;
  margin-bottom: 6px;
}
.em-standard-meta {
  font-size: 12px;
  color: rgba(245,243,238,0.50);
  font-weight: 400;
  margin-bottom: 18px;
  letter-spacing: 0.1px;
}
.em-standard-divider {
  height: 1px;
  background: rgba(245,243,238,0.10);
  margin-bottom: 16px;
}
.em-standard-nutrition {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
}
.em-nutrition-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid rgba(245,243,238,0.10);
  padding-right: 12px;
  margin-right: 12px;
}
.em-nutrition-stat:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}
.em-nutrition-val {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  line-height: 1;
}
.em-nutrition-unit {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.40);
}
.em-start-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(43,61,106,0.35);
  transition: opacity 0.18s, transform 0.15s var(--ease-spring), box-shadow 0.18s;
}
.em-start-btn:active { opacity: 0.85; transform: scale(0.982); box-shadow: 0 2px 8px rgba(43,61,106,0.20); }

/* SECTION LABEL */
.em-section-label {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: block;
  opacity: 0.6;
}

/* EXECUTION STATUS */
.em-execution-section {
  padding: 0 18px 16px;
}
.em-execution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}
.em-exec-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.em-exec-wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.em-exec-left {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}
.em-exec-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}
.em-exec-denom {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 1px;
}
.em-exec-right { flex: 1; min-width: 0; }
.em-exec-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.em-exec-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.em-exec-ring {
  flex-shrink: 0;
  display: block;
  overflow: visible;
}
.em-exec-ring-track {
  fill: none;
  stroke: var(--border-mid);
  stroke-width: 3;
  opacity: 0.35;
}
.em-exec-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 138.2;
  transform: rotate(-90deg);
  transform-origin: 27px 27px;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.em-exec-ring-label {
  font-size: 9px;
  font-weight: 700;
  fill: var(--text-muted);
  text-anchor: middle;
  dominant-baseline: central;
  letter-spacing: 0.3px;
  font-family: 'Inter', sans-serif;
}
.em-exec-stat-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 4px;
}
.em-exec-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.em-exec-status {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.1px;
}

/* ACTIONS */
.em-actions-section {
  padding: 0 18px 16px;
}
.em-actions-list {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.em-action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background var(--transition-fast);
  text-align: left;
}
.em-action-row:last-child { border-bottom: none; }
.em-action-row:active { background: var(--bg2); }
.em-action-icon {
  width: 34px;
  height: 34px;
  background: var(--bg2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.em-action-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05px;
}
.em-action-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* DAILY STANDARDS / HABITS */
.em-habits-section {
  padding: 0 18px 18px;
}
.em-habits-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.em-habit {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 16px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.em-habit.done {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.em-habit:active { transform: scale(0.93); opacity: 0.80; }
.em-habit-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s var(--ease-spring);
  flex-shrink: 0;
}
.em-habit.done .em-habit-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.em-habit-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.em-habit.done .em-habit-name { color: var(--accent); }

/* PROGRAM STRUCTURE */
.em-program-section {
  padding: 0 18px 16px;
}
.em-program-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.em-program-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.em-program-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px;
}
.em-program-key {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}
.em-program-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.1px;
}
.em-program-accent { color: var(--accent); }

/* SEE ALL */
.em-see-all {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  padding: 0;
}
.em-see-all:active { opacity: 0.55; }

/* Score task chips — EM style */
.score-task-chip {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.score-task-chip.done {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.25);
}
.score-task-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* NUDGE BANNER — light theme */
.nudge-banner {
  margin: 0 20px 16px;
  background: rgba(168,132,62,0.06);
  border: 1px solid rgba(168,132,62,0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.58;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 5px;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.nudge-text strong { color: var(--text); font-weight: 700; }

/* HOME WORKOUTS SECTION */
.home-workouts-section {
  padding: 0 0 14px;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 12px;
}

/* ==============================
   HOME — HERO HEADER (legacy, kept for other views)
============================== */
.coach-header {
  position: relative;
  height: 62vw;
  max-height: 340px;
  min-height: 250px;
  overflow: hidden;
  background: var(--bg2);
}

.coach-header-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transform: scale(1.04);
  transition: transform 6s ease-out;
  will-change: transform;
}
.coach-header:hover .coach-header-bg {
  transform: scale(1.08);
}

.coach-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,14,0.10) 0%,
    rgba(9,9,14,0.28) 40%,
    rgba(9,9,14,0.92) 100%
  );
}

.coach-header-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 56px 20px 0;
  z-index: 2;
}

.coach-greeting-block { flex: 1; }

.coach-eyebrow {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: rgba(100,130,185,0.80);
  margin-bottom: 5px;
}
.coach-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.05;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.60);
}
.coach-avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(100,130,185,0.25);
  background: rgba(9,9,14,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition-base), background var(--transition-base), transform 0.15s var(--ease-spring);
}
.coach-avatar-ring:active { opacity: 0.60; transform: scale(0.91); }
.coach-avatar-inner { color: var(--accent-light); }

/* DAILY COACH MESSAGE */
.coach-message-card {
  margin: 0 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}
.coach-msg-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
  animation: msgDotPulse 2.5s ease-in-out infinite;
}
@keyframes msgDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.coach-msg-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-mid);
  font-style: normal;
  letter-spacing: 0.01em;
}

/* ==============================
   HOME — VIBE SELECTOR
============================== */
.vibe-section {
  padding: 0 16px 16px;
}
.vibe-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.vibe-row {
  display: flex;
  gap: 8px;
}
.vibe-btn {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 4px 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-base);
  letter-spacing: 0.1px;
  box-shadow: var(--shadow-xs);
}
.vibe-btn.selected {
  background: var(--accent-dim);
  border-color: rgba(82,114,168,0.40);
  color: var(--accent-light);
  box-shadow: 0 2px 16px rgba(82,114,168,0.13), var(--shadow-xs);
}
.vibe-btn:active { transform: scale(0.93); opacity: 0.85; }
.vibe-icon { line-height: 1; opacity: 0.70; transition: opacity var(--transition-base); }
.vibe-btn.selected .vibe-icon { opacity: 1; }

/* ==============================
   HOME — MAIN CTA
============================== */
.main-cta-block {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.start-workout-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 22px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: opacity 0.18s var(--ease-out), transform 0.2s var(--ease-spring);
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.start-workout-btn:active { transform: scale(0.972); opacity: 0.86; box-shadow: 0 3px 14px rgba(82,114,168,0.20); }
.start-btn-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.20);
}
.start-btn-arrow {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.quick-win-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  transition: border-color 0.2s;
}
.quick-win-btn:active { opacity: 0.7; }
.quick-win-btn svg { color: var(--gold); flex-shrink: 0; }

/* ==============================
   HOME — STATS ROW
============================== */
.stats-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.stat-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 14px;
  text-align: center;
  transition: border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.stat-card.accent-card {
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.20);
}
.stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.6px;
}
.accent-card .stat-number { color: var(--accent-light); }
.stat-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==============================
   HOME — IDENTITY BLOCK
============================== */
.identity-block {
  padding: 0 16px 16px;
}
.identity-inner {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-xs);
}
.identity-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.identity-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.identity-bar-track {
  height: 3px;
  background: var(--bg4);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.identity-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  transition: width 1.2s var(--ease-out);
  box-shadow: 0 0 8px rgba(82,114,168,0.35);
}
.identity-msg {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
}

/* ==============================
   HOME — DAILY HABITS
============================== */
.habits-section {
  padding: 0 16px 16px;
}
.section-label {
  font-size: 8.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.8px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: block;
  opacity: 0.65;
}
.habits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.habit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: 'DM Sans', sans-serif;
  box-shadow: var(--shadow-sm);
}
.habit-item.done {
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.25);
}
.habit-item:active { transform: scale(0.94); opacity: 0.85; }
.habit-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition-base);
  opacity: 0.65;
}
.habit-item.done .habit-icon { color: var(--accent-light); opacity: 1; }
.habit-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  flex: 1;
  letter-spacing: 0.05px;
}
.habit-item.done .habit-name { color: var(--accent-light); font-weight: 600; }
.habit-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.22s var(--ease-spring);
}
.habit-item.done .habit-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(82,114,168,0.38);
}

/* ==============================
   HOME — WORKOUT SCROLL ROW
============================== */
.home-workouts-section {
  padding: 0 0 18px;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 12px;
}
.section-see-all {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.1px;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.section-see-all:active { opacity: 0.5; }
.workout-scroll-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}
.workout-scroll-row::-webkit-scrollbar { display: none; }
.workout-scroll-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s;
  box-shadow: var(--shadow-sm);
}
.workout-scroll-card:active { transform: scale(0.95); box-shadow: var(--shadow-xs); opacity: 0.88; }
/* WSC THUMB — single canonical definition */
.wsc-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;  /* consistent ratio across all scroll cards */
  object-fit: cover;      /* no bars — fills frame */
  background: var(--bg3);
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  transition: transform 0.4s ease;
}
.wsc-body { padding: 10px 11px 12px; }
.wsc-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
  letter-spacing: 0.02px;
}
.wsc-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.05px;
}

/* ==============================
   HOME — JOIN CTA
============================== */
.join-cta-block {
  position: relative;
  margin: 0 20px 36px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-lg);
  transition: transform 0.38s var(--ease-spring), box-shadow 0.38s ease;
}
.join-cta-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 72px rgba(0,0,0,0.65);
}
.join-cta-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transform: scale(1.04);
  transition: transform 0.6s ease;
}
.join-cta-block:hover .join-cta-img {
  transform: scale(1.08);
}
.join-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9,9,14,0.95) 0%, rgba(9,9,14,0.40) 50%, rgba(9,9,14,0.08) 100%);
}
.join-cta-content {
  position: relative;
  z-index: 2;
  padding: 28px 20px;
  width: 100%;
}
.join-cta-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.join-cta-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: #FFFFFF;
  margin-bottom: 8px;
}
.join-cta-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==============================
   WORKOUTS VIEW
============================== */
.view-header {
  padding: 56px 22px 18px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
}
.view-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.view-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.view-header-count {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--text-sub);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.22s ease;
  letter-spacing: 0.3px;
}
.filter-btn:active { transform: scale(0.93); opacity: 0.78; }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 3px 14px var(--accent-glow);
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* VIDEO GRID — responsive: 1-col mobile → 2-col tablet/landscape */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.video-grid.padded { padding: 16px 16px 120px; }

/* ── Premium Video Card — vertical layout ── */
.video-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s ease, border-color 0.22s;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  box-shadow: 0 3px 16px rgba(30,28,25,0.07), 0 1px 4px rgba(30,28,25,0.04);
  position: relative;
}
[data-theme="dark"] .video-card {
  box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.08);
}
.video-card:active {
  transform: scale(0.968);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
[data-theme="dark"] .video-card:active {
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Thumbnail — aspect-ratio locked, no layout shift */
.video-thumb-wrapper {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;  /* locks intrinsic height — prevents layout shift */
  overflow: hidden;       /* clips zoom transform cleanly */
  background: var(--bg3); /* placeholder colour while image loads */
}
.video-thumb {
  width: 100%;
  height: 100%;           /* fills the aspect-ratio-locked wrapper */
  object-fit: cover;      /* fills frame, no letterbox / pillarbox bars */
  display: block;
  border-radius: 0;
  flex-shrink: 0;
  transition: transform 0.45s ease;
}
.video-card:active .video-thumb {
  transform: scale(1.02);
}

/* Dark overlay on thumb for play icon visibility */
.video-thumb-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  pointer-events: none;
  z-index: 1;
  transition: background 0.2s ease;
}
.video-card:hover .video-thumb-wrapper::before {
  background: rgba(0,0,0,0.18);
}
.video-card:active .video-thumb-wrapper::before {
  background: rgba(0,0,0,0.38);
}
/* Gradient overlay on thumb for text legibility */
.video-thumb-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 0;
  z-index: 1;
}

/* Play button — larger, centered */
.play-icon-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(8,8,12,0.70);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(0,0,0,0.55);
  border: 2px solid rgba(255,255,255,0.32);
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3;
}
.video-card:hover .play-icon-overlay {
  transform: translate(-50%, -50%) scale(1.10);
  background: rgba(8,8,12,0.82);
  box-shadow: 0 6px 28px rgba(0,0,0,0.65);
}
.video-card:active .play-icon-overlay {
  transform: translate(-50%, -50%) scale(0.88);
  background: rgba(8,8,12,0.88);
}

/* Card body */
.video-card-body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.video-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.28;
  margin-bottom: 8px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
}
.video-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

/* Meta tags — filled, higher contrast pills */
.meta-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-sub);
  background: var(--bg2);
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.meta-tag.accent {
  color: var(--accent-light);
  background: var(--accent-dim);
  border-color: rgba(82,114,168,0.30);
  font-weight: 700;
}

/* Difficulty pills — vivid, filled */
.meta-tag.diff-easy {
  color: #2E9E2E;
  background: rgba(46,158,46,0.13);
  border-color: rgba(46,158,46,0.28);
  font-weight: 700;
}
[data-theme="dark"] .meta-tag.diff-easy {
  color: #6DBF6D;
  background: rgba(109,191,109,0.15);
  border-color: rgba(109,191,109,0.30);
}
.meta-tag.diff-medium {
  color: #C07A10;
  background: rgba(232,168,58,0.14);
  border-color: rgba(232,168,58,0.30);
  font-weight: 700;
}
[data-theme="dark"] .meta-tag.diff-medium {
  color: #E8A83A;
  background: rgba(232,168,58,0.15);
  border-color: rgba(232,168,58,0.30);
}
.meta-tag.diff-hard {
  color: #C03030;
  background: rgba(224,112,112,0.13);
  border-color: rgba(224,112,112,0.28);
  font-weight: 700;
}
[data-theme="dark"] .meta-tag.diff-hard {
  color: #E07070;
  background: rgba(224,112,112,0.15);
  border-color: rgba(224,112,112,0.30);
}

/* Workout progress bar */
.workout-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.workout-progress-track {
  flex: 1;
  height: 4px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}
.workout-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  transition: width 0.6s ease;
}
.workout-progress-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

/* Card footer — Begin + Mark Complete */
.video-card-footer {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Begin Workout — dominant primary CTA */
.begin-workout-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: transform 0.20s ease, box-shadow 0.20s ease, background 0.20s ease;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 3px 14px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.begin-workout-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px var(--accent-glow);
}
[data-theme="dark"] .begin-workout-btn {
  box-shadow: 0 4px 20px rgba(82,114,168,0.35);
}

/* Mark Complete — secondary, lower visual weight */
.mark-complete-btn {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.18s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.mark-complete-btn:active { transform: scale(0.97); }
.mark-complete-btn.mark-complete-done {
  background: rgba(46,158,46,0.09);
  border-color: rgba(46,158,46,0.30);
  color: #2E9E2E;
  cursor: default;
}
[data-theme="dark"] .mark-complete-btn.mark-complete-done {
  background: rgba(109,191,109,0.10);
  border-color: rgba(109,191,109,0.28);
  color: #6DBF6D;
}

/* Done badge on thumbnail */
.card-done-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: #0C0C0B;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 3;
  text-transform: uppercase;
}

/* Badge — Popular / Recommended */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 3;
  pointer-events: none;
}
.card-badge.badge-popular {
  background: var(--gold);
  color: #0C0C0B;
  box-shadow: 0 2px 8px rgba(184,150,90,0.45);
}
.card-badge.badge-recommended {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Personal Records section */
.pr-section {
  padding: 16px 0 100px;
}
.pr-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 0 14px;
  margin-bottom: 10px;
}
.pr-list {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pr-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 0;
  text-align: center;
}
.pr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-xs);
}
.pr-medal {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.pr-medal-gold   { background: rgba(201,169,110,0.2); color: var(--gold); border: 1px solid rgba(201,169,110,0.4); }
.pr-medal-silver { background: rgba(180,180,180,0.12); color: #B0B0B0; border: 1px solid rgba(180,180,180,0.3); }
.pr-medal-bronze { background: rgba(180,120,80,0.12); color: #C07850; border: 1px solid rgba(180,120,80,0.3); }
.pr-info { flex: 1; min-width: 0; }
.pr-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: capitalize;
}
.pr-top {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-count {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  flex-shrink: 0;
}
.pr-count-label {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
}

/* Locked message */
.locked-msg {
  text-align: center;
  padding: 60px 36px;
}
.lock-circle {
  width: 52px; height: 52px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent-light);
  border: 1px solid rgba(61,90,138,0.16);
}
.locked-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.locked-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}

/* Skeleton */
.skeleton { cursor: default; pointer-events: none; }
.skeleton-thumb {
  width: 88px;
  height: 66px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.skeleton-text {
  height: 10px;
  background: var(--bg3);
  border-radius: 5px;
  animation: shimmer 1.6s infinite;
}
.skeleton-text.short { width: 55%; }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ==============================
   COACH VIEW
============================== */
.coach-view-header {
  position: relative;
  height: 340px;
  overflow: hidden;
}
.coach-view-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transform: scale(1.03);
  transition: transform 6s ease-out;
  will-change: transform;
}
.view.active .coach-view-photo {
  transform: scale(1.0);
}
.coach-view-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,14,0.08) 0%,
    rgba(9,9,14,0.22) 40%,
    rgba(9,9,14,0.85) 100%
  );
}
.coach-view-info {
  position: absolute;
  bottom: 26px;
  left: 22px;
}
.coach-view-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 5px;
}
.coach-view-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: #FFFFFF;
}

/* ── AI COACH CHAT — Premium Redesign ── */
.ai-coach-section {
  padding: 24px 0 0;
}

/* Header */
.chat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
}
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CAF7D;
  box-shadow: 0 0 0 2px rgba(76,175,125,0.20);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(76,175,125,0.20); }
  50% { box-shadow: 0 0 0 5px rgba(76,175,125,0.08); }
}
.chat-header-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.chat-header-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Chat window */
.chat-window {
  min-height: 80px;
  max-height: 320px;
  overflow-y: auto;
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}
.chat-window::-webkit-scrollbar { display: none; }

/* Base bubble */
.chat-bubble {
  max-width: 88%;
  border-radius: 20px;
  font-size: 13.5px;
  line-height: 1.68;
  animation: bubble-in 0.26s cubic-bezier(0.34,1.46,0.64,1) both;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Coach bubble */
.coach-bubble {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  color: var(--text-mid);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
}
.coach-bubble p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
}

/* Coach bubble with card — no extra padding, card handles it */
.coach-bubble-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 96%;
}

/* User bubble */
.user-bubble {
  background: var(--accent);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  font-weight: 500;
  padding: 12px 16px;
  box-shadow: 0 2px 14px rgba(61,90,138,0.20);
}
.user-bubble p { margin: 0; font-size: 13.5px; line-height: 1.65; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
  min-width: 52px;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.18s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── COACH RESPONSE CARD ── */
.coach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
.coach-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.coach-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  flex-shrink: 0;
}
.coach-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--accent);
  text-transform: uppercase;
}
.coach-card-body {
  padding: 4px 0 2px;
}
.coach-card-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.coach-card-item:last-child {
  border-bottom: none;
}
.coach-card-heading {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.coach-card-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-mid);
}

/* Quick reply chips — above input */
.quick-prompts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 16px 12px;
  scrollbar-width: none;
}
.quick-prompts::-webkit-scrollbar { display: none; }
.prompt-chip {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all var(--transition-base);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.prompt-chip:active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(0.94);
}

/* Input row */
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 20px;
  align-items: center;
}
.chat-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 14px;
  padding: 13px 20px;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 0;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,90,138,0.08);
}
.chat-input::placeholder { color: var(--text-muted); }
.chat-send-btn {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.20s, transform 0.18s var(--ease-spring);
  box-shadow: 0 2px 14px rgba(61,90,138,0.22);
}
.chat-send-btn:active { opacity: 0.75; transform: scale(0.90); }

/* COMEBACK BLOCK */
.comeback-block {
  margin: 0 20px 26px;
  background: var(--accent-dim);
  border: 1px solid rgba(61,90,138,0.14);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.comeback-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 5px;
}
.comeback-sub {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* PRINCIPLES */
.principles-section {
  padding: 0 0 36px;
}
.principles-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 18px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.principle-item {
  background: var(--surface);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.principle-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-top: 1px;
  flex-shrink: 0;
}
.principle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.principle-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==============================
   AUTH FORMS
============================== */
.auth-hero {
  position: relative;
  height: 300px;
  overflow: hidden;
}
.auth-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.04);
  transition: transform 6s ease-out;
  will-change: transform;
}
.view.active .auth-hero-img {
  transform: scale(1.0);
}
.auth-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,14,0.10) 0%,
    rgba(9,9,14,0.35) 45%,
    rgba(9,9,14,0.92) 100%
  );
}
.auth-hero-text {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
}
.auth-hero-text h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}
.auth-forms { padding: 28px 20px 52px; }
.auth-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  padding: 15px 18px;
  margin-bottom: 12px;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,90,138,0.09);
}
select { appearance: none; }
textarea { resize: none; }

.auth-link {
  display: block;
  color: var(--accent-light);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
  text-decoration: none;
}
.auth-link.center { text-align: center; margin-top: 12px; }
.auth-switch {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
}
.auth-switch a { color: var(--accent-light); text-decoration: none; font-weight: 600; }
.auth-error { color: #E07070; font-size: 13px; margin-top: 8px; min-height: 18px; line-height: 1.5; }
.auth-success { color: #6DBF6D; font-size: 13px; margin-top: 8px; }
.spam-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}
.otp-msg {
  font-size: 14px;
  color: var(--text-sub);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ==============================
   PROFILE (LOGGED IN)
============================== */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  padding: 56px 22px 28px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-large {
  width: 70px;
  height: 70px;
  background: var(--accent-dim);
  border-radius: 50%;
  border: 1.5px solid rgba(82,114,168,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
  box-shadow: 0 0 32px rgba(82,114,168,0.14), var(--shadow-md);
}
.profile-email-text { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.05px; }
.profile-badge-pill {
  display: inline-block;
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: var(--accent-light);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(61,90,138,0.15);
}
.profile-section { padding: 22px 20px 0; }
.profile-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.sub-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sub-status-loading { color: var(--text-muted); font-size: 14px; }
.sub-active { color: #6DBF6D; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; display: inline-block; padding: 3px 10px; background: rgba(109,191,109,0.12); border-radius: 20px; }
.sub-past-due { color: #E8A838; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; display: inline-block; padding: 3px 10px; background: rgba(232,168,56,0.12); border-radius: 20px; }
.sub-inactive { color: var(--text-sub); font-size: 14px; }
.sub-plan-name { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 6px; }
.sub-plan-price { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sub-renew-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.sub-status-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sub-manage-btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.sub-manage-btn { font-size: 12px; padding: 8px 14px; white-space: nowrap; }
.sub-past-due-notice { font-size: 12px; color: #E8A838; background: rgba(232,168,56,0.08); border: 1px solid rgba(232,168,56,0.2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 12px; line-height: 1.5; }
.quick-links { display: flex; flex-direction: column; gap: 6px; }
.quick-link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 17px 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-base), border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}
.quick-link-btn svg { color: var(--accent-light); flex-shrink: 0; opacity: 0.9; }
.quick-link-btn:active { background: var(--bg3); border-color: var(--border-mid); opacity: 0.8; }
.logout-btn { margin: 28px 20px 16px; width: calc(100% - 40px); }

/* ==============================
   ADMIN PANEL
============================== */
.admin-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 0 16px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.admin-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-light);
  margin-bottom: 18px;
}
.input-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.file-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.file-btn {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.file-name { font-size: 12px; color: var(--text-muted); word-break: break-all; }
.upload-progress {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
}
.progress-text { font-size: 13px; color: var(--text-sub); }
.loading-text { color: var(--text-muted); font-size: 13px; }

.admin-video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.admin-video-item:last-child { border-bottom: none; }
.admin-video-info { flex: 1; margin-right: 10px; }
.admin-video-name { font-size: 13px; font-weight: 600; color: var(--text); }
.admin-video-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.admin-delete-btn {
  background: rgba(224,112,112,0.1);
  color: #E07070;
  border: none;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.admin-delete-btn:active { opacity: 0.7; }

.sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sub-row:last-child { border-bottom: none; }
.sub-email { color: var(--text); font-weight: 500; }
.sub-date { color: var(--text-muted); font-size: 11px; }
.sub-plan { color: var(--gold); font-size: 11px; font-weight: 700; }

/* ==============================
   MODALS
============================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.open { display: flex; animation: overlayFadeIn 0.22s var(--ease-out) both; }
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: 32px 32px 0 0;
  padding: 10px 24px 60px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 -24px 80px rgba(30,28,25,0.22), 0 -1px 0 rgba(255,255,255,0.06) inset;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: sheetSlideUp 0.36s var(--ease-out) both;
}
@keyframes sheetSlideUp {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 36px;
  height: 4px;
  background: rgba(26,26,26,0.12);
  border-radius: 4px;
  margin: 0 auto 24px;
}

/* ==============================
   VIDEO MODAL — Premium Redesign
============================== */
.video-modal-content {
  background: var(--bg);
  width: 100%;
  max-width: 480px;
  /* Full height minus safe areas so content is always reachable */
  height: calc(100dvh - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px));
  border-radius: 32px 32px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -24px 80px rgba(0,0,0,0.85), 0 -4px 24px rgba(0,0,0,0.5);
  scrollbar-width: none;
  position: relative;
}
.video-modal-content::-webkit-scrollbar { display: none; }

/* Close button — floats over hero */
.vmc-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(12,12,11,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
}
.vmc-close-btn:active { transform: scale(0.9); opacity: 0.7; }

/* Keep old close btn for other modals */
.modal-close-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.modal-close-btn:active { transform: scale(0.9); opacity: 0.8; }
.modal-close-btn.top-right {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* Hero */
#modalVideo {
  width: 100%;
  background: #000;
  display: block;
  max-height: 300px;
}
.modal-builtin-thumb {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
.video-modal-hero {
  position: relative;
  border-radius: 32px 32px 0 0;
  overflow: hidden;
}
.video-modal-hero-gradient {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to top, var(--bg) 15%, rgba(12,12,11,0.6) 60%, transparent 100%);
  pointer-events: none;
}

/* Header section */
.video-modal-header {
  padding: 8px 24px 20px;
}
.vmh-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.vmh-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.vmh-pill-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}
.vmh-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.7px;
}

/* Workout Breakdown — Premium List */
.workout-breakdown {
  padding: 0 20px;
  margin-bottom: 8px;
}

/* ── FORMAT BLOCK: clean 3-row structured card ── */
.wbd-structure {
  background: var(--surface);
  border-radius: 20px;
  padding: 0;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wbd-structure-row {
  display: flex;
  align-items: flex-start;
  padding: 16px 18px;
  gap: 0;
}
.wbd-structure-row + .wbd-structure-row {
  border-top: 1px solid var(--border);
}
.wbd-structure-row--work {
  align-items: flex-start;
}
.wbd-structure-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding-top: 4px;
  flex-shrink: 0;
  width: 58px;
  min-width: 58px;
}
.wbd-structure-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  line-height: 1.45;
  flex: 1;
}
/* Accent number — gold, slightly bolder */
.wbd-num {
  font-style: normal;
  font-weight: 800;
  color: var(--gold);
  font-size: 16px;
  letter-spacing: -0.4px;
}
/* Work row: stacked duration + pill list */
.wbd-structure-value--work {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.wbd-work-dur {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
/* Exercise pills — clean minimal tags */
.wbd-ex-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
}
.wbd-ex-pill {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  letter-spacing: 0.1px;
  line-height: 1.3;
}

/* ── EXERCISES SECTION ── */
.wbd-section-heading {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-top: 4px;
  padding: 0 2px;
}

/* Exercise list — clean rows, no cards */
.wbd-exercise-list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.wbd-exercise-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.wbd-exercise-row:last-child {
  border-bottom: none;
}
/* Number column */
.wbd-exercise-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 26px;
  min-width: 26px;
  flex-shrink: 0;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
/* Name column — primary focus */
.wbd-exercise-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  line-height: 1.35;
  letter-spacing: -0.1px;
}
.wbd-exercise-name-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wbd-exercise-note {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
  letter-spacing: 0;
}
/* Detail column — reps/sets, right-aligned */
.wbd-exercise-detail {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  flex-shrink: 0;
  letter-spacing: 0.1px;
  font-variant-numeric: tabular-nums;
  margin-left: 12px;
}

/* Coach tip row */
.wbd-coach-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 20px;
  padding: 14px 17px;
  background: rgba(61,90,138,0.04);
  border-radius: 16px;
  border: 1px solid rgba(61,90,138,0.10);
}
.wbd-coach-tip-icon {
  color: var(--accent-light);
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 1px;
}
.wbd-coach-tip-text {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

.wbd-plain {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  padding: 0 2px;
}

/* CTA */
.video-modal-cta {
  padding: 20px 24px 0;
}
.video-modal-complete-btn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius-lg);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.22s, transform 0.20s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(61,90,138,0.26);
}
.video-modal-complete-btn:active { transform: scale(0.98); opacity: 0.9; }
.video-modal-complete-btn.done {
  background: rgba(109,191,109,0.12);
  border: 1px solid rgba(109,191,109,0.25);
  color: #6DBF6D;
  cursor: default;
}

/* Legacy selectors kept for safety */
.video-modal-divider { display: none; }
.video-modal-actions { display: none; }
.video-modal-share-btn { display: none; }
.video-meta-row { display: none; }
.video-modal-info { display: none; }

/* ==============================
   PREMIUM WORKOUT EXPERIENCE
============================== */

/* Screen switcher */
.wm-screen {
  width: 100%;
}

/* Hero progress bar (thin strip at bottom of hero) */
.wm-hero-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 5;
}
.wm-hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 0 2px 2px 0;
  transition: width 0.5s var(--ease-out);
}

/* Workout header */
.wm-header {
  padding: 12px 20px 20px;
}
.wm-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.wm-exercise-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.wm-coach-cue {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.55;
  margin-top: 8px;
  font-style: italic;
  letter-spacing: 0.1px;
}

/* CTA row: Begin + Mark Complete stacked */
.wm-cta-row {
  padding: 16px 24px calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wm-start-btn {
  width: 100%;
  padding: 17px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  color: #0A0A0F;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 4px 24px rgba(201,169,110,0.30);
  transition: transform 0.15s var(--ease-spring), opacity 0.15s;
}
.wm-start-btn:active { transform: scale(0.97); opacity: 0.88; }

/* ── ACTIVE WORKOUT SCREEN ── */
.wm-active-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 16px;
  padding-top: max(18px, env(safe-area-inset-top, 18px));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.wm-back-btn, .wm-close-x {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.wm-back-btn:active, .wm-close-x:active { transform: scale(0.9); }
.wm-active-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}
.wm-active-progress-track {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.wm-active-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}
.wm-active-counter-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-align: center;
}

/* Exercise stage — the big focused card */
.wm-exercise-stage {
  padding: 20px 16px 12px;
  min-height: 260px;
}
.wm-ex-card {
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: wmSlideIn 0.36s var(--ease-out);
}
@keyframes wmSlideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Exercise play button — full-bleed background image with centered play icon */
.wm-ex-play-btn {
  position: relative;
  width: 100%;
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
  border: none;
  padding: 0;
  transition: filter 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.wm-ex-play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.30);
  transition: background 0.2s ease;
  z-index: 1;
}
.wm-ex-play-btn:hover::before {
  background: rgba(0,0,0,0.20);
}
.wm-ex-play-btn:active::before {
  background: rgba(0,0,0,0.42);
}
.wm-ex-play-btn:hover {
  filter: brightness(1.08);
}
.wm-ex-play-btn:active {
  transform: scale(0.985);
}
.wm-ex-play-icon {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  background: rgba(8,8,12,0.72);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 24px rgba(0,0,0,0.60);
  border: 2px solid rgba(255,255,255,0.32);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}
.wm-ex-play-btn:hover .wm-ex-play-icon {
  transform: scale(1.10);
  background: rgba(8,8,12,0.85);
  box-shadow: 0 6px 32px rgba(0,0,0,0.70);
}
.wm-ex-play-btn:active .wm-ex-play-icon {
  transform: scale(0.88);
}

/* Legacy thumb — hidden, replaced by play button */
.wm-ex-thumb {
  display: none;
}
.wm-ex-body {
  padding: 20px 20px 18px;
}
.wm-ex-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 7px;
  opacity: 0.85;
}
.wm-ex-name {
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.5px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 16px;
}
.wm-ex-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.wm-ex-stat {
  flex: 1;
  background: var(--bg3);
  border-radius: 10px;
  padding: 11px 10px;
  border: 1px solid var(--border);
  text-align: center;
}
.wm-ex-stat-val {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}
.wm-ex-stat-label {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.wm-ex-cue {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.68;
  font-style: italic;
  padding: 12px 15px;
  background: rgba(61,90,138,0.04);
  border-radius: 12px;
  border-left: 2px solid rgba(61,90,138,0.20);
}

/* ── WORKOUT OVERVIEW: section label spacing ── */
.wm-header .vmh-title,
.vmh-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 4px;
}
.wm-coach-cue {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.55;
  margin-top: 6px;
  font-style: italic;
  letter-spacing: 0.1px;
}

/* Set dots — visual set tracker */
.wm-set-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.wm-set-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1.5px solid var(--border-mid);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-spring);
}
.wm-set-dot.done {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}
.wm-set-dot.active {
  background: transparent;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,169,110,0.25);
}

/* Set actions bar */
.wm-set-actions {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── PAUSE / EXIT WORKOUT BUTTON ── */
.wm-pause-exit-row {
  padding: 0 20px 32px;
  display: flex;
  gap: 10px;
}
.wm-pause-btn, .wm-exit-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s var(--ease-spring), opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  border: none;
}
.wm-pause-btn {
  background: var(--bg3);
  color: var(--text-sub);
  border: 1px solid var(--border-mid);
}
.wm-exit-btn {
  background: rgba(220, 80, 80, 0.10);
  color: rgba(220, 100, 100, 0.90);
  border: 1px solid rgba(220, 80, 80, 0.20);
}
.wm-pause-btn:active, .wm-exit-btn:active { transform: scale(0.96); opacity: 0.8; }
.wm-set-inputs {
  display: flex;
  gap: 10px;
}
.wm-set-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wm-set-input-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wm-set-input {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  padding: 10px 14px;
  width: 100%;
  text-align: center;
  transition: border-color 0.15s;
}
.wm-set-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}
.wm-complete-set-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(61,90,138,0.24);
  transition: transform 0.20s var(--ease-spring), opacity 0.20s;
}
.wm-complete-set-btn:active { transform: scale(0.97); opacity: 0.88; }
.wm-complete-set-btn.last-set {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0A0A0F;
  box-shadow: 0 4px 18px rgba(201,169,110,0.28);
}

/* ── REST TIMER OVERLAY ── */
.wm-rest-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
  animation: wmFadeIn 0.25s ease;
  padding: 40px 24px;
}
@keyframes wmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.wm-rest-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.wm-rest-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wm-rest-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.wm-rest-ring-bg {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 8;
}
.wm-rest-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.wm-rest-seconds {
  font-size: 44px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -2px;
  position: relative;
  z-index: 1;
}
.wm-rest-sub {
  font-size: 14px;
  color: var(--text-sub);
  font-style: italic;
  text-align: center;
}
.wm-skip-rest-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 20px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, transform 0.15s;
  margin-top: 4px;
}
.wm-skip-rest-btn:active { transform: scale(0.95); }

/* ── COMPLETION SCREEN ── */
.wm-complete-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 28px 48px;
  gap: 8px;
  text-align: center;
}
.wm-complete-ring {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.wm-complete-check-ring {
  animation: wmRingDraw 0.8s var(--ease-out) forwards;
}
@keyframes wmRingDraw {
  from { stroke-dashoffset: 213; }
  to   { stroke-dashoffset: 0; }
}
.wm-complete-check {
  position: absolute;
  width: 28px;
  height: 28px;
  animation: wmCheckPop 0.4s 0.6s var(--ease-spring) both;
}
@keyframes wmCheckPop {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
.wm-complete-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.wm-complete-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 4px;
}
.wm-complete-sub {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 20px;
}
.wm-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 28px;
}
.wm-summary-stat {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.wm-summary-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.5px;
}
.wm-summary-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}
.wm-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.wm-done-btn {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  color: #0A0A0F;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(201,169,110,0.28);
  transition: transform 0.15s var(--ease-spring), opacity 0.15s;
}
.wm-done-btn:active { transform: scale(0.97); opacity: 0.88; }
.wm-again-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, transform 0.15s;
}
.wm-again-btn:active { transform: scale(0.97); background: var(--bg2); }

/* ── STREAK BANNER on completion screen ── */
.wm-complete-streak-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 40px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.2px;
  animation: wmFadeIn 0.5s 0.9s ease both;
  margin-bottom: 4px;
}
.wm-streak-fire-icon {
  display: flex;
  align-items: center;
}

/* ── PERSONAL BEST badges ── */
.wm-complete-pb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
  animation: wmFadeIn 0.5s 1.1s ease both;
}
.wm-pb-badge {
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ── Progress bar pulse on set complete ── */
@keyframes wmProgressPulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,169,110,0.5); }
  50%  { box-shadow: 0 0 0 4px rgba(201,169,110,0.15); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,110,0); }
}
.wm-progress-pulse {
  animation: wmProgressPulse 0.6s ease;
}

/* ── STREAK CONTEXT LINE in workout overview ── */
.wm-streak-context {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  margin: 0 20px 4px;
  letter-spacing: 0.1px;
  animation: wmFadeIn 0.4s ease;
}
.wm-streak-context--active {
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.2);
  color: var(--gold);
}
.wm-streak-context--done {
  background: rgba(109,191,109,0.08);
  border: 1px solid rgba(109,191,109,0.2);
  color: #6DBF6D;
}
.wm-streak-context--neutral {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-sub);
}

/* Nudge message during workout */
.wm-nudge {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.2px;
  padding: 0 20px 8px;
  animation: wmFadeIn 0.4s ease;
}

/* Active workout: position relative so rest overlay can cover it */
#wm-active {
  position: relative;
}

/* Subscribe Modal */
.subscribe-modal {
  padding-top: 12px;
}
.subscribe-modal h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.subscribe-modal > p,
.subscribe-modal .sub-intro {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 22px;
  line-height: 1.65;
}

/* Stripe Checkout UI */
.sub-modal-header { margin-bottom: 18px; }
.sub-modal-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.sub-intro { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.sub-secure-note { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.sub-checkout-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 0; }
.sub-spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent-light); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sub-plan-confirm { background: var(--accent-dim); border: 1px solid rgba(61,90,138,0.22); border-radius: var(--radius-lg); padding: 20px; margin-top: 18px; }
.sub-plan-confirm-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16px; font-weight: 700; color: var(--accent-light); margin-bottom: 4px; }
.sub-plan-confirm-price { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.sub-plan-confirm-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.sub-success-screen { text-align: center; padding: 24px 0; }
.sub-success-icon { width: 60px; height: 60px; background: rgba(109,191,109,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #6DBF6D; margin: 0 auto 16px; }
.tier-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-light); background: rgba(82,114,168,0.15); border-radius: 10px; padding: 2px 8px; margin-bottom: 6px; }

/* Admin subscription analytics */
.admin-stat-row { display: flex; gap: 10px; margin-bottom: 16px; }
.admin-stat { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; }
.admin-stat-num { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--text); }
.admin-stat-warn { color: #E8A838; }
.admin-stat-muted { color: var(--text-muted); }
.admin-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sub-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 12px; flex-shrink: 0; }
.sub-badge-active { color: #6DBF6D; background: rgba(109,191,109,0.12); }
.sub-badge-due { color: #E8A838; background: rgba(232,168,56,0.12); }
.sub-badge-canceled { color: var(--text-muted); background: var(--bg3); }

/* Tier cards */
.tier-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 22px;
}
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.26s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.tier-card.featured {
  background: var(--accent-dim);
  border-color: rgba(82,114,168,0.35);
}
.tier-card:active { transform: scale(0.99); }
.tier-left { flex: 1; }
.tier-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.tier-card.featured .tier-name { color: var(--accent-light); }
.tier-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.tier-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.tier-card.featured .tier-price { color: var(--accent-light); }
.tier-price-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.sub-modal-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 44px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 18px;
}
.sub-modal-price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }

/* QUICK WIN MODAL */
.qw-header {
  margin-bottom: 20px;
}
.qw-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.qw-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.4px;
}
/* Format block inside quick win — reuse wbd-structure visual */
.qw-format {
  background: var(--bg2);
  border-radius: 14px;
  border: 1px solid var(--border-mid);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.qw-format-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  gap: 0;
}
.qw-format-row + .qw-format-row {
  border-top: 1px solid var(--border);
}
.qw-format-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  width: 54px;
  min-width: 54px;
  flex-shrink: 0;
}
.qw-format-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}
.qw-format-num {
  font-weight: 800;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: -0.3px;
}
/* Exercise list heading */
.qw-section-heading {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 14px 0 0;
  margin-bottom: 0;
}
.qw-list {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border-radius: 14px;
  border: 1px solid var(--border-mid);
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.qw-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}
.qw-item:last-child { border-bottom: none; }
.qw-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 26px;
  min-width: 26px;
  flex-shrink: 0;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.qw-move {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.1px;
  line-height: 1.35;
}
.qw-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  flex-shrink: 0;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1px;
}

/* Plan perks */
.plan-perks {
  list-style: none;
  margin-bottom: 22px;
}
.plan-perks li {
  font-size: 14px;
  color: var(--text-sub);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  padding-left: 18px;
  position: relative;
}
.plan-perks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* ==============================
   SEO LINK
============================== */
.seo-link {
  text-align: center;
  padding: 20px 0 32px;
  opacity: 0.2;
  font-size: 11px;
}
.seo-link a { color: var(--text-sub); text-decoration: none; }

/* ==============================
   DESKTOP
============================== */
@media (min-width: 480px) {
  .tab-bar {
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (min-width: 1024px) {
  #app {
    box-shadow: 0 0 100px rgba(0,0,0,0.5);
  }
}

/* ==============================
   NUTRITION VIEW — PREMIUM IFBB PRO
============================== */

/* ── PREMIUM HEADER ── */
.nt-pro-header {
  position: relative;
  margin: 0 16px 0;
  background: transparent;
  border: none;
  padding: 22px 0 10px;
  overflow: visible;
}
.nt-pro-header::before { display: none; }
.nt-pro-greeting {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  line-height: 1.15;
}
.nt-pro-tagline {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0 0 14px;
  letter-spacing: 0.1px;
  font-weight: 400;
}
.nt-pro-streak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 20px;
  padding: 4px 10px 4px 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.nt-pro-streak svg { flex-shrink: 0; }
#ntStreakText { color: var(--gold); }
.nt-pro-streak-sub { display: none; }

/* ── OVERVIEW CARD (Ring + Macro Bars) ── */
.nt-overview-card {
  margin: 10px 20px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-md);
}
.nt-overview-left {
  flex-shrink: 0;
}
.nt-overview-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nt-pro-macro-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nt-pro-macro-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.nt-pro-macro-name {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-muted);
}
.nt-pro-macro-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}
.nt-pro-macro-goal {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}
.nt-pro-macro-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.nt-pro-macro-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.nt-pro-protein { background: linear-gradient(90deg, #C9748A, #E8A0B0); }
.nt-pro-carbs   { background: linear-gradient(90deg, #C9A96E, #DFC08A); }
.nt-pro-fats    { background: linear-gradient(90deg, #7B9ED4, #A8C0E8); }

/* ── STATS ROW ── */
.nt-stats-row {
  margin: 0 16px 14px;
  display: flex;
  gap: 10px;
}
.nt-stat-chip {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.nt-stat-chip--accent {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
}
.nt-stat-chip--accent .nt-stat-chip-num { color: var(--gold); }
.nt-stat-chip svg { display: none; }
.nt-stat-chip-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
}
.nt-stat-chip-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--text-muted);
}

/* ── QUICK ACTIONS ── */
.nt-quick-actions {
  margin: 0 16px 14px;
  display: flex;
  gap: 10px;
}
.nt-qa-btn {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.20s, background 0.20s;
  box-shadow: var(--shadow-sm);
}
.nt-qa-btn:active { transform: scale(0.96); background: var(--bg3); }
.nt-qa-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-color: transparent;
}
.nt-qa-primary .nt-qa-icon { color: #1a1200; }
.nt-qa-primary .nt-qa-label { color: #1a1200; font-weight: 700; }
.nt-qa-icon {
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nt-qa-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── SCAN FOOD BUTTON ── */
.nt-qa-scan {
  border-color: rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.08);
}
.nt-qa-scan .nt-qa-icon { color: var(--gold); }
.nt-qa-scan .nt-qa-label { color: var(--gold); }
.nt-qa-scan:active { background: rgba(212,175,55,0.18); }

/* ── FOOD SCANNER MODAL ── */
.food-scanner-modal { padding-bottom: 16px; }
.food-scanner-hint {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  margin: -8px 0 14px;
}
.food-scanner-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}
.food-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.food-scanner-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scanner-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
}
.scanner-corner.tl { top: 20%; left: 10%; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.scanner-corner.tr { top: 20%; right: 10%; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.scanner-corner.bl { bottom: 20%; left: 10%; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.scanner-corner.br { bottom: 20%; right: 10%; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }
.scanner-laser {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  top: 20%;
  animation: laserScan 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--gold);
}
@keyframes laserScan {
  0%   { top: 22%; opacity: 1; }
  50%  { top: 76%; opacity: 1; }
  100% { top: 22%; opacity: 1; }
}
.food-scanner-status {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.food-scan-result {
  background: var(--bg2);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.food-scan-result-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.food-scan-result-brand {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.food-scan-result-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.food-scan-macro-chip {
  background: var(--bg3);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}
.food-scan-macro-val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}
.food-scan-macro-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── COACH TIP BANNER ── */
.nt-coach-banner {
  margin: 0 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 16px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-xs);
}
.nt-coach-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 4px;
}
.nt-coach-banner-tip {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.55;
  font-style: italic;
}

/* legacy motive classes hidden */
.nt-motive-banner { display: none; }
.nt-motive-text {}
.nt-motive-headline {}
.nt-motive-sub {}
.nt-motive-banner .nt-log-fab {}

/* ── SECTION LABEL ── */
.nt-section-label-text {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding: 0 16px;
}

/* ── DUAL ROW (Hydration + Weekly) ── */
.nt-dual-row {
  margin: 0 16px 14px;
  display: flex;
  gap: 10px;
}
.nt-dual-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.nt-dual-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 0;
}
.nt-dual-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.nt-dual-card .nt-water-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.nt-dual-card .nt-water-drops {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.nt-dual-card .water-glass {
  flex: 1;
  min-width: 10px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-mid);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.nt-dual-card .water-glass.filled {
  background: #2E6A90;
  border-color: #4A90B8;
}

/* ── MACRO SPLIT CARD ── */
.nt-split-card {
  margin: 0 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}
.nt-split-label {
  display: none;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.nt-split-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.nt-split-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.nt-split-bar-wrap {
  width: 100%;
  height: 70px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.nt-split-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.8s cubic-bezier(0.4,0,0.2,1);
  min-height: 4px;
}
.nt-split-protein { background: linear-gradient(180deg, #E8A0B0, #C9748A); }
.nt-split-carbs   { background: linear-gradient(180deg, #DFC08A, #C9A96E); }
.nt-split-fats    { background: linear-gradient(180deg, #A8C0E8, #7B9ED4); }
.nt-split-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-top: 5px;
}
.nt-split-name {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.nt-split-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
}

/* ── REMAINING CARD ── */
.nt-remaining-card {
  margin: 0 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.nt-remaining-left {}
.nt-remaining-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.nt-remaining-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin: 0;
  line-height: 1;
}
.nt-remaining-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 3px 0 0;
}
.nt-remaining-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.nt-remaining-btn:active { background: var(--bg4); }
/* legacy perf classes */
.nt-perf-card { display: none; }
.nt-perf-left {}
.nt-perf-label {}
.nt-perf-num {}
.nt-perf-right {}
.nt-perf-msg {}
.nt-perf-btn {}
.nt-perf-btn:active {}

.nutrition-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 10px;
}

/* HERO HEADER */
.nt-hero {
  padding: 30px 20px 14px;
}
.nt-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.nt-hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.7px;
  line-height: 1.04;
  margin: 0 0 5px;
}
.nt-hero-sub {
  font-size: 12.5px;
  color: var(--accent-light);
  letter-spacing: 0.15px;
  margin: 0;
  font-style: italic;
  opacity: 0.80;
}
.nt-goals-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s;
}

/* GOALS EDITOR WRAP */
.nt-goals-editor-wrap {
  margin: 0 18px 16px;
}
.nt-goals-editor {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

/* SECTION HEADERS */
.nt-section-header {
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nt-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* MEALS HEADER */
.nt-meals-header {
  margin: 0 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nt-meals-add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.nt-meals-add-btn:active { background: rgba(201,169,110,0.2); }

/* CALORIE RING CARD — now lives inside nt-overview-card */
.nt-ring-card { display: none; } /* legacy wrapper hidden */
.nt-ring-outer {
  position: relative;
  width: 116px;
  height: 116px;
  flex-shrink: 0;
}
.nt-ring-svg {
  width: 116px;
  height: 116px;
  transform: rotate(-90deg);
}
.nt-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 10;
}
.nt-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1), stroke 0.3s;
  filter: drop-shadow(0 0 6px rgba(201,169,110,0.4));
}
.nt-ring-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1;
}
.nt-ring-number {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
  letter-spacing: -0.5px;
}
.nt-ring-unit {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 3px;
  line-height: 1.3;
}
.nt-ring-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.nt-log-fab {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1a1200;
  border: none;
  border-radius: 50px;
  padding: 11px 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(201,169,110,0.30);
  white-space: nowrap;
}
.nt-log-fab:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* MACROS CARD */
.nt-macros-card {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
}
.nt-macro-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.nt-macro-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nt-macro-header {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.nt-macro-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
}
.nt-macro-goal {
  font-size: 10px;
  color: var(--text-muted);
}
.nt-macro-name {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.nt-macro-bar {
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}
.nt-macro-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.nt-protein { background: var(--accent-light); }
.nt-carbs   { background: #7EB8A4; }
.nt-fats    { background: #C47B5A; }
.nt-macro-divider {
  width: 1px;
  background: var(--border);
  margin: 0 16px;
  align-self: stretch;
}

/* MEALS WRAP */
.nt-meals-wrap {
  margin: 0 16px 14px;
}

/* EMPTY STATE */
.nt-empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.nt-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.nt-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.nt-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}
.nt-empty-cta {
  margin-top: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 20px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.nt-empty-cta:active { background: rgba(201,169,110,0.2); }

/* WEEKLY CARD */
.nt-weekly-card {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px 14px;
  box-shadow: var(--shadow-sm);
}

/* WATER CARD */
.nt-water-card {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
}
.nt-water-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.nt-water-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.nt-water-drops {
  display: flex;
  gap: 7px;
}

/* EAT THIS NOW */
.nt-eat-now-card {
  margin: 0 18px 10px;
  background: rgba(126,184,247,0.06);
  border: 1px solid rgba(126,184,247,0.2);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.nt-eat-now-card:active { background: rgba(126,184,247,0.1); }
.nt-eat-now-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7EB8F7;
  margin-bottom: 8px;
}
.nt-eat-now-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
  padding-right: 24px;
}
.nt-eat-now-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #7EB8F7;
  opacity: 0.7;
}

/* COACH CARD */
.nt-coach-card {
  margin: 0 20px 12px;
  background: linear-gradient(135deg, rgba(61,90,138,0.06) 0%, rgba(61,90,138,0.02) 100%);
  border: 1px solid rgba(61,90,138,0.14);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}
.nt-coach-from {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 10px;
  opacity: 0.85;
}
.nt-coach-tip {
  font-size: 15px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Keep old ring/calorie selectors for JS compat */
.cal-ring-svg { display: none; }
.nutrition-cal-ring-wrap { display: none; }
.nutrition-cal-info { display: none; }
.nutrition-cal-goal { display: none; }
.nutrition-cal-remaining { display: none; }
.nutrition-cal-number { display: none; }
.cal-ring-unit { display: none; }

/* GOALS SETTINGS CARD (legacy, now hidden) */
.nutrition-goals-card {
  margin: 0 18px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.nutrition-goals-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.nutrition-goals-edit-btn { font-size: 12px; color: var(--gold); font-weight: 600; }
.nutrition-goals-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nutrition-goal-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--bg3); color: var(--text-muted); }
.nutrition-goal-chip.protein-chip { color: #7EB8F7; }
.nutrition-goal-chip.carbs-chip   { color: #7ED9A0; }
.nutrition-goal-chip.fats-chip    { color: #D4A0D4; }
.nutrition-goals-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* WEEKLY CALORIE CHART (legacy wrapper) */
.nutrition-weekly-card {
  margin: 0 18px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.nutrition-weekly-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 72px;
  margin-top: 12px;
  position: relative;
}
.weekly-bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.weekly-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  min-height: 3px;
}
.weekly-bar-goal-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}
.nutrition-weekly-labels {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.weekly-bar-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
}
.weekly-bar-label.today {
  color: var(--gold);
  font-weight: 700;
}

/* WATER REMINDER */
.water-reminder {
  font-size: 12px;
  color: #7EB8F7;
  background: rgba(126,184,247,0.1);
  border-radius: 8px;
  padding: 7px 12px;
  margin-top: 8px;
  text-align: center;
}

.nutrition-calories-card {
  margin: 0 18px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.nutrition-cal-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.nutrition-cal-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.nutrition-cal-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
}
.nutrition-cal-unit {
  font-size: 12px;
  color: var(--text-muted);
}
.nutrition-log-btn {
  padding: 10px 16px;
  font-size: 12px;
}
.nutrition-macro-row {
  display: flex;
  gap: 12px;
}
.nutrition-macro-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nutrition-macro-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.nutrition-macro-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.nutrition-macro-bar {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.nutrition-macro-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.protein-fill { background: var(--gold); }
.carbs-fill   { background: #7EB8A4; }
.fats-fill    { background: #C47B5A; }

/* WATER */
.nutrition-water-card {
  margin: 0 18px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.nutrition-water-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.nutrition-water-count {
  font-size: 12px;
  color: var(--text-muted);
}
.nutrition-water-glasses {
  display: flex;
  gap: 8px;
}
.water-glass {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.1s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.water-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s;
}
.water-glass.filled {
  background: #3A7FA8;
  border-color: #4A90B8;
  box-shadow: 0 2px 12px rgba(74,144,184,0.35);
}
.water-glass.filled::after {
  opacity: 1;
}
.water-glass:active {
  transform: scale(0.92);
}

/* MEALS */
.nutrition-meals-section {
  margin: 0 18px 16px;
}
.nutrition-meals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nutrition-empty-msg {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}
.meal-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.22s;
  box-shadow: var(--shadow-sm);
}
.meal-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.meal-type-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.meal-item-macros {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}
.meal-item-cals {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.meal-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 0 0 10px;
  line-height: 1;
}

/* PROTEIN PASS/FAIL BADGE */
.meal-protein-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}
.meal-protein-badge.pass {
  background: rgba(126,217,160,0.18);
  color: #7ED9A0;
}
.meal-protein-badge.low {
  background: rgba(224,112,112,0.15);
  color: #E07070;
}

/* MACRO RING CHART */
.macro-ring-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0 4px;
}
.macro-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.macro-ring-svg {
  width: 80px;
  height: 80px;
}
.macro-ring-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
.macro-ring-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.macro-ring-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
}
.macro-ring-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* EAT THIS NOW CARD */
.nutrition-eat-now-card {
  margin: 0 18px 14px;
  background: rgba(126,184,247,0.08);
  border: 1px solid rgba(126,184,247,0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

/* SEMAGLUTIDE NUDGE */
.nutrition-sema-nudge {
  margin: 0 18px 14px;
  background: rgba(224,112,112,0.08);
  border: 1px solid rgba(224,112,112,0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #E07070;
  line-height: 1.5;
}
.nutrition-sema-nudge svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* COACH TIP */
.nutrition-tip-card {
  margin: 0 20px 30px;
  background: rgba(168,132,62,0.05);
  border: 1px solid rgba(168,132,62,0.14);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.nutrition-tip-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.nutrition-tip-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

/* MEAL LOG MODAL */
/* MEAL TYPE SELECTOR */
.meal-type-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.meal-type-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3, #2a2a2a);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.meal-type-btn.active {
  background: var(--gold);
  color: #1a1a1a;
  border-color: var(--gold);
}

.nutrition-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.nutrition-modal {
  background: var(--bg2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0));
  width: 100%;
  max-width: 480px;
}
.nutrition-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.nutrition-input {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  padding: 11px 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.nutrition-input:focus { border-color: var(--gold); outline: none; }
.nutrition-input-row {
  display: flex;
  gap: 12px;
}
.nutrition-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nutrition-input-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1;
}
.nutrition-cancel-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px;
  cursor: pointer;
  margin-top: 4px;
}

/* ==============================
   NUTRITION SUB-TABS
============================== */
.nutrition-subtabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 14px;
  background: rgba(255,255,255,0.03);
  margin: 0 0 2px;
  border-bottom: 1px solid var(--border);
}
.nutrition-subtab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.1px;
  border-radius: 0;
}
.nutrition-subtab.active {
  background: transparent;
  border-bottom-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.nutrition-panel {
  /* panels are shown/hidden via display:none */
  /* Ensure each panel's content is fully reachable by scroll */
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ==============================
   MEAL PLAN
============================== */
.mealplan-header-card {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 20px 18px;
}
.mealplan-from {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 6px;
}
.mealplan-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  color: var(--text);
  margin-bottom: 6px;
}
.mealplan-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.mealplan-day-card {
  margin: 0 20px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.mealplan-day-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 12px;
}
.mealplan-meal {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.mealplan-meal:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.mealplan-meal-type {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  min-width: 68px;
  flex-shrink: 0;
}
.mealplan-meal-name {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.4;
}
.mealplan-tip-card {
  margin: 0 16px 24px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* ==============================
   PROGRESS PHOTOS
============================== */
.photos-gate-card {
  margin: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
}
.photos-gate-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 10px;
}
.photos-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.photos-upload-card {
  margin: 0 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.photos-upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 6px 0 14px;
}
.photos-upload-btn {
  display: inline-block;
  background: var(--bg4);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.photos-upload-btn:hover { background: var(--bg3); }
.photos-week-row, .photos-note-row {
  margin-top: 12px;
}
.photos-grid-section {
  padding: 0 16px 24px;
}
.photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}
.photo-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.photo-card-info {
  padding: 8px 10px;
}
.photo-card-week {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.photo-card-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.photo-card-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}
.photo-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ==============================
   WEEKLY CHECK-IN MODAL
============================== */
.checkin-modal {
  max-height: 90vh;
  overflow-y: auto;
}
.checkin-header {
  padding: 4px 0 20px;
}
.checkin-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 6px;
}
.checkin-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 6px;
}
.checkin-sub {
  font-size: 13px;
  color: var(--text-muted);
}
.checkin-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}
.checkin-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkin-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.checkin-weight-row input {
  max-width: 120px;
}
.checkin-energy-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.checkin-energy-btn {
  flex: 1;
  min-width: 56px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.checkin-energy-btn.selected {
  background: var(--accent-mid);
  border-color: var(--accent);
  color: var(--accent-light);
}
.checkin-textarea {
  min-height: 72px;
  resize: none;
}
.checkin-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==============================
   JOURNEY VIEW
============================== */
.journey-reply-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 16px 8px;
  background: linear-gradient(135deg, rgba(82,114,168,0.16), rgba(82,114,168,0.05));
  border: 1px solid rgba(82,114,168,0.35);
  border-radius: 14px;
  padding: 14px 16px;
}
.journey-reply-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.journey-reply-body {
  flex: 1;
  min-width: 0;
}
.journey-reply-from {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}
.journey-reply-text {
  font-size: 14px;
  color: var(--text1);
  margin: 0;
  line-height: 1.5;
}
.journey-stats-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.journey-stats-row::-webkit-scrollbar { display: none; }
.journey-stat-card {
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 90px;
  text-align: center;
}
.journey-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.1;
}
.journey-stat-down { color: #6dbf6d; }
.journey-stat-up { color: #e07070; }
.journey-stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}
.journey-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  padding: 16px 16px 8px;
}
.journey-timeline {
  padding: 0 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.journey-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.journey-card-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.journey-card-body {
  padding: 12px 14px 14px;
}
.journey-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.journey-card-week {
  font-size: 13px;
  font-weight: 700;
  color: var(--text1);
}
.journey-card-weight {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.journey-energy-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  background: var(--bg3);
  color: var(--text2);
}
.journey-energy-1 { background: rgba(180,80,80,0.18); color: #e07070; }
.journey-energy-2 { background: rgba(180,140,80,0.18); color: #c9a96e; }
.journey-energy-3 { background: rgba(100,180,100,0.18); color: #6dbf6d; }
.journey-energy-4 { background: rgba(80,160,200,0.18); color: #7eb8d4; }
.journey-energy-5 { background: rgba(201,169,110,0.25); color: var(--gold); }
.journey-card-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}
.journey-card-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.journey-win-icon { background: rgba(109,191,109,0.2); color: #6dbf6d; }
.journey-improve-icon { background: rgba(201,169,110,0.2); color: var(--gold); }
.journey-card-detail {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}

/* ==============================
   ADMIN CHECK-INS
============================== */
.admin-checkin-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.admin-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-filter-btn.active {
  background: var(--accent-mid);
  border-color: var(--accent);
  color: var(--accent-light);
}
.admin-checkin-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.admin-checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px 10px;
}
.admin-checkin-member {
  font-size: 13px;
  font-weight: 700;
  color: var(--text1);
  word-break: break-all;
}
.admin-checkin-date {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.admin-checkin-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
  margin-left: 8px;
}
.admin-checkin-badge.replied { background: rgba(109,191,109,0.2); color: #6dbf6d; }
.admin-checkin-badge.pending { background: var(--accent-dim); color: var(--accent-light); }
.admin-checkin-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.admin-checkin-details {
  padding: 4px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-checkin-detail {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}
.admin-checkin-struggles {
  color: var(--text1);
  background: rgba(180,80,80,0.08);
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 4px;
}
.admin-checkin-reply-preview {
  padding: 10px 14px 12px;
  font-size: 13px;
  color: var(--text2);
  border-top: 1px solid var(--border);
  background: rgba(109,191,109,0.06);
}
.admin-checkin-reply-form {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
}
.admin-reply-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text1);
  font-size: 13px;
  padding: 10px 12px;
  resize: none;
  min-height: 72px;
  box-sizing: border-box;
  font-family: inherit;
}
.admin-reply-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ==============================
   STREAK HERO CARD
============================== */
.streak-hero-card {
  margin: 0 16px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.4s var(--ease-out), background 0.4s var(--ease-out), box-shadow 0.4s;
  box-shadow: var(--shadow-sm);
}
.streak-hero-card.streak-fire {
  background: linear-gradient(135deg, rgba(82,114,168,0.12), rgba(100,130,185,0.06));
  border-color: rgba(82,114,168,0.40);
  box-shadow: 0 0 22px rgba(82,114,168,0.12);
}
.streak-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.streak-flame-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.4s, background 0.4s, border-color 0.4s;
}
.streak-flame-icon.streak-flame-active {
  color: #E8883A;
  background: rgba(232,136,58,0.12);
  border-color: rgba(232,136,58,0.3);
}
.streak-hero-number {
  font-size: 38px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
  letter-spacing: -0.5px;
}
.streak-hero-card.streak-fire .streak-hero-number {
  color: var(--accent-light);
}
.streak-hero-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}
.streak-hero-right {
  flex: 1;
  min-width: 0;
}
.streak-milestone-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.streak-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.streak-badge-earned {
  background: rgba(82,114,168,0.16);
  border-color: rgba(82,114,168,0.35);
  color: var(--accent-light);
}
.streak-train-today {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.2px;
  margin-top: 4px;
  opacity: 0.85;
  animation: wmFadeIn 0.4s ease;
}

.streak-next-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* legacy stat-card streak-fire (keep for safety) */
.stat-card.streak-fire {
  background: linear-gradient(135deg, rgba(201,169,110,0.18), rgba(201,100,50,0.12));
  border-color: rgba(201,169,110,0.4);
}
.stat-card.streak-fire .stat-number {
  color: var(--gold);
}

/* ==============================
   COMMUNITY — PRIVATE MEMBERS CLUB
============================== */

/* ── Club Header ── */
.club-header {
  padding: 32px 22px 20px;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, rgba(168,132,62,0.07) 0%, transparent 100%);
}
.club-header::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
  opacity: 0.45;
}
.club-header-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 10px;
  font-family: 'DM Sans', sans-serif;
}
.club-header-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 10px;
}
.club-header-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 8px;
  min-height: 22px;
}
.streak-fire {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.04em;
  font-family: 'DM Sans', sans-serif;
}
.streak-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
}
.streak-nudge {
  font-size: 10.5px;
  color: var(--text-muted);
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  opacity: 0.75;
}
.club-header-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 4px 0 0;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Coach Drop (Today's Standard) ── */
.ic-coach-drop {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.ic-coach-drop::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0.5;
}
.ic-coach-drop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ic-coach-drop-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ic-coach-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}
.ic-coach-badge {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: var(--radius-full);
  padding: 2px 7px;
}
.ic-today-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  opacity: 0.7;
}
.ic-coach-drop-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Auth Gate ── */
.community-gate-card {
  margin: 16px 20px 40px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  padding: 40px 28px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.community-gate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: 0.5;
}
.community-gate-sigil {
  width: 52px;
  height: 52px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin: 0 auto 18px;
  border: 1px solid var(--gold-mid);
}
.community-gate-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.community-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.community-gate-btn {
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 28px;
}

/* ── Coach Drop dark mode ── */
[data-theme="dark"] .ic-coach-drop {
  background: var(--bg2);
  border-color: var(--border-mid);
  border-left-color: var(--gold);
}

/* ── Filter Rail ── */
.post-type-chips {
  display: flex;
  gap: 6px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.post-type-chips::-webkit-scrollbar { display: none; }
.post-chip {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.18s ease;
}
.post-chip.active {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  color: var(--gold);
}
.post-chip:active { transform: scale(0.94); }

/* ── Member count ── */
.community-member-count {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Composer ── */
.composer-identity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.composer-identity-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.composer-identity-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
  font-family: 'DM Sans', sans-serif;
  text-transform: capitalize;
}
.composer-identity-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
}
.composer-step {
  margin-bottom: 0;
}
.composer-seg-row {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
}
.composer-seg-btn {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border-radius: 50px;
  border: 1.5px solid var(--border-mid);
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.composer-seg-btn:hover {
  border-color: var(--gold-mid);
  color: var(--gold);
}
.composer-seg-btn.active {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a84c 100%);
  border-color: transparent;
  color: #1a1208;
  box-shadow: 0 2px 12px rgba(184,142,64,0.32);
  font-weight: 800;
}
/* Prompts */
.composer-prompts {
  margin-bottom: 12px;
}
.composer-prompt-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  margin: 0 0 8px;
  opacity: 0.7;
}
.composer-prompt-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.composer-prompt-chip {
  width: 100%;
  text-align: left;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.composer-prompt-chip:hover,
.composer-prompt-chip.active {
  border-color: var(--gold-mid);
  background: var(--gold-dim);
  color: var(--text);
  font-style: normal;
}
.composer-prompt-chip.active {
  border-color: var(--gold);
}
/* Selected prompt display */
.composer-selected-prompt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  padding: 6px 10px;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 2px solid var(--gold);
  opacity: 0.9;
}
.post-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-type-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-avatar-initial {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
}
.community-composer {
  margin: 0 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 18px 16px 14px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 0 rgba(184,142,64,0.08);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.community-composer:focus-within {
  box-shadow: 0 6px 28px rgba(0,0,0,0.18), 0 0 0 1px rgba(184,142,64,0.2);
  border-top-color: var(--gold);
}
[data-theme="dark"] .community-composer {
  background: var(--bg2);
  border-color: var(--border-mid);
  border-top-color: var(--gold);
}
/* Post success flash */
@keyframes composerPosted {
  0%   { box-shadow: 0 0 0 0 rgba(184,142,64,0.5); }
  50%  { box-shadow: 0 0 0 6px rgba(184,142,64,0.15); }
  100% { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
}
.community-composer.composer-posted {
  animation: composerPosted 0.65s ease forwards;
}
.composer-avatar {
  width: 30px;
  height: 30px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
  border: 1px solid var(--gold-mid);
}
.composer-right { flex: 1; min-width: 0; }
.composer-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  resize: none;
  outline: none;
  line-height: 1.65;
  box-sizing: border-box;
  caret-color: var(--gold);
}
.composer-input::placeholder { color: var(--text-muted); font-style: italic; }
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.composer-char-count {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.composer-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold) 0%, #c9a84c 100%);
  color: #1a1208;
  border: none;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 20px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 10px rgba(184,142,64,0.3);
}
.composer-post-btn:active {
  opacity: 0.85;
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(184,142,64,0.2);
}
[data-theme="light"] .composer-post-btn { color: #1a1208; }

/* ── Feed ── */
.community-feed {
  padding: 0 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Post Cards ── */
.community-post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.community-post-card:active {
  border-color: var(--gold-mid);
}
.post-card-inner {
  padding: 16px 16px 14px;
}
.post-identity-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid;
  margin-bottom: 10px;
  font-family: 'DM Sans', sans-serif;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.post-footer-left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.post-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.post-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.community-empty-state {
  text-align: center;
  padding: 40px 20px;
}
.community-empty-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.community-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.65;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin: 0;
}
.post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.post-avatar {
  width: 30px;
  height: 30px;
  background: var(--bg3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.post-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.post-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.1px;
}
.post-date {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.post-delete-btn:active { opacity: 1; }
.post-body {
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  padding-left: 42px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.5px;
}
.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 42px;
}
.post-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.18s;
}
.post-like-btn.liked { color: var(--gold); }
.post-like-btn:active { opacity: 0.6; }

/* ==============================
   BODY STATS — PREMIUM REDESIGN
============================== */

/* HERO HEADER */
.stats-hero {
  padding: 28px 20px 20px;
  background: linear-gradient(180deg, rgba(201,169,110,0.07) 0%, transparent 100%);
  border-bottom: 1px solid rgba(201,169,110,0.1);
  margin-bottom: 4px;
}
.stats-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stats-hero-eyebrow-UNUSED {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  opacity: 0.8;
}
.stats-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.1;
  margin: 0;
}
.stats-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}
.stats-hero-streak {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(201,169,110,0.12);
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 20px;
  padding: 5px 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 4px;
}

/* AUTH GATE */
.stats-gate-card {
  margin: 32px 20px;
  background: var(--bg2);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
}
.stats-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--gold);
}
.stats-gate-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 10px;
}
.stats-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.stats-gate-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  width: 100%;
  letter-spacing: 0.3px;
}

/* PROGRESS BANNER */
.stats-progress-banner {
  margin: 16px 20px 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.13), rgba(201,100,50,0.06));
  border: 1px solid rgba(201,169,110,0.28);
  border-radius: 16px;
  padding: 14px 16px;
}
.stats-banner-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}
.stats-banner-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.stats-banner-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* CARD LABEL */
.stats-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

/* ENTRY CARD */
.stats-entry-card {
  margin: 16px 20px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.stats-entry-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.stats-log-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}
.stats-entry-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(201,169,110,0.1);
  border: 1px solid rgba(201,169,110,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

/* METRICS GRID */
.stats-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.stats-metric-field {
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease;
}
.stats-metric-field:focus-within {
  border-color: rgba(201,169,110,0.4);
  background: rgba(201,169,110,0.04);
}
.stats-metric-icon-wrap {
  color: rgba(201,169,110,0.72);
  margin-bottom: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.stats-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}
.stats-metric-input-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
}
.stats-metric-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-bright);
  width: 100%;
  min-width: 0;
  -moz-appearance: textfield;
}
.stats-metric-input::-webkit-outer-spin-button,
.stats-metric-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stats-metric-input::placeholder {
  color: rgba(242,239,232,0.15);
  font-weight: 400;
  font-size: 18px;
}
.stats-metric-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}

/* GOAL DIVIDER */
.stats-goal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
}
.stats-goal-divider::before,
.stats-goal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}
.stats-goal-divider-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}
.stats-goal-field {
  background: var(--bg3);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 14px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}
.stats-goal-field:focus-within {
  border-color: rgba(201,169,110,0.4);
}
.stats-optional-tag {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: none;
  opacity: 0.6;
  margin-left: 4px;
}

/* SAVE BUTTON */
.stats-save-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), #B8892A);
  color: #0A0A08;
  border: none;
  border-radius: 14px;
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 4px 16px rgba(201,169,110,0.25);
}
.stats-save-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(201,169,110,0.2);
}
.stats-save-btn.saving {
  opacity: 0.7;
  pointer-events: none;
}
.stats-log-msg {
  font-size: 12px;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
  color: #E07070;
  font-weight: 500;
  transition: opacity 0.3s ease;
}
.stats-log-msg.success {
  color: var(--gold);
}

/* SNAPSHOT CARD */
.stats-snapshot-card {
  margin: 0 20px 16px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.stats-snapshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stats-snapshot-entries {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 3px 8px;
  border-radius: 20px;
}
.stats-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stats-snapshot-cell {
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.stats-snap-val {
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  line-height: 1.1;
}
.stats-snap-unit {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
}
.stats-snap-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 5px;
  opacity: 0.7;
}
.stat-delta {
  font-size: 10px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  margin-left: 1px;
}
.stat-delta-good { color: #6DBF6D; }
.stat-delta-bad  { color: #E07070; }

/* CHART CARD */
.stats-chart-card {
  margin: 0 20px 16px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.stats-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stats-chart-select {
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text-mid);
  font-size: 12px;
  padding: 6px 10px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
}
.stats-chart-wrap { position: relative; min-height: 80px; }
.stats-canvas {
  width: 100%;
  display: block;
  border-radius: 10px;
}

/* CHART EMPTY STATE */
.stats-chart-empty {
  padding: 24px 16px 20px;
  text-align: center;
}
.stats-chart-empty-graphic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.stats-chart-empty-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  align-items: flex-end;
}
.stats-chart-empty-dots span {
  width: 3px;
  border-radius: 2px;
  background: rgba(201,169,110,0.3);
  animation: chartDotPulse 1.6s ease-in-out infinite;
}
.stats-chart-empty-dots span:nth-child(1) { height: 8px; animation-delay: 0s; }
.stats-chart-empty-dots span:nth-child(2) { height: 14px; animation-delay: 0.2s; }
.stats-chart-empty-dots span:nth-child(3) { height: 10px; animation-delay: 0.4s; }
.stats-chart-empty-dots span:nth-child(4) { height: 18px; animation-delay: 0.6s; }
.stats-chart-empty-dots span:nth-child(5) { height: 12px; animation-delay: 0.8s; }
@keyframes chartDotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.9; }
}
.stats-chart-empty-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.stats-chart-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0.7;
}

/* CHART LEGEND */
.stats-chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.chart-legend-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* HISTORY */
.stats-history-section {
  margin: 0 20px 100px;
}
.stats-history-section .stats-card-label {
  margin-bottom: 14px;
}
.stats-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.stats-history-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.stats-history-vals {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}
.stats-history-empty {
  padding: 28px 16px;
  text-align: center;
}
.stats-history-empty-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.stats-history-empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0.7;
}

/* ==============================
   HOME WIDGETS
============================== */

/* TODAY'S PLAN CARD */
.todays-plan-card {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.todays-plan-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.todays-plan-card.tp-rest-day::before {
  background: linear-gradient(90deg, #7A7870, transparent);
}
.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.tp-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
}
.tp-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.todays-plan-card.tp-rest-day .tp-title-row,
.todays-plan-card.tp-rest-day .tp-label {
  color: var(--text-muted);
}
.tp-day-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg3);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.04em;
}
.tp-body {
  margin-bottom: 14px;
}
.tp-workout-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin-bottom: 4px;
}
.tp-workout-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.tp-action-btn {
  width: 100%;
  background: var(--gold-mid);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.tp-action-btn:active { background: rgba(201,169,110,0.28); }
.todays-plan-card.tp-rest-day .tp-action-btn {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text-muted);
}

/* HOME CALORIE RING */
.home-cal-ring-card {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hcr-left {
  flex: 1;
  min-width: 0;
}
.hcr-numbers {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 2px;
}
.hcr-eaten {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.hcr-slash, .hcr-goal {
  font-size: 13px;
  color: var(--text-muted);
}
.hcr-unit {
  font-size: 11px;
  color: var(--text-muted);
}
.hcr-remaining {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hcr-macros {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hcr-macro-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hcr-macro-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hcr-macro-label {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}
.hcr-macro-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mid);
}
.hcr-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hcr-svg .hcr-track {
  stroke: var(--bg3);
}
.hcr-svg .hcr-fill {
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s;
}
.hcr-log-btn {
  background: var(--gold-mid);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.hcr-log-btn:active { background: rgba(201,169,110,0.28); }

/* ==============================
   PEPTIDES VIEW
============================== */
.peptide-header-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.peptide-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 16px 16px;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}
.peptide-disclaimer svg {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
}

.peptide-subtab-row {
  display: flex;
  gap: 6px;
  padding: 0 16px 16px;
}
.peptide-subtab {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.peptide-subtab.active {
  background: var(--gold-mid);
  border-color: var(--gold);
  color: var(--gold);
}

.peptide-panel {
  padding-bottom: 32px;
}

/* Peptide library cards */
.peptide-card {
  margin: 0 16px 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
}
.peptide-card:active { opacity: 0.82; transform: scale(0.99); }
.peptide-card.open {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-sm);
}

.peptide-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.peptide-card-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.peptide-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.peptide-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  width: fit-content;
  border: 1px solid;
}
.peptide-tag.recovery  { background: rgba(90,140,110,0.07); color: #5A8C6E; border-color: rgba(90,140,110,0.18); }
.peptide-tag.performance { background: rgba(43,61,106,0.07); color: #2B3D6A; border-color: rgba(43,61,106,0.18); }
.peptide-tag.weight    { background: rgba(168,132,62,0.07); color: #8A6C3A; border-color: rgba(168,132,62,0.18); }

.peptide-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.peptide-card.open .peptide-chevron {
  transform: rotate(180deg);
}

.peptide-card-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}
.peptide-card.open .peptide-card-body {
  display: block;
}
.peptide-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 12px 0 14px;
}

.peptide-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.peptide-detail-item {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.peptide-detail-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.peptide-detail-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.peptide-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.peptide-benefit-chip {
  font-size: 11px;
  font-weight: 500;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  color: var(--text-sub);
}

/* My Stack */
.peptide-stack-add-card {
  margin: 0 16px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.peptide-stack-list-section {
  margin: 0 16px;
}
.peptide-stack-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.peptide-stack-info { flex: 1; min-width: 0; }
.peptide-stack-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.peptide-stack-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.peptide-stack-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}
.peptide-stack-remove:active { color: #E07070; }

/* Dose Log */
.peptide-log-add-card {
  margin: 0 16px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.peptide-log-history {
  margin: 0 16px;
}
.peptide-log-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.peptide-log-info { flex: 1; min-width: 0; }
.peptide-log-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.peptide-log-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.peptide-log-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}
.peptide-log-delete:active { color: #E07070; }

/* HOME COMMUNITY WIN */
.home-community-win {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.home-community-win::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6DBF6D, transparent);
}
.hcw-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #6DBF6D;
}
.hcw-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6DBF6D;
}
.home-community-win {
  display: flex;
  flex-direction: column;
}
.hcw-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(109,191,109,0.15);
  border: 1px solid rgba(109,191,109,0.3);
  color: #6DBF6D;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.hcw-content {
  margin-bottom: 14px;
}
.hcw-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.hcw-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcw-join-btn {
  background: rgba(109,191,109,0.12);
  border: 1px solid rgba(109,191,109,0.25);
  border-radius: var(--radius-sm);
  color: #6DBF6D;
  font-size: 13px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  width: 100%;
}
.hcw-join-btn:active { background: rgba(109,191,109,0.22); }

/* INJECTION SITE TRACKER */
.inject-site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
/* Override: pep2 site grid uses 2-col for safety on small screens */
.pep2-site-grid {
  grid-template-columns: 1fr 1fr;
}
.inject-site-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.inject-site-btn.active {
  background: rgba(201,169,110,0.18);
  border-color: var(--gold);
  color: var(--gold);
}
.inject-site-btn.last-used {
  border-color: rgba(224,112,112,0.4);
  color: #E07070;
  background: rgba(224,112,112,0.07);
}
.inject-site-last {
  font-size: 11px;
  color: #E07070;
  margin-bottom: 6px;
  min-height: 16px;
}

/* PEPTIDE LOG EXTRAS */
.peptide-log-site {
  display: inline-block;
  font-size: 10px;
  background: rgba(201,169,110,0.15);
  color: var(--gold);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 6px;
  font-weight: 600;
  vertical-align: middle;
}
.peptide-log-se {
  font-size: 11px;
  color: #E07070;
  margin-top: 3px;
}

/* CYCLE COUNTDOWN */
.peptide-cycle-card {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.cycle-countdown-item {
  margin-bottom: 14px;
}
.cycle-countdown-item:last-child { margin-bottom: 0; }
.cycle-countdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cycle-countdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.cycle-countdown-days {
  font-size: 12px;
  font-weight: 700;
}
.cycle-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.cycle-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.cycle-progress-label {
  font-size: 10px;
  color: var(--text-muted);
}

/* SIDE EFFECT SUMMARY */
.peptide-side-effect-summary {
  margin: 0 16px 14px;
  background: rgba(224,112,112,0.06);
  border: 1px solid rgba(224,112,112,0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.peptide-sema-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-style: italic;
}
.se-summary-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(224,112,112,0.1);
  font-size: 12px;
}
.se-summary-row:last-child { border-bottom: none; }
.se-summary-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.se-summary-date {
  color: var(--text-muted);
  white-space: nowrap;
}
.se-summary-text {
  color: #E07070;
}

/* SYNERGY PANEL */
.peptide-synergy-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 0 0 10px;
}
.peptide-synergy-rule {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 4px 0 10px;
}
.peptide-synergy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.peptide-synergy-chip {
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid;
}
.peptide-synergy-chip.good {
  background: rgba(90,140,110,0.08);
  color: #5A8C6E;
  border-color: rgba(90,140,110,0.18);
}
.peptide-synergy-chip.bad {
  background: rgba(160,80,80,0.07);
  color: #A05050;
  border-color: rgba(160,80,80,0.16);
}

/* ==============================
   PREMIUM POLISH — ELIZABETH MULKEY
   World-class app refinements
============================== */

/* Smooth view transitions */
.view {
  transition: opacity 0.22s var(--ease-out);
}

/* Elevated card depth for all surface cards */
.stat-card,
.identity-inner,
.habit-item,
.streak-hero-card,
.todays-plan-card,
.home-cal-ring-card,
.coach-message-card,
.video-card,
.community-post-card,
.journey-card,
.admin-card {
  box-shadow: var(--shadow-sm);
}

/* Premium header gradient line */
.view-header::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(82,114,168,0.15) 40%, rgba(82,114,168,0.15) 60%, transparent 100%);
}
.view-header { position: sticky; }

/* Home hero tagline accent */
.coach-header-top {
  padding-top: 56px;
}

/* Pill-style section labels — refined */
.section-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

/* Elevated quick-win button */
.quick-win-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  transition: border-color var(--transition-base), background var(--transition-base);
  box-shadow: var(--shadow-xs);
}
.quick-win-btn svg { color: var(--accent-light); flex-shrink: 0; opacity: 0.85; }
.quick-win-btn:active { background: var(--bg3); opacity: 0.78; transform: scale(0.975); }

/* Calorie ring home card upgrade */
.home-cal-ring-card {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hcr-macro-dot { border-radius: 50%; width: 7px; height: 7px; flex-shrink: 0; }
.hcr-macro-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.hcr-macro-label { font-size: 11px; color: var(--text-muted); flex: 1; }
.hcr-macro-val { font-size: 11px; font-weight: 600; color: var(--text-sub); }
.hcr-eaten {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.hcr-slash, .hcr-unit { font-size: 13px; color: var(--text-muted); }
.hcr-goal { font-size: 13px; color: var(--text-muted); }
.hcr-remaining {
  font-size: 11px;
  color: var(--accent-light);
  margin-top: 4px;
  font-weight: 500;
}
.hcr-track { stroke: var(--bg3); border-color: var(--border-mid); }
.hcr-fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.hcr-log-btn {
  display: block;
  margin-top: 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(82,114,168,0.25);
  border-radius: 20px;
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  transition: background 0.2s;
}
.hcr-log-btn:active { background: var(--accent-mid); }

/* Today's plan card upgrade */
.todays-plan-card {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.tp-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tp-day-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
  background: var(--accent-dim);
  border: 1px solid rgba(82,114,168,0.22);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.3px;
}
.tp-workout-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 4px;
  line-height: 1.25;
}
.tp-workout-meta { font-size: 12px; color: var(--text-muted); }
.tp-action-btn {
  margin-top: 14px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 14px rgba(82,114,168,0.28);
  transition: opacity 0.2s, transform 0.15s;
}
.tp-action-btn:active { transform: scale(0.98); opacity: 0.9; }

/* Stats screen accent upgrades */
.stats-hero-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 4px;
  opacity: 0.85;
}
.stats-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin: 0 0 6px;
}
.stats-hero-streak {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(82,114,168,0.25);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
}
.stats-save-btn {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: var(--radius-md);
  padding: 15px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(82,114,168,0.30);
  transition: opacity 0.2s, transform 0.15s;
}
.stats-save-btn:active { transform: scale(0.98); opacity: 0.9; }
.stats-card-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stats-chart-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 12px;
  padding: 5px 10px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.stats-chart-select:focus { border-color: var(--accent); outline: none; }
.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 6px;
}
.stats-gate-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-xl);
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 4px 18px rgba(82,114,168,0.28);
  transition: opacity 0.2s, transform 0.15s;
}
.stats-gate-btn:active { transform: scale(0.97); opacity: 0.9; }

/* Peptide tab upgrades */
.peptide-subtab.active {
  background: var(--accent-mid);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Principle numbers */
.principle-num {
  color: var(--accent-light);
}

/* Profile quick-link hover */
.quick-link-btn:active { background: var(--bg3); }

/* Mealplan day label */
.mealplan-day-label { color: var(--accent-light); }
.mealplan-from { color: var(--accent-light); }

/* Journey section label */
.journey-section-label { color: var(--text-muted); }

/* Checkin eyebrow */
.checkin-eyebrow { color: var(--accent-light); }

/* Water glass filled */
.water-glass.filled {
  background: var(--accent);
  border-color: var(--accent-light);
  box-shadow: 0 2px 12px rgba(82,114,168,0.30);
}

/* Weekly bar today label */
.weekly-bar-label.today { color: var(--accent-light); font-weight: 700; }

/* Protein fill accent */
.protein-fill { background: var(--accent-light); }

/* Auth hero eyebrow */
.auth-hero-text .coach-eyebrow { color: var(--accent-light); }

/* Subscription modal price */
.sub-modal-price { color: var(--accent-light); }

/* Stats progress banner */
.stats-progress-banner {
  margin: 0 18px 16px;
  background: linear-gradient(135deg, rgba(82,114,168,0.12), rgba(82,114,168,0.05));
  border: 1px solid rgba(82,114,168,0.22);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.stats-banner-inner {
  font-size: 14px;
  color: var(--text);
  font-style: italic;
  line-height: 1.6;
}

/* Snapshot grid accent */
.stats-snapshot-entries {
  font-size: 11px;
  color: var(--accent-light);
  font-weight: 600;
}

/* Post avatar gold initial */
.post-avatar-initial { color: var(--accent-light); background: var(--accent-dim); border-color: rgba(82,114,168,0.22); }

/* Admin reply input focus */
.admin-reply-input:focus { border-color: var(--accent); }

/* Nutrition empty state icon */
.nt-empty-icon { border-color: rgba(82,114,168,0.15); }

/* Eat-now card */
.nt-eat-now-card {
  background: rgba(82,114,168,0.06);
  border-color: rgba(82,114,168,0.18);
}
.nt-eat-now-badge { color: var(--accent-light); }
.nt-eat-now-arrow { color: var(--accent-light); }

/* Sema nudge stays red — intentional warning color */

/* Meal type button active */
.meal-type-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* Nutrition modal title */
.nutrition-modal-title { color: var(--text); }

/* Composer post button — override handled in community section */

/* Journey stat card accent */
.journey-stat-card {
  border-color: rgba(82,114,168,0.10);
}

/* Peptide benefit chips — neutral, no color */
.peptide-benefit-chip {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 400;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.2px;
}

/* Peptide tag colors — desaturated, muted */

/* Smooth button press on all interactive elements */
button:active { transition: transform 0.12s var(--ease-spring), opacity 0.12s; }

/* Consistent letter-spacing on all DM Sans labels */
.tab-label, .filter-btn, .mark-complete-btn, .post-like-btn { letter-spacing: 0.15px; }

/* Consistent card radius for all bg2 cards */
.nt-goals-editor,
.peptide-log-add-card,
.peptide-stack-add-card,
.peptide-cycle-card,
.peptide-log-history {
  border-radius: var(--radius-md);
}

/* Consistent padding on all padded sections */
.habits-section,
.vibe-section,
.main-cta-block,
.stats-row,
.identity-block {
  padding-left: 16px;
  padding-right: 16px;
}

/* Micro-interaction: card tap feedback */
.habit-item:active,
.vibe-btn:active,
.workout-scroll-card:active {
  transform: scale(0.95);
}

/* Premium input focus ring */
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(82,114,168,0.11);
  outline: none;
}

/* Smoother page transitions */
.view.active {
  animation: viewFadeIn 0.26s var(--ease-out) both;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Premium scrollbar (webkit) */
.scroll-container::-webkit-scrollbar { width: 0; }

/* ==============================
   ENGAGEMENT & DOPAMINE SYSTEM
============================== */

/* ── EXIT WORKOUT CONFIRM OVERLAY ── */
.wm-exit-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}
.wm-exit-confirm-overlay.open {
  display: flex;
  animation: overlayFadeIn 0.2s var(--ease-out) both;
}
.wm-exit-confirm-sheet {
  background: var(--bg2);
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  padding: 10px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 -20px 64px rgba(0,0,0,0.7);
  animation: sheetSlideUp 0.28s var(--ease-out) both;
  text-align: center;
}
.wm-exit-confirm-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
  margin: 0 auto 20px;
}
.wm-exit-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(220,80,80,0.12);
  border: 1px solid rgba(220,80,80,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: rgba(220,100,100,0.9);
}
.wm-exit-confirm-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 8px;
}
.wm-exit-confirm-sub {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.55;
  margin-bottom: 24px;
}
.wm-exit-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wm-exit-confirm-save {
  width: 100%;
  padding: 15px;
  background: var(--gold);
  border: none;
  border-radius: var(--radius-md);
  color: #0A0A0F;
  font-size: 15px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(201,169,110,0.28);
  transition: transform 0.15s var(--ease-spring), opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.wm-exit-confirm-save:active { transform: scale(0.97); opacity: 0.88; }
.wm-exit-confirm-discard {
  width: 100%;
  padding: 14px;
  background: rgba(220,80,80,0.10);
  border: 1px solid rgba(220,80,80,0.22);
  border-radius: var(--radius-md);
  color: rgba(220,100,100,0.9);
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.wm-exit-confirm-discard:active { transform: scale(0.97); opacity: 0.8; }
.wm-exit-confirm-cancel {
  width: 100%;
  padding: 14px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.wm-exit-confirm-cancel:active { transform: scale(0.97); opacity: 0.8; }

/* ── CELEBRATION TOAST ── */
.celebration-toast {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  background: linear-gradient(160deg, #1F1E28 0%, #1A1920 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  pointer-events: none;
}
.celebration-toast.show {
  /* Push down below safe area / Dynamic Island */
  transform: translateX(-50%) translateY(calc(16px + env(safe-area-inset-top, 0px)));
}
.celebration-toast.hide {
  transform: translateX(-50%) translateY(-120%);
  opacity: 0;
}
.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  background: var(--accent-mid);
}
.toast-icon.gold { background: var(--gold-mid); }
.toast-icon.green { background: rgba(80,180,120,0.18); }
.toast-icon.fire { background: rgba(232,136,58,0.18); }
.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 2px;
}
.toast-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.60);
  line-height: 1.4;
}

/* ── CONFETTI BURST ── */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* ── DAILY SCORE RING ── */
.daily-score-card {
  margin: 0 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.daily-score-card.score-perfect {
  border-color: rgba(201,169,110,0.35);
  box-shadow: 0 0 24px rgba(201,169,110,0.1);
}
.daily-score-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.daily-score-svg {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}
.daily-score-track {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 5;
}
.daily-score-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 163;
  stroke-dashoffset: 163;
  transition: stroke-dashoffset 1s cubic-bezier(0.34,1.1,0.64,1), stroke 0.5s ease;
}
.daily-score-fill.score-high { stroke: var(--gold); }
.daily-score-number-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.daily-score-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.daily-score-pct {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}
.daily-score-right {
  flex: 1;
  min-width: 0;
}
.daily-score-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.daily-score-sub {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 10px;
}
.daily-score-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.score-task-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.score-task-chip.done {
  background: rgba(82,114,168,0.14);
  border-color: rgba(82,114,168,0.3);
  color: var(--accent-light);
}
.score-task-chip.done.gold-chip {
  background: rgba(201,169,110,0.14);
  border-color: rgba(201,169,110,0.3);
  color: var(--gold-light);
}
.score-task-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* ── NUDGE BANNER ── */
.nudge-banner {
  margin: 0 16px 14px;
  background: linear-gradient(135deg, rgba(82,114,168,0.1), rgba(82,114,168,0.05));
  border: 1px solid rgba(82,114,168,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: nudge-slide-in 0.4s cubic-bezier(0.34,1.2,0.64,1);
}
.nudge-banner.gold-nudge {
  background: linear-gradient(135deg, rgba(201,169,110,0.1), rgba(201,169,110,0.04));
  border-color: rgba(201,169,110,0.22);
}
@keyframes nudge-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nudge-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}
.nudge-text {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
  flex: 1;
}
.nudge-text strong {
  color: var(--accent-light);
  font-weight: 700;
}
.nudge-banner.gold-nudge .nudge-text strong {
  color: var(--gold-light);
}

/* ── HABIT COMPLETION BURST ── */
@keyframes habit-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}
@keyframes habit-all-done-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,169,110,0.4); }
  60%  { box-shadow: 0 0 0 10px rgba(201,169,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,110,0); }
}
.habit-item.pop-anim {
  animation: habit-pop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.habits-grid.all-done {
  animation: habit-all-done-pulse 0.7s ease-out;
}

/* ── STREAK MILESTONE BURST ── */
.milestone-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9,9,14,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.milestone-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.milestone-card {
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  transform: scale(0.85);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.milestone-overlay.show .milestone-card {
  transform: scale(1);
}
.milestone-emoji {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  animation: milestone-bounce 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.3s both;
}
@keyframes milestone-bounce {
  from { transform: scale(0) rotate(-15deg); }
  to   { transform: scale(1) rotate(0deg); }
}
.milestone-days {
  font-size: 52px;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
  margin-bottom: 4px;
}
.milestone-days-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.milestone-msg {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 24px;
}
.milestone-close-btn {
  background: var(--accent-mid);
  border: 1px solid rgba(82,114,168,0.3);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.milestone-close-btn:active { background: rgba(82,114,168,0.25); }

/* ── MACRO CLOSE NUDGE ── */
.macro-close-nudge {
  display: none;
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(82,114,168,0.08);
  border: 1px solid rgba(82,114,168,0.18);
  border-radius: var(--radius-xs);
  font-size: 11px;
  color: var(--accent-light);
  line-height: 1.5;
  animation: nudge-slide-in 0.3s ease;
}
.macro-close-nudge.visible { display: block; }

/* ── WATER COMPLETE CELEBRATION ── */
@keyframes water-complete-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.nt-water-icon.just-completed {
  animation: water-complete-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── STREAK BADGE EARN ANIMATION ── */
@keyframes badge-earn {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
.streak-badge.just-earned {
  animation: badge-earn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── PULSE DOT for active nudge ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* Subtle background texture on app shell */
#app::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -8%, rgba(82,114,168,0.06) 0%, transparent 52%),
    radial-gradient(ellipse at 95% 95%, rgba(82,114,168,0.03) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* ==============================
   GLOBAL TYPOGRAPHY REFINEMENTS
============================== */

/* Primary display numbers — tighter tracking */
.stat-number,
.streak-hero-number,
.nt-ring-number,
.hcr-eaten,
.daily-score-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Section row spacing — consistent across all views */
.section-row {
  padding: 0 16px;
  margin-bottom: 12px;
}
.section-see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.1px;
  opacity: 0.80;
  transition: opacity var(--transition-fast);
}
.section-see-all:active { opacity: 0.45; }

/* Peptide cards — tighter, more premium */
.peptide-card {
  margin: 0 16px 7px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.peptide-card-header {
  padding: 15px 16px;
}
.peptide-name {
  font-size: 17px;
  letter-spacing: -0.2px;
}
.peptide-desc {
  font-size: 13.5px;
  line-height: 1.62;
}

/* Principle items — more breathing room */
.principle-item {
  padding: 20px 18px;
}
.principle-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
  margin-bottom: 4px;
}
.principle-sub {
  font-size: 12.5px;
  line-height: 1.62;
}

/* Mark complete button — more refined */
.mark-complete-btn {
  padding: 5px 13px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 20px;
  transition: background var(--transition-base), opacity 0.18s, transform 0.14s;
}

/* Play overlay — slightly larger */
.play-icon-overlay {
  width: 48px;
  height: 48px;
}

/* Meal item — more refined */
.meal-item {
  border-radius: 16px;
  padding: 15px 16px;
  transition: background var(--transition-fast);
}
.meal-item-name {
  font-size: 14px;
  font-weight: 600;
}
.meal-item-cals {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Water glass — taller, more tappable */
.water-glass {
  height: 40px;
  border-radius: 9px;
  transition: background 0.22s, border-color 0.22s, transform 0.12s, box-shadow 0.22s;
}

/* Score chip — slightly more padding */
.score-task-chip {
  padding: 3px 10px;
  font-size: 10.5px;
}

/* Nudge banner — slightly more refined */
.nudge-banner {
  border-radius: var(--radius-md);
  padding: 13px 16px;
}
.nudge-text {
  font-size: 12.5px;
  line-height: 1.55;
}

/* Toast — more polished */
.celebration-toast {
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 0 1px rgba(82,114,168,0.10);
}
.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
}
.toast-sub {
  font-size: 11.5px;
}

/* Milestone card — more refined */
.milestone-card {
  border-radius: var(--radius-xl);
  padding: 40px 32px;
}
.milestone-msg {
  font-size: 15px;
  line-height: 1.62;
}

/* Community gate card — more polished */
.community-gate-card {
  border-radius: var(--radius-xl);
  padding: 40px 26px;
}

/* Stats gate card — more polished */
.stats-gate-card {
  border-radius: var(--radius-xl);
  padding: 40px 26px;
}

/* Locked message — refined */
.locked-msg {
  padding: 56px 32px;
}
.lock-circle {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

/* PR row — more refined */
.pr-row {
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

/* Subscription tier cards */
.tier-card {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all var(--transition-base);
}
.tier-name {
  font-size: 16px;
  letter-spacing: -0.2px;
}
.tier-price {
  font-size: 22px;
  letter-spacing: -0.4px;
}

/* Subscribe modal */
.subscribe-modal h3 {
  font-size: 24px;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

/* Quick win modal — late overrides removed, defined in main block */

/* Mealplan day card */
.mealplan-day-card {
  border-radius: var(--radius-md);
  padding: 18px;
}
.mealplan-meal-name {
  font-size: 13.5px;
  line-height: 1.45;
}

/* Journey card */
.journey-card {
  border-radius: var(--radius-lg);
}
.journey-card-body {
  padding: 14px 16px 16px;
}

/* Admin card */
.admin-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* Video modal title */
.vmh-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

/* Workout breakdown structure — late overrides removed, defined in main block */

/* Desktop app shadow */
@media (min-width: 1024px) {
  #app {
    box-shadow: 0 0 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(82,114,168,0.06);
  }
}

/* All views above texture */
.view { z-index: 1; }
.tab-bar { z-index: 9999; }

/* ==============================
   PREMIUM IMAGE ENHANCEMENTS
============================== */

/* Smooth ken-burns on home hero when view becomes active */
#view-home.active .coach-header-bg {
  animation: kenBurnsHero 8s ease-out forwards;
}
@keyframes kenBurnsHero {
  from { transform: scale(1.08); }
  to   { transform: scale(1.02); }
}

/* Coach view — subtle pan on activate */
#view-coach.active .coach-view-photo {
  animation: kenBurnsSlow 7s ease-out forwards;
}
@keyframes kenBurnsSlow {
  from { transform: scale(1.06); }
  to   { transform: scale(1.00); }
}

/* Profile/auth view — same treatment */
#view-profile.active .auth-hero-img {
  animation: kenBurnsSlow 7s ease-out forwards;
}

/* Join CTA block — refined text shadow for readability */
.join-cta-title {
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.join-cta-sub {
  color: rgba(255,255,255,0.68);
}

/* Coach view name — elevated text presence */
.coach-view-name {
  text-shadow: 0 2px 20px rgba(0,0,0,0.55);
  letter-spacing: -0.3px;
}

/* Workout scroll cards — hover lift + image zoom */
.workout-scroll-card {
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s ease;
}
.workout-scroll-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
}
.workout-scroll-card:hover .wsc-thumb img,
.workout-scroll-card:hover .wsc-thumb {
  transform: scale(1.06);
}
.workout-scroll-card:hover .video-thumb-wrapper::before {
  background: rgba(0,0,0,0.18);
}
.workout-scroll-card:active .video-thumb-wrapper::before {
  background: rgba(0,0,0,0.40);
}
.workout-scroll-card:hover .play-icon-overlay {
  transform: translate(-50%, -50%) scale(1.10);
  background: rgba(8,8,12,0.82);
  box-shadow: 0 6px 28px rgba(0,0,0,0.65);
}
.workout-scroll-card:active .play-icon-overlay {
  transform: translate(-50%, -50%) scale(0.88);
}
/* wsc-thumb img — zoom target for hover (wrapper is the clip) */
.wsc-thumb img {
  transition: transform 0.4s ease;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* single declaration — no bars */
}

/* Identity block — subtle background image accent */
.identity-block {
  position: relative;
  overflow: hidden;
}
.identity-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/woman-beauty-portrait-studio.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.06;
  border-radius: inherit;
  pointer-events: none;
}

/* Principles section — soft image accent */
.principles-section {
  position: relative;
  overflow: hidden;
}
.principles-section::before {
  content: '';
  position: absolute;
  top: 0; right: -20px;
  width: 140px;
  height: 100%;
  background-image: url('images/woman-white-sports-bra-shorts-2.jpg');
  background-size: cover;
  background-position: center top;
  opacity: 0.05;
  pointer-events: none;
  border-radius: 0 12px 12px 0;
}

/* Workout video card thumbnails — consistent rounded corners */
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
  border-color: rgba(82,114,168,0.22);
}
[data-theme="dark"] .video-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.60), 0 4px 16px rgba(0,0,0,0.40);
  border-color: rgba(82,114,168,0.28);
}
.video-card:hover .video-thumb {
  transform: scale(1.04);
}
.video-card-thumb {
  overflow: hidden;
}
.video-card-thumb img {
  transition: transform 0.45s ease;
  display: block;
  width: 100%;
}
.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}

/* Coach message card — subtle left border accent */
.coach-message-card {
  border-left: 2px solid rgba(82,114,168,0.35);
}

/* Streak hero card — image accent background */
.streak-hero-card {
  position: relative;
  overflow: hidden;
}
.streak-hero-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to left, rgba(82,114,168,0.06) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 0 inherit inherit 0;
}

/* Mobile: ensure images never overflow or feel oversized */
@media (max-width: 480px) {
  .coach-header {
    height: 56vw;
    min-height: 220px;
  }
  .coach-view-header {
    height: 300px;
  }
  .auth-hero {
    height: 270px;
  }
  .join-cta-block {
    min-height: 280px;
  }
  .identity-block::before {
    opacity: 0.04;
  }
}

/* Landing page coach card — image zoom on hover */
.lp-coach-card {
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}
.lp-coach-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
.lp-coach-img {
  transition: transform 0.5s ease;
  object-position: center 15% !important;
}
.lp-coach-card:hover .lp-coach-img {
  transform: scale(1.04);
}

/* Landing final CTA — stronger overlay for new portrait image */
.lp-final-cta-overlay {
  background: linear-gradient(
    to bottom,
    rgba(10,10,15,0.75) 0%,
    rgba(10,10,15,0.88) 100%
  ) !important;
}
.lp-final-cta-bg {
  background-position: center 20% !important;
  transition: transform 6s ease-out;
  animation: kenBurnsFinal 10s ease-out forwards;
}
@keyframes kenBurnsFinal {
  from { transform: scale(1.06); }
  to   { transform: scale(1.00); }
}

/* Landing hero — object position for athletic shot */
.lp-hero-bg {
  background-position: center 18% !important;
}

/* Testimonial cards — hover lift */
.lp-testimonial {
  transition: transform 0.28s var(--ease-spring), border-color 0.28s ease;
}
.lp-testimonial:hover {
  transform: translateY(-2px);
  border-color: rgba(82,114,168,0.22);
}

/* Feature cards — hover lift */
.lp-feature-card {
  transition: transform 0.28s var(--ease-spring), border-color 0.28s ease, box-shadow 0.28s ease;
}
.lp-feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(82,114,168,0.22);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* ============================================================
   FLEXIBLE DATE LOGGING — DATE PICKER & NAV
   ============================================================ */

/* Date chip row (used in meal modal, stats card, peptide log) */
.log-date-picker-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.log-date-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text-muted, #aaa);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.log-date-chip:active {
  opacity: 0.75;
  transform: scale(0.97);
}
.log-date-chip.active {
  background: rgba(82,114,168,0.18);
  border-color: var(--accent, #5272A8);
  color: var(--accent-light, #6B8BC4);
}
.log-date-chip-custom {
  cursor: pointer;
}

/* Selected date label below chips */
.log-date-selected-label {
  font-size: 11px;
  color: var(--gold, #C8A96E);
  min-height: 16px;
  margin-bottom: 8px;
  padding-left: 2px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Stats entry date picker row */
.stats-date-picker-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}

/* Nutrition date navigation bar */
.nt-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 16px 6px;
  margin: 0 0 6px;
}

.nt-date-nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text, #fff);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.nt-date-nav-arrow:active {
  background: rgba(82,114,168,0.2);
}

.nt-date-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nt-date-nav-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #fff);
  letter-spacing: 0.01em;
}

.nt-date-nav-sub {
  font-size: 11px;
  color: var(--text-muted, #aaa);
  min-height: 14px;
}

/* Yesterday reminder banner */
.nt-yesterday-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,169,110,0.1);
  border: 1px solid rgba(200,169,110,0.25);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--gold, #C8A96E);
  flex-wrap: wrap;
}

.nt-yesterday-reminder svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.nt-yesterday-reminder-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--gold, #C8A96E);
  background: transparent;
  color: var(--gold, #C8A96E);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}
.nt-yesterday-reminder-btn:active {
  background: rgba(200,169,110,0.15);
}

/* ==============================
   THEME TOGGLE SWITCH
============================== */
.theme-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

/* Inline toggle used in profile section */
.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 20px 10px;
}

.theme-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.theme-toggle-label svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.theme-toggle-btn {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--bg4);
  transition: background 0.30s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.theme-toggle-btn::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.30s cubic-bezier(0.34,1.56,0.64,1), background 0.30s ease;
}

[data-theme="dark"] .theme-toggle-btn {
  background: var(--accent);
}

[data-theme="dark"] .theme-toggle-btn::after {
  transform: translateX(20px);
  background: #F0EEE8;
}

.theme-toggle-icon {
  font-size: 14px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.theme-icon-sun  { opacity: 1; }
.theme-icon-moon { opacity: 0; position: absolute; }

[data-theme="dark"] .theme-icon-sun  { opacity: 0; }
[data-theme="dark"] .theme-icon-moon { opacity: 1; }

/* Dark mode card elevation */
[data-theme="dark"] .em-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .wm-ex-card,
[data-theme="dark"] .community-post-card,
[data-theme="dark"] .journey-card,
[data-theme="dark"] .quick-win-btn,
[data-theme="dark"] .coach-bubble,
[data-theme="dark"] .sub-status-card,
[data-theme="dark"] .quick-link-btn,
[data-theme="dark"] .food-scan-result,
[data-theme="dark"] .nt-empty-state,
[data-theme="dark"] .meal-item,
[data-theme="dark"] .tier-card,
[data-theme="dark"] .milestone-card,
[data-theme="dark"] .peptide-stack-item,
[data-theme="dark"] .peptide-log-item {
  box-shadow: 0 2px 16px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.30);
  border-color: rgba(255,255,255,0.07);
}

/* Light mode card elevation */
[data-theme="light"] .em-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .wm-ex-card,
[data-theme="light"] .community-post-card,
[data-theme="light"] .journey-card,
[data-theme="light"] .quick-win-btn,
[data-theme="light"] .coach-bubble,
[data-theme="light"] .sub-status-card,
[data-theme="light"] .quick-link-btn {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

/* Dark mode input fields */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-mid);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

/* Dark mode modals */
[data-theme="dark"] .video-modal-content,
[data-theme="dark"] .nutrition-modal,
[data-theme="dark"] .wm-exit-confirm-sheet,
[data-theme="dark"] .sub-modal-sheet {
  background: var(--bg2);
  border-top: 1px solid var(--border-mid);
}

/* Dark mode milestone overlay */
[data-theme="dark"] .milestone-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  box-shadow: 0 8px 48px rgba(0,0,0,0.70);
}

/* Dark mode celebration toast */
[data-theme="dark"] .celebration-toast {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  box-shadow: 0 4px 32px rgba(0,0,0,0.60);
}

/* Dark mode scanner overlay */
[data-theme="dark"] .food-scanner-overlay {
  background: rgba(0,0,0,0.97);
}

/* Dark mode nudge banner */
[data-theme="dark"] .nudge-banner {
  background: var(--bg2);
  border-color: var(--border-mid);
}

/* Dark mode progress bars track */
[data-theme="dark"] .macro-bar-track,
[data-theme="dark"] .progress-track,
[data-theme="dark"] .wbd-progress-track,
[data-theme="dark"] .hcr-track {
  background: var(--bg4);
  stroke: var(--bg4);
}

/* Dark mode tab bar */
[data-theme="dark"] .tab-bar {
  border-top-color: rgba(255,255,255,0.07);
}

/* Dark mode standard card — keep dark but slightly elevated */
[data-theme="dark"] .em-standard-card {
  background: linear-gradient(160deg, #22212C 0%, #1C1B24 100%);
  box-shadow: 0 4px 32px rgba(0,0,0,0.60), 0 1px 4px rgba(0,0,0,0.40);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Dark mode toast */
[data-theme="dark"] .celebration-toast {
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  color: var(--text);
}

/* Dark mode score tooltip */
[data-theme="dark"] .score-tooltip {
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  color: var(--text);
}

/* Dark mode featured tier card */
[data-theme="dark"] .tier-card.featured {
  border-color: rgba(82,114,168,0.35);
  box-shadow: 0 0 0 1px rgba(82,114,168,0.20), 0 4px 24px rgba(0,0,0,0.50);
}

/* Dark mode accent glow on active elements */
[data-theme="dark"] .habit-item.done,
[data-theme="dark"] .tab-item.active {
  color: var(--accent-light);
}

/* Dark mode score ring */
[data-theme="dark"] .score-ring-track {
  stroke: var(--bg3);
}

/* Dark mode auth panel */
[data-theme="dark"] .auth-panel {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
}

/* Smooth fade when switching themes */
#app {
  transition: background-color 0.30s ease;
}

/* ==============================
   PREMIUM PEPTIDE DASHBOARD
============================== */

/* Hero Header — warm ivory with bronze accent line */
.pep-hero {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 14px 16px 12px;
  position: relative;
  overflow: hidden;
}
.pep-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(168,132,62,0.5) 0%, rgba(168,132,62,0.08) 60%, transparent 100%);
}
[data-theme="dark"] .pep-hero::before {
  background: linear-gradient(90deg, rgba(200,160,96,0.45) 0%, rgba(200,160,96,0.06) 60%, transparent 100%);
}
.pep-hero::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(168,132,62,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.pep-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 5px;
}
.pep-hero-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  margin-bottom: 2px;
}
.pep-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.5px;
}
.pep-hero-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(168,132,62,0.25);
  border-radius: 4px;
  padding: 5px 10px;
  color: var(--gold);
  opacity: 0.85;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.pep-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Stack Summary Bar */
.pep-stack-summary {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 12px 16px 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.pep-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pep-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 4px;
}
.pep-summary-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.3px;
}
/* Goal Focus — PRIMARY: largest, boldest, most prominent */
.pep-summary-row > .pep-summary-stat:nth-child(3) .pep-summary-num {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
/* Active count — SUBTLE: smallest, muted */
.pep-summary-row > .pep-summary-stat:nth-child(1) .pep-summary-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
/* Next Dose / Frequency — SECONDARY */
.pep-summary-row > .pep-summary-stat:nth-child(5) .pep-summary-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.75;
  letter-spacing: 0.1px;
}
.pep-summary-label {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.65;
  margin-top: 0;
}
.pep-summary-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  opacity: 0.7;
}
.pep-summary-names {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  opacity: 0.7;
  padding-top: 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

/* Disclaimer */
.pep-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 10px;
  padding: 5px 10px;
  background: rgba(201,169,110,0.04);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}
.pep-disclaimer svg { color: var(--gold); flex-shrink: 0; }

/* Subtab Row — clean, minimal, blue accent on active */
.pep-subtab-row {
  display: flex;
  gap: 5px;
  padding: 0 16px 10px;
}
.pep-subtab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  padding: 9px 4px 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.3px;
}
.pep-subtab svg { opacity: 0.45; transition: opacity 0.18s; }
.pep-subtab.active {
  background: rgba(43,61,106,0.07);
  border-color: rgba(43,61,106,0.22);
  color: var(--accent);
  font-weight: 600;
}
[data-theme="dark"] .pep-subtab.active {
  background: rgba(82,114,168,0.10);
  border-color: rgba(82,114,168,0.25);
  color: var(--accent-light);
}
.pep-subtab.active svg { opacity: 0.9; }
.pep-subtab:active { transform: scale(0.96); }

/* Suggested For You — neutral, editorial */
.pep-suggested {
  margin: 0 16px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 14px 16px;
}
.pep-suggested-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 10px;
}
.pep-suggested-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pep-suggest-pill {
  font-size: 11px;
  font-weight: 450;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 6px 11px;
  color: var(--text-mid, var(--text-muted));
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  letter-spacing: 0.1px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  height: 28px;
  box-sizing: border-box;
}
.pep-suggest-pill:active {
  background: rgba(43,61,106,0.06);
  border-color: rgba(43,61,106,0.22);
}

/* ── Peptide Filter Row ─────────────────────────────────────── */
.pep-filter-row {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pep-filter-row::-webkit-scrollbar { display: none; }
.pep-filter-btn {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 5px 13px;
  border-radius: 4px;
  border: 1px solid var(--border-mid);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pep-filter-btn.active {
  background: rgba(43,61,106,0.08);
  color: var(--accent);
  border-color: rgba(43,61,106,0.25);
  font-weight: 600;
}
[data-theme="dark"] .pep-filter-btn.active {
  background: rgba(82,114,168,0.12);
  color: var(--accent-light);
  border-color: rgba(82,114,168,0.28);
}
.pep-filter-btn:active {
  background: rgba(43,61,106,0.06);
}

/* ── Peptide Disclaimer ─────────────────────────────────────── */
.pep-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 10px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0.8;
}
.pep-disclaimer svg { flex-shrink: 0; color: var(--text-muted); opacity: 0.6; }

/* ── Category Section Headers ───────────────────────────────── */
.pep-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 16px 10px;
}
.pep-category-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}
.pep-category-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Benefits List ──────────────────────────────────────────── */
.pep-benefits-list {
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pep-benefits-list li {
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}
.pep-benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
}

/* ── Use Context Block ──────────────────────────────────────── */
.pep-context-block {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 14px;
  padding: 8px 12px;
  background: var(--bg3);
  border-radius: 9px;
  border: 1px solid var(--border);
}
.pep-context-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.pep-context-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

/* ── Beginner Note — desaturated sage, barely-there ── */
.pep-beginner-note {
  font-size: 11.5px;
  color: #5A8C6E;
  background: rgba(90,140,110,0.05);
  border: 1px solid rgba(90,140,110,0.14);
  border-left: 2px solid rgba(90,140,110,0.30);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-bottom: 14px;
  line-height: 1.55;
  font-weight: 400;
}
[data-theme="dark"] .pep-beginner-note {
  color: #70A888;
  background: rgba(100,160,120,0.06);
  border-color: rgba(100,160,120,0.12);
  border-left-color: rgba(100,160,120,0.28);
}

/* ═══════════════════════════════════════════════
   PREMIUM PEPTIDE CARDS — Quiet Luxury Redesign
   Color is present, but controlled and refined.
   Use color sparingly and intentionally —
   it should enhance hierarchy, not dominate it.
═══════════════════════════════════════════════ */

.pep-card {
  margin: 0 16px 7px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.14s ease;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05), 0 0 0 0 transparent;
}
.pep-card:active { transform: scale(0.988); opacity: 0.88; }
.pep-card.open {
  border-color: rgba(43,61,106,0.22);
  box-shadow: 0 6px 28px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}
[data-theme="dark"] .pep-card {
  box-shadow: 0 2px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .pep-card.open {
  border-color: rgba(82,114,168,0.28);
  box-shadow: 0 6px 32px rgba(0,0,0,0.5);
}

.pep-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  gap: 12px;
}
.pep-card-meta {
  flex: 1;
  min-width: 0;
}
.pep-tag-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
}

/* ── Tags: thin outlined, barely-there tints ── */
.pep-tag {
  display: inline-flex;
  align-items: center;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid;
}
/* Fat Loss → warm desaturated amber tint */
.pep-tag.fat-loss {
  background: rgba(168,132,62,0.07);
  color: #9A7840;
  border-color: rgba(168,132,62,0.20);
}
[data-theme="dark"] .pep-tag.fat-loss {
  background: rgba(200,160,96,0.08);
  color: #B89060;
  border-color: rgba(200,160,96,0.22);
}
/* Muscle → muted slate blue */
.pep-tag.muscle {
  background: rgba(43,61,106,0.07);
  color: #4E6A96;
  border-color: rgba(43,61,106,0.18);
}
[data-theme="dark"] .pep-tag.muscle {
  background: rgba(82,114,168,0.09);
  color: #7090B8;
  border-color: rgba(82,114,168,0.22);
}
/* Recovery → desaturated sage green */
.pep-tag.recovery {
  background: rgba(90,140,110,0.07);
  color: #5A8C6E;
  border-color: rgba(90,140,110,0.18);
}
[data-theme="dark"] .pep-tag.recovery {
  background: rgba(100,160,120,0.08);
  color: #70A888;
  border-color: rgba(100,160,120,0.22);
}
/* Longevity → muted ocean blue */
.pep-tag.longevity {
  background: rgba(43,61,106,0.06);
  color: #4A6890;
  border-color: rgba(43,61,106,0.16);
}
[data-theme="dark"] .pep-tag.longevity {
  background: rgba(82,114,168,0.08);
  color: #6888B8;
  border-color: rgba(82,114,168,0.20);
}
/* Sleep / Cognitive → soft slate */
.pep-tag.sleep,
.pep-tag.cognitive {
  background: rgba(80,100,140,0.06);
  color: #506080;
  border-color: rgba(80,100,140,0.16);
}
[data-theme="dark"] .pep-tag.sleep,
[data-theme="dark"] .pep-tag.cognitive {
  background: rgba(120,150,200,0.08);
  color: #7890B0;
  border-color: rgba(120,150,200,0.20);
}
/* Performance → accent blue */
.pep-tag.performance {
  background: rgba(43,61,106,0.07);
  color: #2B3D6A;
  border-color: rgba(43,61,106,0.18);
}
[data-theme="dark"] .pep-tag.performance {
  background: rgba(82,114,168,0.09);
  color: #6B8BC4;
  border-color: rgba(82,114,168,0.22);
}
/* Weight / Bronze tone */
.pep-tag.weight {
  background: rgba(168,132,62,0.07);
  color: #8A6C3A;
  border-color: rgba(168,132,62,0.18);
}
[data-theme="dark"] .pep-tag.weight {
  background: rgba(200,160,96,0.08);
  color: #A88050;
  border-color: rgba(200,160,96,0.20);
}

/* ── Strength / Effect badges: subtle, no heavy fills ── */
.pep-strength {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
}
.pep-strength.high {
  background: rgba(90,140,110,0.06);
  color: #5A8C6E;
  border-color: rgba(90,140,110,0.16);
}
[data-theme="dark"] .pep-strength.high {
  background: rgba(100,160,120,0.08);
  color: #70A888;
  border-color: rgba(100,160,120,0.20);
}
.pep-strength.elite {
  background: rgba(168,132,62,0.07);
  color: #8A6C3A;
  border-color: rgba(168,132,62,0.18);
}
[data-theme="dark"] .pep-strength.elite {
  background: rgba(200,160,96,0.09);
  color: #A88050;
  border-color: rgba(200,160,96,0.22);
}
.pep-strength.med {
  background: rgba(43,61,106,0.06);
  color: #4A6890;
  border-color: rgba(43,61,106,0.15);
}
[data-theme="dark"] .pep-strength.med {
  background: rgba(82,114,168,0.08);
  color: #6888B8;
  border-color: rgba(82,114,168,0.20);
}
.pep-strength.low {
  background: rgba(80,100,130,0.05);
  color: #607090;
  border-color: rgba(80,100,130,0.14);
}
[data-theme="dark"] .pep-strength.low {
  background: rgba(120,150,190,0.07);
  color: #8098B8;
  border-color: rgba(120,150,190,0.18);
}

/* ── Peptide Name: editorial, typographically dominant ── */
.pep-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.15;
  letter-spacing: -0.3px;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
.pep-benefit-line {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  font-weight: 400;
}

.pep-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.pep-cycle-badge {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--text-muted);
  white-space: nowrap;
}
.pep-chevron {
  color: var(--text-muted);
  opacity: 0.5;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.pep-card.open .pep-chevron { transform: rotate(180deg); opacity: 0.8; }

/* Card Body */
.pep-card-body {
  display: none;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  animation: pepBodyIn 0.22s ease;
}
.pep-card.open .pep-card-body { display: block; }
@keyframes pepBodyIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pep-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0 0 16px;
}
.pep-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}
.pep-detail-item {
  background: var(--bg3);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border);
}
.pep-detail-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
}
.pep-detail-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pep-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pep-chip {
  font-size: 10.5px;
  font-weight: 400;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  padding: 3px 9px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  transition: border-color 0.15s;
}

/* Stack Builder Header */
.pep-stack-builder-header {
  margin: 0 16px 14px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.pep-stack-builder-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(168,132,62,0.4), transparent);
}
.pep-stack-builder-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.pep-stack-builder-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.pep-section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.pep-stack-count-badge {
  font-size: 9.5px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 9px;
  letter-spacing: 0.3px;
}

/* Streak Tracker */
.pep-streak-card {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.pep-streak-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(43,61,106,0.35), transparent);
}
.pep-streak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pep-streak-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.pep-streak-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
}
.pep-streak-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
.pep-streak-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}
.pep-streak-bar-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.pep-streak-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.pep-streak-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.pep-streak-day.done .pep-streak-dot {
  background: rgba(43,61,106,0.12);
  border-color: rgba(43,61,106,0.35);
}
[data-theme="dark"] .pep-streak-day.done .pep-streak-dot {
  background: rgba(82,114,168,0.15);
  border-color: rgba(82,114,168,0.38);
}
.pep-streak-day span {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── Synergy Panel ── */
.pep-synergy-intro {
  margin: 0 16px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.pep-synergy-intro-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(126,184,247,0.1);
  border: 1px solid rgba(126,184,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7EB8F7;
  flex-shrink: 0;
}
.pep-synergy-intro-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.pep-synergy-intro-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.pep-synergy-card {
  margin: 0 16px 10px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.pep-synergy-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pep-synergy-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.pep-synergy-timing-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 9px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.pep-synergy-rule {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 10px;
}
.pep-synergy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.pep-synergy-chip {
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid;
}
.pep-synergy-chip.good { background: rgba(90,140,110,0.08); color: #5A8C6E; border-color: rgba(90,140,110,0.18); }
.pep-synergy-chip.bad  { background: rgba(160,80,80,0.07); color: #A05050; border-color: rgba(160,80,80,0.16); }
.pep-synergy-pair-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 9px;
  font-style: italic;
}
.pep-synergy-pair-row svg { color: #7EB8F7; flex-shrink: 0; }

/* Synergy tag inline style override — remove hardcoded margin from HTML via CSS */
.pep-synergy-card .pep-tag {
  margin-bottom: 6px;
  display: inline-flex;
}

/* Dark mode enhancements */
[data-theme="dark"] .pep-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
  border-color: rgba(201,169,110,0.2);
}
[data-theme="dark"] .pep-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .pep-card.open {
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  border-color: rgba(201,169,110,0.25);
}
[data-theme="dark"] .pep-streak-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
[data-theme="dark"] .pep-synergy-card {
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
[data-theme="dark"] .pep-detail-item {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}

/* Light mode enhancements */
[data-theme="light"] .pep-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8f6f2 100%);
  border-color: rgba(201,169,110,0.2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .pep-card {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
[data-theme="light"] .pep-card.open {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-color: rgba(201,169,110,0.3);
}
[data-theme="light"] .pep-streak-card,
[data-theme="light"] .pep-stack-summary,
[data-theme="light"] .pep-synergy-card,
[data-theme="light"] .pep-synergy-intro {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
[data-theme="light"] .pep-detail-item {
  background: #f8f6f2;
  border-color: rgba(0,0,0,0.07);
}

/* ==============================
   ULTRA-PREMIUM REDESIGN
   Elizabeth Mulkey Coaching
   Ladder / Apple Fitness / NTC level
============================== */

/* ── DESIGN TOKENS: Richer shadows, warmer surfaces ── */
:root {
  --shadow-xs:    0 1px 3px rgba(0,0,0,0.04), 0 2px 10px rgba(0,0,0,0.04);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.055), 0 4px 18px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 18px rgba(0,0,0,0.08), 0 8px 34px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg:    0 8px 36px rgba(0,0,0,0.10), 0 20px 64px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-accent: 0 4px 22px rgba(61,90,138,0.20), 0 2px 8px rgba(61,90,138,0.10);
  --shadow-gold:  0 4px 20px rgba(168,132,62,0.20), 0 2px 8px rgba(168,132,62,0.10);
  /* Inner highlight for cards — soft luminous top edge */
  --inner-highlight: inset 0 1px 0 rgba(255,255,255,0.70), inset 0 0 0 1px rgba(255,255,255,0.06);
  --inner-highlight-dark: inset 0 1px 0 rgba(255,255,255,0.07), inset 0 0 0 1px rgba(180,175,210,0.04);
}
[data-theme="dark"] {
  --shadow-xs:    0 1px 3px rgba(0,0,0,0.30), 0 2px 10px rgba(10,8,20,0.22);
  --shadow-sm:    0 2px 10px rgba(0,0,0,0.38), 0 4px 22px rgba(10,8,20,0.26);
  --shadow-md:    0 4px 22px rgba(0,0,0,0.48), 0 8px 38px rgba(10,8,20,0.30), 0 1px 3px rgba(0,0,0,0.24);
  --shadow-lg:    0 8px 42px rgba(0,0,0,0.62), 0 20px 68px rgba(10,8,20,0.44), 0 2px 8px rgba(0,0,0,0.34);
  --shadow-accent: 0 4px 24px rgba(82,114,168,0.32), 0 2px 8px rgba(82,114,168,0.16);
  --shadow-gold:  0 4px 24px rgba(200,160,96,0.28), 0 2px 8px rgba(200,160,96,0.14);
}

/* ── TAB BAR: Refined minimal editorial style ── */
.tab-item {
  gap: 5px;
  padding: 10px 0 8px;
  position: relative;
  letter-spacing: 0.9px;
  justify-content: center;
  align-items: center;
}
.tab-item.active {
  color: var(--accent);
  opacity: 1;
  font-weight: 600;
}
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 1.5px;
  border-radius: 0 0 2px 2px;
  background: var(--accent);
  opacity: 0.85;
}
.tab-item svg {
  width: 22px;
  height: 22px;
}
.tab-item.active svg {
  transform: none;
  opacity: 1;
}
.tab-label {
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
}

/* ── BUTTONS: Gradient primary, refined press states ── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: var(--shadow-accent);
  letter-spacing: 0.3px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  border-radius: var(--radius-lg);
  transition: opacity 0.20s var(--ease-out), transform 0.20s var(--ease-spring), box-shadow 0.20s;
}
.btn-primary:active {
  transform: scale(0.970);
  opacity: 0.90;
  box-shadow: 0 2px 10px rgba(61,90,138,0.16);
}
.btn-ghost {
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.16s var(--ease-spring);
  letter-spacing: 0.2px;
  text-transform: none;
  font-size: 13px;
  border-radius: var(--radius-lg);
}
.btn-ghost:active {
  transform: scale(0.974);
  opacity: 0.76;
  background: var(--bg2);
}
.btn-outline:active {
  transform: scale(0.974);
  opacity: 0.68;
}

/* ── HOME HEADER: overridden by premium redesign below ── */
.em-header {
  padding: 56px 22px 18px;
  background: var(--bg);
  border-bottom: none;
  position: relative;
}
.em-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-glow) 40%, var(--accent-glow) 60%, transparent 100%);
  pointer-events: none;
}
.em-eyebrow {
  font-size: 9px;
  letter-spacing: 3px;
  font-weight: 600;
  margin-bottom: 4px;
}
.em-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.05;
}
.em-brand-sub {
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 3px;
  opacity: 1;
  color: var(--text-muted);
}
.em-profile-btn {
  width: 38px;
  height: 38px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-base), transform 0.16s var(--ease-spring);
}
.em-profile-btn:active {
  transform: scale(0.90);
  opacity: 0.65;
}
.em-theme-quick-btn {
  width: 38px;
  height: 38px;
  box-shadow: var(--shadow-xs);
}

/* ── COACH SIGNAL: overridden by premium redesign below ── */
.em-coach-signal {
  margin: 16px 18px 0;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs), var(--inner-highlight);
  gap: 14px;
}
[data-theme="dark"] .em-coach-signal {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.em-signal-label {
  font-size: 8.5px;
  letter-spacing: 2.8px;
  margin-bottom: 6px;
}
.em-signal-text {
  font-size: 13px;
  line-height: 1.72;
  letter-spacing: 0.02em;
}

/* ── DARK CARD: overridden by premium redesign below ── */
.em-standard-card {
  margin: 16px 18px 16px;
  background: linear-gradient(160deg, #1C1A18 0%, #111010 100%);
  border-radius: var(--radius-md);
  padding: 24px 22px 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.38), 0 2px 10px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="light"] .em-standard-card {
  background: linear-gradient(160deg, #1C1A18 0%, #111010 100%);
}
.em-standard-workout {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.15;
}
.em-start-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: 0 4px 20px rgba(43,61,106,0.38);
  letter-spacing: 1.2px;
  font-size: 11px;
  transition: opacity 0.16s, transform 0.14s var(--ease-spring), box-shadow 0.16s;
}
.em-start-btn:active {
  opacity: 0.85;
  transform: scale(0.978);
  box-shadow: 0 2px 8px rgba(43,61,106,0.20);
}

/* ── SECTION LABELS: overridden by premium redesign below ── */
.em-section-label {
  font-size: 8.5px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.em-section-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
  opacity: 0.45;
  border-radius: 2px;
  flex-shrink: 0;
}
.section-label {
  font-size: 9px;
  letter-spacing: 2.8px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
  opacity: 0.40;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── EXEC CARDS: More elevated ── */
.em-exec-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .em-exec-card {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.em-exec-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -1px;
}
.em-exec-stat-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* ── ACTION LIST: overridden by premium redesign below ── */
.em-actions-list {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .em-actions-list {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.em-action-row {
  padding: 16px 16px;
  gap: 14px;
}
.em-action-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: 1px solid rgba(43,61,106,0.14);
  color: var(--accent);
}
[data-theme="dark"] .em-action-icon {
  background: var(--accent-dim);
  border-color: rgba(82,114,168,0.18);
  color: var(--accent-light);
}
.em-action-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05px;
}

/* ── HABITS: More polished check states ── */
.em-habit {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 14px 8px 12px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base), box-shadow var(--transition-base);
}
.em-habit.done {
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.30);
  box-shadow: 0 0 0 1px rgba(43,61,106,0.12), var(--shadow-xs);
}
[data-theme="dark"] .em-habit.done {
  box-shadow: 0 0 0 1px rgba(82,114,168,0.18), var(--shadow-xs);
}
.em-habit-check {
  width: 23px;
  height: 23px;
  border: 1.5px solid var(--border-strong);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.em-habit.done .em-habit-check {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(43,61,106,0.30);
}
.em-habit-name {
  font-size: 9.5px;
  letter-spacing: 0.6px;
}

/* ── PROGRAM CARD: overridden by premium redesign below ── */
.em-program-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .em-program-card {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}

/* ── STAT CARDS ── */
.stat-card {
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .stat-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.stat-number {
  font-size: 32px;
  letter-spacing: -0.8px;
  margin-bottom: 5px;
}

/* ── WORKOUT SCROLL CARDS ── */
.workout-scroll-card {
  width: 160px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  border: 1px solid var(--border);
}
[data-theme="dark"] .workout-scroll-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.workout-scroll-card:active {
  transform: scale(0.94);
  box-shadow: var(--shadow-xs);
}
/* wsc-thumb background handled in canonical block above */
.wsc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  line-height: 1.3;
}
.wsc-meta {
  font-size: 10.5px;
  letter-spacing: 0.1px;
}

/* ── VIEW HEADER: Sharper, more editorial ── */
.view-header {
  padding: 56px 20px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
.view-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-glow) 35%, var(--accent-glow) 65%, transparent 100%);
  pointer-events: none;
}
.view-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.0;
}

/* ── FILTER PILLS: More premium ── */
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: all 0.16s var(--ease-out);
  box-shadow: var(--shadow-xs);
}
.filter-btn:active {
  transform: scale(0.90);
  opacity: 0.78;
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-accent);
  font-weight: 700;
  letter-spacing: 0.8px;
}

/* ── VIDEO CARDS: More premium elevation ── */
.video-card {
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s ease, border-color 0.18s;
}
[data-theme="dark"] .video-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
  border-color: rgba(255,255,255,0.07);
}
.video-card:active {
  transform: scale(0.966);
  box-shadow: var(--shadow-xs);
}
/* video-thumb height is controlled by wrapper aspect-ratio — intentionally removed fixed height override */
.video-thumb-wrapper::before {
  background: rgba(0,0,0,0.22);
}
.video-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1.2;
  margin-bottom: 9px;
}
.video-card-body {
  padding: 15px 16px 16px;
}
.begin-workout-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: var(--shadow-accent);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s, opacity 0.15s;
}
.begin-workout-btn:active {
  transform: scale(0.965);
  box-shadow: 0 2px 8px rgba(43,61,106,0.18);
  opacity: 0.88;
}
.meta-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  letter-spacing: 0.1px;
}

/* ── COACH VIEW: Better chat bubbles ── */
.coach-bubble {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  color: var(--text-mid);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  box-shadow: var(--shadow-xs);
  font-size: 13.5px;
  line-height: 1.68;
  padding: 12px 16px;
}
.user-bubble {
  background: linear-gradient(145deg, var(--accent), var(--accent-light));
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  font-weight: 500;
  box-shadow: var(--shadow-accent);
  font-size: 13.5px;
  line-height: 1.68;
  padding: 12px 16px;
}
/* chat overrides consolidated above */

/* ── AUTH / PROFILE: Refined inputs ── */
input[type="email"],
input[type="password"],
input[type="text"],
select,
textarea {
  background: var(--bg3);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  font-size: 15px;
  padding: 14px 17px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(43,61,106,0.10), inset 0 1px 3px rgba(0,0,0,0.04);
}
.quick-link-btn {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs), var(--inner-highlight);
  border: 1px solid var(--border-mid);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.14s var(--ease-spring);
}
[data-theme="dark"] .quick-link-btn {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.quick-link-btn:active {
  background: var(--bg3);
  border-color: var(--border-mid);
  transform: scale(0.975);
  opacity: 0.85;
}

/* ── NUTRITION: Better overview card, macro bars ── */
.nt-overview-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .nt-overview-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.nt-pro-macro-bar {
  height: 6px;
  border-radius: 4px;
}
.nt-stat-chip {
  background: var(--bg2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  box-shadow: var(--shadow-xs);
}
.nt-qa-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.14s var(--ease-spring);
}
.nt-qa-btn:active {
  transform: scale(0.95);
  opacity: 0.78;
}
.nt-coach-banner {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}
.nt-dual-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.nt-split-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.nt-remaining-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.meal-item {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), transform 0.14s var(--ease-spring);
}
.meal-item:active {
  transform: scale(0.975);
  opacity: 0.85;
}

/* ── STATS VIEW: Cleaner snapshot, better chart ── */
.stats-hero {
  padding: 30px 20px 22px;
  background: linear-gradient(180deg, rgba(201,169,110,0.09) 0%, rgba(201,169,110,0.02) 100%);
  border-bottom: 1px solid rgba(201,169,110,0.12);
}
.stats-hero-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.04;
}
.stats-entry-card {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  border: 1px solid var(--border-mid);
}
[data-theme="dark"] .stats-entry-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.stats-metric-field {
  background: var(--bg3);
  border-radius: var(--radius-md);
  padding: 13px;
  border: 1px solid var(--border-mid);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}
.stats-metric-input {
  font-size: 21px;
  letter-spacing: -0.5px;
}
.stats-snapshot-card {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  border: 1px solid var(--border-mid);
}
[data-theme="dark"] .stats-snapshot-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.stats-snapshot-cell {
  background: var(--bg3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.stats-snap-val {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.stats-chart-card {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  border: 1px solid var(--border-mid);
}
[data-theme="dark"] .stats-chart-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.stats-history-row {
  background: var(--bg2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-fast), transform 0.14s var(--ease-spring);
}
.stats-history-row:active {
  transform: scale(0.975);
  opacity: 0.85;
}

/* ── COMMUNITY: Private Members Club override ── */
.community-post-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: none;
  transition: border-color 0.18s ease;
}
.community-post-card:first-child {
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .community-post-card {
  box-shadow: none;
  border-color: var(--border);
}
.community-post-card:active {
  transform: none;
  border-color: var(--gold-mid);
}
.post-body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.5px;
  line-height: 1.75;
  letter-spacing: 0;
  padding-left: 0;
  color: var(--text-mid);
  margin-bottom: 0;
}
.post-author {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  color: var(--text);
}
.post-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-mid);
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
}
.post-chip:active {
  transform: scale(0.94);
}
.post-chip.active {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  color: var(--gold);
  box-shadow: none;
}

/* ── PEPTIDES: Premium library feel ── */
.peptide-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform 0.14s var(--ease-spring);
}
[data-theme="dark"] .peptide-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
  border-color: rgba(255,255,255,0.08);
}
.peptide-card:active {
  transform: scale(0.985);
}
.peptide-card-header {
  padding: 16px 18px;
}
.peptide-name {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.peptide-card-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}
.peptide-detail-item {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  border: 1px solid var(--border-mid);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.peptide-benefit-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  letter-spacing: 0.05px;
}
.peptide-subtab {
  background: var(--bg3);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s var(--ease-out);
}
.peptide-subtab.active {
  background: var(--accent-mid);
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 2px 10px rgba(43,61,106,0.14);
}
.peptide-disclaimer {
  background: var(--gold-dim);
  border: 1px solid rgba(184,150,90,0.22);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  box-shadow: var(--shadow-xs);
}

/* ── HOME WIDGETS: Elevated ── */
.todays-plan-card {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .todays-plan-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.home-cal-ring-card {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .home-cal-ring-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.home-community-win {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .home-community-win {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.daily-score-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .daily-score-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.daily-score-card.score-perfect {
  border-color: rgba(201,169,110,0.38);
  box-shadow: 0 0 28px rgba(201,169,110,0.12), var(--shadow-sm);
}

/* ── IDENTITY & HABIT ITEMS ── */
.identity-inner {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .identity-inner {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}
.habit-item {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 14px 13px;
  box-shadow: var(--shadow-xs), var(--inner-highlight);
}
[data-theme="dark"] .habit-item {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.habit-item.done {
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.28);
  box-shadow: 0 0 0 1px rgba(43,61,106,0.10), var(--shadow-xs);
}
[data-theme="dark"] .habit-item.done {
  box-shadow: 0 0 0 1px rgba(82,114,168,0.16), var(--shadow-sm);
}
.habit-item.done .habit-check {
  box-shadow: 0 0 12px rgba(43,61,106,0.30);
}

/* ── NUDGE BANNER ── */
.nudge-banner {
  background: rgba(184,150,90,0.07);
  border: 1px solid rgba(184,150,90,0.20);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  box-shadow: var(--shadow-xs);
}

/* ── COACH MESSAGE CARD ── */
.coach-message-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .coach-message-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}

/* ── JOURNEY CARD ── */
.journey-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .journey-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}

/* ── ADMIN CARD ── */
.admin-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .admin-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}

/* ── MICRO-INTERACTIONS: Smoother throughout ── */
.view.active {
  animation: viewFadeIn 0.28s var(--ease-out) both;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
button {
  transition: transform 0.14s var(--ease-spring), opacity 0.14s var(--ease-out);
}
button:active {
  transition: transform 0.10s var(--ease-spring), opacity 0.10s;
}

/* ── TYPOGRAPHY: Editorial headings, refined body ── */
.coach-name {
  letter-spacing: -0.2px;
  line-height: 1.05;
}
.auth-title {
  font-size: 30px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.08;
}
.join-cta-title {
  line-height: 1.1;
  letter-spacing: -0.1px;
}
.identity-title {
  font-size: 26px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.comeback-title {
  font-size: 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.locked-title {
  font-size: 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.1px;
}
.stats-hero-title {
  font-size: 32px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* ── SCORE TASK CHIPS: Refined ── */
.score-task-chip {
  font-size: 9px;
  letter-spacing: 0.9px;
  border-radius: 4px;
  padding: 3px 8px;
  box-shadow: var(--shadow-xs);
}
.score-task-chip.done {
  color: var(--accent-light);
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.22);
}

/* ── SUBSCRIPTION CARD ── */
.sub-status-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-xs), var(--inner-highlight);
}

/* ── STREAK CARD ── */
.streak-hero-card {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}
[data-theme="dark"] .streak-hero-card {
  box-shadow: var(--shadow-md), var(--inner-highlight-dark);
}

/* ── GLOBAL CARD ELEVATION OVERRIDE ── */
.stat-card,
.identity-inner,
.habit-item,
.streak-hero-card,
.todays-plan-card,
.home-cal-ring-card,
.coach-message-card,
.video-card,
.journey-card,
.admin-card {
  /* Handled individually above with inner-highlight */
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .stat-card,
[data-theme="dark"] .identity-inner,
[data-theme="dark"] .habit-item,
[data-theme="dark"] .streak-hero-card,
[data-theme="dark"] .todays-plan-card,
[data-theme="dark"] .home-cal-ring-card,
[data-theme="dark"] .coach-message-card,
[data-theme="dark"] .video-card,
[data-theme="dark"] .journey-card,
[data-theme="dark"] .admin-card {
  box-shadow: var(--shadow-md);
}

/* ── LIGHT MODE SURFACE WARMTH: overridden by premium redesign below ── */
[data-theme="light"] .em-exec-card,
[data-theme="light"] .em-actions-list,
[data-theme="light"] .em-habit,
[data-theme="light"] .em-program-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .identity-inner,
[data-theme="light"] .habit-item,
[data-theme="light"] .coach-message-card,
[data-theme="light"] .daily-score-card,
[data-theme="light"] .video-card,
[data-theme="light"] .community-post-card,
[data-theme="light"] .community-composer,
[data-theme="light"] .todays-plan-card,
[data-theme="light"] .home-cal-ring-card,
[data-theme="light"] .home-community-win,
[data-theme="light"] .nt-overview-card,
[data-theme="light"] .stats-entry-card,
[data-theme="light"] .stats-snapshot-card,
[data-theme="light"] .stats-chart-card,
[data-theme="light"] .peptide-card,
[data-theme="light"] .journey-card,
[data-theme="light"] .admin-card {
  box-shadow: var(--shadow-sm), var(--inner-highlight);
}

/* ── MEALPLAN HEADER CARD ── */
.mealplan-header-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── QUICK WIN BTN ── */
.quick-win-btn {
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 15px 18px;
  box-shadow: var(--shadow-xs), var(--inner-highlight);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.14s var(--ease-spring), box-shadow 0.14s;
}
[data-theme="dark"] .quick-win-btn {
  box-shadow: var(--shadow-sm), var(--inner-highlight-dark);
}
.quick-win-btn:active {
  background: var(--bg3);
  transform: scale(0.972);
  opacity: 0.80;
  box-shadow: var(--shadow-xs);
}

/* ── START WORKOUT BTN ── */
.start-workout-btn {
  background: linear-gradient(145deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-accent);
  transition: opacity 0.16s var(--ease-out), transform 0.18s var(--ease-spring), box-shadow 0.16s;
}
.start-workout-btn:active {
  transform: scale(0.970);
  opacity: 0.88;
  box-shadow: 0 3px 12px rgba(43,61,106,0.18);
}

/* ── STATS / SAVE BUTTONS ── */
.stats-save-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.stats-save-btn:active {
  transform: scale(0.975);
  opacity: 0.88;
  box-shadow: 0 2px 8px rgba(43,61,106,0.18);
}
.tp-action-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-accent);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.tp-action-btn:active {
  transform: scale(0.975);
  opacity: 0.88;
  box-shadow: 0 2px 8px rgba(43,61,106,0.18);
}

/* ── COMMUNITY GATE CARD (override) ── */
.community-gate-card {
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* ── PROFILE AVATAR ── */
.profile-avatar-large {
  width: 72px;
  height: 72px;
  box-shadow: 0 0 32px rgba(43,61,106,0.18), var(--shadow-sm);
}

/* ── VIBE BUTTONS ── */
.vibe-btn {
  background: var(--bg2);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base), box-shadow var(--transition-base);
}
.vibe-btn.selected {
  background: var(--accent-dim);
  border-color: rgba(43,61,106,0.38);
  color: var(--accent-light);
  box-shadow: 0 2px 16px rgba(43,61,106,0.14), var(--shadow-xs);
}
.vibe-btn:active {
  transform: scale(0.92);
  opacity: 0.82;
}

/* ── CELEBRATION TOAST ── */
.celebration-toast {
  background: linear-gradient(160deg, #1E1D26 0%, #19181F 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* ── DAILY SCORE RING ── */
.daily-score-card {
  border-radius: var(--radius-lg);
}

/* ── PULSING DOT: More refined ── */
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.30; transform: scale(0.75); }
}
@keyframes msgDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.30; transform: scale(0.75); }
}

/* ── IDENTITY BAR: Slightly thicker ── */
.identity-bar-track {
  height: 4px;
  border-radius: 4px;
}
.identity-bar-fill {
  box-shadow: 0 0 10px rgba(43,61,106,0.32);
}

/* ── WORKOUT PROGRESS BAR: Thicker ── */
.workout-progress-track {
  height: 5px;
  border-radius: 5px;
}

/* ── PRINCIPLE ITEMS ── */
.principle-item {
  padding: 19px;
  transition: background var(--transition-fast);
}
.principle-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
}
.principle-sub {
  font-size: 12.5px;
  line-height: 1.65;
}

/* ── PROFILE BADGE PILL ── */
.profile-badge-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 11px;
  box-shadow: 0 2px 8px rgba(43,61,106,0.12);
}

/* ── LOCK CIRCLE ── */
.lock-circle {
  width: 52px;
  height: 52px;
  background: var(--accent-dim);
  border: 1px solid rgba(43,61,106,0.18);
  box-shadow: 0 0 24px rgba(43,61,106,0.12);
}

/* ── PREMIUM INPUT FOCUS RING: Warmer ── */
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3.5px rgba(43,61,106,0.11), inset 0 1px 3px rgba(0,0,0,0.04) !important;
  outline: none;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3.5px rgba(82,114,168,0.16), inset 0 1px 3px rgba(0,0,0,0.10) !important;
}

/* ── SCROLLBAR: Always hidden ── */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════
   FOOD DATABASE MODAL
══════════════════════════════════════════════════ */
.nutrition-modal-db {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Subtract tab bar (68px) + safe area so content is never hidden */
  max-height: calc(88vh - 68px - env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
}

/* ── Header: always 3-column grid so title is pixel-perfect centered ── */
.fdb-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  gap: 0;
}
.fdb-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  text-align: center;
  /* Prevent long food names from overflowing */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.fdb-back-btn,
.fdb-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s;
  /* Back btn left-aligns, close btn right-aligns */
}
.fdb-back-btn { justify-self: start; }
.fdb-close-btn { justify-self: end; }
.fdb-back-btn:active,
.fdb-close-btn:active {
  background: rgba(255,255,255,0.14);
  transform: scale(0.9);
}

/* ── Screens: consistent 20px horizontal padding, safe bottom ── */
#fdbScreenSearch,
#fdbScreenServing,
#fdbScreenCustom {
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Search box */
.fdb-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.fdb-search-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.fdb-search-input {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px 40px 12px 40px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.fdb-search-input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.09);
}
.fdb-search-input::placeholder { color: var(--text-muted); }
.fdb-search-clear {
  position: absolute;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Results */
.fdb-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}
.fdb-results-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 0 2px;
}
.fdb-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  color: var(--text);
}
.fdb-result-item:active {
  background: rgba(255,255,255,0.09);
  border-color: var(--gold);
}
.fdb-result-left { flex: 1; min-width: 0; }
.fdb-result-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fdb-result-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.fdb-result-arrow { color: var(--text-muted); flex-shrink: 0; }
.fdb-no-results {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  line-height: 1.5;
}
.fdb-custom-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(201,169,110,0.18);
  color: var(--gold);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.03em;
}

/* Custom food link */
.fdb-custom-link {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: 1.5px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 10px;
  transition: border-color 0.15s, color 0.15s;
}
.fdb-custom-link:active {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Serving screen ── */
.fdb-food-card {
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.22);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.fdb-food-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.fdb-food-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Amount + Unit inputs: equal height, aligned baseline */
.fdb-serving-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-end; /* align both inputs to same bottom edge */
}
.fdb-serving-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Amount gets 60% width, Unit gets 40% */
.fdb-serving-input-wrap:first-child { flex: 3; }
.fdb-serving-input-wrap:last-child  { flex: 2; }
.fdb-qty-input,
.fdb-unit-select {
  width: 100%;
  box-sizing: border-box;
  height: 48px;            /* explicit equal height on both */
  padding: 0 14px;
  line-height: 48px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.fdb-qty-input:focus,
.fdb-unit-select:focus { border-color: var(--gold); }

/* ── Macro preview: clear hierarchy, color-coded, well-spaced ── */
.fdb-macro-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0;
}
.fdb-macro-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  /* Vertical dividers between chips */
  border-right: 1px solid rgba(255,255,255,0.07);
}
.fdb-macro-chip:last-child { border-right: none; }

/* Value: larger and color-coded per macro */
.fdb-macro-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.5px;
}
/* Protein = blue, Carbs = green, Fats = warm */
.fdb-macro-chip:nth-child(2) .fdb-macro-val { color: var(--accent-light, #7EB8F7); }
.fdb-macro-chip:nth-child(3) .fdb-macro-val { color: #7EC8A0; }
.fdb-macro-chip:nth-child(4) .fdb-macro-val { color: #C49A6A; }

/* Label: clearly subordinate */
.fdb-macro-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Add to Log button — full width, proper top spacing */
.fdb-log-btn {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 14px;
}

/* Custom food screen */
.fdb-custom-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.fdb-custom-error {
  font-size: 12px;
  color: #E07070;
  margin: 6px 0 0;
  min-height: 16px;
}

/* Meal groups in the log */
.meal-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 0 6px;
  margin-top: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.meal-group-header:first-child { margin-top: 0; }
.meal-group-left {
  display: flex;
  align-items: center;
  gap: 7px;
}
.meal-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.meal-group-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.meal-group-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.meal-group-cals {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}
.meal-group-macros {
  font-size: 10px;
  color: var(--text-muted);
}
.meal-item-grouped {
  border-radius: 10px !important;
  margin-bottom: 3px !important;
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.05) !important;
  padding: 9px 10px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meal-item-info { flex: 1; min-width: 0; }
.meal-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================================
   RECIPE SYSTEM
   ============================================================ */
.rcp-filter-bar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 18px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rcp-filter-bar::-webkit-scrollbar { display: none; }
.rcp-filter-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-mid);
  background: var(--bg2);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.rcp-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
}
.rcp-suggest-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 18px 14px;
  padding: 10px 12px;
  background: var(--accent-dim);
  border: 1px solid rgba(82,114,168,0.22);
  border-radius: var(--radius-md);
}
.rcp-suggest-icon { color: var(--accent-light); flex-shrink: 0; margin-top: 1px; }
.rcp-suggest-text { font-size: 12.5px; color: var(--text-sub); line-height: 1.5; margin: 0; }
.rcp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 18px 14px;
}
.rcp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.rcp-card:active { transform: scale(0.96); box-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.rcp-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--bg3);
  transition: transform 0.3s ease;
}
.rcp-card:active .rcp-card-img { transform: scale(1.03); }
.rcp-card-img-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--accent-dim), var(--bg3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}
.rcp-card-img-fallback-icon { font-size: 36px; opacity: 0.7; }
.rcp-card-body { padding: 10px 11px 12px; }
.rcp-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rcp-card-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-muted); margin-bottom: 5px; }
.rcp-card-cals { font-size: 13px; font-weight: 700; color: var(--gold); }
.rcp-card-macros { font-size: 10px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.01em; }
.rcp-card-fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.50);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s, transform 0.15s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.rcp-card-fav:active { transform: scale(0.88); }
.rcp-card-fav.saved { color: #E8A838; background: rgba(0,0,0,0.65); }
.rcp-card-badge {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.rcp-card-badge.badge-hp { background: rgba(91,158,106,0.92); }
.rcp-card-badge.badge-lc { background: rgba(155,107,174,0.92); }
.rcp-card-badge.badge-quick { background: rgba(196,123,58,0.92); }
.rcp-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 36px);
  margin: 4px 18px 20px;
  padding: 13px;
  background: transparent;
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.rcp-create-btn:active { background: var(--accent-dim); border-color: var(--accent); }
.rcp-detail-modal {
  max-height: 92vh;
  overflow-y: auto;
  padding: 0 !important;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  position: relative;
}
.rcp-detail-hero {
  position: relative;
  height: 240px;
  background: var(--bg3);
  overflow: hidden;
}
.rcp-detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rcp-detail-hero-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--accent-dim), var(--bg3));
  display: flex; align-items: center; justify-content: center;
}
.rcp-detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.05) 100%);
  z-index: 1;
}
.rcp-detail-hero-content {
  position: absolute;
  bottom: 14px; left: 16px; right: 50px;
  z-index: 2;
}
.rcp-detail-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.rcp-detail-badge {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px;
  background: var(--accent); color: #fff;
}
.rcp-detail-badge.badge-hp { background: #5B9E6A; }
.rcp-detail-badge.badge-lc { background: #9B6BAE; }
.rcp-detail-badge.badge-quick { background: #C47B3A; }
.rcp-detail-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 700;
  color: #fff; margin: 0; line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.rcp-detail-desc { font-size: 12.5px; color: rgba(255,255,255,0.85); margin: 5px 0 2px; font-style: italic; line-height: 1.4; }
.rcp-detail-meta { font-size: 11.5px; color: rgba(255,255,255,0.8); margin-top: 4px; }
.rcp-detail-close {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 3;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
}
.rcp-detail-fav {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  width: 32px; height: 32px;
  background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  transition: color 0.2s;
}
.rcp-detail-fav.saved { color: #E8A838; }
.rcp-serving-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.rcp-serving-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; flex-shrink: 0; }
.rcp-serving-controls { display: flex; align-items: center; gap: 10px; }
.rcp-serving-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: var(--bg3);
  color: var(--text);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
}
.rcp-serving-val { font-size: 16px; font-weight: 700; color: var(--text); min-width: 24px; text-align: center; }
.rcp-scale-btns { display: flex; gap: 5px; margin-left: auto; }
.rcp-scale-btn {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-mid);
  background: var(--bg3);
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.rcp-scale-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.rcp-macro-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.rcp-macro-chip {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 6px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.rcp-macro-val { font-size: 15px; font-weight: 700; color: var(--text); }
.rcp-macro-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.rcp-macro-chip.chip-cal .rcp-macro-val { color: var(--gold); }
.rcp-macro-chip.chip-p .rcp-macro-val { color: var(--accent-light); }
.rcp-macro-chip.chip-c .rcp-macro-val { color: #7EB8A4; }
.rcp-macro-chip.chip-f .rcp-macro-val { color: #C47B3A; }
.rcp-fit-btn {
  display: flex;
  align-items: center; justify-content: center;
  gap: 7px;
  width: calc(100% - 32px);
  margin: 12px 16px 4px;
  padding: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(82,114,168,0.28);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  font-size: 12.5px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.rcp-fit-btn:active { background: var(--accent-mid); }
.rcp-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 6px;
  margin: 0;
}
.rcp-ingredients-list { padding: 0 16px 4px; display: flex; flex-direction: column; gap: 6px; }
.rcp-ingredient-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.rcp-ing-name { font-size: 13px; color: var(--text); font-weight: 500; }
.rcp-ing-right { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.rcp-ing-grams { font-size: 12px; font-weight: 700; color: var(--text-sub); }
.rcp-ing-macros { font-size: 10px; color: var(--text-muted); }
.rcp-steps-list {
  padding: 0 16px 4px 32px;
  display: flex; flex-direction: column; gap: 8px;
  margin: 0;
}
.rcp-steps-list li { font-size: 13px; color: var(--text-sub); line-height: 1.55; padding-left: 4px; }
.rcp-detail-tip {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 10px 16px 4px;
  padding: 10px 12px;
  background: rgba(43,61,106,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.5;
}
.rcp-detail-tip svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.rcp-log-row {
  display: flex; gap: 10px;
  padding: 14px 16px 20px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.rcp-log-btn { flex: 1; }
.rcp-log-full-btn {
  flex: 1; padding: 13px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.rcp-log-full-btn:active { background: var(--bg2); }
.rcp-create-modal { max-height: 90vh; overflow-y: auto; }
.rcp-create-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.rcp-create-header .rcp-detail-close { position: static; background: var(--bg3); color: var(--text-muted); }
.rcp-create-ing-row {
  display: flex; gap: 7px; align-items: flex-start;
  flex-wrap: wrap; position: relative; margin-top: 8px;
}
.rcp-create-ing-search { flex: 1; min-width: 120px; }
.rcp-create-ing-results {
  position: absolute;
  top: 44px; left: 0; right: 80px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  z-index: 10;
  max-height: 180px; overflow-y: auto;
}
.rcp-create-ing-result {
  padding: 9px 12px; font-size: 13px; color: var(--text);
  cursor: pointer; border-bottom: 1px solid var(--border);
}
.rcp-create-ing-result:last-child { border-bottom: none; }
.rcp-create-ing-result:active { background: var(--accent-dim); }
.rcp-add-ing-btn {
  padding: 10px 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; white-space: nowrap;
}
.rcp-create-ing-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 5px;
}
.rcp-create-ing-item-name { font-size: 12.5px; color: var(--text); }
.rcp-create-ing-item-right { display: flex; align-items: center; gap: 8px; }
.rcp-create-ing-item-g { font-size: 12px; color: var(--text-muted); }
.rcp-create-ing-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.rcp-empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; line-height: 1.6; }

/* ==============================
   DAILY REFLECTION — ELIZABETH MULKEY
============================== */

/* Gate */
.journal-gate-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 32px 40px;
  gap: 14px;
}
.journal-gate-icon {
  width: 60px; height: 60px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-light);
  margin-bottom: 6px;
  border: 1px solid rgba(43,61,106,0.18);
  box-shadow: 0 0 0 8px var(--accent-dim);
}
.journal-gate-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 26px; font-weight: 600;
  color: var(--text); margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.journal-gate-sub {
  font-size: 13.5px; color: var(--text-muted);
  line-height: 1.7; margin: 0 0 8px;
  font-style: italic;
}

/* ── Header ─────────────────────────────── */
.journal-header {
  padding: 52px 22px 20px;
  background: linear-gradient(180deg, rgba(168,132,62,0.05) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.journal-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.journal-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
  opacity: 0.75;
  font-family: 'DM Sans', sans-serif;
}
.journal-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 26px; font-weight: 600;
  color: var(--text); margin: 0;
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.journal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
  font-style: italic;
  letter-spacing: 0.2px;
  text-transform: none;
  font-weight: 400;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Streak badge ────────────────────────── */
.journal-streak-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--gold-dim);
  border: 1px solid var(--gold-mid);
  border-radius: 18px;
  padding: 12px 18px;
  min-width: 68px;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(168,132,62,0.12);
  transition: transform 0.2s ease;
}
[data-theme="dark"] .journal-streak-badge {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  box-shadow: 0 2px 20px rgba(200,160,96,0.18);
}
.journal-streak-num {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 28px; font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.5px;
}
.journal-streak-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.8;
}

/* ── Daily rotating prompt ───────────────── */
.journal-daily-prompt {
  margin: 20px 16px 0;
  padding: 18px 22px;
  background: var(--gold-dim);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.journal-daily-prompt::before {
  display: none;
}
[data-theme="dark"] .journal-daily-prompt {
  background: rgba(200,160,96,0.07);
}
.journal-daily-prompt-text {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 500;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.7;
  letter-spacing: 0.1px;
  position: relative; z-index: 1;
}
[data-theme="dark"] .journal-daily-prompt-text {
  color: var(--text);
}

/* ── Composer card ───────────────────────── */
.journal-composer {
  margin: 20px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
[data-theme="dark"] .journal-composer {
  background: var(--bg2);
  border-color: var(--border-mid);
  border-top-color: var(--gold);
  box-shadow: none;
}
.journal-composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  opacity: 0.9;
}
.journal-composer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-style: normal;
  font-family: 'DM Sans', sans-serif;
  color: var(--gold);
  margin: 0;
  opacity: 0.85;
}
.journal-composer-status {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.7;
}

/* ── Prompt chips ────────────────────────── */
.journal-prompts {
  margin-bottom: 24px;
}
.journal-prompts-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1px;
  text-transform: none;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-muted);
  margin: 0 0 12px;
  opacity: 0.85;
}
.journal-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.journal-prompt-chip {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  transition: all 0.18s ease;
  white-space: nowrap;
  letter-spacing: 0.1px;
  text-transform: none;
  box-shadow: none;
}
.journal-prompt-chip:active {
  transform: scale(0.95);
}
.journal-prompt-chip.selected {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  color: var(--gold);
  box-shadow: 0 2px 10px rgba(168,132,62,0.18);
  transform: none;
}
[data-theme="dark"] .journal-prompt-chip.selected {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  color: var(--gold);
  box-shadow: 0 2px 12px rgba(200,160,96,0.22);
}

/* ── Energy selector ─────────────────────── */
.journal-mood-row {
  margin-bottom: 24px;
}
.journal-mood-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1px;
  text-transform: none;
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--text-muted);
  margin: 0 0 12px;
  opacity: 0.85;
}
.journal-mood-btns {
  display: flex;
  gap: 7px;
}
.journal-mood-btn {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 12px 4px 10px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: none;
}
.journal-mood-btn:active {
  transform: scale(0.92);
}
.journal-mood-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.journal-mood-word {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.1px;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  text-transform: none;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.journal-mood-btn.selected {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168,132,62,0.18);
}
[data-theme="dark"] .journal-mood-btn.selected {
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  box-shadow: 0 4px 16px rgba(200,160,96,0.22);
}
.journal-mood-btn.selected .journal-mood-dot {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(168,132,62,0.4);
  transform: scale(1.3);
}
.journal-mood-btn.selected .journal-mood-word {
  color: var(--gold);
  font-weight: 600;
}

/* ── Writing surface ─────────────────────── */
.journal-textarea-wrap {
  position: relative;
  margin-bottom: 22px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.journal-textarea-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  pointer-events: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 0;
}
.journal-textarea-wrap:focus-within::before {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 2px rgba(43,61,106,0.18);
}
[data-theme="dark"] .journal-textarea-wrap:focus-within::before {
  box-shadow: 0 0 0 3px rgba(82,114,168,0.14), 0 2px 16px rgba(82,114,168,0.16);
}
.journal-textarea {
  width: 100%;
  min-height: 160px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  padding: 18px 16px 36px;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  resize: none;
  box-sizing: border-box;
  transition: none;
  letter-spacing: 0.2px;
  position: relative; z-index: 1;
  outline: none;
}
.journal-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.4;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
}
.journal-textarea:focus {
  outline: none;
  background: transparent;
}
.journal-char-count {
  position: absolute;
  bottom: 10px; right: 14px;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.35;
  font-family: 'DM Sans', sans-serif;
  z-index: 2;
  transition: opacity 0.2s;
}
.journal-textarea-wrap:focus-within .journal-char-count {
  opacity: 0.6;
}

/* ── Save button ─────────────────────────── */
.journal-save-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(168,132,62,0.28);
  transition: opacity 0.2s, transform 0.15s ease, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.journal-save-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .journal-save-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 4px 24px rgba(200,160,96,0.32);
}
.journal-save-btn:active {
  opacity: 0.88;
  transform: scale(0.978) translateY(1px);
  box-shadow: 0 2px 10px rgba(168,132,62,0.18);
}
.journal-save-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.journal-save-msg {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 10px 0 0;
  min-height: 16px;
}

/* ── History section ─────────────────────── */
.journal-history-section {
  margin: 28px 16px 100px;
}
.journal-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.journal-section-label {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  text-transform: none;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.2px;
}
.journal-entry-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ── Entry card ──────────────────────────── */
.journal-entry-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 20px;
  margin-bottom: 12px;
  position: relative;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
[data-theme="dark"] .journal-entry-card {
  box-shadow: 0 2px 20px rgba(0,0,0,0.32), 0 1px 5px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.03);
}
.journal-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.journal-entry-date {
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  text-transform: none;
  opacity: 0.9;
}
.journal-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.journal-entry-mood {
  font-size: 10.5px;
  font-weight: 400;
  font-style: italic;
  color: var(--accent-light);
  letter-spacing: 0.1px;
  text-transform: none;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  opacity: 0.8;
}
.journal-entry-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.35;
  transition: opacity 0.15s;
  font-size: 14px;
  line-height: 1;
}
.journal-entry-delete:active { opacity: 1; color: #C07070; }
.journal-entry-text {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.journal-entry-prompt {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 8px;
  letter-spacing: 0.1px;
  text-transform: none;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 400;
  opacity: 0.75;
}
.journal-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2px;
  text-transform: none;
  line-height: 1.9;
  font-style: italic;
  opacity: 0.7;
}

/* ── Today saved state ───────────────────── */
.journal-today-saved {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--accent-dim), rgba(43,61,106,0.03));
  border: 1px solid rgba(43,61,106,0.22);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 8px rgba(43,61,106,0.10);
}
[data-theme="dark"] .journal-today-saved {
  background: linear-gradient(135deg, rgba(82,114,168,0.12), rgba(82,114,168,0.04));
  border-color: rgba(82,114,168,0.25);
}
.journal-today-saved-icon {
  color: var(--accent-light);
  flex-shrink: 0;
}
.journal-today-saved-text {
  font-size: 12.5px;
  color: var(--accent-light);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.1px;
}

/* ================================================================
   PREMIUM HOME REDESIGN — Editorial, High-Performance Aesthetic
   ================================================================ */

/* ═══════════════════════════════════════════════
   HOME — PREMIUM REDESIGN v4
   Elite fitness command center
═══════════════════════════════════════════════ */

/* ── ICON BUTTONS (header) ── */
.em-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.26s ease;
  flex-shrink: 0;
}
.em-icon-btn:active { opacity: 0.45; transform: scale(0.91); }
[data-theme="dark"] .em-icon-btn { border-color: rgba(255,255,255,0.10); }

/* ── HERO HEADER ── */
.em-hero-header {
  padding: 58px 24px 0;
  background: var(--bg);
  position: relative;
}
.em-hero-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.em-hero-greeting-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.em-hero-greeting {
  font-family: 'DM Sans', sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.65;
}
.em-hero-date-line {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.45;
}

/* ── HERO IDENTITY BLOCK ── */
.em-hero-identity {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.em-hero-overline {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
  opacity: 0.7;
}
.em-hero-headline {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2.7rem, 10vw, 3.5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}
[data-theme="dark"] .em-hero-headline {
  color: #F5F3EE;
}
.em-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.5;
}

/* ── COACH SIGNAL STRIP ── */
.em-signal-strip {
  margin: 0 24px 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.em-signal-strip-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.em-signal-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-top: 7px;
  box-shadow: 0 0 8px rgba(168,132,62,0.5);
}
[data-theme="dark"] .em-signal-pip {
  background: var(--gold-light);
  box-shadow: 0 0 10px rgba(200,160,96,0.55);
}
.em-signal-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.5px;
  font-style: italic;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.68;
  margin: 0;
  letter-spacing: 0.02em;
}
[data-theme="dark"] .em-signal-quote {
  color: rgba(245,243,238,0.70);
}

/* ── COMMAND CARD — dominant training block ── */
.em-command-card {
  margin: 24px 24px 0;
  background: linear-gradient(160deg, #1E1D26 0%, #1A1822 100%);
  border-radius: 22px;
  padding: 30px 26px 28px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 20px 64px rgba(0,0,0,0.38),
    0 6px 20px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.em-command-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(168,132,62,0.5) 40%, rgba(168,132,62,0.5) 60%, transparent 100%);
}
.em-command-card::after {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(168,132,62,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.em-command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.em-command-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.35);
}
.em-command-day {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.28);
}
.em-command-workout {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  font-weight: 600;
  color: #F5F3EE;
  letter-spacing: -0.3px;
  line-height: 1.1;
  margin-bottom: 6px;
}
.em-command-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: rgba(245,243,238,0.38);
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-bottom: 26px;
}
.em-command-fuel {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
  background: rgba(255,255,255,0.035);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.055);
  padding: 16px 0;
}
.em-fuel-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.em-fuel-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.em-fuel-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #F5F3EE;
  line-height: 1;
  letter-spacing: -0.3px;
}
.em-fuel-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(245,243,238,0.30);
}
.em-execute-btn {
  width: 100%;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 14px;
  padding: 18px 22px;
  color: #18161A;
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.22s, transform 0.20s ease;
  box-shadow: 0 4px 22px rgba(0,0,0,0.28);
}
.em-execute-btn:active {
  opacity: 0.85;
  transform: scale(0.975);
}

/* ── STANDARDS STRIP — 3 metrics ── */
.em-standards-strip {
  margin: 24px 24px 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 0;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .em-standards-strip {
  background: var(--bg2);
  border-color: var(--border-mid);
}
.em-standard-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.em-std-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}
.em-std-num {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.em-std-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── BLOCK LABEL (section headers) ── */
.em-block-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
  margin: 0 0 14px;
  display: block;
}

/* ── DAILY STANDARDS HABITS BLOCK ── */
.em-habits-block {
  margin: 24px 24px 0;
}
.em-habits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.em-habit-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 4px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.26s ease;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .em-habit-tile {
  background: var(--bg2);
  border-color: var(--border-mid);
}
.em-habit-tile.done {
  background: #1A1920;
  border-color: rgba(255,255,255,0.10);
}
[data-theme="light"] .em-habit-tile.done {
  background: #1A1816;
}
.em-habit-tile:active { transform: scale(0.93); opacity: 0.75; }
.em-habit-tile-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.22s ease;
  flex-shrink: 0;
}
.em-habit-tile.done .em-habit-tile-check {
  background: #F5F3EE;
  border-color: #F5F3EE;
  color: #0F0E0D;
}
.em-habit-tile-name {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.8px;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0.65;
}
.em-habit-tile.done .em-habit-tile-name {
  color: rgba(245,243,238,0.7);
  opacity: 1;
}
[data-theme="light"] .em-habit-tile.done .em-habit-tile-name {
  color: rgba(245,243,238,0.65);
}

/* ── QUICK ACCESS BLOCK ── */
.em-quick-block {
  margin: 24px 24px 0;
}
.em-quick-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .em-quick-list {
  background: var(--bg2);
  border-color: var(--border-mid);
}
.em-quick-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.22s ease;
  text-align: left;
}
[data-theme="dark"] .em-quick-row { border-bottom-color: var(--border-mid); }
.em-quick-row:last-child { border-bottom: none; }
.em-quick-row:active { background: var(--bg3); }
.em-quick-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.7;
}
[data-theme="dark"] .em-quick-icon {
  background: var(--bg3);
  border-color: var(--border-mid);
}
.em-quick-label {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
}
.em-quick-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.35;
}

/* ── PROGRAM BLOCK ── */
.em-program-block {
  margin: 24px 24px 0;
}
.em-program-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .em-program-table {
  background: var(--bg2);
  border-color: var(--border-mid);
}
.em-program-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}
.em-program-divider {
  height: 1px;
  background: var(--border);
  margin: 0 18px;
  opacity: 0.5;
}
[data-theme="dark"] .em-program-divider { background: var(--border-mid); }
.em-program-key {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1px;
}
.em-program-val {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.1px;
}
.em-program-accent { color: var(--gold); }

/* ── FEATURED SESSIONS BLOCK ── */
.em-sessions-block {
  margin: 24px 0 0;
}
.em-sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  margin-bottom: 14px;
}
.em-view-all-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  opacity: 0.5;
}
.em-view-all-btn:active { opacity: 0.25; }

/* ── JOIN BLOCK (non-members) ── */
.em-join-block {
  position: relative;
  margin: 24px 24px 44px;
  border-radius: 24px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 14px 52px rgba(0,0,0,0.28), 0 4px 14px rgba(0,0,0,0.14);
  transition: transform 0.38s ease, box-shadow 0.38s ease;
}
.em-join-block:active { transform: scale(0.99); }
.em-join-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}
.em-join-block:hover .em-join-img { transform: scale(1.04); }
.em-join-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,8,0.97) 0%, rgba(5,5,8,0.55) 50%, rgba(5,5,8,0.08) 100%);
}
.em-join-content {
  position: relative;
  z-index: 2;
  padding: 36px 26px;
  width: 100%;
}
.em-join-overline {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 12px;
  opacity: 0.85;
}
.em-join-headline {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.08;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.em-join-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  color: rgba(255,255,255,0.48);
  line-height: 1.65;
  margin: 0 0 22px;
  font-weight: 400;
}
.em-join-cta-btn {
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 14px;
  padding: 16px 30px;
  color: #18161A;
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.22s, transform 0.20s ease;
  box-shadow: 0 4px 22px rgba(0,0,0,0.32);
}
.em-join-cta-btn:active { opacity: 0.82; transform: scale(0.97); }

/* ── NUDGE BANNER ── */
.nudge-banner {
  margin: 24px 24px 0;
  background: rgba(168,132,62,0.05);
  border: 1px solid rgba(168,132,62,0.13);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.62;
}

/* ── SCORE TASK CHIPS (used by JS) ── */
.score-task-chip {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.8;
}
.score-task-chip.done {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--gold-mid);
  opacity: 1;
}

/* ── SECTION ROW (legacy, used elsewhere) ── */
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  margin-bottom: 12px;
}
.em-see-all {
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
  opacity: 0.5;
}
.em-see-all:active { opacity: 0.25; }

/* ── HOME WORKOUTS SECTION (legacy wrapper) ── */
.home-workouts-section {
  padding: 22px 0 0;
}

/* ── JOIN CTA BLOCK (legacy IDs still used) ── */
.join-cta-block {
  position: relative;
  margin: 22px 22px 40px;
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 16px 56px rgba(0,0,0,0.35);
}
.join-cta-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.join-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,5,8,0.97) 0%, rgba(5,5,8,0.55) 50%, rgba(5,5,8,0.08) 100%);
}
.join-cta-content {
  position: relative;
  z-index: 2;
  padding: 36px 26px;
  width: 100%;
}
.join-cta-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0 0 12px;
  opacity: 0.85;
}
.join-cta-title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 7vw, 2.6rem);
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.08;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
}
.join-cta-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  color: rgba(255,255,255,0.48);
  line-height: 1.65;
  margin: 0 0 22px;
  font-weight: 400;
}

/* ── DARK MODE REFINEMENTS ── */
[data-theme="dark"] .em-hero-header {
  background: var(--bg);
}
[data-theme="dark"] .em-hero-identity {
  border-bottom-color: var(--border-mid);
}
[data-theme="dark"] .em-signal-strip {
  border-bottom-color: var(--border-mid);
}
[data-theme="dark"] .em-standards-strip {
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .em-std-divider {
  background: var(--border-mid);
}

/* ── LIGHT MODE REFINEMENTS ── */
[data-theme="light"] .em-hero-headline {
  color: #0F0E0D;
}
[data-theme="light"] .em-command-card {
  background: linear-gradient(160deg, #1C1B24 0%, #17161E 100%);
}

/* ═══════════════════════════════════════════════════════════════
   PEP2 — PREMIUM PEPTIDE SYSTEM REDESIGN
   Clinical. Disciplined. Phase-based. Earned access.
═══════════════════════════════════════════════════════════════ */

/* ── Header ── */
.pep2-header {
  margin: 0 16px 14px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 18px;
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
}
.pep2-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(82,114,168,0.65) 0%, rgba(82,114,168,0.12) 55%, transparent 100%);
}
.pep2-header::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(43,61,106,0.06) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .pep2-header {
  background: linear-gradient(160deg, #13131A 0%, #0E0E14 100%);
  border-color: rgba(82,114,168,0.16);
  box-shadow: 0 4px 28px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="light"] .pep2-header {
  background: linear-gradient(160deg, #ffffff 0%, #f6f5f2 100%);
  border-color: rgba(43,61,106,0.10);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.pep2-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pep2-eyebrow {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.85;
  margin-bottom: 4px;
}
[data-theme="light"] .pep2-eyebrow {
  color: var(--accent);
  opacity: 0.75;
}
.pep2-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.0;
  letter-spacing: -0.6px;
}
.pep2-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.pep2-phase-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: 8px;
  padding: 7px 12px;
  flex-shrink: 0;
  gap: 2px;
}
[data-theme="light"] .pep2-phase-badge {
  background: rgba(43,61,106,0.06);
  border-color: rgba(43,61,106,0.16);
}
.pep2-phase-label {
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.8;
}
[data-theme="light"] .pep2-phase-label {
  color: var(--accent);
}
.pep2-phase-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.3px;
}
[data-theme="light"] .pep2-phase-name {
  color: var(--accent);
}

/* Phase Track */
.pep2-phase-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}
.pep2-phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.pep2-phase-step span {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.45;
  transition: opacity 0.3s, color 0.3s;
  white-space: nowrap;
}
.pep2-phase-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-mid);
  border: 1.5px solid var(--border);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.pep2-phase-step.active .pep2-phase-dot {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 8px rgba(82,114,168,0.45);
}
[data-theme="light"] .pep2-phase-step.active .pep2-phase-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(43,61,106,0.30);
}
.pep2-phase-step.active span {
  color: var(--accent-light);
  opacity: 1;
}
[data-theme="light"] .pep2-phase-step.active span {
  color: var(--accent);
}
.pep2-phase-step.unlocked .pep2-phase-dot {
  background: rgba(82,114,168,0.30);
  border-color: rgba(82,114,168,0.45);
}
.pep2-phase-step.unlocked span {
  opacity: 0.55;
  color: var(--text-muted);
}
.pep2-phase-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.5;
  margin: 0 6px;
  margin-bottom: 14px;
  transition: background 0.3s;
}
.pep2-phase-line.active {
  background: rgba(82,114,168,0.45);
  opacity: 1;
}

/* ── Tab Row ── */
.pep2-tab-row {
  display: flex;
  gap: 5px;
  padding: 0 16px 12px;
}
.pep2-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  padding: 9px 4px 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.3px;
}
.pep2-tab svg { opacity: 0.4; transition: opacity 0.18s; }
.pep2-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent-mid);
  color: var(--accent-light);
  font-weight: 700;
}
.pep2-tab.active svg { opacity: 0.9; color: var(--accent-light); }
.pep2-tab:active { transform: scale(0.96); }
[data-theme="dark"] .pep2-tab.active {
  background: rgba(82,114,168,0.10);
  border-color: rgba(82,114,168,0.25);
  color: var(--accent-light);
}
[data-theme="light"] .pep2-tab.active {
  background: rgba(43,61,106,0.06);
  border-color: rgba(43,61,106,0.18);
  color: var(--accent);
}

/* ── Panel ── */
.pep2-panel { display: block; }

/* ── Protocol Builder ── */
.pep2-builder-card {
  margin: 0 16px 18px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  padding: 22px 20px 20px;
  position: relative;
  overflow: hidden;
}
.pep2-builder-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(43,61,106,0.55) 0%, rgba(43,61,106,0.12) 50%, transparent 100%);
}
.pep2-builder-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(43,61,106,0.04) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .pep2-builder-card {
  background: linear-gradient(160deg, #16161A 0%, #111113 100%);
  border-color: rgba(82,114,168,0.14);
  box-shadow: 0 4px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="light"] .pep2-builder-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8f7f4 100%);
  border-color: rgba(43,61,106,0.10);
  box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
}
.pep2-builder-eyebrow {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  opacity: 0.8;
  margin-bottom: 6px;
}
[data-theme="light"] .pep2-builder-eyebrow {
  color: var(--accent);
  opacity: 0.7;
}
.pep2-builder-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.15;
  letter-spacing: -0.3px;
}
.pep2-builder-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 20px;
  opacity: 0.75;
  letter-spacing: 0.1px;
}

/* ── Goal Grid — 2-column, premium card layout ── */
.pep2-goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Goal Cards ── */
.pep2-goal-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 16px 14px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-align: left;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.pep2-goal-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
/* Goal-specific subtle identity tints — barely noticeable */
.pep2-goal-btn[data-goal="fat-loss"]::before    { background: linear-gradient(135deg, rgba(43,61,106,0.04) 0%, transparent 60%); }
.pep2-goal-btn[data-goal="muscle"]::before      { background: linear-gradient(135deg, rgba(43,61,106,0.06) 0%, transparent 60%); }
.pep2-goal-btn[data-goal="recovery"]::before    { background: linear-gradient(135deg, rgba(43,61,106,0.03) 0%, transparent 60%); }
.pep2-goal-btn[data-goal="longevity"]::before   { background: linear-gradient(135deg, rgba(43,61,106,0.05) 0%, transparent 60%); }
.pep2-goal-btn[data-goal="cognitive"]::before   { background: linear-gradient(135deg, rgba(43,61,106,0.06) 0%, transparent 60%); }
.pep2-goal-btn[data-goal="sleep"]::before       { background: linear-gradient(135deg, rgba(43,61,106,0.07) 0%, transparent 60%); }

.pep2-goal-btn:active {
  transform: scale(0.975);
}

/* DARK unselected */
[data-theme="dark"] .pep2-goal-btn {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.04);
}
/* LIGHT unselected */
[data-theme="light"] .pep2-goal-btn {
  background: #ffffff;
  border-color: rgba(20,18,14,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

/* SELECTED state — blue accent, premium */
.pep2-goal-btn.selected {
  border-color: rgba(43,61,106,0.45);
  box-shadow: 0 0 0 1px rgba(43,61,106,0.20), 0 4px 20px rgba(43,61,106,0.12);
  transform: scale(1.025);
}
.pep2-goal-btn.selected::before {
  opacity: 1;
}
[data-theme="dark"] .pep2-goal-btn.selected {
  background: rgba(82,114,168,0.09);
  border-color: rgba(82,114,168,0.38);
  box-shadow: 0 0 0 1px rgba(82,114,168,0.20), 0 4px 24px rgba(82,114,168,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: scale(1.025);
}
[data-theme="light"] .pep2-goal-btn.selected {
  background: rgba(43,61,106,0.04);
  border-color: rgba(43,61,106,0.28);
  box-shadow: 0 0 0 1px rgba(43,61,106,0.12), 0 4px 20px rgba(43,61,106,0.10);
}

/* ── Goal Icon ── */
.pep2-goal-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}
[data-theme="dark"] .pep2-goal-icon {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.09);
}
[data-theme="light"] .pep2-goal-icon {
  background: #f0eee8;
  border-color: rgba(20,18,14,0.09);
}
.pep2-goal-btn.selected .pep2-goal-icon {
  background: rgba(43,61,106,0.10);
  border-color: rgba(43,61,106,0.25);
  color: var(--accent-light);
}
[data-theme="dark"] .pep2-goal-btn.selected .pep2-goal-icon {
  background: rgba(82,114,168,0.14);
  border-color: rgba(82,114,168,0.30);
  color: var(--accent-light);
}

/* ── Goal Name & Sub ── */
.pep2-goal-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05px;
  line-height: 1.2;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.pep2-goal-btn.selected .pep2-goal-name {
  color: var(--accent-light);
}
[data-theme="light"] .pep2-goal-btn.selected .pep2-goal-name {
  color: var(--accent);
}
.pep2-goal-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.35;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Selection indicator line on selected card ── */
.pep2-goal-btn.selected::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
  border-radius: 14px 0 0 14px;
  opacity: 0.8;
}
[data-theme="dark"] .pep2-goal-btn.selected::after {
  background: linear-gradient(180deg, rgba(107,139,196,0.9) 0%, rgba(82,114,168,0.7) 100%);
}

/* Protocol Output */
.pep2-protocol-output {
  animation: pep2FadeIn 0.3s ease;
}
@keyframes pep2FadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pep2-protocol-header {
  margin: 0 16px 10px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-mid);
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}
.pep2-protocol-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
}
.pep2-protocol-header.goal-fat-loss::before   { background: linear-gradient(90deg, #C8A060, transparent); }
.pep2-protocol-header.goal-muscle::before     { background: linear-gradient(90deg, #5272A8, transparent); }
.pep2-protocol-header.goal-recovery::before   { background: linear-gradient(90deg, #70A888, transparent); }
.pep2-protocol-header.goal-longevity::before  { background: linear-gradient(90deg, #8898B8, transparent); }
.pep2-protocol-header.goal-cognitive::before  { background: linear-gradient(90deg, #9888C8, transparent); }
.pep2-protocol-header.goal-sleep::before      { background: linear-gradient(90deg, #7898B8, transparent); }
[data-theme="dark"] .pep2-protocol-header {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.08);
}
[data-theme="light"] .pep2-protocol-header {
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.pep2-protocol-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pep2-protocol-eyebrow {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
  margin-bottom: 3px;
}
.pep2-protocol-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.pep2-protocol-duration {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 5px;
  padding: 4px 10px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.pep2-protocol-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Phase Cards */
.pep2-phase-card {
  margin: 0 16px 10px;
  border: 1px solid var(--border-mid);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg2);
}
[data-theme="dark"] .pep2-phase-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .pep2-phase-card {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pep2-phase-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.pep2-phase-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pep2-phase-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(168,132,62,0.1);
  border: 1px solid rgba(168,132,62,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}
.pep2-phase-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.1px;
}
.pep2-phase-card-weeks {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  white-space: nowrap;
}
.pep2-phase-card-body {
  padding: 14px 16px;
}
.pep2-phase-goal {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
  font-style: italic;
}
.pep2-compound-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.pep2-compound-row:last-child { border-bottom: none; }
.pep2-compound-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 5px;
}
.pep2-compound-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.pep2-compound-detail {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
}
.pep2-compound-timing {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  padding: 2px 7px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  align-self: flex-start;
}

/* Disclaimer */
.pep2-disclaimer,
.pep-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 14px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  opacity: 0.75;
}
.pep2-disclaimer svg,
.pep-disclaimer svg { flex-shrink: 0; color: var(--text-muted); }

/* ── Adherence Panel ── */
.pep2-adherence-card {
  margin: 0 16px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.pep2-adherence-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(168,132,62,0.5), transparent 60%);
}
[data-theme="dark"] .pep2-adherence-card {
  background: linear-gradient(135deg, #1c1b19 0%, #201f1c 100%);
  border-color: rgba(201,169,110,0.16);
}
[data-theme="light"] .pep2-adherence-card {
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
.pep2-adherence-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.pep2-adherence-eyebrow {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  margin-bottom: 4px;
}
.pep2-adherence-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

/* Progress Ring */
.pep2-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.pep2-ring {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}
.pep2-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
  opacity: 0.4;
}
.pep2-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1);
}
.pep2-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.pep2-ring-pct {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
}
.pep2-ring-sub {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Week dots */
.pep2-week-row {
  display: flex;
  justify-content: space-between;
  gap: 3px;
  margin-bottom: 16px;
}
.pep2-week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.pep2-week-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pep2-week-day.done .pep2-week-dot {
  background: rgba(168,132,62,0.15);
  border-color: rgba(168,132,62,0.45);
  box-shadow: 0 0 8px rgba(168,132,62,0.2);
}
[data-theme="dark"] .pep2-week-day.done .pep2-week-dot {
  background: rgba(201,169,110,0.18);
  border-color: rgba(201,169,110,0.5);
}
.pep2-week-day span {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
}

/* Stats row */
.pep2-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pep2-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 3px;
}
.pep2-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.5px;
}
.pep2-stat-label {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}
.pep2-stat-div {
  width: 1px;
  height: 28px;
  background: var(--border);
  opacity: 0.6;
}

/* Locked Card */
.pep2-locked-card {
  margin: 0 16px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.pep2-locked-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(168,132,62,0.3), transparent 60%);
}
[data-theme="dark"] .pep2-locked-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .pep2-locked-card {
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.pep2-locked-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pep2-locked-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(168,132,62,0.08);
  border: 1px solid rgba(168,132,62,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}
.pep2-locked-icon.unlocked {
  background: rgba(90,140,110,0.1);
  border-color: rgba(90,140,110,0.3);
  color: #70A888;
}
.pep2-locked-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.pep2-locked-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.pep2-locked-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.pep2-locked-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pep2-locked-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(168,132,62,0.7), rgba(168,132,62,1));
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.pep2-locked-progress-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.pep2-locked-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pep2-locked-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.55;
  filter: blur(0.4px);
}
.pep2-locked-item svg { flex-shrink: 0; color: var(--text-muted); opacity: 0.5; }
.pep2-unlocked-content { display: flex; flex-direction: column; gap: 12px; }
.pep2-unlocked-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #70A888;
  margin-bottom: 4px;
}
.pep2-unlocked-protocol {
  padding: 12px 14px;
  background: rgba(90,140,110,0.05);
  border: 1px solid rgba(90,140,110,0.15);
  border-radius: 10px;
}
.pep2-unlocked-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.pep2-unlocked-detail {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Log Card */
.pep2-log-card {
  margin: 0 16px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 16px 18px;
}
[data-theme="dark"] .pep2-log-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .pep2-log-card {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pep2-log-header {
  margin-bottom: 10px;
}
.pep2-log-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}
.pep2-log-date-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pep2-log-date-row::-webkit-scrollbar { display: none; }
.pep2-date-chip {
  font-size: 10px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 5px;
  padding: 4px 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pep2-date-chip.active {
  background: rgba(168,132,62,0.08);
  border-color: rgba(168,132,62,0.3);
  color: var(--gold);
}
.pep2-select-wrap {
  position: relative;
}
.pep2-select-wrap::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
  opacity: 0.6;
}
.pep2-select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  box-sizing: border-box;
}
.pep2-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border-mid);
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  box-sizing: border-box;
}
.pep2-input::placeholder { color: var(--text-muted); opacity: 0.55; }
.pep2-inject-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.65;
  margin: 12px 0 8px;
}
.pep2-site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 4px;
}
.pep2-log-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: rgba(168,132,62,0.1);
  border: 1px solid rgba(168,132,62,0.3);
  border-radius: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s;
}
.pep2-log-btn:active {
  background: rgba(168,132,62,0.18);
  transform: scale(0.98);
}

/* History Card */
.pep2-history-card {
  margin: 0 16px 12px;
  background: var(--bg2);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 16px 18px;
}
.pep2-empty-msg {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.55;
  text-align: center;
  padding: 12px 0 4px;
}
[data-theme="dark"] .pep2-history-card {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="light"] .pep2-history-card {
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pep2-history-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.1px;
}

/* ═══════════════════════════════════════════════════════════════
   PEPTIDE SECTION — MOBILE-FIRST RESPONSIVE FIXES
   Targets 320px–480px where layout breaks occur
═══════════════════════════════════════════════════════════════ */

/* ── Shared: prevent any card from overflowing the viewport ── */
.pep2-header,
.pep2-builder-card,
.pep2-protocol-header,
.pep2-phase-card,
.pep2-adherence-card,
.pep2-locked-card,
.pep2-log-card,
.pep2-history-card,
.pep-card,
.pep-synergy-card,
.pep-synergy-intro {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

/* ── Tab row: prevent label overflow on very small screens ── */
@media (max-width: 380px) {
  .pep2-tab {
    font-size: 8.5px;
    padding: 8px 2px 7px;
    gap: 3px;
  }
  .pep2-tab svg {
    width: 12px;
    height: 12px;
  }
}

/* ── Header: tighten on small screens ── */
@media (max-width: 380px) {
  .pep2-header {
    padding: 14px 14px 12px;
    margin: 0 12px 12px;
  }
  .pep2-title {
    font-size: 24px;
  }
  .pep2-sub {
    font-size: 10.5px;
  }
  .pep2-phase-badge {
    padding: 5px 9px;
  }
  .pep2-phase-name {
    font-size: 10px;
  }
}

/* ── Phase track: shrink labels on tiny screens ── */
@media (max-width: 360px) {
  .pep2-phase-step span {
    font-size: 7px;
    letter-spacing: 0;
  }
  .pep2-phase-dot {
    width: 7px;
    height: 7px;
  }
}

/* ── Goal grid: already 2-col below 360px via earlier rule ──
   Also shrink icon on very small screens ── */
@media (max-width: 360px) {
  .pep2-goal-btn {
    padding: 13px 11px 12px;
  }
  .pep2-goal-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .pep2-goal-icon svg {
    width: 14px;
    height: 14px;
  }
  .pep2-builder-card {
    padding: 16px 14px 14px;
    margin: 0 12px 14px;
  }
  .pep2-builder-title {
    font-size: 20px;
  }
  .pep2-builder-sub {
    font-size: 10px;
    margin-bottom: 14px;
  }
  .pep2-goal-grid {
    gap: 8px;
  }
}

/* ── Adherence ring: prevent overflow on 320px ── */
@media (max-width: 340px) {
  .pep2-ring-wrap,
  .pep2-ring {
    width: 68px;
    height: 68px;
  }
  .pep2-ring-pct {
    font-size: 14px;
  }
  .pep2-stat-num {
    font-size: 18px;
  }
}

/* ── Week dots: shrink on 320px to prevent overflow ── */
@media (max-width: 360px) {
  .pep2-week-dot {
    width: 22px;
    height: 22px;
  }
  .pep2-week-day span {
    font-size: 7.5px;
  }
}

/* ── Library cards: tighten padding on small screens ── */
@media (max-width: 380px) {
  .pep-card {
    margin: 0 12px 7px;
  }
  .pep-card-header {
    padding: 13px 14px;
    gap: 8px;
  }
  .pep-card-body {
    padding: 12px 14px 16px;
  }
  .pep-name {
    font-size: 18px;
  }
  .pep-benefit-line {
    font-size: 10.5px;
  }
  .pep-detail-grid {
    gap: 5px;
  }
  .pep-detail-item {
    padding: 8px 10px;
  }
  .pep-detail-val {
    font-size: 12px;
  }
}

/* ── Filter row: already scrollable, just tighten gaps ── */
@media (max-width: 380px) {
  .pep-filter-row {
    padding: 0 12px 12px;
    gap: 5px;
  }
  .pep-filter-btn {
    font-size: 10px;
    padding: 4px 10px;
  }
}

/* ── Category header: tighten margins ── */
@media (max-width: 380px) {
  .pep-category-header {
    margin: 12px 12px 8px;
  }
  .pep2-disclaimer,
  .pep-disclaimer {
    margin: 0 12px 12px;
  }
}

/* ── Synergy panel: tighten on small screens ── */
@media (max-width: 380px) {
  .pep-synergy-intro {
    margin: 0 12px 12px;
    padding: 12px 14px;
  }
  .pep-synergy-card {
    margin: 0 12px 8px;
    padding: 13px 14px;
  }
  .pep-synergy-name {
    font-size: 16px;
  }
}

/* ── Log card: tighten inputs on small screens ── */
@media (max-width: 380px) {
  .pep2-log-card,
  .pep2-history-card,
  .pep2-locked-card,
  .pep2-adherence-card {
    margin-left: 12px;
    margin-right: 12px;
    padding: 14px 14px;
  }
  .pep2-select,
  .pep2-input {
    font-size: 12px;
    padding: 9px 10px;
  }
  .pep2-select {
    padding-right: 28px;
  }
  .pep2-log-btn {
    padding: 11px;
    font-size: 12px;
  }
}

/* ── Protocol output cards ── */
@media (max-width: 380px) {
  .pep2-protocol-header {
    margin: 0 12px 8px;
    padding: 13px 14px;
  }
  .pep2-phase-card {
    margin: 0 12px 8px;
  }
  .pep2-protocol-name {
    font-size: 19px;
  }
  .pep2-compound-name {
    font-size: 12px;
  }
}

/* ============================================================
   FEMININE REFINEMENT LAYER
   Quiet confidence — soft, elevated, magnetic
   Applied on top of all existing styles
============================================================ */

/* ── GLOBAL BODY RHYTHM ── */
body {
  letter-spacing: 0.012em;
  line-height: 1.6;
}

/* ── LIGHT THEME: Warm pearl surfaces ── */
[data-theme="light"] {
  --bg:        #F8F6F3;
  --bg2:       #F1EEE9;
  --bg3:       #E9E5DF;
  --bg4:       #DED9D1;
  --surface:   #FDFCFA;
  --surface2:  #F5F2ED;
  --border:    rgba(80,70,60,0.055);
  --border-mid: rgba(80,70,60,0.09);
  --border-strong: rgba(80,70,60,0.15);
}

/* ── DARK THEME: Deep blue-charcoal, never flat black ── */
[data-theme="dark"] {
  --bg:        #15141C;
  --bg2:       #1D1C26;
  --bg3:       #252430;
  --bg4:       #2F2E3C;
  --surface:   #191820;
  --surface2:  #21202C;
}

/* ── APP SHELL: Subtle gradient warmth ── */
[data-theme="light"] #app {
  background: linear-gradient(180deg, #F8F6F3 0%, #F4F1EC 100%);
}
[data-theme="dark"] #app {
  background: linear-gradient(180deg, #15141C 0%, #131219 100%);
}

/* ── CARD SOFTNESS: Inner glow + breathable padding ── */
[data-theme="light"] .em-exec-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .journey-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .todays-plan-card,
[data-theme="light"] .home-cal-ring-card,
[data-theme="light"] .daily-score-card,
[data-theme="light"] .identity-inner,
[data-theme="light"] .streak-hero-card,
[data-theme="light"] .stats-entry-card,
[data-theme="light"] .stats-snapshot-card,
[data-theme="light"] .stats-chart-card,
[data-theme="light"] .peptide-card,
[data-theme="light"] .nt-overview-card,
[data-theme="light"] .video-card,
[data-theme="light"] .quick-link-btn {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(61,90,138,0.06), 0 1px 4px rgba(30,28,25,0.04), inset 0 1px 0 rgba(255,255,255,0.80);
  border-color: rgba(80,70,60,0.07);
}

[data-theme="dark"] .em-exec-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .journey-card,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .todays-plan-card,
[data-theme="dark"] .home-cal-ring-card,
[data-theme="dark"] .daily-score-card,
[data-theme="dark"] .identity-inner,
[data-theme="dark"] .streak-hero-card,
[data-theme="dark"] .stats-entry-card,
[data-theme="dark"] .stats-snapshot-card,
[data-theme="dark"] .stats-chart-card,
[data-theme="dark"] .peptide-card,
[data-theme="dark"] .nt-overview-card,
[data-theme="dark"] .video-card,
[data-theme="dark"] .quick-link-btn {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 100%);
  box-shadow: 0 2px 14px rgba(0,0,0,0.32), 0 1px 4px rgba(0,0,0,0.22), inset 0 1px 0 rgba(180,175,210,0.08);
  border-color: rgba(180,175,210,0.09);
}

/* ── BUTTONS: Refined, inviting, never aggressive ── */
.btn-primary,
.em-cta-btn,
.em-action-btn {
  border-radius: var(--radius-lg) !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 15px 30px !important;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-spring), box-shadow 0.22s !important;
}
.btn-primary:hover,
.em-cta-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(61,90,138,0.28), 0 2px 8px rgba(61,90,138,0.14) !important;
}
.btn-primary:active,
.em-cta-btn:active {
  transform: scale(0.972) translateY(0) !important;
  opacity: 0.88 !important;
}

.btn-ghost,
.btn-outline {
  border-radius: var(--radius-lg) !important;
  text-transform: none !important;
  letter-spacing: 0.2px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
.btn-ghost:hover {
  border-color: var(--accent-mid) !important;
  background: var(--accent-dim) !important;
}

/* ── HEADER: Lighter, more editorial ── */
.em-brand {
  font-weight: 500 !important;
  letter-spacing: 0.2px !important;
}
.em-eyebrow,
.em-brand-sub {
  letter-spacing: 2.5px !important;
  font-weight: 500 !important;
  opacity: 0.75 !important;
}

/* ── SECTION LABELS: Softer, less dense ── */
.section-label,
.em-section-label,
.view-section-label {
  letter-spacing: 1.8px !important;
  font-weight: 500 !important;
  opacity: 0.65 !important;
}

/* ── TAB BAR: Elegant indicator ── */
[data-theme="light"] .tab-bar {
  background: rgba(248,246,243,0.95);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid rgba(80,70,60,0.07);
}
[data-theme="dark"] .tab-bar {
  background: rgba(19,18,25,0.96);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid rgba(180,175,210,0.07);
}
.tab-item.active::before {
  width: 24px !important;
  height: 2px !important;
  border-radius: 0 0 3px 3px !important;
  background: linear-gradient(90deg, var(--accent), var(--accent-light)) !important;
  opacity: 1 !important;
}
.tab-label {
  letter-spacing: 0.6px !important;
  font-weight: 400 !important;
}

/* ── INPUT FIELDS: Softer, more breathable ── */
input, textarea, select {
  border-radius: var(--radius-md) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: var(--surface) !important;
  border-color: rgba(80,70,60,0.12) !important;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--bg2) !important;
  border-color: rgba(180,175,210,0.12) !important;
}

/* ── PROGRESS BARS: Softer gradient fills ── */
[data-theme="light"] .em-progress-fill,
[data-theme="light"] .progress-fill,
[data-theme="light"] .macro-fill {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%) !important;
  border-radius: var(--radius-full) !important;
}
[data-theme="dark"] .em-progress-fill,
[data-theme="dark"] .progress-fill,
[data-theme="dark"] .macro-fill {
  background: linear-gradient(90deg, var(--accent-light) 0%, #7B9ED4 100%) !important;
  border-radius: var(--radius-full) !important;
}

/* ── MODALS & SHEETS: Elevated, soft ── */
[data-theme="light"] .bottom-sheet,
[data-theme="light"] .modal-inner,
[data-theme="light"] .wm-content {
  background: var(--surface) !important;
  box-shadow: 0 -8px 48px rgba(61,90,138,0.10), 0 -2px 12px rgba(30,28,25,0.06) !important;
  border-top: 1px solid rgba(80,70,60,0.07) !important;
}
[data-theme="dark"] .bottom-sheet,
[data-theme="dark"] .modal-inner,
[data-theme="dark"] .wm-content {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%) !important;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.48), 0 -2px 12px rgba(0,0,0,0.32) !important;
  border-top: 1px solid rgba(180,175,210,0.08) !important;
}

/* ── SCROLLABLE CARDS: Hover lift ── */
.workout-scroll-card:hover,
.video-card:hover,
.journey-card:hover {
  transform: translateY(-2px) !important;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s !important;
}

/* ── FILTER PILLS: Softer active state ── */
[data-theme="light"] .filter-pill.active,
[data-theme="light"] .filter-chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 10px rgba(61,90,138,0.22) !important;
}
[data-theme="dark"] .filter-pill.active,
[data-theme="dark"] .filter-chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 12px rgba(82,114,168,0.30) !important;
}

/* ── LANDING PAGE: Elevated hero ── */
[data-theme="light"] .landing-hero,
[data-theme="light"] .hero-section {
  background: linear-gradient(180deg, #F0EDE8 0%, #EBE7E1 100%) !important;
}

/* ── CELEBRATION TOAST: Softer pop ── */
.celebration-toast {
  background: linear-gradient(160deg, #1E1D26 0%, #19181F 100%) !important;
  border: 1px solid rgba(180,175,210,0.12) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.40), 0 2px 10px rgba(0,0,0,0.24) !important;
  border-radius: var(--radius-xl) !important;
}

/* ── NUDGE BANNER: Softer background ── */
[data-theme="light"] .nudge-banner {
  background: linear-gradient(135deg, var(--accent-dim) 0%, rgba(61,90,138,0.04) 100%) !important;
  border-color: rgba(61,90,138,0.10) !important;
}

/* ── MILESTONE & GATE CARDS: Soft gradient backgrounds ── */
[data-theme="light"] .milestone-card,
[data-theme="light"] .community-gate-card,
[data-theme="light"] .stats-gate-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg2) 100%) !important;
  box-shadow: 0 4px 32px rgba(61,90,138,0.08), 0 1px 8px rgba(30,28,25,0.05) !important;
}
[data-theme="dark"] .milestone-card,
[data-theme="dark"] .community-gate-card,
[data-theme="dark"] .stats-gate-card {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--bg) 100%) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.44), 0 1px 8px rgba(0,0,0,0.28) !important;
}

/* ── SUBSCRIPTION CARD: Refined ── */
[data-theme="light"] .sub-plan-confirm {
  background: linear-gradient(135deg, rgba(61,90,138,0.06) 0%, rgba(61,90,138,0.03) 100%) !important;
  border-color: rgba(61,90,138,0.12) !important;
}

/* ── RECIPE & WORKOUT CARDS: Soft image overlay ── */
.workout-scroll-card .wsc-thumb::after,
.video-card-thumb::after {
  background: linear-gradient(0deg, rgba(15,14,20,0.55) 0%, transparent 60%) !important;
}

/* ── TYPOGRAPHY HIERARCHY: Lighter, more spaced ── */
.em-brand,
.view-title,
.modal-title,
.sheet-title {
  font-weight: 500 !important;
  letter-spacing: -0.2px !important;
}

h1, h2, h3 {
  font-weight: 500 !important;
  letter-spacing: -0.1px !important;
  line-height: 1.3 !important;
}

/* ── COACH SIGNAL CARD: Warmer ── */
[data-theme="light"] .em-coach-signal {
  background: linear-gradient(135deg, rgba(61,90,138,0.05) 0%, rgba(61,90,138,0.02) 100%) !important;
  border-left-color: var(--accent) !important;
}

/* ── ADMIN CARDS: Consistent softness ── */
[data-theme="light"] .admin-card {
  background: var(--surface) !important;
  box-shadow: 0 2px 14px rgba(61,90,138,0.07), 0 1px 4px rgba(30,28,25,0.04), inset 0 1px 0 rgba(255,255,255,0.80) !important;
}
[data-theme="dark"] .admin-card {
  background: linear-gradient(160deg, #21202C 0%, #1D1C26 100%) !important;
  box-shadow: 0 2px 14px rgba(0,0,0,0.36), 0 1px 4px rgba(0,0,0,0.24), inset 0 1px 0 rgba(180,175,210,0.07) !important;
}

/* ── QUICK LINK BUTTONS: Inviting ── */
[data-theme="light"] .quick-link-btn {
  background: var(--surface) !important;
}
[data-theme="light"] .quick-link-btn:hover {
  background: var(--accent-dim) !important;
  border-color: rgba(61,90,138,0.14) !important;
  transform: translateY(-1px) !important;
}
[data-theme="dark"] .quick-link-btn:hover {
  background: var(--accent-dim) !important;
  border-color: rgba(82,114,168,0.18) !important;
  transform: translateY(-1px) !important;
}

/* ── HABIT ITEMS: Softer completion glow ── */
[data-theme="light"] .habit-item.done {
  box-shadow: 0 0 0 1px rgba(61,90,138,0.12), 0 2px 10px rgba(61,90,138,0.08) !important;
  border-color: rgba(61,90,138,0.22) !important;
}
[data-theme="dark"] .habit-item.done {
  box-shadow: 0 0 0 1px rgba(82,114,168,0.20), 0 2px 12px rgba(82,114,168,0.12) !important;
  border-color: rgba(82,114,168,0.28) !important;
}

/* ── SCROLLBAR: Invisible, clean ── */
::-webkit-scrollbar { width: 0; height: 0; }

/* ── LANDING PAGE BUTTONS: Refined ── */
.landing-cta,
.landing-btn,
.lp-cta-btn {
  border-radius: var(--radius-lg) !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
  font-weight: 500 !important;
}

/* ── EMPTY STATES: Softer ── */
.empty-state,
.gate-card {
  opacity: 0.85 !important;
}

/* ── FOCUS RING: Elegant blue glow ── */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(61,90,138,0.35) !important;
  outline-offset: 2px !important;
}

/* ── BORDER RADIUS BUMP: Slightly more rounded everywhere ── */
.em-habit,
.em-habit-tile,
.workout-scroll-card,
.recipe-card,
.rcp-card {
  border-radius: var(--radius-lg) !important;
}

/* ── SECTION DIVIDERS: Gradient fade instead of hard line ── */
.em-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(61,90,138,0.12) 30%, rgba(61,90,138,0.12) 70%, transparent 100%) !important;
  height: 1px !important;
}
[data-theme="dark"] .em-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(82,114,168,0.15) 30%, rgba(82,114,168,0.15) 70%, transparent 100%) !important;
}
  .pep2-compound-detail {
    font-size: 10.5px;
  }
}

