/* mobile-ui.css — wersja na telefon (≤900 px) w stylu wersji komputerowej.
   Wszystko w @media (max-width:900px) i pod body.m-ui (klasę ustawia fullmap.js tylko na telefonie),
   więc wygląd na komputerze się nie zmienia. */
@media (max-width:900px){

/* ---------- nagłówek: logo po lewej, narzędzia po prawej, jedna linia ---------- */
body.m-ui,body.m-ui.planning:not(.has-journeys){--mobile-header:calc(60px + env(safe-area-inset-top,0px))!important}
body.m-ui>header{display:flex!important;align-items:center;justify-content:space-between;gap:6px;height:var(--mobile-header);
  padding:env(safe-area-inset-top,0px) max(10px,env(safe-area-inset-right,0px)) 0 max(14px,env(safe-area-inset-left,0px))!important;
  background:var(--surface);box-shadow:0 1px 0 color-mix(in srgb,var(--ink) 7%,transparent)}
body.m-ui>header>.brand{width:118px!important;height:44px!important;padding:0!important}
body.m-ui>header>.brand img{height:38px!important;object-position:left center}
body.m-ui>header .hdr-tools{display:flex;align-items:center;gap:2px;margin-left:auto}
body.m-ui>header .hdr-tools .icon{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:50%!important}
body.m-ui>header .hdr-tools .icon.lang{width:auto!important;flex:0 0 auto!important;padding:0 10px!important;gap:6px;border-radius:999px!important}

/* ---------- dolny pasek nawigacji ---------- */
body.m-ui header nav{gap:6px;padding-top:6px;box-shadow:0 -1px 0 color-mix(in srgb,var(--ink) 7%,transparent),0 -8px 28px #0000000f}
body.m-ui nav .nav{border-radius:16px;color:#6b6b6b;font-weight:700;transition:color .2s ease,background-color .2s ease}
body.m-ui nav .nav.active,html[data-theme=dark] body.m-ui nav .nav.active{background:#ffe9e9;color:#ff0000}
body.m-ui nav .nav:hover:not(.active){background:transparent;color:#111}
body.m-ui nav .nav-label-mobile{font:700 11.5px/1.2 Inter,system-ui,sans-serif;letter-spacing:.01em}
html[data-theme=dark] body.m-ui nav .nav.active{background:#3a1414}
html[data-theme=dark] body.m-ui nav .nav{color:#9a9a9a}
html[data-theme=dark] body.m-ui nav .nav:hover:not(.active){color:#f1f1f1}

/* ---------- nakładki mapy: menu transportu po lewej, przyciski mapy po prawej ---------- */
body.m-ui .maptop{left:12px;right:68px;top:12px}
body.m-ui .maptag{display:none!important}
body.m-ui .mapcontrols{top:12px;right:12px;gap:10px}
body.m-ui .mapcontrols #panelToggle{display:none!important}
body.m-ui .mapcontrols button{width:46px;height:46px;border:0!important;border-radius:50%!important;background:var(--surface)!important;color:#111;box-shadow:0 0 22px 1px #00000033!important}
html[data-theme=dark] body.m-ui .mapcontrols button{color:#f1f1f1}
body.m-ui .mapcontrols button svg{width:21px;height:21px}

/* ---------- dolny panel ---------- */
body.m-ui aside#mobileSheet{border:0!important;border-radius:28px 28px 0 0!important;box-shadow:0 0 34px 2px #00000040!important}
body.m-ui .sheet-toolbar{position:relative;min-height:50px!important;flex-basis:50px!important;padding:0 18px!important}
body.m-ui .sheet-toolbar #sheetToggle{padding-top:12px}
body.m-ui .sheet-grip{left:50%!important;top:8px!important;width:42px!important;height:5px!important;background:#d6d6d6!important}
body.m-ui #sheetTitle{font:800 12.5px/1 Inter,system-ui,sans-serif!important;letter-spacing:.08em;text-transform:uppercase;color:#111}
html[data-theme=dark] body.m-ui #sheetTitle{color:#f1f1f1}
body.m-ui .sheet-chevron{display:none}
/* planowanie: zamiast „ZAPLANUJ PODRÓŻ” wystarczy nagłówek „Dokąd jedziemy?”, guzik „Mapa” stoi w jego linii */
body.m-ui.planning:not(.has-journeys) .sheet-toolbar{min-height:22px!important;flex-basis:22px!important}
body.m-ui.planning:not(.has-journeys) #sheetTitle{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.m-ui.planning:not(.has-journeys) .sheet-toolbar #sheetToggle{min-height:22px!important;padding:0}
body.m-ui.planning:not(.has-journeys) .sheet-toolbar #showMobileMap{position:absolute;right:18px;top:28px;margin:0;z-index:3}
body.m-ui.planning:not(.has-journeys) .planner-intro{margin:12px 0 16px!important;padding-right:96px}
body.m-ui .sheet-toolbar #showMobileMap{min-height:34px!important;margin-top:12px;padding:0 14px!important;border-radius:999px;background:#ffe9e9;color:#ff0000;font:800 12.5px/1 Inter,system-ui,sans-serif!important;min-width:0!important}
html[data-theme=dark] body.m-ui .sheet-toolbar #showMobileMap{background:#3a1414}
body.m-ui #plannerPanel{padding:4px 18px 16px!important}

/* nagłówek „Dokąd jedziemy?” */
body.m-ui .planner-intro{margin:6px 0 16px!important}
body.m-ui .planner-intro h1{font:800 clamp(26px,7.4vw,32px)/1.08 Inter,system-ui,sans-serif!important;letter-spacing:-.03em!important;margin:0!important}
body.m-ui .planner-intro h1 span{color:#ff0000}

/* stare elementy planera — zastąpione menu transportu na mapie i ustawieniami pod polami */
body.m-ui .journey-scope,body.m-ui .journey-options,body.m-ui #journeyTimeWrap,body.m-ui .planner-note{display:none!important}

/* ---------- pola Skąd / Dokąd (jak na komputerze: jasnoszare pigułki z pulsującą kropką) ---------- */
body.m-ui #journeyForm{display:flex;flex-direction:column;gap:0;margin:0}
body.m-ui.has-journeys #journeyForm{display:none!important}
body.m-ui .journey-fields{display:grid!important;grid-template-columns:minmax(0,1fr) 40px;grid-template-rows:auto auto;column-gap:4px;row-gap:8px;
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body.m-ui .journey-fields:focus-within{box-shadow:none!important}
body.m-ui .journey-fields>.journey-field:first-child{grid-column:1;grid-row:1}
body.m-ui .journey-fields>.journey-field:last-child{grid-column:1;grid-row:2}
body.m-ui .journey-field{height:54px!important;display:flex;align-items:center;gap:8px;padding:0 4px 0 12px!important;border:0!important;border-radius:999px!important;background:#e2e2e2;transition:box-shadow .15s ease}
body.m-ui .journey-field:focus-within{box-shadow:inset 0 0 0 2.5px #ff0000}
body.m-ui .journey-field .field-inner{flex:1;min-width:0;display:flex;align-items:center;margin:0!important;position:static}
body.m-ui .journey-field .field-inner>label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
body.m-ui .journey-field .field-inner>input{width:100%;height:100%!important;padding:0!important;border:0;background:transparent;color:#111!important;font:600 16px/1 Inter,system-ui,sans-serif!important;text-overflow:ellipsis;caret-color:#ff0000}
body.m-ui .journey-field .field-inner>input::placeholder{color:#666;opacity:1;font-weight:500}
body.m-ui .journey-field .field-inner>input:focus{outline:none;box-shadow:none}
body.m-ui .journey-field .point{position:relative;width:24px;height:24px;flex:none;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;overflow:visible}
body.m-ui .journey-field .point .pd-core{position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:#f00}
body.m-ui .journey-field .point .pd-ripple{position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;border:2px solid #f00;box-sizing:border-box;opacity:0;pointer-events:none}
body.m-ui .journey-field>#journeyLocate,body.m-ui .journey-field>#journeyLocateTo{display:grid;place-items:center;flex:none;width:44px!important;min-width:44px!important;height:44px!important;margin:0;padding:0;border:0;border-radius:50%;background:none!important;color:#222;touch-action:manipulation}
body.m-ui .journey-field>#journeyLocate[hidden],body.m-ui .journey-field>#journeyLocateTo[hidden]{display:none!important}
body.m-ui .journey-field>#journeyLocate svg,body.m-ui .journey-field>#journeyLocateTo svg{display:block;width:24px;height:24px}
body.m-ui .journey-field>#journeyLocate:active,body.m-ui .journey-field>#journeyLocateTo:active{color:#ff0000}
/* zamiana Skąd ⇄ Dokąd: po prawej, między polami */
body.m-ui .journey-fields>.swap{grid-column:2;grid-row:1 / 3;align-self:center;justify-self:center;position:static!important;width:40px!important;height:52px!important;margin:0!important;padding:0;display:grid;place-items:center;border:0;border-radius:14px;background:transparent!important;box-shadow:none!important;color:#111;transform:none!important;touch-action:manipulation}
body.m-ui .journey-fields>.swap svg{display:block;width:24px;height:24px;stroke-width:2.8;overflow:visible}
body.m-ui .journey-fields>.swap:active{color:#ff0000}
html[data-theme=dark] body.m-ui .journey-fields>.swap{color:#f1f1f1}
/* podpowiedzi pod polem */
body.m-ui .journey-field .suggestions{left:0!important;right:0!important;top:auto!important;margin-top:6px;border:0;border-radius:20px!important;padding:6px!important;background:var(--surface);box-shadow:0 10px 30px #00000033!important}
body.m-ui .journey-field{position:relative}
body.m-ui .journey-field .suggestions{position:absolute;top:calc(100% + 4px)!important}
body.m-ui .journey-field .suggestions button{border-radius:14px!important}

/* ---------- ustawienia pod polami: Odjazd (Dziś / Teraz) i Przesiadki ---------- */
body.m-ui .m-set{display:block;margin:16px 0 0}
body.m-ui .m-set>:not(.st-wrap){display:none!important}
body.m-ui .m-set .st-wrap{display:flex;flex-direction:column;gap:10px}
body.m-ui .m-set .st-head{display:flex;align-items:center;justify-content:space-between;min-height:34px;margin:0}
body.m-ui .m-set .hp-title{margin:0!important;padding:0!important}
body.m-ui .m-set .st-title2{margin:6px 0 0!important}
body.m-ui .m-set .st-now{min-height:34px;padding:0 16px}
body.m-ui .m-set .st-picks{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.m-ui .m-set .st-pick{height:52px;border-radius:999px;padding:0 14px 0 16px;font-size:15.5px}
body.m-ui .m-set .st-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.m-ui .m-set .st-segb{min-height:48px;padding:6px 8px;border-radius:999px;font-size:13px;line-height:1.15;white-space:normal}
body.m-ui .m-set .st-select{display:none!important}

/* ---------- przycisk szukania: czerwona pigułka z lupą ---------- */
body.m-ui .search-journey{position:sticky;bottom:0;z-index:5;display:flex!important;align-items:center;justify-content:center;gap:10px;width:100%;min-height:58px!important;margin:20px 0 0!important;padding:0 20px!important;border:0;border-radius:999px!important;
  background:#ff0000!important;background-image:none!important;color:#fff!important;font:800 16.5px/1 Inter,system-ui,sans-serif!important;letter-spacing:.005em;box-shadow:0 10px 24px #ff000040!important;touch-action:manipulation;transition:transform .15s ease}
body.m-ui .search-journey:active{transform:none}
body.m-ui .search-journey>span:nth-child(2):not(.sj-icon){display:none}
body.m-ui .search-journey .sj-icon{display:flex!important;order:-1;width:24px;height:24px;margin:0}
body.m-ui .search-journey .sj-icon svg{display:block;width:24px;height:24px;stroke:#fff}

/* ---------- ciemny motyw: pola zostają jasnoszare (jak na komputerze), ustawienia ciemne ---------- */
html[data-theme=dark] body.m-ui .m-set .hp-title{color:#f1f1f1!important}
html[data-theme=dark] body.m-ui .m-set .st-pick{background:#2e2e2e;color:#f1f1f1}
html[data-theme=dark] body.m-ui .m-set .st-pick:hover,html[data-theme=dark] body.m-ui .m-set .st-pick.is-open{background:#3a3a3a}
html[data-theme=dark] body.m-ui .m-set .st-segb{background:#2e2e2e;color:#f1f1f1}
html[data-theme=dark] body.m-ui .m-set .st-segb.is-on,html[data-theme=dark] body.m-ui .m-set .st-now.is-on{background:#ff0000;color:#fff}
html[data-theme=dark] body.m-ui .m-set .st-now:not(.is-on){background:#2e2e2e;color:#f1f1f1}

/* ---------- okienka kalendarza i zegara na telefonie ---------- */
body.m-ui .st-fly-cal .st-fly-card{width:min(400px,calc(100vw - 28px))}
body.m-ui .st-fly .st-day{min-height:40px}
}

/* małe telefony */
@media (max-width:360px){
body.m-ui>header>.brand{width:104px!important}
body.m-ui #plannerPanel{padding-inline:14px!important}
body.m-ui .m-set .st-segb{font-size:12px}
body.m-ui .m-set .st-pick{font-size:14.5px;padding:0 10px 0 12px;gap:8px}
}

/* gęściej, żeby cały planer mieścił się w panelu bez przewijania (telefony ~800 px wysokości) */
@media (max-width:900px){
body.m-ui .journey-field{height:50px!important}
body.m-ui .journey-fields{row-gap:7px}
body.m-ui.planning:not(.has-journeys) .planner-intro{margin:10px 0 14px!important}
body.m-ui .m-set{margin-top:12px}
body.m-ui .m-set .st-wrap{gap:8px}
body.m-ui .m-set .st-pick{height:48px}
body.m-ui .m-set .st-segb{min-height:46px}
body.m-ui .m-set .st-title2{margin:4px 0 0!important}
body.m-ui .search-journey{min-height:56px!important;margin-top:14px!important}
}
/* menu transportu na mapie: po otwarciu nad dolnym panelem (podniesienie trzyma się jeszcze chwilę na czas animacji zamykania) */
@media (max-width:900px){
body.m-ui .mapwrap{z-index:auto!important}
body.m-ui #map{position:absolute;inset:0;z-index:0;isolation:isolate}
body.m-ui .maptop{z-index:500;transition:z-index 0s linear .5s}
body.m-ui .maptop:has(.hp-wrap.open){z-index:800;transition:none}
}
/* ---------- widoki „Mapa” (pojazdy na żywo) i „Przystanki” w tym samym stylu ---------- */
@media (max-width:900px){
/* Komunikacja / Pociągi: dwa guziki-pigułki obok siebie */
body.m-ui:not(.planning) .tabs{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;min-height:0!important;margin:2px 18px 12px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body.m-ui .tabs .tabs-label{display:none!important}
body.m-ui .tabs .tabs-row{display:contents}
body.m-ui .tabs button{display:flex!important;flex-direction:row!important;align-items:center;justify-content:center;gap:8px;min-height:48px!important;padding:0 14px!important;border:0!important;border-radius:999px!important;background:#e2e2e2!important;color:#111!important;font:700 14px/1 Inter,system-ui,sans-serif!important;box-shadow:none!important;white-space:nowrap}
body.m-ui .tabs button.active{background:#ff0000!important;color:#fff!important}
body.m-ui .tabs button svg{width:18px!important;height:18px!important;flex:none}
body.m-ui .tabs button .tab-city{display:none!important}
/* wyszukiwarka i filtry */
body.m-ui #busPanel{padding:0 18px 12px!important}
body.m-ui .searchbox{min-height:50px!important;padding:0 16px!important;gap:10px;border:0!important;border-radius:999px!important;background:#e2e2e2!important;box-shadow:none!important}
body.m-ui .searchbox:focus-within{box-shadow:inset 0 0 0 2.5px #ff0000!important}
body.m-ui .searchbox>span{color:#111;font-size:18px}
body.m-ui .searchbox input{background:transparent!important;border:0!important;color:#111!important;font:600 16px/1 Inter,system-ui,sans-serif!important;caret-color:#ff0000}
body.m-ui .searchbox input::placeholder{color:#666;font-weight:500}
body.m-ui .searchbox input:focus{outline:none;box-shadow:none}
body.m-ui .chips{gap:8px!important;margin:12px 0 14px!important;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
body.m-ui .chips::-webkit-scrollbar{display:none}
body.m-ui .chips button{flex:none;min-height:40px!important;padding:0 16px!important;border:0!important;border-radius:999px!important;background:#e2e2e2!important;color:#111!important;font:700 13px/1 Inter,system-ui,sans-serif!important;box-shadow:none!important}
body.m-ui .chips button.selected{background:#ff0000!important;color:#fff!important}
/* nagłówek listy i licznik */
body.m-ui .listhead h2{font:800 16px/1.2 Inter,system-ui,sans-serif!important;letter-spacing:-.01em}
body.m-ui .listhead>span{padding:6px 10px;border:0;border-radius:999px;background:#f1f1f1;color:#555;font:700 11.5px/1 Inter,system-ui,sans-serif!important;letter-spacing:0}
/* wiersze pojazdów / przystanków */
body.m-ui .vehicle,body.m-ui .stoprow{border-color:#ececec!important}
body.m-ui .badge{border-radius:12px!important;font:800 14px/1 Inter,system-ui,sans-serif!important}
body.m-ui .vtext strong,body.m-ui .stoprow strong{font:700 14.5px/1.3 Inter,system-ui,sans-serif!important}
body.m-ui .vtext small,body.m-ui .stoprow small{font:500 12px/1.45 Inter,system-ui,sans-serif!important;color:#6b6b6b}
body.m-ui .vtime,body.m-ui .vtime b{font-family:Inter,system-ui,sans-serif!important}
body.m-ui .star{color:#9a9a9a}
body.m-ui .star.on,body.m-ui .star[aria-pressed=true]{color:#ff0000}
/* ciemny motyw */
html[data-theme=dark] body.m-ui .tabs button:not(.active),html[data-theme=dark] body.m-ui .chips button:not(.selected){background:#2e2e2e!important;color:#f1f1f1!important}
html[data-theme=dark] body.m-ui .listhead>span{background:#2e2e2e;color:#bdbdbd}
html[data-theme=dark] body.m-ui .vehicle,html[data-theme=dark] body.m-ui .stoprow{border-color:#2e2e2e!important}
html[data-theme=dark] body.m-ui .vtext small,html[data-theme=dark] body.m-ui .stoprow small{color:#9a9a9a}
}
/* ---------- wyniki wyszukiwania ---------- */
@media (max-width:900px){
body.m-ui.has-journeys .edit-journey{display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:56px!important;margin:4px 0 0;padding:0 8px 0 18px!important;border:0!important;border-radius:999px!important;background:#e2e2e2!important;color:#111!important;box-shadow:none!important}
body.m-ui.has-journeys .edit-journey>span:first-child{font:700 14.5px/1.25 Inter,system-ui,sans-serif!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:none!important;flex:1;min-width:0}
body.m-ui.has-journeys .edit-journey>span:last-child{flex:none;display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;background:#ff0000;color:#fff;font:800 12.5px/1 Inter,system-ui,sans-serif!important}
body.m-ui .results-heading h2{font:800 16px/1.2 Inter,system-ui,sans-serif!important}
body.m-ui .journey-card{border:0!important;border-radius:22px!important;background:#f3f3f3!important;box-shadow:none!important}
body.m-ui .journey-card.selected{background:var(--surface)!important;box-shadow:inset 0 0 0 2.5px #ff0000!important}
body.m-ui .journey-duration{font-family:Inter,system-ui,sans-serif!important;font-weight:800!important}
body.m-ui .line-chip{border-radius:10px!important;font-family:Inter,system-ui,sans-serif!important;font-weight:800!important}
html[data-theme=dark] body.m-ui.has-journeys .edit-journey{background:#e2e2e2!important;color:#111!important}
html[data-theme=dark] body.m-ui .journey-card{background:#242424!important}
html[data-theme=dark] body.m-ui .journey-card.selected{background:#1b1b1b!important}
}
/* jedna czcionka w całym panelu (bez maszynowej), bez powtórzonego „Twoje połączenia” */
@media (max-width:900px){
body.m-ui aside#mobileSheet :is(span,small,b,strong,em,p,time,li,summary,div,h2,h3,label,button){font-family:Inter,system-ui,sans-serif!important}
body.m-ui.has-journeys .results-heading{display:none!important}
body.m-ui .best-route{border-radius:999px!important;font-weight:800!important;letter-spacing:.04em!important}
}
/* przyklejony przycisk szukania: tło panelu wokół, żeby przewijana treść chowała się pod nim czysto */
@media (max-width:900px){
body.m-ui .search-journey{box-shadow:0 0 0 12px var(--surface),0 10px 24px #ff000040!important}
}
/* niższe telefony: ciaśniej, żeby planer dalej mieścił się bez przewijania */
@media (max-width:900px) and (max-height:780px){
body.m-ui.planning:not(.has-journeys) .planner-intro{margin:8px 0 10px!important}
body.m-ui .planner-intro h1{font-size:25px!important}
body.m-ui .journey-field{height:46px!important}
body.m-ui .journey-fields{row-gap:6px}
body.m-ui .m-set{margin-top:8px}
body.m-ui .m-set .st-wrap{gap:6px}
body.m-ui .m-set .st-head{min-height:30px}
body.m-ui .m-set .st-now{min-height:30px}
body.m-ui .m-set .st-pick{height:44px}
body.m-ui .m-set .st-segb{min-height:42px}
body.m-ui .search-journey{min-height:52px!important;margin-top:12px!important}
}
@media (max-width:900px){body.m-ui .m-set .st-switch{height:52px;border-radius:999px;padding:0 12px 0 18px;font-size:15.5px}}
@media (max-width:900px) and (max-height:780px){body.m-ui .m-set .st-switch{height:48px}}
@media (max-width:900px){body.m-ui .m-set .st-modes{gap:8px}body.m-ui .m-set .st-modes .st-switch{min-height:52px;border-radius:999px;padding:6px 8px 6px 16px;font-size:14px}}
@media (max-width:900px) and (max-height:780px){body.m-ui .m-set .st-modes .st-switch{min-height:46px}}
