/* Client app: phone first, sharing the coach workspace's tokens and components (../coach/coach.css). */
.app-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--side-bg); border-bottom: 1px solid var(--side-line);
}
.app-top .brand img { width: 34px; height: 34px; }
.app-top-actions { display: flex; align-items: center; gap: 10px; color: var(--side-strong); }
.app-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 16px calc(48px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.app-main:focus { outline: none; }

.hello { display: grid; gap: 6px; }
.hello h1 { font-size: 24px; }
.status-card { display: grid; gap: 10px; }
.status-card .status-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--lime-soft); color: var(--accent); }
.status-card h2 { font-size: 18px; }
.coach-line-app { display: flex; align-items: center; gap: 12px; }
.coach-line-app small { display: block; color: var(--muted); font-size: 12px; }

.sign-in { max-width: 420px; margin: 32px auto 0; display: grid; gap: 14px; }
.sign-in h1 { font-size: 22px; }
.center-screen { text-align: center; justify-items: center; }
.center-screen .button-row { justify-content: center; }

/* In-app intake: one question at a time */
.intake-welcome { display: grid; gap: 12px; }
.intake-welcome h1 { font-size: 24px; }
.intake-step { display: grid; gap: 10px; }
.intake-progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.intake-progress-bar { height: 100%; background: var(--lime); border-radius: 99px; transition: width .25s ease; }
.intake-count { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.intake-question { display: grid; gap: 12px; }
.intake-question h1 { font-family: Inter, ui-sans-serif, sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.optional-tag { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.option-list { display: grid; gap: 8px; }
.option-card { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); cursor: pointer; font-size: 15px; }
.option-card:has(input:checked) { border-color: var(--accent); background: var(--lime-soft); }
.option-card input { width: 20px; height: 20px; accent-color: var(--lime); flex: none; }
.field textarea, .field input[type="tel"] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.number-answer { display: flex; align-items: center; gap: 10px; }
.number-answer input { max-width: 160px; }
.number-answer .unit { color: var(--muted); }
.height-imperial { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.height-answer { display: grid; gap: 6px; justify-items: start; }
.height-answer > div { width: 100%; }
.grid-answer { display: grid; gap: 4px; }
.intake-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.intake-nav .button { flex: 1; }
.intake-nav [hidden] + .button { flex: 1; }
.intake-review { display: grid; gap: 10px; }
.intake-review h2 { margin-top: 10px; font-size: 15px; color: var(--accent); }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; }
.review-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.review-list li > div { display: grid; gap: 2px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.status-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--lime-soft); color: var(--accent); }

/* This week */
.week-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.week-head h1 { font-size: 24px; margin-top: 4px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 600 13px Inter, sans-serif; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); }
.week-switch { display: flex; justify-content: flex-end; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-chip { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text-2); font: 500 11px Inter, sans-serif; cursor: pointer; }
.day-chip strong { font-size: 16px; color: var(--text); }
.day-chip.is-today { border-color: var(--line-strong); }
.day-chip.is-today strong { color: var(--accent); }
.day-chip.is-selected { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.day-chip.is-selected strong { color: var(--lime-ink); }
.day-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.day-dot.some { background: var(--amber); }
.day-dot.done { background: var(--accent); }
.day-chip.is-selected .day-dot.done, .day-chip.is-selected .day-dot.some { background: var(--lime-ink); }
.day-heading { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.meal-list { display: grid; gap: 10px; }
.meal-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 6px 4px 4px; }
.meal-card.checked-ate { border-color: var(--selection); }
.meal-row { display: flex; align-items: center; gap: 8px; }
.meal-main { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.meal-main .slot-name, .week-meals-list .slot-name { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.status-word { color: var(--accent); }
.checked-skipped .status-word { color: var(--amber); }
.meal-main .meal-title, .week-meals-list .meal-title { font-weight: 600; font-size: 15px; line-height: 1.35; display: block; }
.meal-macros { font-size: 13px; color: var(--text-2); }
.check-controls { display: flex; align-items: center; gap: 2px; flex: none; }
.check-button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent; color: var(--lime-ink); display: grid; place-items: center; cursor: pointer; }
.check-button:disabled { opacity: .35; cursor: default; }
.check-button.is-ate { background: var(--lime); border-color: var(--lime); }
.check-button.is-other { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
.check-button.is-skipped { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.more-button { width: 36px; height: 44px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.more-button:hover { color: var(--text); background: var(--card-2); }
.check-menu { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; }
.meal-detail { padding: 0 12px 12px; }
.meal-detail ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.meal-detail li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.meal-detail li span:last-child { color: var(--text-2); white-space: nowrap; }
.day-summary { display: flex; justify-content: space-between; gap: 16px; }
.day-summary > div { display: grid; gap: 2px; }
.day-summary strong, .week-score strong { font-family: var(--display); font-weight: 400; font-size: 18px; }
.week-score { display: grid; gap: 4px; }
.week-day.is-today { border-color: var(--line-strong); }
.week-day .card-head { margin-bottom: 4px; }
.week-day h3 { font-size: 15px; }
.week-meals-list { list-style: none; margin: 0; padding: 0; display: grid; }
.week-meals-list > li:not(.meal-menu-slot) { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.week-meals-list > li > div { min-width: 0; }
.check-hint { text-align: center; }
.checked-other .status-word { color: var(--blue); }

/* This week: meal cards with the coach's buttons */
.client-meal { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: 16px; padding: 4px 6px 8px 4px; }
.client-meal.is-ate { border-top-color: var(--lime); }
.client-meal.is-other { border-top-color: var(--blue); }
.client-meal.is-skipped { border-top-color: var(--amber); }
.client-meal.is-out { background: var(--amber-bg); }
.client-meal.is-other .status-word { color: var(--blue); }
.client-meal.is-skipped .status-word { color: var(--amber); }
.meal-actions { display: grid; grid-template-columns: 40px 40px 1fr; gap: 6px; padding: 4px 8px 0 12px; }
.meal-actions .icon-button { width: 40px; height: 40px; }
.meal-actions .mc-link { min-height: 40px; font-size: 13px; }
.meal-actions .mc-out-button { grid-column: 1 / -1; min-height: 40px; font-size: 14px; }
.mc-link:disabled { opacity: .4; cursor: not-allowed; }
.week-tools { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.week-tools .button svg { margin-right: 6px; vertical-align: -4px; }

/* Week view: one row per day, swipe sideways through its meals */
.week-row { display: grid; gap: 8px; }
.week-row-head { display: flex; align-items: center; gap: 8px; }
.week-row-head h3 { font-size: 15px; margin-right: auto; }
.week-row.is-today .week-row-head h3 { color: var(--accent); }
.week-row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.mini-meal { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line-strong); border-radius: 14px; padding: 6px 6px 6px 4px;
  display: grid; grid-template-columns: 1fr auto; align-items: start; }
.mini-meal.is-ate { border-top-color: var(--lime); }
.mini-meal.is-other { border-top-color: var(--blue); }
.mini-meal.is-skipped { border-top-color: var(--amber); }
.mini-meal.is-out { background: var(--amber-bg); }
.mini-meal .meal-menu-slot { grid-column: 1 / -1; }
.mini-main { display: grid; gap: 2px; padding: 8px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.mini-main .slot-name { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mini-main .meal-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.mini-meal .check-controls { flex-direction: column; }

/* Panel that slides up from the bottom */
body.sheet-open { overflow: hidden; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); animation: sheet-up .2s ease; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { font-size: 18px; }
.sheet-body { display: grid; gap: 10px; }
.sheet-sub { font-size: 14px; margin-top: 6px; }
.sheet-points { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.portion-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.portion-list li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.portion-list li span:last-child { color: var(--text-2); white-space: nowrap; }
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.idea-list li { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.sheet .field select, .sheet .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }

/* Tab bar at the bottom of the screen */
.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 4px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--side-bg); border-top: 1px solid var(--side-line); }
.app-tab { flex: 1; max-width: 200px; display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; color: var(--muted); text-decoration: none; font: 600 12px Inter, sans-serif; }
.app-tab svg { width: 22px; height: 22px; }
.app-tab[aria-current="page"] { color: var(--accent); background: var(--lime-soft); }
body.has-tabs .app-main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.has-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Groceries */
.grocery-cost { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cost-more summary { cursor: pointer; color: var(--text-2); padding-top: 4px; }
.cost-more p { margin: 4px 0 0; }
.grocery-cost > div { display: grid; gap: 2px; align-content: start; }
.grocery-cost strong { font-family: var(--display); font-weight: 400; font-size: 18px; }
.grocery-progress { display: grid; gap: 6px; }
.grocery-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.grocery-bar span { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .2s ease; }
.grocery-progress-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.grocery-section { display: grid; gap: 8px; }
.grocery-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.grocery-section-head h2 { font-size: 16px; }
.grocery-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.grocery-check { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer; min-height: 56px; }
.grocery-box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--lime-ink); margin-top: 1px; }
.grocery-text { display: grid; gap: 2px; min-width: 0; }
.grocery-text strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.grocery-text > span:not(.small) { font-size: 14px; color: var(--text-2); }
.grocery-item.is-checked .grocery-check { background: transparent; }
.grocery-item.is-checked .grocery-box { background: var(--lime); border-color: var(--lime); }
.grocery-item.is-checked .grocery-text strong { text-decoration: line-through; color: var(--muted); }
.grocery-section.supplements { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
@media (max-width: 360px) { .grocery-cost { grid-template-columns: 1fr; } }
.grocery-item { display: flex; align-items: stretch; gap: 6px; }
.grocery-item .grocery-check { flex: 1; min-width: 0; }
.at-home-button { flex: none; width: 64px; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--muted); font: 600 11px Inter, sans-serif; cursor: pointer; }
.at-home-button:hover { color: var(--accent); border-color: var(--accent); }
.grocery-section.at-home { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.at-home-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }

/* Prep */
.prep-sessions { width: 100%; }
.prep-sessions button { flex: 1; }
.prep-session-head { display: grid; gap: 6px; }
.prep-session-head h2 { font-size: 17px; }
.prep-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prep-step { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.prep-step-head { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.prep-step-title { display: grid; gap: 2px; }
.prep-step-title strong { font-size: 15px; }
.prep-step.is-done { background: transparent; }
.prep-step.is-done .grocery-box { background: var(--lime); border-color: var(--lime); }
.prep-step.is-done .prep-step-title strong { color: var(--muted); text-decoration: line-through; }
.prep-step-body { display: grid; gap: 8px; padding: 0 12px 12px 50px; font-size: 14px; }
.prep-lines { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.prep-lines.numbered { padding-left: 20px; gap: 8px; }
.prep-need summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.prep-need[open] summary { margin-bottom: 4px; }
.prep-each, .prep-later { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.prep-later { border-left: 3px solid var(--amber); }
.prep-dinners { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.prep-dinners input { width: 20px; height: 20px; accent-color: var(--lime); }
.recipe-row { width: 100%; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.leftover-note { color: var(--accent); }

/* Grocery list (before shopping) */
.grocery-cost .grocery-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.grocery-cost .grocery-actions .button { flex: 1; min-width: 150px; justify-content: center; }
.grocery-cost .grocery-actions svg { margin-right: 6px; vertical-align: -4px; }
.list-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.list-item-main { display: grid; gap: 2px; min-width: 0; }
.list-item-main strong { font-size: 15px; overflow-wrap: anywhere; }
.list-item-main > span:not(.small) { font-size: 14px; color: var(--text-2); }
.list-item-price { display: grid; justify-items: end; align-content: start; gap: 1px; text-align: right; white-space: nowrap; }
.list-item-price strong { font-size: 15px; }
.enough-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 0; border: 0; background: transparent; color: var(--text-2); font: 500 13px Inter, sans-serif; cursor: pointer; justify-self: start; }
.enough-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--lime-ink); }
.enough-box svg { width: 14px; height: 14px; }
.list-item.has-enough { background: transparent; }
.list-item.has-enough .enough-box { background: var(--lime); border-color: var(--lime); }
.list-item.has-enough .enough-toggle { color: var(--accent); }
.list-item.has-enough .list-item-main strong, .list-item.has-enough .list-item-price strong { color: var(--muted); text-decoration: line-through; }

/* Shopping (in the store) */
.back-link { justify-self: start; padding-left: 0; }
.shop-head { display: grid; gap: 8px; }
.shop-head-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.shop-head-line > div { display: grid; gap: 2px; }
.shop-head-line strong { font-size: 17px; }
.shop-count { font-weight: 600; color: var(--accent); white-space: nowrap; }
.shop-route { display: grid; gap: 6px; }
.shop-route h2 { font-size: 15px; }
.route-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: route; }
.route-chips li { counter-increment: route; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.route-chips li::before { content: counter(route) "  "; color: var(--accent); font-weight: 700; }
.section-number { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--lime-soft); color: var(--accent); font-size: 12px; }

/* Prep day and shopping day badges (This week) */
.day-marks { display: flex; gap: 2px; height: 12px; color: var(--accent); }
.day-marks svg { width: 12px; height: 12px; }
.day-chip.is-selected .day-marks { color: var(--lime-ink); }
.day-flags { display: grid; gap: 6px; margin-bottom: -6px; }
.day-flag { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: var(--lime-soft); border: 1px solid var(--accent); color: var(--text); text-decoration: none; font: 600 14px Inter, sans-serif; }
.day-flag svg { color: var(--accent); flex: none; }
.day-flag-go { margin-left: auto; color: var(--accent); font-size: 13px; white-space: nowrap; }

/* Profile & settings */
.avatar-link { display: inline-flex; border-radius: 50%; text-decoration: none; }
.avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar.big { width: 52px; height: 52px; font-size: 18px; }
.settings-card { display: grid; gap: 12px; }
.settings-card h2 { font-size: 17px; }
.profile-line { display: flex; align-items: center; gap: 14px; }
.profile-line > div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.settings-facts { list-style: none; margin: 0; padding: 0; display: grid; }
.settings-facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.settings-facts li strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.segmented.wide { display: flex; }
.segmented.wide button { flex: 1; padding: 0 8px; }
.switch-line { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch-line input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--lime); flex: none; }
.switch-line > span { display: grid; gap: 2px; }
.day-choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day-choice legend { grid-column: 1 / -1; margin-bottom: 8px; padding: 0; }
.day-toggle { position: relative; }
.day-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day-toggle span { display: grid; place-items: center; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); font: 600 13px Inter, sans-serif; color: var(--text-2); }
.day-toggle input:checked + span { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.day-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-group-head { display: grid; gap: 6px; margin-top: 8px; }
.settings-group-head h2 { font-size: 20px; }
.block { display: block; }
.option-card > span { display: grid; gap: 2px; }
.household-list { list-style: none; margin: 0; padding: 0; display: grid; }
.household-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper strong { min-width: 22px; text-align: center; font-size: 17px; }
.stepper .icon-button { width: 40px; height: 40px; font-size: 20px; line-height: 1; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.food-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line-strong); font-size: 14px; }
.food-chip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.food-chip button:hover { color: var(--text); background: var(--line); }
.add-food { display: flex; gap: 8px; }
.add-food input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.review-bar { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--accent); box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); }
.review-bar > span { flex: 1; display: grid; }
body.has-review-bar .app-main { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
.notice.attention { border-color: var(--amber); background: var(--amber-bg); }
.meal-tag { justify-self: start; margin: 2px 0; padding: 2px 8px; border-radius: 99px; background: var(--lime-soft); color: var(--accent); font: 600 12px Inter, sans-serif; }
.grocery-section.is-today .grocery-section-head h2 { color: var(--accent); }
.recipe-row > .small.muted:first-child { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.meal-ways { list-style: none; margin: 0; padding: 0; display: grid; }
.meal-ways li { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.meal-way-name { font-weight: 600; padding-top: 10px; }
.meal-ways li > .small { padding-top: 10px; }
.meal-way { display: grid; gap: 4px; }
.meal-way select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.swap-time { margin: 10px 0 2px; }
.swap-time button { font-size: 12px; }
.swap-time-note { margin-top: 4px; }
.prep-settings-link { margin: 6px 0 0; font-weight: 600; }
.prep-settings-link a { color: var(--accent); }
#meal-ways { scroll-margin-top: 80px; }

/* Home: today's ring, up next, the month's climb, weight */
.home-card { display: grid; gap: 10px; }
.home-card h2 { font-size: 18px; }
.ring-card { grid-template-columns: 128px 1fr; align-items: center; gap: 16px; }
.ring-card > div { display: grid; gap: 6px; }
.ring-message { font-weight: 600; }
.up-next .button-row { margin-top: 2px; }
.up-next .button svg { vertical-align: -5px; margin-right: 4px; }
.climb-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.climb-card .card-head h2 { margin-top: 2px; }
.avatar.is-saving { opacity: .5; }
.file-button { cursor: pointer; }
.photo-tips { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); }
.photo-tips ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.crop-stage { position: relative; width: min(100%, 264px); aspect-ratio: 4 / 5; margin: 12px auto; border-radius: 14px; overflow: hidden; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); border: 2px solid var(--lime); pointer-events: none; }
/* Scene colors: see-through, so they sit well on dark and light cards. */
.next-scene { padding: 8px 12px; border-radius: 10px; background: var(--lime-soft); }
.weight-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weight-now { display: grid; gap: 2px; }
.weight-now strong { font: 400 24px var(--display); }
.weight-spark { width: 100%; height: 40px; }
.weight-spark polyline { fill: none; stroke: var(--lime); stroke-width: 2; vector-effect: non-scaling-stroke; }
.weight-input { display: flex; gap: 8px; }
.weight-input input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.weight-input select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.field input[type="date"] { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }

/* Progress photos */
.photos-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-thumb { position: relative; display: block; aspect-ratio: 3 / 4; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card-2); cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb span { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font: 600 11px Inter, sans-serif; }
.photo-thumb.empty { display: grid; place-items: center; cursor: default; }
.photo-thumb.empty span { position: static; background: none; color: var(--muted); }
.photo-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-pick { position: relative; cursor: pointer; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick-box { display: grid; place-content: center; justify-items: center; gap: 4px; aspect-ratio: 3 / 4; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--card-2) center / cover no-repeat; font-weight: 600; text-align: center; }
.photo-pick-box.has-photo { border-style: solid; border-color: var(--accent); }
.photo-pick-box.has-photo span { display: none; }
.photo-pick input:focus-visible + .photo-pick-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--card-2); }
.compare-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare-pick select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare-row img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--card-2); }

/* Chat with your coach */
.chat-link { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--side-strong); }
.chat-link:hover { background: var(--side-hover, rgba(255, 255, 255, .06)); }
.chat-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; border: 2px solid var(--side-bg); }
.chat { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.chat > * { min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-head h1 { font-size: 20px; }
.chat-head .back { white-space: nowrap; }
.chat .chat-thread { min-height: 200px; max-height: calc(100dvh - 330px - env(safe-area-inset-bottom)); }

.meal-note { display: block; font-size: 13px; color: var(--blue, inherit); margin-top: 2px; overflow-wrap: anywhere; }

/* Build my own plate (Swap) */
.own-plate { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.own-plate [data-own] { display: grid; gap: 10px; }
.own-matches, .own-chosen, .own-amounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.own-match { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.own-match:hover, .own-match:focus-visible { border-color: var(--accent); }
.own-chosen li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.own-chosen li.own-empty { background: none; padding: 0; }
.own-chosen-tools { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.segmented.own-form { padding: 2px; border-radius: 10px; }
.segmented.own-form button { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.own-ask { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--lime); border-radius: 12px; background: var(--card-2); }
.own-ask p { margin: 0; }
.own-ask-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.own-head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.own-result { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--accent); border-radius: 12px; }
.own-amounts li strong { display: inline-block; min-width: 64px; }
.own-say { display: flex; gap: 8px; align-items: center; }
.own-say input { flex: 1; min-width: 0; }
.own-say .icon-button.is-listening { color: var(--lime-ink, #0a0c0b); background: var(--lime); border-color: var(--lime); animation: ff-listen 1.2s ease-in-out infinite; }
@keyframes ff-listen { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--lime) 30%, transparent); } }
.own-or { margin-top: 4px; }
[data-own-idea-list] { display: grid; gap: 10px; }
.recipe-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* Past weeks */
.past-weeks { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.past-week { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.past-week:hover, .past-week:focus-visible { border-color: var(--accent); }
.past-week-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.past-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.past-day { display: grid; place-items: center; height: 28px; border-radius: 8px; font-size: 11px; font-weight: 600; background: var(--card-2); color: var(--muted); }
.past-day.is-good { background: var(--lime); color: var(--lime-ink, #0a0c0b); }
.past-day.is-some { background: color-mix(in srgb, var(--lime) 30%, var(--card-2)); color: var(--text); }
.past-day.is-off { opacity: .45; }
/* Add to Home Screen */
.install-card { display: flex; gap: 14px; align-items: flex-start; }
.install-card img { flex: none; border-radius: 12px; }
.install-card h2 { font-size: 17px; }
.install-steps { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 10px; }
.install-steps svg { vertical-align: -4px; color: var(--accent); }

/* Add a food from its label. */
.label-form { display: grid; gap: 12px; }
.label-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.label-photo { width: 100%; max-height: 240px; object-fit: contain; border-radius: 12px; background: var(--card-2); }
.label-photo.small { max-height: 120px; width: auto; justify-self: start; }
.label-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.label-allergens { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.label-allergens legend { margin-bottom: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.own-label-link { justify-self: start; }

/* Import a recipe from a link. */
.recipe-import-form { display: grid; gap: 10px; }
.recipe-import-form textarea { width: 100%; box-sizing: border-box; }
.recipe-import-title { margin: 0; }
.recipe-import-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.recipe-import-list li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.recipe-import-list li.is-matched span.small { color: var(--lime); }

/* Recipe photos on meal cards and swap ideas */
.meal-main.with-photo { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.meal-main.with-photo > .recipe-photo { grid-row: 1 / span 6; }
.meal-main.with-photo > :not(.recipe-photo) { grid-column: 2; }
.idea-list li.idea-with-photo { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; }
.idea-list li.idea-with-photo > .recipe-photo { grid-row: 1 / span 3; }
.idea-list li.idea-with-photo > :not(.recipe-photo) { grid-column: 2; }

/* Meal screen actions, favorites and swap search */
.meal-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.meal-sheet-actions .button svg { vertical-align: -3px; }
.fav-toggle[aria-pressed="true"] { color: var(--accent); }
.fav-mark { color: var(--accent); display: inline-flex; vertical-align: -3px; }
.fav-mark svg { width: 14px; height: 14px; }
.swap-search { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 0 12px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--muted); }
.swap-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; padding: 10px 0; }
.swap-search:focus-within { border-color: var(--accent); }
.favorite-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.favorite-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* An extra the coach fitted into the day (November 25, 2026). */
.extra-note { display: grid; gap: 8px; border-style: dashed; }
.extra-note p { display: flex; gap: 10px; align-items: center; margin: 0; }
.extra-note p > span:last-child { display: grid; }

/* Settings main page: a short list of sections (November 25, 2026). */
.settings-menu { padding: 4px 0; display: grid; }
.settings-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.settings-row:last-child { border-bottom: 0; }
.settings-row:hover { background: var(--card-2); }
.settings-row-icon { font-size: 22px; display: grid; place-items: center; }
.settings-row-text { display: grid; gap: 2px; min-width: 0; }
.settings-row-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-row-go { font-size: 22px; color: var(--faint); }
.back-link { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; padding: 0; margin-bottom: 6px; cursor: pointer; }
.photo-tips summary { cursor: pointer; }

/* Prep day guide (November 25, 2026): cook once, chop once, fill once. */
.prep-table { margin-top: 10px; display: grid; gap: 6px; }
.prep-table-title { margin: 0; }
.prep-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prep-table th, .prep-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.prep-table tbody th[scope="row"] { font-weight: 500; white-space: normal; min-width: 120px; }
.prep-table thead th { font-size: 12px; color: var(--muted, inherit); font-weight: 600; }
.prep-table .prep-group th { padding-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); border-bottom: 0; }
.prep-tips { list-style: none; margin: 10px 0 0; padding: 10px 12px; display: grid; gap: 6px; background: var(--card-2); border-radius: 10px; font-size: 13px; }
.prep-needs h3 { margin: 0 0 8px; font-size: 15px; }
.prep-needs ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
@media (min-width: 560px) { .prep-needs ul { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.up-next .finish-line { margin: 8px 0 0; padding: 8px 10px; background: var(--card-2); border-radius: 10px; font-size: 13px; }
/* Group challenge (owner, November 27, 2026): one card on Home while a challenge runs, and its leaderboard. */
.challenge-card { display: grid; gap: 10px; }
.challenge-open { all: unset; display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; }
.challenge-open:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 8px; }
.challenge-missing { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--amber-bg, var(--card-2)); }
.challenge-icon { font-size: 26px; }
.challenge-text { display: grid; gap: 2px; flex: 1; }
.challenge-text strong { font-size: 16px; }
.challenge-go { font-size: 22px; color: var(--muted); }
.challenge-prize { margin: 8px 0; font-weight: 600; }
.challenge-board { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.challenge-board li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card-2); }
.challenge-board li.is-me { outline: 2px solid var(--lime); }
.challenge-place { font-weight: 700; }
.challenge-score { font-size: 13px; color: var(--text-2); }
.challenge-task { color: var(--amber); }
.challenge-rules { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--card-2); }
.challenge-rules ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 4px; }
.challenge-snap { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0; cursor: pointer; }
/* Simpler swap sheet and "Put back" (owner, November 28, 2026). */
.swap-more { margin-top: 14px; }
.swap-more > summary { list-style: none; display: inline-flex; cursor: pointer; }
.swap-more > summary::-webkit-details-marker { display: none; }
.swap-more[open] > summary { margin-bottom: 10px; }
.swap-time-link { margin: 6px 0 0; }
.toast-undo { margin-left: 10px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 4px; }
/* Pantry memory (owner, November 28, 2026). */
.remembered-note { color: var(--text-2); }
