:root{--ink:#1c3429;--muted:#7a8d82;--border:#e4eae5;--surface:#f7f9f7;--accent:#256546;--mag:#168858;--bran:#e69247;--trav:#668ac8;--sub:#a77ab7;font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:#f4f7f4;font-size:13px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9ad3b5;outline-offset:2px}.app{height:100vh;min-height:580px;display:flex;flex-direction:column}.top{height:76px;background:white;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 24px;gap:30px;flex-shrink:0;z-index:500}.brand{min-width:214px;display:flex;gap:10px;align-items:center}.brand-icon{background:#225c3e;color:white;width:34px;height:34px;display:grid;place-items:center;font-size:24px;border-radius:6px}.brand strong{font-size:15px;letter-spacing:-.7px}.accent{color:#438969}.brand small{display:block;font-size:8px;letter-spacing:1.6px;color:#8b9d92;margin-top:2px}.project{border-left:1px solid var(--border);padding-left:26px;display:grid;gap:1px;min-width:170px}.project>span,.eyebrow{font-weight:700;font-size:9px;letter-spacing:1.3px;color:#92a199}.project input{border:0;padding:0;color:var(--ink);font-weight:700;background:transparent;max-width:230px}.project small{font-size:10px;color:#84a28f}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.btn{border-radius:5px;border:1px solid #dae4dc;padding:10px 13px;font-weight:650;white-space:nowrap;background:#fff;color:#365144;font-size:11px}.btn:hover,.wide-btn:hover{background:#f1f7f2}.btn.primary{background:#225f40;color:white;border-color:#225f40}.btn.primary:hover{background:#174c31}.workspace{display:grid;grid-template-columns:246px minmax(0,1fr) 270px;flex:1;min-height:0}.sidebar,.properties{background:#fff;overflow:auto}.sidebar{border-right:1px solid var(--border)}.side-head{padding:25px 20px 17px}h1,h2,h3,p{margin:0}h1{font-size:18px;letter-spacing:-.5px;margin:7px 0}h2{font-size:17px;letter-spacing:-.3px;margin-top:6px}.side-head p,.empty p{line-height:1.6;color:#92a198;font-size:11px}.side-section{padding:16px 17px;border-top:1px solid #edf1ed}.section-label{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.3px;color:#9aaba1;font-weight:750;margin:0 3px 10px}.section-label span{color:#c4cfc7}.tools{display:grid;gap:2px}.tool{border:1px solid transparent;border-radius:5px;text-align:left;padding:8px;background:transparent;display:flex;align-items:center;gap:11px;color:#40564a;width:100%}.tool>span:first-child{width:26px;height:26px;display:grid;place-items:center;font-size:19px;color:#738a7c}.tool b,.tool small{display:block}.tool b{font-size:11px}.tool small{font-size:9px;color:#a4b1a8;margin-top:2px}.tool:hover,.tool.selected{background:#eef6ef;border-color:#e2eee4}.tool.selected>span:first-child{color:#26834f}.hint{font-size:10px;line-height:1.5;color:#86988c;margin:10px 3px}.wide-btn{width:100%;background:white;border:1px solid #dfe9e1;color:#3d5948;border-radius:5px;padding:9px;font-size:11px;font-weight:650}.edit-actions{display:flex;gap:5px;margin-top:7px}.edit-actions[hidden]{display:none}.edit-actions button{white-space:normal;padding:8px;flex:1}.filters{display:grid;gap:10px}.filter{display:flex;align-items:center;gap:8px;font-size:11px;color:#50665a}.filter input{accent-color:#39845c}.swatch{width:12px;height:3px;border-radius:2px}.filter .count{margin-left:auto;font-size:10px;color:#a2b1a7}.statistics{display:flex;gap:35px}.statistics b,.statistics small{display:block}.statistics b{font-size:16px}.statistics small{font-size:10px;color:#9aaba0;margin-top:3px}.local-note{margin-top:15px;color:#90a497;line-height:1.5;font-size:10px}.map-wrap{position:relative;min-width:0;background:#e6ede7;overflow:hidden}#map{width:100%;height:100%;z-index:0}.map-search{position:absolute;z-index:450;top:20px;right:18px;width:min(290px,45%);background:white;border:1px solid #e4eae5;border-radius:5px;box-shadow:0 2px 12px #274a2b1c}.map-search form{display:flex}.map-search input{border:0;flex:1;min-width:0;background:transparent}.map-search button{border:0;background:transparent;color:#326345;font-size:19px;width:40px}.map-search #search-results{max-height:240px;overflow:auto;border-top:1px solid #e4eae5}.map-search #search-results button{display:block;width:100%;text-align:left;font-size:11px;line-height:1.4;padding:10px;color:#3e5a49}.map-search #search-results button:hover{background:#eff7f0}.map-search #search-results p{padding:10px;color:#809587;font-size:11px}.map-title{position:absolute;z-index:400;top:20px;left:20px;pointer-events:none;background:white;padding:12px 14px;border-radius:4px;box-shadow:0 2px 12px #274a2b1c;display:grid;gap:5px}.map-title strong{font-size:14px}.map-help{position:absolute;z-index:400;left:20px;bottom:18px;background:#fff;padding:9px 12px;color:#758b7c;border-radius:4px;font-size:10px;box-shadow:0 2px 12px #274a2b1c}.map-legend{position:absolute;z-index:400;right:18px;bottom:24px;background:#fff;padding:13px 15px;display:grid;gap:8px;border-radius:4px;box-shadow:0 2px 12px #274a2b1c;color:#586d60;font-size:10px}.map-legend b{font-size:9px;letter-spacing:1px;color:#92a59a}.map-legend span{display:flex;gap:8px;align-items:center}.line{display:inline-block;width:18px;border-top:3px solid}.line.mag{color:var(--mag)}.line.bran{color:var(--bran);border-top-style:dashed}.line.trav{color:var(--trav)}.line.sub{color:var(--sub);border-top-style:dotted}.point{width:9px;height:9px;background:#225c3e;border-radius:2px;margin:0 5px}.leaflet-top.leaflet-left{top:86px;left:9px}.leaflet-control-zoom a{color:#345b40!important}.leaflet-control-scale{margin-bottom:49px!important}.leaflet-div-icon{border:0;background:none}.manhole{width:16px;height:16px;background:#245d41;border:2px solid white;box-shadow:0 0 0 2px #245d41;display:grid;place-items:center;color:white;font-size:9px;line-height:1}.properties{border-left:1px solid var(--border);display:flex;flex-direction:column}.props-head{padding:25px 20px 19px;border-bottom:1px solid #edf1ed;display:flex;justify-content:space-between}.props-icon{font-size:18px;color:#a2b4a8}.empty{text-align:center;margin:auto;padding:35px 30px}.empty-icon{height:48px;width:48px;background:#edf5ee;color:#6c9f7c;border-radius:50%;display:grid;place-items:center;margin:0 auto 15px;font-size:24px}.empty h3{font-size:12px;margin-bottom:8px}.properties-footer{border-top:1px solid #edf1ed;padding:18px 20px;color:#94a69a;display:grid;gap:3px;font-size:10px}.properties-footer b{color:#5b7664}.properties form{padding:18px 20px;flex:1}.selected-label{background:#f1f7f1;padding:12px;display:flex;gap:10px;align-items:center;margin-bottom:20px;border-radius:5px}.selected-label>span{width:10px;height:10px;border-radius:50%;background:#168858}.selected-label strong,.selected-label small{display:block}.selected-label small{color:#96aa9c;margin-top:4px;font-size:9px}label{display:grid;gap:7px;color:#708477;font-size:10px;font-weight:700;margin-bottom:15px}input,select,textarea{border:1px solid #dfe8e1;border-radius:4px;background:white;color:#324d3c;padding:10px;min-width:0;font-size:11px}textarea{resize:vertical}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.measurement{background:#f7f9f6;border:1px solid #e9efea;padding:12px;display:grid;gap:4px}.measurement span{font-size:9px;letter-spacing:.7px;color:#98aa9e}.measurement b{font-size:18px}.measurement small{color:#9aaa9e;font-size:9px}.delete-btn{background:transparent;color:#b45d55;border:0;padding:15px 0;font-size:11px;font-weight:700}dialog{border:0;border-radius:8px;max-width:480px;width:calc(100% - 30px);padding:25px;color:var(--ink);box-shadow:0 15px 60px #10241744}dialog::backdrop{background:#172a20a8}.dialog-header{display:flex;justify-content:space-between;align-items:start}.dialog-header h2{font-size:20px}.icon-btn{border:0;background:transparent;color:#809487;font-size:24px}dialog p{color:#7d9183;line-height:1.6;font-size:11px;margin:14px 0 20px}dialog label{font-size:11px}.notice{padding:12px;background:#fff8ea;color:#95743b;font-size:10px;line-height:1.5;margin:12px 0;border-radius:4px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}#toast{position:fixed;z-index:3000;bottom:18px;left:50%;transform:translate(-50%,20px);background:#224b35;color:white;padding:10px 15px;border-radius:5px;opacity:0;transition:.2s;pointer-events:none;font-size:11px}#toast.show{opacity:1;transform:translate(-50%,0)}#print-page{display:none;position:fixed;inset:0;z-index:2000;background:white;flex-direction:column;padding:10mm}.print-head{height:9mm;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;border:1px solid #333;padding:0 3mm;font-size:9pt}.print-head span{margin-left:5mm}.print-head b{color:#245d41}#print-map-container{position:relative;flex:1;min-height:0;border-left:1px solid #333;border-right:1px solid #333}.print-bottom{height:25mm;flex-shrink:0;border:1px solid #333;display:flex;justify-content:space-between;font-size:8pt}.print-bottom>div:first-child{padding:2mm}.print-bottom p{margin:2mm 0}.title-block{min-width:70mm;border-left:1px solid #333;display:grid;padding:2mm;gap:1mm}.print-bottom small{font-size:7pt}@media(max-width:950px){.workspace{grid-template-columns:200px minmax(0,1fr) 220px}.brand{min-width:auto}.project{display:none}.top{gap:10px}.map-legend{display:none}}@media(max-width:700px){.app{height:auto;min-height:100vh}.top{height:auto;padding:12px;flex-wrap:wrap}.top-actions{width:100%;overflow:auto}.workspace{display:flex;flex-direction:column}.map-wrap{height:55vh;min-height:340px;order:0}.sidebar{order:1}.properties{order:2;min-height:230px}.tools{grid-template-columns:repeat(2,1fr)}.map-help{display:none}.map-search{width:45%;top:16px;right:10px}.side-head{padding:15px 17px}.empty{margin:20px auto}.project{display:none}.leaflet-control-scale{margin-bottom:5px!important}}
@media print{body{background:#fff}.app,dialog,#toast{display:none!important}#print-page{display:flex!important;position:static;flex-direction:column;height:calc(100vh - 20mm);width:100%;padding:0;color:#111}.print-head{height:9mm;display:flex;justify-content:space-between;align-items:center;border:1px solid #333;padding:0 3mm;font-size:9pt}.print-head span{margin-left:5mm}.print-head b{color:#245d41}#print-map-container{position:relative;flex:1;min-height:0;border-left:1px solid #333;border-right:1px solid #333}#map{height:100%!important;width:100%!important}.leaflet-control-zoom,.leaflet-draw,.leaflet-control-attribution{display:none!important}.leaflet-control-scale{margin-bottom:2mm!important}.print-bottom{height:25mm;border:1px solid #333;display:flex;justify-content:space-between;font-size:8pt}.print-bottom>div:first-child{padding:2mm}.print-bottom p{margin:2mm 0}.title-block{min-width:70mm;border-left:1px solid #333;display:grid;padding:2mm;gap:1mm}.print-bottom small{font-size:7pt}}
.cloud-dialog{width:min(520px,calc(100% - 30px));max-height:90vh;overflow:auto}.cloud-dialog:not([open]){display:none}.cloud-dialog p{line-height:1.5}.cloud-dialog .full{width:100%}.cloud-error{color:#ac423a;font-size:11px;line-height:1.5;margin:8px 0}.cloud-error:empty{display:none}.project-list{display:grid;gap:7px;max-height:42vh;overflow:auto}.project-item{display:grid;gap:5px;text-align:left;width:100%;border:1px solid #dfe9e1;background:#f8faf8;color:#254332;border-radius:5px;padding:12px}.project-item:hover{background:#eef6ef}.project-item small{color:#819688;font-size:10px}.plan-list{display:grid;gap:4px;margin-top:8px}.plan-item{display:flex;align-items:center;gap:6px;color:#5c7063;font-size:10px}.plan-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.plan-item input{accent-color:#3b805b}.plan-item button{border:0;background:none;color:#668a73;font-size:16px;padding:2px}.compact-list{margin:8px 0}.compact-list p{margin:4px 0;font-size:11px}.cloud-dialog h3{font-size:12px;margin-top:20px}.share-form{display:flex;gap:5px;margin:10px 0}.share-form select{min-width:0;flex:1}.cloud-dialog #user-form{border-top:1px solid #e5ede6;margin-top:15px;padding-top:15px}.tool:disabled,.wide-btn:disabled{opacity:.5;cursor:not-allowed}
.materials-heading{display:flex;justify-content:space-between;align-items:center;color:#708477;font-size:10px;margin:16px 0 8px}.materials-heading button{border:0;background:transparent;color:#34784e;font-size:10px;font-weight:700}.material-item{display:grid;grid-template-columns:1.4fr 1fr .8fr 18px;gap:4px;margin-bottom:7px}.material-item input,.material-item select{padding:7px 4px;font-size:10px}.material-item button{border:0;background:transparent;color:#af6257;font-size:16px}.summary-row{display:flex;justify-content:space-between;border-bottom:1px solid #e8eee9;padding:10px 0}.statistics{margin-top:12px}
.history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e8eee9}.history-row span{line-height:1.5}
.project-row{display:flex;align-items:center;gap:8px}.project-row .project-item{flex:1;min-width:0}.project-delete{color:#a3463e}.trash-project-name{flex:1;overflow-wrap:anywhere;padding:12px}
.files-dialog{width:min(700px,calc(100% - 30px))}.files-tabs{display:flex;gap:8px;margin:14px 0}.files-tabs .active{border-color:#225f40;background:#eef6ef}.files-list{display:grid;gap:8px;margin-top:16px}.file-row{border:1px solid #e2eae3;border-radius:5px;padding:12px;display:grid;gap:8px}.file-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.file-heading strong{overflow-wrap:anywhere}.file-heading small{white-space:nowrap;color:#819688}.file-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.file-actions select{min-width:160px;flex:1}.file-actions a{text-decoration:none}.files-dialog #files-upload-status{margin-top:8px;color:#5c7063}.files-dialog #files-upload-status:empty{display:none}
.file-actions .file-assignment{display:flex;align-items:center;gap:6px;margin:0;padding:8px;color:#365144}.file-assignment input{width:16px;height:16px;margin:0;accent-color:#225f40}

[hidden]{display:none!important}
#menu-toggle,.mobile-nav{display:none}
.side-head{padding:19px 20px 12px}
.tool b{font-size:13px}
.tool small{font-size:11px;color:#62786b}
.tool[aria-pressed="true"]{border-color:#a9c7b2;background:#edf6ef}
.btn:disabled{opacity:.5;cursor:not-allowed}
#edit-geometry{margin-top:10px}
#draw-bar{position:absolute;z-index:470;bottom:26px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:12px 14px;border:1px solid #cbdccf;border-radius:10px;background:white;box-shadow:0 3px 18px #16362128}
.draw-info{display:flex;align-items:center;justify-content:space-between;gap:12px}
#draw-title{font-size:15px}
#draw-count{color:#385947;font-variant-numeric:tabular-nums;font-size:12px}
#draw-hint{color:#42594b;font-size:12px;line-height:1.4;margin:4px 0 8px}
.draw-buttons,.edit-actions{display:flex;flex-wrap:wrap;gap:6px}
.draw-buttons .btn,.edit-actions .btn{min-height:40px}
#aim{position:absolute;z-index:460;top:50%;left:50%;transform:translate(-50%,-50%);width:25px;height:25px;border:2px solid #194c32;border-radius:50%;box-shadow:0 0 0 2px #fff,inset 0 0 0 1px #fff;pointer-events:none}
#aim::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:5px;height:5px;background:#194c32;border-radius:50%;box-shadow:0 0 0 1px #fff}
.app.is-working .map-legend,.app.is-working .map-title{display:none}
.leaflet-marker-icon.manhole-target{display:grid;place-items:center}
@media screen and (max-width:1199px){
 .top{justify-content:space-between;gap:12px;position:relative}
 .brand{min-width:0}.project{display:grid;min-width:0;flex:1}
 #menu-toggle{display:block;min-height:44px}
 .top-actions{display:none}
 .top.menu-open .top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(340px,calc(100% - 16px));max-height:65dvh;overflow:auto;position:absolute;top:100%;right:8px;background:white;box-shadow:0 5px 22px #16362129;padding:10px;border:1px solid var(--border);border-radius:8px}
 .top-actions .btn{white-space:normal;min-height:44px}
}
@media screen and (max-width:950px){
 .app{height:100vh;height:100dvh;min-height:0;overflow:hidden}
 .top{height:auto;min-height:57px;padding:6px 12px;padding-top:max(6px,env(safe-area-inset-top));flex-wrap:nowrap}
 .brand strong{font-size:12px}.brand small{display:none}.brand-icon{width:28px;height:28px;font-size:20px}.brand{gap:6px}
 .project{border:0;padding:0}.project>span{display:none}.project input{width:100%;font-size:16px;text-overflow:ellipsis}.project small{color:#45634f;font-size:11px}
 .workspace{position:relative;display:block;min-height:0}
 .map-wrap{height:100%;min-height:0;width:100%}
 .map-title,.map-legend{display:none}
 .map-search{width:min(68%,320px);top:10px;right:10px}
 .map-search input{font-size:16px;padding:10px}.map-search button{min-width:44px;min-height:44px}
 .leaflet-top.leaflet-left{top:0;left:0}
 .leaflet-touch .leaflet-bar a{width:42px;height:42px;line-height:42px}
 .leaflet-control-scale{margin-bottom:6px!important}
 .sidebar,.properties{display:none;position:absolute;z-index:480;inset:auto 0 0;max-height:77%;max-height:min(77%,610px);min-height:0;overflow:auto;overscroll-behavior:contain;background:white;border:1px solid #cbd9cf;border-bottom:0;border-radius:14px 14px 0 0;box-shadow:0 -6px 22px #16362126}
 .app[data-panel="tools"] .sidebar,.app[data-panel="details"] .properties{display:block}
 .side-section,.properties form{padding:14px 16px}
 .side-head,.props-head{padding:14px 16px 8px}
 .tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .tool{min-height:48px;border-color:#e0e9e2;padding:6px}.tool>span:first-child{flex:none;width:22px}
 .wide-btn,.plan-item button,.btn,.delete-btn,.material-item button,.materials-heading button,.icon-btn{min-height:44px}
 .plan-item button,.material-item button,.icon-btn{min-width:44px}
 .filter{min-height:40px;margin:0}.filters{gap:0}.plan-item{font-size:12px}
 .material-item{grid-template-columns:minmax(65px,1.4fr) minmax(36px,1fr) minmax(36px,1fr) 44px}
 .properties input,.properties select,.properties textarea,.cloud-dialog input:not([type=checkbox]),.cloud-dialog select,.material-item input,.material-item select{font-size:16px}
 .file-heading,.dialog-actions,.share-form{flex-wrap:wrap}.file-actions select{min-width:0}
 .mobile-nav{display:flex;flex:none;z-index:490;background:white;border-top:1px solid #cfddd3;padding:4px 8px;padding-bottom:max(4px,env(safe-area-inset-bottom));gap:5px}
 .mobile-nav button{flex:1;min-width:0;min-height:44px;border:1px solid transparent;border-radius:6px;background:white;font-weight:650;color:#405d4b}
 .mobile-nav button[aria-expanded="true"],.mobile-nav button[aria-pressed="true"]{background:#e9f3ec;border-color:#c7dbcd;color:#1e5739}
 .mobile-nav button:disabled{color:#718177;background:#f5f7f5}
 #draw-bar{bottom:21px;padding:9px 10px;width:min(415px,calc(100% - 16px))}
 .draw-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .draw-buttons .btn,.edit-actions .btn{font-size:13px;min-height:44px;padding:7px}
 #toast{bottom:75px;max-width:calc(100vw - 28px);width:max-content;font-size:13px}
 .app.is-working~#toast{top:70px;bottom:auto}
}
@media screen and (max-width:950px) and (orientation:landscape) and (max-height:530px){
 #draw-bar{left:auto;right:8px;bottom:18px;transform:none;width:245px}
 .app.is-working .map-search{display:none}
 .sidebar,.properties{max-height:100%}
}
#edit-selected{font-size:14px;background:#edf6ef;border-color:#c9dccd;margin:0 0 14px}
.vertex-stepper,.vertex-buttons{display:flex;gap:5px;align-items:center}
.vertex-stepper{justify-content:space-between;margin:4px 0}
.vertex-stepper button{border:1px solid #d3dfd6;background:#f5f8f5;border-radius:5px;height:44px;min-width:44px;color:#28503a;font-size:22px}
.vertex-stepper output{font-weight:700}
.vertex-buttons .btn{white-space:normal;flex:1;min-height:44px;padding:5px;font-size:12px}
.vertex-handle{display:grid;place-items:center;cursor:grab}
.vertex-handle i{width:19px;height:19px;border:3px solid #fff;box-shadow:0 0 0 2px #184c33;border-radius:50%;background:#268b55;pointer-events:none}
@media screen and (max-width:950px) and (max-height:610px){
 #draw-bar #draw-hint{font-size:11px;margin:2px 0 4px}
 .vertex-stepper{margin:2px 0}
}
@media screen and (max-width:950px){
 .app.is-working .map-wrap{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
 .app.is-working #map{grid-area:1 / 1;min-height:0}
 .app.is-working .map-search{display:none}
 .app.is-working #aim{grid-area:1 / 1;place-self:center;position:relative;inset:auto;transform:none}
 .app.is-working #draw-bar{grid-area:2 / 1;position:relative;inset:auto;transform:none;width:100%;max-width:none;border-width:1px 0 0;border-radius:0;box-shadow:none}
}
@media screen and (max-width:950px) and (orientation:landscape) and (max-height:530px){
 .app.is-working .map-wrap{grid-template-columns:minmax(0,1fr) min(40%,260px);grid-template-rows:minmax(0,1fr)}
 .app.is-working #draw-bar{grid-area:1 / 2;border-width:0 0 0 1px;overflow:auto}
}
#project-opening{position:fixed;inset:0;z-index:3200;display:grid;place-items:center;padding:20px;text-align:center;color:var(--ink);font-size:17px;font-weight:650;background:var(--surface)}
#plan-progress{position:absolute;z-index:455;left:50%;transform:translateX(-50%);bottom:22px;background:white;color:#365144;border:1px solid var(--border);border-radius:6px;padding:7px 11px;font-size:12px;pointer-events:none}
.app.is-working #plan-progress{display:none}
