.kitchen {
  --kitchen-border: #ded4c6;
  padding-block: 18px 36px;
}

.kitchen-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-block: 10px 15px;
  background: var(--background);
}

.kitchen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.kitchen-title h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  line-height: 1;
  text-transform: uppercase;
}

.kitchen-title p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.kitchen-tools,
.kitchen-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.kitchen-tools .button {
  min-height: 48px;
}

.kitchen-tools button:disabled {
  opacity: .58;
}

.kitchen-tools [aria-pressed=true] {
  background: #e8f1e7;
  color: #1d5e36;
  border-color: #aac3a9;
}

.kitchen-filter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--kitchen-border);
  border-radius: 9px;
  font-weight: 800;
  touch-action: manipulation;
}

.kitchen-filter span,
.lane-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  padding: 2px 6px;
  border-radius: 15px;
  background: #34231a12;
  font: 800 .85rem/1.5 var(--body);
  font-variant-numeric: tabular-nums;
}

.kitchen-filter[aria-pressed=true] {
  color: #fff;
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.kitchen-filter[aria-pressed=true] span {
  background: #fff3;
}

.kitchen-filter:hover:not([aria-pressed=true]) {
  background: #f8ece5;
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  align-items: start;
  gap: 14px;
}

.is-new {
  --stage-wash: #fff0cc;
  --stage-ink: #6b400e;
  --stage-border: #debb71;
  --stage-button: #75450d;
  --stage-hover: #573209;
}

.is-cooking {
  --stage-wash: #f9e6e5;
  --stage-ink: #812129;
  --stage-border: #dda6a5;
  --stage-button: #9c252d;
  --stage-hover: #781a22;
}

.is-ready {
  --stage-wash: #e4f2e7;
  --stage-ink: #235a36;
  --stage-border: #a4c7a7;
  --stage-button: #25643c;
  --stage-hover: #194b2b;
}

.is-collected {
  --stage-wash: #f0ede7;
  --stage-ink: #49443c;
  --stage-border: #cec5b6;
}

.kitchen-lane {
  min-width: 0;
}

.lane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 0 0 10px;
  padding: 9px 13px;
  border: 1px solid var(--stage-border);
  border-radius: 9px;
  background: var(--stage-wash);
  color: var(--stage-ink);
  font-size: 1.42rem;
  text-transform: uppercase;
}

.kitchen-tickets {
  display: grid;
  gap: 11px;
}

.kitchen-board[data-lanes="1"] .kitchen-tickets {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
}

.kitchen-ticket {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--kitchen-border);
  border-top: 5px solid var(--stage-border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ticket-head h3 {
  font: 700 2.45rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.ticket-who {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.ticket-time {
  display: grid;
  gap: 2px;
  text-align: right;
  color: var(--stage-ink);
  font-size: .87rem;
  font-weight: 800;
}

.ticket-time time {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
}

.ticket-items {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ticket-items li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.ticket-quantity {
  min-width: 34px;
  padding-inline: 5px;
  border-radius: 5px;
  background: var(--stage-wash);
  color: var(--stage-ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ticket-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #e6c982;
  border-radius: 7px;
  background: #fff2ca;
  color: #624111;
  font-size: .94rem;
  overflow-wrap: anywhere;
}

.ticket-note svg {
  margin-top: 2px;
}

.ticket-settled {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.ticket-action {
  width: 100%;
  min-height: 62px;
  margin-top: auto;
  background: var(--stage-button);
  color: #fff;
  font-size: 1.1rem;
  touch-action: manipulation;
}

.ticket-action svg {
  width: 23px;
  height: 23px;
}

.ticket-action:hover {
  background: var(--stage-hover);
}

.kitchen-empty {
  padding: 25px 14px;
  border: 1px dashed var(--kitchen-border);
  border-radius: 11px;
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}

.kitchen-empty h2 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.85rem;
  text-transform: uppercase;
}

.all-clear .empty-icon {
  background: #e4f2e7;
  color: #235a36;
}

@media (max-width: 540px) {
  .kitchen { padding-top: 7px; }
  .kitchen-title { margin-bottom: 9px; }
  .kitchen-tools .button { padding-inline: 8px; font-size: .83rem; }
  .kitchen-tools .button svg { width: 15px; height: 15px; }
  .kitchen-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kitchen-filter { gap: 4px; padding-inline: 7px; font-size: .84rem; }
  .kitchen-filter span { min-width: 19px; padding-inline: 4px; }
  .kitchen-board,
  .kitchen-board[data-lanes="1"] .kitchen-tickets { grid-template-columns: minmax(0, 1fr); }
}
