.field-tools{padding:10px 14px;background:#fffaf5;border-bottom:1px solid var(--line)}
.field-actions{display:flex;gap:8px}.field-actions button{flex:1;padding:9px 6px;font-size:13px;min-height:44px}
#fieldStatus{font-size:12px;color:var(--muted);margin:7px 0 0;overflow-wrap:anywhere}
.field-dialog{max-width:600px}.field-dialog fieldset{min-width:0}.field-dialog input[type="checkbox"]{width:20px}
.field-dialog small{display:block;color:var(--muted);font-size:12px}.field-dialog [hidden]{display:none}
.route-options{max-height:40dvh;overflow:auto;margin-bottom:14px!important}
.route-list{padding-left:25px}.route-list li{padding:12px 0;border-bottom:1px solid var(--line)}
.route-list li>div{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.route-list a{color:var(--ink)}
.route-links{display:grid;gap:10px}.route-links a{text-decoration:none;text-align:center}
.conflict-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}.conflict-table th,.conflict-table td{padding:8px;border:1px solid var(--line);overflow-wrap:anywhere;text-align:left}
.drawing-tools{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.drawing-tools span{flex-basis:100%;font-size:12px}
.boundary-handle{width:44px;height:44px;padding:0;border:0;background:transparent;display:grid;place-items:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;z-index:2}
.boundary-handle span{display:grid;place-items:center;width:25px;height:25px;border:2px solid #fff;border-radius:50%;background:#2563eb;color:#fff;font:bold 12px system-ui;box-shadow:0 1px 5px #240b3660;pointer-events:none}
.boundary-handle:focus-visible{outline:3px solid #ff750e;outline-offset:1px;border-radius:50%}.boundary-handle.is-dragging{cursor:grabbing;z-index:3}.boundary-handle.is-dragging span{background:#ff750e;transform:scale(1.15)}
.field-tools~.map-wrap{height:calc(100dvh - 240px);min-height:430px}
.app:has(.drawing-tools) .map-summary{display:none}
.app:has(.drawing-tools) #addLead{display:none}
.app:has(.drawing-tools) .map-wrap{height:calc(100dvh - 325px);min-height:250px}
@media(max-width:420px){.field-dialog .actions{flex-wrap:wrap}.field-dialog .actions button{flex:1}.map-hint{font-size:11px}}
/* Size the map from the space actually left by the toolbar and test banner.
   Keeping navigation in this layout prevents it from covering map controls. */
body:has(.map-wrap){height:100dvh;display:flex;flex-direction:column}
body:has(.map-wrap)>#app{flex:1;min-height:0}
body:has(.map-wrap) #app .app{height:100%;min-height:0;display:flex;flex-direction:column;width:100%}
body:has(.map-wrap) .topbar,body:has(.map-wrap) .field-tools{flex-shrink:0}
body:has(.map-wrap) #app .app .map-wrap{flex:1;height:auto;min-height:0;padding-bottom:0}
body:has(.map-wrap) .nav{position:relative;left:auto;transform:none;flex:0 0 70px}
@media(max-height:700px){body:has(.map-wrap) .map-tools{grid-template-columns:repeat(4,1fr);bottom:145px}.app:has(.drawing-tools) .map-tools{bottom:12px}}
