.voyage-map {
  max-width: 1180px;
  margin: 0 auto;
}

.voyage-paper {
  position: relative;
  min-height: 510px;
  overflow: visible;
  border: 1px solid rgba(76, 81, 91, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 250, 0.96)),
    repeating-linear-gradient(0deg, rgba(227, 229, 235, 0.34) 0 1px, transparent 1px 34px);
  box-shadow: 0 32px 70px -46px rgba(64, 147, 109, 0.48), 0 18px 44px rgba(76, 81, 91, 0.14);
}

.journey-route {
  position: absolute;
  inset: 44px 34px 70px;
  width: calc(100% - 68px);
  height: calc(100% - 114px);
  overflow: visible;
  pointer-events: none;
}

.journey-route-shadow,
.journey-route-main,
.journey-route-thread {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.journey-route-shadow {
  stroke: rgba(22, 23, 26, 0.1);
  stroke-width: 12;
}

.journey-route-thread {
  stroke: rgba(132, 181, 212, 0.75);
  stroke-width: 2;
  stroke-dasharray: 10 14;
}

.journey-route-main {
  stroke: #40936d;
  stroke-width: 4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: route-draw 1.15s cubic-bezier(0.22, 0.61, 0.36, 1) 0.18s forwards;
}

.journey-nodes {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-node {
  --node-color: #40936d;
  position: absolute;
  left: calc(var(--x) - 35px);
  top: calc(var(--y) - 35px);
  z-index: 2;
  width: 70px;
  height: 70px;
}

.journey-dot {
  position: relative;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.journey-dot::before,
.journey-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.journey-dot::before {
  border: 2px solid var(--node-color);
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.88), 0 8px 18px rgba(0, 0, 0, 0.14);
}

.journey-dot::after {
  inset: 13px;
  background: var(--node-color);
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.12);
}

.journey-dot span {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}

.journey-node:hover,
.journey-node:focus-within,
.journey-node.is-active {
  z-index: 8;
}

.journey-node:hover .journey-dot::before,
.journey-node:focus-within .journey-dot::before,
.journey-node.is-active .journey-dot::before {
  transform: scale(1.08);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.95), 0 16px 34px -18px var(--node-color);
}

.journey-node:hover .journey-dot::after,
.journey-node:focus-within .journey-dot::after,
.journey-node.is-active .journey-dot::after {
  transform: scale(0.92);
}

.journey-dot:focus-visible {
  outline: 3px solid rgba(64, 147, 109, 0.32);
  outline-offset: 8px;
}

.journey-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.7rem);
  min-width: 145px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: auto;
}

.journey-node--1 .journey-label,
.journey-node--3 .journey-label,
.journey-node--5 .journey-label {
  top: auto;
  bottom: calc(100% + 0.7rem);
}

.journey-week {
  display: block;
  color: var(--node-color);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-phase {
  display: block;
  margin-top: 0.08rem;
  color: #16171a;
  font-size: 0.9rem;
  font-weight: 800;
}

.journey-pop {
  position: fixed;
  left: var(--pop-left, 50vw);
  top: var(--pop-top, 50vh);
  z-index: 45;
  width: min(285px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.journey-node:focus-within .journey-pop,
.journey-node.is-active .journey-pop {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.journey-pop-inner {
  position: relative;
  padding: 1rem;
  border: 1px solid rgba(76, 81, 91, 0.14);
  border-left: 4px solid var(--node-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 44px -28px rgba(22, 23, 26, 0.42), 0 8px 20px rgba(76, 81, 91, 0.1);
}

.journey-pop-inner::before {
  content: "";
  position: absolute;
  left: var(--pop-arrow-left, 1.2rem);
  width: 14px;
  height: 14px;
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}

.journey-pop[data-side="top"] .journey-pop-inner::before {
  bottom: -7px;
  border-right: 1px solid rgba(76, 81, 91, 0.14);
  border-bottom: 1px solid rgba(76, 81, 91, 0.14);
}

.journey-pop[data-side="bottom"] .journey-pop-inner::before {
  top: -7px;
  border-left: 1px solid rgba(76, 81, 91, 0.14);
  border-top: 1px solid rgba(76, 81, 91, 0.14);
}

.journey-pop h3 {
  margin: 0 0 0.35rem;
  color: #16171a;
  font-size: 1rem;
  font-weight: 800;
}

.journey-pop p {
  margin: 0;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.5;
}

.journey-skill {
  display: inline-flex;
  margin-top: 0.85rem;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--node-color) 13%, white);
  color: var(--node-color);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

@keyframes route-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 760px) {
  .voyage-paper {
    min-height: 0;
    padding: 1rem;
    overflow: hidden;
  }

  .journey-route {
    display: none;
  }

  .journey-nodes {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .journey-nodes::before {
    content: "";
    position: absolute;
    top: 1.8rem;
    bottom: 1.8rem;
    left: 43px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #40936d, #84b5d4, #ffbe3e, #eb816f);
    opacity: 0.35;
  }

  .journey-node {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    padding: 0.85rem;
    border: 1px solid rgba(76, 81, 91, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
    column-gap: 0.85rem;
  }

  .journey-node.is-active {
    border-color: color-mix(in srgb, var(--node-color) 34%, white);
    box-shadow: 0 18px 34px -28px var(--node-color), 0 8px 18px rgba(0, 0, 0, 0.14);
  }

  .journey-dot {
    grid-row: 1 / span 2;
    width: 56px;
    height: 56px;
  }

  .journey-dot::after {
    inset: 11px;
  }

  .journey-dot span {
    width: 34px;
    height: 34px;
    font-size: 0.86rem;
  }

  .journey-label,
  .journey-node--1 .journey-label,
  .journey-node--3 .journey-label,
  .journey-node--5 .journey-label {
    position: static;
    min-width: 0;
    padding-top: 0.2rem;
    transform: none;
    text-align: left;
    align-self: center;
  }

  .journey-phase {
    font-size: 1rem;
  }

  .journey-pop {
    position: static;
    grid-column: 2;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease, margin-top 0.22s ease;
  }

  .journey-node.is-active .journey-pop {
    grid-template-rows: 1fr;
    margin-top: 0.55rem;
  }

  .journey-pop-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .journey-pop-inner::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-route-main {
    animation: none;
    stroke-dashoffset: 0;
  }

  .journey-dot::before,
  .journey-dot::after,
  .journey-pop {
    transition: none !important;
  }
}
