[hidden] {
  display: none !important;
}

body.menu-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
}

.menu-blob {
  position: fixed;
  z-index: 0;
  top: -160px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 52% 48% 42% 58%;
  background: radial-gradient(
    circle at 40% 35%,
    var(--color-accent-2-300),
    var(--color-accent-2-200) 55%,
    transparent 75%
  );
  filter: blur(16px);
  opacity: 0.5;
  pointer-events: none;
}

body.menu-page > header,
body.menu-page > main,
body.menu-page > p,
body.menu-page > .route-state {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------ *
 * Header — the pattern every staff surface repeats
 * ------------------------------------------------------------------ */

body.menu-page > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Menu.dc.html spaces the header's four groups at --space-4 and only the
     title group's own parts at --space-3. */
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-3);
}

.header-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

/* .btn .btn-secondary composed in markup for display/cursor/font/hover/
   active/disabled; everything below is the genuine delta — the 44px touch
   floor over .btn's own height, this brand's accent border and text
   colour over .btn-secondary's neutral divider, and the tighter gap and
   size the design's small pills use. */
.back-pill {
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border-color: var(--color-accent-200);
  color: var(--color-accent-700);
  font-size: 13.5px;
  white-space: nowrap;
}

.back-pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-page .nav-brand {
  margin: 0;
  font-size: 24px;
}

.surface-name {
  font-size: 13px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* Menu / Stock — the same catalogue, two views. The pair itself is
   `.peer-pair` in organic-system.css now, shared with every other staff
   surface; the rules that used to live here were byte-identical to it, so the
   move is a no-op on screen and one definition instead of three. */
.stall-setup-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
}

/* .btn .btn-secondary (admin-link) / .btn .btn-ghost (text-button)
   composed in markup; only the 44px floor, this brand's accent tone and
   the tighter size are genuine deltas. */
.admin-link,
.menu-page .text-button {
  min-height: 44px;
  padding: 0 15px;
  color: var(--color-accent-700);
  font-size: 13px;
  white-space: nowrap;
}

/* The artboard's Operations pill is 16px inside, one step wider than the
   back pill's 15px. */
.admin-link {
  padding: 0 16px;
  border-color: var(--color-accent-200);
}

/* The artboard sets 8px between the glyph and the word; .btn's own 6px let
   the arrow crowd "Log out". Stock already carries this. */
.menu-page .text-button {
  gap: 8px;
}

.icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ------------------------------------------------------------------ *
 * Shell states
 * ------------------------------------------------------------------ */

/* Position only — background, radius and color are the shared Shell States
   band's (organic-system.css) to set, not this surface's to override. */
.connectivity-status {
  margin: 0 var(--space-6) var(--space-3);
}

.route-state,
.empty-state {
  margin: 0 var(--space-6) var(--space-3);
  padding: var(--space-4);
  border-radius: 32px;
  background: var(--color-accent-100);
  color: var(--color-accent-800);
  font-size: 13.5px;
  line-height: 1.5;
}

.route-state {
  background: var(--color-surface);
  color: var(--color-text);
}

.route-state h2 {
  margin: var(--space-1) 0 var(--space-2);
  font-size: 27px;
  line-height: 1.12;
}

.menu-page .eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-700);
}

.menu-page .status {
  margin: 0 var(--space-6);
  font-size: 13px;
  color: var(--color-accent-700);
}

.menu-page .status:empty {
  margin: 0;
  visibility: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Two columns
 * ------------------------------------------------------------------ */

.menu-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.menu-columns {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 392px minmax(0, 1fr);
  gap: var(--space-3);
  padding: 0 var(--space-6) var(--space-6);
}

@media (max-width: 900px) {
  .menu-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.menu-list-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.menu-item-rows {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-content: start;
}

.menu-item-rows::-webkit-scrollbar {
  width: 0;
}

.no-items-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--color-accent-300);
  border-radius: 24px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 13px;
  text-align: center;
}

.menu-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Not .btn: the system's own tail rule forces every .btn to 999px
   (organic-system.css's `.btn, .tag, .seg, .input { border-radius: 999px }`),
   which would make a list row a pill and break the 26px-row shape
   design.md asks for in the very same sentence it names for containers.
   This is a selectable data row, not a labelled call-to-action — nearer in
   kind to .card than to .btn — so it keeps its own class rather than
   fighting the button system's pill shape. */
.menu-item-button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-item-row[data-selected="true"] .menu-item-button {
  background: var(--color-accent-100);
  border-color: var(--color-accent-600);
  box-shadow: none;
}

.menu-item-head {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.menu-item-name {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 16px;
}

.menu-item-sub {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.menu-item-figure {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 19px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.menu-item-portions-unit {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.menu-item-remove {
  flex: none;
  width: 44px;
  height: 44px;
}

/* Said before the pausing action, not after (#200): composes the same
   muted-note treatment `.detail-line` already carries rather than a new
   warning style. */
.pause-notice {
  flex: none;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-accent-700);
}

.add-item-form {
  flex: none;
  display: flex;
  gap: var(--space-2);
}

.add-item-form .input,
.add-item-form .btn {
  min-height: 48px;
}

.add-item-form .input {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------------------ *
 * Detail column
 * ------------------------------------------------------------------ */

.menu-detail-column {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scrollbar-width: none;
}

.menu-detail-column::-webkit-scrollbar {
  width: 0;
}

/* .card composed in markup for display/background; padding and radius are
   the genuine delta — Menu.dc.html's own sections are roomier and rounder
   than .card's compact default. gap is zeroed because every child here
   already carries its own top margin; .card's gap would double it. */
.detail-card {
  flex: none;
  gap: 0;
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-radius: 32px;
}

/* Menu.dc.html gives its three detail sections three different paddings:
   the cold start is even on all four sides, the item summary is as tight
   below as above, and only the recipe panel carries the deep foot. */
#cold-start {
  padding: var(--space-6);
}

#item-summary {
  padding: var(--space-4) var(--space-6);
}

.detail-card h2 {
  margin: 0;
  font-size: 27px;
}

.detail-card h3 {
  margin: 0;
  font-size: 19px;
}

.detail-line {
  margin: var(--space-2) 0 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}

/* Colour is `.text-muted`'s to set here — the artboard marks this line
   muted, not 65% like the paragraph above it. */
.cold-start-label {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 12.5px;
}

.item-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.item-summary-title {
  flex: 1;
  min-width: 0;
}

.item-state {
  margin: 4px 0 0;
  font-size: 13px;
}

.item-portions {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.item-portions .text-muted {
  font-size: 13px;
}

.item-portions-value {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.item-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.price-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.price-control .text-muted {
  font-size: 12.5px;
}

/* The price stepper's glyphs are the largest on the surface (17px); the
   recipe's are 15px. */
.price-control .icon {
  width: 17px;
  height: 17px;
}

.price-control .stepper-value {
  min-width: 78px;
  font-size: 22px;
}

.item-controls-divider {
  flex: none;
  width: 1px;
  height: 28px;
  background: var(--color-accent-200);
}

/* .btn .btn-secondary composed in markup; the 44px floor, the sage tint
   for "available" and the pressed .is-sold-out look are the deltas. */
.sold-out-toggle {
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border-color: var(--color-accent-200);
  color: var(--color-accent-2-700);
  font-size: 13.5px;
}

.sold-out-toggle.is-sold-out {
  border-color: var(--color-accent-700);
  background: var(--color-accent-600);
  color: var(--color-bg);
}

.sold-out-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}

.item-note {
  margin: var(--space-3) 0 0;
  font-size: 12.5px;
}

/* ------------------------------------------------------------------ *
 * Recipe
 * ------------------------------------------------------------------ */

.recipe-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.recipe-head span {
  font-size: 12px;
}

.recipe-rows {
  display: grid;
  gap: 2px;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.recipe-row {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: 20px;
  background: transparent;
}

/* The row that decides the figure — the scarcest ingredient, or one just
   created and not yet counted in — is tinted, so the reason for "portions
   left" is visible without reading every line. */
.recipe-row[data-limiting="true"] {
  background: var(--color-accent-100);
}

.recipe-row-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.recipe-row-label {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  font-size: 15px;
}

.recipe-row-free {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* Nothing free: the line is the refusal, so it reads in accent ink. */
.recipe-row-free[data-scarce="true"] {
  color: var(--color-accent-700);
}

/* Stacked, not a single horizontal row: label above, controls below.
   Squeezing the label into a flex:1 sliver beside four 44px controls broke
   it to one or two characters per line at 390px — the phone width every
   surface but Board is captured at. */
.recipe-row-new-stock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-accent-100);
}

.recipe-row-new-stock .stepper-value {
  min-width: 38px;
}

.recipe-row-new-stock-label {
  font-size: 12.5px;
  color: var(--color-accent-800);
}

.recipe-empty {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  color: var(--color-accent-700);
}

.recipe-add {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-accent-200);
}

.recipe-add form {
  display: flex;
  gap: var(--space-2);
}

.recipe-add .input,
.recipe-add .btn {
  min-height: 48px;
}

.recipe-add .input {
  flex: 1;
  min-width: 0;
}

.ingredient-hint {
  margin: var(--space-3) 0 0;
  font-size: 12px;
}

/* ------------------------------------------------------------------ *
 * Steppers and chips — shared shapes across the recipe row, the price
 * control and the cold-start starters.
 * ------------------------------------------------------------------ */

.stepper-row {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* .btn .btn-icon composed in markup for hover/pressed/disabled/shape;
   the 44px touch floor over .btn-icon's own 36px default, and this
   surface's border/background/font are the genuine deltas. .btn already
   gives :disabled the identical opacity/cursor treatment and .btn-icon
   now gives :hover/:active the identical accent-100/accent-200
   treatment, so none of the three repeats here. */
.stepper-button {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-accent-200);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1;
}

/* The artboard draws the recipe's own steppers a step smaller than the
   price stepper's 44px — 40px, still well clear of a fingertip. */
.recipe-row .stepper-button {
  height: 40px;
}

/* `:not()` so the `+10` below keeps its own auto width. */
.recipe-row .stepper-button:not(.stepper-button-wide) {
  width: 40px;
}

.stepper-button-wide {
  width: auto;
  min-width: 52px;
  padding: 0 12px;
  font-size: 13px;
}

.stepper-value {
  min-width: 34px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* .btn .btn-secondary composed in markup; the 44px floor, gap and this
   surface's chip size are the genuine deltas. */
.chip {
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border-color: var(--color-accent-200);
  color: var(--color-text);
  font-size: 13.5px;
}

.chip .icon {
  color: var(--color-accent-700);
}

/* The ingredient chips are the smaller of the artboard's two chip sizes;
   the cold-start starters are the larger. */
.recipe-add .chip {
  min-height: 40px;
  padding: 0 13px;
  font-size: 13px;
}

/* ------------------------------------------------------------------ *
 * Controls and focus
 * ------------------------------------------------------------------ */

.input {
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-accent-200);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
