/* The illustrated route and its four project tickets share the site's paper palette. */
.route-game {
  --route-card: #fffdf5;
  --route-accent: #ac402d;
  background: var(--route-card);
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.route-topline,
.route-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 16px clamp(14px, 3vw, 28px);
}

.route-topline {
  border-bottom: 1px solid var(--ink);
}

[data-route-progress] {
  font-weight: 750;
}

[data-route-reset] {
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}

[data-route-reset]:hover {
  background: var(--play-purple);
}

.route-board {
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.route-board .route-art,
.route-board .route-lines {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.route-board .route-art {
  object-fit: cover;
}

.route-lines {
  pointer-events: none;
}

.route-lines [data-route-segment] {
  fill: none;
  stroke: #60594a;
  stroke-width: 2;
  stroke-dasharray: 4 7;
  stroke-linecap: round;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  transition: opacity .3s ease, stroke .3s ease;
}

.route-lines [data-route-segment].route-lit {
  stroke: #fff1b9;
  stroke-width: 2.5;
  stroke-dasharray: 2 5;
  opacity: 1;
}

.route-marker {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(26px, 4vw, 43px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--route-card);
  color: var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font: 800 clamp(11px, 1.45vw, 17px)/1 var(--play-display);
  transition: background .25s ease, color .25s ease;
}

.route-marker.route-next {
  background: var(--play-lime);
  box-shadow: 2px 3px 0 var(--ink), 0 0 0 5px rgb(255 253 245 / 85%);
}

.route-marker.route-visited {
  background: var(--route-accent);
  color: #fff;
}

.route-stops {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: clamp(14px, 3vw, 28px);
}

.route-stop {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 114px;
  padding: 13px 14px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 3px 0 var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.route-stop:nth-child(1) { --ticket: var(--play-peach); }
.route-stop:nth-child(2) { --ticket: var(--play-lime); }
.route-stop:nth-child(3) { --ticket: #f4ddaa; }
.route-stop:nth-child(4) { --ticket: var(--play-purple); }

.route-stop small {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.route-stop strong {
  font: 800 clamp(16px, 2vw, 22px)/1.4 var(--play-display);
}

.route-stop > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.route-stop.route-next {
  background: var(--ticket, var(--play-lime));
  box-shadow: 3px 4px 0 var(--ink);
}

.route-stop.route-visited::after {
  position: absolute;
  top: 10px;
  right: 10px;
  content: '✓' / '';
  color: var(--route-accent);
  font-weight: 800;
}

@media (hover: hover) and (pointer: fine) {
  .route-stop:hover {
    background: var(--ticket, var(--play-lime));
    transform: translateY(-3px);
    box-shadow: 3px 6px 0 var(--ink);
  }
}

.route-result {
  background: var(--paper);
  border-top: 1px dashed var(--line);
}

.route-result [data-route-feedback] {
  flex: 1 1 280px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.route-result [data-route-link][hidden] {
  display: none;
}

@media (max-width: 740px) {
  .route-stops {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .route-stops {
    grid-template-columns: 1fr;
  }

  .route-stop {
    min-height: 80px;
  }

  .route-result [data-route-link] {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-game *,
  .route-game *::before,
  .route-game *::after {
    animation: none !important;
    transition: none !important;
  }

  .route-stop:hover {
    transform: none;
  }
}
.play-hero-art:has(.world-collage)::before { display: none; }

.hero-collage.world-collage {
  width: 100%;
  height: auto;
  border: 1px solid #a3967b;
  border-radius: 47% 44% 7% 5% / 9% 8% 5% 4%;
  box-shadow: 0 13px 32px #51402c26;
}

.passport-stamps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stamp-slot[data-stamp-slot='spirit'].earned .stamp-art {
  background: #f4c59b;
  color: #73381e;
}

@media (max-width: 740px) {
  .passport-stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-hero-art:has(.world-collage) { min-height: 280px; }
}

.stamp-art svg { width: 83%; height: 83%; }

.journey-return-link:not([hidden]) {
  position: fixed;
  inset: auto auto max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  z-index: 42;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 13px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff9e9;
  color: var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.journey-return-link:hover { background: var(--play-lime); }

@media (max-width: 390px) {
  .journey-return-link:not([hidden]) { inset-inline-start: 9px; font-size: 11px; padding-inline: 8px; }
}
