/*
 * FIT LIFE CALCULATOR
 * Professional · Clean · Mobile-First
 * Spacing: 8px grid system
 * ----------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── Design Tokens ──────────────────────── */
:root {
  --font:          'Outfit', sans-serif;

  /* Color palette */
  --c-purple:      #5046E5;
  --c-purple-lt:   #EEF0FD;
  --c-purple-mid:  #C7C4F6;
  --c-orange:      #F5620F;
  --c-orange-lt:   #FEF0E9;
  --c-green:       #0EA66F;
  --c-green-lt:    #E6F7F1;
  --c-blue:        #1D6CF0;
  --c-blue-lt:     #EBF2FE;
  --c-amber:       #CA8A04;
  --c-amber-lt:    #FEFCE8;
  --c-red:         #DC2626;

  /* Neutrals */
  --c-bg:          #F4F5F7;
  --c-surface:     #FFFFFF;
  --c-border:      #E5E7EB;
  --c-border-dark: #D1D5DB;
  --c-text:        #111827;
  --c-text-2:      #374151;
  --c-text-3:      #6B7280;
  --c-muted:       #9CA3AF;

  /* Spacing scale (8px base) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;

  /* Shape */
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(0,0,0,.06);
  --sh-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --sh-md: 0 4px 12px rgba(0,0,0,.08);
  --sh-lg: 0 8px 24px rgba(0,0,0,.08);

  --ease:  cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset ──────────────────────────────── */
#fcp-app *, #fcp-app *::before, #fcp-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

/* ─── App Shell ──────────────────────────── */
#fcp-app {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
  border-radius: var(--r-xl);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-lg);
  -webkit-font-smoothing: antialiased;

}
#fcp-app{
	padding: 13px !important;
}
.fcp-metric-card{
	padding: 7px !important;
}
.fcp-macro-summary{
	margin-bottom: 12px !important;
	padding: 5px !important;
}
.fcp-macro-cards{
	margin-bottom: 12px !important;
}
	
	
/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.fcp-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-5) var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.fcp-header-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--c-purple-lt);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.fcp-header-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}
.fcp-header-text p {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   TABS
═══════════════════════════════════════════ */
.fcp-tabs-wrap {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 var(--sp-8);
  position: sticky;
  top: 0;
  z-index: 50;
}
.fcp-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: var(--sp-1);
}
.fcp-tabs::-webkit-scrollbar { display: none; }

.fcp-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 var(--sp-4);
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.fcp-tab:hover  { color: var(--c-text-2); }
.fcp-tab.active { color: var(--c-purple); border-bottom-color: var(--c-purple); }
.fcp-tab-icon   { font-size: 15px; }

/* ═══════════════════════════════════════════
   PANELS
═══════════════════════════════════════════ */
.fcp-panel        { display: none; }
.fcp-panel.active { display: block; animation: panelIn .2s var(--ease); }

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

.fcp-panel-inner {
  padding: var(--sp-8);
}

/* ═══════════════════════════════════════════
   SECTION TITLES
═══════════════════════════════════════════ */
.fcp-section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.fcp-section-title::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 3px;
  height: 14px;
  background: var(--c-purple);
  border-radius: 2px;
}

.fcp-divider {
  height: 1px;
  background: var(--c-border);
  margin: var(--sp-7) 0;
}

/* ═══════════════════════════════════════════
   FORM GRID
═══════════════════════════════════════════ */
.fcp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
.fcp-field-full { grid-column: 1 / -1; }

/* ═══════════════════════════════════════════
   FIELD  (label + input wrapper)
═══════════════════════════════════════════ */
.fcp-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Label row */
.fcp-field > label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  line-height: 1;
}

/* Unit pill next to label */
.fcp-unit-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  background: var(--c-purple-lt);
  color: var(--c-purple);
  border: 1px solid var(--c-purple-mid);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}

.fcp-tooltip {
  font-size: 13px;
  color: var(--c-muted);
  cursor: help;
  line-height: 1;
}

/* ─── Base input ──────────────────────────── */
.fcp-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-4);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  -moz-appearance: textfield;
  -webkit-appearance: none;
}
.fcp-input::-webkit-outer-spin-button,
.fcp-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fcp-input::placeholder {
  color: var(--c-muted);
  font-weight: 400;
}
.fcp-input:hover:not(:focus) {
  border-color: var(--c-border-dark);
}
.fcp-input:focus {
  border-color: var(--c-purple);
  box-shadow: 0 0 0 3px rgba(80,70,229,.12);
}
.fcp-input.fcp-error {
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}

/* ─── Height row (ft + in) ────────────────── */
.fcp-height-row {
  display: flex;
  gap: var(--sp-2);
}
.fcp-height-sub {
  position: relative;
  flex: 1;
  min-width: 0;
}
/* Suffix label ("ft" / "in") inside input */
.fcp-sub-label {
  position: absolute;
  right: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-purple);
  pointer-events: none;
  user-select: none;
}
/* Make room for the suffix */
.fcp-height-sub .fcp-input {
  padding-right: 32px;
}

/* ═══════════════════════════════════════════
   GENDER SELECTOR
═══════════════════════════════════════════ */
.fcp-gender-group {
  display: flex;
  gap: var(--sp-2);
}
.fcp-gender-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 44px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
  user-select: none;
}
.fcp-gender-btn input { display: none; }
.fcp-gender-btn:hover:not(.active) {
  border-color: var(--c-border-dark);
  background: var(--c-bg);
}
.fcp-gender-btn.active {
  border-color: var(--c-purple);
  background: var(--c-purple-lt);
  color: var(--c-purple);
}
.fcp-gender-icon { font-size: 16px; }

/* ═══════════════════════════════════════════
   ACTIVITY GRID
═══════════════════════════════════════════ */
.fcp-activity-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-3);
}
.fcp-activity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-4) var(--sp-2);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  user-select: none;
}
.fcp-activity-card input { display: none; }
.fcp-activity-card:hover:not(.active) {
  border-color: var(--c-border-dark);
  background: var(--c-bg);
}
.fcp-activity-card.active {
  border-color: var(--c-purple);
  background: var(--c-purple-lt);
}
.fcp-activity-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.fcp-activity-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.fcp-activity-desc {
  font-size: 10px;
  color: var(--c-muted);
  margin-top: 3px;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════
   GOAL BUTTONS
═══════════════════════════════════════════ */
.fcp-goal-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.fcp-goal-btn {
  flex: 1;
  min-width: 110px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--sp-4);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
  user-select: none;
}
.fcp-goal-btn input { display: none; }
.fcp-goal-btn:hover:not(.active) {
  border-color: var(--c-border-dark);
  background: var(--c-bg);
}
.fcp-goal-btn.active {
  border-color: var(--c-orange);
  background: var(--c-orange-lt);
  color: var(--c-orange);
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.fcp-cta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.fcp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 var(--sp-6);
  background: var(--c-purple);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}
.fcp-btn-primary:hover  { background: #3F35CC; box-shadow: var(--sh-sm); }
.fcp-btn-primary:active { background: #342BB8; }

.fcp-btn-pdf           { background: var(--c-green); }
.fcp-btn-pdf:hover     { background: #0A8F5F; }
.fcp-btn-pdf:active    { background: #087A51; }

.fcp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 var(--sp-5);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.fcp-btn-ghost:hover  { border-color: var(--c-border-dark); color: var(--c-text); }
.fcp-btn-ghost.fcp-sm { height: 36px; padding: 0 var(--sp-4); font-size: 12px; }

/* ═══════════════════════════════════════════
   RESULTS HEADER
═══════════════════════════════════════════ */
.fcp-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.fcp-results-header .fcp-section-title { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   METRIC CARDS  (Results tab)
═══════════════════════════════════════════ */
.fcp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

/* Color accent order: blue, purple, green, orange, amber, blue, green, purple */
.fcp-metric-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-purple);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4);
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.fcp-metric-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.fcp-metrics-grid > .fcp-metric-card:nth-child(1) { border-top-color: var(--c-blue); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(2) { border-top-color: var(--c-purple); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(3) { border-top-color: var(--c-green); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(4) { border-top-color: var(--c-orange); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(5) { border-top-color: var(--c-amber); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(6) { border-top-color: var(--c-blue); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(7) { border-top-color: var(--c-green); }
.fcp-metrics-grid > .fcp-metric-card:nth-child(8) { border-top-color: var(--c-purple); }

.fcp-metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-muted);
  margin-bottom: var(--sp-2);
}
.fcp-metric-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.1;
  margin-bottom: var(--sp-1);
}
.fcp-metric-sub {
  font-size: 11px;
  color: var(--c-text-3);
  margin-bottom: var(--sp-1);
}
.fcp-metric-formula {
  font-size: 10px;
  color: var(--c-muted);
}
.fcp-card-goal .fcp-metric-value { color: var(--c-orange); }

/* BMI scale bar */
.fcp-bmi-scale { margin-top: var(--sp-3); }
.fcp-bmi-bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  display: flex;
  overflow: visible;
}
.fcp-bmi-seg { height: 100%; }
.fcp-bmi-seg:first-child { border-radius: 3px 0 0 3px; }
.fcp-bmi-seg:last-child  { border-radius: 0 3px 3px 0; }
.fcp-bmi-needle {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  background: var(--c-text);
  border-radius: 1px;
  transition: left .4s var(--ease);
}
.fcp-bmi-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-1);
  font-size: 9px;
  color: var(--c-muted);
}

/* ═══════════════════════════════════════════
   MACROS TAB
═══════════════════════════════════════════ */
.fcp-macro-styles {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.fcp-macro-style-btn {
  height: 36px;
  padding: 0 var(--sp-5);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 20px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
  white-space: nowrap;
}
.fcp-macro-style-btn:hover,
.fcp-macro-style-btn.active {
  border-color: var(--c-purple);
  background: var(--c-purple-lt);
  color: var(--c-purple);
}

/* Calorie summary block */
.fcp-macro-summary {
  background: var(--c-purple);
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-8);
  text-align: center;
  margin-bottom: var(--sp-6);
}
.fcp-macro-total-cal {
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.fcp-macro-total-cal small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  margin-top: var(--sp-2);
  font-weight: 500;
}

/* Three macro cards */
.fcp-macro-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.fcp-macro-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: box-shadow .15s var(--ease);
}
.fcp-macro-card:hover { box-shadow: var(--sh-md); }
.fcp-macro-card:nth-child(1) { border-left: 3px solid var(--c-orange); }
.fcp-macro-card:nth-child(2) { border-left: 3px solid var(--c-green);  }
.fcp-macro-card:nth-child(3) { border-left: 3px solid var(--c-blue);   }

.fcp-macro-circle {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}
.fcp-macro-circle svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}
.fcp-ring-bg {
  fill: none;
  stroke: var(--c-border);
  stroke-width: 3;
}
.fcp-ring {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset .7s var(--ease);
}
.fcp-macro-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text);
}
.fcp-macro-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-muted);
  margin-bottom: var(--sp-1);
}
.fcp-macro-grams {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1;
}
.fcp-macro-kcal2 {
  font-size: 11px;
  color: var(--c-muted);
  margin-top: 3px;
}

/* Extra stat cards (water / fiber / per-meal) */
.fcp-extras-row {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.fcp-extra-card {
  flex: 1;
  min-width: 120px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  transition: box-shadow .15s var(--ease);
}
.fcp-extra-card:hover { box-shadow: var(--sh-md); }
.fcp-extra-card:nth-child(1) { border-top: 2px solid var(--c-blue);   }
.fcp-extra-card:nth-child(2) { border-top: 2px solid var(--c-green);  }
.fcp-extra-card:nth-child(3) { border-top: 2px solid var(--c-orange); }
.fcp-extra-icon  { font-size: 22px; flex-shrink: 0; }
.fcp-extra-val   { font-size: 18px; font-weight: 800; color: var(--c-text); line-height: 1; }
.fcp-extra-label { font-size: 11px; color: var(--c-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════
   DIET PLAN TAB
═══════════════════════════════════════════ */
#fcp-diet-plan-content {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
}
.fcp-plan-section { margin-bottom: var(--sp-7); }
.fcp-plan-section:last-child { margin-bottom: 0; }
.fcp-plan-h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--c-text);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.fcp-plan-h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--c-purple);
  margin: var(--sp-5) 0 var(--sp-3);
}
.fcp-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fcp-plan-table th {
  background: var(--c-bg);
  color: var(--c-text-3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: var(--sp-2) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.fcp-plan-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
}
.fcp-plan-table tr:last-child td { border-bottom: none; }
.fcp-plan-table tr:hover td       { background: var(--c-bg); }
.fcp-plan-note {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-purple-lt);
  border-left: 3px solid var(--c-purple);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12px;
  color: var(--c-text-2);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   LIVE PREVIEW BAR
═══════════════════════════════════════════ */
.fcp-realtime-bar {
  position: sticky;
  bottom: 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-3) var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  font-size: 12px;
  box-shadow: 0 -2px 8px rgba(0,0,0,.05);
}
.fcp-realtime-bar strong { color: var(--c-purple); font-weight: 700; }
.fcp-rt-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--c-muted);
  background: var(--c-bg);
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
}
.fcp-realtime-bar span { color: var(--c-text-2); }
.fcp-realtime-bar.hidden { display: none; }

/* ─── Visibility helpers ─────────────────── */
.fcp-female-only        { display: none; }
.fcp-female-only.visible { display: flex; }

/* ─── Scrollbar ──────────────────────────── */
#fcp-app ::-webkit-scrollbar       { width: 4px; height: 4px; }
#fcp-app ::-webkit-scrollbar-track { background: var(--c-bg); }
#fcp-app ::-webkit-scrollbar-thumb { background: var(--c-border-dark); border-radius: 2px; }


/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet  ≤ 780px
═══════════════════════════════════════════ */
@media (max-width: 780px) {
  .fcp-header       { padding: var(--sp-4) var(--sp-6); }
  .fcp-tabs-wrap    { padding: 0 var(--sp-6); }
  .fcp-panel-inner  { padding: var(--sp-6); }
  .fcp-realtime-bar { padding: var(--sp-3) var(--sp-6); }

  .fcp-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .fcp-activity-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Phone  ≤ 560px
═══════════════════════════════════════════ */
@media (max-width: 560px) {
  #fcp-app           { border-radius: var(--r-lg); }

  .fcp-header        { padding: var(--sp-4) var(--sp-5); gap: var(--sp-3); }
  .fcp-header-icon   { width: 40px; height: 40px; font-size: 20px; }
  .fcp-header-text h1 { font-size: 15px; }

  .fcp-tabs-wrap     { padding: 0 var(--sp-2); }
  .fcp-tab           { padding: 0 var(--sp-3); font-size: 12.5px; height: 44px; }

  .fcp-panel-inner   { padding: var(--sp-5) var(--sp-5) var(--sp-8); }

  /* Single column form */
  .fcp-grid-2        { grid-template-columns: 1fr; gap: var(--sp-4); }
  .fcp-field-full    { grid-column: 1; }

  /* Touch-friendly input height */
  .fcp-input         { height: 48px; font-size: 16px; } /* 16px prevents iOS zoom */
  .fcp-gender-btn    { height: 48px; }

  .fcp-activity-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }

  .fcp-goal-row      { gap: var(--sp-2); }
  .fcp-goal-btn      { min-width: calc(50% - var(--sp-1)); height: 44px; font-size: 12.5px; }

  /* Full-width CTA buttons */
  .fcp-cta-row                    { flex-direction: column; }
  .fcp-cta-row .fcp-btn-primary,
  .fcp-cta-row .fcp-btn-ghost     { width: 100%; justify-content: center; }

  .fcp-metrics-grid  { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .fcp-metric-card   { padding: var(--sp-4) var(--sp-3); }
  .fcp-metric-value  { font-size: 24px; }

  .fcp-macro-total-cal { font-size: 42px; }
  .fcp-macro-summary   { padding: var(--sp-6); }
  .fcp-macro-cards     { grid-template-columns: 1fr; gap: var(--sp-3); }

  .fcp-extras-row      { flex-direction: column; gap: var(--sp-3); }
  .fcp-extra-card      { min-width: unset; }

  #fcp-diet-plan-content { padding: var(--sp-5); }
  .fcp-plan-table        { font-size: 12px; }
  .fcp-plan-table th,
  .fcp-plan-table td     { padding: var(--sp-2) var(--sp-3); }

  .fcp-divider           { margin: var(--sp-5) 0; }
  .fcp-realtime-bar      { padding: var(--sp-2) var(--sp-5); gap: var(--sp-4); font-size: 11px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Small phone  ≤ 380px
═══════════════════════════════════════════ */
@media (max-width: 380px) {
  .fcp-header-text p { display: none; }
  .fcp-tab-icon      { display: none; }
  .fcp-tab           { padding: 0 var(--sp-2); font-size: 12px; }
  .fcp-metrics-grid  { grid-template-columns: 1fr; }
  .fcp-goal-btn      { min-width: 100%; }
}

/* ═══════════════════════════════════════════
   TOUCH — disable hover transforms
═══════════════════════════════════════════ */
@media (hover: none) {
  .fcp-metric-card:hover,
  .fcp-macro-card:hover,
  .fcp-extra-card:hover {
    transform: none;
    box-shadow: none;
  }
  .fcp-btn-primary:active { transform: scale(.97); }
  .fcp-goal-btn:active    { transform: scale(.97); }
}
