/* Ground Control "Daylight": one shared set of parts.
   Rules: no inline styles anywhere (CSP). Widths that depend on data
   (macro bars, vitamin bars, progress) are drawn as small inline SVGs with
   width attributes, not style="width:…". Nothing depends on hover.
   Every control is at least var(--tap-min) tall. */

/* ---------- Layout ---------- */
.page { padding: var(--space-6) var(--page-pad) var(--space-10); display: flex; flex-direction: column; gap: var(--section-gap); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.page-head__eyebrow { font-size: var(--fs-sub); font-weight: 600; color: var(--text-2); }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: var(--space-10); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 1023px) { .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px)  { .grid-5, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Section heading (icon + title + "More ›" link) ---------- */
.section-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.section-head__icon { width: 1.875rem; height: 1.875rem; flex-shrink: 0; }
.section-head__title { flex: 1; font-size: var(--fs-title-2); font-weight: 700; letter-spacing: var(--tracking-title); }
.section-head__more { font-size: var(--fs-headline); font-weight: 500; color: var(--link); min-height: var(--tap-min); display: inline-flex; align-items: center; }

/* ---------- Card ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--space-6) var(--space-6); min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card--tinted { background: var(--surface-2); box-shadow: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); padding: 0 var(--space-6); border: 0; border-radius: var(--r-pill);
  font-size: var(--fs-headline); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--fill-quiet); color: var(--text); }  /* a plain button is the quiet kind; without this a <button> wore the browser's own grey */
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:active { background: var(--accent-pressed); }
.btn--secondary { background: var(--fill-quiet); color: var(--text); }
.btn--tinted { background: var(--info-bg); color: var(--info); }
.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--success { background: var(--area-slime-ink); color: var(--on-ink); }
.btn--lg { min-height: var(--control-h-lg); padding: 0 var(--space-8); font-size: var(--fs-title-3); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Chips and segmented control ---------- */
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip { min-height: 2.75rem; padding: 0 var(--space-5); border-radius: var(--r-pill); border: 0; background: var(--surface);
  box-shadow: 0 1px 0.125rem rgba(0, 0, 0, 0.05); font-size: var(--fs-headline); font-weight: 600; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; }
.chip[aria-pressed="true"], .chip.is-current { background: var(--text); color: var(--bg); }
.segmented { display: flex; padding: 0.25rem; border-radius: var(--r-pill); background: var(--fill-segmented); }
.segmented > * { flex: 1; min-height: 2.75rem; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-3);
  font-size: var(--fs-headline); font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 var(--space-4); }
.segmented > [aria-pressed="true"], .segmented > [aria-current="true"], .segmented > .is-current { background: var(--surface); color: var(--text); box-shadow: 0 1px 0.375rem rgba(0, 0, 0, 0.12); }

/* ---------- List row ---------- */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline); font-size: var(--fs-body); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
.list-row__main { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__meta { color: var(--text-2); font-size: var(--fs-sub); white-space: nowrap; }
.list-row__chevron { color: var(--text-2); }

/* ---------- Form field ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: var(--fs-sub); font-weight: 650; color: var(--text); }
.field__help { font-size: var(--fs-footnote); color: var(--text-2); }
.field__error { font-size: var(--fs-footnote); color: var(--danger); font-weight: 600; }
.input, .select, .textarea { min-height: var(--control-h); width: 100%; padding: 0 var(--space-4); border-radius: var(--r-md);
  border: 1px solid var(--separator); background: var(--surface); font-size: var(--fs-body); color: var(--text); }
.textarea { padding: var(--space-3) var(--space-4); min-height: 6rem; }
/* Safari ignores height on styled native drop-downs: keep appearance, pad instead */
.select { -webkit-appearance: none; appearance: none; padding-right: 2.5rem;
  background-image: url("../icons/ui/chevron-right.svg"); background-repeat: no-repeat; background-position: right 0.875rem center; background-size: 1rem; }
.input:focus, .select:focus, .textarea:focus { outline: 0.1875rem solid var(--focus-ring); outline-offset: 0; }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.search { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-h); padding: 0 var(--space-4);
  border-radius: var(--r-pill); background: var(--surface); box-shadow: 0 1px 0.125rem rgba(0,0,0,0.05), 0 0.375rem 1.125rem rgba(0,0,0,0.05); }
.search input { border: 0; background: transparent; flex: 1; min-height: 2.75rem; font-size: var(--fs-body); outline: none; }
/* "More details" disclosure for long forms (stock item: problem 4) */
.more-details > summary { min-height: var(--tap-min); display: flex; align-items: center; color: var(--link); font-weight: 600; cursor: pointer; list-style: none; }
.more-details > summary::-webkit-details-marker { display: none; }

/* ---------- Tick box (housework, shopping) ---------- */
.tick { display: flex; align-items: center; gap: var(--space-4); min-height: 4rem; padding: var(--space-2) 0; cursor: pointer; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick__box { width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: 50%; border: 0.15625rem solid var(--text-2); display: flex; align-items: center; justify-content: center; }
.tick input:checked + .tick__box { background: var(--success); border-color: var(--success); }
.tick input:checked + .tick__box::after { content: ""; width: 0.875rem; height: 0.5rem; border-left: 0.1875rem solid var(--on-ink); border-bottom: 0.1875rem solid var(--on-ink); transform: rotate(-45deg) translate(1px, -1px); }
.tick input:focus + .tick__box { outline: 0.1875rem solid var(--focus-ring); outline-offset: 0.1875rem; }
.tick__label { font-size: var(--fs-body); font-weight: 600; }
.tick input:checked ~ .tick__label { color: var(--text-2); text-decoration: line-through; }
.surface-kitchen .tick__box { width: 3rem; height: 3rem; }

/* ---------- Status message ---------- */
.status { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-5); border-radius: var(--r-md);
  font-size: var(--fs-body); font-weight: 600; }
.status--success { background: var(--success-bg); color: var(--success); }
.status--warning { background: var(--warning-bg); color: var(--warning); }
.status--danger  { background: var(--danger-bg);  color: var(--danger); }
.status--info    { background: var(--info-bg);    color: var(--info); }

/* ---------- Badge / pill labels ---------- */
.pill { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.625rem; border-radius: var(--r-pill); font-size: var(--fs-footnote); font-weight: 700; white-space: nowrap; }
.pill--kcal { background: var(--kcal-bg); color: var(--kcal-ink); }
.pill--protein { background: var(--protein-bg); color: var(--protein-ink); }
.pill--today { background: var(--area-meals-ink); color: var(--on-ink); text-transform: uppercase; letter-spacing: var(--tracking-label); }
.eyebrow { font-size: var(--fs-footnote); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-2); }
.eyebrow--meals { color: var(--area-meals-ink); }

/* ---------- Avatars ---------- */
.avatar { display: inline-flex; border-radius: 50%; overflow: hidden; flex-shrink: 0; width: var(--avatar-md); height: var(--avatar-md); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: var(--avatar-sm); height: var(--avatar-sm); }
.avatar--lg { width: var(--avatar-lg); height: var(--avatar-lg); }
.avatar--xl { width: var(--avatar-xl); height: var(--avatar-xl); }
.avatar--ring { box-shadow: 0 0 0 0.1875rem var(--surface), 0 0.125rem 0.625rem rgba(0, 0, 0, 0.14); }
.avatar--bg-pink { background: var(--avatar-pink); } .avatar--bg-orange { background: var(--avatar-orange); }
.avatar--bg-yellow { background: var(--avatar-yellow); } .avatar--bg-green { background: var(--avatar-green); }
.avatar--bg-teal { background: var(--avatar-teal); } .avatar--bg-blue { background: var(--avatar-blue); }
.avatar--bg-purple { background: var(--avatar-purple); } .avatar--bg-grey { background: var(--avatar-grey); }
.avatar-stack { display: flex; } .avatar-stack > .avatar + .avatar { margin-left: -0.75rem; box-shadow: 0 0 0 0.125rem var(--surface); }

/* ========== MENU: iPad and Mac top row (all apps, one row) ========== */
.app-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: 0.375rem var(--space-6) 0.125rem; background: var(--glass); border-bottom: 1px solid var(--separator);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%); backdrop-filter: blur(var(--glass-blur)) saturate(180%); }
.app-menu { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; min-width: 0; }
.app-menu__item { list-style: none; }
.app-menu__link { display: flex; flex-direction: column; align-items: center; gap: 0.1875rem; width: 3rem; min-height: 3.625rem; padding-top: 0.1875rem;
  color: var(--text-3); text-decoration: none; }
.app-menu__link:hover { text-decoration: none; }
.app-menu__icon { width: var(--icon-app); height: var(--icon-app); border-radius: 22.5%; box-shadow: 0 1px 0.25rem rgba(0, 0, 0, 0.1); }
.app-menu__label { font-size: var(--fs-menu-label); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.app-menu__link[aria-current="page"] { color: var(--text); }
.app-menu__link[aria-current="page"] .app-menu__label { font-weight: 700; }
.app-menu__link[aria-current="page"]::after { content: ""; width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: currentColor; }
.app-bar__end { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }
/* 20 icons x 48px = 960px plus the end group fits a 1180px iPad in one row.
   Below 1100px (iPad portrait, Split View) the row scrolls sideways inside itself,
   never the page; below 700px the phone tab bar takes over. */
@media (max-width: 1099px) { .app-menu { overflow-x: auto; scrollbar-width: none; } .app-menu::-webkit-scrollbar { display: none; } }
@media (max-width: 699px) { .app-bar { display: none; } }
.surface-kitchen .app-menu__link { width: 4rem; min-height: 4.75rem; }

/* ========== MENU: iPhone floating tab bar + Apps button ========== */
.tab-bar { display: none; }
@media (max-width: 699px) {
  body { padding-bottom: 7.5rem; }
  .tab-bar { display: flex; position: fixed; left: 1rem; right: 1rem; bottom: calc(1.125rem + env(safe-area-inset-bottom)); z-index: 30; gap: 0.625rem; align-items: center; }
  .tab-bar__tabs { flex: 1; display: flex; padding: 0.25rem; border-radius: 1.9375rem; background: var(--glass); border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(1.5rem) saturate(180%); backdrop-filter: blur(1.5rem) saturate(180%); }
  .tab-bar__tab { flex: 1; min-height: 3.375rem; border-radius: 1.6875rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
    color: var(--text); text-decoration: none; font-size: 0.625rem; font-weight: 500; }
  .tab-bar__tab:hover { text-decoration: none; }
  .tab-bar__tab img, .tab-bar__tab svg { width: 1.5rem; height: 1.5rem; }
  .tab-bar__tab[aria-current="page"] { background: var(--fill-quiet); font-weight: 700; color: var(--accent); }
  .tab-bar__apps { width: 3.875rem; height: 3.875rem; flex-shrink: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px; color: var(--text); font-size: 0.625rem; font-weight: 600; text-decoration: none; background: var(--glass); border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-float); -webkit-backdrop-filter: blur(1.5rem) saturate(180%); backdrop-filter: blur(1.5rem) saturate(180%); }
  .tab-bar__fade { position: fixed; left: 0; right: 0; bottom: 0; height: 8.125rem; z-index: 29; pointer-events: none;
    background: linear-gradient(180deg, transparent, var(--bg) 60%); }
}

/* ========== iPhone "All apps" page, drawn as a sheet ========== */
.apps-sheet { min-height: 100vh; margin-top: 3rem; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--glass-strong);
  box-shadow: 0 -0.625rem 2.5rem rgba(0, 0, 0, 0.15); padding: 0.625rem 1.375rem 8.75rem; display: flex; flex-direction: column; gap: var(--space-4); }
.apps-sheet__grabber { width: 2.5rem; height: 0.3125rem; border-radius: 0.1875rem; background: #C7C7CC; align-self: center; }
.apps-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.apps-sheet__group-title { font-size: var(--fs-footnote); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-2); margin: 0 0 var(--space-3); }
.apps-sheet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0.875rem; column-gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.apps-sheet__link { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; color: var(--text); text-decoration: none; font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.apps-sheet__link img { width: var(--icon-app-sheet); height: var(--icon-app-sheet); border-radius: 22.5%; box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1); }

/* ========== Home ========== */
.greeting__date { font-size: var(--fs-headline); font-weight: 600; color: var(--text-2); }
.weather-pill { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-h); padding: 0 var(--space-5);
  border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-card); font-size: var(--fs-headline); font-weight: 600; }
.weather-pill__aside { color: var(--text-2); }
/* Meal tile: photo on the page, no card */
.meal-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.meal-tile { display: flex; flex-direction: column; gap: var(--space-3); color: var(--text); text-decoration: none; min-width: 0; }
.meal-tile:hover { text-decoration: none; }
.meal-tile__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--shadow-photo); background: var(--surface-3); }
.meal-tile__name { font-size: var(--fs-title-3); font-weight: 650; letter-spacing: -0.01em; }
.meal-tile__nutri { font-size: var(--fs-sub); color: var(--text-2); }
@media (max-width: 699px) {
  .meal-tiles { display: flex; overflow-x: auto; margin: 0 calc(-1 * var(--page-pad)); padding: 0 var(--page-pad) 0.375rem; scroll-snap-type: x mandatory; }
  .meal-tile { flex: 0 0 12.5rem; scroll-snap-align: start; }
}
/* This week strip: 7 days with photos (kitchen: full width, never inside a third-width card: problem 3) */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-4); }
.week-strip__day { display: flex; flex-direction: column; gap: var(--space-2); color: var(--text); text-decoration: none; min-width: 0; }
.week-strip__label { align-self: flex-start; padding: 0.1875rem 0; font-size: var(--fs-footnote); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--text-2); }
.week-strip__day[aria-current="date"] .week-strip__label { padding: 0.1875rem 0.625rem; border-radius: var(--r-pill); background: var(--area-meals-ink); color: var(--on-ink); }
.week-strip__photo { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--r-md); background: var(--surface-3); }
.week-strip__empty { width: 100%; aspect-ratio: 5 / 4; border-radius: var(--r-md); background: var(--surface-3); display: flex; align-items: center; justify-content: center; }
.week-strip__name { font-size: var(--fs-sub); font-weight: 600; line-height: 1.25; }
@media (max-width: 699px) { .week-strip { display: flex; overflow-x: auto; } .week-strip__day { flex: 0 0 6.875rem; } }

/* ========== Recipes ========== */
.recipe-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  overflow: hidden; color: var(--text); text-decoration: none; min-width: 0; }
.recipe-card:hover { text-decoration: none; }
.recipe-card__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-3); }
.recipe-card__body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: 0.375rem; }
.recipe-card__name { font-size: var(--fs-headline); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-card__meta { display: flex; gap: var(--space-4); font-size: var(--fs-footnote); color: var(--text-2); }
.recipe-card__meta span { display: inline-flex; align-items: center; gap: 0.3125rem; }
.recipe-card__pills { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ========== Nutrition panel ========== */
.nutrition { display: flex; flex-direction: column; gap: var(--space-4); }
.nutrition__kcal { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.nutrition__kcal-value { font-size: calc(var(--fs-large) * 1.4); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.nutrition__kcal-unit { font-size: var(--fs-title-3); font-weight: 600; color: var(--text-2); }
.nutrition__bar { width: 100%; height: 1.125rem; display: block; border-radius: 0.5625rem; overflow: hidden; }   /* inline <svg> with rect widths */
.nutrition__bar .protein { fill: var(--protein); } .nutrition__bar .carbs { fill: var(--carbs); } .nutrition__bar .fat { fill: var(--fat); }
.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.macro__name { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sub); font-weight: 600; color: var(--text-2); }
.macro__dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.macro__dot--protein { background: var(--protein); } .macro__dot--carbs { background: var(--carbs); } .macro__dot--fat { background: var(--fat); }
.macro__value { font-size: var(--fs-title-1); font-weight: 700; letter-spacing: -0.02em; }
.macro__unit { font-size: var(--fs-headline); color: var(--text-2); font-weight: 600; }
.macro__share { font-size: var(--fs-footnote); color: var(--text-2); }
.source-badge { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.75rem; border-radius: var(--r-pill); font-size: var(--fs-footnote); font-weight: 600; }
.source-badge--published { background: var(--info-bg); color: var(--info); }
.source-badge--calculated { background: var(--kcal-bg); color: var(--kcal-ink); }
.micros { display: flex; flex-direction: column; }
.micro { display: grid; grid-template-columns: 8.75rem minmax(0, 1fr) 3.375rem; align-items: center; gap: var(--space-3); min-height: 2rem; font-size: var(--fs-sub); }
.micro__bar { width: 100%; height: 0.625rem; display: block; }
.micro__bar .track { fill: var(--surface-3); } .micro__bar .value { fill: var(--micro); }
.micro__pct { text-align: right; font-weight: 600; }

/* ========== Avatars in content ========== */
.who-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: var(--space-2) 0; border-bottom: 1px solid var(--hairline); }
.who-row:last-child { border-bottom: 0; }

/* ========== Slime buttons and slime overlay ========== */
.slime-buttons { display: flex; flex-direction: column; align-items: center; gap: 0; }
.slime-buttons__row { display: flex; gap: 0.125rem; }
.slime-button { width: 2.75rem; height: 3rem; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slime-button img { width: 2rem; height: 2.25rem; }
.slime-buttons__label { font-size: var(--fs-menu-label); font-weight: 700; color: var(--text-2); }
.slime-canvas { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* ========== Profile photos (Setup) ========== */
.people-list { display: flex; flex-direction: column; gap: var(--space-2); }
.people-list__row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--r-lg); color: var(--text); text-decoration: none; min-height: 4.5rem; }
.people-list__row[aria-current="true"] { background: var(--surface); box-shadow: var(--shadow-card); }
.people-list__name { font-size: var(--fs-title-3); font-weight: 650; }
.people-list__role { font-size: var(--fs-sub); color: var(--text-2); }
.photo-editor { display: flex; gap: var(--space-8); align-items: center; flex-wrap: wrap; }
.photo-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.photo-action { flex: 1 1 8.75rem; min-height: 6rem; border-radius: var(--r-lg); background: var(--surface-2); color: var(--link); font-size: var(--fs-headline);
  font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer; border: 0; text-align: center; }
.photo-action input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatches { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 3rem; height: 3rem; border-radius: 50%; box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.12); cursor: pointer; }
.swatch input:checked + span { box-shadow: 0 0 0 0.25rem var(--surface), 0 0 0 0.4375rem var(--text); }
.swatch input:focus + span { outline: 0.1875rem solid var(--focus-ring); outline-offset: 0.375rem; }

/* ========== Slime Lab (kitchen iPad, full size, no app menu) ========== */
.lab-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.875rem 1.5rem; background: var(--glass); border-bottom: 1px solid var(--separator);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%); backdrop-filter: blur(var(--glass-blur)) saturate(180%); }
.lab-bar__title { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-title-2); font-weight: 800; }
.lab-bar__title img { width: 2.75rem; height: 2.75rem; }
.lab-bar__status { min-width: 9.375rem; text-align: right; font-size: var(--fs-sub); font-weight: 700; }
.lab { padding: var(--space-8) var(--space-12); display: flex; flex-direction: column; gap: var(--space-8); }
.lab h1 { font-size: 3.25rem; font-weight: 800; }
.lab-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.lab-choice { min-height: 21.25rem; border-radius: 2.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4);
  color: var(--text-on-pastel); text-decoration: none; box-shadow: 0 0.75rem 1.875rem rgba(0, 0, 0, 0.06); text-align: center; padding: var(--space-6); }
.lab-choice--pink { background: #FFE9F3; } .lab-choice--lilac { background: #EFEAFF; } .lab-choice--mint { background: #E6F7F6; }
.lab-choice__title { font-size: 2rem; font-weight: 800; }
.lab-choice__sub { font-size: 1.25rem; color: var(--text-on-pastel); }
.lab-recipes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-5); }
.lab-recipe { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-6) var(--space-3); border-radius: 1.875rem;
  background: var(--surface); box-shadow: 0 0.75rem 1.875rem rgba(0, 0, 0, 0.07); text-align: center; color: var(--text); text-decoration: none; height: 100%; position: relative; }
.lab-recipe__name { font-size: 1.625rem; font-weight: 800; }
.lab-recipe__sub { font-size: 1.1875rem; color: var(--text-2); }
.lab-recipe > .btn { margin-top: auto; }
.lab-recipe--locked { background: #ECECEF; box-shadow: none; color: var(--text-2); }
.lab-recipe--locked .lab-recipe__art { opacity: 0.45; filter: grayscale(0.6); }
.lab-recipe__lock { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.colour-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-2); }
.colour-swatch { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); font-size: 1.125rem; font-weight: 600; text-transform: capitalize; cursor: pointer; }
.colour-swatch input { position: absolute; opacity: 0; }
.colour-swatch span.dot { width: 4rem; height: 4rem; border-radius: 50%; box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.12); }
.colour-swatch input:checked + span.dot { box-shadow: 0 0 0 0.25rem var(--surface), 0 0 0 0.5rem var(--text); }
.colour-swatch input:focus + span.dot { outline: 0.1875rem solid var(--focus-ring); outline-offset: 0.625rem; }
/* one class per food colour (no inline colours) */
.dot--pink { background: #FF6FB5; } .dot--blue { background: #3D7BFF; } .dot--teal { background: #14C2C2; } .dot--red { background: #F23B3B; }
.dot--yellow { background: #FFD21F; } .dot--green { background: #3CCB4A; } .dot--purple { background: #9B4DFF; } .dot--black { background: #2B2B33; }
.lab-preview { border-radius: 2.5rem; background: linear-gradient(180deg, #E8F6FC, var(--surface)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); padding: var(--space-6); }
.lab-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-2); }
.lab-progress span { height: 0.625rem; border-radius: 0.3125rem; background: var(--surface-3); }
.lab-progress span.done { background: var(--area-slime); }
.lab-progress span.now { background: #7FE3DE; }
.lab-step__text { font-size: 4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.who-badge { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 3.75rem; padding: 0 1.375rem 0 0.5rem; border-radius: 1.875rem; font-size: 1.375rem; font-weight: 700; }
.who-badge--child { background: #FFE3F1; color: #A3135F; }
.who-badge--grownup { background: #EEF0FF; color: #3A35B8; }
.who-badge--together { background: #E6F7F6; color: #00615D; }
.why { display: flex; gap: var(--space-4); align-items: flex-start; padding: 1.25rem 1.5rem; border-radius: 1.625rem; background: var(--warning-bg); }
.why__title { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--warning); }
.why__text { font-size: 1.5rem; font-weight: 600; }
.feel-option { display: flex; align-items: center; gap: var(--space-4); min-height: 6rem; padding: 0 1.75rem; border-radius: 1.875rem; border: 0; background: var(--surface);
  font-size: 1.75rem; font-weight: 800; color: var(--text); cursor: pointer; text-decoration: none; width: 100%; }
.feel-option--good { background: var(--success-bg); color: var(--success); }
.feel-option[aria-current="true"] { box-shadow: 0 0 0 0.3125rem var(--text); }
.lab-collection { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem 0.5rem; }
.lab-collection figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 1rem; font-weight: 600; }
.lab .btn { min-height: 4.5rem; padding: 0 2.5rem; font-size: 1.625rem; font-weight: 700; }

/* ---------- House members (Hall HQ design system) ---------- */
/* A photo sits in a ring of its person's colour; the thin inner gap keeps the photo off the ring. */
.avatar--bg-racing-green { background: var(--m-racing-green); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-racing-green); }
.avatar--bg-sunshine { background: var(--m-sunshine); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-sunshine); }
.avatar--bg-hot-pink { background: var(--m-hot-pink); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-hot-pink); }
.avatar--bg-sky { background: var(--m-sky); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-sky); }
.avatar--bg-red { background: var(--m-red); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-red); }
.avatar--bg-royal-blue { background: var(--m-royal-blue); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-royal-blue); }
.avatar--bg-mustard { background: var(--m-mustard); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-mustard); }
.avatar--bg-violet { background: var(--m-violet); box-shadow: 0 0 0 0.125rem var(--surface), 0 0 0 0.3125rem var(--m-violet); }
/* A dot of the person's colour beside their name (the name is always written too). */
.member-dot { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.5rem; border-radius: 50%; vertical-align: middle; background: var(--fill-quiet); }
.member-dot--racing-green { background: var(--m-racing-green); box-shadow: 0 0 0 1px var(--m-racing-green-ink); }
.member-dot--sunshine { background: var(--m-sunshine); box-shadow: 0 0 0 1px var(--m-sunshine-ink); }
.member-dot--hot-pink { background: var(--m-hot-pink); box-shadow: 0 0 0 1px var(--m-hot-pink-ink); }
.member-dot--sky { background: var(--m-sky); box-shadow: 0 0 0 1px var(--m-sky-ink); }
.member-dot--red { background: var(--m-red); box-shadow: 0 0 0 1px var(--m-red-ink); }
.member-dot--royal-blue { background: var(--m-royal-blue); box-shadow: 0 0 0 1px var(--m-royal-blue-ink); }
.member-dot--mustard { background: var(--m-mustard); box-shadow: 0 0 0 1px var(--m-mustard-ink); }
.member-dot--violet { background: var(--m-violet); box-shadow: 0 0 0 1px var(--m-violet-ink); }
.member-dot--pink { background: var(--avatar-pink); }
.member-dot--orange { background: var(--avatar-orange); }
.member-dot--yellow { background: var(--avatar-yellow); }
.member-dot--green { background: var(--avatar-green); }
.member-dot--teal { background: var(--avatar-teal); }
.member-dot--blue { background: var(--avatar-blue); }
.member-dot--purple { background: var(--avatar-purple); }
.swatch .avatar--bg-racing-green { background: var(--m-racing-green); }
.swatch .avatar--bg-sunshine { background: var(--m-sunshine); }
.swatch .avatar--bg-hot-pink { background: var(--m-hot-pink); }
.swatch .avatar--bg-sky { background: var(--m-sky); }
.swatch .avatar--bg-red { background: var(--m-red); }
.swatch .avatar--bg-royal-blue { background: var(--m-royal-blue); }
.swatch .avatar--bg-mustard { background: var(--m-mustard); }
.swatch .avatar--bg-violet { background: var(--m-violet); }
/* The Hall HQ wordmark at the top of Home and the sign-in page. */
.wordmark-img { display: block; height: 2.75rem; width: auto; }
.surface-kitchen .topline .wordmark-img { height: 3.75rem; }
