/* Scroll map — newest episodes at the start, then the road splits. */

.map-runway {
  position: relative;
  z-index: 1;
  background: #fff;
  color: #111;
}

.map-stage {
  position: sticky;
  top: 62px;
  height: calc(100svh - 62px);
  overflow: hidden;
  background: #fff;
}

.map-runway.is-static {
  height: auto !important;
}

.map-runway.is-static .map-stage {
  position: relative;
  top: auto;
  height: auto;
  overflow: visible;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-focus {
  position: absolute;
  z-index: 5;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.map-runway.is-static .map-viewport {
  position: relative;
  overflow: visible;
}

.map-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  background-color: transparent;
  will-change: transform;
}

.map-runway.is-static .map-world {
  position: relative;
  will-change: auto;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.map-svg .contours {
  fill: none;
  stroke: #111;
  stroke-opacity: 0.05;
  stroke-width: 1;
}

.map-svg .lane,
.map-svg .fork {
  fill: none;
  stroke: #6f6f69;
  stroke-width: 2.75;
  stroke-linecap: round;
}

.map-svg .route-all {
  fill: none;
  stroke: #111;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-svg .route-walk {
  fill: none;
  stroke: #111;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.now-mark {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.now-mark i {
  width: 14px;
  height: 14px;
  border: 2px solid #111;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px #fff;
}

.now-mark span {
  margin-top: 0.45rem;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.8;
  text-transform: uppercase;
}

.lane-name {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.8;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.lane-name:hover {
  opacity: 0.55;
}

.pin {
  position: absolute;
  z-index: 3;
  width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, calc(-100% + 10px));
  color: inherit;
  text-decoration: none;
}

.pin-card {
  width: 100%;
  background: #e7e7e2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease;
}

.pin img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #deded8;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.45s ease;
}

.pin-node {
  width: 14px;
  height: 14px;
  margin-top: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 1.5px #111;
}

.pin.is-terminal .pin-node { visibility: hidden; }

.pin.is-past {
  opacity: 0.42;
}

.pin.is-ahead {
  opacity: 0.72;
}

.pin.is-here,
.pin.is-next {
  z-index: 4;
  opacity: 1;
}

.pin.is-here img,
.pin.is-next img {
  filter: none;
}

.pin.is-here .pin-card {
  transform: translateY(-10px) scale(1.06);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
}

.pin.is-next .pin-card {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.pin:focus-visible .pin-card {
  outline: 2px solid #111;
  outline-offset: 3px;
}

.episode-note {
  position: absolute;
  z-index: 5;
  width: 16rem;
  margin: 0;
  color: #111;
  font-size: 1.08rem;
  line-height: 1.45;
  pointer-events: none;
}

.map-focus {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .pin.is-here .pin-card {
    transform: none;
  }
  .episode-note {
    padding: 0;
    color: #111;
    background: transparent;
    font-size: 0.98rem;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-card,
  .pin img {
    transition: none;
  }
}
