.interactive-map{position:relative;border:1px solid #dce5dd;border-radius:12px;overflow:hidden;background:#fff;color:#17231d}
.map-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px;border-bottom:1px solid #dce5dd}
.map-toolbar button,.map-toolbar select,.map-toolbar a{font:14px system-ui;padding:9px 12px;border:1px solid #cbd8cf;border-radius:7px;background:#fff;color:#17231d;cursor:pointer;margin:0;width:auto}
.map-toolbar button:disabled{opacity:.45;cursor:default}
.map-toolbar button:focus-visible,.map-toolbar select:focus-visible,.map-toolbar a:focus-visible{outline:3px solid #458bef}
.map-toolbar a{text-decoration:none}.map-toolbar .map-run{background:#226b4b;color:#fff}
.map-hint,.map-notice{padding:4px 14px;margin:4px 0;font:13px/1.45 system-ui}
.map-notice{max-height:90px;overflow:auto;color:#76500a;white-space:pre-wrap}
.result-map-canvas{height:560px;min-height:260px;z-index:0}
.map-vertex{background:#fff;border:3px solid #08788c;border-radius:50%;box-shadow:0 1px 5px #3336}
.map-vertex.selected{border-color:#dd5a16}.map-midpoint{background:#08788c;border:2px solid #fff;border-radius:3px;cursor:move}
.parcel-card{font:14px/1.4 system-ui;color:#17231d;max-height:50vh;overflow:auto;overflow-wrap:anywhere}
.parcel-card h3{margin:4px 0 12px;font-size:16px}.parcel-card dl{margin:0}.parcel-card dt{font-size:12px;color:#637168;margin-top:8px}.parcel-card dd{margin:0}
.map-page{margin:0;background:#fff;font-family:system-ui}.map-page .interactive-map{height:100dvh;height:100vh;display:flex;flex-direction:column;border:0;border-radius:0}.map-page .result-map-canvas{flex:1;min-height:180px;height:auto}.map-page .map-toolbar{flex-shrink:0}
@supports(height:100dvh){.map-page .interactive-map{height:100dvh}}
@media(max-width:640px){.map-toolbar{gap:6px;padding:8px}.map-toolbar button,.map-toolbar select,.map-toolbar a{font-size:12px;padding:8px}.result-map-canvas{height:480px}.parcel-card{max-height:40vh}.map-hint{font-size:11px}.map-notice{max-height:60px}}

.interactive-map .leaflet-container{background:#f5f7f4}



.map-toolbar [hidden]{display:none!important}

.boundary-exports{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;color:#53685d;font-size:13px}
.boundary-exports button{border:1px solid #c8d5cc;background:#fff;border-radius:7px;padding:7px 12px;cursor:pointer;color:#233b31}
.boundary-exports button:disabled{opacity:.45;cursor:default}
.boundary-exports .pdf-download{margin-left:auto}
.pdf-dialog{border:1px solid #c8d5cc;border-radius:12px;padding:22px;max-width:430px;width:calc(100% - 48px);font-family:system-ui;color:#233b31}
.pdf-dialog::backdrop{background:#10251c88}.pdf-dialog h3{margin-top:0}.pdf-dialog p{font-size:13px;line-height:1.5}
.pdf-dialog label{display:flex;flex-direction:column;gap:8px;font-weight:600}.pdf-dialog select{font:inherit;padding:10px;border:1px solid #c8d5cc;border-radius:7px}
.pdf-dialog button{font:inherit;padding:9px 15px;border:1px solid #c8d5cc;border-radius:7px;cursor:pointer;background:#f5f7f4;margin:5px 6px 0 0;color:#233b31}
.pdf-dialog button:first-of-type{background:#226b4b;color:white}.pdf-dialog button:disabled{opacity:.5}

/* Основные действия остаются рядом с картой; справка и точные настройки раскрываются. */
.interactive-map{color-scheme:light;min-width:0}
.interactive-map [hidden]{display:none!important}
.interactive-map button,.interactive-map select,.interactive-map input,.interactive-map summary{font:14px/1.35 system-ui;box-sizing:border-box;min-height:44px}
.interactive-map button:hover:not(:disabled){background:#edf4ef;color:#17231d;transform:none}
.interactive-map .map-run:hover:not(:disabled){background:#174e36;color:white}
.interactive-map :is(button,select,input,a,summary):focus-visible{outline:3px solid #2876c8;outline-offset:2px}
.map-toolbar{gap:6px;padding:8px}
.map-toolbar a{min-height:44px;box-sizing:border-box;display:inline-flex;align-items:center}
.map-toolbar [aria-pressed=true]{background:#e2f0e8;border-color:#226b4b}
.map-tools{display:flex;flex-wrap:wrap;gap:10px;padding:12px;background:#f5f8f5;border-bottom:1px solid #dce5dd;overflow:auto;max-height:38vh;flex-shrink:0}
.map-tools button,.map-tools select,.map-tools input{border:1px solid #bacbbf;border-radius:7px;padding:9px;background:#fff;color:#17231d;max-width:100%;min-width:0;width:auto;margin:0}
.map-tools a{padding:10px;color:#226b4b}
.map-tools label{display:flex;flex-direction:column;gap:5px;color:#42584a;font-size:13px;margin:0}
.map-tools form{margin:0;min-width:0;flex:1 1 300px}
.map-search input{width:100%}.map-search-results{max-height:200px;overflow:auto}.map-search-results button{display:block;width:100%;text-align:left;overflow-wrap:anywhere;margin-top:6px}.map-search-results p{font:13px system-ui}
.map-coordinates{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}.map-coordinates strong{flex-basis:100%;font-size:14px}.map-coordinates label{flex:1 1 100px}.map-coordinates input{width:100%}
.map-legend{flex-basis:100%}.map-legend summary,.map-warnings summary{cursor:pointer;padding:8px 0;display:list-item}
.map-legend-item{display:inline-flex;align-items:center;gap:6px;margin:4px 16px 8px 0;font-size:13px}.map-legend-item i{display:inline-block;width:14px;height:14px;border-radius:3px}
.map-legend label{flex-direction:row;align-items:center;min-height:44px}.map-legend input{width:22px;height:22px;min-height:22px}
.map-warnings{padding:0 14px;color:#76500a;background:#fff8e7;flex-shrink:0;font:13px/1.45 system-ui}
.map-warnings p{white-space:pre-wrap;max-height:100px;overflow:auto;margin:0 0 8px}
.map-hint{font-size:12px}.map-notice{margin:0 0 4px;flex-shrink:0}
.map-vertex,.map-midpoint{box-sizing:border-box}
.boundary-exports{flex-shrink:0}.boundary-exports button{min-height:44px}
.pdf-dialog{box-sizing:border-box;max-height:90dvh;overflow:auto}.pdf-dialog select{max-width:100%;width:100%;min-width:0}
.map-page .interactive-map{overflow-y:auto}.map-page .result-map-canvas{flex:1 0 240px;height:auto;min-height:240px}
@media(max-width:640px){
  .map-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
  .map-toolbar button,.map-toolbar select,.map-toolbar a{font-size:14px;padding:8px;width:100%;min-width:0;justify-content:center;text-align:center;white-space:normal}
  .map-toolbar .map-run{grid-column:1/-1}
  .map-hint{display:none}.map-notice{font-size:12px;max-height:52px}
  .boundary-exports{gap:6px;padding:8px 12px}.boundary-exports span{width:100%}.boundary-exports button{flex:1 1 100px}.boundary-exports .pdf-download{margin-left:0}
  .map-tools{padding:10px;max-height:32vh}.map-tools form{flex-basis:100%}
  .pdf-dialog{width:calc(100% - 24px);padding:16px}.pdf-dialog select,.map-tools input{font-size:16px}
  .leaflet-popup-content{max-width:calc(100vw - 78px);margin:12px}.parcel-card{max-height:38vh}
}
.map-change-notice{margin:0;padding:6px 14px;background:#fff3d5;color:#76500a;font:13px/1.4 system-ui;flex-shrink:0}
