.cape-route-map[hidden]{display:none!important}
.cape-route-map{position:fixed;inset:0;z-index:22000;background:#101827;color:#fff1cf;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));overflow:auto;overscroll-behavior:contain;font-family:Arial,Helvetica,sans-serif;touch-action:pan-y}
body.cape-map-open{overflow:hidden}
.cape-map-shell{max-width:1600px;margin:auto}
.cape-map-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:5px 3px 17px;border-bottom:1px solid #364454}
.cape-map-kicker{font:10px monospace;letter-spacing:3px;color:#a8c6c6}
.cape-map-header h2{font:700 clamp(22px,3vw,38px)/1.1 Arial,sans-serif;margin:8px 0 0;letter-spacing:-1px}
.cape-route-map button,.cape-route-map select{font:700 12px Arial,sans-serif;cursor:pointer;border-radius:0;touch-action:manipulation}
.cape-route-map button:focus-visible,.cape-route-map select:focus-visible,.map-marker:focus-visible{outline:3px solid #9ce9dd;outline-offset:4px}
#capeMapClose{background:transparent;color:#fff1cf;border:1px solid #607078;min-height:44px;padding:9px 15px;white-space:nowrap}
#capeMapClose span{font-size:23px;margin-left:15px;vertical-align:-2px}
.cape-map-toolbar{display:flex;justify-content:space-between;gap:14px;padding:14px 0}
.cape-map-toolbar nav{display:flex;gap:6px;flex-wrap:wrap}
.cape-map-toolbar button{min-height:42px;padding:9px 14px;background:#202f3c;color:#c9dbd7;border:1px solid #455963}
.cape-map-toolbar button[aria-pressed=true]{background:#f1b5c5;color:#202b3c;border-color:#f1b5c5}
#capeMapLocate{color:#9ce9dd;white-space:nowrap}
.cape-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.cape-map-atlas{background:#173c50;border:1px solid #43616a;min-width:0;position:relative}
.cape-map-location{display:flex;flex-wrap:wrap;gap:5px 15px;justify-content:space-between;background:#142c3b;padding:12px 14px;font:11px/1.5 monospace;color:#9ce9dd}
#capeMapNext{color:#e5d3aa}
#capeMapDrawing{line-height:0}
.cape-map-svg{display:block;width:100%;height:auto;max-height:calc(100dvh - 244px);min-height:340px;background:#173c50}
.map-marker{cursor:pointer}.map-marker:hover>rect:not([fill=transparent]),.map-marker:focus-visible>rect:not([fill=transparent]){stroke:#f58bba;stroke-width:4}
.cape-map-legend{display:flex;flex-wrap:wrap;gap:9px 18px;font:10px/1.4 monospace;padding:12px 14px;background:#142c3b;color:#bfd0c9}
.cape-map-legend span{display:flex;align-items:center;gap:6px}
.cape-map-legend i{display:inline-block;width:9px;height:9px}.map-legend-here{border:2px solid #9ce9dd}.map-legend-selected{background:#f1b5c5}
.cape-map-sidebar{background:#1d2a37;border:1px solid #43525d;padding:20px;min-width:0}
.cape-map-sidebar label{display:block;font:10px monospace;letter-spacing:2px;margin-bottom:9px;color:#b9cfc9}
#capeMapZone{width:100%;min-height:44px;background:#101c28;color:#fff1cf;border:1px solid #607079;padding:8px;font-size:12px}
.cape-map-destination{padding:25px 0 19px}
#capeMapStamp{font:9px/1.5 monospace;letter-spacing:1px;color:#93d5ca}
.cape-map-destination h3{font:700 27px/1.12 Arial,sans-serif;letter-spacing:-.7px;margin:10px 0}
.cape-map-destination p{font:13px/1.6 Arial,sans-serif;color:#c0ccc8;margin:0}
#capeMapGo{min-height:48px;padding:12px;width:100%;background:#f1b5c5;color:#202737;border:0;box-shadow:3px 3px 0 #091921}
#capeMapGo:disabled{background:#5b6570;color:#d0d6d8;cursor:not-allowed;box-shadow:none}
#capeMapStatus{font:12px/1.5 Arial,sans-serif;color:#c2d2ce;min-height:36px;margin:13px 0 20px}
.cape-map-roads{border-top:1px solid #43525d;padding-top:16px}
.cape-map-roads h4{font:10px monospace;letter-spacing:2px;color:#b2c6c3;margin:0 0 8px}
.cape-map-connection{display:block;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid #364958;color:#fff1cf;padding:12px 0;min-height:50px}
.cape-map-connection strong,.cape-map-connection span{display:block}
.cape-map-connection strong{font-size:12px;line-height:1.4}
.cape-map-connection span{font:11px/1.5 Arial,sans-serif;color:#a3bcb9;margin-top:3px}
.cape-map-connection:hover strong{color:#f1b5c5}
.cape-map-footnote{font:10px/1.6 monospace;color:#94aaa9;margin:18px 0 0}
#mapTop{color:#9ce9dd}#mapStart{display:block;margin:8px auto;color:#98e0d5}#mapRotate{margin-top:12px;min-height:44px}
@media(orientation:landscape) and (max-width:900px){.masthead{flex-wrap:nowrap;gap:8px}.masthead .brand>span:not(.brand-mark){display:none}.masthead .top-right{min-width:0;overflow-x:auto;flex-wrap:nowrap;gap:4px}.masthead .utility{flex:0 0 auto;font-size:10px;padding:0 6px}.masthead .time-control select{font-size:10px;max-width:103px}.masthead .time-control{flex:0 0 auto}}
@media(max-width:850px){.cape-map-layout{grid-template-columns:minmax(0,1fr) 245px;gap:10px}.cape-map-sidebar{padding:14px}.cape-map-toolbar{gap:8px}.cape-map-toolbar button{padding:8px 10px}.cape-map-destination h3{font-size:23px}.cape-map-destination{padding-top:18px}.cape-map-svg{min-height:260px}.cape-map-header{padding-bottom:11px}}
@media(max-width:600px) and (orientation:portrait){.cape-route-map{padding:12px}.cape-map-layout{grid-template-columns:1fr}.cape-map-toolbar{display:block}.cape-map-toolbar nav{display:grid;grid-template-columns:repeat(3,1fr)}#capeMapLocate{margin-top:8px;width:100%}.cape-map-svg{max-height:none;min-height:0}.cape-map-header h2{font-size:24px}#capeMapClose{font-size:9px;padding:8px}#capeMapClose span{margin-left:6px}.cape-map-kicker{font-size:8px;letter-spacing:1.6px}.cape-map-sidebar{padding:18px}.cape-map-destination{padding:17px 0}.cape-map-legend span:last-child{width:100%}}
@media(orientation:landscape) and (max-height:540px){.cape-route-map{padding:8px}.cape-map-header{padding:0 0 6px}.cape-map-kicker{display:none}.cape-map-header h2{font-size:22px;margin:0}.cape-map-toolbar{padding:7px 0}.cape-map-toolbar button{min-height:36px;padding:7px 9px}.cape-map-svg{max-height:none;min-height:260px}.cape-map-layout{grid-template-columns:minmax(0,1fr) 235px}.cape-map-location{font-size:9px;padding:7px}.cape-map-legend{font-size:9px;padding:7px}.cape-map-sidebar{padding:12px}.cape-map-destination{padding:12px 0}.cape-map-destination h3{font-size:21px}.cape-map-destination p{font-size:12px}.cape-map-header #capeMapClose{min-height:36px;padding:4px 9px}}

/* Local drive stays paused; roaming clubs update in the separate activity layer. */
.cape-map-layers{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 12px;font:10px monospace;color:#c4d5ce}
.cape-map-layers>span{letter-spacing:1.5px;margin-right:5px}
.cape-map-layers button{min-height:42px;padding:8px 12px;color:#c7d5d0;background:#202f3c;border:1px solid #455963}
.cape-map-layers button[aria-pressed=true]{background:#9ce9dd;border-color:#9ce9dd;color:#142b36}
.cape-map-layers p{flex-basis:100%;margin:2px 0 0;line-height:1.5}
.map-activity-marker{pointer-events:none}
.cape-map-activity{border-top:1px solid #43525d;padding-top:12px;margin-top:14px;font:11px/1.5 Arial,sans-serif;color:#c9d8d1}
.cape-map-activity summary{cursor:pointer;min-height:32px;color:#9ce9dd}
.cape-map-activity ul{padding-left:18px;margin:8px 0}.cape-map-activity li{margin:7px 0}
@media(orientation:landscape) and (max-height:540px){.cape-map-layers{gap:5px;margin-bottom:7px}.cape-map-layers button{min-height:36px;padding:6px 9px}.cape-map-layers p{font-size:9px}}

/* A recognisable map control beside the phone, plus an early start-menu entry. */
.cape-map-icon{display:block;flex:0 0 auto;width:25px;height:23px}
.cape-map-launch{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-height:44px;cursor:pointer;touch-action:manipulation}
.cape-map-launch:focus-visible{outline:3px solid #9ce9dd;outline-offset:3px}
#mapTop{background:#f1b5c5;color:#202737;border-color:#f1b5c5}
.start-area-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.start-area-heading .driver-label{margin:0}
#mapStart{padding:6px 11px;background:#f1b5c5;color:#202737;border:1px solid #f1b5c5;font:700 11px Arial,sans-serif;white-space:nowrap}
.console .drive-utilities #mapDrive{position:relative;display:flex!important;flex-direction:column;gap:2px;flex:0 0 50px;width:50px;min-width:50px;height:46px;min-height:46px;padding:3px;background:#f1b5c5;color:#202737;border:1px solid #f9d4df;border-radius:4px;box-shadow:0 2px 0 #7c586f;font:800 9px/1 Arial,sans-serif;letter-spacing:1px}
#mapDrive .cape-map-icon{width:25px;height:24px}
.cape-map-run-strip{display:grid;grid-template-columns:auto repeat(3,minmax(0,1fr));align-items:stretch;gap:8px;margin:0 0 14px}
.cape-map-live-label{display:flex;align-items:center;gap:7px;padding-right:12px;font:10px monospace;letter-spacing:1px;color:#9ce9dd}
.cape-map-live-label i{height:7px;width:7px;flex:0 0 7px;background:#9ce9dd;border-radius:50%;box-shadow:0 0 0 4px #9ce9dd18}
.cape-map-run-card{display:flex;align-items:center;text-align:left;gap:10px;min-height:64px;padding:7px 10px;color:#fff1cf;background:#202f3c;border:1px solid #55706e}
.cape-map-run-card:hover,.cape-map-run-card[aria-pressed=true]{border-color:#f1b5c5;background:#303444}
.cape-map-run-card>span:nth-child(2){flex:1;min-width:0}
.cape-map-run-card strong{display:block;font-size:12px;line-height:1.35}
.cape-map-run-card small{display:block;color:#9ce9dd;font:11px/1.4 Arial,sans-serif;margin-top:3px}
.cape-map-run-logo{display:grid;place-items:center;flex:0 0 54px;width:54px;height:44px;background:#fff8ea;border-radius:3px}
.cape-map-run-logo.light-logo{background:#132c38}
.cape-map-run-logo img{display:block;max-width:50px;max-height:38px;object-fit:contain}
.map-activity-marker[data-run-id]{pointer-events:auto;cursor:pointer}
.map-activity-marker[data-run-id]:hover>g>rect,.map-activity-marker[data-run-id]:focus-visible>g>rect{stroke:#9ce9dd;stroke-width:5}
.map-activity-marker[data-run-id]:focus-visible{outline:none}
@media(max-width:950px){.cape-map-run-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.cape-map-live-label{grid-column:1/-1;padding:0 0 2px}.cape-map-run-card{gap:7px;padding:6px}.cape-map-run-card strong{font-size:11px}}
@media(max-width:600px){.cape-map-run-strip{grid-template-columns:1fr}.cape-map-run-card{min-height:52px}.cape-map-run-logo{height:38px}.cape-map-run-card>span:nth-child(2){display:flex;align-items:center;justify-content:space-between;gap:10px}.cape-map-run-card small{text-align:right;max-width:44%;margin:0}.cape-map-svg{min-height:300px}.cape-map-run-card strong{font-size:12px}}
@media(orientation:landscape) and (max-height:540px){.cape-map-run-strip{margin-bottom:9px;gap:6px}.cape-map-live-label{font-size:9px}.cape-map-run-card{min-height:48px}.cape-map-run-logo{height:34px;flex-basis:44px;width:44px}.cape-map-run-logo img{max-width:40px;max-height:30px}.cape-map-run-card small{font-size:10px}}

/* v55: shorter laptop map, without shrinking touch targets. */
@media(min-width:901px) and (max-height:850px){
 .cape-route-map{padding:10px}.cape-map-header{padding:0 0 8px}.cape-map-kicker{display:none}.cape-map-header h2{font-size:25px;margin:0}
 .cape-map-toolbar{padding:8px 0}.cape-map-toolbar button{padding:6px 10px;min-height:40px}.cape-map-run-strip{margin-bottom:8px}.cape-map-run-card{min-height:48px;padding:5px 9px}
 .cape-map-layers{padding:6px 0}.cape-map-layers p{margin:3px 0}.cape-map-location{padding:7px 10px}.cape-map-legend{padding:7px 10px;gap:5px 12px}
 .cape-map-svg{min-height:220px;max-height:calc(100dvh - 285px)}
 .cape-map-sidebar{padding:12px;position:sticky;top:10px}.cape-map-destination{padding:12px 0}.cape-map-destination h3{font-size:23px;margin:6px 0}.cape-map-destination p{font-size:12px;line-height:1.4}
 #capeMapStatus{margin:9px 0;min-height:0}.cape-map-roads{padding-top:9px}.cape-map-connection{padding:7px 0;min-height:44px}.cape-map-footnote{margin-top:10px}
}
