/* The editor shares map cards, profiles and settings with the route analyzer. */
.planner-page #editor{height:100dvh;display:grid;grid-template-rows:68px minmax(0,1fr)}
[hidden],.planner-page #editor[hidden]{display:none!important}
.editor-header{height:auto;padding:8px 20px;gap:12px}.editor-header h1{font-size:25px}.editor-brand{display:flex;gap:10px;align-items:center;min-width:0}.editor-brand img{width:42px;height:42px}.editor-layout{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:0}.editor-tools{padding:20px;overflow:auto;border-right:1px solid var(--line)}.editor-tools label{display:block;font-size:12px;color:var(--muted);margin-bottom:16px}.editor-tools input,.editor-tools select{width:100%;display:block;margin-top:6px}.editor-tools h2{font:600 13px system-ui;color:var(--muted);margin:28px 0 12px}.editor-toolbar{display:flex;flex-wrap:wrap;gap:8px}.editor-toolbar button{padding:9px 10px;font-size:12px;flex:1;min-width:90px}.editor-actions{display:grid;gap:10px}.editor-actions .primary{width:100%}.editor-map-panel{padding:20px 24px;min-width:0;overflow:auto;display:flex;flex-direction:column;gap:12px}.editor-editing{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.editor-editing>select{font-size:13px;flex:1;min-width:150px;max-width:220px}.editor-editing>button{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px}.editor-editing .icon{width:20px;height:20px;flex-shrink:0}.editor-history{display:flex;gap:6px}.editor-history .icon-btn{padding:9px}.editor-map-card{flex:1;min-height:370px;display:flex;flex-direction:column;overflow:clip}.editor-map-wrap{position:relative;flex:1;min-height:260px}.editor-map{height:100%;position:absolute;inset:0;z-index:0}.editor-tip{font-size:11px;color:var(--muted);flex:1;line-height:1.5}.editor-map-card .map-footer{padding:8px 14px;flex-wrap:nowrap}.editor-profile{flex:none;min-width:0}.editor-profile>h3{font-size:13px;margin-bottom:6px}.editor-profile .profile-head{display:none}.editor-profile svg{width:100%;height:170px;touch-action:none}.editor-profile .profile{box-shadow:none}.editor-profile output{font-size:12px}.editor-attribution,.editor-profile-note{font-size:10px;color:var(--muted);line-height:1.6;margin-top:5px}.editor-attribution:empty{display:none}.planner-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 20px}.planner-metrics dt{font-size:10px;color:var(--muted)}.planner-metrics dd{font-size:19px;color:var(--primary);font-variant-numeric:tabular-nums;margin:2px 0 0}.editor-control-details{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:14px}.editor-control-details summary{padding:13px 0;min-height:48px;cursor:pointer;font-size:13px;font-weight:600}.editor-control-details summary span{color:var(--muted);font-variant-numeric:tabular-nums;margin-left:4px}.editor-controls{padding:0;list-style:none;margin:0 0 12px}.editor-controls li{margin:6px 0}.editor-controls button{width:100%;text-align:left;font-size:12px}.editor-controls button span{display:block;color:var(--muted);font-size:11px}.editor-controls button[aria-pressed=true]{border-color:var(--primary);color:var(--primary);background:var(--tint)}.control-icon{width:28px;height:28px;border:2px solid var(--primary);border-radius:50%;display:grid;place-items:center;background:var(--card);color:var(--primary);font:700 12px system-ui;box-shadow:0 0 0 2px #fff}.control-icon.selected{background:var(--primary);color:var(--bg)}.control-wrapper{background:none;border:none}.editor-selected{background:var(--tint);padding:12px;border-radius:9px;margin:12px 0}.editor-selected:empty{display:none}.editor-selected p{font-size:12px;margin-bottom:10px}.editor-selected button{font-size:12px;margin:3px 0}.editor-selected input{font-size:12px;min-width:0;width:100%}.editor-selected label{font-size:12px}.editor-end{background:var(--card);border:1px solid var(--line);color:var(--primary);font-size:11px;font-weight:600;padding:3px 7px;border-radius:4px}.editor-error{color:var(--primary);font-size:12px}.editor-status{min-height:20px;font-size:12px;color:var(--muted);margin:8px 0 12px}.editor-note{font-size:11px;color:var(--muted);margin:16px 0;line-height:1.7}.editor-saved-row{display:flex;gap:5px;margin:8px 0}.editor-saved-row button:first-child{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis}.editor-saved-row button{font-size:12px;padding:9px;display:flex;align-items:center}.editor-saved-row svg{width:20px;height:20px}.editor-dialog-form label{display:block;margin-top:14px}.editor-dialog-form input{display:block;width:100%;margin-top:6px}.planner-settings-open #planner-settings{min-height:100dvh}
@media(max-width:1000px){.editor-layout{grid-template-columns:270px minmax(0,1fr)}.editor-map-panel{padding:16px}.editor-editing{gap:6px}.editor-editing>select{max-width:none}.editor-editing>button{flex:1}.editor-history{flex:none}}
@media(max-width:760px),(pointer:coarse){.planner-page #editor{height:auto;min-height:100dvh;display:block}.editor-header{height:64px;padding:8px 16px}.editor-header h1{font-size:23px}.editor-brand{gap:8px}.editor-brand img{width:36px;height:36px}.editor-header .toolbar{gap:6px}.editor-header .icon-btn{width:42px;padding:10px}.editor-layout{display:flex;flex-direction:column;padding:18px 16px 32px;gap:16px}.editor-tools{display:contents}.editor-basics{order:0}.editor-basics label:last-child{margin-bottom:0}.editor-map-panel{order:1;display:flex;overflow:visible;padding:0;gap:12px}.editor-after{order:2;min-width:0}.editor-editing{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.editor-editing>select{width:100%;max-width:none;min-width:0;font-size:13px}.editor-editing>button{font-size:12px;width:100%;min-height:44px;padding:9px 8px}.editor-history{gap:6px}.editor-map-card{min-height:0;flex:none}.editor-map-wrap{height:clamp(260px,43dvh,420px);min-height:0;flex:none}.editor-map-card .map-head{padding:10px 12px}.editor-map-card .map-head select{max-width:170px}.editor-map-card .map-footer{padding:7px 12px}.editor-profile svg{height:155px;min-height:0}.planner-metrics{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 20px}.planner-metrics dd{font-size:17px}.planner-metrics dt{font-size:9px}.editor-after h2{font:600 14px system-ui;margin:26px 0 12px}.editor-note{margin-bottom:0}}
@media(pointer:coarse){.editor-map .leaflet-control-zoom{display:none}}

.planner-page button:disabled{cursor:default}.editor-brand h1{min-width:0;overflow-wrap:anywhere}

/* Desktop map chrome floats over the cartography; neither strip consumes map height. */
.editor-map-card[data-compact=true]>.map-head,.editor-map-card[data-compact=true]>.map-footer{display:none}
.editor-map .map-fit-control{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:8px;box-shadow:0 2px 12px #0004}
.editor-map .map-fit-control .icon-btn{width:34px;min-height:34px;height:34px;border:0;background:var(--card);padding:6px}
