.runoff-dev-banner{position:fixed;left:12px;bottom:30px;z-index:13;max-width:min(390px,calc(100vw - 24px));background:#fffef4;border:1px solid #ead8a1;border-radius:9px;padding:9px 12px;color:#5f522e;font-size:12px;box-shadow:0 2px 12px #173d4b12}.runoff-dev-banner p{margin:0}.runoff-dev-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.runoff-dev-actions button,#runoffOpen{border:1px solid #abc8c5;background:#f4faf8;color:#14545b;border-radius:7px;padding:8px 11px;cursor:pointer;font:600 12px system-ui}#runoffOpen{background:#125968;color:#fff;white-space:nowrap}.runoff-select-overlay{position:absolute;inset:0;z-index:1000;pointer-events:none;overflow:hidden;background:#16434d05}.runoff-select-box{display:none;position:absolute;border:2px solid #007d8b;background:#14a5b128;pointer-events:none}.runoff-dialog{box-sizing:border-box;width:min(1180px,96vw);max-width:96vw;max-height:94dvh;margin:auto;padding:0;border:1px solid #ccdcd7;border-radius:16px;box-shadow:0 18px 80px #082b4055;color:#173f46;background:#fff;overflow:auto;font:14px system-ui}.runoff-dialog::backdrop{background:#0d293c99}.runoff-header{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;background:#0c5264;color:#fff;gap:15px}.runoff-header h2{font-size:19px;margin:3px 0}.runoff-header small{font-size:10px;letter-spacing:.12em;color:#bde1e3}.runoff-dialog button{font:600 12px system-ui;padding:9px 13px;border:1px solid #bed4cf;border-radius:8px;background:#f2f8f6;color:#174c55;cursor:pointer}.runoff-dialog button:disabled{opacity:.45;cursor:wait}.runoff-dialog button[aria-pressed=true]{background:#d9ede7;border-color:#218d77;color:#135a4e}.runoff-header .runoff-icon{background:#ffffff16;border:1px solid #ffffff40;color:#fff;font-size:25px;padding:0 10px}.runoff-stage{height:min(52dvh,520px);min-height:280px;position:relative;background:#e8efee;overflow:hidden}.runoff-scene{position:absolute;inset:0}.runoff-stage-tag{position:absolute;left:12px;top:12px;background:#fffffff0;padding:5px 8px;border-radius:5px;font-size:11px;pointer-events:none}#runoffMini{position:absolute;right:12px;top:12px;width:170px;height:115px;border:2px solid #fff;border-radius:9px;box-shadow:0 3px 15px #16465520;z-index:1}#runoffCanvas{height:100%;width:100%;object-fit:contain;image-rendering:pixelated;cursor:crosshair}.runoff-legend{position:absolute;right:12px;bottom:12px;display:grid;gap:3px;background:#fffffff2;border:1px solid #cddedc;border-radius:8px;padding:7px 10px;font-size:10px;pointer-events:none}.runoff-legend small{font-size:9px;color:#567575}.runoff-gradient{height:5px;background:linear-gradient(90deg,#78c5d0,#15516c);border-radius:3px}.runoff-controls{padding:14px 20px 17px;display:grid;gap:10px}.runoff-scenarios,.runoff-playback{display:flex;gap:7px;flex-wrap:wrap}.runoff-scenarios button{flex:1;min-width:65px}.runoff-scenarios small{font-weight:400}.runoff-timeline{display:grid;grid-template-columns:1fr auto;gap:5px;font-size:12px;font-weight:600}.runoff-timeline input{grid-column:1/-1;width:100%;margin:3px 0;accent-color:#168394}.runoff-controls p,.runoff-controls output{margin:0;font-size:12px}.runoff-controls #runoffQuery{background:#f1f7f5;border-radius:6px;padding:8px}.runoff-note{color:#5a7778;font-size:11px!important}.runoff-controls details{font-size:11px;color:#567172}.runoff-controls details p{font-size:11px;line-height:1.5;margin-top:7px}.runoff-controls summary{cursor:pointer}#runoffPlay{background:#125968;color:#fff;border-color:#125968}body:has(.runoff-dialog[open]){overflow:hidden}.runoff-dialog [hidden]{display:none!important}@media(max-width:820px){.runoff-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}.runoff-header{padding:12px}.runoff-header h2{font-size:16px}.runoff-stage{height:46dvh;min-height:240px}.runoff-controls{padding:12px;gap:10px}#runoffMini{width:105px;height:80px;right:8px;top:42px}.runoff-stage-tag{font-size:10px;left:8px;top:8px}.runoff-legend{max-width:165px;font-size:9px;right:8px;bottom:8px}.runoff-legend small{font-size:8px}.runoff-playback{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:5px}.runoff-dialog button{padding:9px 7px;font-size:11px}.runoff-dev-banner{bottom:76px;max-width:250px;font-size:10px}#runoffOpen{font-size:11px;padding:8px}.mapToolbar:has(#runoffOpen){flex-wrap:wrap}.runoff-scene-reference{max-width:140px}}
.runoff-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:28px;box-sizing:border-box;background:#e8efee;z-index:2;color:#315e61}.runoff-loading strong{font-size:18px}.runoff-loading span{max-width:420px;font-size:13px;line-height:1.5}.runoff-loading button{margin-top:8px}

.runoff-mode{background:#edf5f2;border-left:3px solid #2c8d80;padding:9px 11px;font-weight:600;line-height:1.5}.runoff-timeline[hidden]{display:none!important}.runoff-dialog .runoff-note{line-height:1.5}.runoff-dialog #runoffMini{width:210px;height:140px}.runoff-gradient{background:linear-gradient(90deg,#d1e7ed,#589fbc,#163f6b)}@media(max-width:820px){.runoff-playback{display:flex;flex-wrap:wrap}.runoff-playback button{flex:1 1 28%}.runoff-dialog #runoffMini{width:120px;height:95px}}

.runoff-stage-tag{max-width:calc(100% - 255px);line-height:1.5}.runoff-scene-north{top:88px!important}@media(max-width:820px){.runoff-stage-tag{max-width:calc(100% - 150px)}.runoff-scene-north{top:92px!important}}

.runoff-attribution{font-size:9px!important;color:#526d73;line-height:1.4}.runoff-controls #runoffSurfaceStatus{font-size:11px;color:#3f6670}.runoff-playback #runoffSurface{background:#edf4e5}.runoff-playback #runoffSurface[aria-pressed=true]{background:#d7e8d0}.runoff-mode{font-size:12px!important}.runoff-scene-reference{max-width:260px;line-height:1.5}@media(max-width:820px){.runoff-stage{height:49dvh}.runoff-scene-reference{font-size:9px!important;max-width:170px}}

.runoff-public-tools{position:relative;color:#174c55;font:600 12px system-ui}.runoff-public-tools>summary{cursor:pointer;list-style:none;border:1px solid #c6dad5;background:#fff;border-radius:7px;padding:10px;white-space:nowrap}.runoff-public-tools>summary::after{content:" ▾"}.runoff-public-tools[open]>summary{background:#e4f1ec}.runoff-public-panel{position:absolute;right:0;top:calc(100% + 7px);width:min(290px,calc(100vw - 32px));padding:12px;background:#fff;border:1px solid #c6dad5;border-radius:9px;box-shadow:0 5px 20px #173d4b24;z-index:14;font-weight:400;line-height:1.5}.runoff-public-panel p{margin:0}.runoff-public-panel [hidden]{display:none!important}@media(max-width:820px){.runoff-public-tools{font-size:11px}.runoff-public-tools>summary{padding:8px}.runoff-public-panel{right:0}}

/* Keep the compact tools above readouts and notices below a wrapped toolbar. */
.mapToolbar:has(.runoff-public-tools[open]){z-index:11}
.mapArea:has(#runoffOpen) .mapNotices{top:var(--runoff-toolbar-bottom,76px);max-height:max(0px,calc(100% - var(--dock-height,66px) - var(--runoff-toolbar-bottom,76px) - 30px))}

.mapArea:has(.runoff-select-overlay) .mapToolbar{z-index:1001}

/* Location stays outside the collapsed phone tools, below the existing zoom buttons. */
.locateControl{position:absolute;right:12px;top:clamp(8px,calc(var(--runoff-toolbar-bottom,80px) + var(--locate-nav-height,152px)),calc(100% - 70px));z-index:15;margin:0;font:12px system-ui;pointer-events:auto}
@media(max-height:520px){.locateControl{right:88px;top:var(--runoff-toolbar-bottom,80px)}}
/* Keep both colour references below the main actions on short landscape screens,
   including when a real weather alert consumes another row above the map. */
@media(max-height:520px){
  .mapColorKey{bottom:calc(var(--dock-height,52px) + 4px);padding:4px 6px;gap:8px}
  .mapColorKey strong{font-size:8px;line-height:1.15;margin:0 0 2px}
  .mapColorKey .mapColorEnds{font-size:7px;line-height:1.15}
  .mapColorKey .mapColorRamp{height:3px;margin-bottom:2px}
}
.locateControl button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:74px;min-height:54px;padding:6px;border:1px solid #b7d0ca;border-radius:9px;background:#fffffff5;color:#165b55;font:600 11px system-ui;cursor:pointer;box-shadow:0 2px 8px #173d4b18}
.locateControl button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8}
.locateControl button:focus-visible{outline:3px solid #168a94;outline-offset:2px}
.locateControl button[aria-busy=true]{background:#e6f4f0}
.locateControl p{position:absolute;right:calc(100% + 8px);top:0;box-sizing:border-box;width:min(250px,calc(100vw - 116px));margin:0;padding:10px;border:1px solid #b7d0ca;border-radius:8px;background:#fff;color:#174c55;box-shadow:0 3px 12px #173d4b24;font:12px/1.4 system-ui}
.locateControl p{pointer-events:none}.locateControl p[hidden]{display:none}
.locationPin{width:17px;height:17px;border-radius:50%;background:#126ea6;border:3px solid white;box-shadow:0 0 0 2px #126ea6,0 2px 7px #173d4b55}

.mapArea:has(.runoff-select-overlay) .mapNotices{visibility:hidden;pointer-events:none}

.runoff-select-anchor{display:none;position:absolute;width:10px;height:10px;background:#007d8b;border:2px solid white;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;box-shadow:0 1px 4px #173d4b66}

/* Follow the wrapped public toolbar so zoom controls remain visible and tappable. */
.mapArea:has(#runoffOpen) .maplibregl-ctrl-top-right,
.mapArea:has(#runoffOpen) #map .leaflet-top.leaflet-right{top:var(--runoff-toolbar-bottom,180px)}


/* Two visible actions, with a persistent guide only while choosing/ready. */
.runoff-entry{box-sizing:border-box;flex:0 1 370px;width:min(370px,calc(100vw - 24px));min-width:0;padding:7px;background:#fffffff5;border:1px solid #b9d3ce;border-radius:13px;box-shadow:0 4px 14px #173d4b18;font:13px system-ui;color:#174c55}
.runoff-entry-actions{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:6px;align-items:stretch}
.runoff-entry button,.runoff-entry summary{box-sizing:border-box;min-height:52px;font:600 12px system-ui;border-radius:8px;transition:background .14s,box-shadow .14s,transform .14s}
.runoff-entry #runoffOpen{display:flex;align-items:center;gap:8px;text-align:left;padding:9px 10px;white-space:normal;background:#125968;color:white;border:1px solid #125968}
.runoff-entry #runoffOpen>span:not(.runoff-entry-arrow){display:grid;gap:3px;min-width:0}
.runoff-entry strong{font-size:13px;line-height:1.2}.runoff-entry small{font-size:10px;line-height:1.35;font-weight:400}
.runoff-entry #runoffOpen small{color:#d4eaed}.runoff-entry-arrow{margin-left:auto;font-size:25px;line-height:1}
.runoff-entry svg{width:21px;height:21px;flex-shrink:0}
.runoff-entry #runoffSelect{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px;background:#eaf5f0;color:#145b52;border:1px solid #95beb3;max-width:116px}
.runoff-entry .runoff-public-tools{display:flex;align-self:stretch}
.runoff-entry .runoff-public-tools>summary{display:flex;align-items:center;justify-content:center;min-width:44px;padding:0;background:#f4f7f6;font-size:24px;border:1px solid #c8d8d3}
.runoff-entry .runoff-public-tools>summary::after{content:none}
.runoff-entry .runoff-public-panel{width:min(280px,calc(100vw - 44px));box-sizing:border-box;padding:14px}
.runoff-entry .runoff-public-panel p{font-size:12px;margin-top:6px}.runoff-entry .runoff-dev-actions button{min-height:44px;font-size:12px}
.runoff-entry [hidden]{display:none!important}
.runoff-entry :is(button,summary):focus-visible{outline:3px solid #35a7b3;outline-offset:3px}
.runoff-entry :is(button,summary):hover{box-shadow:0 0 0 2px #17889825}.runoff-entry :is(button,summary):active{transform:translateY(1px)}
.runoff-entry #runoffOpen:hover{background:#0b4653}.runoff-entry #runoffOpen:disabled{cursor:default;background:#e6eeec;color:#617b77;border-color:#d0ded9;box-shadow:none}.runoff-entry #runoffOpen:disabled small{color:#617b77}
.runoff-entry-guide{display:flex;gap:9px;align-items:flex-start;margin-top:8px;padding:8px 9px;background:#edf8f4;border-radius:8px;line-height:1.4}
.runoff-entry-guide p{margin:0;font-size:12px;font-weight:600}.runoff-entry-guide small{display:block;margin-top:3px;color:#486d63}
#runoffStep{display:grid;place-items:center;flex:0 0 23px;height:23px;background:#17675d;color:white;border-radius:50%;font-weight:700}
.runoff-entry:is([data-state=first],[data-state=second]){border-color:#168878}.runoff-entry:is([data-state=first],[data-state=second]) #runoffSelect{background:#fff1ec;border-color:#d9aea0;color:#8c3f30}
.runoff-entry[data-state=selected]{border-color:#3d9e85}.runoff-entry[data-state=selected] #runoffOpen{background:#176b59;border-color:#176b59}
.mapToolbar:has(.runoff-entry){align-items:flex-start}
@media(max-width:820px){.runoff-entry{flex-basis:370px;max-width:100%;padding:6px}.runoff-entry #runoffOpen{padding:8px;gap:6px}.runoff-entry strong{font-size:12px}.runoff-entry #runoffSelect{font-size:11px;gap:4px;padding:7px}.runoff-entry svg{width:18px;height:18px}}
@media(prefers-reduced-motion:reduce){.runoff-entry :is(button,summary){transition:none;transform:none}}

.runoff-entry:is([data-state=first],[data-state=second]) #runoffSelect svg{display:none}
.runoff-entry:is([data-state=first],[data-state=second]) #runoffSelect::before{content:"×";font-size:20px;line-height:1}

/* The page's generic details padding must not enlarge the compact options button. */
.runoff-entry .runoff-public-tools{display:block;box-sizing:border-box;width:44px;min-width:0;padding:0;margin:0;border:0;background:transparent}
.runoff-entry .runoff-public-tools>summary{width:44px;height:100%;margin:0}
.runoff-entry #runoffOpen:disabled{opacity:1}

/* Keep the two essential actions, not a second full-height mobile toolbar. */
@media(max-width:768px),(max-height:520px){
  .mapToolbar .runoff-entry{flex:1 1 0;width:auto;max-width:calc(100% - 60px);padding:3px;border-radius:10px}
  .runoff-entry .runoff-entry-actions{grid-template-columns:minmax(0,1fr) minmax(65px,auto) 44px;gap:3px}
  .runoff-entry :is(button,summary){min-height:44px}
  .runoff-entry #runoffOpen{padding:6px;gap:3px}
  .runoff-entry strong{font-size:11px;line-height:1.2}
  .runoff-entry #runoffOpenDetail,.runoff-entry #runoffOpen>svg,.runoff-entry #runoffSelect>svg,.runoff-entry-arrow{display:none}
  .runoff-entry #runoffSelect{font-size:10px;padding:5px;max-width:88px}
  .runoff-entry-guide{padding:6px;gap:6px;margin-top:5px}
  .runoff-entry-guide p{font-size:11px}.runoff-entry-guide small{font-size:10px}
  .runoff-entry .runoff-public-panel{right:0;left:auto;width:min(280px,calc(100vw - 100px))}
  .runoff-entry[data-state=frame] #runoffSelect{background:#fff1ec;border-color:#d9aea0;color:#8c3f30}
  .runoff-phone-frame{border:2px solid #11828a;border-radius:10px;box-shadow:0 0 0 2000px #173b4529;background:transparent;color:#14545b;font:600 11px system-ui;text-align:center;padding-top:8px}
  .mapArea:has(.runoff-frame-overlay) .mapColorKey{visibility:hidden}
}
@media(max-height:520px){.runoff-entry[data-state=frame] .runoff-entry-guide{display:none}}

