.map-edit-panel{position:fixed;z-index:1200;bottom:16px;left:16px;right:16px;max-height:40dvh;overflow:auto;border:1px solid var(--lg-l-688377,#688377);border-radius:20px;background:var(--lg-b-f6f7f2,#f6f7f2);color:var(--lg-t-183d39,#183d39);padding:16px;font-weight:500;font-size:var(--hx-text-label);font-family:var(--hx-font);box-shadow:0 4px 24px #0003}.map-edit-panel h2{font-size:var(--hx-text-title);margin:0 0 12px}.map-edit-tools,.map-edit-history{display:flex;flex-wrap:wrap;gap:8px}.map-edit-panel button{font-weight:600;font-size:var(--hx-text-label);font-family:var(--hx-font);min-height:44px;border:1px solid var(--lg-l-c8d6c3,#c8d6c3);border-radius:12px;background:var(--lg-b-f6f7f2,#f6f7f2);color:var(--lg-t-183d39,#183d39);padding:8px 12px}.map-edit-vertex{width:20px;height:20px;border-radius:50%;border:2px solid var(--lg-l-ffffff,#fff);background:var(--lg-b-b57920,#b57920);box-shadow:0 0 0 1px var(--lg-l-234f40,#234f40)}.maplibregl-ctrl button.map-edit-trigger{height:44px;width:44px;display:grid;place-items:center;color:#234f40}.map-edit-panel p{margin:12px 0 0}

/* Keep the editor in one corner rather than across the entire map. */
.map-edit-panel{left:auto;right:76px;bottom:16px;width:340px;max-width:calc(100vw - 24px);max-height:45dvh;padding:0;background:var(--lg-b-ffffff,#fff)}
.map-edit-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--lg-b-234f40,#234f40);color:var(--lg-t-ffffff,white);padding:8px 12px;position:sticky;top:0;z-index:1}
.map-edit-heading h2{font-size:var(--hx-text-body);margin:0}.map-edit-heading button{color:var(--lg-t-ffffff,white);background:transparent;border-color:#ffffff66;flex-shrink:0}
.map-edit-tools{display:grid;grid-template-columns:1fr 1fr;padding:12px;gap:6px}.map-edit-panel p{padding:0 12px 12px;margin:0}.map-edit-history{padding:12px}
.map-edit-panel.is-collapsed .map-edit-tools,.map-edit-panel.is-collapsed p,.map-edit-panel.is-collapsed .map-edit-history{display:none}
.map-actions .map-edit-trigger svg,.map-actions .map-edit-trigger svg path{fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;background:none!important}
@media(max-width:700px){.map-edit-panel{right:12px;bottom:12px;width:280px;max-height:35dvh}.map-edit-tools button{font-size:var(--hx-text-meta);padding:6px}.map-edit-heading h2{font-size:var(--hx-text-body)}}
body:not(.driving) .map-actions button.map-edit-trigger:before{display:none!important;content:none!important}
body:not(.driving) .map-actions button.map-edit-trigger>svg{display:block!important}

.map-edit-history button:disabled{background:var(--lg-b-e4e6e3,#e4e6e3);color:var(--lg-t-777777,#777);border-color:var(--lg-l-d3d6d1,#d3d6d1);cursor:default;opacity:1}

.map-edit-tools button[aria-pressed="true"]{background:var(--hx-segment-on);color:var(--hx-segment-ink);border-color:var(--hx-segment-ink)}

/* Map review: shared full-size actions, bounded phone width and a stable heading. */
html body .map-edit-panel{box-sizing:border-box;font-family:'Horus Avenir','Avenir Next','Segoe UI',Arial,sans-serif;max-width:calc(100vw - 24px);font-size:var(--hx-text-body);line-height:var(--hx-leading-body)}
html body .map-edit-panel .map-edit-tools button,html body .map-edit-panel .map-edit-history button{font-family:inherit;font-size:var(--ui-button-label-size,18px)!important;font-weight:600;min-height:52px;overflow-wrap:anywhere}
html body .map-edit-panel .map-edit-tools{grid-template-columns:repeat(2,minmax(0,1fr));padding:0;gap:8px}
html:root body .map-edit-panel>.map-edit-heading .ui-header-icon{width:var(--hx-target-icon);min-width:var(--hx-target-icon);padding:8px;flex:none}
html body .map-edit-heading svg{width:24px;height:24px}

@media(max-width:700px){html body .map-edit-panel{max-height:50dvh}}

/* Current shared action palette; map rail keeps its named geometry. */
html body .map-edit-panel button{background:var(--lg-b-e8ebe8,#e8ebe8)!important;color:var(--lg-t-183d39,#183d39)!important;border:1px solid var(--lg-l-62765a,#62765a)!important;border-radius:var(--hx-radius-card)!important;font:600 calc(18px * var(--horus-text-scale,.94))/1.4 'Horus Avenir','Avenir Next','Segoe UI',Arial,sans-serif!important;min-height:52px!important;text-align:center!important}
html body .map-edit-panel button[aria-pressed=true]{background:var(--hx-segment-on)!important;color:var(--hx-segment-ink)!important;border-color:var(--hx-segment-ink)!important;box-shadow:inset 0 0 0 1px var(--hx-segment-ink)}
html:root body .map-edit-panel>.map-edit-heading h2{font:700 var(--hx-text-display)/var(--hx-leading-tight) 'Horus Avenir','Avenir Next','Segoe UI',Arial,sans-serif!important}
html:root body .map-edit-panel>.map-edit-heading .ui-header-icon{width:var(--hx-target-icon)!important;height:var(--hx-target-icon)!important;min-height:var(--hx-target-icon)!important;padding:0!important}
html:root body .map-edit-panel>.map-edit-heading button svg,html:root body .map-edit-panel>.map-edit-heading button svg *{color:var(--lg-t-183d39,#183d39)!important;stroke:var(--lg-t-183d39,#183d39)!important}

html:root body .map-edit-panel .map-edit-tools button:not([aria-pressed=true]){background:var(--lg-b-e8ebe8,#e8ebe8)!important;color:var(--lg-t-183d39,#183d39)!important}
html:root body .map-edit-panel>.map-edit-heading button.ui-header-icon{background:var(--lg-b-e8ebe8,#e8ebe8)!important;color:var(--lg-t-183d39,#183d39)!important;border:1px solid var(--lg-l-62765a,#62765a)!important}

/* Separate editing tools, optional utilities and final draft/publish actions. */
html body .map-edit-panel>.map-edit-summary{font-weight:700;padding-bottom:8px}
html body .map-edit-panel>.map-edit-changes{padding-bottom:12px}
html body .map-edit-panel>.map-edit-instruction{padding:12px;background:var(--lg-b-f2f5ef,#f2f5ef);margin-bottom:12px}
html body .map-edit-panel>.map-edit-secondary{margin:12px 0 0;padding:0 12px}
html body .map-edit-secondary>summary{min-height:44px;display:list-item;align-content:center;font-weight:600;cursor:pointer}
html body .map-edit-panel>.map-edit-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 12px 0;border-top:1px solid var(--lg-l-d8ded9,#d8ded9);padding:16px 0 calc(16px + env(safe-area-inset-bottom,0px))}
html body .map-edit-panel.is-collapsed>:not(.map-edit-heading){display:none!important}

/* Match ordinary phone cards and reduce tool-row density without shrinking labels. */
/* Phones: the editor is a bottom sheet like every other sheet (UI audit, 6 Oct 2026). */
@media(max-width:760px){html body .map-edit-panel{left:0;right:0;bottom:0;width:100%;max-width:100%;border:0;border-radius:var(--hx-radius-sheet) var(--hx-radius-sheet) 0 0;box-shadow:var(--hx-shadow-sheet)}}
html body .map-edit-panel .map-edit-tools button{min-height:44px!important;padding:4px 8px!important}
html body .map-edit-panel>.map-edit-summary{padding-bottom:4px}
html body .map-edit-panel>.map-edit-changes{padding-bottom:8px}
html body .map-edit-panel>.map-edit-instruction{padding:8px 12px;margin-bottom:8px}
html body .map-edit-panel>.map-edit-secondary{margin-top:8px}

/* the chosen tool is shown by its fill, not a ring (owner, 6 Oct 2026: no outlines); beats the global selected-button rule in cream-ui.css */
html:root body .map-edit-panel.map-edit-panel button[aria-pressed="true"]{border-color:transparent!important}
