/* Trek Menu components. Every value comes from tokens.css; venue themes override the semantic layer only. */

.m2-venue { background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-sans); }
.m2-venue, .m2-venue * , [class^="m2-"], [class*=" m2-"] { box-sizing: border-box; }
[class^="m2-"], [class*=" m2-"] { -webkit-tap-highlight-color: transparent; }
.m2-icon { flex: none; display: block; }
.m2-spinner { display: inline-flex; animation: m2-spin 0.9s linear infinite; }
@keyframes m2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .m2-spinner { animation-duration: 2.4s; } }

:where(.m2-btn, .m2-iconbtn, .m2-chip, .m2-seg__opt, .m2-hubtile, .m2-catnav__item, .m2-link, .m2-card__title, .m2-stepper__btn, .m2-disclosure__btn, .m2-cartbar__btn, .m2-waiter__reason, .m2-gallery__dot, .m2-field__clear, .m2-toast__action, .m2-banner__close, .m2-chip__remove):focus-visible,
.m2-choice__input:focus-visible + .m2-choice__mark,
.m2-field__control:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 2px;
}

/* ---------- Button ---------- */
.m2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-size: 16px; line-height: 24px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer;
  padding: 0 var(--space-4); min-height: var(--control-md); text-decoration: none;
  transition: background-color 160ms cubic-bezier(0.2,0,0,1), border-color 160ms, color 160ms, transform 100ms;
}
.m2-btn:active:not(:disabled) { transform: scale(0.98); }
.m2-btn--sm { min-height: var(--control-sm); padding: 0 var(--space-3); font-size: 14px; line-height: 20px; }
.m2-btn--lg { min-height: var(--control-lg); padding: 0 var(--space-5); }
.m2-btn--full { width: 100%; }
.m2-btn--primary { background: var(--action-primary); color: var(--on-action); }
.m2-btn--primary:hover:not(:disabled) { background: var(--action-primary-hover); }
.m2-btn--secondary { background: var(--text-primary); color: var(--bg-surface); }
.m2-btn--secondary:hover:not(:disabled) { opacity: 0.88; }
.m2-btn--outline { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.m2-btn--outline:hover:not(:disabled) { background: var(--bg-sunken); }
.m2-btn--ghost { background: transparent; color: var(--text-primary); }
.m2-btn--ghost:hover:not(:disabled) { background: var(--bg-sunken); }
.m2-btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.m2-btn--danger:hover:not(:disabled) { background: var(--danger-soft); }
.m2-btn:disabled { background: var(--bg-disabled); color: var(--text-disabled); border-color: transparent; cursor: not-allowed; }
.m2-btn.is-loading:disabled { background: var(--action-primary); color: var(--on-action); cursor: progress; opacity: 0.85; }
.m2-btn__label { white-space: nowrap; }
.m2-btn__trailing { margin-left: auto; font-variant-numeric: tabular-nums; }
.m2-btn--full .m2-btn__trailing { padding-left: var(--space-3); }
.m2-btn--full:has(.m2-btn__trailing) { justify-content: space-between; }

/* ---------- IconButton ---------- */
.m2-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch-target); height: var(--touch-target); border-radius: var(--radius-full);
  border: 0; background: transparent; color: var(--text-primary); cursor: pointer; flex: none;
  transition: background-color 160ms, transform 100ms;
}
.m2-iconbtn:active { transform: scale(0.94); }
.m2-iconbtn--sm { width: var(--control-sm); height: var(--control-sm); }
.m2-iconbtn--ghost:hover { background: var(--bg-sunken); }
.m2-iconbtn--tonal { background: var(--bg-sunken); }
.m2-iconbtn--tonal:hover { background: var(--border); }
.m2-iconbtn--primary { background: var(--action-primary); color: var(--on-action); box-shadow: var(--elevation-1); }
.m2-iconbtn--primary:hover { background: var(--action-primary-hover); }
.m2-iconbtn--media { background: var(--media-control); color: var(--on-media); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.m2-iconbtn[aria-pressed="true"] { color: var(--action-primary); }
.m2-iconbtn--media[aria-pressed="true"] { color: var(--on-media); }
.m2-iconbtn__badge {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-full); background: var(--action-primary); color: var(--on-action);
  font: 700 11px/18px var(--font-sans); text-align: center;
}
/* small visual buttons keep a 48px hit area */
.m2-iconbtn--sm::after, .m2-btn--sm::after, .m2-stepper--sm .m2-stepper__btn::after { content: ""; position: absolute; inset: -6px; }
.m2-btn--sm, .m2-stepper--sm .m2-stepper__btn { position: relative; }

/* ---------- TextField ---------- */
.m2-field { display: flex; flex-direction: column; gap: var(--space-2); font-family: var(--font-sans); }
.m2-field__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.m2-field__box {
  display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-md);
  padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg-raised); color: var(--text-muted);
}
.m2-field--search .m2-field__box { border-color: transparent; background: var(--bg-sunken); border-radius: var(--radius-full); padding: 0 var(--space-2) 0 var(--space-4); min-height: var(--touch-target); }
.m2-field__box:focus-within { border-color: var(--text-primary); }
.m2-field__control {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-primary);
  font: 400 16px/24px var(--font-sans); padding: 10px 0; outline: none;
}
.m2-field__control:focus-visible { outline: none; }
.m2-field__box:has(.m2-field__control:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
textarea.m2-field__control { min-height: 88px; resize: vertical; }
.m2-field__control::placeholder { color: var(--text-muted); }
.m2-field__control::-webkit-search-cancel-button { -webkit-appearance: none; }
.m2-field__clear { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-muted); cursor: pointer; }
.m2-field__msg { display: flex; gap: var(--space-1); align-items: center; margin: 0; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-field__msg--error { color: var(--danger); }
.m2-field.is-error .m2-field__box { border-color: var(--danger); }

/* ---------- Chip ---------- */
.m2-chip {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-sm);
  padding: 0 var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--border-strong);
  background: var(--bg-raised); color: var(--text-primary); cursor: pointer; white-space: nowrap;
  font: 500 14px/18px var(--font-sans); position: relative; transition: background-color 160ms, border-color 160ms;
}
.m2-chip::after { content: ""; position: absolute; inset: -6px 0; }
.m2-chip:hover { background: var(--bg-sunken); }
.m2-chip.is-selected { background: var(--accent-soft); border-color: var(--action-primary); }
.m2-chip__count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.m2-chip__remove { display: inline-flex; border: 0; background: transparent; color: inherit; padding: 0; margin-right: -4px; cursor: pointer; border-radius: var(--radius-full); position: relative; z-index: 1; }

/* ---------- Badge, count, Tag ---------- */
.m2-badge {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2);
  border-radius: var(--radius-xs); font: 500 13px/18px var(--font-sans); white-space: nowrap;
}
.m2-badge--neutral { background: var(--bg-sunken); color: var(--text-muted); }
.m2-badge--brand { background: var(--accent-soft); color: var(--text-primary); }
.m2-badge--success { background: var(--success-soft); color: var(--success); }
.m2-badge--warning { background: var(--warning-soft); color: var(--warning); }
.m2-badge--danger { background: var(--danger-soft); color: var(--danger); }
.m2-badge--info { background: var(--info-soft); color: var(--info); }
.m2-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.m2-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--radius-full); background: var(--action-primary); color: var(--on-action);
  font: 700 12px/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
.m2-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: var(--radius-xs);
  font: 700 11px/16px var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.m2-tag--neutral { background: var(--bg-sunken); color: var(--text-primary); }
.m2-tag--brand { background: var(--action-primary); color: var(--on-action); }
.m2-tag--warning { background: var(--warning-soft); color: var(--warning); }
.m2-tag--danger { background: var(--danger-soft); color: var(--danger); }
.m2-tag--media.m2-tag--neutral, .m2-tag--media.m2-tag--warning, .m2-tag--media.m2-tag--danger { background: var(--media-control); color: var(--on-media); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---------- Price ---------- */
.m2-price { display: inline-flex; align-items: baseline; gap: var(--space-1); font-family: var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-primary); white-space: nowrap; }
.m2-price--md { font-size: 17px; line-height: 24px; font-weight: 600; }
.m2-price--lg { font-size: 22px; line-height: 28px; font-weight: 600; }
.m2-price--sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.m2-price__from { font-size: 0.8em; font-weight: 400; color: var(--text-muted); }
.m2-price__was { font-size: 0.8em; font-weight: 400; color: var(--text-muted); }
.m2-price--delta { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-muted); }

/* ---------- Rating ---------- */
.m2-rating { display: inline-flex; align-items: center; gap: var(--space-1); font: 600 14px/20px var(--font-sans); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.m2-rating__stars { display: inline-flex; gap: 2px; }
.m2-rating__slot { position: relative; display: inline-flex; }
.m2-rating__empty { color: var(--border-strong); }
.m2-rating__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--rating); display: inline-flex; }
.m2-rating__star { color: var(--rating); }
.m2-rating__count { font-weight: 400; color: var(--text-muted); }
.m2-rating--compact { font-size: 13px; line-height: 18px; gap: 3px; }
.m2-rating--media, .m2-rating--media .m2-rating__count { color: var(--on-media); }
.m2-stars-input { display: inline-flex; align-items: center; gap: var(--space-2); }
.m2-stars-input__row { display: inline-flex; }
.m2-stars-input__btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--border-strong); cursor: pointer; }
.m2-stars-input--sm .m2-stars-input__btn { width: 40px; height: 48px; }
.m2-stars-input__btn.is-on { color: var(--rating); }
.m2-stars-input__btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.m2-stars-input__word { font: 500 14px/20px var(--font-sans); color: var(--text-muted); }

/* ---------- Stepper ---------- */
.m2-stepper { display: inline-flex; align-items: center; border-radius: var(--radius-full); background: var(--bg-sunken); font-family: var(--font-sans); }
.m2-stepper__btn {
  display: inline-flex; align-items: center; justify-content: center; width: var(--touch-target); height: var(--touch-target);
  border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-primary); cursor: pointer;
}
.m2-stepper__btn:hover:not(:disabled) { background: var(--border); }
.m2-stepper__btn:disabled { color: var(--text-disabled); cursor: not-allowed; }
.m2-stepper__value { min-width: 28px; text-align: center; font: 600 17px/24px var(--font-sans); font-variant-numeric: tabular-nums; }
.m2-stepper--sm .m2-stepper__btn { width: var(--control-sm); height: var(--control-sm); }
.m2-stepper--sm .m2-stepper__value { min-width: 24px; font-size: 15px; }
.m2-stepper--lg .m2-stepper__btn { width: var(--control-lg); height: var(--control-lg); }
.m2-stepper--lg .m2-stepper__value { min-width: 36px; font-size: 20px; }

/* ---------- Checkbox, Radio, Switch ---------- */
.m2-choice {
  position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: var(--touch-target);
  padding: var(--space-2) 0; cursor: pointer; font-family: var(--font-sans); color: var(--text-primary);
}
.m2-choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.m2-choice__mark {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-strong); background: var(--bg-raised); color: transparent; transition: all 160ms cubic-bezier(0.2,0,0,1);
}
.m2-choice--checkbox .m2-choice__mark { border-radius: 6px; }
.m2-choice--radio .m2-choice__mark { border-radius: 50%; }
.m2-choice--switch { flex-direction: row-reverse; justify-content: space-between; }
.m2-choice--switch .m2-choice__text { margin-right: auto; }
.m2-choice--switch .m2-choice__mark { width: 44px; height: 26px; border-radius: 13px; justify-content: flex-start; padding: 2px; background: var(--border-strong); border: 0; }
.m2-choice--switch .m2-choice__mark::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--stone-0); box-shadow: var(--elevation-1); transition: transform 160ms cubic-bezier(0.2,0,0,1); }
.m2-choice__input:checked + .m2-choice__mark { border-color: var(--action-primary); background: var(--action-primary); color: var(--on-action); }
.m2-choice--radio .m2-choice__input:checked + .m2-choice__mark { background: var(--bg-raised); box-shadow: inset 0 0 0 5px var(--action-primary); border-color: var(--action-primary); }
.m2-choice--switch .m2-choice__input:checked + .m2-choice__mark::before { transform: translateX(18px); background: var(--on-action); }
.m2-choice__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.m2-choice__label { font-size: 16px; line-height: 22px; }
.m2-choice__desc { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-choice__aside { margin-left: auto; padding-left: var(--space-2); }
.m2-choice--switch .m2-choice__aside { display: none; }
.m2-choice.is-disabled { cursor: not-allowed; color: var(--text-disabled); }
.m2-choice.is-disabled .m2-choice__mark { border-color: var(--bg-disabled); background: var(--bg-disabled); }
.m2-choice.is-disabled .m2-choice__desc { color: var(--text-disabled); }

/* ---------- SegmentedControl ---------- */
.m2-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-full); background: var(--bg-sunken); }
.m2-seg__opt {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); min-height: var(--control-md); padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-muted); cursor: pointer;
  font: 500 14px/18px var(--font-sans); white-space: nowrap; transition: background-color 160ms, color 160ms;
}
.m2-seg__opt.is-selected { background: var(--bg-raised); color: var(--text-primary); box-shadow: var(--elevation-1); }

/* ---------- BottomSheet ---------- */
.m2-sheet-layer { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.m2-sheet-layer--inline { position: relative; inset: auto; min-height: 100%; }
.m2-sheet-overlay { position: absolute; inset: 0; background: var(--overlay); }
.m2-sheet {
  position: relative; background: var(--bg-raised); color: var(--text-primary); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--elevation-2); display: flex; flex-direction: column; max-height: 92%; font-family: var(--font-sans);
  animation: m2-sheet-in 240ms cubic-bezier(0,0,0,1);
}
@keyframes m2-sheet-in { from { transform: translateY(24px); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .m2-sheet { animation: none; } }
.m2-sheet--half { min-height: 50%; }
.m2-sheet--full { min-height: 92%; }
.m2-sheet__handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: var(--space-2) auto 0; opacity: 0.6; }
.m2-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-5) var(--space-2); }
.m2-sheet__title { margin: 0; font: 600 20px/28px var(--font-sans); letter-spacing: -0.01em; }
.m2-sheet__body { padding: 0 var(--space-5) var(--space-5); overflow: auto; }
.m2-sheet__foot { padding: var(--space-3) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); }

/* ---------- Toast, Banner ---------- */
.m2-toast {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--text-primary); color: var(--bg-surface); box-shadow: var(--elevation-1); font: 500 15px/20px var(--font-sans);
}
.m2-toast__msg { flex: 1; }
.m2-toast__action { border: 0; background: transparent; color: inherit; font: 700 15px/20px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: var(--space-2); margin: calc(var(--space-2) * -1); }
.m2-banner { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font: 400 14px/20px var(--font-sans); }
.m2-banner__icon { margin-top: 1px; }
.m2-banner__text { flex: 1; display: flex; flex-direction: column; gap: 2px; color: var(--text-primary); }
.m2-banner__title { font-weight: 600; }
.m2-banner--info { background: var(--info-soft); } .m2-banner--info .m2-banner__icon { color: var(--info); }
.m2-banner--success { background: var(--success-soft); } .m2-banner--success .m2-banner__icon { color: var(--success); }
.m2-banner--warning { background: var(--warning-soft); } .m2-banner--warning .m2-banner__icon { color: var(--warning); }
.m2-banner--danger { background: var(--danger-soft); } .m2-banner--danger .m2-banner__icon { color: var(--danger); }
.m2-banner__close { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; padding: 4px; margin: -4px; border-radius: var(--radius-full); }

/* ---------- Skeleton, EmptyState ---------- */
.m2-skel-group { display: flex; flex-direction: column; gap: var(--space-2); width: 100%; }
.m2-skel {
  display: block; background: var(--bg-sunken); border-radius: var(--radius-sm); position: relative; overflow: hidden;
}
.m2-skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--bg-raised), transparent); opacity: 0.6; animation: m2-shimmer 1.2s infinite;
}
@keyframes m2-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .m2-skel::after { animation: none; } }
.m2-skel--text { height: 14px; border-radius: 7px; }
.m2-skel--rect { border-radius: var(--radius-lg); }
.m2-skel--circle { border-radius: 50%; }
.m2-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); font-family: var(--font-sans); color: var(--text-primary); }
.m2-empty__icon { display: inline-flex; padding: var(--space-4); border-radius: 50%; background: var(--bg-sunken); color: var(--text-muted); }
.m2-empty__title { margin: 0; font: 600 20px/28px var(--font-sans); }
.m2-empty__text { margin: 0 0 var(--space-2); max-width: 300px; font: 400 15px/22px var(--font-sans); color: var(--text-muted); }

/* ---------- Media ---------- */
.m2-media { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--bg-sunken); width: 100%; }
.m2-media__el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.m2-media__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-muted); background: var(--bg-sunken); }
.m2-media.is-soldout .m2-media__el, .m2-media.is-soldout .m2-media__placeholder { opacity: 0.5; filter: grayscale(0.6); }
.m2-media__video-badge { position: absolute; left: var(--space-2); bottom: var(--space-2); display: inline-flex; padding: 5px; border-radius: 50%; background: var(--media-control); color: var(--on-media); }

/* ---------- VenueHeader ---------- */
.m2-venue-header { position: relative; color: var(--on-media); font-family: var(--font-sans); }
.m2-venue-header__cover { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.m2-venue-header__scrim { position: absolute; inset: 0; border-radius: 0 0 var(--radius-xl) var(--radius-xl); background: linear-gradient(180deg, var(--scrim-clear) 30%, var(--scrim) 100%), linear-gradient(0deg, var(--scrim-clear) 70%, rgba(12,10,9,0.35) 100%); pointer-events: none; }
.m2-venue-header__top { position: absolute; top: var(--space-3); left: var(--space-4); right: var(--space-4); display: flex; align-items: center; justify-content: space-between; }
.m2-venue-header__body { position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-5); }
.m2-venue-header__logo { display: block; max-height: 40px; max-width: 160px; margin-bottom: var(--space-2); }
.m2-venue-header__name { margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.02em; color: var(--on-media); }
.m2-venue-header__status { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; font-size: 14px; line-height: 20px; color: var(--on-media); }
.m2-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-400); box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
.m2-live-dot--off { background: var(--stone-400); box-shadow: 0 0 0 3px rgba(168,162,158,0.25); }
.m2-table-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full); background: var(--media-control); color: var(--on-media); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 600 14px/1 var(--font-sans); }

/* ---------- HubTile ---------- */
.m2-hubtile {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-raised); color: var(--text-primary);
  cursor: pointer; text-align: left; font-family: var(--font-sans); transition: background-color 160ms, transform 100ms;
}
.m2-hubtile:hover { background: var(--bg-sunken); }
.m2-hubtile:active { transform: scale(0.99); }
.m2-hubtile__icon { display: inline-flex; padding: 10px; border-radius: var(--radius-md); background: var(--bg-sunken); color: var(--text-primary); }
.m2-hubtile--primary { background: var(--action-primary); color: var(--on-action); border-color: transparent; }
.m2-hubtile--primary:hover { background: var(--action-primary-hover); }
.m2-hubtile--primary .m2-hubtile__icon { background: color-mix(in srgb, var(--on-action) 16%, transparent); color: var(--on-action); }
.m2-hubtile--primary .m2-hubtile__desc { color: var(--on-action); opacity: 0.9; }
.m2-hubtile__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.m2-hubtile__label { font-size: 16px; line-height: 22px; font-weight: 600; }
.m2-hubtile__desc { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-hubtile__chev { opacity: 0.6; }

/* ---------- CategoryNav ---------- */
.m2-catnav { position: sticky; top: 0; z-index: 5; background: var(--bg-surface); border-bottom: 1px solid var(--border); }
.m2-catnav__track { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-2) var(--space-4); scrollbar-width: none; }
.m2-catnav__track::-webkit-scrollbar { display: none; }
.m2-catnav__item {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-full);
  color: var(--text-muted); text-decoration: none; font: 500 15px/20px var(--font-sans); white-space: nowrap; transition: background-color 160ms, color 160ms;
}
.m2-catnav__item:hover { color: var(--text-primary); background: var(--bg-sunken); }
.m2-catnav__item.is-active { background: var(--text-primary); color: var(--bg-surface); font-weight: 600; }

/* ---------- ProductCard ---------- */
.m2-card { position: relative; font-family: var(--font-sans); color: var(--text-primary); }
.m2-card__title {
  display: block; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  font: 600 17px/24px var(--font-sans); border-radius: var(--radius-xs);
}
.m2-card__title::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.m2-card__add { position: relative; z-index: 1; }
.m2-card__add::after { content: ""; position: absolute; inset: -6px; } /* 48px to tap, 36px to see */
.m2-card__desc { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m2-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.m2-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-bottom: var(--space-2); }
.m2-card__tags--top { position: absolute; top: var(--space-2); left: var(--space-2); margin: 0; z-index: 1; }
.m2-card.is-soldout .m2-card__title, .m2-card.is-soldout .m2-price { color: var(--text-muted); }

.m2-card--list { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.m2-card--list .m2-card__body { flex: 1; min-width: 0; }
.m2-card--list .m2-card__media { position: relative; flex: none; width: 112px; align-self: flex-start; }
.m2-card--list .m2-card__media .m2-media { border-radius: var(--radius-md); }
.m2-card--list .m2-card__add { position: absolute; right: -6px; bottom: -6px; }

.m2-card--grid .m2-card__media { position: relative; }
.m2-card--grid .m2-card__add { position: absolute; right: var(--space-2); bottom: var(--space-2); }
.m2-card--grid .m2-card__body { padding-top: var(--space-2); }
.m2-card--grid .m2-card__title { font-size: 15px; line-height: 20px; }
.m2-card--grid .m2-card__meta { margin-top: 2px; }
.m2-card--grid .m2-price { font-size: 15px; line-height: 20px; }

.m2-card--hero { border-radius: var(--radius-lg); overflow: hidden; color: var(--on-media); }
.m2-card--hero .m2-media { border-radius: var(--radius-lg); }
.m2-card__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, var(--scrim-clear) 40%, var(--scrim) 100%); pointer-events: none; border-radius: var(--radius-lg); }
.m2-card__overlay { position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); display: flex; align-items: flex-end; gap: var(--space-3); }
.m2-card__overlay-text { flex: 1; min-width: 0; }
.m2-card--hero .m2-card__title { font-family: var(--font-display); font-size: 24px; line-height: 30px; letter-spacing: -0.01em; color: var(--on-media); }
.m2-card--hero .m2-price { color: var(--on-media); }
.m2-card--hero .m2-card__meta { margin-top: var(--space-1); }

/* ---------- Shelf ---------- */
.m2-shelf { font-family: var(--font-sans); }
.m2-shelf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); padding: 0 var(--space-4); margin-bottom: var(--space-3); }
.m2-shelf__title { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
.m2-shelf__sub { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-shelf__track { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: var(--space-3); overflow-x: auto; padding: 0 var(--space-4) var(--space-2); scroll-snap-type: x mandatory; scroll-padding: 0 var(--space-4); scrollbar-width: none; }
.m2-shelf__track::-webkit-scrollbar { display: none; }
.m2-shelf__track > * { scroll-snap-align: start; }
.m2-shelf__track--stack { display: block; padding: 0 var(--space-4); }
.m2-link { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; border: 0; background: transparent; padding: 0; color: var(--action-primary); font: 600 14px/20px var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap; border-radius: var(--radius-xs); }

/* ---------- MediaGallery ---------- */
.m2-gallery { position: relative; }
.m2-gallery .m2-media { border-radius: 0; }
.m2-gallery__top { position: absolute; top: var(--space-3); left: var(--space-4); right: var(--space-4); display: flex; justify-content: space-between; }
.m2-gallery__actions { display: flex; gap: var(--space-2); }
.m2-gallery__mute { position: absolute; right: var(--space-4); bottom: var(--space-4); }
.m2-gallery__dots { position: absolute; left: 0; right: 0; bottom: var(--space-4); display: flex; justify-content: center; gap: 0; }
.m2-gallery__dot { width: 24px; height: 24px; border: 0; padding: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); }
.m2-gallery__dot::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: var(--on-media); opacity: 0.55; transition: width 240ms cubic-bezier(0.2,0,0,1), opacity 160ms; box-shadow: 0 0 0 1px rgba(12,10,9,0.2); }
.m2-gallery__dot.is-active::before { width: 18px; opacity: 1; }

/* ---------- DietaryTag ---------- */
.m2-diet { display: inline-flex; align-items: center; gap: 4px; padding: 3px var(--space-2) 3px 6px; border-radius: var(--radius-full); border: 1px solid var(--border); font: 500 13px/18px var(--font-sans); color: var(--text-primary); white-space: nowrap; }
.m2-diet--icon { padding: 3px; border: 0; gap: 0; }
.m2-diet--plant .m2-icon { color: var(--success); }
.m2-diet--spicy .m2-icon { color: var(--danger); }
.m2-diet--allergen .m2-icon { color: var(--warning); }
.m2-diet--neutral .m2-icon { color: var(--text-muted); }

/* ---------- ProductInfo ---------- */
.m2-pinfo { font-family: var(--font-sans); color: var(--text-primary); }
.m2-pinfo__name { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.m2-pinfo__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); }
.m2-pinfo__rating { text-decoration: none; color: inherit; border-radius: var(--radius-xs); }
.m2-pinfo__desc { margin: var(--space-3) 0 0; font-size: 16px; line-height: 24px; color: var(--text-muted); }
.m2-pinfo__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); list-style: none; padding: 0; margin: var(--space-3) 0 0; font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-pinfo__diet { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.m2-pinfo__note { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--text-muted); }
.m2-disclosure { margin-top: var(--space-4); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.m2-disclosure__btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--touch-target); padding: 0; border: 0; background: transparent; color: var(--text-primary); font: 600 15px/20px var(--font-sans); cursor: pointer; }
.m2-disclosure__chev { transition: transform 240ms cubic-bezier(0.2,0,0,1); }
.m2-disclosure__btn[aria-expanded="true"] .m2-disclosure__chev { transform: rotate(180deg); }
.m2-disclosure__panel { padding-bottom: var(--space-4); font-size: 14px; line-height: 20px; color: var(--text-muted); }
.m2-disclosure__panel p { margin: 0 0 var(--space-2); }
.m2-disclosure__panel .m2-pinfo__note { margin: var(--space-3) 0 0; }

/* ---------- ModifierGroup ---------- */
.m2-modgroup { border: 0; margin: 0; padding: 0; font-family: var(--font-sans); }
.m2-modgroup__head { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: var(--space-2); padding: 0; margin-bottom: var(--space-1); }
.m2-modgroup__title { font: 600 15px/20px var(--font-sans); color: var(--text-primary); }
.m2-modgroup__options { display: flex; flex-direction: column; }
.m2-modgroup__options .m2-choice { border-bottom: 1px solid var(--border); }
.m2-modgroup__options .m2-choice:last-child { border-bottom: 0; }
.m2-modgroup.is-error .m2-field__msg { margin-bottom: var(--space-1); }

/* ---------- CartBar ---------- */
.m2-cartbar { padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
.m2-cartbar__btn {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 56px; padding: 0 var(--space-4) 0 var(--space-2);
  border: 0; border-radius: var(--radius-full); background: var(--action-primary); color: var(--on-action); box-shadow: var(--elevation-1);
  font: 600 16px/24px var(--font-sans); cursor: pointer; transition: background-color 160ms, transform 100ms;
}
.m2-cartbar__btn:hover { background: var(--action-primary-hover); }
.m2-cartbar__btn:active { transform: scale(0.99); }
.m2-cartbar__count { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 var(--space-2); border-radius: var(--radius-full); background: color-mix(in srgb, var(--on-action) 16%, transparent); font-variant-numeric: tabular-nums; animation: m2-bump 240ms cubic-bezier(0.2,0,0,1); }
@keyframes m2-bump { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .m2-cartbar__count { animation: none; } }
.m2-cartbar__label { flex: 1; text-align: left; }
.m2-cartbar .m2-cartbar__total { color: var(--on-action); font-size: 16px; }

/* ---------- CartLine ---------- */
.m2-cartline { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); font-family: var(--font-sans); color: var(--text-primary); }
.m2-cartline__thumb { flex: none; width: 56px; }
.m2-cartline__thumb .m2-media { border-radius: var(--radius-sm); }
.m2-cartline__body { flex: 1; min-width: 0; }
.m2-cartline__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.m2-cartline__top .m2-price { font-size: 15px; }
.m2-cartline__name { font: 600 16px/22px var(--font-sans); }
.m2-cartline__mods { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.m2-cartline__note { display: flex; align-items: center; gap: var(--space-1); margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--text-muted); font-style: italic; }
.m2-cartline__actions { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-2); }

/* ---------- OrderStatus ---------- */
.m2-status { font-family: var(--font-sans); color: var(--text-primary); }
.m2-status__steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.m2-status__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); text-align: center; }
.m2-status__step + .m2-status__step::before { content: ""; position: absolute; top: 19px; right: calc(50% + 24px); left: calc(-50% + 24px); height: 2px; border-radius: 1px; background: var(--border); }
.m2-status__step.is-done + .m2-status__step::before { background: var(--action-primary); }
.m2-status__mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-sunken); color: var(--text-muted); }
.m2-status__step.is-done .m2-status__mark { background: var(--action-primary); color: var(--on-action); }
.m2-status__step.is-current .m2-status__mark { background: var(--accent-soft); color: var(--text-primary); box-shadow: 0 0 0 2px var(--action-primary); }
.m2-status__label { font: 600 14px/20px var(--font-sans); }
.m2-status__step.is-todo .m2-status__label { color: var(--text-muted); font-weight: 500; }
.m2-status__time { font-size: 13px; line-height: 18px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.m2-status__live { margin: var(--space-4) 0 0; text-align: center; font-size: 15px; line-height: 22px; color: var(--text-muted); }
.m2-status__live:empty { display: none; }

/* ---------- CallWaiter ---------- */
.m2-waiter { font-family: var(--font-sans); }
.m2-waiter__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.m2-waiter__reason {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); min-height: 104px; padding: var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-raised); color: var(--text-primary);
  font: 600 15px/20px var(--font-sans); text-align: left; cursor: pointer;
}
.m2-waiter__reason:hover { background: var(--bg-sunken); }
.m2-waiter--sent { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; padding: var(--space-6) 0; }
.m2-waiter__ok { color: var(--success); }
.m2-waiter--sent:not(.is-acknowledged) .m2-waiter__ok { color: var(--text-muted); }
.m2-waiter__msg { margin: 0; font: 600 17px/24px var(--font-sans); color: var(--text-primary); }

/* ---------- ConsentBanner ---------- */
.m2-consent { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--bg-raised); border: 1px solid var(--border); box-shadow: var(--elevation-1); font-family: var(--font-sans); color: var(--text-primary); }
.m2-consent__icon { color: var(--text-muted); }
.m2-consent__body { flex: 1 1 200px; min-width: 0; }
.m2-consent__title { margin: 0 0 2px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.m2-consent__text { flex: 1 1 200px; margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.m2-consent--choice { align-items: flex-start; }
.m2-consent--choice .m2-consent__actions { flex: 1 1 100%; margin-left: 0; }
.m2-consent--choice .m2-consent__actions > * { flex: 1 1 0; }
.m2-consent__actions { display: flex; gap: var(--space-2); margin-left: auto; }
