/* Menus: the costed menu (docs/claude/menu-parsing-model.md).
   One colour language: green verified / from your invoices, amber estimate, grey old invoice price, red no price.
   Colour never stands alone: every pill and bubble also has words. */
:root {
  --ok-ink: #1F6B44; --ok-bg: #E4F3EA; --ok-edge: #9CD3B3;
  --est-ink: #7A4A00; --est-bg: #FFF2D9; --est-edge: #E6B55A;
  --old-ink: #4D5870; --old-bg: #EEF1F4; --old-edge: #B9C1CE;
  --no-ink: #A61E30; --no-bg: #FCE8EB; --no-edge: #EBA3AE;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ok-ink: #7FD6A5; --ok-bg: #173226; --ok-edge: #2F6B4B;
    --est-ink: #F2C46D; --est-bg: #3A2C12; --est-edge: #7A5A1E;
    --old-ink: #B4BCCD; --old-bg: #262D3B; --old-edge: #465066;
    --no-ink: #F59AA7; --no-bg: #3A1A20; --no-edge: #7A3542;
  }
}
:root[data-theme="dark"] {
  --ok-ink: #7FD6A5; --ok-bg: #173226; --ok-edge: #2F6B4B;
  --est-ink: #F2C46D; --est-bg: #3A2C12; --est-edge: #7A5A1E;
  --old-ink: #B4BCCD; --old-bg: #262D3B; --old-edge: #465066;
  --no-ink: #F59AA7; --no-bg: #3A1A20; --no-edge: #7A3542;
}

/* Pills: how sure a cost is */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid; white-space: nowrap; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.verified { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-edge); }
.pill.estimate { color: var(--est-ink); background: var(--est-bg); border-color: var(--est-edge); }
.pill.needs_info { color: var(--no-ink); background: var(--no-bg); border-color: var(--no-edge); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.verified { background: var(--ok-ink); } .dot.estimate { background: var(--est-edge); } .dot.needs_info { background: var(--no-ink); }

/* Bubbles: ingredients and plates, the thread between invoices and menus */
.bubble { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 14px; line-height: 1.4;
  border: 1px solid var(--edge); background: var(--paper); color: var(--ink); text-decoration: none; min-height: 0; cursor: pointer; }
a.bubble:hover, button.bubble:hover { filter: brightness(.97); text-decoration: underline; }
.bubble.invoice, .bubble.plate.verified, .bubble.sub.verified { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-edge); }
.bubble.estimate, .bubble.plate.estimate, .bubble.sub.estimate { color: var(--est-ink); background: var(--est-bg); border: 1px dashed var(--est-edge); }
.bubble.old { color: var(--old-ink); background: var(--old-bg); border-color: var(--old-edge); }
.bubble.old::before { content: "◷"; font-size: 12px; }
.bubble.none, .bubble.plate.needs_info, .bubble.sub.needs_info { color: var(--no-ink); background: var(--no-bg); border-color: var(--no-edge); }
.bubble.plain { cursor: default; color: var(--ink-soft); }
/* Your recipes: a solid outline in the level's colour, so a recipe reads differently from a bought ingredient */
.bubble.recipe { font-weight: 600; border-width: 2px; }
.bubble.recipe.verified { color: var(--ok-ink); background: var(--paper); border-color: var(--ok-edge); }
.bubble.recipe.estimate { color: var(--est-ink); background: var(--paper); border-color: var(--est-edge); border-style: solid; }
.bubble.recipe.needs_info { color: var(--no-ink); background: var(--paper); border-color: var(--no-edge); }
.bubble.you { color: var(--ok-ink); background: var(--ok-bg); border-color: var(--ok-edge); }
.ballpark { margin-top: 12px; padding: 12px; border-radius: var(--radius); border: 1px dashed var(--est-edge); background: var(--est-bg); }
.ballpark h3 { margin: 0 0 4px; font-size: 15px; color: var(--est-ink); }
.ballpark p { margin: 4px 0; }
.recipe-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto minmax(0, 1fr); }
.recipe-page .panel label + label { margin-top: 12px; }
.recipe-page .panel .recipe-meta > label { margin-top: 0; }
.yield-unit { width: 180px !important; text-align: left !important; }
.small-price input { width: 84px; }
@container (max-width: 640px) { .recipe-row { grid-template-columns: 1fr auto; } }
@media (max-width: 640px) { .recipe-row { grid-template-columns: 1fr auto; } .recipe-row > .hint.small { display: none; } }
.bubble-cost { font-variant-numeric: tabular-nums; opacity: .85; }
.bubbles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.legend .bubble { cursor: default; }

/* Cost check summary */
.cost-check { padding: 16px 20px; margin: 16px 0; }
.cost-check-counts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cost-check-counts h2 { margin: 0 8px 0 0; }
.cost-check p { margin: 10px 0 0; max-width: 760px; }

.menu-row { grid-template-columns: minmax(0, 1fr) auto; }
.menu-pages { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.menu-pages li { display: grid; gap: 4px; width: 120px; font-size: 14px; }
.menu-pages img, .page-file { width: 120px; height: 150px; object-fit: cover; object-position: top; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--walk-in); }
.page-file { display: grid; place-items: center; color: var(--ink-soft); }
.menu-pages .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-form { display: flex; gap: 8px; flex: 1 1 320px; align-items: center; }
.link-form button { white-space: nowrap; }
.menu-rename { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 4px; }
.menu-rename input { font-size: 20px; min-width: 0; flex: 1 1 260px; }
.page-head h1 .link { font-size: 13px; font-weight: 400; vertical-align: middle; }
.menu-questions-panel summary { cursor: pointer; }
.menu-questions-panel summary h2 { display: inline; font-size: 18px; }
.menu-questions { padding-left: 20px; display: grid; gap: 16px; }
.menu-questions p { margin: 0 0 6px; }
.chips button { border-radius: 999px; min-height: 40px; }
.chips button.chosen { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.targets { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: end; padding: 12px 16px; margin: 16px 0; position: sticky; top: 0; z-index: 5; }
.target { flex: 1 1 180px; font-weight: 400; }
.target input { padding: 0; min-height: 32px; accent-color: var(--ink); }
.targets .saved { flex: 1 1 100%; font-size: 14px; }
.view-toggle { display: inline-flex; border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.view-toggle button { border: 0; border-radius: 0; }
.view-toggle button.active { background: var(--ink); color: var(--paper); font-weight: 600; }

/* As the menu: each section lines up like a costing sheet */
.menu-section { padding: 16px 20px 8px; margin-bottom: 16px; }
.menu-section > h2 { margin: 0 0 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 18px; }
.section-note { margin: 0 0 8px; }
.item-grid { display: grid; grid-template-columns: minmax(180px, 1fr) 82px 100px 72px 76px 118px; gap: 4px 12px; align-items: baseline; }
.item-grid.head { font-size: 13px; color: var(--ink-soft); font-weight: 600; padding: 6px 0; border-bottom: 2px solid var(--edge); }
.menu-item { padding: 14px 0 12px; border-bottom: 1px solid var(--edge); }
.menu-item:last-of-type { border-bottom: 0; }
.menu-item.estimate { box-shadow: inset 3px 0 0 var(--est-edge); padding-left: 12px; margin-left: -12px; }
.menu-item.needs_info { box-shadow: inset 3px 0 0 var(--no-ink); padding-left: 12px; margin-left: -12px; }
.menu-item.verified { box-shadow: inset 3px 0 0 var(--ok-ink); padding-left: 12px; margin-left: -12px; }
.item-title { border: 0; background: none; padding: 0; min-height: 0; font-weight: 700; font-size: 17px; color: var(--ink); text-align: left;
  text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 4px; }
.item-title:hover { text-decoration-color: var(--ink); }
.item-name .tags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 8px; max-width: 100%; }
.item-name .tag { border: 1px solid var(--edge); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.description { margin: 2px 0 0; }
.item-grid.variant { padding: 2px 0; }
.variant-label { color: var(--ink-soft); padding-left: 16px; font-size: 15px; }
.num.strong { font-weight: 700; }
.check-cell { justify-self: start; }
.item-foot { margin-top: 8px; display: grid; gap: 6px; }
.why-line { margin: 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.why-line.estimate .why { color: var(--est-ink); }
.why-line.needs_info .why { color: var(--no-ink); }
.why { color: var(--est-ink); }
.nudge { font-weight: 600; }
.over { color: var(--red-pen); font-weight: 700; white-space: nowrap; }
.addons { margin-top: 6px; }
.addons h3 { font-size: 14px; color: var(--ink-soft); margin: 4px 0; }
.item-grid.addon { padding: 2px 0; }

/* Table */
.table-wrap { overflow-x: auto; }
.cost-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.cost-table th, .cost-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--edge); vertical-align: top; }
.cost-table th.num, .cost-table td.num { text-align: right; }
.cost-table th button { font-weight: 700; text-decoration: none; }
.cost-table tr.estimate td:first-child { box-shadow: inset 3px 0 0 var(--est-edge); }
.cost-table tr.needs_info td:first-child { box-shadow: inset 3px 0 0 var(--no-ink); }
.cost-table tr.verified td:first-child { box-shadow: inset 3px 0 0 var(--ok-ink); }
.cost-table .why { display: block; margin-top: 4px; max-width: 260px; }
.cost-table.compact { margin-top: 12px; }
.how { white-space: nowrap; font-weight: 600; }

/* The plate sheet */
.sheet { width: min(720px, 100%); }
.plate-head h2 { margin-bottom: 2px; }
.plate-cost { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.num.big { font-size: 28px; font-weight: 700; }
/* A drink sold in several sizes: one chip per size in the header, and a table of sizes under the drink */
.size-chips { gap: 8px; }
.size-chip { border: 1px solid var(--edge); border-radius: 999px; padding: 4px 10px; font-size: 15px; white-space: nowrap; }
.size-chip b { font-weight: 700; }
.size-chip.needs_info { border-style: dashed; }
.by-pick { margin: 2px 0; }
.drink-kind { margin: 4px 0 6px; font-size: 14px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
table.sizes { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 15px; }
table.sizes th, table.sizes td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--edge); vertical-align: top; }
table.sizes thead th { font-size: 13px; color: var(--ink-soft); font-weight: 600; border-top: 0; }
table.sizes .num { text-align: right; white-space: nowrap; }
table.sizes .link-form input { width: 5em; }
@media (max-width: 560px) {
  table.sizes th, table.sizes td { padding: 6px 3px; font-size: 14px; }
  table.sizes td:nth-child(2) .hint { display: block; }
}
.lines { margin-top: 16px; }
.lines h3 { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.lines h3 .hint { font-weight: 400; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 6px 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--edge); }
.line-name .hint, .line-name .small { margin-top: 2px; }
.line-portion { display: grid; gap: 4px; justify-items: end; }
.portion-input { display: inline-flex; gap: 6px; align-items: center; }
.portion-input input { width: 76px; min-height: 40px; text-align: right; }
.portion-input select { width: auto; min-height: 40px; padding: 4px 6px; }
.line-cost { text-align: right; font-weight: 700; padding-top: 8px; }
.line-cost .remove { margin-left: 4px; font-weight: 400; color: var(--ink-soft); text-decoration: none; }
.line-price-actions { grid-column: 1 / -1; font-size: 14px; }
.confirm { min-height: 36px; padding: 4px 12px; font-size: 14px; color: var(--ok-ink); border-color: var(--ok-edge); background: var(--ok-bg); font-weight: 600; }
.ok-note { color: var(--ok-ink); font-weight: 600; }
.old-note { color: var(--old-ink); }
.small { font-size: 13px; }
.quick-questions { margin-top: 12px; padding: 12px; border-radius: var(--radius); background: var(--est-bg); border: 1px solid var(--est-edge); }
.quick-questions h3 { margin: 0 0 6px; font-size: 15px; }
.quick-questions p { margin: 0 0 6px; font-weight: 600; }
.plate-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.plate-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 14px; }
.math-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.add-ingredient { margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--edge); }
.add-ingredient h3 { margin: 0 0 8px; font-size: 15px; }
.add-form { display: grid; gap: 10px; }
.add-form > .bubble { justify-self: start; }
.ingredient-search { position: relative; }
.ingredient-search ul { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--paper);
  display: grid; gap: 2px; max-height: 320px; overflow: auto; }
.ingredient-search li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px; border-radius: var(--radius); cursor: pointer; }
.ingredient-search li.active, .ingredient-search li:hover { background: var(--walk-in); }
.correction { margin-top: 16px; }
.sheet-actions { position: sticky; bottom: -20px; background: var(--paper); padding: 12px 0 4px; border-top: 1px solid var(--edge); }

.partial { color: var(--no-ink); }
.costed-menu { container-type: inline-size; }

/* Items become cards when the menu itself is narrow (phone, or a narrow window/pane): the name on top, then labelled numbers */
@container (max-width: 440px) {
  .menu-section .item-grid { grid-template-columns: 1fr 1fr !important; }
}
@container (max-width: 780px) {
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .item-grid.head { display: none; }
  .item-grid .item-name { grid-column: 1 / -1; }
  .item-grid > .num[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--ink-soft); font-weight: 400; }
  .item-grid > .num { text-align: left; }
  .item-grid > span:empty { display: none; }
  .check-cell { grid-column: 1 / -1; }
  .variant-label { grid-column: 1 / -1; padding: 6px 0 0; font-weight: 600; color: var(--ink); }
  .line { grid-template-columns: 1fr auto; }
  .line-portion { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; }
}
@media (max-width: 760px) {
  .link-form { flex-basis: 100%; }
}

/* On the plate: one line per thing, a recipe or ingredient and how much */
.on-plate { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 15px; }
.on-plate li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.on-plate .dot { width: 8px; height: 8px; }
.pick-dot { background: var(--edge); }
.pick-inline { white-space: nowrap; }
.pick-inline .dot { margin: 0 4px 1px 0; }
.small-title { font-size: 15px; font-weight: 600; }

/* The plate sheet */
.plate-lines h3 { margin: 16px 0 8px; font-size: 16px; }
.plate-lines h4 { margin: 14px 0 6px; font-size: 15px; }
.thing { padding: 6px 0 10px; border-top: 1px solid var(--edge); }
.thing-name { margin: 6px 0 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.row { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto 24px; gap: 4px 10px; align-items: center; padding: 6px 0; }
.row > .row-source, .row > .row-question, .row > .row-cooked, .row > .row-price { grid-column: 1 / -1; }
.row-source { margin-top: -2px; }
.row-amount { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.amount-button { border: 1px dashed var(--edge); background: transparent; min-height: 36px; padding: 2px 10px; font-weight: 600; }
.amount-button:hover { border-color: var(--ink); }
.row-cost { font-weight: 700; text-align: right; }
.row-question { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 10px; border-radius: var(--radius);
  background: var(--est-bg); border: 1px solid var(--est-edge); }
.row-question .chips button { min-height: 36px; }
.row-cooked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-cooked button { min-height: 32px; padding: 2px 10px; font-size: 14px; }
.row-cooked button.chosen, .small-chips button.chosen { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.row-cooked input { width: 56px; min-height: 32px; }
.small-chips { display: inline-flex; gap: 4px; }
.ballpark-row { border-top: 1px dashed var(--est-edge); }
.no-recipe { margin: 6px 0; padding: 10px 12px; border-radius: var(--radius); border: 1px dashed var(--est-edge); background: var(--est-bg); }
.no-recipe p { margin: 4px 0; }
.no-recipe textarea { margin-top: 6px; }
.no-recipe .button input[type=file] { display: none; }
.pick-block { margin-top: 8px; }
.pick { border-top: 1px solid var(--edge); }
.pick-head { width: 100%; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; text-align: left;
  border: 0; border-radius: 0; background: transparent; padding: 8px 0; min-height: 44px; }
.pick-head .pick-title { font-weight: 600; }
.pick-head .pick-cost { font-weight: 600; }
.pick-body { padding: 0 0 8px 20px; }
.thing-more summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; padding: 6px 0; }
.shared { margin: 4px 0 0; }
.rotating p { margin: 4px 0; }
.missing-recipes h2 { margin-top: 0; }
.missing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 8px 0; }
.missing-row .actions { margin: 0; }
@media (max-width: 640px) { .missing-row { grid-template-columns: 1fr; } }

/* "Suggest it for me" and the recipe cards it drafts. */
.no-recipe-choices { flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.suggested-recipe { border-left: 3px solid var(--est-edge); padding-left: 8px; }
.suggested-card { border: 1px dashed var(--est-edge); background: var(--est-bg); }
.badge.suggested { margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 0.8em; font-weight: 500;
  background: var(--est-bg); border: 1px solid var(--est-edge); white-space: nowrap; }

/* A recipe line with no amount yet: where "Finish the recipe" sends you. */
input.needs-amount { border-color: var(--est-edge); background: var(--est-bg); }

/* Progress of a slow step: a bar and what it just did */
.progress-notice p { margin: 0; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--walk-in); border: 1px solid var(--edge); overflow: hidden; margin: 8px 0 4px; }
.progress-bar span { display: block; height: 100%; background: var(--ink); transition: width 400ms ease; }
.progress-bar.moving span { width: 30%; animation: progress-move 1.4s ease-in-out infinite; }
@keyframes progress-move { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .progress-bar.moving span { animation: none; width: 100%; opacity: .3; } }

/* A menu's tabs: Menu, To do, Pages */
.menu-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--edge); margin: 12px 0 16px; overflow-x: auto; overflow-y: hidden; }
.menu-tabs a { text-decoration: none; padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.menu-tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.menu-tabs .count { font-size: 13px; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--highlighter); color: var(--ink); text-align: center; }
.menu-tabs .count.quiet { background: var(--walk-in); border: 1px solid var(--edge); }
/* The menu tab's one slim toolbar: how to show it, and the targets */
.menu-toolbar { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; position: sticky; top: 0; z-index: 5;
  background: var(--walk-in); padding: 8px 0; }
.menu-toolbar .view-toggle { margin: 0; }
.menu-toolbar .targets { margin: 0; padding: 6px 12px; position: static; flex: 1; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--paper); }
.menu-toolbar .targets .saved { flex: 0 1 auto; }
.menu-page .legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 16px; }
.menu-page .legend a { margin-left: auto; font-weight: 600; }
@media (max-width: 760px) { .menu-toolbar { position: static; } .menu-page .legend a { margin-left: 0; } }

/* While a menu updates: the plate can be read, not changed */
fieldset.plate-edit { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plate-edit:disabled { opacity: .6; }
.locked-note { margin: 8px 0; }

/* A drink's working: the case on the invoice, the bottle it makes, the serving. */
.working { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; font-size: 14px; }
.working dt { color: var(--ink-soft); }
.working dd { margin: 0; }
.working .link-form { flex: none; }
.working .link-form input { width: 6em; }
.invoice-peek summary { cursor: pointer; color: var(--ink-soft); }
.invoice-peek img { display: block; max-width: 100%; margin: 6px 0; border: 1px solid var(--edge); border-radius: 4px; }
.ask { margin: 8px 0; }
.ask .choices { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.ask .link-form { flex: 0 1 180px; }
.ask .link-form input { width: 5em; }

/* The menu sheet for food: things to confirm, then what's on every order, the guest's picks and add-ons.
   Every component is one thing: we make it (a recipe) or we buy it. */
.to-confirm { border: 1px solid var(--est-edge); background: var(--est-bg); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 8px; margin: 12px 0; }
.to-confirm.all-done { border-color: var(--ok-edge); background: var(--ok-bg); }
.to-confirm h3 { margin: 0; font-size: 16px; }
.to-confirm .ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; border-top: 1px solid var(--est-edge); padding-top: 8px; }
.to-confirm .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 560px) { .to-confirm .ask { grid-template-columns: minmax(0, 1fr); } .to-confirm .acts { justify-content: flex-start; } }
.sheet-block { display: grid; gap: 6px; margin: 16px 0; }
.sheet-block h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.sheet-block h3.sub { margin-top: 10px; }
.comp { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 6em 22px; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--edge); }
.comp.slot { background: var(--walk-in); border-radius: var(--radius); padding-inline: 8px; border-top: 0; margin-top: 4px; }
.comp-what { display: grid; gap: 1px; min-width: 0; }
.comp-name { font-weight: 600; }
.comp-kind, .comp-source { font-size: 13px; color: var(--ink-soft); }
.comp-source .tag { color: var(--est-ink); font-weight: 600; }
.comp-cost { text-align: right; }
.comp-portion input { width: 4.5em; text-align: right; }
.comp-portion select { width: 6.5em; }
.comp.group { display: block; }
.comp-group-name { margin: 0 0 4px; }
.comp-parts { padding-left: 14px; border-left: 2px solid var(--edge); }
.dot.slot { width: 10px; height: 10px; border: 2px dashed var(--ink-soft); border-radius: 3px; background: none; }
@media (max-width: 560px) { .comp { grid-template-columns: 12px minmax(0, 1fr) 5em 22px; } .comp-portion { grid-column: 2 / -1; grid-row: 2; } }
.badge.make, .badge.buy, .badge.none { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 0 6px; border-radius: 4px; border: 1px solid; margin-right: 4px; }
.badge.make { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.badge.buy { color: var(--ink-soft); background: var(--paper); border-color: var(--edge); }
.badge.none { color: var(--no-ink); background: var(--no-bg); border-color: var(--no-edge); }
.src { border-bottom: 1px dotted currentColor; text-decoration: none; }
.src.invoice { color: var(--ok-ink); } .src.old, .src.estimate { color: var(--est-ink); } .src.none { color: var(--no-ink); }
.sheet-tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--edge); margin: 4px 0; }
.sheet-tab { border: 0; border-radius: var(--radius) var(--radius) 0 0; background: none; padding: 6px 12px; margin-bottom: -2px;
  border-bottom: 2px solid transparent; display: grid; text-align: left; min-height: 0; }
.sheet-tab .t { font-weight: 600; } .sheet-tab .s { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.sheet-tab[aria-selected="true"] { border-bottom-color: var(--ink); background: var(--walk-in); }
.tabpanel { display: grid; gap: 6px; }
.subtotal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; border-top: 2px solid var(--ink); font-weight: 600; margin: 0; }
.order { background: var(--walk-in); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; }
.order-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.order-picks label { display: grid; gap: 2px; font-size: 13px; color: var(--ink-soft); }
.order-total { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 0; }
.pick-list { margin-top: 6px; }
.pick-list > summary { cursor: pointer; font-weight: 600; }
.pick-option { padding-top: 6px; }
.pick-label { margin: 0; }
.type-ahead { position: relative; display: grid; gap: 4px; max-width: 520px; }
.type-ahead label { display: grid; gap: 2px; font-size: 13px; color: var(--ink-soft); }
.type-ahead ul { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--paper); max-height: 300px; overflow-y: auto; }
.type-ahead li.group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 6px 6px 2px; }
.type-ahead li.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 6px; border-radius: 4px; cursor: pointer; }
.type-ahead li.opt.active, .type-ahead li.opt:hover { background: var(--walk-in); }
.type-ahead li.opt.new { border-top: 1px solid var(--edge); border-radius: 0; }
.type-ahead li.note { font-size: 13px; color: var(--ink-soft); padding: 6px; }
.addlink { justify-self: start; font-size: 14px; }
.try-here { margin: 4px 0 6px 18px; display: grid; gap: 6px; justify-items: start; }
.try-here .order { justify-self: stretch; }
.cost-table .item-link { text-align: left; color: var(--ink); }
.comp-cost .each { display: block; }
/* A row on a plate: what it is on the left; the amount, Apply and its changes on the right */
.comp.line-row { grid-template-columns: minmax(0, 1fr) auto 5.5em; align-items: start; }
.comp.line-row .comp-source { line-height: 1.7; }
.comp.line-row .comp-source .dot { width: 9px; height: 9px; vertical-align: 0; cursor: help; }
.comp.line-row.unconfirmed { background: var(--est-bg); box-shadow: -8px 0 0 var(--est-bg), 8px 0 0 var(--est-bg); }
.comp.line-row.flash { outline: 2px solid var(--est-edge); outline-offset: 4px; border-radius: 2px; }
.comp-edit { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.comp-portion { display: inline-flex; gap: 4px; align-items: center; }
.comp-portion .apply, .comp-portion .confirm { min-width: 5.5em; }
.comp-portion .ok-mark { min-width: 5.5em; text-align: center; color: var(--ok-ink); font-weight: 700; }
.comp-acts { color: var(--ink-soft); white-space: nowrap; }
.comp.line-row .comp-cost { padding-top: 6px; }
.to-check-note { color: var(--est-ink); }
.to-confirm-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.add-thing { display: grid; gap: 6px; padding: 8px 0; }
.add-thing p { margin: 0; }
.add-thing .choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 560px) {
  .comp.line-row { grid-template-columns: minmax(0, 1fr) 5em; }
  .comp.line-row .comp-edit { grid-column: 1 / -1; grid-row: 2; align-items: flex-start; }
  .comp-acts { white-space: normal; }
}
/* Splitting a first reading into menus; which menus an item is on */
.split-first { padding: 16px 20px; display: grid; gap: 10px; }
.split-first h2 { margin: 0; }
.split-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.split-groups .check { display: block; font-size: 17px; }  /* a long "what goes on it" wraps under the name */
.split-groups input[type="checkbox"] { width: 20px; height: 20px; vertical-align: -4px; margin: 0 8px 0 0; }
.split-add { display: flex; gap: 8px; max-width: 520px; }
.split-add input { flex: 1; min-width: 0; }
.on-menus { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--ink-soft); margin: 4px 0 0; }
.on-menus select { font-size: 13px; padding: 2px 6px; min-height: 0; width: auto; }

/* What the restaurant pays for an ingredient, as bought: "£10 for a 750 ml bottle". */
.your-price { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 6px 0; }
.your-price input { width: 6em; }
.your-price input.short { width: 4em; }
/* What a house wine or a package's beer pours */
.ask-pour { background: var(--est-bg); border: 1px solid var(--est-edge); border-radius: var(--radius); padding: 8px 12px; margin: 4px 0 8px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pour-names { display: grid; gap: 8px; }
.pour-names .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pour-names .chip { border: 1px solid var(--edge); border-radius: 999px; padding: 2px 4px 2px 10px; background: var(--walk-in); }
.pour-choices { display: grid; gap: 4px; }
.pour-choices .your-price { grid-column: 1 / -1; }
.question-hint { margin: 2px 0 6px; }
/* Applying answers, step by step */
.applying .apply-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.applying .apply-step { display: flex; gap: 8px; align-items: center; color: var(--ink-soft); }
.applying .apply-step.done { color: var(--ok-ink); }
.applying .apply-step.now { color: var(--ink); font-weight: 600; }
.applying .apply-step .mark { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: none; }
.applying .apply-step.now .mark { border: 2px solid var(--edge); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; }
.progress-bar span.pulse { background-image: linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 60%, var(--paper)) 50%, var(--ink) 100%);
  background-size: 200% 100%; animation: pulse-move 1.6s linear infinite; }
@keyframes pulse-move { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .applying .apply-step.now .mark, .progress-bar span.pulse { animation: none; } }

/* The item window: identity on the left, housekeeping (⋯) on the right; one save model in the footer. */
.plate-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plate-where { margin: 2px 0 6px; }
.item-menu { position: relative; flex: none; }
.item-menu > summary { list-style: none; cursor: pointer; font-size: 22px; line-height: 1; padding: 6px 12px; border: 1px solid var(--edge);
  border-radius: var(--radius); min-height: 40px; display: flex; align-items: center; }
.item-menu > summary::-webkit-details-marker { display: none; }
.item-menu-body { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--paper); border: 1px solid var(--edge);
  border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; min-width: 260px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.item-menu-body .on-menus { margin: 0; flex-wrap: wrap; }
.staged-note { margin: 4px 0 0; }
.why-sources > summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; }
.weigh-basis { margin: 6px 0; flex-wrap: wrap; }

/* The question under a row (what a serving weighs) takes the row's whole width. */
.line-row .weigh-basis { grid-column: 1 / -1; }
.line-row .weigh-basis input { width: 6em; }

/* Example order: one box per choice group, its rule beside the name. */
.order-group { min-width: 13em; border: 1px solid var(--edge); border-radius: var(--radius); padding: 6px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.order-group legend { font-weight: 600; padding: 0 4px; }
.order-group legend .hint { display: block; font-weight: normal; font-size: 0.88em; }

/* The size opened from the table. */
.size-chip.picked { outline: 2px solid var(--ok-edge); outline-offset: 1px; }

/* Who a choice is for (each guest, or the whole table). */
.choice-scope { margin: 0 0 8px; padding: 6px 10px; background: var(--walk-in); border-radius: var(--radius); font-size: 0.92em; }

/* A bar package's expected mix. */
.package-mix { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius); }
.package-mix h3 { margin-top: 0; }
.mix-drinks input { width: 5em; margin-left: 8px; }
.mix-table { border-collapse: collapse; margin: 8px 0; }
.mix-table th, .mix-table td { padding: 4px 10px 4px 0; text-align: left; }
.mix-table .num { text-align: right; }
.mix-table input { width: 4.5em; text-align: right; }

/* "We buy it instead": here only, or everywhere after seeing what it changes. */
.line-row .buy-scope { display: block; grid-column: 1 / -1; padding: 8px 10px; border: 1px solid var(--edge); border-radius: var(--radius); }
.buy-scope p { margin: 4px 0; }

/* A portion shared with other items, said beside it. */
.shared-note { display: block; color: var(--est-ink); }
.line-row .effective { display: block; font-weight: 600; }

/* The size chips are the window's one size control: buttons, the chosen one filled. */
.size-chips { display: flex; flex-wrap: wrap; margin: 6px 0; }
button.size-chip { background: var(--paper); color: var(--ink); min-height: 36px; cursor: pointer; font-weight: 400; }
button.size-chip.picked { background: var(--walk-in); outline: 2px solid var(--ink); outline-offset: 0; }

/* A settled row: one line, opened to change. */
.line-row.compact { padding: 0; }
.comp-summary { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px 12px; align-items: baseline;
  width: 100%; padding: 8px 4px; cursor: pointer; border-radius: var(--radius); }
.comp-summary:hover, .comp-summary:focus-visible { background: var(--walk-in); }
.comp-summary:focus-visible { outline: 2px solid var(--ink); }
.comp-summary .comp-name { font-weight: 600; }
.comp-summary .hint { grid-column: 1 / 2; grid-row: 2; }
.comp-summary .comp-cost { grid-column: 2; grid-row: 1; }
.comp-summary .ok-mark { grid-column: 3; grid-row: 1; }
.comp-summary .edit-cue { grid-column: 4; grid-row: 1; text-decoration: underline; }
.collapse-row { float: right; }

/* The checklist under the next step: portions, recipes, prices, each apart. */
.checklist { margin-top: 6px; }
.checklist dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 0; }
.checklist dt { font-weight: 600; }
.checklist dd { margin: 0; }
.line-row.compact { display: flex; align-items: center; gap: 8px; }
.line-row.compact .comp-summary { flex: 1; }
.compact-confirm { flex: none; }

/* The one-line row wraps instead of squeezing: name, cost, status and Change on a line; the details under it. */
.comp-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.comp-summary .comp-name { flex: 1 1 10em; min-width: 0; }
.comp-summary .comp-cost, .comp-summary .ok-mark, .comp-summary .to-check-note, .comp-summary .edit-cue { flex: none; }
.comp-summary .hint { order: 10; flex-basis: 100%; }
@media (max-width: 600px) {
  .line-row.compact { flex-wrap: wrap; }
  .compact-confirm { margin-left: auto; }
}
/* A long option name never pushes the example order sideways on a phone. */
.order-group { min-width: 0; max-width: 100%; }
.order-group label, .order-group select { max-width: 100%; min-width: 0; }
@media (max-width: 600px) {
  /* "2 × £0.82–£2.27" wraps under the name on a phone rather than pushing the window sideways. */
  .comp.slot { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .comp.slot .comp-what { flex: 1 1 100%; min-width: 0; }
  .comp.slot .comp-cost { white-space: normal; }
}
/* The allergen sheet: controls on screen, the grid on paper */
.allergen-page { display: grid; gap: 12px; }
.sheet-controls { display: grid; gap: 10px; }
.sheet-menus { border: 1px solid var(--edge); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.confirm-row { display: grid; grid-template-columns: minmax(15em, 1.2fr) 3fr auto; gap: 6px 12px; align-items: center; padding: 6px 0; }
.confirm-row .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.confirm-row .chips button { font-size: 12px; padding: 2px 8px; min-height: 0; }
@media (max-width: 700px) { .confirm-row { grid-template-columns: 1fr; } }
.allergen-print { padding: 16px; overflow-x: auto; }
.allergen-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.allergen-head h2 { margin: 0 0 8px; }
.allergen-grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.allergen-grid th, .allergen-grid td { border: 1px solid var(--edge); padding: 3px 5px; }
.allergen-grid th.item { text-align: left; font-weight: 600; min-width: 12em; }
.allergen-grid th.rot { height: 7.5em; vertical-align: bottom; padding: 4px 2px; width: 2.2em; }
.allergen-grid th.rot span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; }
.allergen-grid td.mark { text-align: center; font-size: 15px; }
.allergen-grid td.mark.unchecked { color: var(--est-ink); font-weight: 700; }
.allergen-grid tr.unknown th.item .ask { color: var(--est-ink); font-weight: 400; font-size: 12px; }
.allergen-grid tbody tr:nth-child(even) { background: color-mix(in srgb, var(--walk-in) 50%, var(--paper)); }
@media print {
  html.print-sheet body { background: #fff; }
  html.print-sheet .sidebar, html.print-sheet .tabbar, html.print-sheet .sheet-controls, html.print-sheet .undo-bar { display: none !important; }
  html.print-sheet .shell { display: block; }
  html.print-sheet main { padding: 0 !important; margin: 0 !important; }
  html.print-sheet .allergen-print { box-shadow: none; border: 0; padding: 0; overflow: visible; }
  html.print-sheet .allergen-grid thead { display: table-header-group; }
  html.print-sheet .allergen-grid tr { break-inside: avoid; }
}

/* Pairs with: the wines and beers for a dish */
.pairs-with ul.pairings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pairing { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-top: 1px solid var(--edge); padding-top: 6px; }
.pairing-reason { display: block; color: var(--ink-soft); font-style: italic; }
.suggest-pairings { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* The review agenda: one page with room to write */
.agenda { padding: 20px 24px; display: grid; gap: 14px; max-width: 820px; }
.agenda header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.agenda header h2 { margin: 0; }
.agenda-headline { margin: 0; font-weight: 600; }
.agenda-section h3 { margin: 0 0 6px; font-size: 16px; }
.agenda-points { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.agenda-point { display: grid; gap: 2px; }
.agenda-sub { list-style: none; margin: 4px 0 0 -20px; font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.agenda-point .decided { font-size: 13px; color: var(--ink-soft); display: flex; gap: 6px; align-items: flex-end; }
.agenda-point .decided .line { flex: 1; border-bottom: 1px dotted var(--ink-soft); height: 1em; }
@media print {
  html.print-sheet .agenda { box-shadow: none; border: 0; padding: 0; max-width: none; }
  html.print-sheet .agenda-point { break-inside: avoid; }
}

/* A photo of the plate */
.plate-photo .photo-body { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: start; }
.plate-photo-img { width: 160px; height: auto; border-radius: var(--radius); border: 1px solid var(--edge); display: block; }
.plate-photo .photo-text { display: grid; gap: 6px; }
.plate-photo .photo-q p { margin: 0 0 4px; }
.plate-photo .photo-other { font-size: 13px; padding: 4px 8px; min-width: 0; flex: 1 1 120px; max-width: 220px; }
.allergen-grid td.mark.unchecked { color: var(--ink-soft); }
@media (max-width: 560px) { .plate-photo .photo-body { grid-template-columns: 1fr; } }
.plate-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
/* The server view: a phone at the table */
.floor { max-width: 720px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.floor > * { min-width: 0; }
.floor-search { font-size: 17px; padding: 10px 12px; }
.floor-without { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.floor-without button { font-size: 13px; padding: 4px 10px; min-height: 0; border-radius: 999px; }
.floor-without button.chosen { background: var(--ink); color: var(--paper); }
.floor-menus { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--edge); }
.floor-menus button { border: 0; background: none; padding: 8px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.floor-menus button.active { border-bottom-color: var(--ink); font-weight: 600; }
.floor-section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 12px 0 4px; }
.floor-item { border-top: 1px solid var(--edge); }
.floor-head { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  background: none; border: 0; padding: 10px 0; color: inherit; }
.floor-head:not(:has(img)) { grid-template-columns: minmax(0, 1fr) auto; }
.floor-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.floor-name { display: grid; gap: 4px; }
.floor-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.floor-tags .allergen, .floor-tags .diet { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--edge); }
.floor-tags .allergen.yes { background: var(--no-bg); border-color: var(--no-edge); color: var(--no-ink); }
.floor-tags .allergen.unchecked, .floor-tags .allergen.some { background: var(--est-bg); border-color: var(--est-edge); color: var(--est-ink); }
.floor-tags .diet { background: var(--ok-bg); border-color: var(--ok-edge); color: var(--ok-ink); }
.floor-body { padding: 0 0 12px; display: grid; gap: 6px; }
.floor-body p { margin: 0; }
.floor-photo { width: 100%; max-width: 480px; border-radius: var(--radius); }
.floor-pairs { display: grid; gap: 2px; }
