/* Skafferiet. Mesial's colours (decision 144 there) with larger text and bigger buttons for a tablet on the fridge.
   Every button is at least 56 px high, text is 19 px and up, and contrast is at least 4.5:1 (docs/04_DESIGNBRIEF.md). */
:root {
  --ink: #10302e;
  --muted: #4f5f63;
  --line: #d5dfdd;
  --bg: #f6f8f7;
  --card: #ffffff;
  --brand: #0e7c74;
  --brand-dark: #0a5c56;
  --brand-soft: #e3f3f1;
  --brand-text: #0b6e67;
  --coral: #e2704f;
  /* the coral as text or behind white text: #e2704f is only 3.2:1 on white */
  --coral-text: #b0492a;
  --danger: #a8332b;
  --ok: #1c7344;
  --radius: 16px;
  --tap: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--brand-text); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }
p { margin: .4rem 0 .8rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hint, .small { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: 1.2rem; background: var(--card); border: 2px dashed var(--line); border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--coral); outline-offset: 3px; }

/* top and frame */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem max(1.2rem, env(safe-area-inset-left)); padding-top: max(.7rem, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; }
.who { display: flex; align-items: center; gap: .6rem; }
.who-name { font-weight: 600; }
.who form { margin: 0; }
main { max-width: 1180px; margin: 0 auto; padding: 1.2rem max(1.2rem, env(safe-area-inset-left)) 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1rem 1rem 2rem; }
.narrow { max-width: 640px; }
.center { text-align: center; margin-inline: auto; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: .3rem; min-height: var(--tap); padding: 0 .8rem 0 .2rem; margin-bottom: .4rem; font-weight: 600; text-decoration: none; font-size: 1.05rem; }

.icon { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* buttons: the one way on is green with the dot; the rest are outlined */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: .6rem 1.3rem; border-radius: 999px; border: 2px solid var(--brand); background: var(--card); color: var(--brand-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; position: relative; padding-right: 2.2rem; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary .dot { position: absolute; right: 1rem; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--coral); }
.btn-quiet { border-color: var(--line); color: var(--ink); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-big { min-height: 72px; font-size: 1.15rem; padding-inline: 1.6rem; }
.btn-primary.btn-big { padding-right: 2.8rem; }
.btn-icon { padding: 0; width: var(--tap); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.actions form { margin: 0; }
.spaced { margin-top: 1rem; }

/* forms */
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; }
input, textarea, select { font: inherit; font-weight: 400; color: var(--ink); width: 100%; min-height: var(--tap); padding: .6rem .9rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
textarea { line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--brand); outline: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: .4rem; }
.choice label { display: flex; align-items: center; gap: .6rem; font-weight: 400; min-height: var(--tap); }
.choice input, .colors input { width: 26px; min-height: 26px; height: 26px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.error { background: #fbe9e7; color: var(--danger); border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
.notice { background: var(--brand-soft); color: var(--brand-text); border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
/* the shopping list without network (static/app.js): stays in sight while the list is scrolled */
.offline-status { position: sticky; top: .5rem; z-index: 5; margin: 0 0 1rem; background: #fff4ef; color: var(--coral-text); border: 2px solid var(--coral); border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
.offline-status p { margin: 0; }
.offline-status .buttons { margin-top: .6rem; }
.offline-status .buttons:not(:has(> :not([hidden]))) { display: none; }
.search { display: flex; gap: .6rem; margin: 1rem 0; }
.search input { flex: 1; min-width: 0; }

/* the start page: big buttons */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.tile { display: grid; align-content: center; justify-items: start; gap: .3rem; min-height: 160px; padding: 1.3rem; border-radius: 22px; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); }
.tile .icon { width: 44px; height: 44px; color: var(--brand); }
.tile-label { font-size: 1.35rem; font-weight: 700; }
.tile-hint { color: var(--muted); font-size: .95rem; }
a.tile:hover, a.tile:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
a.tile:active { transform: scale(.98); }
.tile-later { opacity: .55; border-style: dashed; }

/* today on the start page */
.today-card { margin: 1rem 0 1.4rem; padding: 1rem 1.3rem; background: var(--card); border: 2px solid var(--brand); border-radius: 22px; max-width: 760px; }
.today-card h2 { margin: 0 0 .4rem; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.today-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: .6rem; font-size: 1.15rem; }
.today-slot { color: var(--muted); }
.today-meal { font-weight: 700; }
.today-none { font-weight: 400; color: var(--muted); }
.today-soon a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 600; }
.today-card .buttons { margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }

/* people */
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.avatar-big { width: 96px; height: 96px; font-size: 2.4rem; }
.avatar-teal { background: #0e7c74; } .avatar-coral { background: #b8502f; } .avatar-plum { background: #7a3b6e; }
.avatar-sun { background: #8a6100; } .avatar-sky { background: #2d62a8; } .avatar-leaf { background: #3f7a22; }
.people { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 1.5rem 0; }
.person { display: grid; justify-items: center; gap: .5rem; min-width: 150px; padding: 1.2rem; border-radius: 22px; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-size: 1.25rem; font-weight: 700; }
.person:hover, .person:focus-visible { border-color: var(--brand); }
.colors { display: flex; flex-wrap: wrap; gap: .6rem; }
.colors legend { width: 100%; }
.color-choice { display: flex; align-items: center; gap: .3rem; }

/* the PIN */
.pin-form { display: grid; justify-items: center; gap: 1rem; margin-top: 1rem; }
.pin-input { font-size: 2.2rem; letter-spacing: .6em; text-align: center; max-width: 260px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 96px); gap: .8rem; }
.pin-key { height: 84px; border-radius: 22px; border: 2px solid var(--line); background: var(--card); font: inherit; font-size: 1.8rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.pin-key:active { background: var(--brand-soft); }
.pin-clear { font-size: 1rem; }
.pin-go { background: var(--brand); color: #fff; border-color: var(--brand); font-size: 1.3rem; }

/* lists of rows */
.rows { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: .6rem; }
.row { display: flex; align-items: center; gap: .9rem; min-height: 72px; padding: .7rem 1rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); width: 100%; font: inherit; text-align: left; }
a.row:hover, .row-button:hover { border-color: var(--brand); }
.row-button { cursor: pointer; }
.row form { margin: 0 0 0 auto; }
.row-main { font-weight: 600; flex: 1; }
.row-side { color: var(--muted); font-size: .9rem; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }

/* recipe cards */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.card { display: grid; gap: .3rem; background: var(--card); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink); padding-bottom: .9rem; height: 100%; }
.card img, .card-nophoto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; background: var(--brand-soft); }
.card-nophoto { aspect-ratio: auto; height: 72px; }
.card-nophoto .icon { width: 40px; height: 40px; color: var(--brand); }
.card-title { font-weight: 700; font-size: 1.15rem; padding: .2rem 1rem 0; }
.card-meta { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .9rem; padding: 0 1rem; }
.card:hover { border-color: var(--brand); }

/* one recipe */
.facts { display: flex; flex-wrap: wrap; gap: 1.2rem; color: var(--muted); margin: .6rem 0 1rem; }
.facts span { display: inline-flex; align-items: center; gap: .35rem; }
.recipe-photo figure { margin: 0 0 1rem; }
.recipe-photo img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 22px; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .3rem; }
.photo-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.photo-form label { display: inline-flex; }
.recipe-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; margin-top: 1rem; }
.ingredients { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.ingredients li { display: grid; grid-template-columns: 3.4rem 4.2rem minmax(0, 1fr); column-gap: .5rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.ing-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ing-unit { color: var(--muted); white-space: nowrap; }
.ing-name { overflow-wrap: anywhere; }
.ing-name a { display: inline-block; padding: .55rem 0; margin: -.55rem 0; text-decoration: none; font-weight: 600; }
.ing-name a:hover { text-decoration: underline; }
.amount { font-weight: 700; }
.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: .8rem; }
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.gallery figure { margin: 0; }

/* shopping */
.shop { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; grid-template-areas: "add list" "common list"; column-gap: 2rem; align-items: start; }
.shop-add { grid-area: add; }
.shop-common { grid-area: common; }
.shop-list { grid-area: list; }
.shop-list > h2:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips form { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: .3rem; min-height: var(--tap); padding: .4rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font: inherit; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip-on { background: var(--brand-soft); border-color: var(--brand); }
.chip-new { border-color: var(--brand); color: var(--brand-text); font-weight: 600; }
.items { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.item { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding-right: .4rem; }
.item-check { flex: 1; margin: 0; }
.check { display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 68px; padding: .5rem 1rem; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.box { width: 32px; height: 32px; border-radius: 9px; border: 3px solid var(--brand); flex: none; }
.item-done { background: #eef2f1; }
.item-done .box { background: var(--brand) url("check.svg") center / 22px no-repeat; }
.item-done .item-name { text-decoration: line-through; color: var(--muted); }
.item-text { display: grid; }
/* a row that opens something: the whole row is the link, no underline, an arrow at the end (UX review 11) */
a.row-link { text-decoration: none; color: var(--ink); }
a.row-link .item-text { flex: 1; }
a.row-link > .icon { color: var(--muted); }
/* two columns on the iPad, one on a phone (UX review 13) */
.two-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem; align-items: start; }
.col-head { margin-top: 0; }
@media (max-width: 820px) { .two-cols { grid-template-columns: 1fr; } .col-head { margin-top: 1.6rem; } .first-on-phone { order: -1; margin-bottom: 1rem; } .first-on-phone .col-head { margin-top: 0; } }
.item-name { font-weight: 600; font-size: 1.1rem; }
.item-from { color: var(--muted); font-size: .85rem; }

/* the fridge, the freezer and the pantry */
.thing-past { border-color: var(--danger); background: #fbe9e7; }
.thing-today { border-color: var(--danger); }
.thing-soon { border-color: #d9a400; background: #fff8e0; }
.place-choice { color: var(--ink); font-size: 1rem; }
.clean-row { flex-wrap: wrap; padding: .3rem .4rem .6rem; }
.staple-row { flex-wrap: wrap; padding-right: .6rem; }
.btn-small { min-height: 44px; padding: .3rem .9rem; font-size: .9rem; }
.staple-tag { display: inline-block; margin-left: .4rem; padding: 0 .5rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-size: .8rem; font-weight: 600; }
.clean-row .check { flex: 1 1 100%; }
.clean-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 .6rem; }
.scan-camera { display: grid; gap: .5rem; }
.scan-video { width: 100%; max-height: 260px; border-radius: var(--radius); background: #000; object-fit: cover; }
/* scanning in the shop (adr/0002): what the last scan did, big, and the lines left */
.scan-result { margin: .8rem 0 1rem; padding: 1rem 1.2rem; border-radius: 18px; border: 3px solid var(--line); background: var(--card); }
.scan-result p { margin: .2rem 0; }
.scan-result form { margin-top: .6rem; }
.scan-name { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.5rem; font-weight: 700; }
.scan-name .amount { font-size: 1.2rem; }
.scan-what { font-size: 1.2rem; font-weight: 600; }
.scan-ticked, .scan-added { border-color: var(--ok); background: #e7f4ec; }
.scan-ticked .scan-what, .scan-added .scan-what { color: var(--ok); }
.scan-partial { border-color: #d9a400; background: #fff8e0; }
.scan-idle { color: var(--muted); border-style: dashed; }
.scan-undone { border-color: var(--line); }
.scan-left { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.scan-left li { display: grid; padding: .6rem .9rem; background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.scan-left li.scan-last { border-color: #d9a400; }
.pack-size { border: 0; padding: 0; margin: 0; }
.pack-size legend { font-weight: 600; margin-bottom: .35rem; }
.pack-row { display: grid; grid-template-columns: 8rem 7rem; gap: .5rem; }

/* the family's background picture: faded behind everything, so the page reads as before */
.family-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; z-index: -1; pointer-events: none; }
body { position: relative; z-index: 0; }

/* the week menu */
.day-name { min-width: 11.5rem; font-weight: 700; text-transform: capitalize; }
.row-today { border-color: var(--brand); background: var(--brand-soft); }
.today { display: inline-block; margin-left: .3rem; padding: .05rem .5rem; border-radius: 999px; background: var(--coral-text); color: #fff; font-size: .8rem; font-weight: 700; vertical-align: middle; text-transform: none; }
.muted { color: var(--muted); }
.change { margin: .6rem 0; }
.change > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: var(--tap); padding: 0 1.2rem; border: 2px solid var(--brand); border-radius: 999px; background: var(--card); color: var(--brand-text); font-weight: 600; cursor: pointer; list-style: none; }
.change > summary::-webkit-details-marker { display: none; }
.change[open] > summary { background: var(--brand-soft); margin-bottom: .6rem; }
.change > * + * { margin-top: .6rem; }
.meal-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.meal-what { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; font-weight: 700; margin: .2rem 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.choice-btn { min-height: 72px; font-size: 1.1rem; }
.stars { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.stars legend { font-weight: 600; margin-bottom: .4rem; }
.star { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .9rem; border: 2px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; color: var(--coral-text); font-size: 1.2rem; }
.star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star:has(input:checked) { border-color: var(--coral-text); background: #fdeee9; }
/* a place or a day to choose: chosen is filled green, as everywhere else */
.star.place-choice { color: var(--ink); font-size: 1rem; }
.star.place-choice:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #fff; }
.star:has(input:focus-visible) { outline: 4px solid var(--coral); outline-offset: 3px; }
.calendar { display: grid; gap: .3rem; }
.cal-week { display: grid; grid-template-columns: 2.6rem repeat(7, minmax(0, 1fr)); gap: .3rem; }
.cal-wn { align-self: center; color: var(--muted); font-size: .8rem; }
.cal-day { display: grid; align-content: start; gap: .2rem; min-height: 84px; padding: .4rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; overflow: hidden; }
.cal-other { opacity: .5; }
.cal-today { border-color: var(--brand); background: var(--brand-soft); }
.cal-date { font-weight: 700; font-size: .85rem; text-transform: capitalize; }
.cal-meal { font-size: .8rem; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 600px) { .day-name { min-width: 0; } .cal-meal { display: none; } .cal-day { min-height: 56px; } }

/* the week as a calendar: days side by side on the tablet, one under another on a phone */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; margin: .6rem 0; }
.wk-day { display: grid; grid-template-rows: auto 1fr 1fr; gap: .3rem; }
.wk-head { font-weight: 700; text-transform: capitalize; text-decoration: none; color: var(--ink); min-height: 44px; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.wk-cell { display: grid; align-content: start; gap: .2rem; min-height: 96px; padding: .5rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.wk-cell:hover, .wk-cell:focus-visible { border-color: var(--brand); }
.wk-today { border-color: var(--brand); }
.wk-day-today .wk-cell { background: var(--brand-soft); }
.wk-slot { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.wk-meal { display: flex; gap: .3rem; align-items: flex-start; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.wk-meal .icon { flex: none; width: 18px; height: 18px; }
.wk-suggest { color: var(--muted); font-style: italic; font-weight: 400; }
.wk-empty { color: var(--muted); font-weight: 400; }
.wk-stars { color: var(--coral-text); font-size: .8rem; }
@media (max-width: 900px) {
  .week-grid { grid-template-columns: 1fr; }
  .wk-day { grid-template-columns: 7.5rem 1fr 1fr; grid-template-rows: auto; align-items: stretch; }
  .wk-cell { min-height: 64px; }
}
@media (max-width: 520px) { .wk-day { grid-template-columns: 1fr 1fr; } .wk-head { grid-column: 1 / -1; min-height: 44px; } }
.meal-slot { margin-top: 1.4rem; padding-top: .4rem; border-top: 2px solid var(--line); }
.inline-form { display: flex; gap: .5rem; margin: .6rem 0; }
.inline-form input { flex: 1; min-width: 0; }
.review summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--brand-text); }
.cal-lunch { color: var(--muted); }
.link-box { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .9rem; background: #fff; padding: .5rem; border-radius: 8px; user-select: all; }

.draw-days { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.draw-days legend { font-weight: 600; margin-bottom: .4rem; }
.draw-day { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; align-items: center; }
.draw-day .star { text-transform: capitalize; justify-content: flex-start; }
.check-line { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); font-weight: 400; }
.check-line input { width: 28px; height: 28px; min-height: 0; flex: none; }

.tablet-day { display: grid; gap: .3rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; font-size: 1.15rem; }
.tablet-day p { margin: 0; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }

/* portions and lunch boxes this time */
.portions { display: grid; gap: .4rem; margin: .8rem 0; }
.portion-row { display: flex; align-items: center; gap: .6rem; }
.portion-row form { margin: 0; }
.portion-label { min-width: 7rem; font-weight: 600; }
.portion-n { min-width: 2.2rem; text-align: center; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.small-key { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 1.6rem; }
.small-key.off, .small-key:disabled { opacity: .3; }

/* a film in a recipe */
.recipe-film { width: 100%; max-height: 480px; border-radius: var(--radius); background: #000; }

/* nutrition */
.label-box { display: grid; gap: .5rem; margin: .6rem 0 1rem; }
.can-row { display: grid; gap: .3rem; margin-bottom: .4rem; }
.can-row form { justify-self: end; }
.food-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.food-box { margin-top: 1rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; }
.food-box h3 { margin: 0 0 .3rem; }
.food-values { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .2rem 0; }
.food-values b { font-size: 1.3rem; }
.food-missing { margin: .3rem 0 0; padding-left: 1.2rem; }

/* cooking, and ideas for a day */
.cook-step { font-size: 1.6rem; line-height: 1.45; font-weight: 600; max-width: 46rem; }
.cook-nav { margin: 1.4rem 0; }
.btn-big { min-height: 72px; font-size: 1.15rem; padding: .8rem 1.6rem; }
.cook-timer { margin-left: .8rem; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cook-ring .cook-timer { color: var(--coral-text); }
.cook-ingredients summary { min-height: var(--tap); display: flex; align-items: center; gap: .3rem; font-weight: 700; cursor: pointer; list-style: none; }
.cook-ingredients summary::-webkit-details-marker { display: none; }
.cook-ingredients summary .icon { transition: transform .15s; }
.cook-ingredients[open] summary .icon { transform: rotate(90deg); }
.ideas { display: grid; gap: .5rem; margin-bottom: .8rem; }
.idea { justify-content: flex-start; text-align: left; }
.idea > span { display: grid; }

/* help on a page, the recipe form's rows, filters (test person 1, 2026-11-10) */
.page-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.help { margin-bottom: .4rem; }
.help-short { display: none; }
.help summary { min-height: 44px; display: inline-flex; align-items: center; gap: .3rem; padding: 0 .9rem; border: 2px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; color: var(--brand-text); }
.help-text { max-width: 40rem; margin-top: .5rem; padding: .6rem 1rem; background: var(--brand-soft); border-radius: 12px; }
.help-text p { margin: .3rem 0; }
.ing-rows { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.ing-rows legend { font-weight: 600; margin-bottom: .4rem; }
.ing-head, .ing-row { display: grid; grid-template-columns: 5.2rem 6.2rem minmax(0, 1fr) var(--tap) var(--tap); gap: .4rem; align-items: center; }
.scan-fill { display: grid; gap: .5rem; margin-bottom: .4rem; }
/* on a phone the name gets the width: name and the bin on one line, amount and unit under it */
@media (max-width: 520px) {
  .ing-head { display: none; }
  .ing-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--tap); grid-template-areas: "name name pick" "sug sug sug" "amount unit del" "new new new"; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
  .ing-row .ing-pick { grid-area: pick; }
  .ing-in-name { grid-area: name; } .ing-in-amount { grid-area: amount; text-align: left; } .ing-in-unit { grid-area: unit; }
  .ing-row .ing-remove { grid-area: del; } .ing-rows .ing-row .ing-new { grid-area: new; grid-column: 1 / -1; margin-top: 0; } .ing-rows .ing-row .ing-suggest { grid-area: sug; }
}
.ing-head { color: var(--muted); font-size: .85rem; }
.ing-row .ing-new { grid-column: 3; color: var(--coral-text); font-size: .85rem; margin-top: -.2rem; }
.ing-in-amount { text-align: right; }
.filters { display: grid; gap: .4rem; margin: .6rem 0; }
.filters .chips { flex-wrap: wrap; }
.filter-row { display: grid; grid-template-columns: 9rem 1fr; gap: .6rem; align-items: center; }
.filter-label { font-weight: 600; color: var(--muted); }
a.chip { text-decoration: none; }
@media (max-width: 600px) { .filter-row { grid-template-columns: 1fr; gap: .2rem; } }
.fixed-row { padding-right: .4rem; }

/* a code to give another family */
.big-code { font-size: 2rem; font-weight: 700; letter-spacing: .12em; margin: .3rem 0; }

/* reading in from OurGroceries */
.steps { padding-left: 1.4rem; display: grid; gap: .4rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .6rem; }

.list-head { display: flex; align-items: center; gap: .4rem; color: var(--muted); margin-top: -.4rem; }
.list-head a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* the list by category, and the categories in their order */
.group { margin: 1.2rem 0 .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text); }
.cat-row .check { text-decoration: none; }
.btn:disabled { opacity: .35; cursor: default; }

/* the amount of one line: big − and + around the number */
.stepper { display: flex; align-items: center; gap: .8rem; }
.step-field { flex: 1; min-width: 0; }
.step-field input { min-height: 84px; font-size: 1.8rem; font-weight: 700; text-align: center; }
.step-key { flex: none; width: 84px; height: 84px; border-radius: 22px; border: 2px solid var(--line); background: var(--card); font: inherit; font-size: 2.2rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.step-key:active { background: var(--brand-soft); }
.step-field input::placeholder { font-size: 1.05rem; font-weight: 400; }
@media (max-width: 480px) { .step-key { width: 64px; } .stepper { gap: .5rem; } }

/* legal */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.cookie-notice { max-width: 1140px; width: calc(100% - 2.4rem); margin: 1rem auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; background: var(--ink); color: #fff; border-radius: 18px; padding: 1rem 1.2rem; }
.cookie-notice p { margin: 0; flex: 1 1 300px; }
.cookie-notice a { color: #fff; }
.cookie-notice form { margin: 0; }

@media (max-width: 820px) {
  .shop, .recipe-body { grid-template-columns: 1fr; }
  .shop { grid-template-rows: none; grid-template-areas: "add" "list" "common"; }
  h1 { font-size: 1.6rem; }
}
@media (max-width: 520px) {
  .three { grid-template-columns: 1fr 1fr; }
  .who-name { display: none; }
  /* only the icon on a phone; the word stays for screen readers (UX review 18) */
  .who .btn { width: var(--tap); padding: 0; }
  .who-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .help-long { display: none; }
  .help-short { display: inline; }
  /* the week's three buttons on one row (UX review 14) */
  .week-nav { gap: .4rem; }
  .week-nav .btn { padding-inline: .5rem; flex: 1 1 28%; font-size: .95rem; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { min-height: 130px; padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:active, a.tile:active { transform: none; } }
/* links in a list of their own are big enough to hit (review 2026-11-11) */
.food-box li a { display: inline-block; min-height: 44px; padding: .55rem 0; }
.check-line + .hint { margin-top: -.6rem; }
/* a part of a page that folds: the heading is the handle, with an arrow that turns */
.fold > summary { display: flex; align-items: center; gap: .3rem; min-height: var(--tap); cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary .icon { transition: transform .15s; color: var(--muted); }
.fold[open] > summary .icon { transform: rotate(90deg); }
/* choosing an ingredient the family has, from the recipe form */
.pick { width: min(34rem, calc(100vw - 2rem)); max-height: 85vh; border: 2px solid var(--line); border-radius: 18px; padding: 1rem 1.2rem; color: var(--ink); }
.pick::backdrop { background: rgb(16 48 46 / .45); }
.pick h2 { margin-top: 0; }
.pick-list { list-style: none; padding: 0; margin: .8rem 0; display: flex; flex-wrap: wrap; gap: .5rem; max-height: 50vh; overflow-y: auto; }

/* a food from Livsmedelsverket with its values and Använd (2026-11-11) */
.food-row { flex-wrap: wrap; }
.food-row .row-main .food-values, .food-row .row-main .item-from { font-weight: 400; }
.food-row .buttons { margin: 0 0 0 auto; }

/* "Gör så här": one text, or step by step with pictures and films per step (2026-11-11) */
.steps-text p { white-space: pre-line; margin: 0 0 .8rem; }
.cook-text { font-size: 1.3rem; line-height: 1.5; max-width: 46rem; }
.step-text { margin: 0; }
.step-photos { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.step-photos figure { margin: 0; display: grid; gap: .3rem; }
.step-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.cook-media .step-photos { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.step-film { max-height: 360px; margin-top: .4rem; }
/* the page for the steps' pictures and films: each step is a card with its buttons */
.step-media > li { margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 2px solid var(--line); }
.step-media .photo-form { margin: .5rem 0; }
.steps-part, .mode-part { display: grid; gap: .6rem; }
.mode-part legend { font-weight: 600; margin-bottom: .4rem; }
.step-rows { display: grid; gap: .6rem; }
.step-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--tap); gap: .4rem; align-items: end; }
.step-row .step-remove { margin-bottom: .2rem; }
/* a film on its way to the server */
.upload-bar { width: 100%; height: 14px; accent-color: var(--brand); }
.upload-status.error { background: #fbe9e7; color: var(--danger); }
.photo-form .upload-bar, .photo-form .upload-status { flex-basis: 100%; }
/* a PIN is shown as dots without being a password field, so password managers leave it alone */
.pin-mask { -webkit-text-security: disc; }
.pin-form label { display: grid; justify-items: center; gap: .5rem; font-size: 1.2rem; font-weight: 600; }
.pin-form label[hidden] { display: none; }
/* what is left to do for a person, under their row */
.row-todo { margin-top: .5rem; }
/* the receipt after a save */
.done-card { border: 3px solid var(--ok); background: #e7f4ec; border-radius: 18px; padding: 1.4rem 1.2rem; margin: 1rem 0 1.4rem; }
.done-mark svg { width: 72px; height: 72px; color: var(--ok); }
/* on a phone the buttons of a group stand under each other, so they are all as wide (the user, 2026-11-11: they
   came out in different sizes). Filters and the week's arrows (nav) stay side by side. */
@media (max-width: 520px) {
  p.buttons, div.buttons, .actions, .today-card .buttons { display: grid; grid-template-columns: 1fr; }
  p.buttons > .btn, div.buttons > .btn, .actions > .btn, p.buttons > form > .btn, div.buttons > form > .btn, .actions > form > .btn, .row-todo { width: 100%; }
  /* and a button that stands alone on its line is as wide as the others */
  .photo-form > .btn, form.spaced > .btn, form.stack > .btn, p > .btn:only-child, section > form > .btn:only-child, figure > form > .btn:only-child, .head-row > .btn { width: 100%; }
}
/* a column never grows wider than the screen because of what is in it (the shopping list on a phone stuck out) */
.shop > *, .two-cols > * { min-width: 0; }
/* a page's title with its buttons: the title takes the room, so the buttons stand together to the right, with air below */
.head-row { margin-bottom: .9rem; }
.head-row > h1 { flex: 1; margin-bottom: 0; }

/* the list of ingredients on a phone: the search and its hits first, with a button down to "Lägg till" */
.phone-only { display: none; }
@media (max-width: 820px) { .phone-only { display: block; } }
/* the recipe form: the ingredients that match what is typed, under the name */
.ing-suggest { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
/* the new ingredients after a recipe is saved: one card each */
.new-ings { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.new-ing { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.new-ing h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.new-ing form { margin: .4rem 0; }
.new-ing-done { border-color: var(--ok); }

/* A child an adult has not let change things (0035) sees no buttons that would only say no: every form that sends a
   change is hidden but the few the child may use (mayChange in src/accounts/auth.rules.ts, which is what holds; this
   only tidies the page), and so are the links that lead to a page for changing. */
body[data-locked] form[method="post"]:not([action$="/bock"]):not([action^="/meny/onskemal"]):not([action$="/betyg"]):not([action="/logout"]):not([action="/cookies/ok"]):not([action^="/handla/"][action$="/skanna"]):not([action^="/handla/"][action$="/skanna/angra"]) { display: none; }
body[data-locked] a[href="/recept/nytt"], body[data-locked] a[href$="/andra"], body[data-locked] a[href$="/stegbilder"], body[data-locked] a[href="/handla/ny"],
body[data-locked] a[href="/handla/kategorier"], body[data-locked] a[href^="/handla/"][href*="/vara/"], body[data-locked] a[href$="/importerade"],
body[data-locked] a[href^="/handla/"][href$="/om"], body[data-locked] a[href^="/handla/"][href$="/recept"], body[data-locked] a[href^="/meny/slumpa"], body[data-locked] a[href^="/meny/fasta"],
body[data-locked] a[href^="/skanna"], body[data-locked] a[href$="/samma"], body[data-locked] a[href="#ny"], body[data-locked] .choices, body[data-locked] details.change { display: none; }
.locked-note { margin: 0 0 .6rem; }
