.station-map {
  --map-observed: #4e9768;
  --map-delayed: #eab64c;
  --map-disrupted: #df675b;
  --map-unknown: #a9b2ab;
  position: relative;
  width: 100%;
  height: 510px;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 10%, #f9faf4 0%, transparent 65%), #eef1e8;
  isolation: isolate;
}
.station-map::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, rgb(255 255 255 / .2), transparent 25%, transparent 83%, rgb(249 250 247 / .5));
}
.station-map__geography,
.station-map__markers { position: absolute; inset: 0; width: 100%; height: 100%; }
.station-map__markers { z-index: 2; pointer-events: none; }
.station-map__lake { fill: #dceff1; }
.station-map__shore { fill: none; stroke: #c8dedc; stroke-width: 1.5; }
.station-map__grid { stroke: #c2cbbc; stroke-width: .6; opacity: .18; }
.station-map__place { font: 500 0.875rem/1 system-ui, sans-serif; letter-spacing: 1.5px; fill: #9da99a; }
.station-map__lake-name { font: italic 0.875rem/1 Georgia, serif; letter-spacing: .7px; fill: #87b1b4; }
.station-map__marker {
  --marker-color: var(--map-unknown);
  position: absolute;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease;
  touch-action: manipulation;
}
.station-map__marker--observed { --marker-color: var(--map-observed); }
.station-map__marker--delayed { --marker-color: var(--map-delayed); }
.station-map__marker--disrupted { --marker-color: var(--map-disrupted); }
.station-map__dot {
  display: block;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--marker-color);
  box-shadow: 0 1px 3px rgb(20 45 30 / .14);
  transition: transform 160ms ease;
}
.station-map__marker--labelled { z-index: 2; }
.station-map__marker--labelled .station-map__dot { width: 13px; height: 13px; }
.station-map__code {
  position: absolute;
  left: 50%;
  top: 25px;
  min-width: 29px;
  box-sizing: border-box;
  padding: 3px 6px;
  border: 1px solid rgb(31 57 39 / .07);
  border-radius: 12px;
  background: rgb(255 255 255 / .96);
  color: #455148;
  box-shadow: 0 2px 3px rgb(23 48 33 / .14), 0 0 0 2px rgb(255 255 255 / .36);
  font: 650 0.875rem/1 system-ui, sans-serif;
  letter-spacing: .2px;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease;
  pointer-events: none;
}
.station-map__marker--labelled .station-map__code,
.station-map__marker:hover .station-map__code,
.station-map__marker:focus-visible .station-map__code { opacity: 1; visibility: visible; }
.station-map__marker:hover,
.station-map__marker:focus-visible,
.station-map__marker--selected { z-index: 5; background: rgb(255 255 255 / .4); box-shadow: 0 0 0 3px rgb(255 255 255 / .65); outline: none; }
.station-map__marker:hover .station-map__dot,
.station-map__marker:focus-visible .station-map__dot { transform: scale(1.25); }
.station-map__marker--selected .station-map__dot { box-shadow: 0 0 0 3px #173e30, 0 0 0 5px #fff; }
.station-map__marker--selected .station-map__code { color: #173e30; }
.station-map__caption {
  position: absolute;
  left: 32px;
  bottom: 25px;
  z-index: 3;
  margin: 0;
  color: #7d8d7f;
  font: 500 0.875rem/1.5 system-ui, sans-serif;
  letter-spacing: .15px;
  pointer-events: none;
}
.station-map__legend {
  position: absolute;
  right: 32px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  padding: 7px 11px;
  border: 1px solid rgb(255 255 255 / .6);
  border-radius: 20px;
  background: rgb(255 255 255 / .72);
  backdrop-filter: blur(8px);
  color: #68776a;
  font: 500 0.875rem/1 system-ui, sans-serif;
}
.station-map__legend-item { display: inline-flex; align-items: center; gap: 4px; }
.station-map__legend-item i { width: 6px; height: 6px; border-radius: 50%; background: var(--map-unknown); }
.station-map__legend-item--observed i { background: var(--map-observed); }
.station-map__legend-item--delayed i { background: var(--map-delayed); }
.station-map__legend-item--disrupted i { background: var(--map-disrupted); }
@media (max-width: 767px) {
  .station-map { height: 422px; }
  .station-map__caption { display: none; }
  .station-map__legend { bottom: 21px; right: 14px; gap: 9px; font-size:0.875rem; }
  .station-map__place { font-size:0.875rem; letter-spacing: .8px; }
  .station-map__lake-name { font-size:0.875rem; }
  .station-map__code { font-size:0.875rem; padding: 3px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .station-map__marker, .station-map__dot, .station-map__code { transition: none; }
}

/* Real Apple Maps surface; its logo and legal attribution stay visible. */
.station-map--apple { position: absolute; inset: 0; width: 100%; height: 100%; }
.station-map--apple::after { display: none; }
.station-map__apple-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.station-map--apple .station-map__legend { bottom: 45px; pointer-events: none; }
.station-map__apple-pin { --marker-color: #a9b2ab; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; width: 42px; height: 43px; padding: 3px 0; border: 0; background: transparent; cursor: pointer; }
.station-map__apple-pin--observed { --marker-color: #4e9768; }
.station-map__apple-pin--delayed { --marker-color: #eab64c; }
.station-map__apple-pin--disrupted { --marker-color: #df675b; }
.station-map__apple-pin .station-map__dot { width: 13px; height: 13px; flex-shrink: 0; }
.station-map__apple-code { display: block; border-radius: 14px; padding: 3px 7px; background: #fffffff5; color: #455148; box-shadow: 0 2px 4px #0003; font: 650 0.875rem/1 system-ui,sans-serif; white-space: nowrap; }
.station-map__apple-pin:hover .station-map__apple-code,.station-map__apple-pin:focus-visible .station-map__apple-code,.station-map__apple-pin.is-selected .station-map__apple-code { color: #173e30; box-shadow: 0 0 0 2px #173e30,0 2px 4px #0003; }
.station-map--apple .mk-zoom-controls { margin-top: 80px; }

.station-detail-page #detail-map { position: relative; overflow: hidden; }
.station-detail-page #detail-map > .station-map { height: 100%; }
.station-detail-page #detail-map .station-map--apple .mk-zoom-controls { margin-top: 0; }

/* Readable station markers and map legend. */
.station-map__legend { font-size: .875rem; line-height: 1.4; color: #394b3c; background: #fffffff2; max-width: calc(100% - 2rem); }
.station-map__apple-pin { width: 44px; height: 52px; }
.station-map__apple-code, .station-map__code { font-size: .875rem; }
.station-map__marker { width: 44px; height: 44px; }
.station-map__marker:focus-visible { outline: 3px solid #173e30; outline-offset: 2px; }
