/*
 * Plotercafé Recepten — the one stylesheet.
 *
 * Taken from the inventory app (C:\Repos\PlotercafeVoorraad, wwwroot/app.css), whose tokens and
 * components follow its docs/design/STIJLGIDS.md. Only what this app uses is here; add from there
 * rather than inventing. No Bootstrap, no framework, no icon font (CLAUDE.md).
 */

/* ── Fonts (self-hosted IBM Plex, SIL OFL — see fonts/LICENSE.txt) ──────────────────────────── */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-Bold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2'); }

/* ── Tokens (STIJLGIDS §2, §4 of the inventory app) ─────────────────────────────────────────── */
:root {
    --navy: #14213D;
    --bg: #EEF1F5;
    --surface: #FFFFFF;
    --border: #D5DBE5;
    --ink: #14213D;
    --ink-2: #3A4966;
    --ink-3: #5B6B85;
    --ink-4: #8A97AD;
    --ink-on-navy: #AEB8CC;
    --amber: #E9A23B;
    --green: #2A7C4E; /* 5.13:1 for white text */
    --slate: #5B6B85;
    /* Only on the begeleider's money screens (Kostprijs, Kostprijzen), never for guests: a
       deliberate exception to "no red" of the STIJLGIDS (decision 47). Both 4.5:1 or more on white. */
    --warn: #B45309;
    --loss: #B42318;
    --r: 6px;
    --r-card: 8px;
    --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.4; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1:focus { outline: none; }
a { color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 4px solid var(--amber); outline-offset: 3px; }
.eyebrow { font: 500 14px var(--mono); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }
.help { font-size: 19px; color: var(--ink-2); line-height: 1.45; }
.link { font-size: 16px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 4px; }
.muted { color: var(--ink-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Big buttons (sign-in) */
.btn { height: 72px; border-radius: var(--r); font-size: 24px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 28px; text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn[disabled] { opacity: .45; cursor: default; }

/* Blazor's own error bar and validation */
#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--surface); border-top: 4px solid var(--slate); padding: 12px 20px; font-size: 17px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }
.validation-message { color: var(--ink-2); font-size: 15px; }
.invalid { border-color: var(--slate) !important; }

/* ── Sign-in and error pages (MainLayout) ───────────────────────────────────────────────────── */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px 40px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 32px; }
.auth-card .field input { height: 56px; font-size: 20px; }
.notice { border: 2px solid var(--slate); border-radius: var(--r); padding: 12px 16px; font-size: 17px; color: var(--ink-2); background: var(--surface); margin: 0; }
.notice.ok { border-color: var(--green); }
@media (max-width: 640px) {
    .auth { padding: 16px; }
    .auth-card { padding: 24px 20px; }
}

/* ── Forms ──────────────────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=search], .field input:not([type]), .field select, .field textarea {
    font: inherit; font-size: 17px; height: 44px; padding: 0 12px; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%;
}
.field textarea { height: auto; min-height: 80px; padding: 10px 12px; }
.field .hint { font-size: 14px; color: var(--ink-3); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.check.small { font-size: 15px; }
.check.small input { width: 18px; height: 18px; }

/* ── Shell (AppLayout) ──────────────────────────────────────────────────────────────────────── */
/* Sidebar on the left, as in the inventory and budgetboek apps: 232 px with symbol and name from
   1280 px, 68 px with only the symbols from 641 px (title + aria-label name them), the compact bar
   below. The sidebar sticks to the viewport; the page scrolls beside it. minmax(0, 1fr): a wide
   table cannot push the page under or past the sidebar. */
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.shell-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; background: var(--navy); color: #fff; }
.shell-side .brand { font: 500 13px var(--mono); letter-spacing: .08em; color: var(--ink-on-navy); text-transform: uppercase; padding: 0 12px 18px; }
.shell-side a, .shell-side button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r); color: #fff; text-decoration: none; font-family: inherit; font-size: 15px; font-weight: 600; background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.shell-side a:hover, .shell-side button:hover { background: rgba(255,255,255,.1); }
.shell-side a:focus-visible, .shell-side button:focus-visible { outline: 4px solid var(--amber); outline-offset: -4px; }
.shell-side a.active { background: var(--amber); color: var(--navy); }
.shell-side svg { flex: 0 0 auto; }
.shell-side .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-side .spacer { margin: auto 4px 8px; padding-top: 12px; border-bottom: 1px solid rgba(255,255,255,.18); }
.shell-side form { display: block; }
@media (max-width: 1279px) {
    .shell { grid-template-columns: 68px minmax(0, 1fr); }
    .shell-side { padding: 16px 12px; align-items: center; }
    .shell-side .brand, .shell-side .label { display: none; }
    .shell-side a, .shell-side button { justify-content: center; padding: 0; width: 44px; }
    .shell-side .spacer { align-self: stretch; }
}

/* Compact bar on a phone: one line — brand, the current page, Menu. The links fold open under it as
   a list over the page (js/menu.js closes it after a choice). */
.shell-compact { display: none; }
@media (max-width: 640px) {
    .shell { display: flex; flex-direction: column; }
    .shell-side { display: none; }
    .shell-compact { display: flex; align-items: center; gap: 10px; position: relative; min-height: 52px; padding: 0 8px 0 16px; background: var(--navy); color: #fff; }
    .shell-compact .brand { font: 500 12px var(--mono); letter-spacing: .08em; color: var(--ink-on-navy); text-transform: uppercase; white-space: nowrap; }
    .shell-current { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .shell-menu summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--r); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
    .shell-menu summary::-webkit-details-marker { display: none; }
    .shell-menu summary:focus-visible { outline: 4px solid var(--amber); outline-offset: -4px; }
    .shell-menu[open] summary { background: rgba(255,255,255,.14); }
    .shell-menu-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 12px; background: var(--navy); border-top: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 18px rgba(20,33,61,.25); }
    .shell-menu-list a, .shell-menu-list button { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r); color: #fff; text-decoration: none; font-size: 16px; font-weight: 600; background: none; border: none; width: 100%; text-align: left; font-family: inherit; }
    .shell-menu-list a.active { background: var(--amber); color: var(--navy); }
    .shell-menu-list .spacer { height: 1px; margin: 6px 4px; background: rgba(255,255,255,.18); }
    .shell-menu-list form { display: block; }
    .shell-menu-list svg { display: none; }
}
.shell-main { flex: 1; min-width: 0; padding: 24px 28px 48px; max-width: 1180px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.shell-main h1 { font-size: 30px; }
.shell-main h2 { font-size: 21px; }
.shell-main p { margin: 0; }
@media (max-width: 640px) {
    .shell-main { padding: 16px 16px 40px; }
}

/* ── Building blocks ────────────────────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.b { height: 44px; padding: 0 16px; border-radius: var(--r); font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 2px solid var(--navy); background: var(--surface); color: var(--navy); white-space: nowrap; }
.b.primary { background: var(--navy); color: #fff; }
.b.quiet { border-color: var(--border); }
.b[disabled] { opacity: .45; cursor: default; }
.b.small { height: 34px; padding: 0 10px; font-size: 14px; }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { min-width: 180px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; font-size: 16px; }
.table th { text-align: left; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--border); background: #F7F9FB; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { color: var(--ink-3); }
.table a { font-weight: 600; }
.tag { display: inline-block; font: 500 12px var(--mono); letter-spacing: .04em; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); color: var(--ink-2); background: var(--bg); white-space: nowrap; vertical-align: middle; }
.tag.ok { border-color: var(--green); color: var(--green); background: var(--surface); }
.tag.off { border-style: dashed; color: var(--ink-3); }
.table td .tag { margin-left: 8px; }

/* ── Recipes (Recepten, Recept, Recept bewerken, Groepen) ───────────────────────────────────── */
/* Nakijken: a neutral slate tag with a "!" and the word — no red, no alarm (STIJLGIDS §1, §6). */
.tag.review { border: 2px solid var(--slate); color: var(--ink); background: var(--surface); font-weight: 500; }
.recipe-group { display: flex; flex-direction: column; gap: 10px; }
.recipe-group h2 { display: flex; align-items: center; gap: 10px; }

/* Recept: the head as label–value pairs; on a phone the label goes above its value. */
.facts { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px 18px; margin: 0; }
.facts dt { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.facts .notes { white-space: pre-line; display: block; }
.facts-note { flex-basis: 100%; font-size: 15px; color: var(--ink-2); }
@media (max-width: 640px) {
    .facts { grid-template-columns: 1fr; gap: 4px; }
    .facts dd { margin-bottom: 10px; }
}

/* Recept bewerken: a drop-down with its button beside it. */
.field-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.field-row select { flex: 1; min-width: 220px; }
.field input[aria-invalid=true] { border-color: var(--slate); }

/* Groepen: every row is its own small form. */
.table.groups td { vertical-align: middle; }
.table.groups input { font: inherit; font-size: 16px; height: 38px; padding: 0 10px; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%; max-width: 320px; }
.table.groups input[type=number] { max-width: 96px; }
@media (max-width: 640px) {
    .table.groups thead { display: none; }
    .table.groups tr { display: grid; grid-template-columns: 1fr 96px; gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
    .table.groups td { padding: 0; border: 0; }
    .table.groups td:nth-child(3), .table.groups td:nth-child(4) { grid-column: 1 / -1; }
}

/* Recept bewerken: one form, three parts (decision 29). */
.recipe-form { display: flex; flex-direction: column; gap: 18px; }
.recipe-form > .panel { gap: 14px; }

/* A square button with a symbol: omhoog, omlaag, weghalen. The label is in aria-label and title. */
.icon-b { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--navy); }
.icon-b[disabled] { opacity: .35; cursor: default; }
.row-tools { display: flex; gap: 6px; flex: 0 0 auto; }
.line-no { flex: 0 0 auto; min-width: 26px; font: 500 14px var(--mono); color: var(--ink-3); text-align: right; padding-top: 10px; }

/* Dit heb ik nodig: every line a small block, separated by a rule. */
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.line { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.line:first-child { padding-top: 0; }
.line-head { display: flex; gap: 10px; align-items: flex-start; }
.line-head .line-no { padding-top: 12px; }
.line-kind, .line-body, .line-state { margin-left: 36px; }
.line input[type=text], .line input[type=search], .line select, .steps-edit textarea {
    font: inherit; font-size: 16px; height: 44px; padding: 0 12px; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--ink); width: 100%;
}
.line input.line-text { flex: 1; min-width: 0; font-size: 18px; }
.line-kind { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.line-kind .check { font-size: 15px; }
.line-body { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.line-link { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; }
.line-state { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
.line input[aria-invalid=true] { border-color: var(--slate); }

/* The product search: a field with its results as a list of buttons under it. */
.picker { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.picker-list { list-style: none; margin: 0; padding: 0; width: 100%; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); max-height: 320px; overflow-y: auto; }
.picker-list li + li { border-top: 1px solid var(--border); }
.picker-list button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; text-align: left; font-size: 16px; }
.picker-list button:hover { background: var(--bg); }
.picker-list button:focus-visible { outline-offset: -4px; }
.picker-empty { font-size: 15px; }
/* In gram on a line in ml (decision 45), and the window that asks what 1 ml weighs. */
.line-gram { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.dialog-veil { position: fixed; inset: 0; z-index: 40; background: rgba(20,33,61,.45); }
.dialog { position: fixed; z-index: 41; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--surface); border-radius: var(--r-card); box-shadow: 0 12px 32px rgba(20,33,61,.3); }
.dialog h2 { font-size: 20px; margin: 0; }
.dialog p { margin: 0; font-size: 15px; }
.density-list { max-height: 260px; }

/* An amount with its unit behind it. */
.amount { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.amount input[type=text] { width: 120px; }
.amount-unit { font-weight: 600; color: var(--ink-2); min-width: 3ch; }
.amount .validation-message { flex-basis: 100%; }

.paste { border-top: 1px solid var(--border); padding-top: 14px; }

/* Stappen on Recept bewerken. Under each saved step its photo with the buttons (decision 48). */
.steps-edit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps-edit li { display: flex; gap: 10px; align-items: flex-start; }
.step-edit-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.steps-edit textarea { width: 100%; height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; }
.steps-edit .hint { font-size: 14px; color: var(--ink-3); }
/* Under the text of a step: Foto bij deze stap, the timer in minutes (decision 51) and the button
   that takes the minutes from the text. */
.step-edit-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.step-timer-label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); }
.step-timer-label input { width: 76px; height: 34px; padding: 0 8px; font: inherit; font-size: 15px; text-align: right; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.step-edit-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-edit-photo .step-thumb { width: 64px; height: 64px; }

/* A photo in the making (decision 48): the two buttons, and the waiting block that step-photo.js
   fills by itself — a thumbnail, a spinner and a line — while the photo is on its way; the buttons
   step aside for it. Failed: the line only, next to the buttons, so the next try is one tap away.
   Foto nemen only where there is a camera: hidden where the pointer is a mouse. */
.photo-zone { display: flex; flex-direction: column; gap: 10px; }
.photo-zone.over .photo-zone-buttons { outline: 2px dashed var(--navy); outline-offset: 6px; border-radius: var(--r); }
.photo-zone-buttons { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (pointer: fine) { .photo-camera { display: none; } }
.photo-wait:empty { display: none; }
.photo-wait { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--ink-2); }
.photo-wait img { width: 72px; height: 72px; flex: none; object-fit: cover; border: 2px solid var(--navy); border-radius: var(--r); }
.photo-wait.failed { color: var(--ink); font-weight: 500; }
.photo-zone:has(.photo-wait:not(:empty):not(.failed)) > .photo-zone-buttons { display: none; }
.spinner { width: 20px; height: 20px; flex: none; border: 3px solid var(--border); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* The photo of the finished dish on Recept bewerken: the frame and, next to it, the buttons. */
.photo-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.photo-frame { width: 160px; height: 160px; flex: none; border: 2px solid var(--border); border-radius: var(--r); background: var(--bg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame.empty { border-style: dashed; }
.photo-side { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }

/* Recept: Dit heb ik nodig as the guest reads it, and the steps numbered. */
.needs { list-style: none; margin: 0; gap: 0; }
.needs li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
/* The photo of the product next to a linked line; an empty box where the product has none yet
   (to take in the inventory app), nothing at all next to a line of text only. */
.need-thumb { flex: none; width: 40px; height: 40px; border-radius: 4px; overflow: hidden; }
.need-thumb.none { background: var(--bg); border: 1px solid var(--border); }
.need-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.need-thumb.gone { visibility: hidden; }
.need-body { flex: 1; min-width: 0; min-height: 40px; display: flex; flex-wrap: wrap; align-items: baseline; align-content: center; gap: 4px 12px; }
.needs li:first-child { padding-top: 0; }
.needs li:last-child { border-bottom: 0; padding-bottom: 0; }
.need-text { font-size: 20px; }
.need-count { font-size: 15px; color: var(--ink-3); }
.need-count a { color: var(--ink-3); }
.need-state { flex-basis: 100%; display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink-2); }
/* Recept: Kostprijs. Incomplete first, in the notice; the amount large; per line folded away. */
.cost { gap: 10px; }
.cost p { margin: 0; }
.notice.warn { border-color: var(--warn); color: var(--ink); }
.notice.warn strong { color: var(--warn); }
.tag.warn { border: 2px solid var(--warn); color: var(--warn); background: var(--surface); font-weight: 500; }
.tag.loss { border: 2px solid var(--loss); color: var(--loss); background: var(--surface); font-weight: 500; }
.cost-missing ul { margin: 6px 0 0; padding-left: 20px; font-size: 16px; }
.cost-amount { font-size: 28px; font-weight: 600; color: var(--ink); }
.cost-detail { font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.cost-detail .tag { margin: 0 6px; }
.cost-lines summary { cursor: pointer; font-weight: 600; color: var(--navy); min-height: 32px; }
.cost-lines .table { margin-top: 8px; }
.cost-cell { text-align: right; white-space: nowrap; }
/* Recept: the steps. The number is written out (a list marker would sit on the baseline of the
   row, under a photo); number, photo and text start at the top of the row. */
.steps { list-style: none; margin: 0; padding: 18px 20px; gap: 12px; }
.steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 18px; }
.step-no { flex: none; min-width: 26px; padding-top: 3px; font: 500 15px var(--mono); color: var(--ink-3); text-align: right; }
.step-text { white-space: pre-line; min-width: 0; }
.steps-to-take { margin: 0 0 10px; font-size: 15px; }
/* The timer of a step on Recept (decision 51): a small clock with the minutes behind the text. */
.step-timer { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font: 500 14px var(--mono); color: var(--ink-3); white-space: nowrap; vertical-align: middle; }
/* Recept: the photo of the finished dish above the facts, and per step a small one (decision 48);
   a tap shows it big. Without a photo the same room stays empty, so every text starts in the
   same place. */
.recipe-photo { display: block; width: min(100%, 480px); aspect-ratio: 4 / 3; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.recipe-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-photo.gone { display: none; }
.step-thumb { flex: none; width: 40px; height: 40px; border-radius: 4px; overflow: hidden; display: block; }
.step-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.step-thumb.gone { visibility: hidden; }

@media (max-width: 640px) {
    .line-kind, .line-body, .line-state { margin-left: 0; }
    .line-head { flex-wrap: wrap; }
    .line-head .line-text { flex-basis: calc(100% - 36px); }
    .line-head .row-tools { margin-left: 36px; }
    .steps-edit li { flex-wrap: wrap; }
    .steps-edit textarea { flex-basis: calc(100% - 36px); }
    .steps-edit .row-tools { margin-left: 36px; }
}

/* ── Kostprijzen (decision 47): only for the begeleider. The coefficient always with its word next
   to the colour: green voldoende, orange laag, red onder de kostprijs, grey for an upper bound. */
.coef { white-space: nowrap; }
.coef strong { font-size: 20px; }
.coef-word { font-size: 14px; font-weight: 600; }
.coef.ok { color: var(--green); }
.coef.low { color: var(--warn); }
.coef.loss { color: var(--loss); }
.coef.open { color: var(--ink-3); }
.costs-head { gap: 8px; }
.costs-head p { margin: 0; }
.costs-summary { font-size: 18px; }
.costs-summary .coef strong { font-size: 18px; }
.costs-sort { max-width: 220px; }
.table.costs td { vertical-align: middle; }
.table.costs .num { text-align: right; white-space: nowrap; }
.table.costs .tag { margin-left: 8px; }
.table.costs input { font: inherit; font-size: 16px; height: 38px; padding: 0 10px; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.table.costs input[aria-invalid=true] { border-color: var(--loss); }
.costs-price { display: inline-flex; align-items: center; gap: 6px; }
.costs-price input { width: 96px; text-align: right; }
.costs-saved { font-size: 14px; color: var(--green); }
.costs-error { display: block; margin-top: 4px; font-size: 14px; color: var(--loss); }
.costs-suggest-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.costs-suggest-row input { width: 112px; }
/* Not sold (decision 50, only with Ook wat niet verkocht wordt): grey, the name too; on paper the same. */
.table.costs tr.off td, .table.costs tr.off a { color: var(--ink-3); }
.cost-sale { font-size: 16px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.print-only { display: none; }
@media (max-width: 640px) {
    /* A card per dish: name, cost, kassaprijs and coefficient; Voorstel underneath. */
    .table.costs thead { display: none; }
    .table.costs tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--border); }
    .table.costs td { padding: 0; border: 0; text-align: left; }
    .table.costs td.costs-name, .table.costs td.costs-suggest { grid-column: 1 / -1; }
    .table.costs td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); }
    .table.costs .num { text-align: left; }
}
@media print {
    @page { size: A4 landscape; margin: 12mm; }
    body { background: #fff; font-size: 12pt; }
    .shell { display: block; }
    .shell-side, .shell-compact, .no-print, #blazor-error-ui { display: none !important; }
    .shell-main { padding: 0; max-width: none; }
    .print-only { display: inline; }
    .print-title { display: block; font-size: 16pt; font-weight: 600; margin: 0 0 8px; }
    .panel, .table { border-color: #999; }
    .table.costs tr { break-inside: avoid; }
    .recipe-group h2 { break-after: avoid; }
}

/* ── Etiketten ──────────────────────────────────────────────────────────────────────────────── */
/* Frigo or Diepvries: two big buttons, the chosen one amber like the current page in the menu. */
.kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; }
.kind button { min-height: 64px; border: 2px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--navy); font-size: 22px; font-weight: 600; }
.kind button.on { background: var(--amber); border-color: var(--navy); }
.label-form { max-width: 720px; }
.label-form input[type=date], .label-form input[type=number] { max-width: 220px; }
.use-by { font-size: 17px; font-weight: 600; color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--navy); border-radius: var(--r); background: var(--surface); color: var(--navy); font-size: 26px; font-weight: 600; line-height: 1; }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper output { min-width: 3ch; text-align: center; font-size: 24px; font-weight: 600; }
/* What will be on the label when the name was shortened: the lines as the printer gets them. */
.notice .label-lines { display: block; margin-top: 6px; font: 500 16px var(--mono); color: var(--ink); white-space: pre-wrap; }
.notice .label-lines + span { display: block; margin-top: 10px; }
.notice.confirm { display: flex; flex-direction: column; gap: 12px; border-color: var(--navy); color: var(--ink); }
/* The print agent's connection and the live status of a job (as in the inventory app). */
.print-connection { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.print-connection .tag { font-size: 14px; padding: 4px 10px; }
.print-state { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.print-state strong { color: var(--ink); }
.print-state.done strong { color: var(--green); display: inline-flex; align-items: center; gap: 6px; }

/* ── Keuken (KitchenLayout): the tablet screens for the guests, decisions 31–34 ────────────────
   Made for a tablet lying down (±1280 × 800), usable standing. Big type (steps 2.25rem, the list
   1.5rem), everything that can be tapped at least 64 px high, nothing that needs hover. Tone and
   sizes of the inventory app's counting screen (STIJLGIDS): a navy bar on top, navy for the main
   action, green with a tick for what is done.
   The shell is pinned to the window, not sized in viewport units (addition to decision 51):
   Chrome on Android in fullscreen gets 100vh / 100dvh wrong after a pull-to-refresh and cut the
   buttons off at the bottom. js/kitchen-screen.js measures the window into --app-height as a
   second line of defence; without it the insets alone size the shell. The shell is also the
   container the sizes below query (cqh): everything in the kitchen is measured against the shell,
   never against the viewport. Pull-to-refresh is off while the kitchen is open: a guest who
   dragged down reloaded by accident and lost the ticks. */
.kitchen { position: fixed; inset: 0; height: var(--app-height, auto); display: flex; flex-direction: column; background: var(--bg); overflow: hidden; container-type: size; }
html:has(.kitchen), html:has(.kitchen) body { overscroll-behavior-y: none; }
.kitchen-top { flex: none; display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 12px 24px; background: var(--navy); color: #fff; }
.kitchen-top-btn { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 22px; border: 2px solid rgba(255,255,255,.5); border-radius: var(--r); background: none; color: #fff; font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.kitchen-top-btn.light { background: var(--surface); border-color: var(--surface); color: var(--navy); }
/* The camera in the bar (decision 49): only the symbol; a tap folds a small menu open under it over
   a see-through veil. The two panel buttons stay above the veil while it is open, so a tap on them
   closes the menu and opens the panel at once. */
.kitchen-camera { position: relative; flex: none; }
.kitchen-camera-btn { padding: 0 16px; min-width: 64px; }
.kitchen-camera-veil { position: fixed; inset: 0; z-index: 20; }
.kitchen-camera-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 21; display: flex; flex-direction: column; gap: 10px; min-width: 280px; padding: 12px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(20,33,61,.25); }
.kitchen-camera-menu:focus { outline: none; }
.kitchen-camera-menu .kbtn { justify-content: flex-start; }
.kitchen-top-btn.raised { position: relative; z-index: 21; }
.kitchen-title { flex: 1; min-width: 0; font-size: 1.5rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitchen-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.kitchen-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 36px; }
.kitchen-foot { flex: none; display: flex; gap: 16px; padding: 16px 36px 24px; border-top: 1px solid var(--border); background: var(--bg); }
.kitchen-foot > * { flex: 1; }
.kitchen-help { margin: 0; font-size: 1.25rem; color: var(--ink-2); line-height: 1.45; }
.kitchen-heading { font-size: 2rem; margin-bottom: 20px; }
.kbtn { min-height: 80px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 28px; border: 2px solid var(--navy); border-radius: var(--r); background: var(--surface); color: var(--navy); font-size: 1.5rem; font-weight: 600; text-decoration: none; }
.kbtn.primary { background: var(--navy); color: #fff; }
.kbtn.confirm { background: var(--green); border-color: var(--green); color: #fff; }
.kbtn[disabled] { opacity: .35; cursor: default; }
/* A heading with the choice Lijst / Eén voor één / Stappen right of it. */
.kitchen-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 16px; }
.kitchen-head > :first-child { flex: 1; min-width: 0; }
.kitchen-head h1 { margin-bottom: 0; }
.kitchen-subheading { margin: 2px 0 0; font-size: 1.125rem; color: var(--ink-2); line-height: 1.3; }
.kitchen-view { flex: none; display: inline-flex; border: 2px solid var(--navy); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.kitchen-view-btn { min-height: 60px; display: inline-flex; align-items: center; gap: 10px; padding: 0 22px; color: var(--navy); font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.kitchen-view-btn.on { background: var(--navy); color: #fff; }
.kitchen-view-btn:focus-visible { outline-offset: -4px; }
@media (max-width: 640px) {
    .kitchen-top { padding: 8px 12px; gap: 10px; }
    .kitchen-top-btn { padding: 0 14px; }
    .kitchen-scroll { padding: 20px 16px; }
    .kitchen-foot { padding: 12px 16px 16px; gap: 10px; }
}

/* Keuken: a heading per group and big tiles. */
.kitchen-group + .kitchen-group { margin-top: 32px; }
.kitchen-group h2 { font-size: 1.5rem; color: var(--ink-2); margin-bottom: 14px; }
.kitchen-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.kitchen-tile { min-height: 120px; display: flex; align-items: center; padding: 20px 24px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); color: var(--ink); font-size: 1.625rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.kitchen-tile:active { border-color: var(--navy); background: #F2F4F8; }
/* With the photo of the finished dish (decision 48): the photo above, the name under it. */
.kitchen-tile.with-photo { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.kitchen-tile.with-photo .kitchen-tile-photo { display: block; aspect-ratio: 16 / 10; background: var(--bg); }
.kitchen-tile.with-photo .kitchen-tile-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kitchen-tile.with-photo .kitchen-tile-name { padding: 14px 20px 18px; }
.kitchen-tile:not(.with-photo) .kitchen-tile-photo { display: none; }

/* Dit heb ik nodig: a row is the photo of the ingredient (a button of its own: opens it big) and
   next to it the tick box with the text (ticks). Without a photo the same room stays empty, in the
   colour of the row, inside the tick button — every text starts in the same place. */
.kitchen-needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.kitchen-need-row { min-height: 76px; display: flex; align-items: stretch; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); color: var(--ink); text-decoration: none; }
.kitchen-need-row.on { border-color: var(--green); }
.kitchen-need { flex: 1; min-width: 0; display: flex; align-items: center; padding: 10px 20px 10px 0; color: var(--ink); font-size: 1.5rem; line-height: 1.3; text-align: left; }
.kitchen-thumb { flex: none; align-self: center; width: 64px; height: 64px; margin-left: 4px; border-radius: 5px; overflow: hidden; }
.kitchen-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* No photo: only the width is kept free, so the row is as high as one with a photo. A photo that
   did not come (the row marks it gone) keeps its room and can no longer be tapped. */
.kitchen-needs .kitchen-thumb.empty { height: 0; }
.kitchen-thumb.gone { visibility: hidden; }
.kitchen-box { flex: none; width: 44px; height: 44px; margin: 0 18px 0 14px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink-3); border-radius: var(--r); background: var(--surface); color: #fff; }
.kitchen-need-row.on .kitchen-box { background: var(--green); border-color: var(--green); }
/* Lying down on the tablet the list screen fills the width in two columns, top to bottom, left
   first — a guest who does not scroll still sees every line. The panel on a step stays one column. */
@media (min-width: 900px) and (orientation: landscape) {
    .kitchen-list .kitchen-needs { display: block; columns: 2; column-gap: 20px; max-width: none; }
    .kitchen-list .kitchen-needs li { break-inside: avoid; margin-bottom: 10px; }
    /* Twelve lines (six rows) fit on 1280 × 800 under the heading with Lijst / Eén voor één — a
       little less air, the same letters. */
    .kitchen-list, .kitchen-prepare { padding-top: 16px; padding-bottom: 16px; }
    .kitchen-list .kitchen-head, .kitchen-prepare .kitchen-head { margin-bottom: 12px; }
    .kitchen-list .kitchen-need-row { min-height: 68px; }
    .kitchen-list .kitchen-need { padding-top: 8px; padding-bottom: 8px; }
    .kitchen-list .kitchen-thumb { width: 60px; height: 60px; margin-left: 2px; }
}

/* The photo big: in the middle, as big as fits, over the screen blurred and dimmed — a plain dark
   layer where the browser cannot blur — with the line under it once more. */
.kitchen-lightbox { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; background: rgba(20,33,61,.9); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .kitchen-lightbox { background: rgba(20,33,61,.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.kitchen-lightbox-photo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.kitchen-lightbox-photo img { display: block; height: min(58vh, 92vw); height: min(58cqh, 92cqw); width: auto; max-width: 92vw; max-width: 92cqw; object-fit: contain; border-radius: var(--r-card); }
.kitchen-lightbox-photo figcaption { max-width: 92vw; max-width: 92cqw; color: #fff; font-size: min(2.5rem, 5vh); font-size: min(2.5rem, 5cqh); font-weight: 600; line-height: 1.2; text-align: center; }
.kitchen-lightbox .kbtn { flex: none; min-width: 280px; border-color: var(--surface); }

/* Eén voor één: one line of Dit heb ik nodig per screen. The photo takes the room that is left
   between the count and the line; everything fits on the tablet without scrolling. Swiping
   sideways is Vorige / Volgende (js/swipe.js), so the browser only pans up and down here. */
.kitchen-prepare { display: flex; flex-direction: column; touch-action: pan-y; }
.kitchen-prepare .kitchen-head, .kitchen-prepare .kitchen-progress { flex: none; }
.kitchen-prepare .kitchen-progress { margin-bottom: 20px; }
.kitchen-photo { flex: 1 1 0; min-height: 160px; max-width: 100%; align-self: center; display: flex; align-items: center; justify-content: center; }
.kitchen-photo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--r-card); }
/* No photo, or one that did not come (the page marks the box empty): foto ontbreekt. */
.kitchen-photo-none { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-4); }
.kitchen-photo-none span { color: var(--ink-3); font-size: 1.25rem; }
.kitchen-photo.empty { aspect-ratio: 4 / 3; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); }
.kitchen-photo.empty .kitchen-photo-none { display: flex; }
.kitchen-photo.empty img { display: none; }
.kitchen-prepare-text { flex: none; margin: 20px 0 0; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: min(3rem, 6vh); font-size: min(3rem, 6cqh); font-weight: 600; line-height: 1.2; text-align: center; }
.kitchen-prepare-text.long { font-size: min(2.25rem, 4.5vh); font-size: min(2.25rem, 4.5cqh); }
.kitchen-prepare-foot > .main { flex: 1.6; }
/* The status button (decision 44) shows what is true: white with an empty box, or green with a
   tick. After a tick a bar runs out along its bottom edge (KitchenTimings.Advance, set inline),
   then the next line comes. After every new line the three buttons are grey for a moment
   (KitchenTimings.Lock) and colour in. */
.kitchen-status { position: relative; overflow: hidden; border-color: var(--ink); color: var(--ink); }
.kitchen-status .kitchen-box { width: 56px; height: 56px; margin: 0; }
.kitchen-status.on { background: var(--green); border-color: var(--green); color: #fff; }
.kitchen-status.on .kitchen-box { background: var(--green); border-color: #fff; }
.kitchen-status-run { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: rgba(255,255,255,.85); transform-origin: left; animation: kitchen-run linear forwards; }
@keyframes kitchen-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.kitchen-prepare-foot .kbtn { transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease, opacity 300ms ease; }
.kitchen-prepare-foot .kbtn[disabled] { opacity: 1; background: #E9EDF2; border-color: #C9D1DC; color: #8A97AB; }
.kitchen-prepare-foot .kbtn[disabled] .kitchen-box { background: #E9EDF2; border-color: #C9D1DC; }
@media (max-width: 640px) {
    .kitchen-prepare-foot { flex-wrap: wrap; }
    .kitchen-prepare-foot > .main { order: -1; flex: 1 1 100%; }
    .kitchen-prepare-foot .kbtn { min-height: 64px; padding: 0 16px; }
}

/* One step per screen: the text in the middle of the room between the bar and the buttons, each
   line itself centred too (decision 44). */
.kitchen-step { display: flex; flex-direction: column; }
.kitchen-step-body { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; }
.kitchen-step-count { font-size: 2rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.kitchen-progress { height: 16px; margin-bottom: 28px; border-radius: 8px; background: var(--border); overflow: hidden; }
.kitchen-progress > span { display: block; height: 100%; border-radius: 8px; background: var(--navy); }
/* About 1.5 times the old size; a long step a size smaller (the page sets long, longer, longest), and on a
   low screen smaller with the height — never cut off, the page scrolls as a last resort. The height
   is the shell's (cqh), with the viewport (vh) only for a browser without container units. */
.kitchen-step-text { margin: 0; max-width: 34ch; text-align: center; font-size: min(3.25rem, 6.5vh); font-size: min(3.25rem, 6.5cqh); font-weight: 500; line-height: 1.4; white-space: pre-line; }
.kitchen-step-text.long { max-width: 40ch; font-size: min(2.75rem, 5.5vh); font-size: min(2.75rem, 5.5cqh); }
.kitchen-step-text.longer { max-width: 40ch; font-size: min(2.5rem, 5vh); font-size: min(2.5rem, 5cqh); }
.kitchen-step-text.longest { max-width: 40ch; font-size: min(2.125rem, 4.25vh); font-size: min(2.125rem, 4.25cqh); }
/* A step with a photo (decisions 48, 49): standing, the photo above the text, at most about 45 %
   of the height; lying down (≥ 900 px) the photo fills the whole height between the count and
   the buttons, at most half the width (a square or standing photo fills the height, a lying one
   is half the screen wide), and the text gets the rest. No band under the photo. A tap shows it
   big. The body may shrink there, so the photo has a height to fill; the text centres itself with
   auto margins, so a long one starts at the top and scrolls instead of being cut off above. */
.kitchen-step-body.with-photo { flex-direction: column; gap: 20px; }
.kitchen-step-photo { flex: none; display: block; max-width: 100%; max-height: 45vh; max-height: 45cqh; border-radius: var(--r-card); overflow: hidden; }
.kitchen-step-photo img { display: block; max-width: 100%; max-height: 45vh; max-height: 45cqh; width: auto; height: auto; object-fit: contain; border-radius: var(--r-card); }
.kitchen-step-photo.gone { display: none; }
@media (min-width: 900px) {
    .kitchen-step-body.with-photo { flex: 1 1 auto; min-height: 0; flex-direction: row; align-items: stretch; gap: 36px; }
    .kitchen-step-body.with-photo .kitchen-step-photo { flex: 0 1 auto; max-width: 50%; max-height: none; min-height: 0; display: flex; align-items: center; justify-content: center; }
    .kitchen-step-body.with-photo .kitchen-step-photo img { height: 100%; max-height: none; width: auto; max-width: 100%; }
    .kitchen-step-body.with-photo .kitchen-step-text { flex: 1 1 50%; max-width: none; margin: auto 0; }
}
/* Where the photo will come, while one taken here is on its way (decision 49): the waiting block
   of js/step-photo.js, above the text, with a bigger thumbnail than on Recept bewerken. */
.kitchen-step-body:has(.kitchen-step-wait:not(:empty)) { flex-direction: column; gap: 24px; }
.kitchen-step-wait { flex: none; justify-content: center; font-size: 1.25rem; }
.kitchen-step-wait img { width: 160px; height: 160px; }
.kbtn.small { min-height: 56px; padding: 0 20px; font-size: 1.125rem; }

/* The timer of a step (decision 51). Under the text one big button, filled by js/kitchen-timer.js:
   Timer 15 min starten, Timer stoppen, or Stoppen in the warning colour once it has run out. In
   the navy bar a chip per running timer (Stap 4 · 12:34, a link to the step); run out it is big,
   in the warning colour — the one Kostprijzen already has, no new one — and pulses until it is
   stopped. Run out while the page may not make sound yet (no tap since the reload), a second line
   under Klaar! says Tik voor geluid. On Klaar a line says which timers of this recipe still run.
   Empty, none of them takes any room. */
.kitchen-step-timer { flex: none; display: flex; justify-content: center; padding: 12px 0 20px; }
.kitchen-step-timer:empty { display: none; }
.kitchen-timer-btn { min-width: 360px; }
.kitchen-timer-btn.running { border-color: var(--navy); background: #EEF1F7; }
.kitchen-timer-btn.due { background: var(--warn); border-color: var(--warn); color: #fff; }
.kitchen-timers { flex: none; display: flex; align-items: center; gap: 10px; }
.kitchen-timers:empty { display: none; }
.kitchen-timer-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 16px; border-radius: 28px; background: var(--surface); color: var(--navy); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.kitchen-timer-chip.due { min-height: 64px; padding: 0 22px; background: var(--warn); color: #fff; font-size: 1.5rem; animation: kitchen-timer-pulse 700ms ease-in-out infinite alternate; }
.kitchen-timer-chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.kitchen-timer-hint { font-size: .75em; font-weight: 600; }
.kitchen-timer-hint:empty { display: none; }
@keyframes kitchen-timer-pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.kitchen-timer-notice { flex: none; font-weight: 600; color: var(--warn); }
.kitchen-timer-notice:empty { display: none; }
@media (max-width: 900px) {
    .kitchen-timer-btn { min-width: 0; width: 100%; }
    .kitchen-timer-chip { min-height: 48px; padding: 0 12px; font-size: 1.125rem; }
}

/* Klaar, and a recipe that is not there. */
.kitchen-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 36px; text-align: center; }
.kitchen-center h1 { font-size: 3rem; }
.kitchen-center .kbtn { min-width: 320px; }
.kitchen-done-mark { width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: #fff; }
/* Klaar with the photo of the finished dish, as big as fits (decisions 48, 49): the photo takes
   the room the heading, the line and the button leave. */
.kitchen-done.with-photo { justify-content: flex-start; gap: 16px; }
.kitchen-done.with-photo h1 { font-size: 2.25rem; }
.kitchen-done-photo { flex: 1 1 auto; min-height: 0; max-width: 100%; display: flex; align-items: center; justify-content: center; }
.kitchen-done-photo img { display: block; height: 100%; max-width: 100%; width: auto; object-fit: contain; border-radius: var(--r-card); }
.kitchen-done .kitchen-step-wait { justify-content: center; }

/* Dit heb ik nodig on a step: slides open from the right over the step and shut again. It stays in
   the page; shut it is hidden only after sliding out, and inert. */
.kitchen-veil { position: fixed; inset: 0; z-index: 20; background: rgba(20,33,61,.45); opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.kitchen-veil.open { opacity: 1; pointer-events: auto; }
.kitchen-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: 40%; min-width: 440px; display: flex; flex-direction: column; background: var(--bg); box-shadow: -8px 0 24px rgba(20,33,61,.25); transform: translateX(100%); visibility: hidden; transition: transform 250ms ease, visibility 0s linear 250ms; }
.kitchen-panel.open { transform: none; visibility: visible; transition: transform 250ms ease; }
.kitchen-panel:focus { outline: none; }
.kitchen-panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 88px; padding: 12px 20px; background: var(--navy); color: #fff; }
.kitchen-panel-head h2 { font-size: 1.5rem; }
.kitchen-panel .kitchen-scroll { padding: 20px; }
/* Overzicht is wider: the steps are longer than the lines. */
.kitchen-panel.wide { width: 55%; min-width: 520px; }
@media (max-width: 900px) {
    .kitchen-panel, .kitchen-panel.wide { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .kitchen-veil, .kitchen-panel, .kitchen-panel.open, .kitchen-prepare-foot .kbtn { transition: none; }
    .kitchen-status-run, .kitchen-timer-chip.due { animation: none; }
}

/* Stappen and Overzicht: every step numbered under each other, one column, smaller than on the step
   screen; the step shown is marked. A step is a link to it. */
.kitchen-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 1000px; }
.kitchen-steps-row { display: flex; align-items: flex-start; gap: 18px; padding: 14px 20px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); color: var(--ink); font-size: 1.375rem; line-height: 1.4; text-decoration: none; }
.kitchen-steps-row.on { border-color: var(--navy); background: #EEF1F7; box-shadow: inset 6px 0 0 var(--navy); }
.kitchen-steps-number { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--border); color: var(--ink); font-weight: 700; }
.kitchen-steps-row.on .kitchen-steps-number { background: var(--navy); color: #fff; }
/* The small photo of the step (decision 48); without one the same width stays free. */
.kitchen-steps-thumb { flex: none; width: 64px; height: 64px; border-radius: 5px; overflow: hidden; }
.kitchen-steps-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kitchen-steps-thumb.empty { height: 0; }
.kitchen-steps-thumb.gone { visibility: hidden; }
.kitchen-steps-text { flex: 1; min-width: 0; padding-top: 4px; white-space: pre-line; }

/* Etiketten in de keuken (decision 53): Etiket kiezen and Etiket, as on an ordering kiosk. Lying
   down (the tablet, 1280 × 800) neither screen ever scrolls up and down: the tiles are a fixed grid
   of 4 × 2 that fills what is left, and the rows of Etiket shrink before they would run off the
   screen. Standing or narrow the grid is 2 × 4 and Etiket may scroll. Only buttons, never a field.
   A chosen button (a group, Frigo, a day, a quantity) is navy, like the chosen view. */
.kbtn.on { background: var(--navy); color: #fff; }
.kitchen-printer-off { flex: none; padding: 6px 12px; border: 2px dashed var(--amber); border-radius: var(--r); color: #fff; font: 500 1rem var(--mono); white-space: nowrap; }
.kitchen-pick { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 16px 36px 20px; touch-action: pan-y; }
.kitchen-pick-groups { flex: none; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.kitchen-pick-groups .kbtn { flex: none; min-height: 72px; white-space: nowrap; }
.kitchen-pick-tiles { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kitchen-pick-tile { min-width: 0; min-height: 0; justify-content: center; padding: 16px; overflow: hidden; overflow-wrap: break-word; text-align: center; font-size: min(2rem, 5vh); font-size: min(2rem, 5cqh); }
.kitchen-pick-tile.long { font-size: min(1.625rem, 4vh); font-size: min(1.625rem, 4cqh); }
.kitchen-pick-tile.longer { padding: 12px; font-size: min(1.375rem, 3.5vh); font-size: min(1.375rem, 3.5cqh); }
.kitchen-pick-tile .kitchen-tile-name { min-width: 0; max-width: 100%; }
.kitchen-pick-tile.with-photo .kitchen-tile-photo { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
.kitchen-pick-tile.with-photo .kitchen-tile-name { flex: none; padding: 10px 14px 12px; line-height: 1.15; font-size: min(1.375rem, 3.4vh); font-size: min(1.375rem, 3.4cqh); }
.kitchen-pick-tile.with-photo.long .kitchen-tile-name { font-size: min(1.125rem, 2.8vh); font-size: min(1.125rem, 2.8cqh); }
.kitchen-pick-tile.with-photo.longer .kitchen-tile-name { font-size: min(1rem, 2.4vh); font-size: min(1rem, 2.4cqh); }
.kitchen-pick-pager { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kitchen-pick-pager .kbtn { min-height: 64px; min-width: 200px; }
.kitchen-pick-dots { display: flex; align-items: center; gap: 12px; }
.kitchen-pick-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--border); }
.kitchen-pick-dot.on { background: var(--navy); }

.kitchen-label { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: min(12px, 1.5vh); gap: min(12px, 1.5cqh); padding: min(16px, 2vh) 36px; padding: min(16px, 2cqh) 36px; overflow: hidden; }
.kitchen-label-title { flex: none; margin: 0; line-height: 1.15; overflow-wrap: break-word; font-size: min(2.25rem, 5vh); font-size: min(2.25rem, 5cqh); }
.kitchen-label-title.long { font-size: min(1.75rem, 4vh); font-size: min(1.75rem, 4cqh); }
.kitchen-label-title.longer { font-size: min(1.375rem, 3.2vh); font-size: min(1.375rem, 3.2cqh); }
.kitchen-label-fit { flex: none; margin: 0; font-size: 1.0625rem; color: var(--ink-2); }
.kitchen-label-fit span { font-family: var(--mono); color: var(--ink); }
.kitchen-label-kind { flex: 0 1 80px; min-height: 56px; display: flex; gap: 12px; }
.kitchen-label-kind .kbtn { flex: 1; min-height: 0; }
.kitchen-label-row { flex: 0 1 88px; min-height: 60px; display: grid; grid-template-columns: 13rem auto minmax(0, 1fr); align-items: stretch; gap: 0 20px; }
.kitchen-label-name { align-self: center; font-size: 1.5rem; font-weight: 600; }
.kitchen-label-stepper { display: flex; align-items: stretch; gap: 12px; }
.kitchen-label-stepper .kbtn { min-height: 0; width: 104px; padding: 0; font-size: 2.5rem; line-height: 1; }
.kitchen-label-value { min-width: 12rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.kitchen-label-value strong { font-weight: 700; font-variant-numeric: tabular-nums; font-size: min(2rem, 4.5vh); font-size: min(2rem, 4.5cqh); }
.kitchen-label-value span { font-size: 1.125rem; color: var(--ink-2); }
.kitchen-label-value span:empty { display: none; }
.kitchen-label-choices { display: flex; align-items: stretch; gap: 12px; }
.kitchen-label-choices .kbtn { min-height: 0; padding: 0 22px; flex-direction: column; gap: 0; white-space: nowrap; }
.kitchen-label-choices .kbtn small { font-size: 1rem; font-weight: 500; }
.kitchen-label-choices.wide { grid-column: 2 / -1; }
.kitchen-label-choices.wide .kbtn { flex: 1; padding: 0 8px; }
.kitchen-label-use-by { align-self: center; font-size: 1.25rem; color: var(--ink-2); }
.kitchen-label-use-by strong { color: var(--ink); white-space: nowrap; }
.kitchen-print-state { flex: 2; min-height: 80px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; font-size: 1.375rem; }
.kitchen-print-state .b { min-height: 56px; padding: 0 24px; font-size: 1.25rem; }
@media (max-width: 899px), (orientation: portrait) {
    .kitchen-pick { padding: 12px 16px 16px; gap: 12px; }
    .kitchen-pick-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .kitchen-pick-pager .kbtn { min-width: 0; padding: 0 16px; }
    .kitchen-label { padding: 16px; gap: 14px; overflow-y: auto; }
    .kitchen-label-kind, .kitchen-label-row { flex: none; }
    .kitchen-label-kind { height: 72px; }
    .kitchen-label-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .kitchen-label-stepper { height: 80px; }
    .kitchen-label-value { flex: 1; min-width: 0; }
    .kitchen-label-choices { flex-wrap: wrap; }
    .kitchen-label-choices .kbtn { flex: 1 1 30%; min-height: 72px; }
    .kitchen-label-choices.wide { grid-column: auto; }
    .kitchen-label-foot { flex-wrap: wrap; }
}
.kitchen-label-value strong { white-space: nowrap; }
@media (max-width: 640px) {
    .kitchen-printer-off { padding: 4px 8px; font-size: .8125rem; white-space: normal; }
    .kitchen-label-stepper .kbtn { width: 72px; }
    .kitchen-label-foot .kitchen-print-state { flex: 1 1 100%; }
}
