/* Phone flight results — Aviasales-style (js/m-flight.js, owner Oct 2026).
   Everything is mf- prefixed and only exists on ≤768px when the module draws. */

/* the page's own sort tabs + filter button give way to the quick chips */
@media (max-width: 768px) {
  body.mf-on .results-header .sort-tabs,
  body.mf-on .results-header .filters-toggle { display: none !important; }
  body.mf-on .results-header { margin-bottom: 6px; }
  body.mf-on .results-count { font-size: 13px; color: #6b7280; }
}
html.mf-lock, html.mf-lock body { overflow: hidden; }

/* ── quick chips ─────────────────────────────────────────────────────────── */
.mf-quick {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.mf-quick::-webkit-scrollbar { display: none; }
.mf-q {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid #e3e7ee; background: #fff; color: #111827;
  font: inherit; font-size: 15px; font-weight: 500; white-space: nowrap; cursor: pointer;
  
}
.mf-q svg { width: 18px; height: 18px; }
.mf-q-ic { width: 48px; padding: 0; justify-content: center; }
.mf-q.is-on { background: #0B3AD6; border-color: #0B3AD6; color: #fff; }
.mf-q b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: #0B3AD6; font-size: 12px; }

/* ── list cards ──────────────────────────────────────────────────────────── */
/* margins, not a flex gap: js/results.js sets display:block inline on the list */
.results-list.mf-list { padding-top: 6px; }
.mf-list .mf-card + .mf-card { margin-top: 16px; }
.mf-list .mf-card:has(.mf-badges) { margin-top: 22px; }
.mf-list .mf-card:first-child { margin-top: 6px; }
.mf-card {
  position: relative; background: #fff; border-radius: 20px; padding: 16px 16px 14px;
   cursor: pointer; -webkit-tap-highlight-color: transparent;
  outline: none;
}
.mf-card:active { transform: scale(.995); }
.mf-card:focus-visible { box-shadow: 0 0 0 3px rgba(11,58,214,.35); }
.mf-badges { position: absolute; top: -10px; left: 14px; display: flex; gap: 6px; }
.mf-badge { padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; }
.mf-badge.is-cheap { background: #22a447; }
.mf-badge.is-fast { background: #7c3aed; }
.mf-badges + .mf-price { margin-top: 6px; }
.mf-price { display: flex; align-items: baseline; gap: 8px; font-size: 26px; font-weight: 800; color: #0f172a; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mf-price small { font-size: .62em; margin-left: 3px; }
.mf-price span { font-size: 12.5px; font-weight: 500; color: #6b7280; letter-spacing: 0; }
.mf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mf-chip { padding: 3px 8px; border-radius: 7px; background: #eef1f5; color: #1f2937; font-size: 13.5px; line-height: 1.35; }
.mf-chip.is-hot { background: #fde8ea; color: #d6293e; }

.mf-leg { margin-top: 14px; }
.mf-lm { display: grid; grid-template-columns: 32px auto minmax(0, 1fr); gap: 0 14px; align-items: start; }
.mf-leg + .mf-leg { padding-top: 12px; border-top: 1px solid #f0f2f5; }
.mf-logos { position: relative; width: 30px; height: 30px; margin-top: 2px; }
.mf-logos .fc-airline-logo, .mf-logos .fc-airline-badge { width: 30px; height: 30px; margin: 0; border-radius: 50%; font-size: 10px; }
.mf-logos.is-multi > :nth-child(2) { position: absolute; top: 20px; left: 0; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; }
.mf-logos.is-multi { height: 52px; }
.mf-gr { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #5b7aa5; color: #fff; }
.mf-gr svg { width: 18px; height: 18px; }
.mf-gr sup { position: absolute; right: -8px; top: 2px; color: #111827; font-size: 10px; font-weight: 600; }
.mf-gr.is-big { width: 40px; height: 40px; flex: 0 0 auto; }
.mf-gr.is-big svg { width: 22px; height: 22px; }
.mf-times { display: flex; align-items: flex-start; gap: 6px; }
.mf-times > div { display: flex; flex-direction: column; }
.mf-times b { position: relative; font-size: 16px; font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.3; }
.mf-times b sup { position: absolute; left: 100%; top: -4px; margin-left: 1px; font-size: 10px; color: #d6293e; }
.mf-times > i { width: 8px; height: 1px; margin-top: 11px; background: #9ca3af; }
.mf-times span { font-size: 13.5px; color: #8a94a6; line-height: 1.35; }
.mf-info { min-width: 0; padding-left: 4px; }
.mf-info b { display: block; font-size: 15px; font-weight: 500; color: #111827; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-info > span { display: block; font-size: 13.5px; color: #8a94a6; line-height: 1.35; }
.mf-lay { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-lay span { color: #374151; }
.mf-night { font-weight: 500; color: #d6293e; }
.mf-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eef0f3; font-size: 13.5px; color: #374151; }
.mf-foot sup { font-size: 10px; }

/* ── ticket view ─────────────────────────────────────────────────────────── */
.mf-ticket {
  position: fixed; inset: 0; z-index: 1200; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #eef1f5; overscroll-behavior: contain;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.mf-tbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; height: 52px; padding: 0 8px; background: #fff; border-bottom: 1px solid #e8ebf0; }
.mf-backb { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 8px; border: 0; background: none; color: #0B3AD6; font: inherit; font-size: 17px; cursor: pointer; }
.mf-backb svg { width: 22px; height: 22px; }
.mf-tin { padding: 0 12px; }
.mf-hero { text-align: center; padding: 18px 8px 14px; }
.mf-hero-logo { display: inline-block; }
.mf-hero-logo .fc-airline-logo, .mf-hero-logo .fc-airline-badge { width: 56px; height: 56px; margin: 0; border-radius: 14px; font-size: 16px; }
.mf-hero h2 { margin: 10px 0 2px; font-size: 26px; line-height: 1.15; font-weight: 800; color: #0f172a; letter-spacing: -.02em; }
.mf-hero p { margin: 0; font-size: 14px; color: #6b7280; }
.mf-help { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: #fff; margin-bottom: 12px; }
.mf-help > i { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #e8efff; color: #0B3AD6; }
.mf-help > i svg { width: 20px; height: 20px; }
.mf-help > div { flex: 1; min-width: 0; }
.mf-help b { display: block; font-size: 15px; color: #111827; line-height: 1.3; }
.mf-help span { display: block; margin-top: 2px; font-size: 13.5px; color: #6b7280; }
.mf-help a { display: block; font-size: 17px; font-weight: 700; color: #0B3AD6; text-decoration: none; white-space: nowrap; letter-spacing: .01em; }
.mf-x { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: 0; background: #eef1f5; color: #111827; cursor: pointer; }
.mf-x svg { width: 16px; height: 16px; }

.mf-card2 { background: #fff; border-radius: 20px; padding: 18px 16px 16px; margin-bottom: 20px; }
.mf-card2 h3 { margin: 0; font-size: 20px; font-weight: 800; color: #0f172a; }
.mf-fname { margin: 2px 0 10px; font-size: 13.5px; color: #6b7280; }
.mf-terms { list-style: none; margin: 0; padding: 0; }
.mf-terms li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 16px; line-height: 1.3; color: #111827; }
.mf-terms li i { margin-top: 1px; }
.mf-terms li small { display: block; margin-top: 2px; font-size: 13px; color: #6b7280; }
.mf-terms li i { display: grid; place-items: center; flex: 0 0 auto; width: 20px; height: 20px; }
.mf-terms li i svg { width: 20px; height: 20px; }
.mf-terms li.st-no i svg, .mf-terms li.st-na i svg { width: 17px; height: 17px; }
.mf-terms li span { flex: 1; min-width: 0; }
.mf-terms li em { flex: 0 0 auto; padding-top: 2px; font-style: normal; font-size: 13px; color: #6b7280; white-space: nowrap; }
.mf-rows { margin-top: 12px; border-radius: 14px; background: #f3f5f8; }
.mf-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px;
  border: 0; background: none; font: inherit; font-size: 16px; color: #111827; text-align: left; cursor: pointer;
}
.mf-row + .mf-row { border-top: 1px solid #e3e7ee; }
.mf-row b { color: #0B3AD6; font-weight: 700; }
.mf-row > i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e3e7ee; }
.mf-row > i svg { width: 16px; height: 16px; }
.mf-sw {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative; width: 52px; height: 32px; margin: 0;
  border-radius: 16px; background: #d5dae2; cursor: pointer; transition: background .2s;
}
.mf-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;  transition: transform .2s; }
.mf-sw:checked { background: #0B3AD6; }
.mf-sw:checked::after { transform: translateX(20px); }

.mf-dir { margin-bottom: 18px; }
.mf-dir h3 { margin: 0 4px; font-size: 20px; font-weight: 800; color: #0f172a; }
.mf-dir > p { margin: 2px 4px 10px; font-size: 14px; color: #6b7280; }
.mf-box { background: #fff; border-radius: 20px; padding: 14px; }
.mf-seg + .mf-layc, .mf-layc + .mf-seg { margin-top: 14px; }
.mf-seg-h { display: flex; align-items: center; gap: 10px; }
.mf-seg-h .fc-airline-logo, .mf-seg-h .fc-airline-badge { width: 40px; height: 40px; margin: 0; flex: 0 0 auto; border-radius: 50%; }
.mf-seg-h > div { flex: 1; min-width: 0; }
.mf-seg-h b { display: block; font-size: 16px; color: #111827; }
.mf-seg-h small { font-size: 13.5px; color: #6b7280; }
.mf-tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 5px; background: #5b7aa5; color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.mf-pill { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: #eef1f5; color: #111827; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mf-tl { position: relative; margin-top: 12px; padding-left: 26px; }
.mf-tl::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 30px; width: 2px; background: #c7ced9; }
.mf-tl-p { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr); column-gap: 10px; }
.mf-tl-p + .mf-tl-p { margin-top: 14px; }
.mf-tl-p::before { content: ''; position: absolute; left: -26px; top: 3px; width: 10px; height: 10px; border-radius: 50%; border: 3px solid #8a94a6; background: #fff; }
.mf-tl-p b { font-size: 16px; font-weight: 600; color: #111827; }
.mf-tl-p b:nth-of-type(1) { grid-column: 1; grid-row: 1; font-variant-numeric: tabular-nums; }
.mf-tl-p span:nth-of-type(1) { grid-column: 1; grid-row: 2; font-size: 13.5px; color: #6b7280; white-space: nowrap; }
.mf-tl-p b:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.mf-tl-p span:nth-of-type(2) { grid-column: 2; grid-row: 2; font-size: 13.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-tl-p span.is-nd { justify-self: start; padding: 0 3px; border-radius: 4px; background: #fde8ea; color: #9f1239; }
.mf-layc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #f3f5f8; }
.mf-layc > i { color: #6b7280; }
.mf-layc > i svg { width: 20px; height: 20px; }
.mf-layc b { display: block; font-size: 15px; font-weight: 500; color: #111827; }
.mf-layc span { font-size: 13.5px; color: #6b7280; }
.mf-layc em { font-style: normal; color: #d6293e; }
.mf-note { margin: 0 4px 16px; font-size: 13px; color: #6b7280; }

.mf-paybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1201;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; 
}
.mf-paybar b { display: block; font-size: 22px; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.mf-paybar b small { font-size: .62em; margin-left: 3px; }
.mf-paybar span { font-size: 12.5px; color: #6b7280; }
.mf-book {
  flex: 0 0 auto; height: 50px; min-width: 150px; padding: 0 22px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #ff7a45 0%, #ff5722 100%); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}

/* ── sheets ──────────────────────────────────────────────────────────────── */
.mf-sheet-ov { position: fixed; inset: 0; z-index: 1300; background: rgba(15,23,42,0); transition: background .2s; display: flex; align-items: flex-end; }
.mf-sheet-ov.is-in { background: rgba(15,23,42,.45); }
.mf-sheet {
  width: 100%; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  background: #eef1f5; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .25s ease-out;
}
.mf-sheet-ov.is-in .mf-sheet { transform: none; }
.mf-sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.mf-sheet-h b { font-size: 18px; font-weight: 800; color: #0f172a; }
.mf-sheet-h .mf-x { background: #fff; }
.mf-sheet-b { overflow-y: auto; padding: 0 12px calc(16px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.mf-sort { background: #fff; border-radius: 16px; overflow: hidden; }
.mf-sort-o { display: block; width: 100%; padding: 16px; border: 0; background: none; text-align: left; font: inherit; font-size: 16px; color: #111827; cursor: pointer; }
.mf-sort-o + .mf-sort-o { border-top: 1px solid #eef0f3; }
.mf-sort-o.is-on { color: #0B3AD6; font-weight: 700; }
.mf-sort-o.is-on::after { content: '✓'; float: right; }
.mf-fares { display: flex; flex-direction: column; gap: 12px; }
.mf-fare { background: #fff; border-radius: 18px; padding: 14px 16px; border: 2px solid transparent; }
.mf-fare.is-on { border-color: #2f6bff; }
.mf-fare-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mf-fare-h small { display: block; font-size: 14px; font-weight: 600; color: #6b7280; }
.mf-fare-h b { font-size: 22px; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.mf-fare-h b small { display: inline; font-size: .62em; margin-left: 3px; color: inherit; }
.mf-fare-go { flex: 0 0 auto; height: 40px; padding: 0 18px; border: 0; border-radius: 12px; background: #0B3AD6; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.mf-fare-go[disabled] { background: #eef1f5; color: #111827; cursor: default; }
.mf-info-h { text-align: center; padding: 4px 8px 12px; }
.mf-info-h .fc-airline-logo, .mf-info-h .fc-airline-badge, .mf-info-h .mf-gr { width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; }
.mf-info-h h3 { margin: 10px 0 4px; font-size: 24px; font-weight: 800; color: #0f172a; }
.mf-info-h p { margin: 0; font-size: 14px; color: #6b7280; }
.mf-tl.is-sheet { background: #fff; border-radius: 16px; padding: 14px 14px 14px 40px; margin-top: 0; }
.mf-tl.is-sheet::before { left: 21px; top: 24px; bottom: 44px; }
.mf-info-t { margin: 16px 4px 6px; font-size: 18px; font-weight: 800; color: #0f172a; }
.mf-sheet .mf-terms { background: #fff; border-radius: 16px; padding: 10px 16px; }
.mf-fare .mf-terms { padding: 0; }

/* Owner (Oct 2026): bigger airline logos, smaller info chips. */
.mf-lm { grid-template-columns: 40px auto minmax(0, 1fr); gap: 0 12px; align-items: center; }
.mf-logos { width: 40px; height: 40px; margin-top: 0; }
.mf-logos .fc-airline-logo, .mf-logos .fc-airline-badge { width: 40px; height: 40px; font-size: 12px; box-shadow: none; }
.mf-logos .fc-airline-logo img { padding: 2px; }
.mf-logos.is-multi { height: 64px; }
.mf-logos.is-multi > :nth-child(2) { top: 26px; width: 40px; height: 40px; }
.mf-gr { width: 40px; height: 40px; }
.mf-gr svg { width: 22px; height: 22px; }
.mf-seg-h .fc-airline-logo img, .mf-hero-logo .fc-airline-logo img { padding: 3px; }
.mf-chips { gap: 5px; margin-top: 8px; }
.mf-chip { padding: 2px 7px; border-radius: 6px; font-size: 12px; line-height: 1.4; }

/* Airline icon (logo() in js/m-flight.js): square symbol in a circle, or the
   airline's first letter when there is no icon. */
.mf-logo {
  position: relative; display: inline-grid; place-items: center; overflow: hidden; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 17px; font-weight: 800; line-height: 1;
}
.mf-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mf-logos.is-multi > .mf-logo:nth-child(2) { border: 2px solid #fff; }
.mf-hero-logo .mf-logo { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; }
.mf-info-h .mf-logo { width: 48px; height: 48px; margin: 0 auto; font-size: 20px; }

/* ══ Desktop (≥769px, owner Oct 2026 — Aviasales desktop) ══════════════════
   Same markup as the phone; the card shows .mf-ld (desktop row) instead of
   .mf-lm, the ticket is a two-column panel over a dim, sheets are centred. */
.mf-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mf-warns { display: none; gap: 6px; }
.mf-w { display: grid; place-items: center; width: 32px; height: 28px; border-radius: 8px; background: #fde8ea; color: #d6293e; }
.mf-w svg { width: 16px; height: 16px; }
.mf-ld, .mf-tpanel .mf-ic-d, .mf-tpanel .mf-l-d, .mf-pay-note { display: none; }
.mf-tchange { margin-top: 10px; border-radius: 14px; background: #f3f5f8; }

@media (max-width: 768px) {
  .mf-tin { display: flex; flex-direction: column; }
  .mf-colL, .mf-colR { display: contents; }
  .mf-help { order: 1; } .mf-tcard { order: 2; } .mf-swc { order: 3; } .mf-dir { order: 4; } .mf-note { order: 5; }
  .mf-tchange { display: none; }
  .mf-swc { padding: 0; background: none; }
  .mf-swc .mf-rows { margin-top: 0; background: #fff; border-radius: 20px; }
}

@media (min-width: 769px) {
  #mfQuick { display: none; }
  .results-list.mf-list { padding-top: 10px; }
  .mf-card { padding: 20px 24px 22px; border: 1px solid #eef0f4;  transition: box-shadow .15s, border-color .15s; }
  .mf-card:hover { border-color: #dfe5ee;  }
  .mf-card:active { transform: none; }
  .mf-price { font-size: 30px; }
  .mf-warns { display: flex; }
  .mf-chip { font-size: 13.5px; padding: 3px 9px; }
  .mf-lm { display: none; }
  .mf-leg + .mf-leg { padding-top: 16px; }
  .mf-ld { display: grid; grid-template-columns: 44px 140px minmax(0, 1fr) 140px; gap: 0 18px; align-items: start; margin-top: 16px; }
  .mf-ld .mf-logos { margin-top: 2px; }
  .mf-ld-pt { display: flex; flex-direction: column; min-width: 0; }
  .mf-ld-pt.r { align-items: flex-end; text-align: right; }
  .mf-ld-pt b { position: relative; font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .mf-ld-pt b sup { margin-left: 2px; font-size: 12px; color: #d6293e; vertical-align: super; }
  .mf-ld-pt span { margin-top: 4px; font-size: 15px; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mf-ld-pt small { font-size: 14px; color: #8a94a6; }
  .mf-ld-mid { min-width: 0; padding-top: 2px; }
  .mf-ld-top { display: flex; align-items: center; gap: 10px; color: #9ca3af; }
  .mf-ld-top svg { flex: 0 0 auto; width: 20px; height: 20px; }
  .mf-ld-top span { flex: 1; min-width: 0; text-align: center; font-size: 14.5px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mf-ld-bar { display: flex; align-items: center; gap: 4px; height: 6px; margin-top: 10px; }
  .mf-ld-bar i { height: 6px; border-radius: 3px; background: #d5dae2; }
  .mf-ld-bar u { height: 2px; border-radius: 1px; background: #e5e9f0; text-decoration: none; }
  .mf-ld-codes { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13.5px; font-weight: 700; color: #0B3AD6; }
  .mf-foot { font-size: 13.5px; }

  /* the ticket: a panel over a dim */
  .mf-ticket { background: rgba(15, 23, 42, .5); padding-bottom: 0; }
  .mf-tpanel { width: min(1140px, 100%); min-height: 100%; margin: 0 auto; background: #eef1f5; padding-bottom: 40px; cursor: default; }
  .mf-tbar { height: 60px; padding: 0 20px; }
  .mf-tpanel .mf-ic-m, .mf-tpanel .mf-l-m { display: none; }
  .mf-tpanel .mf-ic-d, .mf-tpanel .mf-l-d { display: inline; }
  .mf-tpanel .mf-ic-d svg { width: 20px; height: 20px; vertical-align: -4px; }
  .mf-backb { font-size: 18px; gap: 8px; }
  .mf-hero { padding: 26px 28px 18px; }
  .mf-hero h2 { font-size: 30px; }
  .mf-tin { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; padding: 0 28px; }
  .mf-colR { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
  .mf-colR .mf-card2 { margin: 0; padding: 12px; }
  .mf-colR .mf-rows { margin-top: 0; }
  .mf-paybar { position: static; z-index: auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 22px; border-radius: 20px; box-shadow: none; }
  .mf-pay-p b { font-size: 30px; }
  .mf-pay-p span { font-size: 13.5px; }
  .mf-book { width: 100%; height: 54px; font-size: 18px; }
  .mf-pay-note { display: block; margin: 0; padding: 12px 14px; border-radius: 14px; background: #f3f5f8; font-size: 13.5px; line-height: 1.45; color: #4b5563; }
  .mf-pay-note a { color: #0B3AD6; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .mf-note { margin: 4px 4px 0; }

  /* sheets: centred windows */
  .mf-sheet-ov { align-items: center; justify-content: center; padding: 24px; }
  .mf-sheet { width: min(580px, 100%); max-height: 88vh; border-radius: 22px; transform: translateY(16px); opacity: 0; transition: transform .2s ease-out, opacity .2s; }
  .mf-sheet-ov.is-in .mf-sheet { transform: none; opacity: 1; }
  .mf-sheet-b { padding: 0 16px 18px; }
}

/* Desktop ticket, compact (owner: "fit the screen") — one-line hero, a
   narrower panel and tighter cards, so terms + the first flight + the price
   card are on screen together. */
@media (min-width: 769px) {
  .mf-tpanel { width: min(1060px, 100%); padding-bottom: 28px; }
  .mf-tbar { height: 54px; }
  .mf-backb { font-size: 16px; }
  .mf-hero { display: flex; align-items: center; gap: 12px; padding: 16px 24px 14px; text-align: left; }
  .mf-hero-logo .mf-logo { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
  .mf-hero h2 { margin: 0; font-size: 21px; }
  .mf-hero p { margin: 0 0 0 4px; font-size: 14px; }
  .mf-tin { grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; padding: 0 24px; }
  .mf-colR { top: 66px; gap: 12px; }
  .mf-help { padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; }
  .mf-help > i { width: 34px; height: 34px; }
  .mf-help b { font-size: 14px; } .mf-help span { font-size: 12.5px; } .mf-help a { font-size: 15px; }
  .mf-card2 { padding: 14px 16px; margin-bottom: 14px; border-radius: 16px; }
  .mf-card2 h3 { font-size: 17px; }
  .mf-fname { margin-bottom: 6px; font-size: 13px; }
  .mf-terms li { padding: 4px 0; font-size: 14.5px; }
  .mf-terms li i, .mf-terms li i svg { width: 18px; height: 18px; }
  .mf-row { min-height: 46px; padding: 6px 12px; font-size: 14.5px; }
  .mf-sw { width: 46px; height: 28px; } .mf-sw::after { width: 22px; height: 22px; } .mf-sw:checked::after { transform: translateX(18px); }
  .mf-tchange { margin-top: 8px; }
  .mf-colR .mf-card2 { padding: 8px; }
  .mf-paybar { gap: 12px; padding: 16px 18px; border-radius: 16px; }
  .mf-pay-p b { font-size: 25px; }
  .mf-book { height: 48px; font-size: 16.5px; border-radius: 12px; }
  .mf-pay-note { padding: 10px 12px; font-size: 12.5px; border-radius: 12px; }
  .mf-dir { margin-bottom: 14px; }
  .mf-dir h3 { font-size: 17px; }
  .mf-dir > p { margin-bottom: 8px; font-size: 13px; }
  .mf-box { padding: 12px 14px; border-radius: 16px; }
  .mf-seg-h .mf-logo { width: 34px; height: 34px; font-size: 14px; }
  .mf-seg-h b { font-size: 15px; } .mf-seg-h small { font-size: 12.5px; }
  .mf-pill { height: 28px; font-size: 12.5px; }
  .mf-tl { margin-top: 10px; }
  .mf-tl-p b { font-size: 15px; }
  .mf-tl-p span:nth-of-type(1), .mf-tl-p span:nth-of-type(2) { font-size: 12.5px; }
  .mf-tl-p + .mf-tl-p { margin-top: 10px; }
  .mf-layc { padding: 10px 12px; }
  .mf-note { font-size: 12.5px; }
}

/* Desktop list cards, compact (owner: "fit the screen") */
@media (min-width: 769px) {
  .mf-card { padding: 14px 20px 16px; border-radius: 18px; }
  .mf-list .mf-card + .mf-card { margin-top: 12px; }
  .mf-list .mf-card:has(.mf-badges) { margin-top: 20px; }
  .mf-price { font-size: 24px; }
  .mf-price small { font-size: .58em; }
  .mf-chips { margin-top: 6px; }
  .mf-chip { font-size: 12.5px; padding: 2px 8px; }
  .mf-w { width: 28px; height: 24px; }
  .mf-w svg { width: 14px; height: 14px; }
  .mf-leg { margin-top: 10px; }
  .mf-leg + .mf-leg { padding-top: 10px; }
  .mf-ld { grid-template-columns: 36px 116px minmax(0, 1fr) 116px; gap: 0 16px; margin-top: 0; }
  .mf-ld .mf-logos, .mf-ld .mf-logo, .mf-ld .mf-gr { width: 34px; height: 34px; }
  .mf-ld .mf-logos.is-multi { height: 54px; }
  .mf-ld .mf-logos.is-multi > :nth-child(2) { top: 22px; width: 34px; height: 34px; }
  .mf-ld-pt b { font-size: 21px; }
  .mf-ld-pt span { margin-top: 2px; font-size: 13.5px; }
  .mf-ld-pt small { font-size: 12.5px; }
  .mf-ld-top svg { width: 16px; height: 16px; }
  .mf-ld-top span { font-size: 13px; }
  .mf-ld-bar { height: 4px; margin-top: 7px; }
  .mf-ld-bar i { height: 4px; }
  .mf-ld-codes { margin-top: 5px; font-size: 12.5px; }
  .mf-foot { margin-top: 10px; padding-top: 8px; font-size: 12.5px; }
}

/* Desktop width (owner): the page itself is sized — filters 300px + a results
   column of at most 880px, the pair centred — so the header, sort tabs, chips
   and cards share one width and no empty strip is left beside the cards. */
@media (min-width: 1025px) {
  body.mf-on .results-page { max-width: none; grid-template-columns: 300px minmax(0, 880px); justify-content: center; }
}

/* Phone ticket: the price + "Bron qilish" is a card at the END of the page,
   not pinned to the screen (owner, Oct 2026 — iPhone Safari's own toolbar
   covered the fixed bar). And the timeline's date column is wide enough for
   "Dush, 26-Okt" so it never runs into the airport name. */
@media (max-width: 768px) {
  .mf-ticket { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .mf-paybar {
    position: static; z-index: auto; order: 6; margin: 4px 0 8px; padding: 16px;
    border-radius: 20px; 
  }
  .mf-note { margin-bottom: 12px; }
}
.mf-tl-p { grid-template-columns: 92px minmax(0, 1fr); }
