@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
  --color-brand-green: #1F7A3E;
  --color-brand-red: #C81927;
  --color-whatsapp: #25D366;
  --color-text-dark: #1A1A1A;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --font-serif: 'Fraunces', serif;
  --font-display: 'Montserrat', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --tg-red: var(--color-brand-red);
  --tg-green: var(--color-brand-green);
  --tg-wa-green: var(--color-whatsapp);
  --tg-bg: #FDFBF7;
  --tg-card-bg: #FFFFFF;
  --tg-text-dark: var(--color-text-dark);
  --tg-text-muted: var(--color-text-muted);
  --tg-border: var(--color-border);
  --tg-ticket-bg: #0F1A12;
  --tg-font-heading: var(--font-serif);
  --tg-font-accent: var(--font-display);
  --tg-font-body: 'Inter', sans-serif;
  --tg-font-mono: var(--font-mono);
  --tg-shadow: 0 8px 20px rgba(0,0,0,0.06);
  --tg-radius: 16px;
  --tg-radius-sm: 10px;
  --tg-warning-bg: #FFF8E1;
  --tg-warning-border: #F5D76E;
  --tg-warning-text: #6B5400;
}

.tg-engine,
.tg-engine * {
  box-sizing: border-box;
}

.tg-engine {
  --tg-red-hover: #a61420;
  --tg-green-hover: #176332;
  --tg-wa-hover: #1ebe5d;
  --tg-green-tint: #e8f5ec;
  --tg-focus: var(--tg-green);
  padding: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: var(--tg-bg);
  color: var(--tg-text-dark);
  font-family: var(--tg-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tg-engine button,
.tg-engine input,
.tg-engine textarea,
.tg-engine select {
  font-family: inherit;
}

.tg-engine img {
  max-width: 100%;
  height: auto;
  display: block;
}

.tg-engine :focus {
  outline: none;
}

.tg-engine :focus-visible {
  outline: 2px solid var(--tg-focus);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Typography                                                                 */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-heading {
  margin: 0 0 12px;
  font-family: var(--tg-font-heading);
  font-weight: 700;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tg-text-dark);
}

.tg-engine .tg-eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-family: var(--tg-font-accent);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tg-red);
}

.tg-engine .tg-muted {
  color: var(--tg-text-muted);
  font-size: 0.9375rem;
}

.tg-engine .tg-metric {
  font-family: var(--tg-font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--tg-radius-sm);
  background: var(--tg-text-dark);
  color: #fff;
  font-family: var(--tg-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tg-engine .tg-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow);
}

.tg-engine .tg-btn:active {
  transform: translateY(-1px);
}

.tg-engine .tg-btn--red {
  background: var(--tg-red);
  color: #fff;
}

.tg-engine .tg-btn--red:hover {
  background: var(--tg-red-hover);
  color: #fff;
}

.tg-engine .tg-btn--green {
  background: var(--tg-green);
  color: #fff;
}

.tg-engine .tg-btn--green:hover {
  background: var(--tg-green-hover);
  color: #fff;
}

.tg-engine .tg-btn--wa {
  background: var(--tg-wa-green);
  color: #053d1a;
}

.tg-engine .tg-btn--wa:hover {
  background: var(--tg-wa-hover);
  color: #053d1a;
}

.tg-engine .tg-btn--ghost {
  background: transparent;
  border-color: rgba(26, 26, 26, 0.18);
  color: var(--tg-text-dark);
}

.tg-engine .tg-btn--ghost:hover {
  background: #fff;
  border-color: var(--tg-green);
  color: var(--tg-text-dark);
}

.tg-engine .tg-btn--sm {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.tg-engine .tg-btn.is-disabled,
.tg-engine .tg-btn:disabled,
.tg-engine .tg-btn.is-disabled:hover,
.tg-engine .tg-btn:disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Cards                                                                      */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-card,
.tg-engine .tg-dish,
.tg-engine .tg-meal-card {
  position: relative;
  background: var(--tg-card-bg);
  border: 1px solid rgba(26, 26, 26, 0.06);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tg-engine .tg-card {
  padding: 22px;
}

.tg-engine .tg-card:hover,
.tg-engine .tg-dish:hover,
.tg-engine .tg-meal-card:hover,
.tg-engine .tg-btn:hover {
  transform: translateY(-4px);
}

.tg-engine .tg-card.is-selected,
.tg-engine .tg-dish.is-selected,
.tg-engine .tg-meal-card.is-selected,
.tg-engine .tg-protein__option.is-selected {
  border: 2px solid var(--tg-green);
  background: var(--tg-green-tint);
  box-shadow: 0 12px 28px rgba(31, 122, 62, 0.16);
}

.tg-engine .tg-card.is-locked,
.tg-engine .tg-dish.is-locked,
.tg-engine .tg-meal-card.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.tg-engine .tg-card.is-complete::after,
.tg-engine .tg-meal-card.is-complete::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tg-green);
  box-shadow: 0 0 0 4px rgba(31, 122, 62, 0.18);
}

.tg-engine .tg-card.is-open {
  border-color: rgba(200, 25, 39, 0.22);
}

/* -------------------------------------------------------------------------- */
/* Badges                                                                     */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--tg-font-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  background: #ece8df;
  color: var(--tg-text-dark);
}

.tg-engine .tg-badge--red {
  background: var(--tg-red);
  color: #fff;
}

.tg-engine .tg-badge--green {
  background: var(--tg-green);
  color: #fff;
}

.tg-engine .tg-badge--tier-silver {
  background: #64748b;
  color: #fff;
}

.tg-engine .tg-badge--tier-gold {
  background: #c9a227;
  color: #1a1404;
}

.tg-engine .tg-badge--tier-platinum {
  background: #2c3e50;
  color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Callouts                                                                   */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-callout {
  padding: 14px 16px;
  border-radius: var(--tg-radius-sm);
  border: 1px solid rgba(26, 26, 26, 0.08);
  background: #fff;
  color: var(--tg-text-dark);
  font-size: 0.9375rem;
}

.tg-engine .tg-callout--warning {
  background: var(--tg-warning-bg);
  border-color: var(--tg-warning-border);
  color: var(--tg-warning-text);
}

.tg-engine .tg-success {
  padding: 18px 20px;
  border-radius: var(--tg-radius);
  background: var(--tg-green-tint);
  border: 1px solid var(--tg-green);
  color: #0d3b1d;
}

.tg-engine .tg-success .tg-heading {
  color: var(--tg-green);
}

.tg-engine .tg-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;
}

.tg-engine .tg-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.tg-engine .tg-dish__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.tg-engine .tg-dish .tg-heading,
.tg-engine .tg-meal-card .tg-heading {
  font-size: 1.15rem;
  margin: 0 0 8px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tg-engine .tg-dish .tg-muted,
.tg-engine .tg-meal-card .tg-muted {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tg-engine .tg-ticket .tg-btn {
  width: calc(100% - 40px);
  margin: 4px 20px 20px;
}

.tg-engine .tg-meal__counter.is-complete {
  border: 2px solid var(--tg-green);
  background: var(--tg-green-tint);
}

.tg-engine .tg-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.tg-engine .tg-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tg-text-dark);
}

.tg-engine .tg-input,
.tg-engine .tg-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(26, 26, 26, 0.14);
  border-radius: var(--tg-radius-sm);
  background: #fff;
  color: var(--tg-text-dark);
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tg-engine .tg-textarea {
  min-height: 112px;
  resize: vertical;
}

.tg-engine .tg-input:hover,
.tg-engine .tg-textarea:hover {
  border-color: rgba(31, 122, 62, 0.45);
}

.tg-engine .tg-input:focus-visible,
.tg-engine .tg-textarea:focus-visible {
  border-color: var(--tg-green);
  box-shadow: 0 0 0 3px rgba(31, 122, 62, 0.16);
}

.tg-engine .tg-error {
  margin: 0;
  color: var(--tg-red);
  font-size: 0.8125rem;
  font-weight: 600;
}

.tg-engine .tg-input[aria-invalid="true"],
.tg-engine .tg-textarea[aria-invalid="true"] {
  border-color: var(--tg-red);
}

/* Custom checkbox */
.tg-engine .tg-check {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid rgba(26, 26, 26, 0.28);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tg-engine .tg-check:hover {
  border-color: var(--tg-green);
}

.tg-engine .tg-check:checked {
  background: var(--tg-green);
  border-color: var(--tg-green);
}

.tg-engine .tg-check:checked::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.tg-engine .tg-check:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------- */
/* Pills                                                                      */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tg-engine .tg-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--tg-text-dark);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tg-engine .tg-pill:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow);
  border-color: var(--tg-green);
}

.tg-engine .tg-pill.is-active {
  background: var(--tg-green);
  border-color: var(--tg-green);
  color: #fff;
}

.tg-engine .tg-pill.is-disabled,
.tg-engine .tg-pill:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* -------------------------------------------------------------------------- */
/* Modal                                                                      */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tg-engine .tg-modal-overlay.is-open {
  display: flex;
}

.tg-engine .tg-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  background: var(--tg-card-bg);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
}

/* -------------------------------------------------------------------------- */
/* Catering layout                                                            */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-catering,
.tg-engine.tg-catering {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  max-width: 100%;
  min-width: 0;
}

.tg-engine .tg-catering__main {
  min-width: 0;
}

.tg-engine .tg-catering__ticket {
  position: sticky;
  top: 24px;
}

.tg-engine .tg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.tg-engine .tg-guest {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 280px);
  flex: 1;
}

.tg-engine .tg-guest input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--tg-border);
  outline: none;
  accent-color: var(--tg-green);
}

.tg-engine .tg-guest input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tg-green);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--tg-green);
}

.tg-engine .tg-guest input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tg-green);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--tg-green);
}

.tg-engine .tg-guest__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tg-engine .tg-guest__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tg-engine .tg-guest__num {
  font-size: 1.5rem;
  font-weight: 700;
}

.tg-engine .tg-guest__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-engine .tg-guest__row input[type="range"] {
  flex: 1;
  min-width: 0;
}

.tg-engine .tg-guest__number {
  width: 5.5rem;
  flex-shrink: 0;
  text-align: center;
  padding: 8px 10px;
}

.tg-engine .tg-stepper,
.tg-engine .tg-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  border-radius: 12px;
  background: #f4f4f5;
  overflow-x: auto;
}

.tg-engine .tg-step,
.tg-engine .tg-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 90px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tg-text-muted);
  font-family: var(--tg-font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tg-engine .tg-step:hover,
.tg-engine .tg-tab:hover {
  color: var(--tg-text-dark);
}

.tg-engine .tg-step__index {
  display: none;
}

.tg-engine .tg-step.is-active,
.tg-engine .tg-tab.is-active {
  background: #fff;
  color: var(--tg-green);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tg-engine .tg-step.is-picked:not(.is-active) {
  color: var(--tg-green);
}

.tg-engine .tg-step.is-skipped:not(.is-active):not(.is-picked) {
  opacity: 0.65;
}

.tg-engine .tg-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tg-engine .tg-cat-nav .tg-btn {
  width: auto;
}

.tg-engine .tg-cat-section {
  margin-bottom: 32px;
}

.tg-engine .tg-cat-section__title {
  margin: 0 0 16px;
  font-family: var(--tg-font-heading);
  font-size: 1.35rem;
  font-weight: 600;
}

.tg-engine .tg-dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tg-engine .tg-dish {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.tg-engine .tg-dish.tg-card {
  padding: 0;
}

.tg-engine .tg-dish__image {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}

.tg-engine .tg-dish__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}

.tg-engine .tg-dish__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tg-engine .tg-dish__meta .tg-metric {
  margin: 0;
}

.tg-engine .tg-check-dot {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--tg-border);
  display: inline-grid;
  place-items: center;
}

.tg-engine .tg-dish.is-selected .tg-check-dot {
  background: var(--tg-green);
  border-color: var(--tg-green);
}

.tg-engine .tg-dish.is-selected .tg-check-dot::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.tg-engine .tg-dish .tg-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tg-engine .tg-dish.is-selected,
.tg-engine .tg-dish.is-locked,
.tg-engine .tg-dish.is-complete {
  cursor: pointer;
}

.tg-engine .tg-dish.is-locked {
  cursor: not-allowed;
}

/* -------------------------------------------------------------------------- */
/* Kitchen ticket                                                             */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-ticket {
  background: var(--tg-ticket-bg);
  color: #fff;
  border: 0;
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  overflow: hidden;
}

.tg-engine .tg-ticket__head {
  padding: 20px 24px 16px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tg-engine .tg-ticket__head .tg-eyebrow {
  color: rgba(255, 255, 255, 0.4);
}

.tg-engine .tg-ticket__head .tg-heading {
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #fff;
}

.tg-engine .tg-ticket__head .tg-muted {
  color: rgba(255, 255, 255, 0.45);
}

.tg-engine .tg-ticket__body {
  padding: 16px 24px;
}

.tg-engine .tg-ticket__body .tg-muted {
  color: rgba(255, 255, 255, 0.45);
}

.tg-engine .tg-ticket__line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto auto;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.tg-engine .tg-ticket__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.tg-engine .tg-ticket__line:last-child,
.tg-engine .tg-ticket__row:last-child {
  border-bottom: 0;
}

.tg-engine .tg-ticket__totals {
  margin-top: 4px;
  padding: 12px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.tg-engine .tg-ticket__row--total {
  font-family: var(--tg-font-mono);
  font-weight: 600;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
  border-bottom: 0;
}

.tg-engine .tg-ticket__row--deposit {
  font-family: var(--tg-font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(200, 25, 39, 0.18);
  border: 1px solid rgba(200, 25, 39, 0.3);
  border-radius: 12px;
  margin: 10px 0 0;
  padding: 14px 16px;
}

.tg-engine .tg-ticket .tg-btn--red {
  background: var(--tg-green);
}

.tg-engine .tg-ticket .tg-btn--red:hover {
  background: var(--tg-green-hover);
}

/* -------------------------------------------------------------------------- */
/* Meal plan                                                                  */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-meal {
  padding-bottom: 8px;
}

.tg-engine .tg-meal > .tg-btn {
  align-self: flex-start;
  margin-top: 4px;
}

.tg-engine .tg-meal__banner {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--tg-radius);
  background: var(--tg-ticket-bg);
  color: #fff;
}

.tg-engine .tg-meal__banner .tg-heading {
  color: #fff;
  font-family: var(--tg-font-accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.tg-engine .tg-meal__banner .tg-muted {
  color: rgba(255, 255, 255, 0.45);
}

.tg-engine .tg-meal__price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(31, 122, 62, 0.18);
  border: 1px solid rgba(31, 122, 62, 0.35);
  color: #8fdfab;
  font-family: var(--tg-font-mono);
  font-weight: 700;
}

.tg-engine .tg-meal__slots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-engine .tg-meal__slot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--tg-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.tg-engine .tg-meal__slot.is-on {
  background: var(--tg-green);
  color: #fff;
}

.tg-engine .tg-meal__counter {
  display: none;
}

.tg-engine .tg-meal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  min-width: 0;
  margin-top: 24px;
}

.tg-engine .tg-meal-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  cursor: default;
}

.tg-engine .tg-meal-card.is-selected {
  border-color: var(--tg-green);
  box-shadow: 0 10px 25px -5px rgba(31, 122, 62, 0.15);
}

.tg-engine .tg-meal-card__hero {
  position: relative;
  min-height: 140px;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(15, 26, 18, 0.15) 0%, rgba(15, 26, 18, 0.88) 100%),
    linear-gradient(135deg, #1f7a3e 0%, #0f1a12 70%);
  color: #fff;
}

.tg-engine .tg-meal-card__hero .tg-eyebrow {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.tg-engine .tg-meal-card__hero .tg-heading {
  color: #fff;
  margin: 0;
  font-size: 1.1rem;
}

.tg-engine .tg-meal-card__mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tg-green);
  display: none;
  place-items: center;
  flex-shrink: 0;
}

.tg-engine .tg-meal-card.is-selected .tg-meal-card__mark {
  display: grid;
}

.tg-engine .tg-meal-card__mark::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.tg-engine .tg-meal-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tg-engine .tg-protein {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 0;
}

.tg-engine .tg-meal__banner-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.tg-engine .tg-meal__dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tg-engine .tg-protein__option {
  position: relative;
  padding: 10px 10px;
  border: 1px solid var(--tg-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: left;
}

.tg-engine .tg-protein__option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tg-engine .tg-protein__kicker {
  display: block;
  margin-bottom: 4px;
  font-family: var(--tg-font-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.tg-engine .tg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tg-engine .tg-chip {
  font-size: 10px;
  background: #f4f4f5;
  color: var(--tg-text-muted);
  padding: 3px 8px;
  border-radius: 999px;
}

.tg-engine .tg-meal__dock {
  position: sticky;
  bottom: 0;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-sm);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

.tg-engine .tg-meal__dock .tg-btn {
  width: auto;
}

.tg-engine .tg-protein__option:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow);
}

.tg-engine .tg-protein__option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* -------------------------------------------------------------------------- */
/* Skeleton                                                                   */
/* -------------------------------------------------------------------------- */

.tg-engine .tg-skeleton {
  border-radius: var(--tg-radius-sm);
  background: linear-gradient(90deg, #efeae2 0%, #f7f3ec 50%, #efeae2 100%);
  background-size: 200% 100%;
  animation: tg-pulse 1.2s ease-in-out infinite;
}

@keyframes tg-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 1100px) and (min-width: 768px) {
  .tg-engine {
    padding: 4px;
    font-size: 15px;
  }

  .tg-engine .tg-catering,
  .tg-engine.tg-catering {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
  }

  .tg-engine .tg-dish-grid,
  .tg-engine .tg-meal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .tg-engine .tg-card,
  .tg-engine .tg-dish,
  .tg-engine .tg-meal-card {
    padding: 14px;
  }

  .tg-engine .tg-dish.tg-card {
    padding: 0;
  }

  .tg-engine .tg-dish__body {
    padding: 14px;
  }

  .tg-engine .tg-dish .tg-heading,
  .tg-engine .tg-meal-card .tg-heading {
    font-size: 1.05rem;
  }

  .tg-engine .tg-ticket__head,
  .tg-engine .tg-ticket__body,
  .tg-engine .tg-ticket__totals {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tg-engine .tg-ticket .tg-btn {
    width: calc(100% - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }

  .tg-engine .tg-ticket__row--deposit {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .tg-engine .tg-heading {
    font-size: 1.45rem;
  }

  .tg-engine .tg-cat-section__title {
    font-size: 1.2rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Mobile                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .tg-engine {
    padding: 4px;
    font-size: 15px;
  }

  .tg-engine .tg-card,
  .tg-engine .tg-modal,
  .tg-engine .tg-meal__banner {
    padding: 16px;
  }

  .tg-engine .tg-dish.tg-card {
    padding: 0;
  }

  .tg-engine .tg-heading {
    font-size: 1.5rem;
  }

  .tg-engine .tg-catering,
  .tg-engine.tg-catering {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .tg-engine .tg-cat-nav .tg-btn {
    width: 100%;
  }

  .tg-engine .tg-catering__main {
    order: 1;
  }

  .tg-engine .tg-catering__ticket {
    position: static;
    top: auto;
    order: 2;
  }

  .tg-engine .tg-dish-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .tg-engine .tg-meal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tg-engine .tg-pills {
    flex-wrap: wrap;
  }

  .tg-engine .tg-guest {
    width: 100%;
    min-width: 0;
  }

  .tg-engine .tg-guest input[type="range"] {
    width: 100%;
  }

  .tg-engine .tg-modal-overlay {
    padding: 12px;
  }

  .tg-engine .tg-modal {
    width: 94vw;
    max-width: 94vw;
    max-height: 90vh;
    padding: 18px;
  }

  .tg-engine .tg-meal__banner {
    padding: 24px 18px;
  }

  .tg-engine .tg-meal__counter {
    top: 8px;
    padding: 10px 12px;
  }

  .tg-engine .tg-toolbar {
    margin-bottom: 16px;
    gap: 12px;
  }

  .tg-engine .tg-btn {
    width: 100%;
  }

  .tg-engine .tg-ticket__row--deposit {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media print {
  .tg-engine .tg-catering,
  .tg-engine.tg-catering {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .tg-engine .tg-btn,
  .tg-engine .tg-toolbar,
  .tg-engine .tg-modal-overlay {
    display: none !important;
  }

  .tg-engine .tg-ticket {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
