/* Field-guide layer: deliberately small, tactile progress cues - not a dashboard. */
.scene-media > img,
.scene-media > video { z-index: 1; }
.scene-media > video { z-index: 2; }
.scene-media > .scene-fallback { z-index: 0; }
.scene-media [hidden],
.map-car[hidden] { display: none !important; }

.route-leg {
  fill: none;
  stroke: #f16e58;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-dasharray: 1.45 2.1;
  opacity: 0;
  transition: opacity .32s ease;
}
.route-leg.is-traveled { opacity: .96; }

.map-pin { min-width: 44px; min-height: 44px; }
.map-pin b { position: relative; overflow: visible; }
.map-pin b em { font-style: normal; line-height: 1; }
.map-pin b strong {
  position: absolute;
  right: -5px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #fff7e7;
  font: 800 .55rem/1 var(--sans, sans-serif);
}
.map-pin.is-mystery b {
  color: #fff6dc;
  background: #155d5d;
  border: 2px dashed #fff6dc;
  box-shadow: 0 5px 0 rgba(8, 48, 47, .22);
  transform: rotate(-5deg);
}
.map-pin.is-mystery:nth-child(even) b { transform: rotate(5deg); }
.map-pin.is-mystery b strong { color: #155d5d; }
.map-pin.is-mystery span { display: none; }
.map-pin.is-visited b {
  color: #143f40;
  background: #ffd561;
  border-color: #143f40;
  box-shadow: 0 3px 0 rgba(20, 63, 64, .2);
}
.map-pin.is-visited b strong { color: #143f40; }
.map-pin.is-visited span { font-weight: 750; }


.stamp-tray {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  max-width: 31rem;
  min-height: 2.6rem;
  margin: .75rem auto 0;
}
.stamp-tray:empty { display: none; }
.stamp-tray .tiny {
  margin: 0 .15rem 0 0;
  color: #756547;
  font: 800 .63rem/1 var(--sans, sans-serif);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.stamp {
  display: inline-flex;
  align-items: center;
  gap: .33rem;
  padding: .34rem .5rem .3rem;
  color: #174b4b;
  border: 1px dashed #174b4b;
  border-radius: 999px 82% 90% 82%;
  background: #fff8e8;
  box-shadow: 2px 3px 0 rgba(20, 63, 64, .12);
  cursor: pointer;
  font: 800 .66rem/1 var(--sans, sans-serif);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stamp:hover,
.stamp:focus-visible { transform: translateY(-2px) rotate(-2deg); box-shadow: 3px 5px 0 rgba(20, 63, 64, .15); }
.stamp:nth-of-type(3n) { transform: rotate(2deg); }
.stamp:nth-of-type(2n) { background: #f7d96c; }
.stamp span { font-size: .9rem; }
.stamp b { font: inherit; }

#complete-stops {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .7rem;
  max-width: 35rem;
  margin: 1.35rem auto;
}
#complete-stops .stamp {
  min-height: 4rem;
  padding: .7rem .8rem;
  border-radius: 48% 52% 46% 54%;
  background: #fff7e4;
  flex-direction: column;
  justify-content: center;
  min-width: 4.5rem;
}
#complete-stops .stamp:nth-child(2n) { background: #f8d86a; transform: rotate(3deg); }
#complete-stops .stamp:nth-child(3n) { background: #c8e0bd; transform: rotate(-4deg); }
#complete-stops .stamp span { font-size: 1.35rem; }

@media (max-width: 620px) {
  .stamp-tray { margin-inline: .3rem; }
  .stamp-tray .tiny { flex-basis: 100%; }
  .stamp { font-size: .61rem; }
  #complete-stops { gap: .42rem; }
  #complete-stops .stamp { min-width: 4rem; min-height: 3.7rem; padding: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .route-leg,
  .stamp { transition: none; }
}

.scene-credit { margin: .8rem 0 0; color: rgba(255, 249, 233, .55); font-size: .7rem; line-height: 1.35; }

/* Souvenir postage stamps on the "our whole day" card. The dotted border is painted in the
   card's own cream over the stamp paper, which reads as perforated edges. */
#complete-stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem .8rem; margin: 1.6rem 0 .6rem; }
.postage {
  position: relative;
  display: grid;
  gap: .3rem;
  padding: .55rem .55rem .6rem;
  border: 7px dotted #fff9e9;
  background: #f1dfa9;
  color: #16454a;
  cursor: pointer;
  font: 700 .72rem/1.15 Inika, serif;
  text-align: left;
  transform: rotate(var(--stamp-tilt, -2deg));
  filter: drop-shadow(2px 4px 3px rgba(22, 69, 74, .22));
  transition: transform .18s ease;
}
.postage:nth-child(2n) { --stamp-tilt: 2.5deg; background: #f6c9b5; }
.postage:nth-child(3n) { --stamp-tilt: -1deg; background: #c8e0bd; }
.postage:nth-child(4n) { background: #bfe0e0; }
.postage:hover, .postage:focus-visible { transform: rotate(0deg) scale(1.04); }
.postage:focus-visible { outline: 3px solid #ff755f; outline-offset: 3px; }
.postage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.postage-value { font: 1.05rem/1 Hanalei, serif; letter-spacing: 0; opacity: 1; }
.postage-photo { display: block; aspect-ratio: 4 / 3; border: 3px solid #fff9e9; background-color: #0a5660; background-position: center; background-size: cover; }
.postage b { font-size: .74rem; font-weight: 700; }
/* a postmark smudge across every other stamp */
.postage:nth-child(odd)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 34%;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(22, 69, 74, .38);
  border-radius: 50%;
  background: repeating-linear-gradient(170deg, transparent 0 7px, rgba(22, 69, 74, .3) 7px 9px);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%);
  mask: radial-gradient(circle, #000 60%, transparent 61%);
  pointer-events: none;
}
/* "open the card again" was cream-on-cream here */
.complete .button-quiet { color: #16454a; border-color: rgba(22, 69, 74, .5); background: transparent; }
@media (max-width: 760px) {
  #complete-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .postage { transition: none; } }

/* The two of us on the beach, pinned to the paper trail above the stamps. */
.trail-polaroid { width: min(240px, 66%); margin: 1.4rem auto .4rem; padding: 9px 9px 26px; background: #ffffff; box-shadow: 0 10px 22px rgba(22, 69, 74, .22); transform: rotate(2.5deg); }
.trail-polaroid img { display: block; width: 100%; height: auto; }

/* ---------- desktop: the phone layout stays as-is below these widths ---------- */
@media (min-width: 900px) {
  /* Map: the welcome note becomes a tilted postcard next to a bigger map. */
  .map-surface .map-layout { width: min(1240px, calc(100% - 72px)); grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: clamp(40px, 5vw, 90px); padding: 100px 0 60px; align-items: center; }
  .map-surface .map-copy { position: relative; z-index: 3; padding: 46px 42px 40px; background: #fff9e9; color: #16454a; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); transform: rotate(-1.6deg); }
  .map-surface .map-copy h2 { color: #16454a; font-size: clamp(3.2rem, 4.4vw, 4.8rem); }
  .map-surface .map-copy > p:not(.tiny) { max-width: none; color: #16454a; font-size: 1.15rem; }
  .map-surface .map-copy .map-replay { color: #16454a; }
  .map-surface .map-copy .stamp-tray .tiny { color: #16454a; }
  .map-surface .map-plot { justify-self: center; width: min(100%, calc(84dvh / 1.22), 660px); }
  /* Paper trail: one wide card, words and photo on the left, stamps and buttons on the right. */
  .complete article {
    width: min(1080px, calc(100% - 96px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-areas: "tiny stops" "title stops" "lede stops" "photo actions";
    grid-template-rows: auto auto auto 1fr;
    column-gap: clamp(36px, 5vw, 72px);
    align-items: start;
    padding: 64px 64px 56px;
  }
  .complete article > .tiny { grid-area: tiny; }
  .complete article > h2 { grid-area: title; margin-top: 10px; font-size: clamp(3.6rem, 5vw, 5.4rem); }
  .complete article > p:not(.tiny) { grid-area: lede; margin: 0; }
  .complete article > .trail-polaroid { grid-area: photo; justify-self: start; width: min(300px, 90%); margin: 1.8rem 0 0 1rem; }
  .complete article > #complete-stops { grid-area: stops; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .4rem 0 0; }
  .complete article > .complete-actions { grid-area: actions; align-self: end; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
}
@media (min-width: 900px) {
  .complete article > #complete-stops { justify-self: stretch; width: 100%; max-width: none; gap: 1.3rem 1.1rem; }
  .complete article > #complete-stops .postage { font-size: .82rem; }
  .complete article > #complete-stops .postage b { font-size: .86rem; }
}
@media (min-width: 900px) {
  .complete article > .complete-actions { align-self: start; margin-top: 2rem; }
  .complete article > .trail-polaroid { width: min(250px, 80%); margin-top: 1.4rem; }
}
