:root {
  --bg: #faf6ef;          /* cream */
  --fg: #2b211c;          /* espresso */
  --muted: #7a6d63;
  --accent: #b5452b;      /* tomato / terracotta */
  --accent-soft: #f8e6dc;
  --herb: #3f6b2f;        /* basil */
  --herb-soft: #e6efdf;
  --saffron: #9a6200;
  --saffron-soft: #fdf0d5;
  --card: #ffffff;
  --border: #ece3d6;
  --neg: #a3261b;
  --warn: #a86b00;
  --bar: #b5452b;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}
body.has-tabs { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }

a { color: var(--accent); }
h2 { margin: .5rem 0 1rem; }
h3 { margin: 0 0 .75rem; font-size: 1.05rem; }

.wrap { max-width: 640px; margin: 0 auto; padding-inline: 1rem; }
main.wrap { padding-block: 1rem; }

.topbar {
  background: var(--bar);
  color: #fff;
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 3rem; }
.topbar a, .topbar .link { color: #fbe3d6; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; text-decoration: none; color: #fff !important; }
.brand img { width: 1.75rem; height: 1.75rem; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.who { display: flex; gap: 1rem; align-items: center; font-size: .9rem; }
.who a { text-decoration: none; }
.who a.on { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.tabs {
  position: fixed; inset: auto 0 0 0;
  display: flex; justify-content: space-around;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 10;
}
.tabs a {
  flex: 1; text-align: center; padding: .45rem 0 .55rem;
  font-size: .75rem; color: var(--muted); text-decoration: none; position: relative;
}
.tabs a.on { color: var(--accent); font-weight: 600; }
.tabs .ic { display: block; font-size: 1.25rem; line-height: 1.3; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.narrow { max-width: 420px; margin: 2rem auto; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.big { font-size: 1.6rem; font-weight: 700; }

.flash { padding: .75rem 1rem; background: var(--accent-soft); border-radius: var(--radius); margin-bottom: 1rem; }
.flash.error { background: #fbe4e1; color: var(--neg); }

.weeknav { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; gap: .5rem; }

.list, .plain-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain-list li { padding: .4rem 0; border-bottom: 1px solid var(--border); }


.line { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.line.plain { color: inherit; text-decoration: none; }

.badge {
  display: inline-block; font-size: .75rem; font-weight: 600;
  padding: .1rem .5rem; border-radius: 999px;
  background: #f3ebdf; color: var(--fg);
}

.summary { display: flex; justify-content: space-between; font-weight: 600; }

.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; }
.row > .field { flex: 1 1 8rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.radios ul { list-style: none; padding: 0; margin: 0; }
.radios li { margin-bottom: .35rem; }
.radios label, label.check { font-weight: 400; display: flex; gap: .5rem; align-items: center; }

input[type=email], input[type=text], input[type=url], input[type=date], input[type=time], input[type=number], input:not([type]), select, textarea {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  min-height: 2.75rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: .6rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 2.75rem;
}
button.wide, .btn.wide { width: 100%; }
.btn.wide { display: block; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
button.link { background: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 400; }
button.danger { background: transparent; color: var(--neg); border: 1px solid var(--border); }
button.link.danger { border: 0; }
form.inline { display: inline; margin: 0; }
form.confirm { margin-top: .75rem; }
.actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.actions:empty { display: none; }

.errorlist { color: var(--neg); padding-left: 0; list-style: none; margin: .25rem 0 0; font-size: .9rem; }

table.kv { width: 100%; border-collapse: collapse; }
table.kv td { padding: .35rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
table.kv td:last-child { text-align: right; white-space: nowrap; padding-left: 1rem; }
table.kv tr.total td { font-weight: 700; }

textarea { resize: vertical; min-height: 0; }
.warn { color: var(--warn); }
.btn.small { display: inline-flex; align-items: center; min-height: 2rem; padding: .25rem .75rem; font-size: .85rem; line-height: 1.2; }
.section-head { margin-bottom: .5rem; }
.section-head h3 { margin: 0; }

.member { display: block; color: inherit; text-decoration: none; padding: .6rem 0; border-top: 1px solid var(--border); }
.member > div + div { margin-top: .15rem; }

.rules { list-style: none; padding: 0; margin: 0 0 .75rem; }
.rules li { display: flex; gap: .65rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.rules li a { color: inherit; text-decoration: none; flex: 1; }
.rules li.off a { color: var(--muted); text-decoration: line-through; }
button.toggle {
  width: 1.6rem; height: 1.6rem; min-height: 0; padding: 0; border-radius: 6px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border); color: var(--accent); line-height: 1;
}
button.toggle[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.add-rule { display: flex; gap: .5rem; }
.add-rule input { flex: 1; min-width: 0; }

/* Menu: one section per day, one card per meal */
.day-group { margin-bottom: 1.25rem; }
.day-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.day-head h3 { margin: 0; flex: 1; font-size: 1rem; }
.day-head h3 .muted { font-weight: 400; }
.day-group.empty { margin-bottom: .75rem; padding-bottom: .75rem; border-bottom: 1px dashed var(--border); }
.badge.today-badge { background: var(--accent); color: #fff; margin-left: .25rem; vertical-align: 2px; }

.meal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--herb);
  border-radius: var(--radius);
  padding: .65rem .9rem .75rem;
  margin-bottom: .5rem;
}
.meal-card.slot-lunch { border-left-color: var(--saffron); }
.meal-head { display: flex; justify-content: space-between; align-items: center; }
.slot-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--herb); }
.slot-lunch .slot-label { color: var(--saffron); }
.meal-title { font-weight: 600; font-size: 1.05rem; margin: .1rem 0 .2rem; }
.meal-card .meta { display: flex; gap: .9rem; flex-wrap: wrap; color: var(--muted); }
.badge.source { background: var(--accent-soft); color: var(--accent); }
.meal-card .meta { align-items: center; }
/* The top part of the card opens the recipe; the edit button stays clickable above it. */
.meal-main { position: relative; }
.meal-link { color: inherit; text-decoration: none; }
.meal-link::after { content: ""; position: absolute; inset: -.65rem -.9rem 0; border-radius: var(--radius) var(--radius) 0 0; }
.meal-main:last-child .meal-link::after { bottom: -.75rem; border-radius: var(--radius); }
.meal-link:focus-visible { outline: none; }
.meal-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.meal-main:has(.meal-link:hover) .meal-link { text-decoration: underline; text-decoration-color: var(--accent); }
.meal-main .icon-btn, .meal-main a.badge.source { position: relative; z-index: 1; }
.meal-main a.badge.source { text-decoration: none; }
.meal-main a.badge.source:hover { background: var(--accent); color: #fff; }
.meal-card .note { margin-top: .3rem; font-style: italic; color: var(--muted); }
.meal-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.meal-foot .btn { margin-left: auto; }
.review { display: flex; gap: .6rem; align-items: center; }
.quick-feedback { display: flex; gap: .3rem; margin: 0; }
button.qf {
  width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border); font-size: 1.05rem; line-height: 1;
  filter: grayscale(.6); opacity: .8;
}
button.qf:hover { filter: none; opacity: 1; }
button.qf[aria-pressed=true] { filter: none; opacity: 1; background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.icon-btn {
  width: 2rem; height: 2rem; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: 1.05rem;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--accent-soft); color: var(--accent); }

/* Rating pills (radio buttons) */
.pills > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills > div > div { display: contents; }
.pills > div label {
  display: inline-flex; align-items: center; margin: 0; cursor: pointer;
  padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 999px;
  font-weight: 400; font-size: .9rem; background: var(--card);
}
.pills > div label input { position: absolute; opacity: 0; pointer-events: none; }
.pills > div label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pills > div label:has(input:focus-visible) { outline: 2px solid var(--accent); }

/* Home */
.home-head h2 { margin-bottom: .1rem; }
.home-head p { margin-top: 0; }
.empty-today { padding-block: 1.5rem; }
.empty-today p { margin: .25rem 0 0; }

/* Ingredients editor */
.ingredient-row { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: .4rem; padding: .6rem; margin-bottom: .5rem; }
.ingredient-row .ing-name, .ingredient-row .ing-note { grid-column: 1 / -1; }
.ingredient-row .ing-del { grid-column: 1 / -1; font-size: .9rem; color: var(--neg); }
.ingredient-row input, .ingredient-row select { min-height: 2.4rem; padding: .45rem .6rem; }
.ingredients-link { margin-top: 1rem; }
.ingredients-link span span { display: block; }

/* Shopping list */
.progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.view-toggles { display: flex; gap: .9rem; }
.progress { height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: .75rem; }
.progress span { display: block; height: 100%; background: var(--herb); transition: width .3s; }
.flash.missing a { font-weight: 600; }
.undo-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-block: .5rem; }
/* Compact: one line per item for name, quantity and note, one for the meals. */
.shop-section { padding: .45rem .75rem .15rem; margin-bottom: .6rem; }
.shop-section h3 { margin: 0 0 .1rem; font-size: .9rem; }
.at-home { background: transparent; }
.at-home p { margin: 0 0 .1rem; font-size: .8rem; }
.shop-items { list-style: none; padding: 0; margin: 0; }
.shop-item { border-top: 1px solid var(--border); padding: 0 0 .3rem; }
.shop-item:first-child { border-top: 0; }
.toggle-form { margin: 0; }
.item-main {
  display: flex; align-items: flex-start; gap: .55rem; width: 100%; min-height: 0;
  padding: .3rem 0 0; background: none; color: var(--fg); text-align: left; font-weight: 400; border-radius: 0;
  line-height: 1.35;
}
.item-main .check {
  flex-shrink: 0; width: 1.15rem; height: 1.15rem; margin-top: .05rem; border-radius: 50%;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
}
.item-body { flex: 1; min-width: 0; }
.item-name { font-weight: 600; }
.qty { color: var(--accent); font-weight: 600; margin-left: .35rem; white-space: nowrap; }
.item-note { font-size: .8rem; color: var(--muted); font-style: italic; margin-left: .35rem; }
.item-note::before { content: "· "; font-style: normal; }
.item-main .by { color: var(--herb); white-space: nowrap; font-size: .75rem; margin-top: .1rem; }
.uses { display: flex; flex-wrap: wrap; gap: .2rem .25rem; align-items: center; padding-left: 1.7rem; margin-top: .1rem; }
.badge.use {
  display: inline-flex; gap: .25em; max-width: 12.5rem; padding: 0 .4rem; font-size: .7rem; font-weight: 500; line-height: 1.5;
  background: #f3ebdf; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.badge.use .use-name { overflow: hidden; text-overflow: ellipsis; }
a.badge.use:hover { color: var(--fg); }
.shop-item.checked .check { background: var(--herb); border-color: var(--herb); }
.shop-item.checked .check::after { content: "✓"; color: #fff; font-size: .7rem; font-weight: 700; }
.shop-item.checked .item-name, .shop-item.checked .qty { text-decoration: line-through; color: var(--muted); }
.shop-item.checked .uses { opacity: .55; }
#shopping.hide-bought .shop-item.checked { display: none; }
.add-extra summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.add-extra[open] summary { margin-bottom: .5rem; }
.section-title { margin: 1.75rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Creating a menu */
.create-menu { margin-bottom: 1rem; }
.about-menu summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.about-menu p { margin: .5rem 0 0; }
.planning-bar { display: block; text-decoration: none; color: inherit; }
.planning { padding-block: 2rem; }
.spinner { font-size: 2.5rem; display: inline-block; animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.day-slots { padding: .55rem .75rem .45rem; margin: 0 0 .5rem; }
.day-slots legend { float: left; width: 100%; padding: 0; margin-bottom: .2rem; font-weight: 700; }
.slot-row { clear: both; display: flex; align-items: center; gap: .3rem .6rem; flex-wrap: wrap; padding: .2rem 0; }
.slot-on { display: flex; align-items: center; gap: .4rem; width: 5.5rem; font-weight: 600; font-size: .9rem; cursor: pointer; }
.slot-on input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.eaters { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1; transition: opacity .2s; }
.slot-row:has(.slot-on input:not(:checked)) .eaters { opacity: .3; pointer-events: none; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .85rem;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
}
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Django's checkbox list for "who eats" on the meal form, shown as chips. */
.field.chips > div { display: flex; flex-wrap: wrap; gap: .3rem; }
.field.chips > div > div label { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; padding: .2rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.field.chips > div > div label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.servings-field input { max-width: 7rem; }
.card-actions { display: inline-flex; gap: .1rem; position: relative; z-index: 1; }
/* Swiping between weeks: the page slides away while the next week loads. */
main.swipe-next, main.swipe-prev { transition: transform .18s ease-out, opacity .18s ease-out; opacity: .4; }
main.swipe-next { transform: translateX(-30%); }
main.swipe-prev { transform: translateX(30%); }
@media (prefers-reduced-motion: reduce) { main.swipe-next, main.swipe-prev { transition: none; transform: none; } }
body { overflow-x: hidden; }
.remove-leftovers { justify-content: center; font-size: .9rem; }
.copy-link { margin: -.4rem 0 1rem; }
.copy-week { padding: .6rem .9rem; }
.copy-week p { margin: .2rem 0 0; }

/* Recipe binder */
.filter-pills { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pill {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 0; padding: .3rem .8rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted);
  font-size: .85rem; font-weight: 500; text-decoration: none;
}
.pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill .count { font-size: .75rem; opacity: .7; }
.recipe-search { margin-bottom: .75rem; }
.recipe-search input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.recipe-row { display: block; color: inherit; text-decoration: none; padding: .65rem .9rem; margin-bottom: .5rem; }
.recipe-row .recipe-name { font-weight: 600; }
.recipe-row .meta, .recipe-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin-top: .2rem; }
.recipe-meta { margin-bottom: .6rem; }
.star { color: var(--saffron); font-size: 1.15rem; }
button.icon-btn.star { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); font-weight: 400; }
button.icon-btn.star.on { color: var(--saffron); }
.badge.try-badge { background: var(--herb-soft); color: var(--herb); }
.status-choice { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.status-choice .pill { cursor: pointer; }
.add-to-menu { align-items: flex-end; }
.add-to-menu .field:last-child { flex: 0 0 auto; }
.add-to-menu button { min-height: 2.75rem; }
.title-row { display: flex; align-items: flex-start; gap: .5rem; }
.title-row h2 { flex: 1; min-width: 0; }
.title-row .icon-btn { margin-top: .6rem; }

/* Recipe photos */
.add-buttons { display: inline-flex; gap: .4rem; }
.photo-strip { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: .75rem; padding-bottom: .25rem; }
.photo-strip img { height: 9rem; width: auto; border-radius: 8px; border: 1px solid var(--border); display: block; }
.photo-strip figure { margin: 0; text-align: center; }
.add-photo { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.add-photo input { flex: 1; min-width: 0; font-size: .85rem; }
input[type=file] { font: inherit; max-width: 100%; }
.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin-bottom: .45rem; }
.ingredient-row.needs-check { border-color: var(--saffron); box-shadow: 0 0 0 1px var(--saffron); }
.check-note { grid-column: 1 / -1; margin: 0; color: var(--saffron); font-weight: 600; }
.imports h3 { margin-bottom: .4rem; }
.import-row { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--border); }
.import-row:first-of-type { border-top: 0; }
.import-link { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.import-link img { width: 3rem; height: 3rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); flex-shrink: 0; }
.import-link > span { display: flex; flex-direction: column; min-width: 0; }
.import-link .ready { color: var(--herb); font-weight: 600; }

/* Adding a recipe */
.add-way h3 { margin-bottom: .2rem; }
.add-way p { margin: 0 0 .6rem; }
.add-link { display: flex; gap: .5rem; }
.add-link input { flex: 1; min-width: 0; }
.add-manual { display: flex; justify-content: space-between; align-items: center; color: inherit; text-decoration: none; }
.add-manual > span:first-child { display: flex; flex-direction: column; }
.import-icon { width: 3rem; height: 3rem; border-radius: 6px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; background: var(--bg); }
.import-source { overflow-wrap: anywhere; }
/* Pantry */
.view-toggles { flex-wrap: wrap; justify-content: flex-end; gap: .2rem .9rem; }
button.badge.pantry-btn {
  min-height: 0; padding: 0 .45rem; font-size: .7rem; line-height: 1.5; font-weight: 600;
  background: var(--herb-soft); color: var(--herb); border: 0; border-radius: 999px; cursor: pointer;
}
/* "Hide meals" hides the line of meal chips; "Hide buttons" the line of item buttons below it. */
#shopping.hide-uses .uses { display: none; }
#shopping.hide-buttons .item-tools { display: none; }
.item-tools { display: flex; flex-wrap: wrap; gap: .2rem .25rem; align-items: center; padding-left: 1.7rem; margin-top: .2rem; }
.pantry-list { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.pantry-list li { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .3rem .15rem .65rem; border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; background: var(--card); }
.pantry-list .link { padding: 0 .25rem; }
/* Settings values can be long (cuisines, equipment): wrap them instead of running off the page. */
table.kv.wrap { table-layout: fixed; }
table.kv.wrap td:first-child { width: 42%; padding-right: .75rem; }
table.kv.wrap td:last-child { white-space: normal; text-align: left; overflow-wrap: anywhere; padding-left: 0; }
.staple-list + .staple-list { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.staple-list h4 { margin: 0 0 .4rem; font-size: .95rem; }
/* Weekly items */
.weekly-list li { gap: .5rem; }
.weekly-add .row { align-items: center; }
.weekly-submit { flex: 0 0 auto !important; }
/* Choosing a recipe for a day */
.slot-pills > div { display: flex; gap: .4rem; }
.pick-search { display: flex; gap: .5rem; }
.pick-search input { flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.pick-group h3 { margin: .5rem 0 .4rem; font-size: .95rem; }
.pick-card { padding: .6rem .8rem; margin-bottom: .45rem; }
.pick-card .recipe-name { font-weight: 600; flex: 1; min-width: 0; }
.pick-card .meta { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: center; margin-top: .15rem; }
.pick-ingredients { margin: .3rem 0 0; color: var(--muted); }
.pick-more summary { cursor: pointer; color: var(--accent); font-size: .85rem; margin-top: .3rem; }
.pick-more .steps { margin-top: .4rem; }
[hidden] { display: none !important; }
.item-tools form { display: flex; }

/* Settings: people. Admin: households. */
.people { margin: .75rem 0; }
.people li { align-items: flex-start; }
button.small:not(.link) { min-height: 2rem; padding: .25rem .75rem; font-size: .85rem; line-height: 1.2; }
.badge.danger { background: #fbe4e1; color: var(--neg); }
.household-row { padding: .6rem 0; border-top: 1px solid var(--border); }
.household-row > div + div { margin-top: .2rem; }
.household-row.off strong { color: var(--muted); }
.household-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-top: .4rem; }
.household-actions form { display: flex; align-items: center; gap: .35rem; }
.limit-form input { width: 5.5rem; min-height: 2rem; padding: .2rem .4rem; }
table.kv.models td { text-align: left; white-space: nowrap; padding-left: 0; padding-right: .75rem; }
.copy-url { display: block; overflow-wrap: anywhere; padding: .5rem .75rem; background: var(--accent-soft); border-radius: var(--radius); user-select: all; }

/* A section's "+ Add item" and its small form. */
.shop-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.add-here-link { font-size: .8rem; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.add-here-form { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .4rem; margin: .3rem 0 .5rem; }
.add-here-form input[name="extra-name"] { flex: 2 1 7rem; min-width: 0; }
.add-here-form input[name="extra-quantity"] { flex: 1 1 4.5rem; min-width: 0; }

/* "Shop for": the whole week, or today until one of the next days. */
.trip-form { display: flex; justify-content: center; align-items: center; gap: .5rem; margin: -.4rem 0 .8rem; }
.trip-form select { width: auto; min-height: 2.2rem; padding: .25rem .5rem; }
/* On a trip: what the rest of the week also needs of an item. */
.item-body .later { display: block; color: var(--saffron); }
