/*
 * Medius Tickets - Phase 2 UI components (plain CSS, no build step).
 * Everything uses the semantic tokens defined in Layout::head (--c-*), so it is correct in light and dark.
 * Class prefix "mt-" keeps these rules apart from Tailwind utilities.
 */

/* The hidden attribute must win over Tailwind display utilities (.flex, .btn, ...). */
[hidden] { display: none !important; }

/* ---------- generic helpers ---------- */
.mt-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mt-stretch:focus-visible { outline: none; }
.mt-stretch:focus-visible::after { outline: 2px solid rgb(var(--c-link)); outline-offset: 2px; border-radius: 1rem; }
.mt-nowrap { white-space: nowrap; }
.mt-tabular { font-variant-numeric: tabular-nums; }
body.mt-lock { overflow: hidden; }

/* ---------- header cart badge ---------- */
.mt-badge-count {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px;
  background: rgb(var(--c-accent)); color: rgb(var(--c-accent-fg)); font-size: 11px; line-height: 18px; font-weight: 700;
  text-align: center; box-shadow: 0 0 0 2px rgb(var(--c-surface));
}
.mt-badge-count[hidden] { display: none; }
.mt-badge-count.is-bump { animation: mt-bump .35s ease; }
@keyframes mt-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- cart drawer ---------- */
.mt-cart { position: fixed; inset: 0; z-index: 90; }
.mt-cart[hidden] { display: none; }
.mt-cart-backdrop { position: absolute; inset: 0; background: rgb(8 15 28 / .55); opacity: 0; transition: opacity .2s ease; }
.mt-cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(100%, 26rem); display: flex; flex-direction: column;
  background: rgb(var(--c-surface)); color: rgb(var(--c-body)); border-left: 1px solid rgb(var(--c-line));
  box-shadow: -12px 0 40px -12px rgb(0 0 0 / .35); transform: translateX(100%); transition: transform .22s ease; outline: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.mt-cart.is-open .mt-cart-backdrop { opacity: 1; }
.mt-cart.is-open .mt-cart-panel { transform: translateX(0); }
.mt-cart-line { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .875rem 0; border-bottom: 1px solid rgb(var(--c-line)); }

/* ---------- favourites ---------- */
.mt-fav {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px;
  color: rgb(var(--c-body)); transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.mt-fav:hover { background: rgb(var(--c-surface2)); }
.mt-fav svg { transition: fill .15s ease, transform .15s ease; }
.mt-fav[aria-pressed="true"] { color: rgb(var(--c-danger)); }
.mt-fav[aria-pressed="true"] svg { fill: currentColor; }
.mt-fav:active svg { transform: scale(.88); }
.mt-fav-hero { color: #fff; }
.mt-fav-hero:hover { background: rgb(255 255 255 / .12); }
.mt-fav-hero[aria-pressed="true"] { color: #fca5a5; }
.mt-fav-card { position: absolute; top: .5rem; right: .5rem; z-index: 2; background: rgb(10 31 51 / .62); color: #fff; backdrop-filter: blur(6px); }
.mt-fav-card:hover { background: rgb(10 31 51 / .82); }
.mt-fav-card[aria-pressed="true"] { color: #fca5a5; }

/* ---------- pills / meters ---------- */
.mt-pill { display: inline-flex; align-items: center; gap: .3rem; border-radius: 9999px; padding: .25rem .6rem; font-size: .75rem; font-weight: 700; line-height: 1.1; }
.mt-pill-urgent { background: #FDBA74; color: #3B1A00; }
.mt-pill-out { background: #B91C1C; color: #fff; }
.mt-pill-ok { background: rgb(var(--c-success) / .16); color: rgb(var(--c-success)); }
.mt-meter { height: 6px; border-radius: 9999px; background: rgb(var(--c-line)); overflow: hidden; margin-top: .3rem; }
.mt-meter > span { display: block; height: 100%; border-radius: inherit; background: rgb(var(--c-accent)); transition: width .4s ease; }
.mt-capacity { margin-top: .15rem; }

/* ---------- countdown ---------- */
.mt-cd { display: inline-flex; gap: .5rem; align-items: stretch; }
.mt-cd-unit {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 3.4rem; padding: .45rem .5rem;
  border-radius: .75rem; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .2); color: #fff; backdrop-filter: blur(6px);
}
.mt-cd-unit b { font-size: 1.5rem; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.mt-cd-unit span { font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.mt-cd-lg .mt-cd-unit { min-width: 4.4rem; padding: .7rem .6rem; }
.mt-cd-lg .mt-cd-unit b { font-size: 2.1rem; }
.mt-cd-plain .mt-cd-unit { background: rgb(var(--c-surface2)); border-color: rgb(var(--c-line)); color: rgb(var(--c-body)); backdrop-filter: none; }

/* ---------- carousel ---------- */
.mt-carousel { position: relative; background: #0A1F33; }
.mt-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.mt-track::-webkit-scrollbar { display: none; }
.mt-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; min-height: 26rem; color: #fff; display: flex; align-items: flex-end; }
@media (min-width: 640px) { .mt-slide { min-height: 32rem; } }
.mt-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-slide-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgb(10 31 51 / .94) 0%, rgb(10 31 51 / .62) 42%, rgb(10 31 51 / .18) 100%); }
.mt-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 9999px; display: inline-flex;
  align-items: center; justify-content: center; background: rgb(10 31 51 / .6); color: #fff; border: 1px solid rgb(255 255 255 / .25); backdrop-filter: blur(6px);
}
.mt-carousel-btn:hover { background: rgb(10 31 51 / .85); }
.mt-carousel-btn:focus-visible, .mt-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mt-dots { display: flex; align-items: center; gap: .25rem; }
.mt-dot { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; }
.mt-dot::before { content: ""; width: 10px; height: 10px; border-radius: 9999px; background: rgb(255 255 255 / .45); transition: width .2s ease, background-color .2s ease; }
.mt-dot[aria-current="true"]::before { width: 28px; background: #fff; }

/* ---------- ticket tier cards + stepper ---------- */
.mt-tier { border: 1px solid rgb(var(--c-line)); border-radius: 1rem; background: rgb(var(--c-surface)); padding: 1rem 1.1rem; transition: border-color .15s ease, box-shadow .15s ease; }
.mt-tier:hover, .mt-tier:focus-within { border-color: rgb(var(--c-link) / .55); box-shadow: 0 8px 24px -14px rgb(15 23 42 / .35); }
.mt-tier.is-selected { border-color: rgb(var(--c-accent)); box-shadow: 0 0 0 1px rgb(var(--c-accent)); }
.mt-tier.is-soldout { opacity: .65; }
.mt-stepper { display: inline-flex; align-items: center; border: 1px solid rgb(var(--c-line-strong)); border-radius: .75rem; background: rgb(var(--c-surface2)); }
.mt-stepper button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: .75rem; color: rgb(var(--c-body));
}
.mt-stepper button:hover:not(:disabled) { background: rgb(var(--c-line)); }
.mt-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.mt-stepper input {
  width: 3rem; height: 44px; text-align: center; background: transparent; color: rgb(var(--c-body)); font-weight: 700; border: 0; outline: none;
  -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums;
}
.mt-stepper input::-webkit-outer-spin-button, .mt-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mt-stepper:focus-within { outline: 2px solid rgb(var(--c-link)); outline-offset: 2px; }
.mt-benefits { display: grid; gap: .25rem; margin-top: .4rem; }
.mt-benefits li { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; color: rgb(var(--c-muted)); }
.mt-benefits svg { flex: none; margin-top: .15rem; color: rgb(var(--c-success)); }

/* ---------- wizard ---------- */
.mt-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.mt-step { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; font-size: .75rem; font-weight: 600; color: rgb(var(--c-muted)); }
.mt-step-dot {
  width: 2rem; height: 2rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgb(var(--c-line-strong)); background: rgb(var(--c-surface)); color: rgb(var(--c-muted)); font-weight: 700; font-size: .85rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.mt-step.is-current { color: rgb(var(--c-body)); }
.mt-step.is-current .mt-step-dot { border-color: rgb(var(--c-accent)); color: rgb(var(--c-accent)); }
.mt-step.is-done .mt-step-dot { background: rgb(var(--c-accent)); border-color: rgb(var(--c-accent)); color: rgb(var(--c-accent-fg)); }
.mt-step button { display: inline-flex; flex-direction: column; align-items: center; gap: .35rem; min-height: 44px; font: inherit; color: inherit; }
.mt-progress { height: 6px; border-radius: 9999px; background: rgb(var(--c-line)); overflow: hidden; margin-top: .75rem; }
.mt-progress > span { display: block; height: 100%; background: rgb(var(--c-accent)); border-radius: inherit; transition: width .3s ease; }
.mt-panel[hidden] { display: none; }
.mt-panel.is-entering { animation: mt-fade-up .25s ease both; }
@keyframes mt-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mt-field-error { display: flex; gap: .4rem; align-items: flex-start; margin-top: .5rem; padding: .6rem .8rem; border-radius: .6rem; font-size: .875rem; font-weight: 500;
  background: rgb(var(--c-danger) / .1); border: 1px solid rgb(var(--c-danger) / .35); color: rgb(var(--c-danger)); }
.mt-field-error[hidden] { display: none; }

.mt-radio-card {
  display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid rgb(var(--c-line-strong)); border-radius: .9rem;
  background: rgb(var(--c-surface)); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.mt-radio-card:hover { border-color: rgb(var(--c-link)); }
.mt-radio-card:has(input:checked) { border-color: rgb(var(--c-accent)); background: rgb(var(--c-accent) / .07); box-shadow: 0 0 0 1px rgb(var(--c-accent)); }
.mt-radio-card:has(input:focus-visible) { outline: 2px solid rgb(var(--c-link)); outline-offset: 2px; }
.mt-radio-card input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: rgb(var(--c-accent)); flex: none; }
.mt-radio-icon { flex: none; width: 2.5rem; height: 2.5rem; border-radius: .65rem; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--c-surface2)); color: rgb(var(--c-link)); }

.mt-submit-loading { position: relative; pointer-events: none; }
.mt-spinner { width: 1.1rem; height: 1.1rem; border-radius: 9999px; border: 2px solid currentColor; border-right-color: transparent; animation: mt-spin .7s linear infinite; display: inline-block; }
@keyframes mt-spin { to { transform: rotate(360deg); } }

/* ---------- sticky summary + mobile bar ---------- */
.mt-summary { position: sticky; top: 5rem; }
.mt-mobilebar {
  position: fixed; left: 0; right: 0; z-index: 40; bottom: calc(56px + env(safe-area-inset-bottom)); background: rgb(var(--c-surface) / .96);
  border-top: 1px solid rgb(var(--c-line)); backdrop-filter: blur(10px); padding: .6rem 1rem; display: flex; align-items: center; gap: .75rem;
}
@media (min-width: 768px) { .mt-mobilebar { bottom: env(safe-area-inset-bottom); } }
@media (min-width: 1024px) { .mt-mobilebar { display: none; } }
.mt-mobilebar[hidden] { display: none; }
@media (max-width: 1023px) { .mt-event-main { padding-bottom: 5rem; } }

/* ---------- toast ---------- */
.mt-toast {
  position: fixed; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 120; opacity: 0; pointer-events: none;
  background: rgb(var(--c-body)); color: rgb(var(--c-page)); padding: .65rem 1rem; border-radius: .75rem; font-size: .875rem; font-weight: 600;
  transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 2rem);
}
.mt-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- seat map ---------- */
.mt-map { position: relative; height: min(70vh, 480px); background: rgb(var(--c-surface)); border: 1px solid rgb(var(--c-line)); border-radius: 1rem; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.mt-map.is-dragging { cursor: grabbing; }
.mt-map svg { display: block; width: 100%; height: 100%; }
.mt-map-tools { position: absolute; right: .5rem; top: .5rem; display: flex; flex-direction: column; gap: .25rem; z-index: 2; }
.mt-map-tools button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: .7rem; background: rgb(var(--c-surface));
  border: 1px solid rgb(var(--c-line-strong)); color: rgb(var(--c-body)); box-shadow: 0 2px 8px -2px rgb(0 0 0 / .25);
}
.mt-map-tools button:hover:not(:disabled) { background: rgb(var(--c-surface2)); }
.mt-map-tools button:disabled { opacity: .4; cursor: not-allowed; }
.mt-stage-bar { fill: rgb(var(--c-accent) / .14); stroke: rgb(var(--c-accent) / .45); }
.mt-stage-text, .mt-sec-title, .mt-row-label { fill: rgb(var(--c-muted)); font-family: Inter, system-ui, sans-serif; }
.mt-stage-text { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mt-sec-title { font-size: 14px; font-weight: 700; fill: rgb(var(--c-body)); }
.mt-sec-sub { font-size: 11px; fill: rgb(var(--c-muted)); font-family: Inter, system-ui, sans-serif; }
.mt-row-label { font-size: 10px; font-weight: 600; }
.mt-sec-bg { fill: rgb(var(--c-surface2) / .7); stroke: rgb(var(--c-line)); stroke-width: 1; transition: stroke .15s ease, fill .15s ease; }
.mt-sec.is-hot .mt-sec-bg { stroke: rgb(var(--c-link)); stroke-width: 2; fill: rgb(var(--c-link) / .08); }
.mt-seat { cursor: pointer; outline: none; }
.mt-seat rect { stroke-width: 1.3; transition: fill .12s ease, stroke .12s ease; }
.mt-seat text { font-family: Inter, system-ui, sans-serif; font-size: 9.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; fill: rgb(var(--c-body)); }
.mt-seat.is-free rect { fill: rgb(var(--c-success) / .16); stroke: rgb(var(--c-success)); }
.mt-seat.is-few rect { fill: rgb(var(--c-warning) / .22); stroke: rgb(var(--c-warning)); stroke-dasharray: 3 2; }
.mt-seat.is-limit rect { fill: rgb(var(--c-warning) / .1); stroke: rgb(var(--c-warning) / .6); stroke-dasharray: 3 2; }
.mt-seat.is-limit { cursor: not-allowed; }
.mt-seat.is-taken { cursor: not-allowed; }
.mt-seat.is-taken rect { fill: rgb(var(--c-danger) / .14); stroke: rgb(var(--c-danger) / .65); }
.mt-seat.is-taken text { fill: rgb(var(--c-danger)); }
.mt-seat.is-selected rect { fill: rgb(var(--c-accent)); stroke: rgb(var(--c-accent)); stroke-dasharray: none; }
.mt-seat.is-selected text { fill: rgb(var(--c-accent-fg)); }
.mt-seat.is-free:hover rect, .mt-seat.is-few:hover rect { stroke-width: 2.4; }
.mt-seat:focus-visible rect { stroke: rgb(var(--c-link)); stroke-width: 3; stroke-dasharray: none; }
.mt-map.is-far .mt-seat text { display: none; }
.mt-legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: rgb(var(--c-muted)); }
.mt-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid; vertical-align: -2px; margin-right: .35rem; }
.mt-legend .l-free { background: rgb(var(--c-success) / .16); border-color: rgb(var(--c-success)); }
.mt-legend .l-few { background: rgb(var(--c-warning) / .22); border: 1.5px dashed rgb(var(--c-warning)); }
.mt-legend .l-taken { background: rgb(var(--c-danger) / .14); border-color: rgb(var(--c-danger) / .65); }
.mt-legend .l-sel { background: rgb(var(--c-accent)); border-color: rgb(var(--c-accent)); }
.mt-seat-chip { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .35rem .35rem .75rem; border: 1px solid rgb(var(--c-line)); border-radius: .7rem; background: rgb(var(--c-surface)); font-size: .875rem; }
.mt-seat-chip button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: .6rem; color: rgb(var(--c-muted)); }
.mt-seat-chip button:hover { background: rgb(var(--c-surface2)); color: rgb(var(--c-danger)); }

/* ---------- events listing ---------- */
.mt-pillbar { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 1rem .75rem; margin: 0 -1rem; scrollbar-width: thin; }
.mt-count { display: inline-flex; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; align-items: center; justify-content: center; border-radius: 9999px; font-size: .7rem; font-weight: 700; background: rgb(var(--c-surface2)); color: rgb(var(--c-muted)); }
.btn-primary .mt-count { background: rgb(255 255 255 / .22); color: inherit; }
.mt-cat-card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: 1rem; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-surface)); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mt-cat-card:hover { transform: translateY(-3px); border-color: rgb(var(--c-link) / .6); box-shadow: 0 12px 28px -16px rgb(15 23 42 / .4); }
.mt-cat-icon { width: 2.75rem; height: 2.75rem; border-radius: .8rem; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--c-accent) / .1); color: rgb(var(--c-link)); }
.mt-fade-in { animation: mt-fade-up .35s ease both; }

/* ---------- top matches ---------- */
.mt-match { position: relative; display: flex; flex-direction: column; gap: .85rem; padding: 1.1rem; border-radius: 1rem; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-surface)); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mt-match:hover, .mt-match:focus-within { transform: translateY(-3px); border-color: rgb(var(--c-link) / .55); box-shadow: 0 14px 30px -18px rgb(15 23 42 / .45); }
.mt-logo { width: 4rem; height: 4rem; border-radius: 1rem; background: #fff; border: 1px solid rgb(var(--c-line)); padding: .35rem; object-fit: contain; flex: none; }
.mt-logo-fallback { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 1rem; background: rgb(var(--c-surface2)); color: rgb(var(--c-link)); font-weight: 800; font-size: 1.25rem; flex: none; }
.mt-logo-lg { width: 6rem; height: 6rem; }
@media (min-width: 640px) { .mt-logo-lg { width: 8rem; height: 8rem; } }
.mt-vs { font-weight: 800; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
  .mt-track { scroll-behavior: auto; }
  .mt-cart-panel, .mt-cart-backdrop, .mt-toast { transition: none; }
  .mt-panel.is-entering, .mt-fade-in, .mt-badge-count.is-bump { animation: none; }
}

/* =====================================================================================================
   Phase 3: account dashboard, digital ticket cards, fullscreen QR, orders, transfer
   ===================================================================================================== */
.mt-pill-muted { background: rgb(var(--c-surface2)); color: rgb(var(--c-muted)); border: 1px solid rgb(var(--c-line)); }
.mt-pill-bad { background: rgb(var(--c-danger) / .14); color: rgb(var(--c-danger)); }
.mt-pill-warn { background: rgb(var(--c-warning) / .16); color: rgb(var(--c-warning)); }

/* ---------- ticket card ---------- */
.mt-tk {
  --tk: #10395B; --tk-notch: var(--c-page);
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: rgb(var(--c-surface)); color: rgb(var(--c-body)); border: 1px solid rgb(var(--c-line)); border-radius: 1.25rem; overflow: hidden;
  box-shadow: 0 1px 2px rgb(15 23 42 / .06), 0 12px 28px -16px rgb(15 23 42 / .28);
}
/* Always-dark boarding-pass variant (ticket page): local dark tokens so every token class inside resolves dark. */
.mt-tk-dark {
  --c-surface: 17 24 39; --c-surface2: 30 41 59; --c-line: 51 65 85; --c-line-strong: 113 128 150;
  --c-body: 241 245 249; --c-muted: 148 163 184; --c-link: 96 165 250; --c-accent: 37 99 235; --c-accent-hover: 59 130 246;
  --c-success: 74 222 128; --c-danger: 248 113 113; --c-warning: 251 146 60;
  color-scheme: dark;
}
:root:not(.dark) .mt-tk-dark { --tk-notch: 248 250 252; }
:root.dark .mt-tk-dark { --tk-notch: 15 23 42; }
.mt-tk-hero { position: relative; height: 6.5rem; background: linear-gradient(135deg, var(--tk), #0A1F33); overflow: hidden; flex: none; }
.mt-tk-hero-full { height: 9rem; }
.mt-tk-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--tk); }
.mt-tk-body { padding: 1rem 1.25rem; }
.mt-tk-perf { position: relative; height: 0; margin: 0 1rem; border-top: 2px dashed rgb(var(--c-line-strong) / .55); }
.mt-tk-perf::before, .mt-tk-perf::after {
  content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 9999px;
  background: rgb(var(--tk-notch)); border: 1px solid rgb(var(--c-line));
}
.mt-tk-perf::before { left: calc(-1rem - 12px); }
.mt-tk-perf::after { right: calc(-1rem - 12px); }
.mt-tk-qrwrap { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.5rem 1.25rem .5rem; }
.mt-tk-qr {
  display: flex; align-items: center; justify-content: center; width: min(100%, 13rem); aspect-ratio: 1; padding: .6rem;
  background: #fff; border-radius: .9rem; box-shadow: inset 0 0 0 1px rgb(15 23 42 / .12);
}
.mt-tk-full .mt-tk-qr { width: min(100%, 16rem); }
.mt-tk-qr svg { display: block; width: 100%; height: 100%; }
.mt-tk-qrwrap.is-inactive .mt-tk-qr { opacity: .35; filter: grayscale(1); }
.mt-tk-note { margin: .5rem 1.25rem 0; padding: .75rem; border-radius: .75rem; background: rgb(var(--c-surface2)); border: 1px solid rgb(var(--c-line)); }
.mt-tk-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem 1.25rem 1.25rem; margin-top: auto; }
.mt-tk-actions .btn { flex: 1 1 auto; }

/* carousel: scroll-snap on small screens, grid from md */
.mt-tk-track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: .25rem 1rem 1rem; margin: 0 -1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 1.25rem;
}
.mt-tk-track::-webkit-scrollbar { display: none; }
.mt-tk-slide { flex: 0 0 min(88%, 22rem); scroll-snap-align: center; display: flex; flex-direction: column; }
.mt-tk-slide > .mt-tk { flex: 1; }
.mt-tk-carousel[data-tk-carousel="0"] .mt-tk-slide { flex-basis: 100%; }
.mt-tk-dots { display: flex; align-items: center; justify-content: center; gap: .25rem; }
.mt-tk-dot { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; }
.mt-tk-dot::before { content: ""; width: 10px; height: 10px; border-radius: 9999px; background: rgb(var(--c-line-strong) / .6); transition: width .2s ease, background-color .2s ease; }
.mt-tk-dot[aria-current="true"]::before { width: 28px; background: rgb(var(--c-link)); }
@media (min-width: 768px) {
  .mt-tk-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
  .mt-tk-slide, .mt-tk-carousel[data-tk-carousel="0"] .mt-tk-slide { flex: none; }
  .mt-tk-dots { display: none !important; }
}

/* ---------- fullscreen QR ---------- */
.mt-qr-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgb(8 12 22 / .94); color: #fff; }
.mt-qr-panel { width: min(100%, 30rem); max-height: 100%; overflow-y: auto; text-align: center; padding: .5rem; }
.mt-qr-big { width: min(86vw, 62vh, 26rem); aspect-ratio: 1; margin: 1rem auto; padding: 1rem; background: #fff; border-radius: 1.25rem; }
.mt-qr-big svg { display: block; width: 100%; height: 100%; }
.mt-qr-close { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 1.25rem; border-radius: .6rem; background: #fff; color: #0A1F33; font-weight: 700; }
.mt-qr-close:focus-visible { outline: 3px solid #7CC0E8; outline-offset: 3px; }

/* ---------- dashboard ---------- */
.mt-next { position: relative; overflow: hidden; border-radius: 1.25rem; color: #fff; background: linear-gradient(135deg, var(--tk, #10395B), #0A1F33); }
.mt-next-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-next::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgb(10 31 51 / .94), rgb(10 31 51 / .6)); }
.mt-next > .mt-next-in { position: relative; z-index: 2; }
.mt-tile { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; }
.mt-saved-card { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.mt-saved-card .mt-saved-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #10395B, #0A1F33); overflow: hidden; }
.mt-saved-card .mt-saved-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- filter pills (orders) ---------- */
.mt-filter { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem 1rem; border-radius: 9999px; border: 1px solid rgb(var(--c-line-strong)); color: rgb(var(--c-body)); font-size: .875rem; font-weight: 600; background: transparent; }
.mt-filter:hover { background: rgb(var(--c-surface2)); }
.mt-filter[aria-pressed="true"] { background: rgb(var(--c-accent)); color: rgb(var(--c-accent-fg)); border-color: rgb(var(--c-accent)); }
.mt-order > summary { list-style: none; cursor: pointer; }
.mt-order > summary::-webkit-details-marker { display: none; }
.mt-order[open] .mt-order-chev { transform: rotate(180deg); }
.mt-order-chev { transition: transform .2s ease; }

/* ---------- printable ticket page ---------- */
@media print {
  header, footer, body > nav, #mt-cart, .no-print, .mt-toast { display: none !important; }
  body { background: #fff !important; padding-bottom: 0 !important; }
  .mt-tk { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-tk-track { scroll-behavior: auto; }
  .mt-tk-dot::before, .mt-order-chev { transition: none; }
}
