:root{--ink:#19312d;--muted:#627571;--line:#d9e2de;--paper:#fff;--wash:#f3f6f4;--green:#176b5e;--green2:#e6f2ee;--orange:#e8a45b;--red:#bb5146;font:15px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--wash)}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden}button,input,select,textarea{font:inherit;color:inherit}button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer}button:hover{border-color:#80aaa0;background:#f8fbf9}button.primary{background:var(--green);color:#fff;border-color:var(--green);font-weight:650}header{height:66px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:relative;z-index:3}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--green);color:white;font-weight:800;font-size:19px}.brand strong{display:block;font-size:17px}.brand small{display:block;color:var(--muted);font-size:11px}.header-actions{display:flex;align-items:center;gap:9px}.pill{font-size:12px;color:var(--green);background:var(--green2);border-radius:99px;padding:6px 10px}.pill.offline{color:#7b633c;background:#fbf1df}.pill.error{color:var(--red);background:#fbe9e7}main{height:calc(100dvh - 66px);display:grid;grid-template-columns:260px minmax(300px,1fr) 340px}.sidebar,.editor{background:var(--paper);min-width:0;display:flex;flex-direction:column}.sidebar{border-right:1px solid var(--line)}.editor{border-left:1px solid var(--line);overflow:auto}.section-title{padding:16px 14px 8px;display:flex;align-items:center;justify-content:space-between}.section-title h2{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0}.section-title button{padding:5px 8px;font-size:13px}.layer-list{padding:0 9px 7px;border-bottom:1px solid var(--line)}.layer-row{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px}.layer-row:hover,.layer-row.selected{background:var(--green2)}.layer-dot{width:10px;height:10px;border-radius:50%;background:var(--green);flex:none}.layer-row small{margin-left:auto;color:var(--muted)}.search{margin:0 12px 8px;width:calc(100% - 24px);border:1px solid var(--line);border-radius:8px;padding:9px 10px;font-size:13px}.feature-list{overflow:auto;padding:0 8px 12px;flex:1}.feature-row{padding:9px;border-radius:8px;cursor:pointer;border-bottom:1px solid #eef1ef}.feature-row:hover,.feature-row.selected{background:#f1f7f5}.feature-row strong{display:block;font-size:13px}.feature-row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.sidebar-footer{border-top:1px solid var(--line);padding:10px 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.sidebar-footer button{padding:5px 8px;font-size:12px}.map-column{min-width:0;display:flex;flex-direction:column;background:#edf2ef}.map-toolbar{display:flex;align-items:center;gap:8px;padding:9px 12px;background:#fff;border-bottom:1px solid var(--line);flex-wrap:wrap}.map-toolbar select{max-width:220px;border:1px solid var(--line);border-radius:8px;padding:8px}.draw-tools,.map-actions{display:flex;gap:5px}.draw-tools button,.map-actions button{padding:7px 9px;font-size:13px}.map-actions{margin-left:auto}#mapWrap{flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none}#map{width:100%;height:100%;display:block;cursor:crosshair;user-select:none;touch-action:none;-webkit-user-select:none}.feature-shape{stroke:#176b5e;stroke-width:2;fill:#48a58a66;vector-effect:non-scaling-stroke;cursor:pointer}.feature-shape.point{stroke:#fff;stroke-width:2;fill:#176b5e;vector-effect:non-scaling-stroke}.feature-shape.selected{stroke:#d17e23;stroke-width:4}.feature-label{font-size:13px;font-weight:650;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round;fill:#19312d;pointer-events:none}.vertex{fill:#fff;stroke:#176b5e;stroke-width:2;vector-effect:non-scaling-stroke}.map-footer{height:30px;background:#fff;border-top:1px solid var(--line);padding:5px 12px;font-size:11px;color:var(--muted);display:flex;justify-content:space-between}.coords{position:absolute;bottom:10px;left:10px;border-radius:7px;background:#fffffff0;padding:5px 8px;font-size:11px;color:var(--muted);box-shadow:0 1px 4px #10251d22;pointer-events:none}#mapMessage{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:8px 12px;text-align:center;border-radius:9px;background:#ffffffd9;color:var(--muted);font-size:12px;pointer-events:none}#mapMessage small{font-size:10px}.editor-empty{margin:auto;text-align:center;padding:28px;color:var(--muted);max-width:280px}.editor-empty span{font-size:34px;color:#80aaa0}.editor-empty h2{font-size:17px;color:var(--ink);margin:8px 0}.editor-empty p{font-size:13px}.editor-head{padding:15px 16px 10px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.editor-head h2{font-size:16px;margin:0}.editor-head small{display:block;color:var(--muted);font-size:11px}.editor-body{padding:12px 15px 25px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{min-width:0}.field.wide{grid-column:1/-1}.field label{display:block;font-weight:650;font-size:11px;margin-bottom:4px;color:#455a55}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:7px;padding:8px;font-size:13px;background:#fff}.field textarea{min-height:66px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #a9d1c6;border-color:#6a9d90}.form-section{grid-column:1/-1;margin:9px 0 0;padding-top:9px;border-top:1px solid var(--line);font-size:11px;text-transform:uppercase;color:var(--green);letter-spacing:.05em}.editor-actions{display:flex;gap:7px;margin-top:12px}.editor-actions button{flex:1}.editor-actions .danger{color:var(--red)}.photo-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.photo-card{border:1px solid var(--line);border-radius:8px;overflow:hidden}.photo-card img{display:block;width:100%;height:95px;object-fit:cover;background:var(--wash)}.photo-card div{padding:5px}.photo-card input{width:100%;font-size:11px;border:0;border-bottom:1px solid var(--line);padding:4px}.photo-card button{border:0;color:var(--red);font-size:11px;padding:4px}.photo-add{margin-top:8px;width:100%}.modal{position:fixed;inset:0;background:#12251f77;display:grid;place-items:center;z-index:10;padding:16px}.modal[hidden]{display:none}.modal-card{position:relative;background:#fff;border-radius:14px;padding:22px;width:min(550px,100%);max-height:90dvh;overflow:auto;box-shadow:0 12px 40px #10251d33}.modal-card h2{margin:0 25px 12px 0;font-size:18px}.modal-card p{font-size:13px;color:var(--muted)}.close{position:absolute;top:11px;right:11px;border:0;font-size:21px;padding:2px 8px}.setting-row{margin:12px 0}.setting-row label{display:block;font-size:12px;font-weight:650;margin-bottom:5px}.setting-row input{width:100%;padding:9px;border:1px solid var(--line);border-radius:7px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.conflict{padding:10px;background:#fff6e9;border:1px solid #edce9b;border-radius:8px;margin:10px 0}.conflict button{margin:4px}.empty-list{padding:16px;color:var(--muted);font-size:12px;text-align:center}#toast{position:fixed;z-index:20;bottom:20px;left:50%;transform:translateX(-50%);background:#183b34;color:#fff;padding:10px 16px;border-radius:9px;box-shadow:0 6px 20px #0003;opacity:0;pointer-events:none;transition:opacity .2s;font-size:13px}#toast.show{opacity:1}@media(max-width:1000px){main{grid-template-columns:220px minmax(260px,1fr)}.editor{position:fixed;z-index:5;right:0;top:66px;bottom:0;width:min(390px,92vw);box-shadow:-8px 0 24px #162e2522;transform:translateX(105%);transition:transform .2s}.editor.open{transform:translateX(0)}}@media(max-width:650px){body{overflow:hidden}header{height:58px;padding:0 10px}.brand small{display:none}.header-actions{gap:5px}.header-actions .pill{display:none}main{height:calc(100dvh - 58px);grid-template-columns:1fr;grid-template-rows:1fr}.sidebar{display:none}.map-toolbar{padding:7px;gap:5px}.map-toolbar select{max-width:140px;font-size:12px;padding:7px}.draw-tools button,.map-actions button{font-size:11px;padding:7px}.map-actions{gap:3px}.map-footer{height:27px}.editor{top:58px}}
.layer-visibility{width:15px;height:15px;accent-color:var(--green);margin:0 1px 0 0;flex:none;cursor:pointer}.layer-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-control-row{display:flex;align-items:center;gap:10px;padding:11px 4px;border-bottom:1px solid var(--line);font-size:14px;cursor:pointer}.layer-control-row input{accent-color:var(--green);width:17px;height:17px}.layer-control-row small{margin-left:auto;color:var(--muted)}
.layer-manage-row{padding:3px 0 9px;border-bottom:1px solid var(--line)}.layer-manage-row .layer-control-row{border:0;padding:9px 4px 6px}.layer-manage-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.layer-manage-actions button{font-size:12px;padding:6px 9px}.layer-manage-actions .danger{color:var(--red)}.tile-attribution{position:absolute;right:10px;bottom:10px;background:#ffffffdf;color:#34443f;border-radius:4px;padding:3px 6px;font:11px/1.2 Arial,sans-serif;box-shadow:0 1px 3px #0002;pointer-events:none}
.layer-style-swatch{width:20px;height:20px}.setting-row input[type=color]{height:44px;padding:4px}.setting-row input[type=range]{padding:0;accent-color:var(--green)}.layer-manage-actions button{white-space:nowrap}.geojson-properties{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:9px}.geojson-property{min-width:0;border:1px solid var(--line);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:6px}.geojson-field-label{font-size:10px;font-weight:650;color:var(--muted);margin:0 0 -4px}.geojson-property-head{display:flex;gap:5px}.geojson-property-head input{min-width:0;flex:1;border:1px solid var(--line);border-radius:6px;padding:7px;font-size:12px}.geojson-property-head button{padding:5px 7px;color:var(--red);font-size:11px}.geojson-property input[data-geojson-value],.geojson-property select[data-geojson-value],.geojson-property textarea[data-geojson-value]{width:100%;border:1px solid var(--line);border-radius:6px;padding:7px;font-size:12px}.geojson-property textarea[data-geojson-value]{min-height:58px;resize:vertical}.location-accuracy{fill:#2676db22;stroke:#2676db88;stroke-width:2;vector-effect:non-scaling-stroke}.location-halo{fill:#fff;stroke:#2676db;stroke-width:3;vector-effect:non-scaling-stroke}.location-dot{fill:#2676db;stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke}#locateBtn.active{background:#e8f1ff;color:#1763be;border-color:#79a9e5}
@media(min-width:1001px){main.editor-closed{grid-template-columns:260px minmax(300px,1fr)}.editor.closed{display:none}}@media(max-width:1000px){.editor.closed{display:none}}
#settingsHeaderBtn{display:inline-flex;align-items:center;white-space:nowrap}@media(max-width:650px){#settingsHeaderBtn{padding:7px 8px;font-size:12px}}

.geometry-vertex{fill:#fff;stroke:#e58c24;stroke-width:3;vector-effect:non-scaling-stroke;cursor:grab;pointer-events:all}.geometry-vertex:active{cursor:grabbing;fill:#ffe0ae}.map-legend{position:absolute;top:12px;right:12px;z-index:2;width:min(240px,45%);max-height:45%;overflow:auto;padding:10px 12px;border:1px solid #d4ddd8;border-radius:9px;background:#ffffffed;box-shadow:0 2px 9px #10251d22;font-size:11px}.map-legend[hidden]{display:none}.map-legend strong{display:block;margin-bottom:7px;font-size:12px}.legend-categories{display:grid;gap:5px}.legend-categories span{display:flex;align-items:center;gap:7px;overflow-wrap:anywhere}.legend-categories i{width:12px;height:12px;border:1px solid #0002;border-radius:3px;flex:none}.legend-ramp{height:12px;border-radius:4px;background:linear-gradient(90deg,#2c7bb6,#ffffbf,#d7191c)}.legend-range{display:flex;justify-content:space-between;margin-top:3px;color:var(--muted)}.editor-actions{flex-wrap:wrap}.editor-actions button{flex:1 1 30%}
.setting-row select{width:100%;padding:9px;border:1px solid var(--line);border-radius:7px;background:#fff}.layer-manage-actions{flex-wrap:wrap}
#themeColorPickers{max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:5px 9px}.theme-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 2px;border-bottom:1px solid #eef1ef;font-size:12px}.theme-color-row:last-child{border-bottom:0}.theme-color-row span{min-width:0;overflow-wrap:anywhere}.theme-color-row input[type=color]{width:44px;height:32px;padding:2px;flex:none}
.editor-top-actions{position:sticky;top:0;z-index:4;display:flex;gap:8px;padding:8px 0;background:#fff;border-bottom:1px solid var(--line);margin:0 0 8px}.editor-top-actions button{flex:1;min-width:0}.photo-add-top{font-weight:600;color:var(--green)}

.feature-label-toggle{display:flex;align-items:center;gap:8px;padding:8px 2px;color:var(--muted);font-size:12px}.feature-label-toggle input{width:auto;margin:0;accent-color:var(--green)}

/* Keep the map and attribute editor within the visible phone/tablet viewport. */
body{height:100vh;height:100dvh;min-height:0}header{flex:none}main{height:calc(100vh - 66px);height:calc(100dvh - 66px);min-height:0;overflow:hidden}.map-column,.sidebar,.editor{min-height:0}.editor{overflow:hidden}.editor-head{flex:none;gap:6px}.editor-head #minimizeEditor{min-width:38px;padding:6px 9px;font-size:18px;line-height:1}.editor-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.map-footer{flex:none;min-height:30px;height:auto;padding-bottom:calc(5px + env(safe-area-inset-bottom))}#toast{bottom:calc(20px + env(safe-area-inset-bottom))}
.layer-visibility,.layer-label-visibility{width:15px;height:15px;margin:0;flex:none;accent-color:var(--green)}.layer-row{gap:6px}.layer-row .layer-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-row small{margin-left:auto}.layer-label-control{display:flex;align-items:center;gap:7px;padding:2px 8px 8px;font-size:12px;color:var(--muted)}.layer-label-control input{accent-color:var(--green)}
.editor.minimized{overflow:hidden}.editor.minimized .editor-head{height:100%;flex-direction:column;justify-content:flex-start;padding:7px 3px;gap:7px}.editor.minimized .editor-head>div,.editor.minimized .editor-head>strong,.editor.minimized #closeEditor,.editor.minimized .editor-body{display:none}main.editor-minimized{grid-template-columns:260px minmax(300px,1fr) 48px}.editor.minimized #minimizeEditor{min-width:38px;padding:6px 8px}.bulk-edit-hint{margin:0 0 12px;padding:10px;border-radius:8px;background:var(--green2);font-size:12px;color:#35544d}.editor.bulk-edit .form-grid{padding-bottom:12px}
@media(max-width:1000px){main{height:calc(100vh - 66px);height:calc(100dvh - 66px)}main.editor-minimized{grid-template-columns:1fr}.editor.minimized{right:0;top:66px;bottom:0;width:48px;transform:translateX(0)!important;box-shadow:-4px 0 14px #162e2522}}@media(max-width:650px){header{height:58px;min-height:58px;padding:0 8px}.header-actions{gap:4px}.header-actions button{padding:7px 8px;font-size:12px}main{height:calc(100vh - 58px);height:calc(100dvh - 58px)}.map-footer{font-size:10px;padding-left:8px;padding-right:8px}.editor{top:58px;bottom:0}.editor.minimized{top:58px;bottom:0;width:46px}.editor.minimized .editor-head{padding:6px 2px}.editor.minimized #minimizeEditor{min-width:40px}}
.import-file-list{margin:8px 0 14px;padding:10px;border:1px dashed var(--line);border-radius:8px;background:var(--wash);color:var(--muted);font-size:12px;overflow-wrap:anywhere}.setting-row small{display:block;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.4}
.photo-card img{cursor:zoom-in}.mobile-tabs{display:none}
@media(max-width:650px){
body{padding-bottom:calc(58px + env(safe-area-inset-bottom))}
header{position:relative;height:58px;min-height:58px;padding:0 7px}.brand{gap:6px}.brand-mark{width:30px;height:30px;border-radius:8px;font-size:16px}.brand strong{font-size:14px}.header-actions{gap:3px}.header-actions button{min-height:38px;padding:6px;font-size:11px}#settingsHeaderBtn{font-size:0}#settingsHeaderBtn::first-letter{font-size:16px}
main,main.sidebar-minimized,main.sidebar-minimized.editor-minimized{position:relative;display:block;height:calc(100vh - 116px - env(safe-area-inset-bottom));height:calc(100dvh - 116px - env(safe-area-inset-bottom));min-height:0;overflow:hidden}
.sidebar,.map-column,.editor,.sidebar.minimized,.editor.minimized{position:absolute!important;inset:0!important;top:0!important;bottom:0!important;right:0!important;left:0!important;width:100%!important;height:100%!important;max-width:none!important;min-width:0!important;transform:none!important;transition:none!important;box-shadow:none!important;border:0!important;display:none!important;background:var(--paper)}
body[data-mobile-view="layers"] .sidebar,body[data-mobile-view="map"] .map-column,body[data-mobile-view="attributes"] .editor{display:flex!important}
body[data-mobile-view="attributes"] .editor.closed{display:flex!important}
.sidebar .section-title:first-child{height:auto!important;min-height:50px;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;padding:12px 14px 7px!important}.sidebar .section-title:first-child h2,.sidebar #newLayerBtn,.sidebar .section-title:not(:first-child),.sidebar .layer-list,.sidebar .search,.sidebar .feature-list,.sidebar .sidebar-footer{display:flex}.sidebar .search{display:block}.sidebar .layer-list,.sidebar .feature-list{display:block}.sidebar #minimizeSidebar{display:none}
.editor{overflow:hidden!important}.editor .editor-head{min-height:55px}.editor.minimized .editor-head{height:auto;flex-direction:row;justify-content:space-between;padding:12px 14px}.editor.minimized .editor-head>div,.editor.minimized .editor-head>strong,.editor.minimized #closeEditor,.editor.minimized .editor-body{display:initial}.editor-body{padding:10px 12px calc(24px + env(safe-area-inset-bottom))}.form-grid{grid-template-columns:1fr}.field.wide,.form-section{grid-column:1}.photo-list{grid-template-columns:1fr 1fr}.photo-card img{height:130px}.editor-head #minimizeEditor{display:none}
.map-toolbar{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;padding:7px;gap:5px}.map-toolbar>*{flex:none}.map-toolbar select{width:145px;max-width:145px}.map-actions{margin-left:0}.map-footer{min-height:27px;height:auto}.coords{bottom:8px;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-tabs{position:fixed;z-index:9;display:grid;grid-template-columns:repeat(3,1fr);left:0;right:0;bottom:0;height:calc(58px + env(safe-area-inset-bottom));padding:4px 5px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:#fff;box-shadow:0 -3px 12px #10251d1c}.mobile-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;border:0;border-radius:7px;padding:3px;color:var(--muted);font-size:11px}.mobile-tabs button span{font-size:18px;line-height:1}.mobile-tabs button.active{background:var(--green2);color:var(--green);font-weight:700}
#toast{bottom:calc(68px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);text-align:center}
}
@media(max-width:380px){.photo-list{grid-template-columns:1fr}.photo-card img{height:180px}#finishSessionBtn{display:none}}

.tile-attribution{max-width:min(75%,520px);white-space:normal;text-align:right;font-size:9px;line-height:1.2}.setting-row small{display:block;margin-top:5px;color:var(--muted);font-size:11px}

.feature-hit-target{fill:transparent;stroke:transparent;stroke-width:14px;vector-effect:non-scaling-stroke;cursor:pointer}
.setting-row input[type=checkbox]{width:auto;padding:0}
.feature-hit-target{stroke-linecap:round;stroke-linejoin:round}

.layer-group-heading{padding:9px 8px 4px;margin-top:4px;border-top:1px solid var(--line);font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.layer-category-row{display:flex;align-items:center;gap:7px;padding:3px 7px 4px 38px;font-size:11px;color:var(--muted);cursor:pointer}.layer-category-row input{margin:0}.layer-category-row i{width:10px;height:10px;border-radius:2px;flex:none}.thematic-layer-row .layer-name{font-weight:650}.layer-group-control{display:flex;align-items:center;gap:8px;margin:7px 4px;color:var(--muted);font-size:12px}.layer-group-control select{flex:1;min-width:0;border:1px solid var(--line);border-radius:6px;padding:6px;background:white}.group-actions{margin:4px 0 10px}.group-actions button{font-size:12px}

/* Collapsible left pane and accessible layer-list scroll control. */
.layer-list{flex:0 1 auto;max-height:44%;min-height:0;overflow-y:auto;overscroll-behavior:contain;border-bottom:1px solid var(--line)}
#minimizeSidebar{min-width:38px;padding:6px 8px;font-size:18px;line-height:1}
.sidebar.minimized{overflow:hidden}
.sidebar.minimized .section-title:first-child{height:100%;flex-direction:column;justify-content:flex-start;padding:8px 4px;gap:8px}
.sidebar.minimized .section-title:first-child h2,.sidebar.minimized #newLayerBtn,.sidebar.minimized .section-title:not(:first-child),.sidebar.minimized .layer-list,.sidebar.minimized .search,.sidebar.minimized .feature-list,.sidebar.minimized .sidebar-footer{display:none}
main.sidebar-minimized{grid-template-columns:48px minmax(300px,1fr) 340px}
main.sidebar-minimized.editor-minimized{grid-template-columns:48px minmax(300px,1fr) 48px}
main.sidebar-minimized.editor-closed{grid-template-columns:48px minmax(300px,1fr)}
@media(min-width:651px) and (max-width:1000px){main.sidebar-minimized{grid-template-columns:48px minmax(260px,1fr)}main.sidebar-minimized.editor-minimized{grid-template-columns:48px minmax(260px,1fr)}}
@media(max-width:650px){.sidebar{display:flex;position:fixed;left:0;top:58px;bottom:0;width:min(320px,88vw);z-index:6;transform:translateX(calc(-100% + 46px));transition:transform .2s;box-shadow:4px 0 16px #162e2522}.sidebar.minimized{transform:translateX(calc(-100% + 46px))}.sidebar.mobile-open{transform:translateX(0)}.sidebar.minimized .section-title:first-child{width:46px;align-items:center;padding:7px 2px}main.sidebar-minimized{grid-template-columns:1fr}main.sidebar-minimized.editor-minimized{grid-template-columns:1fr}}

.export-choice{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}.export-choice select{min-width:135px;max-width:180px;padding:7px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink)}
.modal-card:has(.attribute-table){width:min(1200px,96vw)}.table-toolbar{display:flex;align-items:center;gap:12px;margin:10px 0}.table-toolbar input{flex:1;min-width:140px;padding:9px;border:1px solid var(--line);border-radius:7px}.table-toolbar small{color:var(--muted);white-space:nowrap}.attribute-table-scroll,.sql-result-scroll{max-width:100%;max-height:42dvh;overflow:auto;border:1px solid var(--line);border-radius:8px}.attribute-table{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px}.attribute-table th,.attribute-table td{padding:5px 7px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.attribute-table thead th{position:sticky;top:0;background:#f3f6f4;z-index:1}.attribute-table tbody th{position:sticky;left:0;background:#fff;z-index:1}.attribute-table input{min-width:110px;max-width:220px;padding:5px;border:1px solid var(--line);border-radius:5px}.attribute-table button{padding:5px 8px}.sql-panel{margin-top:18px;padding-top:13px;border-top:1px solid var(--line)}.sql-panel h3{font-size:15px;margin:0 0 5px}.sql-panel p{font-size:12px;color:var(--muted);margin:5px 0 9px}.sql-panel textarea{display:block;width:100%;resize:vertical;padding:9px;border:1px solid var(--line);border-radius:7px;font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace}.sql-result{margin-top:8px;font-size:12px}.sql-result:empty{display:none}
@media(max-width:650px){.modal:has(.attribute-table){padding:6px}.modal-card:has(.attribute-table){width:100%;max-height:96dvh;padding:14px}.attribute-table-scroll{max-height:35dvh}.export-choice select{min-width:125px}}
.lookup-toolbar{display:flex;align-items:end;gap:8px;margin:12px 0}.lookup-toolbar label{display:grid;gap:5px;flex:1;font-size:12px;color:var(--muted)}.lookup-toolbar select{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px;background:white}.lookup-enable{display:flex;align-items:center;gap:8px;margin:10px 0;font-weight:650}.lookup-help{font-size:12px;color:var(--muted)}.lookup-values{display:grid;gap:6px;max-height:42dvh;overflow:auto;margin:10px 0}.lookup-value-row{display:flex;align-items:center;gap:6px}.lookup-value-row input{min-width:0;flex:1;padding:7px;border:1px solid var(--line);border-radius:6px}.lookup-value-row button{padding:5px 8px}.lookup-value-row button.danger{color:var(--red)}
.lookup-values[hidden]{display:none}
@media(max-width:500px){.lookup-toolbar{align-items:stretch;flex-direction:column}.lookup-value-row{gap:4px}.lookup-value-row button{padding:5px}}

.measure-tools{display:flex;align-items:center;gap:5px}.measure-tools button{padding:7px 9px;font-size:13px}.measure-tools button.active{background:#fff0df;border-color:#d17e23;color:#8b4d0e}.measure-vertex{fill:#fff;stroke:#d17e23;stroke-width:3;vector-effect:non-scaling-stroke}.measure-vertex-label{font-size:12px;font-weight:750;fill:#8b4d0e;paint-order:stroke;stroke:#fff;stroke-width:3px;pointer-events:none}.measure-readout{position:absolute;right:10px;bottom:10px;max-width:min(360px,75%);padding:8px 11px;border:1px solid #e2bd91;border-radius:8px;background:#fffaf4ee;color:#70420f;font-size:12px;font-weight:700;box-shadow:0 1px 4px #10251d22;pointer-events:none}.measure-readout[hidden]{display:none}
@media(max-width:650px){.measure-tools{gap:3px}.measure-tools button{font-size:11px;padding:7px 6px}.measure-readout{bottom:43px;max-width:70%;font-size:11px}}
.offline-zoom-row{display:flex;gap:12px;margin:12px 0}.offline-zoom-row label{display:grid;gap:5px;flex:1;font-size:12px;font-weight:650}.offline-zoom-row input{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px}.offline-preview{padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--wash);font-size:13px}.offline-notice{color:#9c4b1c!important;font-weight:650}.offline-confirm{display:flex;align-items:flex-start;gap:8px;margin-top:12px;font-size:12px}.offline-confirm input{margin-top:3px}.offline-progress{min-height:20px;margin-top:10px;font-size:12px;color:var(--muted)}@media(max-width:500px){.offline-zoom-row{gap:8px}}

.lookup-paste{display:grid;gap:6px;margin:12px 0;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--wash)}.lookup-paste>label{font-size:12px;font-weight:650}.lookup-paste-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.lookup-paste textarea{width:100%;min-height:66px;resize:vertical;padding:8px;border:1px solid var(--line);border-radius:7px;font:12px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace}.lookup-paste-controls>div{display:grid;align-content:start;gap:6px}.lookup-paste select{padding:7px;border:1px solid var(--line);border-radius:7px;background:white}.lookup-paste button{white-space:nowrap}@media(max-width:500px){.lookup-paste-controls{grid-template-columns:1fr}.lookup-paste-controls>div{grid-template-columns:1fr 1fr}.lookup-paste button{white-space:normal}}
.draw-tools button:disabled{opacity:.42;cursor:not-allowed;background:#f1f4f2;color:var(--muted)}
