:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#1a314a;background:#f3f6fa;font-size:15px;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;min-height:100%;}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #8fb9fa;outline-offset:2px}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}.application{display:flex;min-height:100dvh;max-width:2200px;margin:auto}.sidebar{flex:0 0 332px;min-width:0;background:#fff;border-right:1px solid #e3eaf2;display:flex;flex-direction:column;gap:19px;padding:24px 20px 14px;box-shadow:5px 0 20px #152c4107;position:relative;z-index:5}.brand{display:flex;align-items:center;gap:11px;padding-bottom:15px;border-bottom:1px solid #e9eef4}.brand-icon{background:#e6efff;color:#225ba4;display:grid;place-items:center;font-size:28px;width:44px;height:44px;border-radius:12px}.brand strong{font-size:18px;letter-spacing:-.4px;display:block}.brand span:not(.version){font-size:12px;color:#8394a8;margin-top:3px;display:block}.brand .version{font-size:11px;margin-left:auto;color:#647b96;background:#f1f5fa;padding:5px 8px;border-radius:8px}.side-section{min-width:0}.side-label{font-size:11px;letter-spacing:.95px;font-weight:800;color:#8292a6;margin:0 0 9px;display:block}.switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#eef3fa;gap:4px;padding:4px;border-radius:11px}.switcher button{padding:10px 3px;font-size:12px;font-weight:750;border:none;border-radius:8px;background:transparent;color:#647894}.switcher button.active{background:#2465b5;color:white;box-shadow:0 2px 7px #193e6730}.context-hint{font-size:12px;line-height:1.5;color:#7e90a5;margin:9px 1px 0}.input-box{display:flex;align-items:center;gap:5px;border:1px solid #d6e1ef;border-radius:11px;padding:0 11px;background:white}.input-box:focus-within{border-color:#6197dc;box-shadow:0 0 0 3px #d5e7fe}.input-box>span{font-size:22px;color:#879ab1}.input-box input{border:0;outline:0;font-size:14px;width:100%;min-width:0;padding:12px 3px;color:#284058}.suggestions{z-index:10;background:white;border:1px solid #e1e7f0;box-shadow:0 9px 30px #1a375525;border-radius:10px;margin-top:5px;max-height:220px;overflow:auto}.suggestions button{width:100%;display:flex;flex-direction:column;gap:3px;text-align:left;border:0;padding:10px 12px;background:#fff;color:#2c4660}.suggestions button:hover{background:#edf5ff}.suggestions small{color:#8799ac;font-size:11px}.suggestions p{padding:5px 12px;font-size:12px;color:#637790}.selection-section{padding:13px 14px;border:1px solid #dce8f7;border-radius:12px;background:#f7fbff}.selection-over{font-size:10px;font-weight:800;letter-spacing:.8px;color:#4772ab}.selection-section h3{font-size:16px;margin:8px 0 3px}.selection-code{color:#7b8da3;font-size:11px;margin-bottom:11px}.primary-action{width:100%;padding:9px 10px;background:white;border:1px solid #c6dcf5;border-radius:8px;color:#2561ad;font-weight:700;font-size:12px}.primary-action.marked{background:#e4f6ee;color:#157b52;border-color:#a9e0ca}.list-section{flex:1;display:flex;flex-direction:column;min-height:120px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.section-heading h2{font-size:14px;margin:0}.section-heading>span{background:#f0f4f9;border-radius:7px;color:#617c9b;padding:5px 9px;font-size:12px;font-weight:750}.unit-list{display:flex;flex-direction:column;gap:3px;overflow:auto;min-height:130px;max-height:43vh;scrollbar-color:#d3e0ef transparent;scrollbar-width:thin}.unit{display:flex;align-items:center;gap:9px;text-align:left;border:none;border-radius:8px;background:#fff;color:#40566d;padding:9px 9px;font-size:13px;font-weight:600;line-height:1.25;min-height:36px}.unit:hover{background:#eff5fd}.unit.selected{background:#e7f0ff;color:#235ba0}.unit .unit-dot{width:9px;height:9px;border-radius:50%;background:#b9d1e7;flex-shrink:0}.unit .unit-dot.marked{background:#3daf83}.unit .unit-desc{margin-left:auto;color:#95a4b5;font-size:10px;font-weight:500;white-space:nowrap}.unit>span:nth-child(2){min-width:0}.side-footer{border-top:1px solid #e8edf4;padding-top:13px;margin-top:auto;color:#8292a5;font-size:11px;line-height:1.5}.side-footer p{margin:9px 0 0}.saved{font-size:11px}.saved span{color:#39a77c;font-size:12px}.export-controls{display:flex;gap:7px;margin-top:10px}.export-controls button{flex:1;border:1px solid #d6e1ee;padding:8px;border-radius:8px;background:#f8fbff;color:#38618c;font-size:12px;font-weight:700}.main{flex:1;min-width:0;display:flex;flex-direction:column;padding:21px 24px 14px;max-height:100dvh}.main-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;min-width:0}.breadcrumbs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:9px}.breadcrumbs button{border:0;background:transparent;color:#3c7bc0;font-size:12px;font-weight:700;padding:0}.breadcrumbs button:hover{text-decoration:underline}.breadcrumbs .crumb-separator{color:#9aaec0;font-size:12px}.main-header h1{font-size:26px;letter-spacing:-.75px;line-height:1.24;margin:0}.main-header h1 span{font-weight:500;color:#647f9e}.main-header p{font-size:13px;color:#7d8fa3;margin:7px 0 0}.stats{display:flex;gap:9px;flex-shrink:0}.stat{background:#fff;border:1px solid #e0e9f4;border-radius:11px;min-width:116px;padding:10px 13px}.stat strong{font-size:23px;color:#225da6;display:block;line-height:1.2}.stat small{font-size:10px;color:#8396ac;display:block;white-space:nowrap;margin-top:4px}.map-shell{background:#fff;border:1px solid #dde7f2;border-radius:15px;box-shadow:0 5px 28px #2443650a;flex:1;min-height:420px;display:flex;flex-direction:column;overflow:hidden}.map-topline,.map-bottomline{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#fff;padding:11px 15px;color:#7c8ea3;font-size:11px;flex:0 0 auto;min-height:42px}.map-topline{border-bottom:1px solid #e6edf5}.map-bottomline{border-top:1px solid #e6edf5}.legend{display:flex;gap:7px;align-items:center}.legend-regular,.legend-visited{display:inline-block;height:11px;width:11px;border-radius:3px;background:#b8d5f3;border:1px solid #99bddf}.legend-visited{margin-left:13px;background:#58bf94;border-color:#339f78}.fit-btn{border:0;background:#eef5ff;color:#2867ab;font-size:12px;font-weight:700;padding:8px 11px;border-radius:8px}.map-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:radial-gradient(circle at 58% 33%,#fafdff,#f1f6fc 80%)}.map-stage:before{position:absolute;content:"";inset:0;background-image:linear-gradient(#a7c1de14 1px,transparent 1px),linear-gradient(90deg,#a7c1de14 1px,transparent 1px);background-size:48px 48px;pointer-events:none}.map-stage svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}.map-stage svg.grabbing{cursor:grabbing}.shape{fill:#c6dcf1;stroke:#fff;stroke-linejoin:round;stroke-width:1.3;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .09s ease}.shape:hover{fill:#7db2e3}.shape.visited{fill:#60bd96}.shape.visited:hover{fill:#3ba875}.shape.selected{stroke:#235ba6;stroke-width:2.2;fill:#7daee4}.shape.selected.visited{fill:#38a980}.labels{pointer-events:none;position:absolute;inset:0;overflow:hidden}.map-label{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;font-size:12px;line-height:1.1;font-weight:760;color:#365677;pointer-events:none;text-shadow:-2px -2px #ffffff,2px -2px #ffffff,-2px 2px #ffffff,2px 2px #ffffff,0 0 4px #ffffff}.tooltip{position:absolute;z-index:8;background:#1d4165;color:white;padding:8px 10px;box-shadow:0 4px 14px #193a5b2e;border-radius:8px;pointer-events:none;font-size:12px;font-weight:700;max-width:min(290px,75vw)}.zoom{position:absolute;top:14px;right:14px;display:flex;flex-direction:column;gap:6px}.zoom button{width:38px;height:38px;border-radius:10px;background:white;border:1px solid #dae6f3;box-shadow:0 2px 8px #24466c12;color:#33618d;font-size:22px}.message{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#ffffffef;border:1px solid #dbe7f4;box-shadow:0 9px 35px #24466b13;padding:23px 27px;border-radius:14px;min-width:230px;max-width:min(410px,90%);text-align:center}.message strong{font-size:16px;display:block;margin:9px 0}.message p{font-size:12px;color:#6c7f95;margin:5px 0}.message button{border:0;background:#2466b6;color:white;padding:9px 12px;border-radius:8px;margin-top:12px}.loader{display:block;width:24px;height:24px;margin:auto;border-radius:50%;border:3px solid #dbe8f7;border-top-color:#286dbb;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.under-note{font-size:11px;color:#91a0ae;margin:10px 2px 0}.empty{font-size:12px;color:#9aa8b8;padding:12px 4px}@media(max-width:1050px){.sidebar{flex-basis:284px;padding:15px 13px;gap:13px}.main{padding:15px 14px}.main-header h1{font-size:21px}.stat{min-width:94px}.stat small{font-size:9px}.map-label{font-size:11px}}@media(max-width:740px){.application{display:block}.sidebar{padding:13px;gap:10px;border-right:0;border-bottom:1px solid #dee8f3}.brand{padding-bottom:11px}.main{max-height:none;padding:12px}.main-header{flex-wrap:wrap;gap:8px}.main-header h1{font-size:22px}.stats{width:100%}.stat{flex:1}.list-section{max-height:185px}.unit-list{max-height:125px;min-height:50px}.side-footer{display:none}.map-shell{height:60vh;min-height:420px;flex:auto}.bottom-hint{display:none}.under-note{margin-bottom:12px}.map-label{font-size:11px}}

/* 0.3: trwałe podpisy wszystkich jednostek i linie odnośników */
.map-stage svg.label-connectors{z-index:2;pointer-events:none;touch-action:auto;cursor:default;}
.labels{z-index:3}
.map-label.label-inside{font-size:13px;font-weight:800;color:#284c72;text-shadow:-2px -2px #fff,2px -2px #fff,-2px 2px #fff,2px 2px #fff,0 0 6px #fff;}
.map-label.label-callout{font-size:12px;font-weight:750;line-height:1.1;padding:5px 8px;border:1px solid #d4e4f3;background:#fffffff2;box-shadow:0 1px 5px #24466c13;border-radius:7px;color:#21476e;max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:none;z-index:4;}
.map-label.label-callout.label-left{transform:translate(-100%,-50%);text-align:right;}
.map-label.label-callout.label-right{transform:translate(0,-50%);text-align:left;}
.leader-line{stroke:#7296bb;stroke-width:1;stroke-opacity:.72;fill:none;vector-effect:non-scaling-stroke;}
.leader-dot{fill:#2d699b;stroke:white;stroke-width:1.5;vector-effect:non-scaling-stroke;}
@media(max-width:740px){.map-label.label-callout{font-size:10px;padding:4px 4px;max-height:24px}.map-label.label-inside{font-size:11px}.map-stage{min-height:470px}}

.labels .map-label[role="button"]{pointer-events:auto;cursor:pointer}
.labels .map-label[role="button"]:hover,.labels .map-label[role="button"]:focus-visible{border-color:#488bcc;box-shadow:0 2px 8px #24598a35;color:#13457a;outline:0}
.map-label.label-callout.visited{background:#e6f7ed;border-color:#69cda0;color:#146441}
.map-label.label-callout.chosen{background:#dceeff;border-color:#3983c5;color:#174a7a}
.map-label.label-inside.visited{color:#136c48}
.map-label.label-callout{overflow:visible;text-overflow:clip;}

/* 0.4: czytelna ścieżka województwo → powiat → gmina */
.mobile-brand{display:none}
.journey-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 10px}
.journey{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.journey>span{color:#94a9be;font-size:17px}
.journey button,.journey-actions button{border:1px solid #d3e1f0;border-radius:9px;padding:9px 11px;color:#305c87;background:#fff;font-size:12px;font-weight:750}
.journey button.active{background:#2365ab;border-color:#2365ab;color:white}
.journey button:disabled{background:#f0f3f7;color:#a3b2c0;cursor:default}
.journey-actions{display:flex;gap:6px}
.journey-actions button:disabled{opacity:.42;cursor:default}
.journey-actions #jump-search{display:none}
.mobile-selection{display:none}
@media(max-width:740px){
 .application{display:flex;flex-direction:column;min-height:100dvh}
 .main{order:1;padding:10px 10px 16px}
 .sidebar{order:2;gap:10px;border:1px solid #e3eaf2;border-radius:12px;margin:0 10px 15px;padding:14px}
 .sidebar .brand{display:none}
 .mobile-brand{display:flex;align-items:center;gap:9px;font-size:16px;padding:5px 3px 12px;color:#183f69}
 .mobile-brand>span:last-child{font-size:11px;color:#6486aa;margin-left:auto;background:#e8f2fc;padding:4px 8px;border-radius:8px}
 .mobile-logo{background:#e6efff;padding:6px 9px;font-size:19px;border-radius:9px}
 .journey-bar{align-items:stretch;flex-wrap:nowrap;gap:5px;margin-bottom:10px}
 .journey{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:3px;flex:1;min-width:0}
 .journey button{font-size:10px;line-height:1.15;padding:9px 3px;border-radius:7px;min-width:0;white-space:normal}
 .journey>span{font-size:14px}
 .journey-actions{flex-direction:column;min-width:61px}
 .journey-actions button{font-size:10px;padding:4px}
 .journey-actions #jump-search{display:block}
 .main-header{padding:3px 0 8px}
 .main-header h1{font-size:19px}
 .main-header p{font-size:11px}
 .stats{gap:7px}
 .stat{padding:7px 10px}
 .stat strong{font-size:16px}
 .map-shell{height:68dvh;min-height:500px;max-height:730px}
 .map-stage{min-height:450px}
 .map-topline,.map-bottomline{padding:7px 8px;min-height:34px}
 .map-topline{font-size:10px}
 .fit-btn{font-size:10px;padding:7px}
 .map-bottomline{font-size:9px}
 .map-label.label-callout{font-weight:750;padding:4px 4px;font-size:10px;line-height:1.1}
 .mobile-selection:not([hidden]){position:absolute;z-index:7;display:flex;bottom:10px;left:8px;right:8px;align-items:center;gap:8px;padding:9px 9px;background:#fff;border:1px solid #bdd5ec;box-shadow:0 5px 18px #254c7933;border-radius:12px}
 .mobile-selection div{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
 .mobile-selection strong{font-size:14px;color:#1f4671;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-selection small{font-size:10px;color:#6b829b}
 .mobile-mark{border:1px solid #b9d5ee;background:#e6f2fc;border-radius:8px;padding:9px 10px;white-space:nowrap;color:#195c9b;font-size:11px;font-weight:750}
 .mobile-mark.marked{background:#d6f4e2;border-color:#72c9a0;color:#187044}
 #mobile-close{border:none;background:transparent;font-size:21px;color:#6c8096;padding:4px}
 .shape{stroke-width:1.5}
 .label-count{font-size:10px}
 .under-note{font-size:10px;padding:0 3px}
 .side-section.search-area{scroll-margin-top:10px}
 .unit-list{max-height:310px}
 .list-section{max-height:360px}
 .side-footer{display:block}
}
@media(max-width:360px){.journey button{font-size:9px}.journey-actions{min-width:57px}.map-shell{min-height:560px}.map-label.label-callout{font-size:9px}}

/* 0.4 mobile: stała lista podpisów pod mapą, bez etykiet zakrywających geometrię */
.mobile-map-labels{display:none}
@media(max-width:740px){
 .map-shell{height:auto;min-height:0;max-height:none;display:flex;flex-direction:column}
 .map-stage{height:clamp(350px,51dvh,445px);min-height:350px;flex:none}
 .mobile-map-labels:not([hidden]){display:block;flex:none;background:#f9fcff;padding:12px;border-top:1px solid #dbe7f3;}
 .mobile-labels-title{font-size:12px;color:#527396;font-weight:800;margin:0 0 10px}
 .mobile-labels-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .mobile-label-button{display:block;text-align:left;border:1px solid #cddff0;border-radius:8px;padding:10px 9px;background:#fff;color:#2b547b;font-size:11px;font-weight:750;line-height:1.25;min-height:38px;overflow-wrap:anywhere}
 .mobile-label-button.visited{background:#e2f7eb;border-color:#78caa0;color:#196940}
 .mobile-label-button.chosen{background:#dbeeff;border-color:#4795d4}
 .map-stage svg.label-connectors{display:none}
}

/* v0.5: numerowane obszary + pełne nazwy bez kolizji; zawsze widoczna czytelna lista */
.map-tools{display:flex;align-items:center;gap:7px;margin-left:auto;flex-wrap:wrap}
.map-topline{gap:10px;flex-wrap:wrap}
.map-index{position:absolute;z-index:5;transform:translate(-50%,-50%);display:grid;place-items:center;width:23px;height:23px;border-radius:50%;border:2px solid #fff;background:#2369ad;color:#fff;font-weight:800;font-size:11px;box-shadow:0 1px 5px #1d457d65;pointer-events:auto;cursor:pointer;line-height:1;padding:0}
.map-index.chosen{background:#ffbe41;color:#243c58;outline:2px solid #264f83;z-index:6}
.map-index.visited{background:#20895c}
.unit-number{display:inline-grid;place-items:center;flex:none;width:22px;height:22px;border-radius:7px;background:#e7f0fb;color:#2863a3;font-size:10px;font-weight:800}
.unit.selected .unit-number{background:#2768b0;color:#fff}
.mobile-labels-heading{display:flex;flex-direction:column;gap:3px;margin-bottom:11px}
.mobile-labels-heading strong{font-size:15px;color:#214a73}
.mobile-labels-heading small{font-size:11px;color:#617e9b;line-height:1.4}
.mobile-filter{width:100%;min-height:44px;border-radius:10px;background:#fff;border:1px solid #c9dbed;padding:10px 13px;font-size:14px;margin:0 0 10px}
.mobile-label-index{display:grid;place-items:center;flex:none;background:#e7f0fb;color:#22629e;font-weight:850;border-radius:7px;width:28px;height:28px;font-size:12px}
.mobile-label-text{flex:1;overflow-wrap:normal;line-height:1.35}
.mobile-label-visited{color:#1d8a55;font-size:16px}
.mobile-label-button.chosen .mobile-label-index{background:#226ab5;color:#fff}
.mobile-label-button.visited .mobile-label-index{background:#1e895a;color:#fff}
@media(max-width:740px){
 .map-topline{justify-content:space-between}
 .map-tools{gap:5px}
 .map-tools .fit-btn{font-size:10px;padding:8px 7px;min-height:34px}
 .map-stage{height:clamp(320px,46dvh,425px);min-height:320px}
 .mobile-labels-grid{display:flex;flex-direction:column;gap:7px}
 .mobile-label-button{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;padding:10px 11px;font-size:14px;letter-spacing:.05px}
 .mobile-map-labels:not([hidden]){padding:15px 12px}
 .map-index{width:21px;height:21px;font-size:10px}
 .map-label.label-callout{font-size:10px}
}
@media(min-width:741px) and (max-width:950px){.map-tools .fit-btn{padding:7px 8px;font-size:11px}}

/* v0.5.1: narzędzia poza mapą i bez powtórzonej listy pod spodem na małym ekranie */
.map-tools .zoom{position:static;display:flex;flex-direction:row;gap:5px}
.map-tools .zoom button{width:32px;height:32px;font-size:19px;box-shadow:none}
@media(max-width:740px){
 .sidebar .list-section{display:none}
 .sidebar .side-section[aria-label="Poziom podziału"]{display:none}
 .map-tools .zoom button{width:32px;height:32px}
}

/* v0.6: etykiety adaptacyjne w obrębie wielokątów, nigdy leader lines / numerki */
.labels{z-index:3;pointer-events:none!important}
.labels .map-label.label-adaptive{pointer-events:none!important;cursor:default;display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-line;line-height:1.24;padding:2px 4px;min-width:0;font-weight:750;color:#1a4267;text-shadow:-1.5px -1.5px 0 #fff,1.5px -1.5px 0 #fff,-1.5px 1.5px 0 #fff,1.5px 1.5px 0 #fff,0 0 5px #fff;overflow:visible}
.labels .map-label.label-adaptive.chosen{background:#ffffffd6;border:1px solid #245eaa;border-radius:5px;color:#12467a}
.labels .map-label.label-adaptive.visited{color:#0b754a}
#label-connectors,.map-index{display:none!important}
.map-stage .shape{cursor:pointer;touch-action:none}
.map-stage svg#map{touch-action:none}
@media(max-width:740px){
  .sidebar .list-section{display:flex!important;max-height:360px}
  .sidebar .unit-list{max-height:295px;overflow-y:auto}
  .map-stage{height:clamp(340px,46dvh,470px);min-height:340px}
  .mobile-map-labels{display:none!important}
  .labels .map-label.label-adaptive{font-weight:790}
}


/* v0.7: geolokalizacja na żądanie; widoczna kontrolka na Androidzie i Windows */
.locate-me{position:absolute;top:13px;left:13px;z-index:7;display:flex;align-items:center;justify-content:center;min-height:42px;padding:9px 13px;background:#fff;color:#175792;border:1px solid #b8d2e9;border-radius:11px;box-shadow:0 3px 12px #18477922;font-size:13px;font-weight:800;letter-spacing:.1px;touch-action:manipulation}
.locate-me:hover{background:#eef7ff;border-color:#7dafd7}
.locate-me:disabled{opacity:.8;cursor:wait}
.geo-status:not([hidden]){position:absolute;left:13px;top:63px;z-index:6;max-width:min(430px,calc(100% - 90px));padding:9px 12px;background:#fffefa;border:1px solid #b9d6ec;border-radius:10px;box-shadow:0 2px 9px #214b7120;color:#285475;font-size:12px;line-height:1.4;pointer-events:none}
.geo-status[data-kind="warn"]{background:#fff9e9;color:#77540a;border-color:#e9cf8b}
.geo-status[data-kind="error"]{background:#fff3f3;color:#923d3d;border-color:#e9b6b6}
.geo-status[data-kind="success"]{background:#eaf8f0;color:#155d43;border-color:#9ed6b4}
.location-pin:not([hidden]){position:absolute;left:50%;top:50%;z-index:5;width:1px;height:1px;pointer-events:none;transform:translate(0,0)}
.location-pulse{position:absolute;width:34px;height:34px;left:-17px;top:-17px;border:2px solid #257bdf;border-radius:50%;background:#1f7ee01b;box-shadow:0 0 0 5px #2b80e019}
.location-core{position:absolute;width:15px;height:15px;left:-7.5px;top:-7.5px;border-radius:50%;background:#176dd3;border:3px solid white;box-shadow:0 0 0 1px #0f60ba,0 2px 5px #173f6d77}
.location-caption{position:absolute;left:0;top:23px;transform:translateX(-50%);padding:4px 7px;border:1px solid #aad2f0;background:#ffffffed;color:#124d85;border-radius:7px;font-size:11px;line-height:1.2;font-weight:800;white-space:nowrap;box-shadow:0 1px 4px #18466e20}
@media(max-width:740px){.locate-me{min-height:44px;font-size:13px;padding:10px 13px}.geo-status:not([hidden]){max-width:calc(100% - 88px);font-size:11px;padding:8px 10px}}


/* 0.8 — duży widok mapy: bez dodatkowego okna i bez zewnętrznych bibliotek.
   Działa także wtedy, gdy przeglądarka nie udostępnia natywnego Fullscreen API. */
.map-expanded-nav{display:none}
#expand-map{white-space:nowrap;background:#e0edff;color:#174e88}
#expand-map[aria-pressed="true"]{background:#1d5d9e;color:#fff}
body.map-expanded{overflow:hidden!important;overscroll-behavior:none}
body.map-expanded .map-shell.is-expanded,.map-shell.is-expanded:fullscreen{
 position:fixed!important;inset:0!important;top:0!important;left:0!important;
 width:100vw!important;height:100vh!important;height:100dvh!important;
 min-height:0!important;max-height:none!important;max-width:none!important;
 margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 z-index:99999!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;
 background:#fff;
}
.map-shell.is-expanded .map-expanded-nav{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:7px;min-height:43px;padding:6px 12px;background:#f6faff;border-bottom:1px solid #dce7f4}
.map-expanded-nav strong{font-size:13px;font-weight:800;color:#285378;flex:1;min-width:0;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.map-expanded-nav button{flex:0 0 auto;border:1px solid #cfdfef;border-radius:9px;background:#fff;color:#285988;font-weight:800;font-size:12px;padding:9px 11px;min-height:36px}
.map-expanded-nav button:disabled{opacity:.36;cursor:default}
.map-shell.is-expanded .legend{display:none}
.map-shell.is-expanded .map-topline{display:flex;flex:0 0 auto;min-height:46px;gap:5px;padding:6px 12px;justify-content:flex-end;background:#fff}
.map-shell.is-expanded .map-tools{gap:7px;justify-content:flex-end;flex-wrap:nowrap;width:100%}
.map-shell.is-expanded .fit-btn{min-height:36px;padding:8px 10px;font-size:12px}
.map-shell.is-expanded .map-stage{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
.map-shell.is-expanded .map-bottomline{padding:6px 10px;min-height:29px;flex:0 0 auto}
.map-shell.is-expanded .location-pin{z-index:5}
.map-shell.is-expanded .map-label{user-select:none}
.map-shell.is-expanded .mobile-map-labels{display:none!important}
@media(max-width:740px){
 .map-shell.is-expanded .map-topline{padding:5px 8px;min-height:43px}
 .map-shell.is-expanded .map-topline .map-tools{gap:4px}
 .map-shell.is-expanded .map-topline .fit-btn{font-size:11px;padding:8px 7px;min-height:38px}
 .map-shell.is-expanded .map-expanded-nav{gap:4px;padding:5px 7px;min-height:43px}
 .map-shell.is-expanded .map-expanded-nav button{padding:7px 9px;font-size:11px;min-height:34px}
 .map-shell.is-expanded .map-expanded-nav strong{font-size:12px}
 .map-shell.is-expanded .map-bottomline{display:none}
 .map-shell.is-expanded .map-stage .locate-me{top:10px;left:10px;min-height:43px;padding:9px 11px;font-size:12px}
 .map-shell.is-expanded .geo-status:not([hidden]){top:61px;left:10px;font-size:11px}
 .map-shell.is-expanded .zoom{top:10px;right:10px}
 .map-shell.is-expanded .zoom button{width:42px;height:42px;font-size:25px}
 .map-shell.is-expanded .mobile-selection:not([hidden]){bottom:max(10px,env(safe-area-inset-bottom));}
}
@media(max-width:355px){.map-shell.is-expanded .map-topline .fit-btn{font-size:10px;padding:7px 5px}.map-shell.is-expanded .map-tools{gap:3px}}

/* 0.9 — kartograficzna mapa administracyjna w stylistyce barwionych atlasów. */
.map-shell.atlas .shape:not(.visited):not(.selected){fill:var(--atlas-fill,#abcde4)!important;stroke:#557a9a;stroke-width:1.25}
.map-shell.atlas .shape:hover:not(.visited){filter:brightness(.89);stroke:#1b517b;stroke-width:2.2}
.map-shell.atlas .shape.selected{fill:#5a9fd9!important;stroke:#164f91;stroke-width:2.5}
.map-shell.atlas .shape.visited{fill:#42b383!important;stroke:#267859;stroke-width:1.9}
.map-shell.atlas .shape.selected.visited{fill:#2eb47e!important;stroke:#115a40;stroke-width:2.8}
.map-shell.atlas .labels .map-label.label-adaptive{font-weight:820;color:#213e54;text-shadow:-2px -2px 0 white,2px -2px 0 white,-2px 2px 0 white,2px 2px 0 white,0 0 6px white}
.map-shell.atlas .map-stage{background:#e8f4f9}
.map-shell.atlas .map-stage:before{display:none}
/* Gdy włączony jest podkład OSM, zachowaj rozpoznawalną barwę granic i czytelne drogi. */
.map-shell.with-terrain .shape:not(.visited):not(.selected){fill-opacity:.52;stroke:#4c7195;stroke-width:1.5}
.map-shell.with-terrain:not(.atlas) .shape:not(.visited):not(.selected){fill-opacity:.30}
.map-shell.with-terrain .shape.visited,.map-shell.with-terrain .shape.selected{fill-opacity:.74}
.map-shell.with-terrain .tile-layer{opacity:.99}
.map-stage svg#map .tile-layer{pointer-events:none}
#atlas-style[aria-pressed="true"]{background:#fff0ca;color:#754f0e}
#terrain-layer[aria-pressed="true"]{background:#def3ec;color:#166548}
.osm-credit{font-size:10px;color:#486883}
.osm-credit a{color:#2364a5;text-decoration:underline}
@media(max-width:740px){
 .map-shell:not(.is-expanded) .map-topline .map-tools{justify-content:flex-start}
 .map-shell:not(.is-expanded) .map-topline .map-tools .fit-btn{padding:8px 7px}
 .map-shell.is-expanded #label-mode,.map-shell.is-expanded #fit{display:none}
 .map-shell.is-expanded .map-tools{gap:5px;justify-content:center}
 .map-shell.is-expanded #atlas-style,.map-shell.is-expanded #terrain-layer{font-size:11px;min-height:37px;padding:7px 8px}
 .osm-credit{margin-left:0}
}

.osm-credit-map{position:absolute;z-index:7;bottom:9px;left:10px;font-size:11px;color:#345570;padding:5px 8px;background:#ffffffeb;border-radius:5px;box-shadow:0 1px 5px #163c6322;white-space:nowrap}
.osm-credit-map a{color:#205d96;text-decoration:underline}
.map-shell:has(.mobile-selection:not([hidden])) .osm-credit-map{bottom:101px}
@media(max-width:740px){.osm-credit-map{bottom:7px;font-size:10px;padding:4px 6px}}

/* v0.10: wyraźne etykiety bez obwódki liter; przemyślane dwie linie. */
.labels .map-label.label-adaptive,
.map-shell.atlas .labels .map-label.label-adaptive {
 color:#10283d;
 font-weight:700;
 line-height:1.27;
 letter-spacing:0;
 text-shadow:none;
 -webkit-text-stroke:0;
 background:rgba(255,255,255,.48);
 border:0;
 border-radius:3px;
 padding:2px 3px;
 overflow:visible;
}
.map-shell.with-terrain .labels .map-label.label-adaptive {
 background:rgba(255,255,255,.82);
}
.labels .map-label.label-adaptive.visited,
.map-shell.atlas .labels .map-label.label-adaptive.visited { color:#075537; }
.labels .map-label.label-adaptive.chosen,
.map-shell.atlas .labels .map-label.label-adaptive.chosen {
 color:#103f70;
 background:rgba(255,255,255,.9);
 border:0;
 box-shadow:0 0 0 1px rgba(38,96,157,.48);
}
@media(max-width:740px){
 .labels .map-label.label-adaptive,
 .map-shell.atlas .labels .map-label.label-adaptive {font-weight:700;}
}
