/* Coquina web. Colours and type follow the app (lib/design/colors.dart, type.dart): Anton headlines, Nunito Sans text,
   coral brand #F0493E, primary #D7382D (light) / #FF8A7F (dark). */
@font-face { font-family: Anton; src: url(/fonts/anton_regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/fonts/nunito_sans_regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/fonts/nunito_sans_semibold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/fonts/nunito_sans_bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url(/fonts/nunito_sans_extrabold.ttf) format('truetype'); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --brand: #F0493E;
  --accent: light-dark(#D7382D, #FF8A7F);
  --on-accent: light-dark(#fff, #3A0905);
  --accent-soft: light-dark(#FDE4E1, #4A2420);
  --on-accent-soft: light-dark(#7E1D15, #FFD9D4);
  --ink: light-dark(#1E1E1E, #EDE8E4);
  --muted: light-dark(#575757, #B4ADA8);
  --paper: light-dark(#FFFFFF, #1B1A1A);
  --paper-2: light-dark(#F8F6F4, #232120);
  --paper-3: light-dark(#F2EFEC, #2B2827);
  --rule: light-dark(#E3DED9, #46413F);
  --danger: light-dark(#A23B2E, #FFB4A9);
  --breakfast: light-dark(#F7E9CC, #4A3A12);
  --lunch: light-dark(#DDEFE0, #1F3A26);
  --dinner: light-dark(#FDE4E1, #4A2420);
  --snack: light-dark(#E4E6F7, #262B4A);
  --radius: 14px;
  --head: Anton, Impact, 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 'Nunito Sans', system-ui, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--head); font-weight: 400; letter-spacing: .3px; line-height: 1.1; }
h1 { font-size: clamp(30px, 4vw, 44px); text-transform: uppercase; margin: 0; }
h2 { font-size: 22px; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h3 { font-size: 17px; text-transform: uppercase; margin: 0 0 6px; color: var(--muted); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--danger); min-height: 1.5em; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 12px; min-height: 42px;
}
textarea { width: 100%; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px;
}
.loading { display: grid; place-items: center; height: 100vh; font-family: var(--head); font-size: 40px; color: var(--brand); text-transform: uppercase; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 0; border-radius: 999px;
  padding: 9px 18px; min-height: 42px; background: var(--accent); color: var(--on-accent); font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.on { background: var(--accent-soft); color: var(--on-accent-soft); }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn.danger { background: var(--danger); color: var(--paper); }
.danger-text { color: var(--danger) !important; }
.link { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 8px; }
.icon { background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 999px; color: var(--muted); }
.icon:hover { background: var(--paper-3); color: var(--ink); }
.icon.small { font-size: 18px; padding: 4px 8px; }
.row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 10px; }

/* shell */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: var(--brand); color: #fff;
}
.brand { font-family: var(--head); font-size: 28px; text-transform: uppercase; color: #fff; text-decoration: none; letter-spacing: .5px; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.top nav a:hover { background: rgba(255,255,255,.16); }
.top nav a.on { background: #fff; color: #B42A20; }
.feedback-pill { margin-left: auto; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.feedback-pill:hover { background: rgba(255,255,255,.16); }
.banner { background: var(--accent-soft); color: var(--on-accent-soft); padding: 10px 24px; font-weight: 600; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px; min-height: 70vh; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { min-width: min(340px, 100%); }
/* A real width, not only min-width: a percentage min-width counts as nothing when the header measures its tools, so
   they wrapped onto a second line and the search sat above the middle of the heading. */
.page-head .search { width: 340px; max-width: 100%; }
.foot { max-width: 1280px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--rule); }
.foot a { color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.panel { border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 16px; max-width: 760px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--rule)); }
.crumb { margin: 0 0 14px; }
.crumb a { text-decoration: none; font-weight: 700; }

/* toasts and dialogs */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(560px, calc(100% - 32px)); }
.toast { background: light-dark(#1E1E1E, #EDE8E4); color: light-dark(#fff, #1E1E1E); padding: 12px 16px; border-radius: 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.toast .link { color: light-dark(#FF8A7F, #B42A20); }
dialog.sheet { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100% - 24px)); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.sheet::backdrop { background: rgba(20,18,17,.45); }
.sheet-body { padding: 18px 22px 22px; max-height: 85vh; overflow: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; }
.form label.check, label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.form fieldset { border: 1px solid var(--rule); border-radius: 10px; }
.pick-list { max-height: 300px; overflow: auto; display: grid; gap: 4px; border: 1px solid var(--rule); border-radius: 10px; padding: 6px; }
.pick { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pick:hover, .pick:focus-visible { background: var(--accent-soft); }
.or { text-align: center; color: var(--muted); font-size: 14px; }
.form .row input { flex: 1; min-width: 0; }

/* sign in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--brand), #B42A20); }
.signin-card { background: var(--paper); border-radius: 24px; padding: 40px 36px; width: min(440px, 100%); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.brand-big { font-family: var(--head); font-size: 64px; color: var(--brand); text-transform: uppercase; line-height: 1; margin-bottom: 12px; }
.lede { font-size: 18px; }
.provider { width: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.provider.apple { background: light-dark(#000, #fff); color: light-dark(#fff, #000); border: 0; }
.provider .g { font-weight: 800; color: #4285F4; font-size: 18px; }
.links { margin-top: 18px; }

/* recipe box */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.pillbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 12px; }
.pillbar .chips { margin: 0; }
/* Pills on the left, then search, buttons and sort as one unit on the right. The search takes what the pills leave
   (140 to 340px), so it all shares one line on a laptop; the 140px width is what the row measures it at. */
.pillbar .tools { margin-left: auto; flex: 1 1 0; flex-wrap: nowrap; justify-content: flex-end; }
.pillbar .search { flex: 1 1 200px; width: 140px; min-width: 0; max-width: 340px; }
@media (max-width: 640px) { .pillbar .tools { flex: 1 1 100%; flex-wrap: wrap; } }
/* Page titles are gone (Todd, 2026-12-01): a head row's tools sit right even when nothing is on its left. */
.page-head .tools { margin-left: auto; }
.page-head .family-toggle, .page-head .family-toggle-row { margin: 0; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip .count { font-size: 12px; opacity: .8; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; width: 100%; text-decoration: none; color: inherit; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); border: 1px solid var(--rule); transition: transform .12s, box-shadow .12s; }
.card:hover, .menu-open .card { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card-photo { aspect-ratio: 4/3; background: var(--paper-3); overflow: hidden; }
.card-photo img, .hero-photo img, .p-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-box { position: relative; }
.photo-box img.photo { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
.photo-box img.photo.loaded { opacity: 1; }
.tile { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--head); font-size: 56px; color: var(--accent); background: var(--accent-soft); }
.card-text { flex: 1; padding: 10px 14px 14px; }
/* Every tile the same size (Todd, 2026-11-30): the photo is a fixed 4:3, the title always takes two lines (a longer
   one ends in "…", the whole title is in the card's tooltip) and the meta lines (stars, time, your average) keep two lines' height even when empty. */
.card-title { font-weight: 800; line-height: 1.25; height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.card-meta .avg { font-weight: 700; color: var(--ink); }
.card-meta { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 10px; color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 4px; height: 3.1em; white-space: nowrap; overflow: hidden; }
.fav, .stars { color: var(--accent); }

/* recipe page */
.recipe { max-width: 1000px; }
.recipe-head { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
.hero-photo { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--paper-3); }
.recipe-title h1 { margin-bottom: 10px; text-transform: none; }
.meta { color: var(--muted); font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--accent-soft); color: var(--on-accent-soft); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.tag.soft { background: var(--paper-3); color: var(--muted); }
.rate { display: inline-flex; }
.star { background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--rule); padding: 0 2px; line-height: 1; }
.star.on { color: var(--accent); }
.recipe-body { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 36px; }
.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.ing-list li.section, .step-list li.section { font-family: var(--head); text-transform: uppercase; color: var(--muted); border: 0; padding-top: 14px; list-style: none; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li.step { display: grid; grid-template-columns: 36px 1fr; gap: 10px; margin-bottom: 14px; }
.step-list .num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.notes-box { margin-top: 28px; max-width: 760px; }
/* Taste stars and Ease of Cooking faces (own recipe and family recipe), and the family's votes at the bottom */
.marks { margin: 8px 0 4px; }
.mark-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.mark-label { color: var(--muted); font-weight: 700; min-width: 130px; }
.ease { display: inline-flex; }
.face { background: none; border: 0; font-size: 24px; cursor: pointer; padding: 0 3px; line-height: 1; filter: grayscale(1); opacity: .45; }
.face.on { filter: none; opacity: 1; }
.face:hover { opacity: .8; }
.others { margin-top: 28px; max-width: 760px; }
.others-list { list-style: none; padding: 0; margin: 0; }
.others-list li { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.others-name { min-width: 130px; font-weight: 700; }
.others .stars { font-size: 18px; letter-spacing: 1px; }
.others .stars .dim { color: var(--rule); }
.face-one { font-size: 20px; }

/* meal plan */
.month-name { min-width: 150px; text-align: center; font-size: 18px; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.legend .meal { cursor: default; }
.plan-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.dow { padding: 8px; text-align: center; font-weight: 800; font-size: 13px; text-transform: uppercase; color: var(--muted); background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.day { min-height: 118px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 4px; display: flex; flex-direction: column; gap: 3px; background: var(--paper); }
.day:nth-child(7n) { border-right: 0; }
.day.other { background: var(--paper-2); }
.day.other .num { color: var(--muted); }
.day.past .meals { opacity: .75; }
.day.today .num { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 8px; }
.day.over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -3px; }
.day-head { display: flex; justify-content: space-between; align-items: center; }
.day-head .num { font-weight: 800; font-size: 14px; }
.day .add { opacity: 0; background: none; border: 0; cursor: pointer; font-size: 13px; font-weight: 800; color: var(--accent); height: 26px; padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.day:hover .add, .day .add:focus-visible { opacity: 1; }
.day .add:hover { background: var(--accent-soft); }
@media (hover: none) { .day .add { opacity: 1; } }
.meals { display: grid; gap: 3px; }
.meal { display: flex; align-items: center; gap: 5px; border: 0; border-radius: 7px; padding: 3px 6px; font-size: 12.5px; text-align: left; cursor: grab; line-height: 1.25; width: 100%; color: var(--ink); }
.meal.dragging { opacity: .4; }
.meal .slot { font-weight: 800; font-size: 10px; flex: none; width: 15px; }
.meal-title { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.legend .meal { width: auto; font-size: 13px; padding: 4px 10px; }
.slot-breakfast { background: var(--breakfast); }
.slot-lunch { background: var(--lunch); }
.slot-dinner { background: var(--dinner); }
.slot-snack { background: var(--snack); }
.meal.kind-note, .meal.kind-leftovers { font-style: italic; }
.side { position: sticky; top: 80px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; gap: 8px; }
.side .search { min-width: 0; width: 100%; }
.side-list { overflow: auto; display: grid; gap: 4px; }
.side-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; padding: 6px 6px; border-radius: 8px; cursor: grab; font-size: 14px; background: var(--paper-2); }
.side-item:hover { background: var(--accent-soft); }
.grip { color: var(--muted); font-size: 12px; letter-spacing: -2px; }
.side-btns { display: flex; align-items: center; }

/* recipe right-click menu, and the ⋯ that opens it on touch screens */
.card-wrap { position: relative; display: flex; }
.side-item.menu-open { background: var(--accent-soft); }
.card-more { position: absolute; top: 8px; right: 8px; background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--ink); font-size: 18px; padding: 4px 9px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.card-more:hover { background: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .card-more { opacity: 0; transition: opacity .12s; }
  .card-wrap:hover .card-more, .card-wrap:focus-within .card-more, .card-wrap.menu-open .card-more { opacity: 1; }
}
/* A long press on a touch screen is Add to day (a card) or the meal's menu (the plan): no link preview, text pick or
   system menu in the way (src/hold.js). */
@media (hover: none) {
  .card-wrap, .card-wrap .card, .meal { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
.ctx-title { padding: 6px 12px 4px; font-size: 13px; color: var(--muted); max-width: 300px; }
.ctx-menu { position: fixed; z-index: 60; min-width: 220px; display: grid; padding: 6px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.ctx-item { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 8px; padding: 9px 12px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ctx-item:hover, .ctx-item:focus { background: var(--accent-soft); color: var(--on-accent-soft); outline: none; }
.ctx-icon { width: 20px; text-align: center; }

/* grocery */
.addbar { display: flex; gap: 8px; max-width: 760px; margin: 0 0 16px; }
.addbar input { flex: 1; min-width: 0; }
.aisle { max-width: 760px; margin-bottom: 16px; }
.glist { list-style: none; padding: 0; margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.gitem { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--rule); }
.gitem:last-child { border-bottom: 0; }
.gcheck { display: flex; gap: 12px; align-items: center; cursor: pointer; min-height: 36px; }
.gcheck input { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
.gname { font-weight: 700; }
.gamt { font-weight: 400; color: var(--muted); }
.gfrom { color: var(--muted); font-size: 13px; text-align: right; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Todd 2026-12-01: the brand (and note) small under the item name. */
.gbrand { display: block; color: var(--muted); font-size: 12px; font-weight: normal; }
.gitem.done .gname { text-decoration: line-through; color: var(--muted); }
select.small { min-height: 32px; padding: 3px 8px; font-size: 13px; }

/* cookbook form */
.cb-form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-bottom: 20px; }
.cb-form label { display: grid; gap: 4px; font-weight: 600; }
.cb-form p { flex-basis: 100%; }
.book { display: grid; gap: 24px; }
.book .page { border: 1px solid var(--rule); border-radius: var(--radius); padding: 40px 48px; max-width: 900px; background: var(--paper); }
/* cookbook designer */
.cb-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 28px; align-items: start; margin-bottom: 28px; }
.cb-controls { display: grid; gap: 10px; }
.cb-group { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 16px; background: var(--paper); }
.cb-group[open] { padding-bottom: 16px; }
.cb-group summary { font-family: var(--head); text-transform: uppercase; color: var(--accent); font-size: 18px; cursor: pointer; padding: 4px 0; }
.cb-group label, .cb-group .field { display: grid; gap: 4px; font-weight: 600; margin-top: 10px; }
.cb-group label.check { display: flex; margin-top: 8px; }
.cb-group .row label { margin-top: 0; flex: 1; }
.cb-group input:not([type=checkbox]), .cb-group select, .cb-group textarea { width: 100%; }
.field-label { font-weight: 600; }
.chips.small { margin: 6px 0 4px; gap: 6px; }
.chips.small .chip { padding: 4px 10px; font-size: 13px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 46px; height: 46px; border-radius: 12px; border: 3px solid; cursor: pointer; font-family: var(--head); font-size: 18px; }
.swatch.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.visually-hidden { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.field { position: relative; }
.cv-framed .cv-brand { bottom: 1.6cqw; }
label.btn { justify-self: start; margin-top: 6px; }
.cb-preview { position: sticky; top: 80px; }
.cb-cover-frame { width: min(100%, 520px); margin: 0 auto; box-shadow: 0 18px 50px rgba(0,0,0,.22); border-radius: 6px; overflow: hidden; }
.cb-cover-frame .cv { aspect-ratio: 8.5 / 11; border: 0; border-radius: 0; max-width: none; padding: 0; }
.cb-pages-head { margin-top: 8px; }

/* the cover */
.book .page.cv { padding: 0; aspect-ratio: 8.5 / 11; max-width: 680px; overflow: hidden; }
/* min-height: 0 matters. The cover is also a .page, whose min-height of 70vh would pass through the 8.5/11 aspect
   ratio into a minimum WIDTH, so on a tall window the cover grew wider than its frame and its middle moved right. */
.cv { position: relative; background: var(--cv-bg); color: var(--cv-ink); display: flex; flex-direction: column; overflow: hidden; container-type: inline-size; min-height: 0; min-width: 0; width: 100%; box-sizing: border-box; }
.cv-text { position: relative; z-index: 1; min-width: 0; box-sizing: border-box; padding: 8cqw 9cqw; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqw; }
.cv-ornament { width: 10cqw; height: 10cqw; color: var(--cv-accent); }
.cv-ornament svg { width: 100%; height: 100%; display: block; }
/* --cv-title-scale (set from the title's length) shrinks a long title so it wraps between words, not off the cover. */
.cv-title { font-size: calc(11cqw * var(--cv-title-scale, 1)); line-height: .98; margin: 0; color: inherit; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: break-word; max-width: 100%; }
.cv-font-elegant .cv-title { font-family: Georgia, 'Times New Roman', serif; font-style: italic; text-transform: none; font-weight: 400; letter-spacing: 0; font-size: calc(10.5cqw * var(--cv-title-scale, 1)); }
.cv-font-friendly .cv-title { font-family: 'Nunito Sans', system-ui, sans-serif; font-weight: 800; text-transform: none; letter-spacing: -.01em; font-size: calc(10cqw * var(--cv-title-scale, 1)); }
.cv-text > * { max-width: 100%; overflow-wrap: break-word; }
.cv-subtitle { font-size: 4.2cqw; margin: 0; font-weight: 700; opacity: .95; }
.cv-range { font-size: 3cqw; margin: 0; opacity: .85; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.cv-rule { width: 14cqw; height: .7cqw; background: var(--cv-accent); border-radius: 1cqw; margin: 1cqw 0; }
.cv-byline { font-size: 3.4cqw; margin: 0; font-style: italic; }
.cv-count { font-size: 2.6cqw; margin: 0; opacity: .75; }
.cv-brand { position: absolute; bottom: 3.5cqw; left: 0; right: 0; text-align: center; font-size: 2.2cqw; letter-spacing: .2em; text-transform: uppercase; opacity: .6; z-index: 1; }
/* layouts */
.cv-centered .cv-text { flex: 1; justify-content: center; }
.cv-framed .cv-text { flex: 1; justify-content: center; margin: 6cqw; border: .6cqw solid var(--cv-accent); outline: .3cqw solid var(--cv-accent); outline-offset: 1.4cqw; background: var(--cv-bg); }
.cv-band { flex-direction: row; }
.cv-band::before { content: ''; flex: 0 0 9cqw; background: var(--cv-accent); }
.cv-band .cv-text { align-items: flex-start; text-align: left; justify-content: flex-end; padding-bottom: 14cqw; flex: 1; }
/* patterns */
.cv-pat-dots { background-image: radial-gradient(color-mix(in srgb, var(--cv-accent) 55%, transparent) 1.1cqw, transparent 1.2cqw); background-size: 7cqw 7cqw; }
.cv-pat-stripes { background-image: repeating-linear-gradient(90deg, transparent 0 4cqw, color-mix(in srgb, var(--cv-accent) 30%, transparent) 4cqw 8cqw); }
.cv-pat-gingham { background-image: linear-gradient(90deg, color-mix(in srgb, var(--cv-accent) 28%, transparent) 50%, transparent 50%), linear-gradient(color-mix(in srgb, var(--cv-accent) 28%, transparent) 50%, transparent 50%); background-size: 8cqw 8cqw; }
.cv-pat-scallop { background-image: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--cv-accent) 45%, transparent) 2.6cqw, transparent 2.7cqw); background-size: 6cqw 4cqw; background-position: 0 0; }
.cv-pat-dots .cv-framed .cv-text, .cv-framed .cv-text { background-color: var(--cv-bg); }
.dedication { display: grid; place-items: center; text-align: center; min-height: 420px; }
.dedication p { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 24px; max-width: 30ch; white-space: pre-wrap; }
.contents-title { text-align: center; font-size: 30px; }
.contents { text-align: left; margin: 40px auto 0; max-width: 560px; padding: 0; list-style: none; counter-reset: none; }
.contents li { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; padding: 6px 0; }
.c-title { font-weight: 800; }
.c-dots { border-bottom: 1px dotted var(--rule); transform: translateY(-5px); }
.c-days { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.p-head { display: grid; grid-template-columns: 1fr 240px; gap: 24px; margin-bottom: 20px; }
.p-head:has(> :only-child) { grid-template-columns: 1fr; }
.p-num { font-family: var(--head); color: var(--brand); font-size: 18px; }
.p-title { font-size: 34px; color: var(--ink); text-transform: none; margin: 0 0 8px; }
.p-photo { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; }
.p-meta { color: var(--muted); font-weight: 600; }
.p-days { font-size: 14px; color: var(--muted); }
.p-notes { margin-top: 20px; }
.p-source { margin-top: 18px; font-size: 12px; color: var(--muted); word-break: break-all; }

@media (max-width: 960px) {
  .cb-layout { grid-template-columns: 1fr; }
  .cb-preview { position: static; }
  .plan-layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: 360px; }
}
@media (max-width: 700px) {
  .top { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .top nav a { padding: 6px 10px; font-size: 14px; }
  .page { padding: 16px 12px; }
  .recipe-head, .recipe-body, .p-head { grid-template-columns: 1fr; }
  .day { min-height: 76px; padding: 2px; }
  .meal { font-size: 11px; padding: 2px 3px; }
  .meal .slot { display: none; }
  .gitem { grid-template-columns: 1fr auto; }
  .gfrom { grid-column: 1; text-align: left; }
  .book .page { padding: 20px; }
}

/* print: the cookbook (and any page) without the site around it */
@media print {
  @page { size: letter; margin: 16mm 16mm 18mm; }
  @page cover { margin: 0; }
  :root { color-scheme: light; }
  body { background: #fff; color: #1E1E1E; font-size: 11pt; }
  .no-print, .top, .foot, #toasts, .banner { display: none !important; }
  .page { padding: 0; max-width: none; }
  .book { display: block; }
  .book .page { border: 0; border-radius: 0; padding: 0; max-width: none; break-after: page; }
  .book .page:last-child { break-after: auto; }
  .book .page.cv { aspect-ratio: auto; height: 100vh; max-width: none; page: cover; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dedication { min-height: 90vh; }
  .p-photo, .cv * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .recipe-body { grid-template-columns: 1fr 1.8fr; gap: 10mm; }
  .p-head { grid-template-columns: 1fr 60mm; }
  .step-list li.step, .ing-list li { break-inside: avoid; }
  .p-photo { aspect-ratio: 4/3; }
  h2 { color: #D7382D; }
  a { color: inherit; text-decoration: none; }
}

/* meal course popover */
.course-pop { position: absolute; z-index: 40; display: flex; gap: 6px; align-items: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.course-btn { border: 2px solid transparent; border-radius: 999px; padding: 7px 14px; font-weight: 800; cursor: pointer; color: var(--ink); }
.course-btn.on { border-color: var(--ink); }
.course-btn:hover { filter: brightness(.96); }
.pop-remove { margin-left: 2px; }
/* Plan (2026-12-02): Open recipe from a planned meal; the quick add's first row and the family box tag. */
.pop-open { text-decoration: none; white-space: nowrap; }
.course-pop { flex-wrap: wrap; max-width: calc(100vw - 16px); }
.quick-add .quick-slots { margin: 0; }
.quick-list .quick-name { font-weight: 800; color: var(--accent); }
.quick-from { margin-left: 6px; }

/* wide dialogs, add-recipe form, scaler, cook mode */
dialog.sheet.wide { width: min(860px, calc(100% - 24px)); }
.panel.wide { max-width: 980px; }
.add-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.add-photo { max-width: 260px; border-radius: 12px; }
/* Add a recipe (2026-12-02, app parity): the photo step, and Snap a recipe with its photos and crop box. */
.add-photo-row { margin: 0 0 4px; }
input[type=file] { max-width: 100%; }
.snap-modes { margin: 0 0 8px; }
.snap-photos { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.snap-photo { width: 150px; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); }
.snap-thumb { height: 96px; display: grid; place-items: center; background: var(--paper-3); overflow: hidden; }
.snap-thumb canvas { max-width: 100%; max-height: 96px; display: block; }
.snap-tools { justify-content: space-evenly; padding: 2px 0; }
.snap-add { gap: 8px; margin: 4px 0 8px; }
.snap-add .btn { flex: 1 1 140px; }
.snap-foot { align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.crop-sheet { display: grid; gap: 12px; }
.crop-sheet p { margin: 0; }
.crop-frame { position: relative; margin: 0 auto; touch-action: none; user-select: none; }
.crop-clip { position: absolute; inset: 0; overflow: hidden; }
.crop-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop-box { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none; }
.crop-handle { position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; background: var(--accent);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); cursor: grab; touch-action: none; }
.crop-handle:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ings-head { margin: 0; }
.ings-head h2 { margin: 0; }
.scaler { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--muted); }
.link.small { font-size: 13px; }
@media (max-width: 700px) {
  .add-form .two-col { grid-template-columns: 1fr; }
}

body.offline .top::after { content: 'Offline: changes are saved here and sync when you reconnect'; position: absolute; left: 0; right: 0; top: 100%; background: #3B2A1A; color: #fff; font-size: 13px; font-weight: 700; padding: 4px 24px; }

/* plan view switch, week view, actions */
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: var(--paper); padding: 8px 16px; font-weight: 700; cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.plan-actions { margin: 0 0 12px; align-items: center; }
.plan-actions .legend { margin: 0; }
.spacer { flex: 1; }
.month.week .day { min-height: 280px; }
.month.week .meal { font-size: 14px; padding: 6px 8px; }
.month.week .day .add { opacity: 1; }
.empty-day { padding: 4px; }
@media (max-width: 700px) {
  .month.week { grid-template-columns: 1fr; }
  .month.week .dow { display: none; }
  .month.week .day { min-height: 0; border-right: 0; padding: 8px 10px; }
  .month.week .meal { font-size: 15px; padding: 8px 10px; }
  .month.week .meal .slot { display: inline; }
  .plan-actions .spacer { display: none; }
}
@media print {
  .addbar, .gitem select, .gitem .icon, .chips, .plan-actions, .side, .seg, .grocery-finder .finder-row, .grocery-finder .finder-count { display: none !important; }
  .glist { border: 0; }
  .gitem { grid-template-columns: 1fr auto; padding: 3px 0; border-bottom: 1px solid #ddd; }
}

/* family */
.banner.soft { background: var(--paper-2); color: var(--ink); border-bottom: 1px solid var(--rule); font-weight: 600; }
.page .banner.soft { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 16px; margin: 0 0 16px; max-width: 760px; }
.how { max-width: 760px; }
.how li { margin: 4px 0; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: .12em; }
.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.members li:last-child { border-bottom: 0; }
.members li .btn { margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--on-accent-soft); display: grid; place-items: center; font-weight: 800; flex: none; }
/* Members with a "Recipes added" column (Todd, 2026-12-02; views/members.js). One grid for the list and a subgrid per row,
   so every count lines up whatever the name, badges or buttons; a long name truncates rather than pushing the number. */
.member-table { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; }
.member-table.counted, .member-table.with-actions { grid-template-columns: 34px minmax(0, 1fr) max-content; }
.member-table.counted.with-actions { grid-template-columns: 34px minmax(0, 1fr) max-content max-content; }
.member-table li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; column-gap: 12px; row-gap: 0; }
.member-table li.members-head { padding: 0 0 4px; }
.member-table .member-name { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .35em; min-width: 0; }
.member-table .member-name-text { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-table .member-badge { white-space: nowrap; }
.member-table .member-count { justify-self: end; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.member-table .members-head .member-count { color: var(--muted); font-size: 13px; line-height: 1.2; }
.member-table .member-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.member-table .member-actions .btn, .member-table .member-actions .member-switch { margin-left: 0; }
@media (max-width: 560px) {
  /* Narrow: the buttons go on a line under the name; the numbers keep their column. */
  .member-table.counted.with-actions { grid-template-columns: 34px minmax(0, 1fr) max-content; }
  .member-table.with-actions li > .member-actions { grid-column: 2 / -1; grid-row: 2; padding-top: 6px; }
  .member-table.counted.with-actions .members-head > .member-actions { display: none; }
  .member-table .members-head .member-count { max-width: 4.6em; white-space: normal; }
}
.wishes { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.wish-by { color: var(--muted); font-size: 12px; }
.side-item.wish { background: var(--breakfast); }

/* groups */
/* Friend Group page: its invite, members and leave sit under its recipe box. */
.friend-manage { margin-top: 28px; }
.group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
.group-card { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); color: inherit; text-decoration: none; max-width: 760px; }
a.group-card:hover { border-color: var(--accent); }
.group-card.family { background: var(--dinner); margin-bottom: 18px; }
.group-card.empty-card { background: var(--paper-2); }
.gc-kind { font-family: var(--head); text-transform: uppercase; font-size: 13px; color: var(--accent); letter-spacing: .05em; }
.gc-name { font-size: 20px; }
.groups-head { margin-top: 6px; }
.kinds { display: grid; gap: 10px; }
.kind { text-align: left; display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); cursor: pointer; color: var(--ink); }
.kind:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.kind[disabled] { opacity: .5; cursor: default; }
.kind span { color: var(--muted); font-size: 14px; }
.shared-recipes { list-style: none; padding: 0; margin: 0; }
.shared-recipes li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.sr-tile { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.sr-tile .tile { font-size: 22px; }

/* meal trains */
.train-list { display: grid; gap: 8px; }
.train-card { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--lunch); color: inherit; text-decoration: none; }
.train-card:hover { border-color: var(--accent); }
.train-facts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.details dt { font-weight: 700; color: var(--muted); }
.details dd { margin: 0; white-space: pre-wrap; }
.train-cal .day { min-height: 104px; }
.slot { display: grid; gap: 4px; }
.slot-taken { border: 0; text-align: left; background: var(--lunch); border-radius: 8px; padding: 6px 8px; display: grid; gap: 2px; font-size: 13px; color: var(--ink); }
.slot-taken.mine { background: var(--dinner); cursor: pointer; outline: 2px solid var(--accent); }
.slot-taken[disabled] { cursor: default; opacity: 1; }
.slot-open { width: 100%; }
.delivery-note { font-size: 12px; background: var(--breakfast); border-radius: 6px; padding: 4px 6px; white-space: pre-wrap; }

/* grocery selection */
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 760px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-2); position: sticky; top: 64px; z-index: 3; }
.selbar-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gitem { display: flex; flex-wrap: wrap; }
.gitem .gcheck { flex: 1; min-width: 160px; }
.gsel { width: 18px; height: 18px; accent-color: var(--ink); }
.gitem.selected { background: var(--accent-soft); }

@media print { .selbar, .gsel { display: none !important; } }

.banner.pack { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--breakfast); color: var(--ink); }
.banner.pack > span:first-child { flex: 1 1 480px; }
.banner.pack .row { margin: 0; }


/* Todd's change (1.0.43): the Me | Family toggle above the plan and the grocery list. */
.family-toggle-row { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.family-toggle { margin: 0 0 12px; }
.family-toggle-row .family-toggle { margin: 0; }
.family-toggle .chip { justify-content: center; min-width: 64px; }
/* Whose recipes (Me, family, groups) lead the Recipe box pill row, with a thin rule before the course pills. */
/* Whose (Me, family, groups) leads a pill row, with a thin rule before the pills that filter it. */
.pillbar .box-pills, .pillbar > .family-toggle, .pillbar > .family-toggle-row { margin: 0; }
.pillbar .box-pills + .chips, .pillbar > .family-toggle + .chips, .pillbar > .family-toggle-row + .chips { padding-left: 12px; border-left: 1px solid var(--rule); }
/* The grocery row is as wide as the list under it, so Print list sits over the list, not across the page. */
.pillbar.listbar { max-width: 760px; }
@media (max-width: 640px) { .pillbar .box-pills + .chips, .pillbar > .family-toggle + .chips, .pillbar > .family-toggle-row + .chips { padding-left: 0; border-left: 0; } }
.box-pills .chip { text-decoration: none; color: inherit; }
.box-pills .chip.on { color: var(--on-accent); }
/* One place switcher for Recipes, Plan and Pantry (2026-12-02): pills that pick the place are buttons on Plan and Pantry,
   links on Recipes; the quiet line when a page shows Me for a place it doesn't have; Pantry's search in the body. */
.place-note { margin: -4px 0 12px; }
.pantry-finder { margin: 0 0 6px; }
/* The List's control (2026-12-02): the store pills (All, each store, + Store: one row that scrolls sideways when long),
   the add box where the search is, then the count line with a store's Sort; as wide as the list under it. */
.grocery-finder { max-width: 760px; margin: 0 0 12px; }
.grocery-finder .addbar { margin: 0; }
.store-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 2px 0 4px; scrollbar-width: thin; }
.store-pills .chip { flex: none; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; }
.store-pills .add-store { background: transparent; border-style: dashed; color: var(--accent); }
.menu-list { display: flex; flex-direction: column; gap: 2px; min-width: min(320px, 80vw); }
.menu-list .menu-item { justify-content: flex-start; text-align: left; width: 100%; }
.family-pick { min-height: 40px; border-radius: 999px; padding: 0 12px; border: 1px solid var(--rule); background: var(--paper); }

/* Recipe finder (the phone's Recipes screen filters, 2026-11-30): search, one row of Filters / ticks / heart, panel. */
.finder { display: flex; flex-direction: column; gap: 6px; }
.finder-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.finder-row .filters-btn { padding: 4px 12px; font-size: 13px; }
.finder-row .badge { background: var(--on-accent); color: var(--accent); border-radius: 999px; font-size: 11px; padding: 0 6px; min-width: 18px; text-align: center; }
.finder-row .chip:not(.on) .badge { background: var(--accent); color: var(--on-accent); }
.finder-end { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.tick { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.tick input { margin: 0; accent-color: var(--accent); }
.icon.heart { font-size: 20px; padding: 2px 4px; }
.icon.heart.on { color: var(--accent); }
.finder-count { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.finder-count select { min-width: 0; flex: 0 1 auto; }
.fpanel { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; max-height: 45vh; overflow: auto; background: var(--paper); }
.fpanel-head { display: flex; align-items: center; min-height: 34px; }
.fsec { border-top: 1px solid var(--rule); padding: 4px 0; }
.fsec-head { display: flex; width: 100%; align-items: center; justify-content: space-between; background: none; border: 0; cursor: pointer; padding: 6px 0; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--ink); }
.fsec .find-ing { width: 100%; min-width: 0; margin: 2px 0 4px; }

/* Fill my week (the app's, 2026-11-30). */
.fill { display: flex; flex-direction: column; gap: 8px; min-width: min(460px, 80vw); }
.fill-mixed, .fill-sounds-good { font-size: 14px; }
.fill-picks { display: grid; max-height: 45vh; overflow: auto; border-top: 1px solid var(--rule); }
.fill-pick { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); }

/* Ctrl-click selection on the plan (2026-11-30). */
.day.selected { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.meal.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.select-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; border-radius: 10px; background: var(--accent-soft); color: var(--on-accent-soft); }
.select-hint { margin: 0 0 8px; }
@media print { .select-bar, .select-hint { display: none !important; } }
/* Todd (2026-11-30): Account > Advanced features (actions left, switches) and the owner's per-member switch. */
.actions-left { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.actions-count { font-size: 1.6rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-list { margin-left: 18px; }
/* Account > Experience (2026-12-01): the chosen preset, and its switches without the indent. */
.kind.on { border-color: var(--accent); background: var(--accent-soft); }
.kind.on, .kind.on span { color: var(--on-accent-soft); }
.switch-list.flush { margin-left: 0; }
.switch-row input[type=checkbox], .member-switch input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--accent, #D7382D); }
.member-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.members .member-name { flex: 1; }
/* In-app invites (2026-12-01) */
.invites { list-style: none; padding: 0; margin: 0; }
.invites li { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.invites li:last-child { border-bottom: 0; }
.invites li > span:first-child { flex: 1; min-width: 200px; }
.invite-in-app { margin-top: 16px; }
.invite-in-app h3 { margin: 0 0 8px; font-size: 1rem; }
/* The email box and its button wrap on a phone instead of running past the screen (an input's default width kept
   it from shrinking). */
.invite-in-app .addbar { flex-wrap: wrap; }
.invite-in-app .addbar input { flex: 1 1 12em; min-width: 0; }
.fill-dates { gap: 12px; }
.fill-dates label { flex: 1; min-width: 140px; }
.fill-dates input { width: 100%; min-width: 0; box-sizing: border-box; }

/* "At home" on the grocery list (the phone's pantry check, 2026-11-30). */
.athome-toggle { display: block; margin: 4px 0 8px; padding-left: 0; color: var(--muted); font-weight: 600; }
.athome-item { grid-template-columns: 1fr auto auto auto; color: var(--muted); }
/* Shopping a store's list: Kroger cart and step-through on meijer.com / walmart.com (2026-11-30). */
.shopbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; max-width: 760px; }
.searchat { text-decoration: none; font-size: 18px; line-height: 1; }
.kroger { display: grid; gap: 10px; }
.kroger-store { gap: 10px; align-items: center; }
.kroger-lines .kroger-line { display: flex; gap: 8px; align-items: center; }
.kroger-pick { flex: 1; display: grid; text-align: left; color: inherit; padding: 6px 4px; min-width: 0; }
.kroger-pick .gfrom { text-align: left; max-width: none; white-space: normal; }
.kroger-line.done .gname { text-decoration: line-through; color: var(--muted); }
.note.warn { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin: 0; }
.stepshop { display: grid; gap: 10px; }
.stepshop-item { margin: 0; font-size: 22px; }

/* Add page: recipes found in a file */
.import-list { max-height: 360px; overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius); padding: 6px 12px; margin: 8px 0; }
.import-list .import-row { display: flex; flex-direction: row; width: 100%; gap: 8px; align-items: center; padding: 4px 0; margin: 0; }
.import-list .import-row input { width: auto; margin: 0; }

/* Pantry (Todd 2026-12-01): "category, then boxes that fill in a grid left to right, top to bottom, then next category",
   "make them all the same size". Every category's grid has the same column track (auto-fill, so a short category keeps
   the empty tracks) and every card the same fixed height: a 2-line product name, a 1-line brand · size, and up to three
   gauges (more show "+N more"). */
/* Todd (2026-12-01): "Large Product Name and smaller brand name under it", then (2026-12-02) "shrink the product text
   on the webpage for pantry, and make sure brand is smaller and below it": name 1rem bold (was 1.25rem), at most 2
   lines; brand · size .8125rem muted on its own line right under it. The pencil's negative bottom margin keeps it from
   pushing the brand down under a one-line name. */
.pantry-page { --pc-h: 196px; }
.pantry-groups { display: grid; gap: 18px; }
.pantry-group h2 { margin: 0 0 8px; }
.pantry-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); grid-auto-rows: var(--pc-h); }
.pantry-card { display: grid; grid-template-rows: auto auto 1fr; gap: 2px; min-width: 0; overflow: hidden; padding: 10px 10px 8px 12px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.pantry-card.out { background: var(--paper-2); }
.pc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px; }
.pc-name { font-weight: 800; font-size: 1rem; line-height: 1.25; overflow-wrap: break-word; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-edit { font-size: 15px; padding: 4px 6px; margin: -6px -6px -12px 0; min-width: 32px; min-height: 32px; }
.pc-brand { font-size: .8125rem; font-weight: 400; line-height: 1.35; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-amount { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0; }
.pc-list { align-self: flex-start; padding: 2px 8px; font-size: 13px; }
.pc-bars { display: flex; align-items: flex-end; gap: 8px; }
.pc-times { display: grid; gap: 2px; font-weight: 800; color: var(--muted); font-size: 14px; }
.pc-more { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.pc-gauges { display: grid; gap: 4px; }
.gauge { display: inline-flex; align-items: flex-end; gap: 4px; height: 24px; }
.gauge .bar { width: 14px; padding: 0; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-2); cursor: pointer; }
.gauge .bar:nth-child(1) { height: 9px; } .gauge .bar:nth-child(2) { height: 12px; } .gauge .bar:nth-child(3) { height: 16px; }
.gauge .bar:nth-child(4) { height: 20px; } .gauge .bar:nth-child(5) { height: 24px; }
.gauge .bar.on { background: var(--brand); border-color: var(--brand); }
.gauge .bar.on.l1 { background: #E8A33D; border-color: #E8A33D; }
/* Cans / boxes: big − and + (44px) with the can and the count between. */
.pc-count { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px; }
.pc-count .count-btn { width: 44px; height: 44px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--paper-2);
  color: var(--brand); font-size: 22px; font-weight: 700; cursor: pointer; line-height: 1; }
.pc-count .count-btn:disabled { opacity: .4; cursor: default; }
.pc-count .count-n { display: inline-flex; align-items: center; justify-content: center; gap: 3px; font-weight: 800; font-size: 16px; }
.pc-count .count-n.out { color: var(--danger); }
.can-icon { width: 13px; height: 16px; flex: none; color: var(--muted); }
.methods { display: flex; gap: 6px; margin-top: 4px; }
.methods .chip input { position: absolute; opacity: 0; pointer-events: none; }
.methods .chip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-containers { display: grid; gap: 6px; }
.pc-containers h3 { margin: 6px 0 0; }
.pc-containers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pc-containers li { align-items: center; margin: 0; }
/* Add to the pantry: Brand, Size, Note and the "already have" line; the Probably low card (2026-12-02, app parity). */
.pantry-add .dup-line { margin: -4px 0 0; color: var(--brand); }
.pantry-add .size-line { margin: -6px 0 0; }
.pantry-add .size-line.error-line { color: var(--danger); }
.pantry-add input.bad { border-color: var(--danger); }
.low-card { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 12px; }
@media (max-width: 700px) {
  .pantry-page { margin: 0 4px; } /* .page's 12px + 4px: a 16px gutter */
  .pantry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 359px) { .pantry-grid { grid-template-columns: minmax(0, 1fr); } }
.starter-section h3 { margin: 12px 0 4px; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.starter-grid .starter-item { display: flex; flex-direction: row; gap: 6px; align-items: center; margin: 0; }
.starter-grid .starter-item input { width: auto; margin: 0; }

/* Ctrl/Shift-click selection and moving it to another category (multiselect.js, 2026-12-01). */
.ms-item.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.pantry-card.ms-item.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.ms-item.dragging { opacity: .45; }
.ms-target.over { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.chip.ms-target.over { outline-offset: 1px; }
.ms-drag { position: fixed; top: -100px; left: -100px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; }
.ms-hint { margin: 0 0 10px; }
.selbar strong { font-weight: 800; }
@media print { .ms-hint { display: none !important; } }
/* Recipe box mass delete (2026-12-01): a picked card is outlined, with a tick. */
.card-wrap.ms-item.selected { background: none; box-shadow: none; outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 16px; }
.card-wrap.ms-item.selected::after { content: '✓'; position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; pointer-events: none; }
.box-selbar { max-width: none; }
/* My collection (2026-12-01): dashboard cards, cuisine bars, time machine list. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.stat strong { font-size: 28px; }
.bars { display: grid; gap: 10px; max-width: 720px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; }
.bar-track { height: 8px; border-radius: 4px; background: var(--paper-3); overflow: hidden; margin-top: 4px; }
.bar-fill { height: 8px; border-radius: 4px; background: var(--accent); }
.bar-fill.unsorted { background: var(--rule); }
.tm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
/* My collection > Compare (2026-12-02): up to five versions side by side, scrolling sideways on a phone. */
.compare-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.compare-col { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; display: grid; gap: 4px; align-content: start; }
.compare-col p { margin: 0; }
.compare-title { font-weight: 800; }
.compare-lines { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.compare-lines li.only-some { font-weight: 800; }
.collection-actions { margin: 4px 0; }
/* Lists to tick (Share recipes, Add recipes here), and Account > Recipe box on startup. */
.share-list { max-height: min(50vh, 420px); }
.share-row { display: flex; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.share-row:hover { background: var(--accent-soft); }
.share-row input { flex: none; }
.start-box { display: grid; gap: 8px; }
.start-box select { max-width: 360px; }
/* The family owner's approval list: no bullets, and its four buttons wrap on a phone ("Decline all" ran off the
   screen). A switch alone in a panel (Advanced features for the whole family) has no rule above it. */
ul.plain { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.panel > ul.plain + .row { flex-wrap: wrap; }
.panel > .switch-row:first-child { border-top: 0; padding-top: 0; }

/* Grocery > Stores (2026-12-01): the stores shared with the app. */
.stores-panel h3 { margin: 0; }
.store-list { list-style: none; margin: 8px 0; padding: 0; }
.store-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--rule); }
.store-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.store-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stores-panel .chips { margin: 6px 0 0; }
.finder-row .have-everything { white-space: nowrap; padding: 4px 12px; font-size: 13px; }

/* Rate (views/rate.js, the app's FoodCourtScreen): one screen, no scrolling. The page fills the window under the top bar
   (no footer), and the card's photo takes whatever the words, the progress and the buttons leave. */
#app:has(> main.rate-page) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
#app:has(> main.rate-page) > .foot { display: none; }
main.rate-page { flex: 1 1 auto; min-height: 0; width: 100%; padding-top: 12px; padding-bottom: 14px; display: flex; }
.rate-body { flex: 1; min-height: 0; width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.rate-bar { display: flex; align-items: center; gap: 6px; }
.rate-bar h1 { font-size: 28px; }
.rate-back { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -8px; border-radius: 999px; color: var(--ink); }
.rate-back:hover { background: var(--paper-3); }
.rate-why { align-self: center; display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: none; border: 0; padding: 2px 6px; border-radius: 999px; color: var(--muted); font-size: 14px; cursor: pointer; }
.rate-why span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-why:hover { color: var(--ink); }
.rate-why svg { flex: none; }
.rate-more { margin: 0; color: var(--muted); font-size: 13px; text-align: center; max-height: 20vh; overflow-y: auto; }
.rate-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); color: var(--ink); text-decoration: none; }
.rate-card:hover .rate-see { filter: brightness(1.04); text-decoration: underline; }
.rate-photo { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--paper-3); }
.rate-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rate-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--accent-soft); color: var(--on-accent-soft); font-size: 13px; font-weight: 600; }
.rate-see { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--paper); color: var(--accent); font-size: 13px; font-weight: 700; opacity: .94; }
.rate-text { flex: none; display: grid; gap: 4px; padding: 12px 16px; }
.rate-title { font-size: 22px; font-weight: 800; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rate-from, .rate-ings { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-ings { font-size: 14px; }
.rate-facts { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-progress { flex: none; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.rate-track { flex: 1; height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.rate-fill { display: block; height: 6px; border-radius: 999px; background: var(--accent); }
.rate-buttons { flex: none; display: flex; gap: 16px; }
.thumb { flex: 1; height: 72px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--accent); border-radius: var(--radius); background: transparent; color: var(--accent); font-weight: 700; font-size: 16px; cursor: pointer; padding: 0 12px; }
.thumb.up { background: var(--accent); color: var(--on-accent); }
.thumb:hover { filter: brightness(1.05); background-color: color-mix(in srgb, var(--accent) 8%, transparent); }
.thumb.up:hover { background: var(--accent); }
.thumb:active { opacity: .8; }
.thumb span { white-space: nowrap; }
.rate-note { flex: none; margin: 0; color: var(--danger); text-align: center; font-size: 14px; }
.rate-end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px 8px; }
.rate-end h2 { color: var(--ink); text-transform: none; font-family: inherit; font-weight: 800; font-size: 20px; margin: 0; }
.rate-end p { margin: 0; max-width: 420px; }
.rate-wait { flex: 1; display: grid; place-items: center; }
.rate-wait .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: rate-spin .8s linear infinite; }
@keyframes rate-spin { to { transform: rotate(360deg); } }
.finder-count .rate-open { padding: 4px 8px; font-size: 14px; }
@media (max-width: 700px) {
  main.rate-page { padding-top: 8px; padding-bottom: 10px; }
  .rate-body { gap: 8px; }
  .rate-bar h1 { font-size: 24px; }
  .rate-title { font-size: 20px; }
  .rate-text { padding: 10px 14px; }
  .thumb { height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .rate-wait .spin { animation: none; } }
/* Recipe page parity with the app (2026-12-02): tick-off ingredients, Show simplified, Your Avg, I made this, tags,
   the editor's photo and times, Report reasons, Blocked people. */
.ing-list li.ing-tick { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; border-radius: 6px; }
.ing-list li.ing-tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tick-box { flex: none; width: 18px; height: 18px; margin-top: 3px; border: 2px solid var(--muted); border-radius: 4px; display: grid; place-items: center; }
.ing-list li.ing-tick.ticked .tick-box { background: var(--accent); border-color: var(--accent); }
.ing-list li.ing-tick.ticked .tick-box::after { content: '✓'; color: var(--on-accent); font-size: 12px; font-weight: 800; line-height: 1; }
.ing-list li.ing-tick.ticked .tick-text { color: var(--muted); text-decoration: line-through; }
.steps-head { margin: 0; align-items: center; }
.steps-head h2 { margin: 0; }
.avg-line { margin-top: -4px; }
.avg-line strong { color: var(--ink); }
.made-it { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.made-it p { margin: 0; }
.tag-chips { margin: 4px 0 8px; }
.tag-add input { flex: 1; min-width: 0; }
.tags-sheet .other-tags { max-height: 180px; overflow: auto; }
.edit-times label { flex: 1 1 90px; min-width: 0; }
.edit-times input { width: 100%; }
.edit-photo-row { align-items: center; gap: 14px; }
.edit-photo { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--paper-3); flex: none; }
.edit-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edit-photo .tile { width: 100%; height: 100%; font-size: 28px; }
.edit-photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.error-text { color: var(--danger); margin: 0; min-height: 0; }
.error-text:empty { display: none; }
.report-reasons { display: grid; gap: 2px; }
.report-reasons label.check { font-weight: 500; min-height: 40px; }
.blocked-list { list-style: none; padding: 0; margin: 0; }
.blocked-list li { padding: 6px 0; border-top: 1px solid var(--rule); }
@media print { .made-it, .steps-head button, .tick-box { display: none !important; } .ing-list li.ing-tick.ticked .tick-text { color: inherit; text-decoration: none; } }

/* The + on every recipe box (Todd, 2026-12-02: "I don't see a + button on recipes in the web"): round, bottom right,
   as in the app; it says "Add a recipe" where there is room. Its menu lists the ways in (box_add.js). */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 5; display: inline-flex; align-items: center; gap: 10px;
  min-height: 60px; padding: 0 24px 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.fab:hover { filter: brightness(1.06); }
.fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.fab-plus { font-size: 34px; line-height: 1; font-weight: 400; margin-top: -3px; }
@media (max-width: 700px) {
  .fab { right: 16px; bottom: 16px; width: 60px; min-height: 60px; padding: 0; justify-content: center; }
  .fab-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media print { .fab { display: none !important; } }
.page:has(.fab) .grid { padding-bottom: 88px; }
.pick-list.add-ways { max-height: none; }
.add-ways .pick { display: grid; gap: 2px; }
.dest-row { margin: 0 0 16px; display: grid; gap: 6px; max-width: 760px; }
.dest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border: 1.5px solid var(--accent); border-radius: 12px; }
.dest-pick { font: inherit; font-weight: 800; color: var(--accent); background: transparent; border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px; }
/* Waiting for the family owner's approval (Todd, 2026-12-02: "top left of the family box ... lighter colored"): a faded
   tile with a badge first in the grid; its page has Accept and Reject in a bar that stays in view. */
.card-wrap.waiting .card { background: var(--paper); border-style: dashed; }
.card-wrap.waiting .card-photo { opacity: .45; }
.card-wrap.waiting .card-title { color: var(--muted); }
.card-wrap.waiting .card-meta .by { color: var(--accent); font-weight: 700; }
.waiting-badge { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); padding: 2px 10px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--paper); color: var(--accent); font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.waiting-banner { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; max-width: 760px; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--on-accent-soft); }
.waiting-banner + .seg { margin: 0 0 14px; }
.changes ul { margin: 0; padding-left: 20px; }
.decide-bar { position: sticky; bottom: 0; z-index: 4; display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 20px -24px 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--paper-2); }
.decide-bar .btn { min-width: 140px; min-height: 46px; font-size: 17px; }
.decide-bar .btn.danger-text { border-color: var(--danger); }
@media (max-width: 700px) { .decide-bar { margin: 16px -12px 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); } .decide-bar .btn { flex: 1 1 0; min-width: 0; } }
/* Advanced features on the recipe page (2026-12-02, Todd: "AI features should come to the website"): the Simplify and
   standardize card, Keep / Undo, Standardize, the strength menu, Compare steps, the review, and Adapt to my preferences. */
.simplify-tools { display: grid; gap: 8px; margin: 10px 0 6px; }
.simplify-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper-3); }
.simplify-card.on { background: var(--accent-soft); }
.simplify-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.simplify-text .muted.small { font-size: 13px; }
.link.inline { padding: 0; justify-self: start; text-align: left; }
input.switch { appearance: none; flex: none; width: 46px; height: 26px; min-height: 0; padding: 0; border-radius: 999px; border: 0; background: var(--rule); position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(20px); }
.spinner { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .9s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.undo-bar { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--paper-3); }
.undo-bar span { flex: 1 1 200px; }
.get-actions { font-weight: 700; font-size: 14px; justify-self: start; }
.report-answer { justify-self: start; padding-left: 0; }
.ing-tools { margin: 4px 0 0; gap: 8px; align-items: center; }
.ing-tools .link { padding-right: 0; }
.simplify-menu .menu-row { display: grid; gap: 2px; width: 100%; padding: 10px 12px; }
.simplify-menu .menu-foot { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.compare-col + .compare-col { border-left: 1px solid var(--rule); padding-left: 18px; }
.compare-col h3 { color: var(--accent); font-size: 13px; }
.compare-col ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; line-height: 1.4; }
.compare-col li strong { color: var(--accent); }
.compare-col li.section { color: var(--accent); font-weight: 700; font-size: 13px; }
.std-lines, .std-changes { list-style: none; padding: 0; }
.std-lines { display: grid; gap: 6px; margin: 8px 0; }
.std-lines li { display: grid; }
.std-changes { margin: 0 0 10px; }
.ai-consent p { margin: 0; }
.adapt-page { max-width: 760px; display: grid; gap: 14px; }
.adapt-page h1 { margin: 0; }
.adapt-pick, .adapt-review { gap: 14px; }
.adapt-pick p, .adapt-review p { margin: 0; }
.adapt-type input { flex: 1; min-width: 0; }
.adapt-card { border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; background: var(--paper-2); }
.adapt-note { border-radius: 12px; padding: 12px 14px; background: var(--accent-soft); color: var(--on-accent-soft); }
.adapt-copy-title { text-transform: none; color: var(--ink); font-size: 19px; margin: 0; }
.adapt-line { display: grid; gap: 1px; padding-top: 6px; border-top: 1px solid var(--rule); }
.adapt-line .accent { color: var(--accent); }
.adapt-asking { display: grid; gap: 8px; justify-items: start; }
@media (max-width: 640px) {
  .compare-cols { grid-template-columns: 1fr; }
  .compare-col + .compare-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 10px; }
}
@media print { .simplify-tools, .ing-tools { display: none !important; } }

/* Grocery (2026-12-02, app parity): earlier names offered under the add box, the store's sort line, Move up / down,
   and the list as text when the browser can neither share nor copy. */
.gsuggest { margin: -8px 0 8px; max-width: 760px; }
.gsuggest:empty { display: none; }
.ghint { margin: -10px 0 8px; }
.ghint:empty { display: none; }
.gsorted { margin: 0 0 6px; }
.gmove { display: inline-flex; gap: 2px; }
.gmove .icon[disabled] { opacity: .35; cursor: default; }
.sharetext { width: 100%; font: inherit; font-size: 14px; white-space: pre; }
@media print { .gsuggest, .ghint, .gsorted, .gmove { display: none !important; } }

/* Clean up pantry (2026-12-02): the preview list, one tick per change, the detail under the name. */
.cleanup-list { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.cleanup-list h3 { margin: 12px 0 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.cleanup-list label.check.cleanup-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; padding: 4px 0; }
.cleanup-row input { margin-top: 3px; }
.cleanup-title { display: block; font-weight: 600; }
.cleanup-detail { display: block; }

/* The minimum-version gate (update_gate.js): a required update hides the page behind it; nothing closes it but Reload. */
dialog.sheet.update-gate.required::backdrop { background: rgba(20,18,17,.92); }

/* Open to the meal I'm about to cook (mealtime.js): the recipe planned for this meal, with Start cooking highlighted.
   The ladle button wobbles three times, then stays still in its ring; with reduced motion only the ring and colour. */
.cook-invite-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 16px; padding: 10px 14px;
  border-radius: var(--radius); background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600;
}
.btn.cook-invite {
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px color-mix(in srgb, var(--accent) 60%, transparent);
  transform-origin: 50% 70%;
}
.btn.cook-invite .ladle { flex: none; }
.btn.cook-invite.wobble { animation: cook-wobble 1300ms ease-in-out 3 both; }
@keyframes cook-wobble {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(-7deg); }
  25% { transform: rotate(7deg); }
  40% { transform: rotate(-4deg); }
  52% { transform: rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) { .btn.cook-invite.wobble { animation: none; } }

/* A family box recipe that couldn't be fetched (offline, say): the tile stays, with why and Try again (bug hunt p4). */
.load-failed { display: grid; gap: 4px; justify-items: start; padding: 12px 14px; margin-top: 8px; border-radius: 10px; background: var(--paper-3); }
.load-failed p { margin: 0; }
/* My collection: which box the numbers count, and the family box's count beside it (bug hunt p4). */
.collection-scope { margin: 4px 0 10px; }
.collection-scope p { margin: 2px 0 0; }
/* Shopping mode (Todd 2026-12-03; the app's, src/shopping_live.js): the cart that starts it (the app's Cook mode ladle:
   a filled rounded square), the bar pinned under the top bar, bigger rows for one hand, and the popup. */
.cartbtn { width: 42px; height: 42px; min-height: 0; padding: 0; border: 0; border-radius: 12px; background: var(--accent);
  color: var(--on-accent); display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.cartbtn:hover { filter: brightness(1.05); }
.shopping-bar { position: sticky; top: var(--top-h, 0); z-index: 4; display: flex; align-items: center; gap: 12px;
  max-width: 760px; padding: 8px 10px 8px 16px; margin: 0 0 14px; border-radius: var(--radius); background: var(--accent-soft);
  color: var(--on-accent-soft); font-size: 18px; font-weight: 800; }
.shopping-bar .grow { flex: 1; }
.shopping-bar > svg.wobble { animation: cook-wobble 1300ms ease-in-out 3 both; }
@media (prefers-reduced-motion: reduce) { .shopping-bar > svg.wobble { animation: none; } }
.shopping-bar .btn { min-height: 44px; min-width: 76px; border-radius: 999px; font-size: 17px; font-weight: 800; }
main.shopping .gitem { padding-top: 10px; padding-bottom: 10px; }
main.shopping .gcheck { min-height: 56px; font-size: 20px; }
main.shopping .gcheck input { width: 34px; height: 34px; }
dialog.sheet.shop-pop { width: min(520px, calc(100% - 32px)); border-radius: 28px; }
.shop-pop-body { display: grid; justify-items: center; gap: 16px; padding: 28px 24px 20px; text-align: center; }
.shop-pop-badge { width: 88px; height: 88px; border-radius: 24px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.shop-pop-line { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 800; }
.shop-pop-store { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 16px; border-radius: 999px;
  background: var(--paper-3); font-size: 20px; font-weight: 700; max-width: 100%; }
.shop-pop-ok { width: 100%; min-height: 64px; border-radius: 16px; font-size: 20px; font-weight: 800; }
@media print { .shopping-bar, .cartbtn { display: none !important; } }
