:root{font-family:"Segoe UI",Arial,sans-serif;color:#eaf5ff;--blue:#073e68;--line:#72bdf13b;--accent:#39b9ff;--shadow:0 12px 40px #00264040;color-scheme:light}
*{box-sizing:border-box}html,body,#app{height:100%;margin:0;overflow:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #57caff;outline-offset:3px}button:disabled{opacity:.5;cursor:wait}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}button svg{pointer-events:none}[hidden]{display:none!important}
#map{position:absolute;inset:0;background:#e5edf0}.leaflet-container{font:13px "Segoe UI",Arial,sans-serif}.glass{background:linear-gradient(135deg,#084e7ce8,#06385eee);border:1px solid #5eb8ee8c;box-shadow:var(--shadow),inset 0 1px 0 #a8e3ff22;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
.brand{position:absolute;left:20px;top:20px;z-index:600;display:flex;gap:14px;align-items:center;width:min(690px,calc(100% - 530px));min-height:88px;padding:12px 18px;border-radius:18px}.brand img{width:62px;height:62px;object-fit:cover;border-radius:14px;box-shadow:0 2px 12px #001c3a55}.brand h1{font-size:clamp(17px,1.55vw,24px);line-height:1.2;letter-spacing:-.025em;margin:4px 0 5px;font-weight:650}.brand p{font-size:14px;margin:0;color:#c0ddf1}.eyebrow{font-size:10px;letter-spacing:.16em;color:#83d8ff;font-weight:750}
.toolbar{position:absolute;z-index:650;right:20px;top:20px;display:flex;padding:5px;gap:4px;border-radius:17px}.tool{width:83px;min-height:75px;border:1px solid transparent;border-radius:12px;background:#0f5a851f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:11px;transition:.18s}.tool svg{width:25px;height:25px}.tool:hover,.tool.active,.tool[aria-expanded=true]{background:#1689cb44;border-color:#5fc7ff55;box-shadow:inset 0 -2px #3ec0ff55}.tool.active{color:#fff;text-shadow:0 0 12px #70d4ff}.tool.active svg{filter:drop-shadow(0 0 5px #26aaff)}
.sidebar{position:absolute;z-index:610;top:122px;left:20px;bottom:54px;width:350px;border-radius:18px;display:flex;flex-direction:column;overflow:hidden}.tabs{display:flex;flex:none;gap:5px;padding:7px 9px 0;border-bottom:1px solid var(--line)}.tabs>button[role=tab]{flex:1;border:0;border-bottom:3px solid transparent;background:transparent;display:flex;gap:12px;align-items:center;justify-content:center;min-height:46px;font-size:14px;font-weight:650;color:#bad7ec}.tabs>button[aria-selected=true]{color:#fff;background:linear-gradient(#0f699642,#09629409);border-color:#3bc2ff;box-shadow:0 6px 10px -8px #46ccff}.tabs svg{width:20px;height:20px}
.tab-panel{min-height:0;flex:1;display:flex;flex-direction:column;padding:12px 10px 0}.search-box{display:flex;align-items:center;gap:10px;border:1px solid #8accf15e;background:#2678a445;border-radius:11px;padding:9px 10px;flex:none}.search-box svg{width:18px;height:18px;color:#bce6ff}.search-box input{border:0;outline:0;background:transparent;color:#fff;width:100%;min-width:0;font-size:12px}.search-box input::placeholder{color:#c3ddeb}.panel-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:10px 3px;font-size:10px;color:#b9d4e8}.panel-meta button{border:0;background:transparent;color:#9bdeff;font-size:10px;padding:0}.scroll-content{overflow:auto;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#6eb9df66 transparent;padding:0 3px 10px}
.layer-group{margin:2px 0 8px;border-bottom:1px solid #5cb4e21f;padding-bottom:5px}.layer-group summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;padding:9px 0;user-select:none}.layer-group summary::-webkit-details-marker{display:none}.layer-group summary:before{content:"›";font-size:23px;width:12px;line-height:16px;color:#cae7fb;transition:transform .18s}.layer-group[open]>summary:before{transform:rotate(90deg)}.layer-group summary strong{font-size:12px;line-height:1.35;flex:1;font-weight:650}.group-count{font-size:10px;color:#95bbd5;margin-left:auto}.group-icon{width:16px;height:16px;color:#bbdef4}.group-checkbox{width:15px!important;height:15px!important;margin:0!important;flex:none;accent-color:#159ff3}.layer-row{display:flex;align-items:center;gap:7px;min-height:32px;padding:4px 0 4px 22px;font-size:11.5px;line-height:1.3;border-radius:7px;transition:background .15s}.layer-row:hover{background:#63b7ec15}.layer-row input{accent-color:#159ff3;width:16px;height:16px;margin:0;flex:none}.layer-label{flex:1;cursor:pointer;overflow-wrap:anywhere}.layer-mini{width:27px;height:20px;object-fit:contain;background:#ffffffec;border-radius:4px;flex:none;padding:1px}.layer-info{border:0;background:transparent;color:#c2e5fb;flex:none;padding:4px}.layer-info svg{width:15px;height:15px}.scale-off .layer-label,.scale-off .layer-mini{opacity:.45}.panel-hint{font-size:10px;line-height:1.45;padding:8px 4px;color:#aacce2;border-top:1px solid var(--line)}.sidebar-footer{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#9bc7e3;padding:10px 13px;border-top:1px solid var(--line);flex:none}
.legend-intro{font-size:11px;line-height:1.5;color:#c3dceb;padding:0 4px 12px}.legend-entry{border:1px solid #6fb6e329;border-radius:10px;margin:0 0 9px;overflow:hidden;background:#052f4c30}.legend-entry summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;padding:9px;font-size:12px;font-weight:650}.legend-entry summary:after{content:"+";margin-left:auto;color:#77c5f4}.legend-entry[open] summary:after{content:"−"}.legend-entry summary img{width:36px;height:24px;object-fit:contain;background:#fff;border-radius:4px}.legend-class{display:flex;align-items:center;gap:10px;padding:6px 10px;border-top:1px solid #80c7e41a;font-size:11px;line-height:1.35}.legend-class img{width:52px;height:30px;object-fit:contain;background:#fff;border-radius:4px;flex:none}.legend-gradient{width:52px;height:14px;background:linear-gradient(90deg,#222,#fff);border:1px solid #9bb5c4;flex:none}.empty{padding:15px 5px;color:#bfd5e3;font-size:12px;line-height:1.5}
.water-search{position:absolute;right:20px;top:122px;width:445px;max-width:calc(100% - 40px);z-index:665;border-radius:13px;padding:5px}.water-search>label{display:flex;align-items:center;gap:10px;padding:7px 10px;background:#f5fbff;border-radius:9px;color:#138ddd}.water-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#1c506d;font-size:12px;height:25px}.water-search input::placeholder{color:#477a99}.water-search svg{width:20px;height:20px}#waterResults{max-height:260px;overflow:auto;padding:5px}#waterResults button{display:block;width:100%;text-align:left;padding:10px;border:0;border-bottom:1px solid var(--line);background:transparent;color:#ecf7ff;font-size:12px}#waterResults button:hover,#waterResults button:focus-visible{background:#409edc33}
.floating-panel{position:absolute;right:20px;top:184px;z-index:660;width:335px;padding:14px;border-radius:16px;max-height:calc(100% - 250px);overflow:auto}.floating-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.floating-panel h2{display:flex;align-items:center;gap:8px;margin:0;font-size:15px}.floating-panel p{font-size:12px;line-height:1.5;color:#d2e4f0;margin:8px 0 12px}.icon-button{border:0;background:transparent;display:grid;place-items:center;border-radius:8px;padding:4px;flex:none}.icon-button:hover{background:#90d1fb22}.floating-panel input[type=search],#shareUrl{width:100%;min-width:0;padding:10px 9px;border:1px solid #80b8df;border-radius:8px;background:#f7fcff;color:#17374f;font-size:12px}.floating-panel button:not(.icon-button){border:1px solid #7acbfa;background:#0b699936;border-radius:8px;padding:9px;font-size:11px;color:#fff}.floating-panel button:hover{background:#2c93c355}.sheet-toggle{display:flex;gap:8px;align-items:center;white-space:nowrap;font-size:11px;margin:15px 0}.sheet-toggle input{accent-color:#17a6ff;width:16px;height:16px}.sheet-symbol{width:23px;height:14px;border:2px solid #ed8a32;background:transparent}.field-label{font-size:11px;display:block;line-height:1.5;margin-bottom:7px}.sheet-search{display:flex;gap:6px;align-items:stretch}.sheet-search button{white-space:nowrap;background:transparent!important}.floating-panel small{display:block;font-size:10px;color:#aed7ef;margin-top:6px}.panel-message{font-size:11px!important;margin-bottom:0!important}.panel-message.error{color:#ffc7a8!important}.measure-actions{display:flex;gap:6px}.measure-actions button{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:67px}.measure-actions button.active{background:#167eb266!important;border-color:#a4e4ff}.measure-actions button:first-child svg{color:#6ef0c1}.measure-actions button:nth-child(2) svg{color:#7cc7ff}.measure-actions button:last-child svg{color:#ffc17c}#measureResult{font-weight:700;font-size:17px;color:#fff;display:block}
.map-navigation{position:absolute;right:23px;top:245px;z-index:620;display:flex;flex-direction:column;gap:10px}.map-navigation button{width:48px;height:48px;border-radius:50%;background:linear-gradient(145deg,#0d5b8e,#063459);border:1px solid #8bd3ff99;color:#e5f6ff;display:grid;place-items:center;box-shadow:0 4px 15px #00365b45;transition:transform .18s,filter .18s}.map-navigation button:hover{transform:scale(1.1);filter:brightness(1.2)}.map-navigation button:active{transform:scale(.94)}.map-navigation button svg{width:24px;height:24px}.map-navigation button:first-child{margin-bottom:9px}body.tool-panel-open .map-navigation{top:auto;bottom:120px}
.scale-box{position:absolute;right:20px;bottom:48px;z-index:600;border-radius:13px;padding:11px 14px;display:flex;gap:16px;align-items:center;font-size:12px;min-height:53px}.leaflet-control-scale{margin:0!important;float:none}.leaflet-control-scale-line{background:transparent;border-color:#d8edfa;color:#f5fbff;text-shadow:none;font-size:10px;padding:1px 5px;border-width:0 1px 3px}.map-note{position:absolute;bottom:0;left:0;right:0;z-index:600;padding:7px 20px;background:#f7fcffed;color:#435c6d;font-size:10px;line-height:1.4;min-height:32px;display:flex;align-items:center;gap:10px;justify-content:space-between}.map-note span{flex:none}#notice{position:absolute;z-index:900;bottom:115px;left:50%;transform:translateX(-50%);background:#f5fbff;color:#123c58;border:1px solid #70bbeb;padding:13px 18px;border-radius:12px;box-shadow:var(--shadow);font-size:12px;max-width:min(500px,90vw)}#notice.error{border-color:#c76c42;color:#8e3419}.loading{position:absolute;z-index:590;left:390px;bottom:55px;display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f7fcffed;color:#33556e;border-radius:10px;font-size:11px}.loading span{width:12px;height:12px;border:2px solid #c7dfef;border-top-color:#1689cb;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.sheet-number-icon{background:transparent;border:0;pointer-events:auto!important}.sheet-number-button{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);white-space:nowrap;border:0;background:transparent;color:#a54819;padding:4px;font:700 11px "Segoe UI",Arial,sans-serif;text-shadow:0 0 2px #fff,0 0 4px #fff,0 1px 3px #fff;cursor:pointer}.sheet-number-button:hover,.sheet-number-button:focus-visible{background:#fff9ed;outline:2px solid #1a88cd;border-radius:5px;color:#75300d}.sheet-number-button.no-comment{color:#765b49}.leaflet-popup-content-wrapper{border:1px solid #5aa8d0;border-radius:12px;color:#173b53;background:#f8fcff}.leaflet-popup-content{max-height:50vh;overflow:auto;margin:14px 16px;font-size:12px}.popup-title{font-size:14px;margin:0 0 8px;color:#0b4e7a}.info-table{border-collapse:collapse;width:100%;table-layout:fixed}.info-table th,.info-table td{padding:6px 5px;border-bottom:1px solid #dce8ef;text-align:left;vertical-align:top;overflow-wrap:anywhere}.info-table th{width:43%;color:#486678;font-weight:600}.info-feature{margin:0 0 15px}.info-feature:last-child{margin:0}.measure-readout{background:#f7fcff;color:#153f5a;border:1px solid #188bbf;font-size:12px;font-weight:700;border-radius:7px;padding:5px 8px}
.pdf-modal{position:fixed;inset:0;z-index:2000;background:#001a34c9;display:flex;align-items:center;justify-content:center;padding:3vh 3vw;backdrop-filter:blur(7px)}.pdf-dialog{width:min(1240px,96vw);height:94vh;border:1px solid #68c3f4;border-radius:16px;overflow:hidden;background:#063e68;display:flex;flex-direction:column;box-shadow:0 20px 90px #001326aa}.pdf-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 18px;flex:none}.pdf-dialog h2{font-size:17px;margin:0 0 4px}.pdf-dialog p{font-size:11px;margin:0;color:#b6d9ed}.pdf-dialog header>div:last-child{display:flex;align-items:center;gap:15px}.pdf-dialog a{font-size:12px;color:#c7edff}.pdf-dialog button{display:flex;align-items:center;gap:5px;border:1px solid #86c5ed66;border-radius:8px;padding:8px;background:#28739f44;color:#fff}.pdf-dialog iframe{flex:1;min-height:0;width:100%;border:0;background:#59636b}.mobile-only{display:none}
@media(min-width:1500px){.brand{width:730px}.sidebar{width:365px}.loading{left:405px}}
@media(max-width:1100px){.brand{width:calc(100% - 470px);padding:12px;gap:9px}.brand img{width:48px;height:48px}.brand h1{font-size:17px}.brand p{font-size:12px}.eyebrow{font-size:8px}.tool{width:77px}.sidebar{width:310px}.loading{left:350px}}
@media(max-width:800px){.brand{top:10px;left:10px;right:10px;width:auto;min-height:74px;padding:9px 12px}.brand h1{font-size:18px}.brand p{font-size:12px}.toolbar{top:94px;left:10px;right:10px;justify-content:space-between;padding:4px}.tool{width:auto;flex:1;min-height:58px;font-size:10px;gap:5px}.tool svg{width:21px;height:21px}.mobile-only{display:flex}.sidebar{display:none;left:10px;top:169px;bottom:92px;width:310px;max-width:calc(100% - 20px)}body.sidebar-open .sidebar{display:flex}.floating-panel{right:10px;top:169px;max-height:calc(100% - 265px);width:min(335px,calc(100% - 20px))}.map-navigation{right:12px;top:auto;bottom:145px;gap:7px}.map-navigation button{width:40px;height:40px}.map-navigation button:first-child{margin-bottom:3px}.scale-box{bottom:43px;right:10px;padding:8px 10px;font-size:11px;gap:10px}.map-note{font-size:9px;padding:5px 10px;display:block}.map-note span{margin-left:8px}.loading{left:10px;bottom:103px}.pdf-modal{padding:1vh 1vw}.pdf-dialog{width:98vw;height:98vh}.pdf-dialog>header{padding:10px;gap:8px}.pdf-dialog h2{font-size:14px}.pdf-dialog header>div:last-child{gap:6px}.pdf-dialog a{font-size:10px}.pdf-dialog button{font-size:11px}.pdf-dialog p{font-size:10px}}
@media(max-width:800px){.brand{height:104px;min-height:104px}.toolbar{top:124px}.water-search{top:202px;right:10px;left:10px;width:auto;max-width:none}.sidebar,.floating-panel{top:264px}.floating-panel{max-height:calc(100% - 362px)}}
@media(max-width:420px){.brand h1{font-size:16px}.brand p{font-size:11px}.brand img{width:43px;height:43px}.brand{gap:9px}.eyebrow{font-size:7px}.tool{font-size:9px}.sidebar{width:calc(100% - 20px)}body.sidebar-open .map-navigation{visibility:hidden}.scale-box{left:10px;right:auto}.map-note{line-height:1.25}.floating-panel{padding:12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Korekta kompozycji: osobna belka tytułu i logo wychodzące poza jej obrys. */
#app .brand{top:10px;left:20px;width:min(750px,calc(100% - 390px));height:96px;min-height:96px;padding:0;gap:0;background:transparent;border:0;box-shadow:none;overflow:visible}
#app .brand img{position:relative;z-index:2;width:96px;height:96px;border-radius:16px;flex:none;box-shadow:0 4px 16px #00243d44}
.brand-title{position:relative;flex:1;min-width:0;margin-left:-13px;padding:11px 18px 11px 29px;border-radius:15px}
#app .brand h1{font-size:clamp(17px,1.5vw,22px);margin:0 0 6px;line-height:1.18}
#app .brand p{font-size:13px;margin:0;line-height:1.3}
#app .toolbar{padding:4px;gap:3px;border-radius:12px}
#app .tool{width:58px;min-height:53px;gap:5px;font-size:9px;border-radius:9px}
#app .tool svg{width:18px;height:18px}
#app .water-search{top:94px;width:312px;padding:4px;border-radius:10px}
#app .water-search>label{gap:7px;padding:4px 7px;border-radius:7px}
#app .water-search input{height:18px;font-size:11px}
#app .water-search svg{width:15px;height:15px}
#app .floating-panel{top:145px}
#app .map-navigation button:first-child{margin-bottom:0}
.legend-entry{border:0;border-bottom:1px solid #6fb6e32e;border-radius:0;background:transparent;margin-bottom:0}
.legend-entry>summary{padding:12px 4px;font-size:12px}
.legend-class{display:grid;grid-template-columns:54px minmax(0,1fr);gap:12px;align-items:center;padding:9px 4px;border-top:0;font-size:11.5px;line-height:1.4;min-height:49px}
.legend-patch{width:54px;height:32px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #b6c9d6;border-radius:2px;overflow:hidden}
.legend-patch img,.legend-class .legend-patch img{width:52px;height:30px;object-fit:contain;background:transparent;border-radius:0;flex:none}
.legend-patch .legend-gradient{width:42px;height:16px;border:1px solid #a9a9a9}
@media(max-width:800px){
 #app .brand{top:8px;left:10px;width:calc(100% - 20px);height:84px;min-height:84px}
 #app .brand img{width:84px;height:84px}
 #app .brand h1{font-size:15px;line-height:1.15;margin-bottom:4px}
 #app .brand p{font-size:11px}
 .brand-title{padding:8px 10px 8px 22px;margin-left:-10px;border-radius:12px}
 #app .toolbar{top:104px;left:10px;right:10px;gap:2px;padding:3px}
 #app .tool{width:auto;flex:1;min-height:43px;font-size:8.5px;gap:4px}
 #app .tool svg{width:16px;height:16px}
 #app .water-search{top:166px;left:auto;right:10px;width:calc((100% - 20px)*.7);max-width:calc(100% - 20px)}
 #app .sidebar,#app .floating-panel{top:214px}
 #app .floating-panel{max-height:calc(100% - 310px)}
 body.tool-panel-open .map-navigation{display:none}
}
#app .toolbar{padding:0;gap:10px;background:transparent;border:0;box-shadow:none;backdrop-filter:none;align-items:stretch}
.toolbar-main{display:flex;gap:3px;align-items:center;padding:4px;border-radius:12px}
#app .toolbar>#commentsTool{width:62px;min-width:62px;min-height:63px;flex:none;border:2px solid #fff;border-radius:12px;background:linear-gradient(135deg,#0b5787f0,#063c68f2);box-shadow:0 5px 18px #00243d44}
#app .toolbar>#commentsTool:hover,#app .toolbar>#commentsTool[aria-expanded=true]{background:linear-gradient(135deg,#1274a7,#064d7d);border-color:#fff;box-shadow:0 0 0 2px #ffffff22,0 5px 18px #00243d44}
@media(max-width:800px){#app .toolbar{gap:10px;padding:0}.toolbar-main{flex:1;min-width:0;gap:2px;padding:3px}#app .toolbar>#commentsTool{width:54px;min-width:54px;min-height:51px}}
@media print{@page{size:A4 landscape;margin:7mm}html,body,#app{height:190mm;width:283mm;overflow:hidden!important}#map{position:absolute;inset:0}.toolbar,.sidebar,.floating-panel,.water-search,.map-navigation,#notice,#loading,.pdf-modal{display:none!important}#app .brand{top:8px;left:8px;width:650px;max-width:90%;min-height:70px;height:70px;background:transparent!important;print-color-adjust:exact}#app .brand img{width:70px;height:70px}#app .brand h1{font-size:16px}#app .brand p{font-size:11px}.scale-box{bottom:33px;right:8px;background:#063e68!important;print-color-adjust:exact}.map-note{font-size:9px;min-height:25px}*{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.basemap-selector-wrap{margin-bottom:10px;padding:8px 10px;background:#185b835e;border:1px solid #78c2ec4d;border-radius:11px;display:flex;flex-direction:column;gap:5px;flex:none}
.basemap-label{font-size:11px;font-weight:600;color:#cbe7fc;display:flex;align-items:center;gap:6px}
.basemap-label svg{width:15px;height:15px;color:#7ad1ff}
.basemap-select{background:#093d62;color:#fff;border:1px solid #4eaedb88;border-radius:7px;padding:6px 8px;font-size:12px;font-weight:500;outline:0;cursor:pointer}
.basemap-select:focus{border-color:#3bc2ff;box-shadow:0 0 0 2px #3bc2ff44}
.basemap-select option{background:#06304e;color:#fff}


/* Tradycyjny wykaz symboli: odcinki granic, znaki punktowe i pola powierzchni. */
.legend-entry{padding:0 2px 5px}.legend-group-title{font-size:12px;font-weight:700;line-height:1.3;margin:10px 0 4px;color:inherit}
.legend-class{min-height:36px;padding:4px 2px;grid-template-columns:54px minmax(0,1fr);gap:10px}
.legend-patch{border:0;border-radius:2px;background:#fff}.legend-patch svg{width:52px;height:30px;display:block;flex:none}

/* Informacja o kompozycji pod menu warstw i legendy. */
.sidebar .map-note{position:static;z-index:auto;display:block;flex:0 0 auto;min-height:0;padding:8px 12px;border-top:1px solid #80b2d3;background:#123c5de8;color:#e3f1fa;font-size:10px;line-height:1.35}.sidebar .map-note span{display:block;margin:4px 0 0}.sidebar .map-note span:empty{display:none}

#app .water-search{width:312px}
#app .water-search>label{padding:7.4px 30px 7.4px 7px}
#app #waterSearchClear{position:absolute;right:8px;top:9px;width:23px;height:23px;display:grid;place-items:center;padding:0;border:0;background:transparent;color:#315d7b;font-size:19px;line-height:1;cursor:pointer}
#app #waterSearchClear[hidden]{display:none!important}
#app .water-search input::-webkit-search-cancel-button{-webkit-appearance:none}
@media(max-width:800px){#app .water-search{width:calc((100% - 20px)*.7);max-width:calc(100% - 20px)}}
.info-table th,.info-table td{padding:3px 5px;line-height:1.3}.info-feature{margin-bottom:9px}.popup-title{margin-bottom:5px}
