:root {
  --paper: #f8f6ef;
  --ink: #263d34;
  --green: #345d4a;
  --muted: #7a8377;
  --line: #e0e3d7;
  --accent: #d7906f;
  --serif: Georgia, "Times New Roman", serif;
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: inherit;
}
button:hover {
  filter: brightness(0.94);
}
[hidden] {
  display: none !important;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 32px 46px 0;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.9px;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 39px;
  letter-spacing: -1.5px;
  margin: 0;
}
.heading-dot {
  color: var(--accent);
}
.trip-dates {
  color: var(--muted);
  font-size: 11px;
  padding-bottom: 5px;
}
.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}
.map-panel {
  height: 482px;
  position: relative;
  border: 1px solid #c5d9cf;
  border-radius: 14px;
  overflow: hidden;
  background: #deece7;
}
#map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#map.dragging {
  cursor: grabbing;
}
.country-shape {
  fill: #f0f0d9;
  stroke: #bac9a5;
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}
.country-shape.featured {
  fill: #d1dfb7;
  stroke: #a6bd95;
}
.country-shape.cambodia {
  fill: #e4dfb1;
}
.map-top {
  position: absolute;
  top: 17px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
  gap: 10px;
}
.view-switch {
  display: flex;
  padding: 3px;
  background: #fffdf2e8;
  border: 1px solid #dce5d8;
  border-radius: 7px;
  pointer-events: auto;
}
.view-switch button {
  font-size: 10px;
  padding: 7px 11px;
  border-radius: 4px;
  min-height: 30px;
}
.view-switch .active {
  background: var(--green);
  color: #fffdf2;
}
.map-controls {
  position: absolute;
  right: 17px;
  bottom: 58px;
  display: flex;
  flex-direction: column;
  background: #fffdf6;
  border: 1px solid #d4dfd2;
  border-radius: 7px;
  box-shadow: 0 2px 8px #344a3710;
}
.map-controls button {
  width: 36px;
  height: 36px;
  font-size: 22px;
  display: grid;
  place-items: center;
}
.map-controls button + button {
  border-top: 1px solid #e8eadf;
}
.map-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 13px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(transparent, #deece7ee 40%);
  gap: 12px;
}
.legend {
  display: flex;
  gap: 17px;
  font-size: 9px;
  color: #557064;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.solid-line,
.dashed-line {
  width: 18px;
  border-top: 2px solid #4e725a;
}
.dashed-line {
  border-top: 2px dashed #93a491;
}
.map-bottom a {
  font-size: 8px;
  color: #6e897c;
  text-decoration: none;
}
.country-label {
  font-family: system-ui;
  text-anchor: middle;
  letter-spacing: 2px;
  fill: #879779;
  font-weight: 600;
  pointer-events: none;
}
.route {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route.future {
  stroke: #8ea58c;
  stroke-dasharray: 4 6;
  opacity: 0.8;
}
.route.past {
  stroke: #496e53;
}
.route.current {
  stroke: #bd7658;
  stroke-dasharray: 5 5;
}
.stop-circle {
  stroke: #fffdf5;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  fill: #68865f;
}
.stop-label {
  fill: #405c47;
  font-family: system-ui;
  font-weight: 550;
  paint-order: stroke;
  stroke: #edf0da;
  stroke-width: 3px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.map-error {
  position: absolute;
  top: 45%;
  left: 20px;
  right: 20px;
  background: var(--paper);
  padding: 20px;
  border-radius: 10px;
}
.postcard {
  background: #fffdf7;
  border: 1px solid #e5e4d8;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 5px 12px #4f4e3410;
  transform: rotate(0.6deg);
  display: flex;
  flex-direction: column;
}
.postcard-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 13px;
}
.postmark {
  font-size: 7px;
  letter-spacing: 1px;
  line-height: 1.7;
  color: #9c9f8a;
  transform: rotate(-9deg);
  text-align: center;
  border: 1px dashed #b8baa4;
  border-radius: 50%;
  padding: 6px 9px;
}
.postcard-image {
  height: 175px;
  background: #e8e7cb;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.postcard-image img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  padding: 0;
}
.scene-caption {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  background: #fff9ebeb;
  padding: 5px 9px;
  transform: rotate(-3deg);
  color: #4d6149;
}
.postcard-content {
  padding: 17px 3px 0;
}
.country {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 5px;
}
.postcard h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 5px;
  letter-spacing: -0.7px;
}
.stop-period {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 18px;
}
.postcard h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  margin: 0 0 8px;
}
.note {
  font-size: 11px;
  line-height: 1.8;
  color: #71786c;
  margin: 0;
}
.mood {
  border-top: 1px solid #e7e8dd;
  margin-top: 18px;
  padding-top: 12px;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 10px;
  color: #687762;
}
.mood > span:first-child {
  color: var(--accent);
  font-size: 17px;
}
.time-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfbf6;
  padding: 20px 24px;
  margin-top: 23px;
}
.selected-date {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.3px;
}
.selected-date span {
  font-family: system-ui;
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.slider-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 16px;
}
.play-button {
  height: 36px;
  width: 36px;
  flex-shrink: 0;
  background: var(--green);
  color: #fffdf6;
  border-radius: 50%;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.slider-wrap {
  flex: 1;
  min-width: 0;
  padding-top: 5px;
}
.history-heading, .postcard-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.postcard[hidden], .postcard-navigation[hidden], .slider-row[hidden] { display: none; }
.pretrip-message {
  max-width: 65ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.history-heading .eyebrow { margin: 0 0 6px; }
.postcard-navigation {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.postcard-navigation button, #back-to-now {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfbf6;
  color: var(--green);
  font: inherit;
  font-size: 12px;
}
.postcard-navigation button:disabled, #back-to-now:disabled, .stop-button:disabled {
  opacity: .4;
  cursor: default;
}
#postcard-count { color: var(--muted); font-size: 11px; text-align: center; }
.preview-notice {
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f2e6cc;
  color: #705222;
  font-size: 12px;
}
@media (max-width: 600px) {
  .history-heading { align-items: start; flex-wrap: wrap; }
  .postcard-navigation { flex-wrap: wrap; }
  #postcard-count { order: 1; flex-basis: 100%; }
}
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  display: block;
  border-radius: 5px;
  margin: 9px 0 14px;
  background: linear-gradient(
    to right,
    var(--green) 0%,
    var(--green) var(--progress, 0%),
    #e0e5d7 var(--progress, 0%),
    #e0e5d7 100%
  );
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #fffdf6;
  box-shadow: 0 0 0 1px var(--green);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #fffdf6;
  box-shadow: 0 0 0 1px var(--green);
}
.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}
.timeline-labels span:nth-child(2) {
  font-size: 7px;
  letter-spacing: 1.5px;
}
.stops-section {
  margin-top: 28px;
}
.stops-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}
.stop-button {
  text-align: left;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  background: #faf9f3;
  position: relative;
}
.stop-button.active {
  background: #e9eedf;
  border-color: #829970;
}
.stop-button:hover {
  background: #edf0e3;
}
.stop-number {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #96a08c;
  margin-bottom: 8px;
}
.stop-button.active .stop-number {
  color: #5d7c50;
}
.stop-name {
  font-size: 10px;
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stop-date {
  font-size: 8px;
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.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;
}
.noscript {
  padding: 15px;
  background: #f4e4bf;
}
.map-panel {
  isolation: isolate;
}
@media (min-width: 1450px) {
  main {
    padding-top: 40px;
  }
  .map-panel {
    height: 530px;
  }
  .postcard-image {
    height: 205px;
  }
  .note {
    font-size: 12px;
  }
}
@media (max-width: 1050px) {
  main {
    padding: 27px 25px 0;
  }
  .journey-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 16px;
  }
  .map-panel {
    height: 485px;
  }
  .postcard-image {
    height: 155px;
  }
  .time-panel {
    padding: 20px;
  }
  .stops-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stop-button {
    padding: 12px;
  }
  .selected-date {
    font-size: 19px;
  }
}
@media (max-width: 720px) {
  main {
    padding: 23px 16px 0;
  }
  .intro {
    display: block;
    margin-bottom: 18px;
  }
  h1 {
    font-size: 32px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
  }
  .trip-dates {
    display: block;
    margin-top: 10px;
    font-size: 10px;
  }
  .journey-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .map-panel {
    height: 420px;
    border-radius: 11px;
  }
  .map-top {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .view-switch button {
    font-size: 9px;
    padding: 7px 8px;
    min-height: 34px;
  }
  .map-controls {
    right: 12px;
    bottom: 52px;
  }
  .map-controls button {
    width: 42px;
    height: 42px;
  }
  .map-bottom {
    padding: 13px 12px;
  }
  .legend {
    gap: 12px;
    font-size: 8px;
  }
  .postcard {
    transform: none;
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 0 17px;
    padding: 15px;
  }
  .postcard-top {
    grid-column: 1/-1;
    margin-bottom: 12px;
  }
  .postcard-image {
    height: 100%;
    min-height: 180px;
  }
  .postcard-content {
    padding: 0;
  }
  .postcard h2 {
    font-size: 25px;
  }
  .postcard h3 {
    font-size: 14px;
  }
  .note {
    font-size: 10px;
  }
  .stop-period {
    margin-bottom: 13px;
  }
  .mood {
    margin-top: 12px;
    font-size: 9px;
  }
  .scene-caption {
    font-size: 10px;
    left: 6px;
    bottom: 10px;
    padding: 5px 6px;
    right: 6px;
    text-align: center;
  }
  .time-panel {
    margin-top: 19px;
    padding: 18px 15px 14px;
  }
  .selected-date {
    font-size: 21px;
  }
  .slider-row {
    gap: 12px;
    margin-top: 16px;
  }
  .play-button {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }
  .slider-wrap {
    padding-top: 8px;
  }
  .stops-section {
    margin-top: 24px;
  }
  .stops-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .stop-button {
    padding: 12px 8px;
    min-height: 74px;
  }
  .stop-name {
    font-size: 9px;
  }
  .stop-date {
    font-size: 8px;
  }
}
@media (max-width: 380px) {
  .postcard {
    grid-template-columns: 1fr;
  }
  .postcard-image {
    height: 190px;
    min-height: 0;
  }
  .postcard-content {
    padding-top: 15px;
  }
  .map-panel {
    height: 380px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* The map is the main stage; the postcard follows the time controls. */
.scene-caption { max-width: calc(100% - 24px); }
.postcard-content { grid-column: 2; grid-row: 2; }
.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 24px;
}
.map-panel {
  grid-column: 1 / -1;
  height: 500px;
}
.journey-layout .time-panel {
  grid-column: 1 / -1;
  margin-top: 0;
}
.journey-layout .stops-section {
  margin-top: 0;
}
.journey-layout .stops-list {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.postcard {
  transform: none;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  column-gap: 28px;
  padding: 20px 24px;
  max-width: none;
  align-self: start;
  width: 100%;
}
.postcard-top {
  grid-column: 1/-1;
  margin-bottom: 12px;
}
.postcard-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.postcard-content {
  padding: 4px 0 0;
}
.postcard h2 {
  font-size: 31px;
}
.postcard .stop-period {
  margin-bottom: 14px;
}
.postcard .note {
  font-size: 12px;
  max-width: 430px;
}
.postcard .mood {
  margin-top: 15px;
}
.scene-caption {
  font-size: 14px;
}
.stop-button {
  min-height: 75px;
}
#character-animation {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: couple-sway 4s ease-in-out infinite;
}
#map-heart {
  transform-box: fill-box;
  animation: heart-float 3s ease-in-out infinite;
}
.on-the-move #character-animation {
  animation: travel-bob 1.1s ease-in-out infinite;
}
.at-landmark #character-animation {
  animation: couple-sway 3s ease-in-out infinite;
}
#landmark-image {
  opacity: 0.97;
}
@keyframes couple-sway {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg) translateY(-2px);
  }
}
@keyframes travel-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-5px) rotate(2deg);
  }
}
@keyframes heart-float {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateY(-7px);
    opacity: 1;
  }
}
@media (min-width: 1450px) {
  .map-panel {
    height: 550px;
  }
}
@media (max-width: 1050px) {
  .journey-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .journey-layout .stops-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .journey-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .map-panel {
    height: 425px;
  }
  .postcard {
    transform: none;
    grid-template-columns: 40% minmax(0, 1fr);
    column-gap: 15px;
    padding: 15px;
  }
  .postcard-image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 180px;
  }
  .postcard-content {
    padding: 0;
  }
  .postcard h2 {
    font-size: 25px;
  }
  .postcard .note {
    font-size: 10px;
  }
  .postcard .mood {
    font-size: 9px;
  }
  .scene-caption {
    font-size: 10px;
  }
  .journey-layout .stops-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 380px) {
  .map-panel {
    height: 380px;
  }
  .postcard {
    grid-template-columns: 1fr;
  }
  .postcard-image {
    height: 190px;
  }
  .postcard-content {
    padding-top: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #character-animation,
  #map-heart {
    animation: none;
  }
}

/* Give the illustrated scenes enough room to read on phones. */
@media (max-width: 560px) {
  .postcard { grid-template-columns: 1fr; }
  .postcard-image { height: 210px; min-height: 0; }
  .postcard-content {
    grid-column: auto;
    grid-row: auto;
    padding-top: 15px;
  }
  .scene-caption { font-size: 12px; }
}

/* Only traveled routes are visible; the active city label sits above the art. */
.route.past {
  stroke: #8ea58c;
  stroke-dasharray: 4 6;
  opacity: 0.8;
}
.route.past.current {
  stroke: #bd7658;
  stroke-dasharray: none;
  opacity: 1;
}
.stop-markers .highlighted {
  opacity: 1;
}
.highlighted .stop-label {
  font-weight: 750;
  fill: #294e39;
  stroke: #fffdf2;
  stroke-width: 6px;
}
.highlighted .stop-circle {
  fill: #bd7658;
}
.solid-line {
  border-color: #bd7658;
}
