/* Telefon ma własną kompozycję. Żadna reguła nie dotyczy układu desktopowego. */
.mobilny-powrot-widoku{display:none}
.telefon body { overflow:hidden; }
.telefon #app>.gora,.telefon #kontekst-powiatu,.telefon #nawigacja,.telefon .stopka-strony { display:none!important; }
.telefon #w-przegladarka.map-workspace { height:100dvh; --mp-lista:100%; --mp-karta:100%; }
.telefon .mp-gora { top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));gap:6px; }
.telefon .mp-ui .mp-ikona,.telefon .mp-ui .przycisk,.telefon .mp-ui #mp-wyjdz { min-width:44px;min-height:44px;height:auto;font-size:14px; }
.telefon .mp-ui #mp-wyjdz { width:44px;padding:9px; }
.telefon .mp-ui #mp-wyjdz span { display:none; }
.telefon .mp-szukaj { width:calc(100% - 54px);padding:3px;gap:2px; }
.telefon #mp-nawigator #nav-wpis { font-size:16px;min-width:30px; }
.telefon #mp-nawigator .okruszki { max-width:44%; }
.telefon #mp-nawigator .nav-lista { left:-46px;width:calc(100vw - 16px);min-width:0;max-height:65dvh;overflow:auto; }
.telefon #mp-nawigator .nav-tabela tbody { max-height:50dvh; }
.telefon .mp-narzedzia,.telefon .map-workspace[data-mp-karta=true] .mp-narzedzia { right:8px;top:76px;display:flex;flex-direction:column;padding:3px;gap:2px; }
.telefon .mp-narzedzia .mp-ikona { width:44px;height:44px;min-height:44px; }
.telefon .mp-narzedzia #mp-mierz,.telefon .mp-narzedzia #mp-poprzedni { display:none; }
.telefon .map-workspace #mapa-uciete { display:none; }
.telefon .map-workspace #mapa-stan { top:auto;bottom:calc(74px + env(safe-area-inset-bottom));font-size:12px;max-width:calc(100% - 100px); }
.telefon .map-workspace .leaflet-bottom { bottom:0!important; }
.telefon .mobilny-lista { position:static;transform:none;border-radius:9px;color:var(--akcent);background:var(--akcent-tlo); }
.telefon #mp-panel { display:none!important; }
.telefon #mp-nawigator .nav-lista { left:-3px; }
.telefon [data-ekran-mobilny]:not([data-ekran-mobilny=mapa]) .mp-gora,
.telefon [data-ekran-mobilny]:not([data-ekran-mobilny=mapa]) .mp-narzedzia,
.telefon [data-ekran-mobilny]:not([data-ekran-mobilny=mapa]) #mapa-stan,
.telefon #mp-pokaz-karte { display:none!important; }
.telefon [data-ekran-mobilny]:not([data-ekran-mobilny=lista]) .mp-lista { display:none!important; }
.telefon [data-ekran-mobilny=lista] .mp-lista { position:fixed;inset:0;width:100%;height:100dvh;max-height:none;transform:none!important;opacity:1!important;pointer-events:auto;border:0;border-radius:0;background:var(--pow);backdrop-filter:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);transition:none;box-sizing:border-box; }
.telefon .mp-tytul { padding:4px 10px;flex:none; }
.telefon .mp-tytul h2 { font-size:19px; }
.telefon #mp-powiat-miejsce { display:none; }
.telefon .mp-zasoby { margin:0 8px 4px;flex-wrap:wrap;gap:2px;flex:none; }
.telefon .mp-zasoby button { min-height:44px;min-width:0;flex:1 0 auto;font-size:13px;white-space:normal;padding:5px 7px; }
.telefon .mp-zasoby #mp-filtry { flex:0 0 auto;border:1px solid var(--linia); }
.telefon .mp-filtry { padding:0 8px 4px;flex:none; }
.telefon .mp-filtry select { min-height:44px;font-size:14px; }
.telefon .mp-auto,.telefon .mp-zazn-strone .info-kolekcji { display:none; }
.telefon .mp-zazn-strone { padding:0 10px;flex:none; }
.telefon .mp-zazn-strone label { min-height:44px;font-size:13px; }
.telefon #mp-zetony { max-height:48px; }
.telefon #mp-wiersze { flex:1 1 0;min-height:0;overflow-y:auto; }
.telefon .mp-wiersz { grid-template-columns:32px 44px minmax(0,1fr);gap:6px;padding:5px 8px;min-height:88px; }
.telefon .mp-wiersz>.mp-zazn { width:22px;height:22px;margin:11px 5px; }
.telefon .mp-wiersz .przenies-kolekcje,.telefon .mp-wiersz .zapis-karty { width:44px;min-width:44px;height:44px;min-height:44px;padding:6px; }
.telefon .mp-kolekcje { gap:0; }
.telefon .mp-adres { font-size:15px;min-height:28px;white-space:normal;line-height:1.25; }
.telefon .mp-opis,.telefon .mp-pow,.telefon .mp-pow .powierzchnia-wiersz { font-size:12px; }
.telefon .mp-pow .pod2 { display:inline; }
.telefon .mp-wiersz-akcje { margin:0; }
.telefon .mp-wiersz-akcje .plak,.telefon .mp-wiersz-akcje .mp-osobna { display:none; }
.telefon .mp-wiersz-akcje .mp-karta { padding:4px 10px;min-height:44px;font-size:14px; }
.telefon .mp-stopka { min-height:44px;padding:2px 8px;flex:none;font-size:12px; }
.telefon .mp-stopka .mp-ikona { width:44px;height:44px; }
.telefon .map-workspace #pasek-zazn { flex:none;padding:4px 8px; }
.telefon .map-workspace #zazn-akcje { max-height:60dvh;overflow:auto; }
.telefon .gwiazdka-obserwowanych { font:27px/1 system-ui; }
.telefon .obserwowanie-mobilne[aria-pressed=true] { color:var(--akcent);background:var(--akcent-tlo); }
.telefon #w-przegladarka[data-ekran-mobilny=karta] #miejsce-karty { position:fixed;inset:0;width:100%;height:100dvh;border:0;border-radius:0;z-index:650;background:var(--pow);padding-block:env(safe-area-inset-top) env(safe-area-inset-bottom);box-sizing:border-box; }
.telefon #w-przegladarka[data-ekran-mobilny]:not([data-ekran-mobilny=karta]) #miejsce-karty { display:none!important; }
.telefon .sz-glowa,.telefon .szuflada.z-pelna-karta .sz-glowa { display:flex;flex-wrap:wrap;gap:5px;padding:6px 10px;position:relative;flex:none; }
.telefon .sz-glowa .plaki { display:none; }
.telefon .sz-glowa h2 { width:calc(100% - 125px);font-size:17px;margin:0;order:0; }
.telefon #sz-zamknij { position:static;order:1;min-height:44px;width:auto;min-width:115px;font-size:13px;margin-left:auto; }
.telefon .sz-akcje-karty { order:2;position:static!important;display:flex;gap:5px;width:100%; }
.telefon .sz-akcje-karty .przycisk { min-height:44px; }
.telefon .sz-wybor-karty { width:100%;order:3; }
.telefon .sz-tresc { flex:1;min-height:0;overflow:auto;padding:4px 8px; }
.telefon .sz-przewin { display:none!important; }
.telefon .mobilny-panel { position:fixed;inset:0;height:100dvh;z-index:700;background:var(--pow);display:flex;flex-direction:column;padding-block:env(safe-area-inset-top) env(safe-area-inset-bottom);box-sizing:border-box;pointer-events:auto; }
.telefon .mobilny-panel header,.telefon .mobilny-panel footer { display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--linia);flex:none; }
.telefon .mobilny-panel h2 { font-size:21px;margin:0; }
.telefon .mobilny-panel footer { border-bottom:0;border-top:1px solid var(--linia);justify-content:flex-end; }
.telefon .mobilny-tresc { padding:12px;overflow:auto;flex:1;min-height:0; }
.telefon .mobilny-tresc fieldset { border:1px solid var(--linia);border-radius:10px;padding:8px 12px;margin:0 0 14px; }
.telefon .mobilny-tresc legend { font-weight:600; }
.telefon .mobilny-tresc label { display:flex;align-items:center;gap:12px;min-height:48px;font-size:16px; }
.telefon .mobilny-tresc input { width:22px;height:22px; }
.telefon .mobilny-tresc p { margin:0 0 12px 34px;font-size:13px;line-height:1.4;color:var(--szary); }
.telefon #mob-menu button { display:block;width:100%;text-align:left;margin-bottom:10px;min-height:48px; }
.telefon .mobilny-panel[hidden],.telefon .mobilny-lista[hidden],.telefon .mobilny-tresc[hidden],.telefon .mobilny-panel footer[hidden] { display:none!important; }
.telefon #panel-filtrow { position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;z-index:1300;display:flex;flex-direction:column;padding-block:env(safe-area-inset-top) env(safe-area-inset-bottom);box-sizing:border-box; }
.telefon #panel-filtrow .tresc { flex:1;min-height:0;overflow:auto;padding:8px 12px; }
.telefon #panel-filtrow header,.telefon #panel-filtrow footer { position:static;flex:none;padding:8px 12px; }
.telefon #panel-filtrow footer { display:flex;gap:6px;flex-wrap:wrap; }
.telefon #panel-filtrow footer button { min-height:44px;flex:1; }
.telefon #panel-filtrow input:not([type=checkbox]):not([type=radio]),.telefon #panel-filtrow select { min-height:44px;font-size:16px; }
.telefon #panel-filtrow .wybor,.telefon #panel-filtrow summary { min-height:44px; }
.telefon #panel-filtrow #f-obszar { display:none; }
.telefon #widoki>.widok:not(#w-przegladarka):not(.ukryte) { position:fixed;inset:0;height:100dvh;box-sizing:border-box;overflow:auto;padding:12px;padding-top:env(safe-area-inset-top);padding-bottom:calc(12px + env(safe-area-inset-bottom));z-index:1120;background:var(--pow); }
.telefon .mobilny-powrot-widoku { display:block;position:sticky;top:0;z-index:20;min-height:44px;background:var(--pow);margin-bottom:8px; }
.telefon #w-odblokowane .konfigurator-kolumn { display:none; }
.telefon #w-odblokowane .odb-naglowek { flex-wrap:wrap;gap:8px; }
.telefon #w-odblokowane .odb-tytul h1 { font-size:22px; }
.telefon #w-odblokowane .tabela-przewijana { min-height:0;max-height:none;overflow:visible; }
.telefon #w-odblokowane .tabela-arkusz { min-width:0!important; }
.telefon #logowanie { max-height:100dvh;overflow:auto;box-sizing:border-box; }
.telefon #okno-ramka { max-height:100dvh;overflow:auto; }

.mobilne-cena-data,.zapisane-mobilne { display:none; }
.telefon .mobilne-cena-data { display:flex;justify-content:space-between;gap:8px;font-size:13px;flex-wrap:wrap; }
.telefon .mobilne-cena-data time { color:var(--szary);font-size:12px; }
.telefon #odblokowane-tabela { display:none; }
.telefon .zapisane-mobilne { display:block; }
.telefon .zapisany-rekord { display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;padding:10px 0;border-bottom:1px solid var(--linia); }
.telefon .zapisany-rekord .zapis-karty { width:44px;height:44px;min-width:44px; }
.telefon .zapisany-rekord .zapisany-otworz { display:block;text-align:left;font-weight:600;min-height:44px;width:100%;padding:4px 0;background:none;border:0;color:var(--tekst); }
.telefon .zapisany-rekord p { margin:3px 0;font-size:13px; }
.telefon .zapisany-rekord .msc { display:block;font-weight:normal; }
.telefon .odb-zakres { display:flex;flex-wrap:wrap; }
.telefon .odb-zakres button { min-height:44px;white-space:normal;flex:1; }
.telefon .odb-narzedzia { flex-wrap:wrap; }
.telefon .odb-narzedzia input { min-width:0;max-width:100%;min-height:44px;font-size:16px; }

/* Komunikat nie odbiera dotyku nawigacji i przyciskom zatwierdzania. */
.telefon #komunikat { bottom:calc(70px + env(safe-area-inset-bottom));pointer-events:none;max-height:25dvh;overflow:auto;font-size:13px; }
.telefon #komunikat button, .telefon .komunikat-zamknij { pointer-events:auto;min-width:44px;min-height:44px; }
.telefon :is(.postep-podkladu,.postep-obrysow,.postep-adresow,.postep-dzialek) { min-height:56px; }
/* Legenda na telefonie: cały ekran, „×” w prawym górnym rogu (VIBE-016). Szkło kolumny narzędzi
   (backdrop-filter) zamyka element fixed w jej prostokącie — przy otwartej legendzie bez szkła. */
.telefon .mp-narzedzia:has(#mp-legenda[open]) { backdrop-filter:none;-webkit-backdrop-filter:none;z-index:2000; }
.telefon #mp-legenda[open] .mp-legenda { position:fixed;inset:0;width:auto;min-width:0;max-width:none;max-height:none;border:0;border-radius:0;padding:calc(12px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));font-size:15px;overflow:auto; }
.telefon .mp-legenda-glowa { position:sticky;top:calc(-12px - env(safe-area-inset-top));z-index:1;background:var(--pow);padding:8px 0; }
.telefon .mp-legenda-glowa b { font-size:18px; }
.telefon .mp-legenda p { grid-template-columns:64px 1fr;padding:10px 0; }
.telefon :is(.postep-podkladu,.postep-obrysow,.postep-adresow,.postep-dzialek) span { padding-right:50px; }

.telefon #odblokowane-lista { display:none; }
.telefon .mp-pow .powierzchnia-wiersz .num::after,.telefon .zapisany-rekord .powierzchnia-wiersz .num::after { content:" m²"; }
.telefon .zapisany-rekord .powierzchnia-wiersz { display:inline-flex;gap:4px;flex-wrap:wrap;margin-right:8px;font-size:12px; }

/* MOBILE03: więcej miejsca na rekordy, oddzielne działania kolekcji. */
.telefon .mp-filtry,.telefon .mp-wiersz-akcje { display:none; }
.telefon .mp-wiersz { cursor:pointer; }
.telefon .mobilne-cena-data time { font-weight:700;color:var(--tusz); }
.telefon #panel-filtrow .f-szybkie { display:flex;gap:6px; }
.telefon #panel-filtrow .f-szybkie button { display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:64px;padding:6px;font-size:13px; }
.telefon #panel-filtrow .f-szybkie .ikona { width:24px;height:24px; }
.telefon .mobilne-skupisko-lista { display:grid;gap:8px; }
.telefon .mobilne-skupisko-lista>button { text-align:left;white-space:normal;padding:12px;min-height:60px; }
.telefon .mobilne-skupisko-lista b,.telefon .mobilne-skupisko-lista .num { display:block; }
.telefon #mob-skupisko>p { margin:0 0 12px; }
.telefon #mob-skupisko .strony-przyciski { position:sticky;bottom:-12px;background:var(--pow);padding:8px 0;margin-top:8px; }
/* Skala pozostaje przy dolnej krawędzi; komunikaty tworzą stos nad listą. */
.telefon .map-workspace .leaflet-bottom.leaflet-left { bottom:calc(82px + env(safe-area-inset-bottom))!important;max-height:calc(100dvh - 180px);overflow:auto; }
/* Komunikat mapy (74 px od dołu, do trzech wierszy) i okienka mapy w lewym dolnym rogu nachodziły na siebie:
   przy widocznym komunikacie kolumna okienek stoi nad nim (VIBE-015). */
.telefon .map-workspace:has(#mapa-stan:not([hidden])) .leaflet-bottom.leaflet-left { bottom:calc(150px + env(safe-area-inset-bottom))!important; }
.telefon .map-workspace .leaflet-control-scale { position:fixed;left:8px;bottom:calc(2px + env(safe-area-inset-bottom)); }
.telefon [data-ekran-mobilny]:not([data-ekran-mobilny=mapa]) .leaflet-control-container { visibility:hidden; }

.telefon[data-funkcja-kolekcja="nie"] .mp-wiersz { min-height:0;padding:10px 12px; }

.telefon #mob-menu { display:flex;flex-direction:column; }
.telefon #mob-wyloguj,.telefon #mob-zaloguj { margin-top:auto;border-color:var(--linia); }
.telefon #mob-wyloguj[hidden],.telefon #mob-zaloguj[hidden] { display:none!important; }
.telefon #logowanie { position:fixed;inset:0;width:100%;height:100dvh;display:flex;align-items:stretch;overflow:auto;background:var(--pow);padding:0;z-index:1500; }
.telefon #logowanie .ramka { display:flex;flex-direction:column;box-sizing:border-box;width:100%;min-height:100%;border:0;border-radius:0;box-shadow:none;padding:calc(24px + env(safe-area-inset-top)) 20px calc(16px + env(safe-area-inset-bottom)); }
.telefon #logowanie h1 { font-size:28px;margin-top:28px; }
.telefon #l-formularz { margin:18px 0; }
.telefon #l-formularz input { min-height:48px;font-size:16px; }
.telefon #logowanie button { min-height:48px;flex-shrink:0; }
.telefon #l-publiczny { order:10;margin-top:auto;width:100%; }
.telefon #logowanie [data-styl-otworz] { margin-bottom:16px;text-align:left; }
@media (max-height:500px) {
 .telefon #logowanie .ramka { padding-top:12px; }
 .telefon #logowanie h1 { margin-top:12px; }
 .telefon #l-formularz { margin:8px 0; }
}

.telefon .mp-tytul .mobilny-powrot-mapa{width:auto;min-width:80px;min-height:44px;display:inline-flex;gap:6px;padding:0 10px;border:1px solid var(--linia);border-radius:9px}
.telefon .mobilny-powrot-mapa span{font:600 14px var(--font-tekst)}

.mp-na-mapie,.sz-na-mapie{display:none}
.telefon .mp-wiersz-dane{position:relative;padding-right:48px}
.telefon .mp-na-mapie{display:inline-flex;position:absolute;right:0;top:0;width:44px;height:44px;padding:8px}
.telefon .sz-na-mapie{display:inline-flex;min-height:44px}
.telefon #sz-pelna-karta{display:none!important}
.telefon .map-workspace #mapa-stan:not(.wczytywanie){left:12px;right:12px;max-width:none;transform:none}

/* Zapisane: tytuł z powrotem, wspólny pasek działań i wyszukiwarka poniżej. */
.odb-mobilne-narzedzia[hidden]{display:none}
.telefon #w-odblokowane .odb-naglowek{display:block;margin:0 0 4px}
.telefon #w-odblokowane .odb-tytul{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-items:center;width:100%}
.telefon #w-odblokowane .odb-tytul h1{grid-row:1;grid-column:1;font-size:21px}
.telefon #w-odblokowane .mobilny-powrot-widoku{grid-row:1;grid-column:2;position:static;display:inline-flex;align-items:center;gap:5px;margin:0;padding:6px 9px;min-width:76px}
.telefon #w-odblokowane #odblokowane-podpis{grid-row:2;grid-column:1/-1;margin:0;font-size:12px;line-height:1.4}
.telefon #w-odblokowane .odb-naglowek .przyciski-widoku{display:none}
.telefon .odb-mobilne-narzedzia{display:flex;align-items:stretch;gap:3px;flex-wrap:wrap;margin:4px 0 6px}
.telefon .odb-mobilne-narzedzia .przycisk{min-height:44px;min-width:44px;box-sizing:border-box;padding:6px;font-size:13px;display:flex;align-items:center;justify-content:center}
.telefon .odb-mobilne-narzedzia .odb-zakres{height:auto;flex:1;min-width:154px;flex-wrap:nowrap;box-sizing:border-box}
.telefon .odb-mobilne-narzedzia .odb-zakres button{height:auto;min-height:44px;line-height:1.25;padding:3px 5px;font-size:12px;white-space:normal;min-width:0}
.telefon .odb-mobilne-narzedzia .odb-info-tresc{position:fixed;left:12px;right:12px;top:140px;width:auto;max-height:calc(100dvh - 160px)}
.telefon #w-odblokowane .odb-narzedzia{margin:0 0 4px}
.telefon #w-odblokowane .odb-narzedzia>input{flex-basis:100%;order:0}
.telefon #mp-wiersze,.telefon #w-odblokowane{touch-action:pan-y pinch-zoom;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
.telefon #mapa{touch-action:none}
.telefon .sz-tresc{touch-action:pan-y pinch-zoom;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
.telefon .sz-glowa,.telefon .szuflada.z-pelna-karta .sz-glowa{gap:0;padding:4px 6px;align-items:center}
.telefon .sz-glowa h2{width:auto;min-width:0;flex:1;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.telefon .sz-akcje-karty{width:auto;flex:none;gap:0;order:1}
.telefon .sz-akcje-karty .przycisk{width:44px;min-width:44px;height:44px;padding:8px;justify-content:center}
.telefon .sz-akcje-karty :is(.zapis-karty-opis,.sz-na-mapie span,.sz-bryla-lod span,#sz-link-karty){display:none}
.telefon #sz-zamknij{order:2;min-width:44px;width:44px;height:44px;padding:8px;margin:0;font-size:16px;align-self:flex-start}
.telefon .sz-bryla-lod[hidden]{display:none!important}
/* Jeden układ nagłówka we wszystkich stanach: przed listą kart, przy wczytywaniu i błędzie karty,
   z kartą. Siatka i odstępy z style.css mają wyższą specyficzność niż `.telefon .sz-glowa`, a klasa
   z-pelna-karta przychodzi dopiero z listą kart — „Zamknij” przeskakiwał wtedy o 38 px w prawo
   i 6 px w górę (OBF-001 F1). Akcje i „Zamknij” zawsze w prawym górnym rogu: obok adresu przy
   wczytywaniu i bez niego, gdy adres jest w karcie (tytuł schowany wizualnie, style.css) */
.telefon .szuflada .sz-glowa:has(.sz-akcje-karty){display:flex;flex-wrap:wrap;gap:0;padding:4px 6px;align-items:center}
.telefon .szuflada .sz-glowa:has(.sz-akcje-karty)>h2{white-space:normal}
.telefon .szuflada .sz-glowa>.sz-akcje-karty{margin-left:auto;align-self:flex-start}
.telefon .sz-glowa>.pod{order:3;flex-basis:100%;font-size:12px;padding:0 4px}
.telefon .sz-bledne{order:4;flex-basis:100%;margin:2px 4px 4px}
.telefon #mapa .leaflet-popup-close-button{width:44px;height:44px;font-size:28px;line-height:44px;color:var(--tusz);border-radius:12px}
.telefon #mapa .leaflet-popup-content{margin:38px 14px 14px}
.telefon #mapa .podglad-mapy .przycisk{min-height:44px}
.telefon #mapa .podglad-mapy .wyc-akcje{gap:6px}
.wybor-powiatu-glowa{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wybor-powiatu-glowa button{min-width:44px;min-height:44px}
#w-wybor-powiatu{max-width:1100px;margin:auto}
.telefon #w-wybor-powiatu{max-width:none;touch-action:pan-y pinch-zoom}
.telefon #w-wybor-powiatu .wybor-powiatu-glowa{position:sticky;top:0;background:var(--pow);z-index:2}
.telefon #w-wybor-powiatu h1{font-size:23px}
#mp-nawigator .okruszki .nav-zmien-powiat,.nav-zmien-powiat{display:inline-flex!important;align-items:center;justify-content:center;flex:none;min-width:32px;min-height:32px}
.telefon #mp-nawigator .okruszki .nav-zmien-powiat{min-width:44px;min-height:44px}
/* Po wyborze ulicy nie ma już inputu: nazwa wykorzystuje wolne miejsce. */
.telefon #mp-nawigator .nav-pole[data-koniec=true] .okruszki{max-width:calc(100% - 44px);flex:1;min-width:0}
