/* Compact floating controls leave the route, not a tall toolbar, in focus. */
#peta .map-card-modern { position: relative; overflow: hidden; border-radius: 22px; }
#peta .map-topbar { position: absolute; z-index: 600; top: 14px; left: 14px; right: 14px; max-width: 620px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; pointer-events: none; }
#peta .map-topbar__info { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; box-sizing: border-box; border: 1px solid #e2e7ed; border-radius: 24px; background: #ffffffed; box-shadow: 0 3px 16px #17385112; }
#peta .map-status-dot { width: 7px; height: 7px; flex: 0 0 7px; }
#peta .map-topbar__titles { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 6px; }
#peta .map-topbar__route { font-size: 14px; line-height: 1.4; white-space: nowrap; color: #173851; }
#peta .map-topbar__meta { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 11px; line-height: 1.4; white-space: nowrap; padding: 4px 8px; border-radius: 20px; background: #f8eae7; color: #9c3020; }
#peta .map-topbar__actions { width: 100%; pointer-events: auto; }
#peta .map-card-modern:has(.smr-interactive-map:not([data-map-ready="true"])) .map-topbar { position: relative; inset: auto; max-width: none; width: 100%; padding: 12px; box-sizing: border-box; }
#peta .map-container { overflow: visible; box-shadow: none; }
#smr-corridor-map { display: block; min-height: 0; background: #f0f3ec; }
#smr-corridor-map picture { display: block; }
#smr-corridor-map img { display: block; width: 100%; height: auto; min-height: 0; object-fit: contain; }
#peta .smr-map-caption { position: static; display: block; margin: 0; padding: 10px 16px; color: #4b626b; background: #f0f3ec; border-radius: 0; text-align: center; font-size: 13px; }
#peta .map-legend-modern { position: static; transform: none; width: auto; max-width: none; margin: 0; padding: 14px 18px; border-radius: 0; background: #fff; border-top: 1px solid #e3e9e9; box-shadow: none; }
#peta .legend-items { flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.smr-interactive-map [hidden],.smr-map-tools[hidden],.smr-map-point[hidden] { display: none !important; }
#smr-geographic-map { height: 540px; width: 100%; min-height: 360px; background: #edf1ec; z-index: 1; isolation: isolate; font-family: inherit; }
#smr-geographic-map:focus-visible { outline: 3px solid #b33820; outline-offset: -3px; }
#peta .smr-map-tools { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px; width: 100%; }
#peta .smr-map-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 7px 12px; font: 600 12px/1.3 var(--font-secondary,sans-serif); white-space: nowrap; background: #ffffffed; border: 1px solid #e2e7ed; border-radius: 22px; color: #32465b; box-shadow: 0 2px 10px #1738510d; }
#peta .smr-map-tools button svg { flex: 0 0 auto; }
#peta .smr-map-tools .smr-map-reset { flex: 0 0 36px; width: 36px; padding: 7px; }
#peta .smr-map-tools button { cursor: pointer; }
#peta .smr-map-tools button.is-active { background: #b33820; border-color: #b33820; color: #fff; }
#peta .smr-map-tools button:hover { border-color: #b33820; }
#peta .smr-map-tools button:focus-visible,.smr-map-point:focus-visible { outline: 3px solid #173851; outline-offset: 3px; }
.smr-map-help { margin: 0; padding: 12px 18px; background: #f3f6f7; color: #40586a; font-size: 13px; line-height: 1.6; }
.smr-map-points { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 18px 16px; background: #f3f6f7; }
.smr-map-point { min-height: 44px; border: 1px solid #d7dff0; border-radius: 8px; background: #fff; color: #1a237e; padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.smr-map-point.rest { color: #006a60; border-color: #afd3cc; }
#smr-geographic-map .smr-map-marker { display: grid; place-items: center; background: #fff; border: 3px solid #1a237e; border-radius: 50%; color: #1a237e; font: 700 10px/1 Arial,sans-serif; box-shadow: 0 1px 5px #152d4a55; }
#smr-geographic-map .smr-map-marker.rest { color: #006a60; border-color: #00897b; }
#smr-geographic-map .smr-map-marker.boundary { color: #35495d; border-color: #6b7f8f; }
#smr-geographic-map .smr-map-label { color: #1a237e; border: 1px solid #b8bdd6; border-radius: 16px; padding: 3px 8px; font: 700 12px/1.35 Arial,sans-serif; box-shadow: 0 2px 6px #1a237e18; }
#smr-geographic-map .smr-map-label.rest { color: #006a60; border-color: #9fcfc7; }
#smr-geographic-map .smr-map-label.boundary { color: #35495d; }
#smr-geographic-map .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 25px !important; }
#smr-geographic-map .leaflet-control-zoom { margin: 14px !important; }
#smr-geographic-map .leaflet-bottom.leaflet-right { bottom: 0 !important; right: 0 !important; }
#smr-geographic-map .leaflet-control-attribution { max-width: 100%; margin: 0; padding: 3px 7px; font: 11px/1.5 Arial,sans-serif; color: #253c4d; }
#smr-geographic-map .leaflet-control-attribution a { color: #174664; text-decoration: underline; }
#smr-geographic-map .smr-map-popup { font: 14px/1.6 Arial,sans-serif; color: #173851; }
#smr-geographic-map .leaflet-popup-content-wrapper { min-width: 0 !important; padding: 1px !important; }
#smr-geographic-map .leaflet-popup-content { width: 220px !important; min-width: 0 !important; max-width: calc(100vw - 118px) !important; white-space: normal; overflow-wrap: anywhere; }
#smr-geographic-map .smr-map-popup strong { display: block; font-size: 16px; }
#smr-geographic-map .smr-map-popup p { margin: 8px 0; }
#smr-geographic-map .smr-map-popup a { display: inline-block; padding: 8px 0; color: #8f2818; text-decoration: underline; }
@media (max-width: 700px) {
  #peta .map-topbar { top: 10px; left: 10px; right: 10px; max-width: none; }
  #peta .map-topbar__info { padding: 9px 10px; }
  #peta .map-topbar__route { font-size: 12px; }
  #peta .map-legend-modern { padding: 12px; }
  #peta .legend-items { gap: 10px 16px; }
  #smr-geographic-map { height: 460px; }
  #peta .smr-map-tools { gap: 5px; }
  #peta .smr-map-tools button { padding: 7px 8px; font-size: 11px; }
  .smr-map-help { padding: 12px; }
  .smr-map-points { padding: 0 12px 12px; gap: 6px; }
  .smr-map-point { font-size: 12px; padding: 8px 10px; }
  #smr-geographic-map .smr-map-label { font-size: 11px; }
}
@media(max-width:360px){#peta .map-topbar__meta{font-size:10px;padding:3px 6px}#peta .map-topbar__route{font-size:11px}#peta .smr-map-tools button{padding:7px 6px;gap:4px}#peta .smr-map-tools button svg{width:13px;height:13px}}
html[data-theme="dark"] #peta .map-topbar__info,html[data-theme="dark"] #peta .smr-map-tools button:not(.is-active){background:#142233ed;color:#e8eef6;border-color:#44566a}
html[data-theme="dark"] #peta .map-topbar__route{color:#e8eef6}
html[data-theme="dark"] #peta .map-topbar__meta{color:#ffb29f;background:#4b2b27}
