/* Domicena — familiar kitchen whiteboard, warm cream and olive.
   Logo reference colours stay separate from measured accessible UI colours.
   Amber remains reserved for needs-attention states. */
:root {
  --surface: #F7F2E9;
  --ink: #2F3A2E;
  --line: #857B68;
  --progress-track: #DED8CA;
  --green: #48582B;
  --terracotta: #943F2B;
  --amber: #7A4D12;
  --muted: #525A48;
  --tint: color-mix(in srgb, var(--green) 7%, var(--surface));
  --amber-tint: color-mix(in srgb, var(--amber) 14%, var(--surface));
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tabbar: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  button, input, select, textarea { forced-color-adjust: auto; }
  .btn, .day[aria-pressed="true"], .segment[aria-pressed="true"] { border: 1px solid ButtonText; }
}

html { background: var(--surface); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--surface); }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2, h3 { font-size: 17px; }
img { display: block; }
small, .muted, .eyebrow { font-size: 13px; color: var(--muted); }
.eyebrow { display: block; font-weight: 600; }
.eyebrow::first-letter { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 10; padding: 8px 12px; background: var(--ink); color: var(--surface); border-radius: var(--radius); }
.skip:focus { top: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Buttons: one height, two fills, one text variant. */
button { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--green); border-radius: var(--radius); background: var(--green); color: var(--surface); font-weight: 600; cursor: pointer; text-align: center; }
.btn.secondary { background: var(--surface); color: var(--green); }
.btn.text { background: none; border-color: transparent; color: var(--green); padding: 0 8px; }
.btn.small { font-size: 13px; padding: 0 12px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.icon-button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--green); font-weight: 600; cursor: pointer; text-align: left; }

/* Shell: sticky top bar, scrolling workspace, fixed tab bar. The top bar and tab bar are
   never re-created between renders, so a tap that spans a background refresh still lands. */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; min-height: 56px; padding: var(--safe-top) 8px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
/* Space priority when the bar is tight. The week chip always keeps its full date range
   (the "· Draft" suffix is dropped under 420px) and the sync label is a fixed, compact
   "Saved" on phones (the time appears from 480px). The household name is the only element
   that truncates — and its button never drops below 44px. */
.household { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; flex: 1 1 auto; padding: 0 8px; border: 0; border-radius: var(--radius); background: none; font-weight: 600; cursor: pointer; text-align: left; }
.household .icon { flex: none; color: var(--muted); }
.household span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-label { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.week-chip { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; min-width: 44px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.week-chip .icon { flex: none; width: 16px; height: 16px; color: var(--muted); }
.week-chip .chip-status { color: var(--amber); }
.week-chip:disabled { color: var(--muted); cursor: default; }
.back, .sub-title { display: none; }
.shell[data-sub] .household, .shell[data-sub] .sync-label { display: none; }
.shell[data-sub] .back { display: inline-flex; color: var(--green); }
.shell[data-sub] .sub-title { display: block; flex: 1; font-weight: 600; }
.shell[data-sub="settings"] .week-chip { display: none; }
/* Keep Back, the screen title and week selection reachable with wider system fonts.
   Only the sub-screen top bar may wrap; the date chip moves to the next row. */
.shell[data-sub] .topbar { flex-wrap: wrap; }
.shell[data-sub] .week-chip { margin-left: auto; }
@media (max-width: 479px) { .sync-time { display: none; } }
@media (max-width: 419px) { .week-chip .chip-status { display: none; } }
@media (max-width: 359px) { .sync-label { display: none; } }

.workspace { flex: 1; padding: 16px 16px calc(var(--tabbar) + var(--safe-bottom) + 24px); }
#main { width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.section-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.section-title { font-size: 24px; letter-spacing: -0.02em; }

.sidebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-around; gap: 4px; padding: 4px 8px calc(4px + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.sidebar .brand { display: none; }
.nav-item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.nav-item .icon { width: 24px; height: 24px; }
.nav-item.active { color: var(--green); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
  .sidebar { position: sticky; top: 0; grid-row: 1 / 3; grid-column: 1; align-self: start; height: 100vh; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--line); }
  .sidebar .brand { display: flex; padding: 0 12px 16px; }
  .nav-item { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 0 12px; font-size: 15px; }
  .nav-item .icon { width: 20px; height: 20px; }
  .nav-item.active { background: var(--tint); }
  .topbar { grid-column: 2; padding: 0 24px; }
  .workspace { grid-column: 2; padding: 24px 32px 48px; }
}

/* Cards and lists. */
.card, .meal-card, .habit-card, .empty { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h2 { font-size: 17px; }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.aisle { display: flex; flex-direction: column; gap: 8px; }
.aisle h2 { font-size: 15px; color: var(--muted); }

.draft-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--amber-tint); }
.draft-banner > div { flex: 1 1 200px; display: flex; flex-direction: column; }
.draft-banner > span { flex: 1 1 auto; font-size: 13px; color: var(--muted); }
.draft-banner .btn { margin-left: auto; }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--amber-tint); }

/* Today: the day block is the one loud element on the screen. */
.day-head { display: flex; flex-direction: column; gap: 12px; }
.day-block { display: flex; align-items: center; gap: 12px; }
.day-num { min-width: 52px; font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.day-text { display: flex; flex-direction: column; line-height: 1.3; }
.day-text strong { font-size: 17px; }
.day-text span { font-size: 13px; color: var(--muted); }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border: 1px solid transparent; border-radius: var(--radius); background: none; cursor: pointer; font-variant-numeric: tabular-nums; }
.day small { font-size: 13px; color: var(--muted); }
.day b { font-size: 17px; font-weight: 600; }
.day.today { border-color: var(--green); }
.day[aria-pressed="true"] { background: var(--green); color: var(--surface); }
.day[aria-pressed="true"] small { color: inherit; opacity: 0.8; }

.segments { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); }
.segment { min-height: 38px; padding: 0 14px; border: 0; border-radius: calc(var(--radius) - 2px); background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.segment[aria-pressed="true"] { background: var(--green); color: var(--surface); }

.meal-grid { display: flex; flex-direction: column; gap: 8px; }
.dinner-card { background: var(--tint); border-color: transparent; }
.meal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meal-top span:first-child { text-transform: capitalize; }
.meal-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.meal-actions { display: flex; margin-left: auto; }

.habit-card .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.habit-line { display: flex; gap: 8px; }
.habit-line span { flex: none; min-width: 72px; color: var(--muted); }

/* Week: a date column beside each dinner. */
.summary { color: var(--muted); }
.week-grid { display: flex; flex-direction: column; gap: 12px; }
.week-day { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; }
.week-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: none; cursor: pointer; font-variant-numeric: tabular-nums; }
.week-date small { font-size: 13px; color: var(--muted); }
.week-date b { font-size: 17px; font-weight: 600; }
.week-date.today { border-color: var(--green); color: var(--green); }
@media (min-width: 900px) { .week-grid { display: grid; grid-template-columns: 1fr 1fr; } }

/* Shopping and prep: the whole row is the tap target; ticking draws a line through the name. */
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .count { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
progress { flex: 1; appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--progress-track); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--progress-track); }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
.check-row, .prep-item { display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.check-row:first-child, .prep-item:first-child { border-top: 0; }
.check-row input, .prep-item input { flex: none; width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green); }
.check-text { flex: 1; display: flex; flex-direction: column; }
.check-row strong { font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.check-name { position: relative; display: inline-block; }
.check-name::after { content: ""; position: absolute; left: 0; right: 0; top: 55%; height: 1.5px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease; }
.checked .check-name::after { transform: scaleX(1); }
.checked .check-text, .checked .prep-title { color: var(--muted); }
.prep-item { align-items: flex-start; }
.prep-item input { margin-top: 1px; }
.prep-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.prep-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.prep-detail { color: var(--muted); }
.check-review { display: block; margin-top: 3px; color: var(--amber); font-size: 12px; font-weight: 600; line-height: 1.35; }
.prep-min { flex: none; padding-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { align-self: flex-start; padding: 0 8px; border: 1px solid var(--green); border-radius: var(--radius); font-size: 13px; font-weight: 600; line-height: 22px; color: var(--green); }

/* Forms. Editable text is 16px so mobile browsers do not zoom on focus. */
form { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rating-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rating, .inline-check { flex-direction: row; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); font-size: 15px; font-weight: 500; cursor: pointer; }
.rating { padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.rating:has(:checked) { border-color: var(--green); background: var(--tint); }
.rating input, .inline-check input { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--green); }
.two-col { display: grid; gap: 14px; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }
.settings-layout { display: flex; flex-direction: column; gap: 16px; }
.feedback-entry { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.feedback-entry small { color: var(--muted); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* Week picker rows. */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: left; }
.pick-row[aria-pressed="true"] { border-color: var(--green); background: var(--tint); }
.pick-row strong { font-weight: 600; }
.pick-row span { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Dialog: a sheet from the bottom on phones, centred on wider screens. */
dialog { position: fixed; inset: 0; width: 100dvw; max-width: 100dvw; max-height: 100dvh; margin: auto 0 0; padding: 0; border: 0; background: transparent; color: inherit; }
dialog::backdrop { background: rgba(22, 26, 24, 0.4); }
.modal-inner { position: relative; display: flex; flex-direction: column; gap: 12px; max-height: 88dvh; overflow: auto; overflow-wrap: anywhere; padding: 20px 16px calc(20px + var(--safe-bottom)); border-radius: var(--radius) var(--radius) 0 0; background: var(--surface); }
.modal-inner > h2 { font-size: 24px; padding-right: 44px; }
.modal-inner h3 { padding-top: 8px; }
.close-button { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.recipe-meta, .requirements { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.requirements { flex-direction: column; gap: 8px; }
.requirements dt { font-weight: 600; }
.requirements dd { color: var(--ink); font-size: 15px; }
.ingredients { list-style: none; padding: 0; display: flex; flex-direction: column; }
.ingredients li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ingredients strong { font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.method { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 640px) {
  dialog { width: min(560px, calc(100% - 32px)); margin: auto; }
  .modal-inner { max-height: 85vh; padding: 24px; border-radius: var(--radius); }
}

/* Status messages never intercept taps. */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar) + var(--safe-bottom) + 12px); z-index: 6; padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--surface); font-weight: 500; pointer-events: none; }
.toast.error { background: var(--amber-tint); color: var(--ink); border: 1px solid var(--amber); }
.toast[hidden] { display: none; }
@media (min-width: 900px) { .toast { left: auto; right: 24px; bottom: 24px; max-width: 420px; } }

/* Welcome and onboarding. */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.brand-tagline { color: var(--muted); font-size: 14px; margin-top: -16px; }
.brand img { width: 32px; height: 32px; border-radius: calc(var(--radius) - 2px); }
.auth-card { width: min(400px, 100%); gap: 16px; }
.auth-card form { gap: 12px; }
.onboarding { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.onboarding .two-col { width: 100%; }

/* Readiness polish: useful targets, wrapping and feedback inside modal top layer. */
.btn[href]{text-decoration:none}
button:disabled{cursor:default;opacity:.6}
.segment{min-height:44px}
.day-strip{grid-template-columns:repeat(7,minmax(44px,1fr));overflow-x:auto}
.code,input,textarea{font-size:16px}
.card,.meal-card,.week-day,.check-text,.prep-body,.two-col>*{min-width:0}
.check-text,.prep-body,.ingredients li>span,.feedback-entry,.summary{overflow-wrap:anywhere}
.modal-status{flex:none}
#invite-link{font-size:16px;min-width:0}

/* R3: tabs live inside Settings; one compact profile panel, no extra main tab. */
.family-layout { display: flex; flex-direction: column; max-width: 800px; }
.family-settings, .family-settings [data-family-body], .family-settings [data-family-panel] { min-width: 0; }
.family-heading { margin-bottom: 8px; }
.family-sharing { margin-bottom: 12px; font-size: 13px; }
.family-tab-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; margin: 16px 0; }
.family-tabs { display: flex; flex: 1; min-width: 0; gap: 4px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.family-tab-row > .btn { flex: none; min-width: 44px; padding: 0 12px; font-size: 22px; }
.family-tab { flex: none; max-width: 180px; min-width: 64px; height: 48px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.family-tab[aria-selected=true] { color: var(--surface); background: var(--green); border-color: var(--green); }
.family-panel-heading { margin: 16px 0; }
.family-panel-heading h3 { font-size: 20px; overflow-wrap: anywhere; }
.family-section { border-bottom: 1px solid var(--line); padding: 4px 0 10px; min-width: 0; }
.family-section summary { min-height: 52px; padding: 10px 0; cursor: pointer; }
.family-section summary strong { font-size: 16px; }
.family-section summary span { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; max-width: 100%; }
.family-section[open] summary span { display: none; }
.family-settings [role=tabpanel] { min-width: 0; overflow-wrap: anywhere; }
.family-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; }
.family-read dd { margin: 4px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.family-read dt { font-size: 13px; color: var(--muted); }
.family-archived { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.family-archived span { min-width: 0; overflow-wrap: anywhere; }
.family-archived .btn { flex: none; }
[data-settings-details] > summary { min-height: 44px; padding: 8px 0; font-weight: 600; cursor: pointer; }
[data-settings-details][open] > summary { margin-bottom: 12px; }
.family-settings .notice { margin: 12px 0; }
.family-settings .actions .btn { white-space: normal; }
/* Keep a long profile's Save actions above the fixed phone navigation. */
.family-save { position: sticky; bottom: calc(var(--tabbar) + var(--safe-bottom) + 8px); background: var(--surface); z-index: 2; border-top: 1px solid var(--line); }
.family-settings :is(button,input,textarea,select,summary) { scroll-margin-top: 80px; scroll-margin-bottom: calc(var(--tabbar) + var(--safe-bottom) + 80px); }
@media(min-width:900px) { .family-save { bottom: 8px; } }

/* Adult-only optional editor; no extra main navigation. */
.body-goals-section{border-top:1px solid var(--line,#dce2da);margin-top:1.5rem;padding-top:1rem;min-width:0}
.body-goals-section h4{font-size:1.1rem;margin:0 0 .5rem}
.body-goals-section [hidden]{display:none!important}
.body-goals-section input,.body-goals-section select,.body-goals-section textarea{font-size:16px;min-width:0;max-width:100%}
.body-goals-section .body-summary{overflow-wrap:anywhere}
.body-save{display:flex;flex-wrap:wrap;gap:8px;padding:16px 0;border-top:1px solid var(--line)}


/* R5 structured favourites; children continue to use familiar-food fields. */
.favourites-section{border-top:1px solid var(--line);margin-top:20px;padding-top:16px;min-width:0}
.favourites-section h4{font-size:1.1rem;margin:0 0 4px}
.favourite-group{margin-top:16px}
.favourite-group h5{font-size:14px;margin:0 0 8px}
.favourite-list{display:grid;gap:8px}
.favourite-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:var(--radius);padding:10px;min-width:0}
.favourite-row>div:first-child{min-width:0;overflow-wrap:anywhere}
.favourite-row p{margin-top:4px}
.favourite-kind{display:inline-block;margin-left:8px;padding:2px 6px;border-radius:999px;background:var(--tint);font-size:12px;text-transform:capitalize}
.favourite-row .actions{flex:none}
.favourites-section input,.favourites-section select,.favourites-section textarea{font-size:16px;max-width:100%;min-width:0}
@media(max-width:420px){.favourite-row{display:block}.favourite-row .actions{margin-top:8px}}

/* R7 profile-aware participation */
.participation-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.participation-section fieldset[hidden]{display:none}.profile-segments{max-width:100%;overflow-x:auto;justify-content:flex-start;flex-wrap:nowrap}.profile-segments .segment{flex:0 0 auto}.allocation-detail{margin-top:8px}.allocation-detail summary{cursor:pointer;font-weight:600}.allocation-detail p{margin:8px 0}.staged-feature{max-width:720px}.week-day>.meal-card+.meal-card{margin-top:10px}@media(max-width:420px){.participation-slots{grid-template-columns:1fr}.profile-segments{padding-bottom:2px}}
