.map-journey {
  container-type: inline-size;
  min-width: 0;
  padding: clamp(12px, 2.4vw, 22px);
  border: 1px solid #6d9da977;
  border-radius: 9px;
  color: #fff;
}

.map-dialog .map-journey {
  background: var(--ink);
}

.map-journey h3 {
  margin: 0 0 16px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.22;
}

.map-journey-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 15px;
}

.map-journey-grid > div {
  min-width: 0;
}

.map-journey .map-journey-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 7px;
  color: #fff;
  font-size: 13px;
}

.map-journey-label span,
.map-journey-points small,
.map-journey .map-journey-ferry,
.map-journey .map-journey-credit {
  color: #d5e9ed;
  font-size: 12px;
}

.map-journey-grid img,
.triangle-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.triangle-map {
  background: #0b4451;
}

.triangle-coast {
  fill: #a5c9c7;
  stroke: #d2e7e4;
  stroke-width: .85;
  stroke-linejoin: round;
  transition: fill 180ms ease;
}

.triangle-map.is-interactive [data-ferry-island] {
  cursor: pointer;
}

.triangle-map [aria-pressed="true"] .triangle-coast,
.triangle-map [data-ferry-island]:focus-visible .triangle-coast {
  fill: #e1eeec;
  stroke: #fff;
  stroke-width: 1.5;
}

.triangle-map [data-ferry-island]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.triangle-island-name,
.triangle-port-name {
  fill: #fff;
  font: 700 14px var(--body);
  paint-order: stroke;
  stroke: #0b4451;
  stroke-linejoin: round;
  stroke-width: 3px;
  user-select: none;
}

.triangle-port-name {
  font-size: 12px;
  font-weight: 600;
}

.triangle-details {
  pointer-events: none;
}

.triangle-route,
.triangle-port-leader {
  fill: none;
  stroke: #ff9599;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.triangle-route {
  stroke-dasharray: 3 4;
}

.triangle-route.is-active {
  stroke: #ff777b;
  stroke-dasharray: none;
  stroke-width: 2.4;
}

.triangle-port-leader {
  stroke: #bdd7da;
  stroke-width: .75;
}

.triangle-port,
.triangle-vessel circle {
  fill: #fff;
  stroke: #c62b36;
  stroke-width: 1.4;
}

.triangle-vessel[hidden] {
  display: none;
}

.triangle-vessel path {
  fill: #0b4451;
}

.map-journey-points {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.map-journey-points li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.3;
}

.map-journey-points li > span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: #c62b36;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.map-journey-points small {
  display: block;
  margin-top: 2px;
}

.map-journey .map-journey-ferry {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
}

.map-journey-ferry::before {
  content: "";
  width: 19px;
  flex: 0 0 19px;
  border-top: 2px dashed #ff777b;
}

.map-journey .map-journey-credit {
  margin: 14px 0 0;
  font-size: 11px;
}

.map-journey .map-journey-instructions {
  margin: 4px 0 0;
  color: #d5e9ed;
  font-size: 12px;
}

.map-journey-credit a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-journey-open {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 2px 0 0 auto;
  padding: 0 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font: 700 12px var(--body);
  cursor: pointer;
}

.map-journey-open:hover {
  background: #ffffff17;
}

.map-journey-open .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 760px), (pointer: coarse) {
  .map-journey-open {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .triangle-coast {
    transition: none;
  }
}

@container (max-width: 500px) {
  .map-journey-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .map-dialog-heading {
    gap: 12px;
  }
}
