/* ═══════════════════════════════════════════════════════════════════════════
   Holistic Search Engine — fekete–fehér, kontúr-alapú UI, Open Sans
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --font-app: 'Open Sans', system-ui, -apple-system, sans-serif;
  --ink: #0a0a0a;
  --ink-soft: #2a2a2a;
  --paper: #fafafa;
  --line: rgba(0, 0, 0, 0.2);
  --line-strong: rgba(0, 0, 0, 0.55);
  /* Bal/jobb panel nyíl — egy vonalban a fejléc ikonokkal; jobbra hely a térkép zoom vezérlőnek */
  --sidebar-control-top: 21px;
  --map-zoom-gutter: 56px;
}

/* ── Reset & Base ─────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Material Symbols inline helper ──────────────────────── */

.mi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1.15em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: -0.15em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html,
body {
  height: 100%;
  font-family: var(--font-app);
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0a0a0a;
}

/* Map full-screen — sidebar borítja / homályosítja mögötte */

#map-container.map-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;
}

/* ── Bal panel dokkoló: keskeny fül, panel becsukható balra ─ */

.sidebar-dock {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  pointer-events: none;
}

.sidebar-dock > * {
  pointer-events: auto;
}

/* Kis fehér négyzet + vastag kontúr + fekete nyíl (összecsukva csak ez látszik a szélen) */
.sidebar-dock__collapse-pill {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.sidebar-dock__collapse-pill-glyph {
  display: block;
  margin-top: -0.5px;
  user-select: none;
}

.sidebar-dock__collapse-pill:hover {
  background: #fafafa;
}

.sidebar-dock__collapse-pill:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sidebar-dock__collapse-pill--expand {
  display: none;
  margin-top: var(--sidebar-control-top);
  margin-left: 10px;
}

.sidebar-dock.sidebar-dock--collapsed .sidebar-dock__collapse-pill--expand {
  display: inline-flex;
}

.sidebar-dock .sidebar {
  transition: transform 0.22s ease, visibility 0s linear 0s;
}

.sidebar-dock--collapsed .sidebar {
  transform: translateX(-100%);
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}

.sidebar-dock:not(.sidebar-dock--collapsed) .sidebar {
  visibility: visible;
}

.sidebar {
  position: relative;
  left: auto;
  top: auto;
  width: 390px;
  min-width: 0;
  max-width: min(390px, 100vw);
  height: 100vh;
  max-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior-x: none;
  border-right: 1px solid var(--ink);
  box-shadow: 4px 0 0 0 rgba(0, 0, 0, 0.04);
}

.sidebar-header {
  flex-shrink: 0;
  padding: 20px 18px 12px;
  /* Sötét sáv: fehér felirat; gombcsoport invert (fekete felület, fehér ikon, fehér keret). */
  --hdr-bg: #0a0a0a;
  --hdr-fg: #ffffff;
  --hdr-border: rgba(255, 255, 255, 0.22);
  --hdr-cluster-surface: #0a0a0a;
  --hdr-cluster-fg: #ffffff;
  /* Elválasztó: ugyanaz a szín, mint a cluster külső kerete (fehér), és app.js / CSS 2.5px-re vastagítja. */
  --hdr-cluster-divider: var(--hdr-fg);
  --hdr-cluster-hover: rgba(255, 255, 255, 0.12);
  background: var(--hdr-bg);
  color: var(--hdr-fg);
  z-index: 15;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--hdr-border);
}

.sidebar-header__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Véletlen / visszaállítás / panel nyíl — egy kontúros dobozban */
.sidebar-header__tool-cluster {
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
  border: 2.5px solid var(--hdr-fg);
  border-radius: 4px;
  overflow: hidden;
  background: var(--hdr-cluster-surface);
  box-shadow: none;
}

.sidebar-header__cluster-btn {
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: none;
  /* Ugyanolyan vastag elválasztó, mint a cluster külső kerete (2.5px). */
  border-right: 2.5px solid var(--hdr-cluster-divider);
  background: var(--hdr-cluster-surface);
  color: var(--hdr-cluster-fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-header__cluster-btn:last-child {
  border-right: none;
}

.sidebar-header__cluster-btn:hover {
  background: var(--hdr-cluster-hover);
}

.sidebar-header__cluster-btn:focus-visible {
  outline: 2px solid var(--hdr-cluster-fg);
  outline-offset: 2px;
  z-index: 1;
}

.sidebar-header__cluster-ico {
  font-size: 17px !important;
  line-height: 1 !important;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.sidebar-header__cluster-btn--chevron {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  /* Megakadályozza a böngésző scroll anchoringjét panelmagasság-változáskor (első kinyitás „ugrálás”). */
  overflow-anchor: none;
  /* Gördítősáv megjelenésekor ne csússzon el a tartalom szélességben / görgetési pozícióban. */
  scrollbar-gutter: stable;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 18px 14px;
  box-sizing: border-box;
}

.sidebar-scroll > * {
  min-width: 0;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar > * {
  min-width: 0;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--hdr-fg);
  margin: 0;
  padding: 0;
  border: none;
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* ── Form controls (TripBlend: .form-group → HOVA: .control-group) ─ */

.control-group,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
}

.param-block-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* Rövid cím balra, jobbra fent: infó, alatta a PIN */
.param-heading-trail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 6px;
}

.param-heading {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--ink);
}

/* Alcím: szűkebb oszlop, balra zárva */
.control-label-sub {
  display: block;
  max-width: 26ch;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.55);
  text-align: left;
}

.param-info-wrap {
  position: relative;
}

.param-info-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  cursor: help;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.param-info-btn:hover,
.param-info-btn:focus-visible {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  outline: none;
}

/* Infó buborékok: minden UI felett (body-szintű réteg, app.js illeszti ide a DOM-ot) */
.param-info-tooltip-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000000;
}

/* A csúszka-buborék alja FIX a slider input felső széle FELETT 5 px-szel (bottom: 29 px).
   Több sornál felfelé nő, kilóghat a kártya tetejére.
   white-space: pre → csak az explicit \n töri (pl. sportág + létesítmény); automatikus
   sortörés NINCS, így a buborék soha nem „ugrik" magasabbra húzás közben. */
.slider-bubble.param-range-value-bubble {
  top: auto;
  bottom: 29px;
  white-space: pre;
  text-align: center;
  line-height: 1.25;
  z-index: 3;
}

.param-info-tooltip {
  /* pozíció: app.js (placeParamTooltip) — fixed, rétegben a teljes app fölött */
  position: fixed;
  left: 0;
  top: 0;
  width: min(320px, calc(100vw - 16px));
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-size: 0.72rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  color: var(--ink);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.param-info-tooltip a {
  color: #0b57d0;
  text-decoration: underline;
  word-break: break-all;
}

.param-info-tooltip a:hover {
  text-decoration: underline;
}

.param-info-tooltip.param-info-tooltip--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.param-info-wrap--head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  height: 18px;
  margin-right: 2px;
}

/* Ugyanaz a magasság és stílus, mint a .param-item__ios-switch — „i” nem dőlt: nem csúszik le optikailag */
.param-info-btn--head {
  width: 18px;
  height: 18px;
  font-size: 0.58rem;
  font-style: normal;
  font-family: inherit;
}

.param-item__head-row .param-info-wrap--head {
  margin-left: 2px;
  margin-right: 2px;
}

.param-item__head-row .param-item__ios-switch {
  margin-left: 4px;
  margin-right: 10px;
}

/* Első keresés: kikapcsolt mutatókra figyelmeztető modál (a keresés gomb és a térkép fölött, infó réteg alatt) */
.first-search-hint-overlay {
  position: fixed;
  inset: 0;
  z-index: 1900000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.42);
}

.first-search-hint-overlay[hidden] {
  /* A display: flex felülírná a [hidden] natív display:none-ját — különben betöltéskor is látszana. */
  display: none !important;
}

.first-search-hint-dialog {
  position: relative;
  max-width: min(380px, 100%);
  padding: 20px 40px 20px 20px;
  border-radius: 7px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.first-search-hint-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.first-search-hint-text--lead {
  margin-bottom: 12px;
}

.first-search-hint-text--sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.first-search-hint-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
  max-height: min(40vh, 280px);
  overflow-y: auto;
}

.first-search-hint-list li {
  margin: 0 0 6px 0;
}

.first-search-hint-list li:last-child {
  margin-bottom: 0;
}

.first-search-hint-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.first-search-hint-close:hover,
.first-search-hint-close:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  outline: none;
}

.control-group > .control-label,
.form-group > label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(0, 0, 0, 0.42);
}

.pick-map-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.pick-map-btn .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}

.pick-map-btn:hover,
.pick-map-btn:focus-visible {
  background: var(--ink);
  color: #fff;
  outline: none;
}

.pick-map-btn.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ref-line {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.03);
}

.ref-line.ref-line--warn {
  border-style: solid;
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.06);
}

.ref-city-form {
  display: block;
  margin: 0;
  min-width: 0;
}

.ref-city-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 2px;
}

.ref-city-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  font-family: var(--font-app);
  font-size: 0.82rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  outline: none;
  /* type=search: ne nézzen ki „keresőmezőként”, X gomb külön szabály alatt */
  -webkit-appearance: none;
  appearance: none;
}

.ref-city-input::-webkit-search-decoration,
.ref-city-input::-webkit-search-cancel-button,
.ref-city-input::-webkit-search-results-button {
  display: none;
  -webkit-appearance: none;
}

.ref-city-input::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

.ref-city-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.ref-city-apply {
  flex-shrink: 0;
  padding: 8px 12px;
  font-family: var(--font-app);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.ref-city-apply:hover,
.ref-city-apply:focus-visible {
  background: var(--ink);
  color: #fff;
  outline: none;
}

/* MapLibre csepp jelölő + korábbi dobozos feliratok (külön marker + offset) */

.map-geo-important {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.map-geo-important__city {
  font-family: var(--font-app);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 170px;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  padding: 4px 7px;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
}

.map-geo-important__tag {
  font-family: var(--font-app);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 140px;
  text-align: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  padding: 3px 6px;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
}

.map-win-marker {
  pointer-events: none;
}

.map-win-marker__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.map-win-marker__title {
  font-family: var(--font-app);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #b01010;
  border: 2px solid #000;
  padding: 5px 10px;
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
}

.map-win-marker__city {
  font-family: var(--font-app);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid #000;
  padding: 4px 10px;
  border-radius: 2px;
  max-width: 220px;
  text-align: center;
  line-height: 1.25;
}

.map-picking-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  background: var(--paper);
  border-top: 2px solid var(--ink);
  font-family: var(--font-app);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
}

.map-picking-banner[hidden] {
  display: none !important;
}

.map-picking-banner-text {
  flex: 1;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.map-picking-cancel {
  flex-shrink: 0;
  padding: 10px 16px;
  font-family: var(--font-app);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.map-picking-cancel:hover,
.map-picking-cancel:focus-visible {
  background: var(--ink);
  color: #fff;
  outline: none;
}

#map-container.map-container.map-picking-cursor,
#map-container.map-container.map-picking-cursor .maplibregl-canvas {
  cursor: crosshair !important;
}

/* Térképes referencia-választás: a térkép előrébb, mobilon a panel ideiglenesen hátra */
html.map-picking #map-container.map-container {
  z-index: 55;
}

@media (max-width: 900px) {
  html.is-touch.map-picking #map-container.map-container {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

@media (min-width: 901px) {
  .map-picking-banner {
    left: calc(390px + 26px);
    right: 0;
    padding-left: 20px;
    border-left: none;
  }
}

.input-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.input-row input[type='text'] {
  flex: 1;
  min-width: 0;
}

.form-group input[type='text'],
.control-group input[type='text'] {
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: #1e293b;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.form-group input[type='text']::placeholder,
.control-group input[type='text']::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

.form-group input[type='text']:focus,
.control-group input[type='text']:focus {
  border-color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.pick-btn {
  width: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pick-btn:hover {
  border-color: rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.48);
}

.pick-btn.active {
  border-color: rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.14);
  color: #0a0a0a;
}

.od-route-group {
  position: relative;
}

.od-route-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.od-route-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.od-route-fields > label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(0, 0, 0, 0.42);
}

.swap-od-btn--side {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-height: 0;
  flex-shrink: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  color: rgba(30, 41, 59, 0.78);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.swap-od-btn--side:hover {
  border-color: rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.48);
}

.swap-od-btn--side .mi {
  font-size: 1.12rem;
}

/* ── Radio group ─ */

.radio-label input[type='radio'],
.radio-label input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.radio-group {
  display: flex;
  gap: 6px;
}

.radio-label {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.2s;
  font-size: 0.84rem;
}

.radio-label:has(input:checked) {
  border-color: rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.radio-group-3 .radio-label {
  font-size: 0.78rem;
  padding: 8px 6px;
}

.form-group-inline {
  padding: 0 2px;
}

/* --- Segment / motor chips (TripBlend) --- */

.segment-block {
  gap: 8px;
}

.segment-motor-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.no-bike-ui .motor-segment-parens {
  display: none !important;
}

.motor-segment-parens {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2px;
  opacity: 0.72;
}

.motor-segment-parens .motor-segment {
  flex: 1;
  min-width: 0;
}

.bicikli-paren {
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.32);
  line-height: 1.2;
  user-select: none;
  display: flex;
  align-items: center;
  padding: 0 1px;
}

.motor-segment {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.transport-modes-group .segment-motor-stack label.mode-chip.segment-motor-chip {
  position: relative;
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  font-family: inherit;
}

.motor-expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
  overflow: hidden;
  min-height: 0;
  contain: content;
}

.motor-expand.is-open {
  grid-template-rows: 1fr;
}

.motor-expand > .motor-subpanel {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .motor-expand {
    transition: none;
  }
}

.segment-motor-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

label.segment-motor-bike:has(.segment-motor-input:checked) {
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

label.segment-motor-car:has(.segment-motor-input:checked) {
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
  color: var(--ink);
}

.motor-subpanel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
  border-left: none;
}

.motor-expand.is-open > .motor-subpanel {
  padding: 10px 0 4px 4px;
  border-left: 2px solid rgba(0, 0, 0, 0.25);
  margin-left: 2px;
}

.subpanel-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(0, 0, 0, 0.45);
}

.checkbox-tight {
  font-size: 0.76rem;
}

.bike-both-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: #f5f5f5;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.bike-both-warning.hidden {
  display: none;
}

.bike-both-warning-ico {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--ink);
  font-variation-settings: 'FILL' 1;
}

.nested-slider {
  margin-top: 4px;
  padding-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  line-height: 1.35;
  cursor: pointer;
  color: #1e293b;
}

.checkbox-label input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #0a0a0a;
}

/* ── Glass select ────────────────────────────────────────── */

.glass-select {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: #1e293b;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='rgba(0,0,0,0.38)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  transition: border-color 0.25s, background 0.25s;
}

.glass-select:hover {
  border-color: rgba(0, 0, 0, 0.35);
  background-color: rgba(255, 255, 255, 0.46);
}

.glass-select:focus {
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.glass-select option {
  background: #fff;
  color: #1e293b;
}

/* ── Time inputs ─────────────────────────────────────────── */

.time-inputs {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.time-inputs input[type='text'],
.time-inputs input[type='date'],
.time-inputs input[type='time'] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  color: #1e293b;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
}

.time-inputs input:focus {
  border-color: rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* ── Range slider (TripBlend + HOVA .slider) ─────────────── */

.form-group input[type='range'],
.control-group input[type='range'],
.control-group .slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
  outline: none;
  margin-top: 2px;
}

.form-group input[type='range']::-webkit-slider-thumb,
.control-group input[type='range']::-webkit-slider-thumb,
.control-group .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.2s;
}

.form-group input[type='range']::-webkit-slider-thumb:hover,
.control-group input[type='range']::-webkit-slider-thumb:hover,
.control-group .slider::-webkit-slider-thumb:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.form-group input[type='range']::-moz-range-thumb,
.control-group input[type='range']::-moz-range-thumb,
.control-group .slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-value {
  min-width: 2.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111111;
  text-align: right;
}

/* Fontos hely + mutató csoportok: a scroll „gap” nélkül folytonos vonalvezetés, mint a kategóriák között */
.sidebar-params-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
  margin-left: -18px;
  margin-right: -18px;
  width: calc(100% + 36px);
  max-width: none;
  box-sizing: border-box;
}

/* Fontos hely (kétkörös, param-group + param-item) */
/* Egész „Fontos hely” blokk együtt legyen egy erős stacking contextben, hogy az infó (fixed) tooltip
   ne kerüljön a következő szakasz (pl. Természeti környezet) alá. */
/* Találat részletei — bal panelben, a paraméter csoportok fölött (i gomb) */
.match-details-host {
  flex-shrink: 0;
  min-width: 0;
  margin: 0 18px 10px;
  padding: 12px 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.match-details-host[hidden] {
  display: none !important;
}

.match-details-host .feedback-panel__title {
  margin-top: 0;
}

.match-details-host .feedback-table {
  font-size: 0.65rem;
}

.important-places-outer {
  flex-shrink: 0;
  min-width: 0;
  overflow: visible;
  position: relative;
  z-index: 50;
}

.important-places-group {
  overflow: visible;
  position: relative;
}

/* Kártya ne vágja le az abszolút javaslatlistát; fókuszkor emelkedjen a többi kártya fölé */
.param-item.param-item--geo-place {
  /* Alap: rejtett sugárlista mellett a lekerekítés látszódjon; hüvelykujj-buborékok ne vágódjanak */
  overflow: visible;
  z-index: 1;
}

/* 1. és 2. fontos hely: ha az egyiken áll az egér/fókusz, az egész kártya a másik (és a tooltip) fölé kerüljön */
.param-item.param-item--geo-place:hover,
.param-item.param-item--geo-place:focus-within {
  z-index: 60;
}

.param-item.param-item--geo-place.param-item--geo-suggest-open {
  overflow: visible;
}

.param-item--geo-place .param-item__body {
  overflow: visible;
}

.param-item--geo-place .geo-autocomplete-wrap {
  position: relative;
}

.geo-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: min(280px, 45vh);
  overflow: auto;
}

.geo-suggest-item {
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
}

.geo-suggest-item:hover,
.geo-suggest-item:focus-visible {
  background: rgba(10, 10, 10, 0.06);
}

.param-global-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: stretch;
  margin-top: 14px;
  margin-bottom: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.param-restore-baseline-btn {
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--line-strong);
}

.param-restore-baseline-btn:hover,
.param-restore-baseline-btn:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.03);
  outline: none;
}

.param-random-btn--wide {
  width: 100%;
  text-align: center;
  padding: 8px 12px;
}

.param-categories-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.param-categories-intro .param-heading {
  margin: 0;
}

.param-categories-host {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Első kategória (Természeti…) a Fontos hely blokk után: ugyanaz a 1px elválasztó, mint a többi szakaszcím alatt */
.sidebar-params-stack .param-categories-host > .param-group:first-child .param-group__toggle {
  border-top: 1px solid var(--line);
}

/* Nagy csoportdoboz — széléig a sáv, oldalsó keret nélkül */
.param-group {
  gap: 0;
  padding: 0;
  flex-shrink: 0;
  overflow: visible;
  border-left: none;
  border-right: none;
  border-radius: 0;
}

.param-group__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  box-sizing: border-box;
  border: none;
  background: rgba(0, 0, 0, 0.045);
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.param-group__toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.param-group__chevron {
  flex-shrink: 0;
  font-size: 0.55rem;
  line-height: 1;
  color: var(--ink-soft);
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.param-group--collapsed .param-group__chevron {
  transform: rotate(-90deg);
}

.param-group__title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.param-group__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 18px 18px;
  overflow: visible;
}

.param-group--collapsed .param-group__body {
  display: none;
}

/* Mutató-kártya: határozottabb keret, nagyobb tipográfia */
.param-item {
  position: relative;
  gap: 0;
  padding: 0;
  flex-shrink: 0;
  overflow: visible;
  overflow-anchor: none;
  border-radius: 5px;
  background: #fff;
  border: 1px solid var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  scroll-margin-top: max(1.5rem, 10vh);
  scroll-margin-bottom: 1.25rem;
}

/* Egyetlen háttérszín a fejlécsorban: a gyerek gombok átlátszók, így nincs fehér „sáv” a kapcsoló körül */
.param-item__head-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  background: #fafafa;
  border-radius: 5px 5px 0 0;
}

.param-item__ios-switch {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  scroll-margin-block: 0;
  scroll-margin-inline: 0;
  width: 30px;
  height: 18px;
  margin: 0 10px 0 8px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: none;
  background-color: transparent;
  background-image: none;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  line-height: 0;
  font-size: 0;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.param-item__ios-switch::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.param-item__ios-switch::after {
  content: '';
  position: absolute;
  /* Belső magasság: 18px (border-box) − 4px keret = 14px → (14−11)/2 = 1.5px a függőleges középhez */
  top: 1.5px;
  left: 2px;
  width: 11px;
  height: 11px;
  margin: 0;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--ink);
  box-sizing: border-box;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform 0.2s linear;
}

.param-item__ios-switch[aria-checked='true'] {
  background-color: var(--ink);
  border-color: var(--ink);
}

.param-item__ios-switch[aria-checked='true']::after {
  transform: translate3d(11px, 0, 0);
  background: #fff;
  border-color: #fff;
}

.param-item--inactive .param-item__ios-switch {
  opacity: 0.72;
}

.param-item__ios-switch:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.param-item__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 10px 12px 10px 14px;
  box-sizing: border-box;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
  scroll-margin-block: 0;
  scroll-margin-inline: 0;
}

.param-item--inactive .param-item__body {
  opacity: 0.48;
  pointer-events: none;
  user-select: none;
}

.param-item--inactive .param-item__head-row {
  background: #f0f0f0;
}

.param-item--inactive .param-item__toggle {
  background: transparent;
}

.param-item__toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.param-item__chevron {
  flex-shrink: 0;
  font-size: 0.5rem;
  line-height: 1;
  color: var(--ink-soft);
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.param-item--collapsed .param-item__chevron {
  transform: rotate(-90deg);
}

.param-item__title {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink-soft);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.param-item__body {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  border-radius: 0 0 5px 5px;
}

.param-item--collapsed .param-item__body {
  display: none;
}

.param-item__weight {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  min-width: 0;
}

.param-slider-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

/* A min/max felirat absolute, így a slider mindenhol egyforma hosszú.
   padding: 0 20px → a slider mindkét oldalon 20 px-szel rövidebb, hogy a feliratok és
   a buborék végpontjai ne futtassák le a kártya széléig. */
.param-range-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  position: relative;
  padding: 0 20px;
  box-sizing: border-box;
}

.param-range-row input[type='range'] {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
}

.param-range-row .slider-wrap {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

.param-range-row .slider-wrap input[type='range'] {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* Felső sáv a min/max feliratoknak ÉS a buboréknak. A slider input a wrap aljához simul.
   28px = elég hely egy soros bubble + 1 soros felirathoz. Két soros tartalom kilóghat fölfelé. */
.param-range-thumb-wrap {
  padding-top: 28px;
  position: relative;
}

.param-slider-stack--forest,
.param-slider-stack--index-companion {
  gap: 4px;
}

/* Min/max felirat: absolute a soron belül, alja a slider input felső szélénél (= a track teteje felett).
   A wrap padding-top: 28px ad helyet; a slider input 24px magas → bottom: 24px = a slider teteje.
   white-space: pre → csak a JS-ben írt explicit \n töri sorokra (pl. „0,42 km\n2 üzlet"),
   automatikus tördelés nincs — nem ugrik dinamikusan új sorba húzás közben. */
.param-range-end {
  position: absolute;
  bottom: 24px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  pointer-events: none;
  z-index: 2;
  white-space: pre;
}

/* left/right: 0 → a min/max felirat a SOR teljes szélén kezdődik, 20 px-szel kijjebb
   a slider track végpontjához képest (a row padding-left/right zónájába is belóghat). */
.param-range-end--min {
  left: 0;
  text-align: left;
}

.param-range-end--max {
  right: 0;
  text-align: right;
}

.param-range-current {
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.param-range-current__prefix {
  color: rgba(0, 0, 0, 0.48);
  font-weight: 600;
  margin-right: 5px;
}

.param-range-current__val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #111111;
}

.param-weight-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Ingatlanár: telek | lakás | ház — háromállású kapcsoló (csúszka szélességében) */
.param-variant-segment {
  padding: 0 20px;
  margin: 0 0 12px;
  box-sizing: border-box;
}

.param-variant-segment__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-sizing: border-box;
  background: transparent;
  overflow: hidden;
}

.param-variant-segment__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 33.333%;
  height: 100%;
  margin: 0;
  border-radius: 2px;
  background: var(--ink);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 0;
  transform: translateX(calc(var(--seg-idx, 0) * 100%));
  transition: transform 0.2s linear;
}

.param-variant-segment__btn {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-app);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.param-variant-segment__btn:hover:not(:disabled):not(.param-variant-segment__btn--active) {
  color: var(--ink);
}

.param-variant-segment__btn--active,
.param-variant-segment__btn--active:hover:not(:disabled) {
  color: #fff;
}

.param-variant-segment__track--cols-2 {
  grid-template-columns: 1fr 1fr;
}

.param-variant-segment__track--cols-2 .param-variant-segment__thumb {
  width: 50%;
}

.param-variant-segment__btn--unavailable,
.param-variant-segment__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.param-variant-segment__btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 2;
}

.param-item--inactive .param-variant-segment__btn {
  cursor: not-allowed;
}

.param-random-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  font-family: var(--font-app);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}

.param-random-btn:hover,
.param-random-btn:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.07);
  outline: none;
}

.param-sliders-host {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(48vh, 480px);
  /* Y görgetés marad; vízszintesen ne vágjuk a kilógó buborékot (a böngésző összetett overflow szabályai miatt részleges lehet). */
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 6px;
  margin-top: 6px;
  -webkit-overflow-scrolling: touch;
}

.param-slider-block {
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line);
}

.param-slider-block:last-child {
  border-bottom: none;
}

.param-slider-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-word;
}

.param-sliders-host input[type='range'],
.param-group__body input[type='range'],
.param-item__body input[type='range'],
.param-sliders-host .slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  border-radius: 3px;
  background: transparent;
  outline: none;
  margin-top: 2px;
  cursor: pointer;
}

.param-item__body .param-range-thumb-wrap input[type='range'] {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  direction: ltr;
  position: relative;
  z-index: 1;
}

.param-sliders-host input[type='range']::-webkit-slider-runnable-track,
.param-group__body input[type='range']::-webkit-slider-runnable-track,
.param-item__body input[type='range']::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
}

.param-sliders-host input[type='range']::-webkit-slider-thumb,
.param-group__body input[type='range']::-webkit-slider-thumb,
.param-item__body input[type='range']::-webkit-slider-thumb,
.param-sliders-host .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.2s;
}

.param-sliders-host input[type='range']::-webkit-slider-thumb:hover,
.param-group__body input[type='range']::-webkit-slider-thumb:hover,
.param-item__body input[type='range']::-webkit-slider-thumb:hover,
.param-sliders-host .slider::-webkit-slider-thumb:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.param-sliders-host input[type='range']::-moz-range-track,
.param-group__body input[type='range']::-moz-range-track,
.param-item__body input[type='range']::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
}

.param-sliders-host input[type='range']::-moz-range-thumb,
.param-group__body input[type='range']::-moz-range-thumb,
.param-item__body input[type='range']::-moz-range-thumb,
.param-sliders-host .slider::-moz-range-thumb {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 2px solid #0a0a0a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.param-sliders-host code {
  font-size: 0.72em;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  padding: 0 4px;
  border-radius: 4px;
}

.slider-wrap {
  position: relative;
  padding-top: 26px;
}

/* Két osztály: a .slider-wrap későbbi paddingja ne írja felül */
.slider-wrap.param-range-thumb-wrap {
  padding-top: 28px;
}

.slider-bubble {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.slider-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #0a0a0a;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.38);
  margin-top: 2px;
}

/* ── Mode chips ──────────────────────────────────────────── */

.transport-modes-group .segment-motor-stack {
  margin-bottom: 10px;
}

.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mode-chip {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
}

.mode-chip:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.42);
}

.mode-chip.active {
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.mode-chip.active[data-mode='CAR'],
.mode-chip.active[data-mode='BUS'],
.mode-chip.active[data-mode='RAIL'],
.mode-chip.active[data-mode='TRAM'],
.mode-chip.active[data-mode='HEV'],
.mode-chip.active[data-mode='SUBWAY'] {
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
  color: var(--ink);
}

/* ── Primary CTA (#plan-btn → #search-btn) ───────────────── */

#search-btn,
#plan-btn {
  width: 100%;
  padding: 14px 24px;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none;
  position: relative;
  overflow: visible;
  font-family: var(--font-app);
}

#search-btn::before,
#plan-btn::before {
  display: none;
}

#search-btn:hover,
#plan-btn:hover {
  background: #fff;
  color: var(--ink);
  opacity: 1;
}

#search-btn:active,
#plan-btn:active {
  opacity: 0.88;
}

#search-btn:disabled,
#plan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Result box (HOVA) — üveg kártya, TripBlend alt-card hangulat ─ */

.result-box {
  min-height: 52px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.result-box:not(:empty) {
  box-shadow: none;
  border-color: var(--ink);
}

/* ── Jobb oldali visszajelző: _index eltérések + nyertes sor minden oszlopa ─ */

.feedback-panel[hidden] {
  display: none !important;
}

@media (min-width: 920px) {
  .feedback-panel:not([hidden]) {
    position: fixed;
    z-index: 10;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 38vw);
    max-width: 100%;
    background: var(--paper);
    color: var(--ink);
    border-left: 1px solid var(--ink);
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    overflow: hidden;
    transition:
      transform 0.22s ease,
      box-shadow 0.22s ease,
      background-color 0.22s ease,
      border-color 0.22s ease;
  }

  /* Becsukva: csak a fehér négyzet + nyíl; nem takarja a MapLibre zoomot */
  .feedback-panel.feedback-panel--collapsed:not([hidden]) {
    transform: none;
    width: auto;
    right: calc(var(--map-zoom-gutter) + env(safe-area-inset-right, 0px));
    top: 0;
    bottom: auto;
    height: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .feedback-panel.feedback-panel--collapsed .feedback-panel__inner {
    display: none !important;
  }

  .feedback-panel__edge-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: var(--sidebar-control-top) 18px 0 16px;
    box-sizing: border-box;
    min-width: 58px;
  }

  .feedback-panel.feedback-panel--collapsed .feedback-panel__edge-wrap {
    padding: var(--sidebar-control-top) 0 0 0;
    min-width: 0;
  }

  .feedback-panel__edge-tab {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 2.5px solid var(--ink);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-app);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  }

  .feedback-panel__edge-tab--on,
  .feedback-panel__edge-tab--on:hover:not(:disabled) {
    background: var(--ink);
    color: #fff;
  }

  .feedback-panel__edge-tab--tool:disabled {
    opacity: 0.38;
    cursor: not-allowed;
  }

  .feedback-panel__edge-tab-glyph {
    display: block;
    margin-top: -0.5px;
    user-select: none;
  }

  .feedback-panel__edge-tab:hover {
    background: #fafafa;
  }

  .feedback-panel__edge-tab:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
    z-index: 1;
  }

  .feedback-panel__inner {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 14px 22px;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 919px) {
  .feedback-panel__edge-tab {
    display: none !important;
  }

  .feedback-panel.feedback-panel--collapsed {
    transform: none !important;
  }

  .feedback-panel:not([hidden]) {
    position: relative;
    width: 100%;
    margin-top: 12px;
    max-height: 70vh;
    display: flex;
    flex-direction: row;
    border: 1px solid var(--ink);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
  }

  .feedback-panel__inner {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: auto;
    padding: 12px 12px 14px;
    -webkit-overflow-scrolling: touch;
  }
}

.feedback-panel__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  line-height: 1.25;
}

.feedback-panel__title--city,
.feedback-panel__title--winner {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.feedback-panel .city-info__list {
  margin-top: 6px;
}

.feedback-panel__summary {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 12px;
  color: var(--ink-soft);
}

.feedback-panel__section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  margin: 18px 0 8px;
  color: var(--ink);
}

.feedback-panel__section-title:first-of-type {
  margin-top: 0;
}

.feedback-table-wrap {
  overflow-x: auto;
  margin-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.feedback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.feedback-table th,
.feedback-table td {
  border: 1px solid var(--line);
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
}

.feedback-table th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
  white-space: nowrap;
}

.feedback-table td.feedback-table__num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.feedback-table td.feedback-table__key {
  word-break: break-word;
  max-width: 120px;
}

.feedback-table--all td.feedback-table__key {
  max-width: min(160px, 32vw);
}

.feedback-table--all td.feedback-table__val {
  word-break: break-word;
  min-width: 120px;
  max-width: 320px;
  font-size: 0.66rem;
}

.feedback-table tfoot td {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.03);
}

/* ── Results (TripBlend) ─────────────────────────────────── */

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

.alt-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.alt-card:hover {
  border-color: var(--ink);
  background: #f8f8f8;
}

.alt-card.selected {
  border-color: var(--ink);
  background: #f0f0f0;
  box-shadow: inset 3px 0 0 var(--ink);
}

.alt-card--pure-car {
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.35);
}

.alt-card--pure-car:hover {
  border-color: var(--ink);
  background: #f5f5f5;
}

.alt-card--pure-car.selected {
  background: #eee;
  border-color: var(--ink);
  box-shadow: inset 3px 0 0 #000;
}

.alt-card--pure-transit {
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.2);
}

.alt-card--pure-transit:hover {
  border-color: var(--ink);
  background: #f8f8f8;
}

.alt-card--pure-transit.selected {
  background: #f0f0f0;
  border-color: var(--ink);
  box-shadow: inset 3px 0 0 #000;
}

.alt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.alt-rank {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(0, 0, 0, 0.35);
}

.alt-total {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.alt-time-range {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.alt-summary {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
}

.alt-saved {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.alt-saved.best-tag {
  color: var(--ink);
}

.alt-saved.car-tag {
  color: #404040;
}

.alt-saved.bike-mode-note {
  color: rgba(0, 0, 0, 0.48);
  line-height: 1.4;
}

.badge-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-pill.badge-fastest,
.badge-pill.badge-transfers,
.badge-pill.badge-green,
.badge-pill.badge-walk,
.badge-pill.badge-bike-full,
.badge-pill.badge-best,
.badge-pill.badge-earliest {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}

.badge-pill.badge-best {
  font-weight: 700;
  border-width: 2px;
  border-color: var(--ink);
}

.legs-list {
  display: flex;
  flex-direction: column;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.82rem;
  color: #1e293b;
}

.leg-right {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  white-space: nowrap;
}

.leg-stops {
  padding: 0 0 3px 22px;
  font-size: 0.74rem;
  color: rgba(0, 0, 0, 0.3);
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.leg-dot.car {
  background: #000;
  border: 1px solid #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.leg-dot.bike {
  background: #333;
}

.leg-dot.bus {
  background: #555;
}

.leg-dot.volan_bus {
  background: #444;
}

.leg-dot.rail {
  background: #222;
}

.leg-dot.hev {
  background: #2a2a2a;
}

.leg-dot.tram {
  background: #666;
}

.leg-dot.subway {
  background: #111;
}

.leg-dot.transit {
  background: #0a0a0a;
}

.leg-dot.walk {
  background: #9ca3af;
}

.leg-dot.wait {
  background: #d4d4d4;
}

.leg-item.leg-wait {
  opacity: 0.6;
  font-style: italic;
}

/* ── Error / schedule ──────────────────────────────────────── */

.error {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 12px;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.5;
}

.schedule-note {
  background: #f5f5f5;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ── MapLibre — sötét térképen világos vezérlők + üveg popup ─ */

.maplibregl-ctrl-attrib,
.maplibregl-ctrl-scale {
  filter: invert(1) hue-rotate(180deg);
}

.maplibregl-marker {
  cursor: default;
}

.maplibregl-popup-content {
  border-radius: 2px;
  padding: 10px 14px;
  font-family: var(--font-app);
  font-size: 0.83rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
}

.maplibregl-popup-content b {
  color: var(--ink);
}

.maplibregl-popup-tip {
  border-top-color: var(--ink);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: var(--ink);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: var(--ink);
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--ink);
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--ink);
}

.hover-popup .maplibregl-popup-content {
  padding: 6px 10px;
  font-size: 0.78rem;
  pointer-events: none;
}

/* ── Utilities ───────────────────────────────────────────── */

.hidden {
  display: none !important;
}

#search-btn.loading::after,
#plan-btn.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tb-spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes tb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Holistic Search Engine — mobil nézet (max-width) + is-touch + app-started
   Így érintős laptopon / asztali nézetben nincs indító overlay és alsó panel.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Indító overlay alapból ki (széles képernyőn is, ha is-touch lenne) */
.start-overlay {
  display: none !important;
}

@media (max-width: 900px) {
  html.is-touch .maplibregl-ctrl-attrib,
  html.is-touch .maplibregl-ctrl-logo {
    display: none !important;
  }

  html.is-touch body {
    display: block;
    overflow: hidden;
  }

  html.is-touch #map-container.map-container {
    position: fixed;
    inset: 0;
    z-index: 0;
  }

  html.is-touch .sidebar-dock {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 48vh;
    flex-direction: row;
    align-items: stretch;
  }

  html.is-touch .sidebar-dock__collapse-pill--expand {
    margin-top: 10px;
    margin-left: 10px;
    align-self: flex-start;
  }

  html.is-touch .sidebar-dock .sidebar {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: 48vh;
    border-right: none;
    border-top: 2px solid var(--ink);
    border-radius: 0 8px 0 0;
    background: var(--paper);
    box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  html.is-touch .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-anchor: none;
    scrollbar-gutter: stable;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 18px 10px;
    gap: 12px;
  }

  html.is-touch .sidebar-header {
    padding: 12px 18px 10px;
  }

  html.is-touch .param-global-toolbar {
    margin-top: 12px;
  }

  html.is-touch .sidebar-footer {
    flex: 0 0 auto;
    padding: 10px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line-strong);
  }

  html.is-touch .sidebar-title {
    font-size: 1.05rem;
  }

  html.is-touch .result-box {
    display: none;
  }

  /* Indító overlay — fekete képernyő (üveg kártya nélkül), csak splash idején */
  html.is-touch .start-overlay {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    opacity: 1;
    transition: opacity 0.45s ease;
  }

  html.is-touch .start-overlay.start-overlay--hidden {
    opacity: 0;
    pointer-events: none;
  }

  html.is-touch .start-content {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 28px 24px;
  }

  html.is-touch .start-subtitle {
    color: rgba(255, 255, 255, 0.42);
  }

  html.is-touch .start-tap-hint {
    color: rgba(255, 255, 255, 0.38);
  }

  html.is-touch .start-tap-hint svg {
    stroke: rgba(255, 255, 255, 0.45);
  }

  /* Indítás után: térkép rejtve, csak a csúszka-panel teljes képernyőn */
  html.is-touch.app-started #map-container.map-container {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Térképes pontválasztás (fontos hely): térkép elő, panel eltűnik, alsó szalag */
  html.is-touch.app-started.map-picking #map-container.map-container {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html.is-touch.app-started.map-picking .sidebar-dock {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
  }

  html.is-touch.app-started .sidebar-dock {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: none;
    height: auto;
    min-height: 100dvh;
  }

  html.is-touch.app-started .sidebar-dock .sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: 100dvh;
    border-top: none;
    border-radius: 0;
    background: var(--paper);
    padding: 0;
    padding-top: env(safe-area-inset-top, 0px);
    justify-content: flex-start;
    z-index: 50;
    box-shadow: none;
    overflow: hidden;
  }

  html.is-touch.app-started .sidebar-header {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 8px;
  }

  html.is-touch.app-started .sidebar-scroll {
    padding-top: 0;
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 14px;
  }

  html.is-touch.app-started .param-global-toolbar {
    margin-top: 10px;
  }

  html.is-touch.app-started .sidebar-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

.start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-width: 92vw;
}

.start-title {
  font-family: var(--font-app);
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #fff;
  text-transform: uppercase;
  -webkit-text-fill-color: #fff;
  background: none;
}

.start-subtitle {
  font-family: var(--font-app);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.start-tap-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.85rem;
  font-weight: 600;
  animation: tb-hint-pulse 2.4s ease-in-out infinite;
}

.start-tap-hint svg {
  stroke: #fff;
  opacity: 0.45;
}

@keyframes tb-hint-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Sorszám overlay */

.ticket-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

@media (max-width: 900px) {
  html.is-touch .ticket-overlay:not([hidden]) {
    display: flex;
    animation: tb-overlay-in 0.28s ease;
  }
}

@keyframes tb-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ticket-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 360px;
  padding: 36px 28px 28px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.12);
  animation: tb-card-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tb-card-pop {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.ticket-heading {
  font-family: var(--font-app);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  margin: 0 0 8px;
}

.ticket-number {
  font-family: var(--font-app);
  font-size: clamp(4rem, 24vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  background: none;
  margin: 0;
}

.ticket-hint {
  font-family: var(--font-app);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  color: var(--ink-soft);
  margin: 8px 0 0;
  max-width: 28ch;
}

/* Legenda — jobb alsó; kinyitott jobb panel mellett a panel bal szélére tolódik. */
.heatmap-legend {
  position: fixed;
  z-index: 11;
  right: 18px;
  bottom: 44px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 7px 10px 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-app);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.heatmap-legend--visible {
  display: flex;
}

body:has(#feedback-panel:not([hidden]):not(.feedback-panel--collapsed))
  .heatmap-legend {
  right: calc(min(420px, 38vw) + 12px + env(safe-area-inset-right, 0px));
}

.heatmap-legend__title {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.heatmap-legend__bar {
  width: 160px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #0d0887,
    #5c01a6,
    #9c179e,
    #cc4778,
    #ed7953,
    #f89441,
    #fdc328,
    #f0f921
  );
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.22);
}

.heatmap-legend__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feedback-panel .city-info__list {
  margin-top: 4px;
}

@media (max-width: 919px) {
  .heatmap-legend {
    display: none !important;
  }
}

/* Település-infó popup — kattintásra megjelenő kis ablak */
.city-info-popup .maplibregl-popup-content {
  padding: 0;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: #fff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.city-info-popup .maplibregl-popup-close-button {
  font-size: 1.05rem;
  line-height: 1;
  right: 4px;
  top: 2px;
  color: var(--ink);
  padding: 2px 6px;
  background: transparent;
}

.city-info-popup .maplibregl-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.04);
}

.city-info-popup .maplibregl-popup-tip {
  border-top-color: var(--ink);
  border-bottom-color: var(--ink);
}

.city-info {
  font-family: var(--font-app);
  width: 340px;
  max-width: 100%;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.city-info__title {
  padding: 8px 32px 8px 12px;
  border-bottom: 1.5px solid var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.city-info__list {
  padding: 4px 12px 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.city-info__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.74rem;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.city-info__row:last-child {
  border-bottom: none;
}

.city-info__label {
  color: var(--ink-soft);
  flex: 1;
  line-height: 1.25;
}

.city-info__val {
  font-weight: 700;
  color: var(--ink);
  white-space: pre-wrap;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.city-info__empty {
  padding: 6px 0;
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin: 0;
}
