:root {
  --bg: #EDE0D4;
  --panel: #fffaf6;
  --panel-strong: #ffffff;
  --text: #3e2f27;
  --muted: #7f6757;
  --accent: #9c6644;
  --accent-dark: #7f5539;
  --line: #dcc8b8;
  --danger: #a63d40;
  --success: #386641;
  --shadow: 0 18px 40px rgba(62, 47, 39, 0.12);
  --radius: 24px;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Stacking — bottom chrome above content, connectivity above all */
  --z-sticky-category: 15;
  --z-float-ticket: 36;
  --z-send-bar: 40;
  --z-connectivity: 50;

  /* Gap between fixed send bar and floating ticket summary (JS: bottom = sendBarHeight + this) */
  --order-float-gap: var(--space-3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.55), transparent 35%),
    var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone-shell {
  min-height: 100svh;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-6);
  padding-top: calc(var(--space-4) + env(safe-area-inset-top, 0px));
}

.phone-shell.has-connectivity-banner {
  padding-top: calc(44px + env(safe-area-inset-top, 0px));
}

.connectivity-banner {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  z-index: var(--z-connectivity);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.connectivity-banner--online {
  background: rgba(56, 102, 65, 0.15);
  color: var(--success);
}

.connectivity-banner--reconnecting {
  background: rgba(200, 140, 40, 0.22);
  color: #7a4f08;
}

.connectivity-banner--offline {
  background: rgba(166, 61, 64, 0.18);
  color: var(--danger);
}

.order-screen-root {
  position: relative;
  padding-bottom: 0;
}

/* Bottom inset set from measured #fixed-order-actions height (app.js); keeps ticket/menu above send bar only */
.order-scroll {
  padding-bottom: 0;
}

.fixed-send-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, rgba(237, 224, 212, 0) 0%, var(--bg) 18%);
  border-top: 1px solid var(--line);
  z-index: var(--z-send-bar);
  box-shadow: 0 -8px 24px rgba(62, 47, 39, 0.06);
}

.send-main-btn {
  width: 100%;
  min-height: 56px;
  font-size: 17px;
}

.send-main-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tables-hall-panel { margin-bottom: 0; }

.tables-section-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  margin-bottom: 14px;
  scrollbar-width: thin;
  border-radius: 999px;
  background: rgba(62, 47, 39, 0.06);
  border: 1px solid var(--line);
}

.tables-section-tabs::-webkit-scrollbar {
  height: 6px;
}

.tables-section-tabs:empty {
  display: none;
}

.floor-section-tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.floor-section-tab-active {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 1px 3px rgba(62, 47, 39, 0.12);
}

.tables-floor-empty-hint {
  margin-top: 8px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.table-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 22px;
  border: 2px solid var(--line);
  background: var(--panel-strong);
  text-align: left;
  min-height: 88px;
}

.table-cell-label {
  font-size: 18px;
  font-weight: 800;
}

.table-status-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 999px;
}

.badge-free {
  background: rgba(56, 102, 65, 0.15);
  color: var(--success);
}

.badge-open {
  background: rgba(156, 102, 68, 0.2);
  color: var(--accent-dark);
}

.badge-sent {
  background: rgba(62, 47, 39, 0.1);
  color: var(--muted);
}

.table-cell.status-open {
  border-color: rgba(156, 102, 68, 0.55);
}

.table-cell.status-sent {
  border-color: rgba(62, 47, 39, 0.15);
}

.order-topbar {
  justify-content: space-between;
}

.back-tap {
  flex: 0 0 auto;
}

.order-head-panel {
  margin-bottom: 14px;
}

.tight-stack {
  gap: 12px !important;
}

.menu-panel {
  margin-bottom: var(--space-3);
  position: relative;
  isolation: isolate;
}

.menu-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-group {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  padding: 0 4px 8px;
  overflow: hidden;
}

.menu-group summary {
  list-style: none;
}

.menu-group summary::-webkit-details-marker {
  display: none;
}

.menu-group-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  border-radius: 16px;
  background: rgba(156, 102, 68, 0.08);
  border: 0;
  margin-bottom: 8px;
}

.menu-group-title {
  flex: 1;
  text-align: left;
}

.menu-group-count {
  margin-left: 8px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  padding: 0 var(--space-2) var(--space-2);
}

.menu-source-hint {
  margin-bottom: 10px;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  min-height: 76px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.menu-tile-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  word-break: break-word;
}

@media (max-width: 380px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .menu-tile {
    min-height: auto;
    padding: var(--space-4) var(--space-4);
  }
}

.order-lines-panel {
  margin-bottom: 8px;
}

.ticket-details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  overflow: hidden;
}

.ticket-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.ticket-details-summary::-webkit-details-marker {
  display: none;
}

.ticket-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.ticket-summary-title {
  font-size: 15px;
  font-weight: 850;
}

.ticket-summary-hint {
  font-size: 11px;
  line-height: 1.25;
}

.ticket-summary-compact {
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 14px;
}

.stat-value-flash {
  animation: waiter-stat-flash 0.42s ease;
}

@keyframes waiter-stat-flash {
  0% {
    transform: scale(1);
    color: inherit;
  }
  35% {
    transform: scale(1.06);
    color: var(--accent-dark);
  }
  100% {
    transform: scale(1);
    color: inherit;
  }
}

.order-line-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}

.order-line-meta {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.order-line-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.order-line-left {
  flex: 1;
  min-width: 0;
}

.order-line--ticket-pending {
  background: linear-gradient(145deg, rgba(255, 245, 228, 0.92), #fffefc);
  border-color: rgba(156, 102, 68, 0.42);
}

.order-line--ticket-saved {
  background: #f4f4f4;
  border-color: rgba(110, 110, 110, 0.25);
  opacity: 0.95;
}

.order-line--ticket-saved.order-line--confirm,
.order-line--ticket-pending.order-line--confirm {
  background: linear-gradient(145deg, rgba(237, 255, 241, 0.96), #ffffff);
  border-color: rgba(56, 102, 65, 0.42);
  box-shadow: 0 8px 18px rgba(56, 102, 65, 0.1);
}

.order-line--ticket-submitted {
  background: #eef5f0;
  border-color: rgba(56, 102, 65, 0.28);
  opacity: 0.96;
}

.order-line--ticket-locked,
.order-line--ticket-neutral {
  background: #fafafa;
  border-color: var(--line);
  opacity: 0.92;
}

.order-line--qty-bump .qty-val {
  animation: waiter-qty-pop 0.38s ease;
}

.order-line--qty-bump {
  animation: waiter-line-confirm 0.42s ease;
}

@keyframes waiter-qty-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes waiter-line-confirm {
  0% {
    transform: scale(0.995);
  }
  45% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

.qty-btn {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  background: #f5ebe0;
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
}

.qty-val.readonly {
  font-weight: 700;
  color: var(--muted);
}

.rm-btn {
  padding: 10px 12px;
  min-height: 44px;
  font-size: 13px;
}

.qty-btn--compact {
  width: 38px;
  min-height: 38px;
  font-size: 18px;
  border-radius: 12px;
}

.rm-btn--compact {
  padding: 4px 6px;
  min-height: 38px;
  min-width: 38px;
  font-size: 15px;
}

.course-select--compact {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

.void-btn--compact {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 11px;
}

.sent-pill {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.sent-yes {
  background: rgba(56, 102, 65, 0.2);
  color: var(--success);
}

.sent-no {
  background: rgba(156, 102, 68, 0.15);
  color: var(--accent-dark);
}

.empty-order-hint {
  margin: 8px 0 0;
}

.order-inline-message {
  margin-top: 8px;
  min-height: 20px;
}

.active-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.active-order-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 20px;
  border: 2px solid var(--line);
  background: var(--panel-strong);
  text-align: left;
}

.active-order-row-main {
  flex: 1;
  min-width: 0;
}

.active-order-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.active-order-title {
  font-weight: 800;
  font-size: 17px;
}

.active-order-sub {
  margin-top: 4px;
}

.order-status-chip {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.kitchen-order-status,
.order-kitchen-status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.kitchen-order-status--draft,
.kitchen-order-status--draft-new {
  background: rgba(156, 102, 68, 0.14);
  border-color: rgba(156, 102, 68, 0.25);
  color: var(--accent-dark);
}

.kitchen-order-status--sent {
  background: rgba(62, 47, 39, 0.08);
  border-color: rgba(62, 47, 39, 0.12);
  color: var(--text);
}

.kitchen-order-status--cooking {
  background: rgba(200, 120, 40, 0.2);
  border-color: rgba(200, 120, 40, 0.32);
  color: #8a5a15;
}

.kitchen-order-status--ready {
  background: rgba(56, 102, 65, 0.18);
  border-color: rgba(56, 102, 65, 0.3);
  color: var(--success);
}

.kitchen-order-status--closed,
.kitchen-order-status--cancelled {
  background: rgba(62, 47, 39, 0.08);
  border-color: rgba(62, 47, 39, 0.12);
  color: var(--muted);
}

.chip-draft {
  background: rgba(156, 102, 68, 0.2);
  color: var(--accent-dark);
}

.chip-active {
  background: rgba(56, 102, 65, 0.18);
  color: var(--success);
}

.btn-compact {
  padding: 12px 14px !important;
  min-height: 48px !important;
  font-size: 14px !important;
}

.topbar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.table-zone {
  margin-top: 2px;
}

.table-seats,
.table-restaurant {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 2px;
}

.badge-floor-free {
  background: rgba(56, 102, 65, 0.15);
  color: var(--success);
}

.badge-floor-draft {
  background: rgba(156, 102, 68, 0.22);
  color: var(--accent-dark);
}

.badge-floor-active {
  background: rgba(62, 47, 39, 0.12);
  color: var(--text);
}

.tfloor-free {
  border-color: rgba(56, 102, 65, 0.35);
}

.tfloor-draft {
  border-color: rgba(156, 102, 68, 0.55);
}

.tfloor-active {
  border-color: rgba(62, 47, 39, 0.28);
}

.table-cell-reserved-now {
  box-shadow: inset 0 0 0 1px rgba(107, 76, 154, 0.35);
}

.table-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.table-cell-actions {
  width: 100%;
  margin-top: 2px;
}

.table-book-btn {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
  font-weight: 700;
}

.badge-reserved {
  background: rgba(107, 76, 154, 0.18);
  color: #5b3f8a;
}

.reservations-panel {
  margin-top: 14px;
}

.reservations-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.reservation-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.reservation-row-head {
  font-weight: 800;
  font-size: 15px;
}

.reservation-row-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.reservation-row-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.reservation-cancel-btn {
  font-size: 13px;
  color: var(--danger);
  border-color: rgba(166, 61, 64, 0.35);
}

.reservation-form {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.order-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: 6px;
}

.order-head-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 100%;
}

.order-pill {
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(156, 102, 68, 0.15);
  color: var(--accent-dark);
}

.order-state-chip {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.order-state-chip--draft {
  background: rgba(156, 102, 68, 0.18);
  color: var(--accent-dark);
  border-color: rgba(156, 102, 68, 0.35);
}

.order-state-chip--submitted,
.order-state-chip--ready {
  background: rgba(56, 102, 65, 0.18);
  color: var(--success);
  border-color: rgba(56, 102, 65, 0.35);
}

.order-state-chip--active {
  background: rgba(56, 102, 65, 0.15);
  color: var(--success);
}

.order-state-chip--other {
  background: rgba(62, 47, 39, 0.08);
  color: var(--muted);
}

.fire-panel {
  margin-bottom: 14px;
}

.course-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.course-chip {
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 14px;
}

.course-chip-on {
  border-color: var(--accent);
  background: rgba(156, 102, 68, 0.12);
}

.fire-action-btn {
  width: 100%;
  min-height: 52px;
}

.order-lines-grouped {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 10px;
}

.course-group-head {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 4px 10px 2px;
}

.order-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.order-line-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  margin-top: 9px;
  width: 100%;
}

.order-line--ticket-saved .order-line-controls {
  padding-top: 8px;
  border-top: 1px dashed rgba(110, 110, 110, 0.22);
}

.order-line-confirm {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(56, 102, 65, 0.16);
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.kitchen-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kbtn {
  min-height: 48px;
  flex: 1;
  min-width: 140px;
}

.kitchen-wait-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.course-picker-row {
  margin-top: 4px;
}

.course-select {
  min-height: 48px;
  padding: 12px 10px;
  border-radius: 14px;
  max-width: 100%;
}

.void-btn {
  font-size: 12px;
  min-height: 44px;
}

.kitchen-badge {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.st-pending { background: rgba(156, 102, 68, 0.2); color: var(--accent-dark); }
.st-on-ticket { background: rgba(95, 95, 95, 0.14); color: #555; }
.st-submitted-order { background: rgba(56, 102, 65, 0.18); color: var(--success); }
.st-queued { background: rgba(62, 47, 39, 0.1); color: var(--text); }
.st-cooking { background: rgba(200, 120, 40, 0.25); color: #8a5a15; }
.st-ready { background: rgba(56, 102, 65, 0.2); color: var(--success); }
.st-served { background: rgba(62, 47, 39, 0.08); color: var(--muted); }
.st-voided { background: rgba(166, 61, 64, 0.15); color: var(--danger); }

.ol-status-pending { border-left: 4px solid rgba(156, 102, 68, 0.5); }
.ol-status-saved { border-left: 4px solid rgba(100, 100, 100, 0.3); }
.ol-status-queued { border-left: 4px solid rgba(100, 100, 100, 0.3); }
.ol-status-cooking { border-left: 4px solid #c87820; }
.ol-status-ready { border-left: 4px solid var(--success); }
.ol-status-served { opacity: 0.88; }
.ol-status-voided { display: none; }

.send-bar-status {
  margin: 0 0 4px;
  min-height: 18px;
  font-weight: 650;
}

.floating-ticket-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  /* bottom set in JS: measured send bar height + --order-float-gap — does not affect scroll metrics */
  bottom: 0;
  width: 100%;
  max-width: 560px;
  padding: 0 var(--space-3);
  z-index: var(--z-float-ticket);
  pointer-events: none;
}

.floating-ticket-btn {
  pointer-events: auto;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  min-height: 52px;
}

.floating-ticket-line {
  display: block;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}

.floating-ticket-status {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-search-wrap {
  display: block;
  margin-bottom: 10px;
}

.menu-search-input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
}

.menu-category-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-category);
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: var(--space-2) var(--space-3) var(--space-3);
  margin: 0 calc(-1 * var(--space-3)) var(--space-2);
  background: linear-gradient(180deg, var(--panel) 85%, rgba(255, 250, 246, 0));
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

.menu-cat-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 9px 13px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  max-width: min(200px, 72vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 390px) {
  .menu-cat-chip {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 44px;
    max-width: min(220px, 55vw);
  }
}

@media (min-width: 430px) {
  .menu-category-nav {
    mask-image: none;
  }
}

.menu-tile-wrap {
  position: relative;
  min-height: 0;
}

.menu-tile-wrap .menu-tile {
  padding-right: 48px;
}

.menu-tile {
  width: 100%;
}

.menu-tile.menu-tile-flash {
  animation: menu-tap-flash 0.14s ease-out;
}

.menu-tile--locked {
  opacity: 0.52;
  cursor: not-allowed;
}

@keyframes menu-tap-flash {
  from {
    transform: scale(0.98);
    filter: brightness(1.08);
  }
  to {
    transform: scale(1);
    filter: none;
  }
}

.menu-fav-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.menu-fav-toggle.is-fav {
  color: #c9a227;
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(255, 248, 220, 0.95);
}

.send-bar-with-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kitchen-note-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.kitchen-note-label {
  font-weight: 600;
}

.kitchen-note-input {
  width: 100%;
  resize: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  min-height: 48px;
  font-size: 14px;
}

.order-line-note-wrap {
  margin-top: 8px;
}

.order-line-note-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  font-size: 13px;
  resize: none;
}

.order-line-note-static {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.empty-active-hint {
  margin-top: 14px;
  text-align: center;
}

.screen { display: none; }
.screen.active { display: block; }

.hero-card,
.panel,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  border-radius: 28px;
  padding: 22px;
  margin-bottom: 14px;
}

.brand-pill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(156, 102, 68, 0.12);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.panel {
  border-radius: var(--radius);
  padding: 18px;
}

.compact-panel { padding: 16px 18px; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  color: var(--muted);
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.05; margin-bottom: 8px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 16px 14px;
  color: var(--text);
  min-height: 54px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(156, 102, 68, 0.18);
  border-color: var(--accent);
}

.tap-btn {
  min-height: 52px;
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(180deg, #a56d49 0%, #8f5a3c 100%);
  color: #fff;
}

.ghost-btn {
  background: #f5ebe0;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  border-radius: 22px;
  padding: 14px;
}

.accent-card {
  background: linear-gradient(180deg, #9c6644 0%, #7f5539 100%);
  color: #fff;
}
.accent-card .stat-label { color: rgba(255,255,255,.82); }

.stat-sub {
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.table-order-total {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-top: 4px;
}

.table-waiter {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.order-server-line {
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.stat-label {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.order-panel { padding-bottom: 20px; }

.double-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.items-list {
  display: grid;
  gap: 12px;
}

.item-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.item-grid {
  display: grid;
  grid-template-columns: 1.4fr .7fr .8fr;
  gap: 10px;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.line-total {
  font-weight: 700;
}

.message {
  min-height: 20px;
  margin-top: 14px;
  font-size: 14px;
}
.message.error { color: var(--danger); }
.message.success { color: var(--success); }

.sticky-btn {
  position: sticky;
  bottom: 10px;
}

@media (max-width: 430px) {
  .phone-shell { padding: 12px 10px 20px; }
  .hero-card, .panel { border-radius: 22px; }
  .summary-grid { grid-template-columns: 1fr 1fr 1fr; }
  .double-grid, .item-grid { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .topbar { align-items: flex-start; }
}
