/* ============================================
   TAKE THE STAIRS — app.css
   Main app: My Stairs + My Kitchen tabs
   Checklist, progress ring, streak, recipes
   ============================================ */

/* Ensure hidden attribute always wins over display:flex/block/grid */
[hidden] { display: none !important; }

/* === APP PAGE SHELL === */
.app-page {
  background: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === APP NAV === */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18,18,18,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Safe area: top padding fills the Dynamic Island zone; content pins to bottom.
     Hardened 2026-05-25 with max() fallback — env() returns 0 in some Capacitor
     WKWebView contexts, leaving the nav flush behind the status bar. 44px floor
     covers standard iOS status bar; notched devices get the larger env() value. */
  padding-top: max(env(safe-area-inset-top, 0px), 44px);
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 12px;
  min-height: calc(64px + max(env(safe-area-inset-top, 0px), 44px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

/* === STREAK BADGE === */
.streak-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--text-secondary);
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  letter-spacing: 1px;
}

.streak-badge:empty {
  display: none;
}

/* === TAB BAR === */
.app-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
  position: sticky;
  top: 64px;
  z-index: 90;
}

.app-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 8px;
  min-height: 52px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.app-tab:hover {
  color: var(--white);
}

.app-tab--active {
  color: var(--white);
  border-bottom-color: var(--blue);
}

.app-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* Tighten tab labels on very small screens so 3 tabs don't wrap */
@media (max-width: 360px) {
  .app-tab { letter-spacing: 1px; padding: 16px 4px; font-size: var(--fs-body); }
}

/* Groceries panel intro line */
.groceries-intro {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--gray);
  padding: 0 20px 16px;
  line-height: 1.5;
}

/* === TRIAL COUNTDOWN BANNER === */
.trial-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,220,0,0.08);
  border-left: 3px solid var(--blue);
  border-bottom: 1px solid var(--border);
}

.trial-banner[hidden] {
  display: none;
}

.trial-banner__text {
  flex: 1 1 auto;
  min-width: 160px;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--lgray);
  line-height: 1.5;
}

.trial-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.trial-banner__cta:hover,
.trial-banner__cta:focus-visible {
  background: #1a8cff;
  text-decoration: underline;
  outline: none;
}

.trial-banner__dismiss {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--gray);
  font-size: var(--fs-body);
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.trial-banner__dismiss:hover,
.trial-banner__dismiss:focus-visible {
  color: var(--white);
  border-color: var(--white);
  outline: none;
}

/* === PANELS === */
.app-panel {
  flex: 1;
  padding-bottom: 80px;
}

/* === STAIRS HEADER === */
.stairs-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
}

.stairs-title-wrap {
  flex: 1;
}

.stairs-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 44px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.stairs-date {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

/* === PROGRESS RING === */
.progress-ring-wrap {
  position: relative;
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__track {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 5;
}

.progress-ring__fill {
  fill: none;
  stroke: var(--path-accent, var(--blue, #4D9FFF));
  stroke-width: 5;
  stroke-linecap: round;
  /* Circumference = 2π × 38 ≈ 238.76 */
  stroke-dasharray: 238.76;
  stroke-dashoffset: 238.76; /* starts at 0% */
  transition: stroke-dashoffset 0.5s ease;
  filter: drop-shadow(0 0 6px rgba(77,159,255,0.6));
}

.progress-ring__pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
  pointer-events: none;
}

/* === CHECKLIST CONTAINER === */
.checklist-container {
  padding: 0 0 24px;
}

/* === CHECKLIST SECTION === */
.checklist-section {
  margin-bottom: 4px;
}

.checklist-section-title {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--border);
}

/* === CHECKLIST ITEM === */
.checklist-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--black);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  min-height: 64px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.checklist-item:hover {
  background: var(--surface);
}

.checklist-item:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

/* Checkbox circle */
.item-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.item-check svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}

/* Item text */
.item-text {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  transition: color 0.15s, text-decoration 0.15s;
}

/* Checked state */
.checklist-item.checked {
  background: rgba(255,255,255,0.02);
}

.checklist-item.checked .item-check {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.checklist-item.checked .item-check svg {
  opacity: 1;
}

.checklist-item.checked .item-text {
  color: var(--gray);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}

/* === ALL-DONE BANNER === */
.done-banner {
  margin: 24px 20px;
  background: linear-gradient(135deg, rgba(255,220,0,0.10) 0%, rgba(255,220,0,0.04) 100%);
  border: 1px solid rgba(255,220,0,0.35);
  text-align: center;
  padding: 36px 24px;
  animation: fadeInUp 0.4s ease;
}

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

.done-banner__label {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.done-banner__headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 9vw, 52px);
  color: var(--white);
  line-height: 1;
  margin-bottom: 10px;
}

.done-banner__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--lgray);
  font-style: italic;
  margin: 0;
}

/* === MILESTONE MESSAGE (shown inside done or elevator banner) === */
.done-banner__milestone,
.elevator-banner__milestone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,220,0,0.3);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 1.5;
}

/* === ELEVATOR DAY BANNER === */
.elevator-banner {
  margin: 24px 20px;
  background: linear-gradient(135deg, rgba(255,220,0,0.18) 0%, rgba(255,220,0,0.05) 100%);
  border: 1px solid rgba(255,220,0,0.5);
  text-align: center;
  padding: 40px 24px 36px;
  animation: fadeInUp 0.4s ease;
  box-shadow: 0 0 40px rgba(255,220,0,0.15);
}

.elevator-banner__icon {
  color: var(--blue);
  margin: 0 auto 18px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 0 14px rgba(255,220,0,0.5));
}

.elevator-banner__label {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.elevator-banner__headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 9vw, 52px);
  color: var(--white);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.elevator-banner__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--lgray);
  line-height: 1.7;
  margin: 0 auto;
  max-width: 280px;
  font-style: italic;
}

/* === APP DISCLAIMER === */
.app-disclaimer {
  margin: 8px 20px 0;
  border: 1px solid var(--border);
  padding: 12px 16px;
}

.app-disclaimer p {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--gray);
  line-height: 1.6;
  margin: 0;
}

/* === KITCHEN PANEL === */
.kitchen-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
}

.kitchen-diet-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 40px);
  letter-spacing: 2px;
  color: var(--path-accent, var(--blue, #4D9FFF));
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
}

.kitchen-diet-intro {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  line-height: 1.7;
  margin: 0;
}

/* Sprint 10 Section 1 — body-weight-scaled macro strip */
.kitchen-macro-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: rgba(255,220,0, 0.08);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 1px;
  color: #fff;
  min-height: 44px;
}

.kitchen-macro-cal {
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 1.5px;
}

.kitchen-macro-sep {
  color: var(--gray);
  opacity: 0.7;
}

.kitchen-macro-p,
.kitchen-macro-c,
.kitchen-macro-f {
  font-weight: 600;
}

.kitchen-macro-fallback {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(193, 68, 14, 0.12);
  color: #ffb38a;
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 0.5px;
  line-height: 1.5;
}

/* Per-meal macro pill on each recipe card */
.recipe-macro-pill {
  display: inline-block;
  margin: 4px 0 12px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 0.5px;
  color: var(--lgray);
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
}

.kitchen-section {
  padding: 0 0 28px;
}

.kitchen-section-title {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* === GROCERY LIST === */
.grocery-category {
  border-bottom: 1px solid var(--border);
  padding: 0 0 4px;
}

.grocery-category-name {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--path-accent, var(--blue, #4D9FFF));
  padding: 12px 20px 4px;
}

.grocery-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--black);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  min-height: 56px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.grocery-item::before {
  content: '○';
  flex-shrink: 0;
  font-size: var(--fs-body);
  color: var(--border-mid);
  transition: color 0.15s, content 0.15s;
}

.grocery-item:hover {
  background: var(--surface);
}

.grocery-item.checked {
  color: var(--gray);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.2);
}

.grocery-item.checked::before {
  content: '●';
  color: var(--path-accent, var(--blue, #4D9FFF));
}

/* === DAILY RECIPE NAVIGATOR === */
.recipe-day-nav {
  display: flex;
  gap: 6px;
  padding: 16px 20px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.recipe-day-nav::-webkit-scrollbar { display: none; }

.recipe-day-pill {
  position: relative;
  flex-shrink: 0;
  background: var(--surface);
  border: 1.5px solid var(--border-mid);
  color: var(--lgray);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 44px;
  text-align: center;
  transition: all 0.15s;
}
.recipe-day-pill.active {
  background: var(--sel-bg);
  border-color: var(--sel-border);
  color: var(--sel-color);
}
.recipe-day-today-dot {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--white);
  border-radius: 50%;
  margin: 3px auto 0;
}
.recipe-day-pill:not(.active) .recipe-day-today-dot {
  background: var(--blue);
}

.recipe-day-card {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}
.recipe-day-label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--path-accent, var(--blue, #4D9FFF));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.recipe-section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--lgray);
  letter-spacing: 0.08em;
  margin: 14px 0 6px;
}

/* === MEAL TYPE LABELS (Breakfast / Lunch / Dinner / Snack) === */
.meal-type-label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  background: var(--path-accent, var(--blue, #4D9FFF));
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  margin: 18px 0 8px;
}
.meal-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0 0;
}

/* === RECIPE CARDS === */
.recipe-list {
  padding: 0 0 16px;
}

.recipe-card {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.recipe-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--black);
  cursor: pointer;
  min-height: 72px;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.recipe-card__header:hover {
  background: var(--surface);
}

.recipe-card__header:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.recipe-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 4px;
}

.recipe-time {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray);
}

.recipe-expand {
  flex-shrink: 0;
  font-size: var(--fs-body);
  color: var(--gray);
  transition: transform 0.25s ease, color 0.15s;
}

.recipe-card.open .recipe-expand {
  transform: rotate(180deg);
  color: var(--blue);
}

/* Recipe body — collapsed by default */
.recipe-body {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.recipe-card.open .recipe-body {
  display: block;
}

.recipe-why {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  line-height: 1.6;
  font-style: italic;
  background: rgba(77,159,255,0.05);
  border-left: 3px solid var(--path-accent, var(--blue, #4D9FFF));
  border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
  padding: 12px 14px;
  margin: 12px 0 0;
}

.recipe-why__label {
  font-style: normal;
  font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--path-accent, var(--blue, #4D9FFF));
  display: block;
  margin-bottom: 4px;
}

.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recipe-ingredients li {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1.5;
}

.recipe-ingredients li::before {
  content: '—';
  color: var(--gray);
  flex-shrink: 0;
  font-size: var(--fs-body);
}

.recipe-steps {
  padding: 0;
  margin: 0;
  counter-reset: steps;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recipe-steps li {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  line-height: 1.7;
  padding: 10px 0 10px 36px;
  border-bottom: 1px solid var(--border);
  position: relative;
  counter-increment: steps;
}

.recipe-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  color: var(--blue);
  line-height: 1;
  min-width: 24px;
}

/* === REBUILD PLAN === */
.rebuild-wrap {
  padding: 28px 20px 8px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ── Coach Card ─────────────────────────────────────── */
.coach-card {
  margin: 16px 0 8px;
  border: 1px solid rgba(255,220,0, 0.35);
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: rgba(255,220,0, 0.06);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coach-card__icon {
  color: var(--blue);
  font-size: var(--fs-body);
}

.coach-card__label {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
}

.coach-card__greeting {
  font-family: var(--font-mono);
  font-size: var(--fs-body);          /* was 14px — bumped per 2026-05-15 in-app readability pass */
  font-weight: 600;
  color: var(--text-secondary);       /* bright white */
  margin: 0;
  line-height: 1.4;
}

.coach-card__assessment {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-secondary);       /* bright white — was rgba(255,255,255,0.75) which read as grey */
  margin: 0;
  line-height: 1.6;
}

.coach-card__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-card__block {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coach-card__block-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
}

.coach-card__block-value {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
}

.coach-card__win {
  background: rgba(255,220,0, 0.1);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coach-card__win-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue);
}

.coach-card__win-value {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 600;
}

.rebuild-link {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.rebuild-link:hover {
  color: var(--white);
  text-decoration: none;
}

.rebuild-hint {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--accent);
  margin-top: 6px;
  font-style: italic;
}

/* === NO PLAN FALLBACK === */
.no-plan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 60vh;
  padding: 40px 20px;
  text-align: center;
}

.no-plan p {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--lgray);
}

/* === TABLET === */
@media (min-width: 540px) {
  .stairs-header {
    padding: 28px 32px 24px;
  }

  .checklist-section-title,
  .checklist-item,
  .grocery-item,
  .recipe-card__header,
  .kitchen-header,
  .recipe-body {
    padding-left: 32px;
    padding-right: 32px;
  }

  .grocery-category-name {
    padding-left: 32px;
  }

  .kitchen-section-title {
    padding-left: 32px;
  }

  .done-banner,
  .elevator-banner {
    margin: 28px 32px;
  }

  .app-disclaimer {
    margin: 8px 32px 0;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .progress-ring__fill { transition: none; }
  .done-banner,
  .elevator-banner { animation: none; }
  .recipe-expand { transition: color 0.15s; }
}

/* ============================================
   WEEKLY CHECK-IN MODAL
   ============================================ */

.checkin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.checkin-card {
  background: var(--surface);
  border-top: 2px solid var(--blue);
  padding: 32px 24px calc(48px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.checkin-title {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.checkin-sub {
  font-size: var(--fs-body);
  color: var(--gray);
  margin-bottom: 28px;
}

.checkin-group {
  margin-bottom: 24px;
}

.checkin-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 10px;
}

.checkin-optional {
  font-weight: 400;
  color: var(--gray);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--fs-body);
}

/* Star rating */
.checkin-stars {
  display: flex;
  gap: 8px;
}

.star-btn {
  width: 48px;
  height: 48px;
  background: #4a4a4a;
  border: 2px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-button);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.star-btn.sel {
  background: var(--sel-bg);
  border-color: var(--sel-border);
  color: var(--sel-color);
}

/* Pill selectors */
.checkin-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkin-pill {
  background: #4a4a4a;
  border: 2px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.checkin-pill.sel {
  background: var(--sel-bg);
  border-color: var(--sel-border);
  color: var(--sel-color);
}

/* Textarea */
.checkin-textarea {
  width: 100%;
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.checkin-textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.checkin-textarea::placeholder { color: var(--gray); }

/* Actions */
.checkin-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: var(--fs-button);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px;
  cursor: pointer;
  min-height: 48px;
  transition: border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn--ghost:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

@media (min-width: 480px) {
  .checkin-actions { flex-direction: row; }
  .checkin-actions .btn--ghost   { flex: 1; }
  .checkin-actions .btn--primary { flex: 2; }
  .checkin-modal { align-items: center; }
  .checkin-card  { border: 2px solid var(--blue); border-radius: 0; }
}

/* ============================================
   INTENSITY SELECTOR
   ============================================ */

.intensity-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}

.intensity-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lgray);
  flex-shrink: 0;
}

.intensity-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.intensity-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  background: transparent;
  color: var(--lgray);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px; /* accessibility: min tap target */
  min-height: 44px;
}

.intensity-dot:hover {
  border-color: rgba(255,220,0,0.6);
  color: var(--white);
}

.intensity-dot.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: scale(1.1);
}

/* Colour-code the ends: 1=green, 5=orange-red */
.intensity-dot[data-val="1"].active { background: #2ecc71; border-color: #2ecc71; }
.intensity-dot[data-val="2"].active { background: #27ae60; border-color: #27ae60; }
.intensity-dot[data-val="3"].active { background: var(--blue); border-color: var(--blue); }
.intensity-dot[data-val="4"].active { background: #e67e22; border-color: #e67e22; }
.intensity-dot[data-val="5"].active { background: #e74c3c; border-color: #e74c3c; }

.intensity-rebuild {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
  white-space: nowrap;
}

.intensity-rebuild:hover {
  background: var(--blue);
  color: #fff;
}

/* Rebuilding overlay */
.workout-rebuilding {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: rgba(255,220,0,0.06);
  border-bottom: 1px solid rgba(255,220,0,0.2);
}

.workout-rebuilding__pulse {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  animation: wrkPulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes wrkPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.workout-rebuilding__text {
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--blue);
  margin: 0;
}

/* ============================================
   5-DAY CYCLE PICKER (Apr 28, 2026)
   Five horizontal pills above the checklist and meals.
   Same component reused on My Stairs and My Kitchen.
   ============================================ */
.day-picker-wrap {
  padding: 16px 20px 8px;
}

.day-pills {
  display: flex;
  gap: 8px;
  width: 100%;
}

.day-pill {
  flex: 1;
  min-height: 48px;
  padding: 10px 4px;
  background: #2a2a2a;
  border: 2px solid rgba(255,255,255,0.18);
  color: var(--white);
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.day-pill:hover {
  background: #3a3a3a;
  border-color: rgba(255,255,255,0.35);
}

.day-pill.active {
  background: var(--sel-bg);
  border-color: var(--sel-border);
  color: var(--sel-color);
}

.day-theme {
  margin: 12px 0 0;
  padding: 0 4px;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--fs-body);
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  font-style: italic;
  min-height: 18px;
}

/* "Get My Next 5 Days" CTA at bottom of My Stairs */
.next-cycle-cta {
  margin: 32px 20px 24px;
  padding: 24px 20px;
  background: rgba(255,220,0, 0.06);
  border: 1px solid rgba(255,220,0, 0.25);
  border-radius: 4px;
  text-align: center;
}

.next-cycle-cta__label {
  margin: 0 0 12px;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.next-cycle-cta__hint {
  margin: 12px 0 0;
  font-size: var(--fs-body);
  color: rgba(255,255,255,0.55);
}

/* ============================================
   V2 REDESIGN — May 2026
   Bottom nav, settings trigger, 3-way intensity,
   coach note card, path strip, path accent
   ============================================ */

/* ── BODY: clear bottom nav space ── */
.app-page {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* ── NAV ACTIONS (streak + settings button) ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── SETTINGS TRIGGER BUTTON ── */
.settings-trigger-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md, 8px);
  color: var(--blue);
  cursor: pointer;
  padding: 6px 10px;
  min-height: 44px;
  min-width: 44px;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.settings-trigger-btn:hover,
.settings-trigger-btn:focus-visible {
  color: var(--blue);
  border-color: var(--blue);
  outline: none;
}
.settings-trigger-btn__icon {
  font-size: var(--fs-body);
  line-height: 1;
}
.settings-trigger-btn__icon--img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.settings-trigger-btn__icon--img img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.settings-trigger-btn__label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── BOTTOM NAV ── */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface, #1a1a1a);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Override the old sticky-top .app-tabs behaviour */
.app-bottom-nav .app-tabs {
  display: flex;
  flex-direction: row;
  position: static;
  border-bottom: none;
  background: transparent;
  top: unset;
  height: 80px;
}

.app-bottom-nav .app-tab {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  min-height: 88px;
  border-bottom: none;
  border-top: 3px solid transparent;
  color: var(--text-secondary, #c0c0c0);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.app-bottom-nav .app-tab:hover {
  color: var(--text-primary, #ffffff);
}

.app-bottom-nav .app-tab--active {
  color: var(--path-accent, var(--accent, #4D9FFF));
  border-top-color: var(--path-accent, var(--accent, #4D9FFF));
  background: color-mix(in srgb, var(--path-accent, #4D9FFF) 12%, transparent);
}

.app-tab__icon {
  font-size: 30px;
  line-height: 1;
  display: block;
}

.app-tab__icon--img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.app-tab__icon--img img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}
.app-tab__icon--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--blue);
}
.app-tab__icon--svg svg {
  width: 30px;
  height: 30px;
  display: block;
}

.app-tab__label {
  display: block;
  line-height: 1;
}

/* ── 3-WAY INTENSITY TOGGLE ── */
/* Replace old 5-dot .intensity-dots with .intensity-toggle container */
.intensity-toggle {
  display: flex;
  gap: 6px;
  flex: 1;
}

/* Override the circular dot style — pills instead */
.intensity-bar .intensity-dot {
  flex: 1;
  width: auto;
  height: auto;
  min-height: 44px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(255,255,255,0.14);
  background: var(--surface-raised, #242424);
  color: var(--text-secondary, #a0a0a0);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0 10px;
}

.intensity-bar .intensity-dot:hover {
  border-color: rgba(255,255,255,0.28);
  color: var(--text-primary, #fff);
}

/* Active state uses path accent color */
.intensity-bar .intensity-dot.active,
.intensity-bar .intensity-dot[aria-pressed="true"] {
  background: var(--path-accent, var(--accent, #4D9FFF));
  border-color: var(--path-accent, var(--accent, #4D9FFF));
  color: #000;
  transform: none;
}

/* Override old per-val colour rules for the new 3-button set */
.intensity-bar .intensity-dot[data-val="2"].active { background: var(--path-accent, #4D9FFF); border-color: var(--path-accent, #4D9FFF); color: #000; }
.intensity-bar .intensity-dot[data-val="3"].active { background: var(--path-accent, #4D9FFF); border-color: var(--path-accent, #4D9FFF); color: #000; }
.intensity-bar .intensity-dot[data-val="4"].active { background: var(--path-accent, #4D9FFF); border-color: var(--path-accent, #4D9FFF); color: #000; }

/* ── PATH STRIP ── */
.path-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  text-align: center;
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.path-strip__label {
  color: var(--accent);
}
.path-strip__name {
  color: var(--accent);
  font-weight: 700;
}
.path-switch-btn {
  background: transparent;
  border: 1px solid var(--path-accent, var(--accent, #4D9FFF));
  color: var(--path-accent, var(--accent, #4D9FFF));
  padding: 3px 10px;
  border-radius: 14px;
  font-size: var(--fs-button);
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  min-height: 0;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

/* ── COACH NOTE CARD (Kitchen — nutrition note) ── */
.coach-note-card {
  margin: 16px 20px;
  background: rgba(77,159,255,0.06);
  border: 1px solid rgba(77,159,255,0.2);
  border-radius: var(--radius-lg, 16px);
  padding: 20px;
}
.coach-note-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.coach-note-card__icon {
  font-size: var(--fs-body);
  line-height: 1;
}
.coach-note-card__label {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--path-accent, var(--accent, #4D9FFF));
}
.coach-note-card__greeting {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin: 0 0 8px;
  line-height: 1.4;
}
.coach-note-card__focus {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  margin: 0 0 10px;
  line-height: 1.6;
}
.coach-note-card__why {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  font-style: italic;
  margin: 0 0 12px;
  line-height: 1.6;
}
.coach-note-card__tips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.coach-note-card__tip {
  font-family: var(--font-body, 'Atkinson Hyperlegible', sans-serif);
  font-size: var(--fs-body);
  color: var(--text-secondary, #a0a0a0);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}
.coach-note-card__tip::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--path-accent, var(--accent, #4D9FFF));
  font-size: var(--fs-body);
}

/* ── PER-PATH ACCENT COLOUR WIRING ── */
/* JS sets data-path on <body> or sets --path-accent via style attr.
   These rules set the CSS custom property from the data attribute. */
body[data-path="Steady Steps"]   { --path-accent: var(--steady-steps, #a78bfa); }
body[data-path="Roll With It"]   { --path-accent: var(--roll-with-it, #22d3ee); }
body[data-path="Keep Healing"]   { --path-accent: var(--keep-healing, #fbbf24); }
body[data-path="Keep It Moving"] { --path-accent: var(--keep-moving, #34d399); }
body[data-path="Full Climb"]     { --path-accent: var(--full-climb, #60a5fa); }

/* ============================================
   SAFARI iOS HARDENING — Day 3
   viewport-fit=cover handles safe area on HTML side.
   These rules handle touch latency, flex display,
   scroll momentum, and focus-visible quirks.
   ============================================ */

/* ── TOUCH ACTION: eliminate 300ms tap delay on all interactive elements ── */
/* Also prevents accidental double-tap zoom on buttons (iOS Safari) */
.app-tab,
.app-bottom-nav .app-tab,
.settings-trigger-btn,
.intensity-dot,
.intensity-rebuild,
.day-pill,
.path-switch-btn,
.checklist-item,
.recipe-card__header,
.grocery-item,
.star-btn,
.checkin-pill,
.rebuild-link,
.trial-banner__cta,
.trial-banner__dismiss,
.btn,
.btn--primary,
.btn--ghost {
  touch-action: manipulation;
}

/* ── BOTTOM NAV TAB: explicit display:flex required for column layout ──
   Without this, flex-direction:column / align-items:center / gap have no effect
   because <button> is inline-block by default. */
.app-bottom-nav .app-tab {
  display: flex;
}

/* ── BOTTOM NAV FOCUS-VISIBLE: offset outward (positive) for fixed bottom bar ── */
.app-bottom-nav .app-tab:focus-visible {
  outline: 2px solid var(--path-accent, var(--accent, #4D9FFF));
  outline-offset: -2px;
}

/* ── SCROLL MOMENTUM on main panel (older iOS) ── */
/* -webkit-overflow-scrolling is deprecated in Safari 13+ but harmless.
   Modern iOS handles scroll momentum automatically. */
.app-panel {
  -webkit-overflow-scrolling: touch;
}

/* ── TEXT SIZE ADJUST: prevent Safari auto-sizing tab labels in landscape ── */
.app-tab__label,
.app-tab__icon {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ── SAFE AREA: extra padding on app-page when safe-area-inset-bottom is 0
   (covers devices where env() resolves to 0 without viewport-fit=cover).
   viewport-fit=cover in the meta tag ensures env() is non-zero on notched phones. ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom), 0px);
  }
  .app-page {
    padding-bottom: calc(80px + max(env(safe-area-inset-bottom), 0px));
  }
}

/* ── PANEL BOTTOM CLEARANCE: content clears fixed bottom nav on all devices ── */
/* Page scrolls as a document (no overflow-y: auto here — that would break natural scroll). */
.app-panel {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* ── STICKY NAV: position:sticky on app-nav requires overflow visible on ancestors.
   Guard against a Safari bug where sticky fails inside overflow:hidden containers. ── */
.app-page {
  overflow-x: clip; /* clip, not hidden — doesn't break sticky */
}

/* ── RECIPE EXPAND ICON: use CSS-only rotation (no JS class needed for animation) ── */
/* This is already done via .recipe-card.open .recipe-expand — just ensure
   the transform works on Safari's composited layer. */
.recipe-expand {
  will-change: transform;
}

/* ── REDUCED MOTION addendum: disable will-change for users who prefer it ── */
@media (prefers-reduced-motion: reduce) {
  .recipe-expand { will-change: auto; }
  .progress-ring__fill { filter: none; }
}

/* ── JOURNEY SHEET: hover / focus states for interactive elements ── */
#settings-journey:hover,
#settings-journey:focus-visible {
  border-color: #FFDC00 !important;
  outline: none;
}

#journey-close:hover,
#journey-close:focus-visible {
  background: #1a1a1a !important;
  border-color: #777 !important;
  color: #fff !important;
  outline: none;
}

/* ── ITEM-COMPLETION CELEBRATION (V1.1 #20) ──
   Subtle scale pop + one-word affirmation when a stair is checked.
   Pairs with the streak reframe (#19) — makes consistency feel earned
   for an audience whose chronic conditions cost them streak days. */
.checklist-item {
  position: relative;
}

.checklist-item.celebrating {
  animation: ttsItemPop 200ms ease-out;
}

@keyframes ttsItemPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.completion-affirm {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display, var(--font-mono));
  font-size: var(--fs-body);
  letter-spacing: 1px;
  color: var(--blue);
  pointer-events: none;
  opacity: 0;
  animation: ttsAffirmFade 800ms ease-out forwards;
  white-space: nowrap;
}

@keyframes ttsAffirmFade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Respect prefers-reduced-motion: skip the scale animation; let the
   affirmation appear without movement (fade is still informational
   feedback the user can rely on). */
@media (prefers-reduced-motion: reduce) {
  .checklist-item.celebrating {
    animation: none;
    transform: none;
    transition: none;
  }
  .completion-affirm {
    animation: none;
    opacity: 1;
  }
}

/* ──────────────────────────────────────────────────────────
   TIER 2 PERSONALIZE-FURTHER MODAL (V1.1 #9 + #11)
   ──────────────────────────────────────────────────────────
   Card-based progressive disclosure framework. First instance:
   anchor capture (3 daily moments — morning, midday, evening).
   Surfaces after Day-1 first-completion via initTier2Modal() in
   js/app.js. Path-aware via --blue (which resolves to per-path
   accent through the cascade — see style.css :root). */
.tier2-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.tier2-modal[hidden] { display: none; }

.tier2-modal__inner {
  background: #0a0a0a;
  border: 1px solid var(--blue, #0057ff);
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  color: #fff;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tier2-modal__title {
  margin: 0 0 8px 0;
  color: var(--blue, #0057ff);
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.tier2-modal__subtext {
  margin: 0 0 18px 0;
  font-size: 0.9rem;
  color: #999;
  line-height: 1.5;
}

.tier2-card {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tier2-card__heading {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.tier2-card__lede {
  margin: 0 0 4px 0;
  font-size: 0.92rem;
  color: #bbb;
  line-height: 1.5;
}

.tier2-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier2-field__label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cfcfcf;
  font-weight: 600;
}

.tier2-field__input {
  width: 100%;
  min-height: 56px; /* tap target — Parkinson's / tremor accessibility */
  padding: 0 14px;
  font-size: 16px; /* >= 16px to prevent iOS zoom-on-focus */
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  touch-action: manipulation;
  box-sizing: border-box;
}

.tier2-field__input:focus {
  outline: none;
  border-color: var(--blue, #0057ff);
  box-shadow: 0 0 0 2px rgba(0, 87, 255, 0.2);
}

.tier2-field__input::placeholder {
  color: #777;
}

.tier2-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.tier2-btn {
  flex: 1;
  min-height: 56px; /* tap target */
  padding: 0 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  touch-action: manipulation;
  border: 1px solid transparent;
  font-family: inherit;
}

.tier2-btn--ghost {
  background: transparent;
  border-color: #555;
  color: #bbb;
}

.tier2-btn--ghost:hover,
.tier2-btn--ghost:focus-visible {
  background: #1a1a1a;
  color: #fff;
  outline: none;
}

.tier2-btn--primary {
  background: var(--blue, #0057ff);
  color: #0a0a0a;
  font-weight: 700;
}

.tier2-btn--primary:hover,
.tier2-btn--primary:focus-visible {
  filter: brightness(1.1);
  outline: none;
}

.tier2-toast {
  margin: 14px 0 0 0;
  text-align: center;
  color: var(--blue, #0057ff);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .tier2-btn--primary { transition: none; }
}

/* === PICKS SUMMARY (May 22, 2026) ===
   Top-of-panel verification line for onboarding picks (workout style + meal
   plan). Subtle, mirrors the visual weight of other top-of-panel elements
   (.stairs-header padding, .stairs-date letter-spacing). Labels = yellow
   (text-primary), values = bright white (text-secondary). */
.picks-summary {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--near-black);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picks-summary__row {
  margin: 0;
  font-size: var(--fs-label);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.picks-summary__label {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.picks-summary__value {
  color: var(--text-secondary);
  font-weight: 400;
  overflow-wrap: anywhere;
}
