.trip-itinerary {
  --route-accent: #E30613;
  --route-offset: clamp(28px, 9vw, 64px);
  --route-width: min(420px, calc(100% - 56px));
  max-width: 720px;
}
.route-intro, .route-note { color: #62666b; font-size: 12px; }
.route-carousel { margin: 18px 0 16px; }
.route-stops {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.route-stops > li { min-width: 0; }
.route-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #e8e2dc;
  border-radius: 18px;
  background: #fdfbf8;
  box-shadow: 0 6px 16px #20252b12;
}
.route-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.route-card > img[src$="danau-kawaguchiko.webp"] { object-position: 65% center; }
.route-card > img[src$="chureito-pagoda.webp"] { object-position: 70% center; }
.route-card-copy { padding: 14px 16px 17px; }
.route-time { margin: 0; color: var(--route-accent); font-size: 13px; font-weight: 600; }
.route-card h3 {
  margin: 3px 0 0;
  color: #20252b;
  font-size: clamp(18px, 5vw, 21px);
  font-weight: 700;
  line-height: 1.3;
}
.route-description { margin: 6px 0 0; color: #4b5158; font-size: 14px; line-height: 1.55; }
.route-note { margin: 14px 0 0; }
.route-credits { margin-top: 8px; }
.route-credits summary { color: #62666b; font-size: 11px; }
.route-credits p { margin-bottom: 0; }
.route-credits a { text-decoration: underline; }

.route-carousel[data-ready] .route-stops {
  grid-template-columns: minmax(0, var(--route-width));
  justify-content: center;
  gap: 0;
  padding: 3px 0 10px;
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  cursor: grab;
}
.route-carousel[data-ready] .route-stops > li {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: translateX(var(--route-shift, 0px)) scale(.88);
  transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .28s ease, visibility .28s;
}
.route-stops > [data-position="before"],
.route-stops > [data-position="prev"] { --route-shift: calc(-1 * var(--route-offset)); }
.route-stops > [data-position="after"],
.route-stops > [data-position="next"] { --route-shift: var(--route-offset); }
.route-carousel[data-ready] .route-stops > :is([data-position="prev"], [data-position="next"]) {
  visibility: visible;
  opacity: .7;
  z-index: 1;
  transform: translateX(var(--route-shift)) scale(.92);
}
.route-carousel[data-ready] .route-stops > [data-position="active"] {
  visibility: visible;
  opacity: 1;
  z-index: 2;
  transform: none;
}
.route-carousel[data-ready] .route-stops > :not([data-position="active"]) .route-card-copy {
  visibility: hidden;
}
.route-controls:not([hidden]) {
  width: var(--route-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 6px auto 0;
}
.route-progress { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.route-counter { font-size: 11px; font-weight: 600; color: #565c62; white-space: nowrap; font-variant-numeric: tabular-nums; }
.route-progress-track { flex: 1; height: 3px; border-radius: 3px; background: #eae2e1; }
.route-progress-track::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--route-accent);
  transform: scaleX(var(--route-progress, 0));
  transform-origin: left;
  transition: transform .32s ease;
}
.route-buttons { display: flex; gap: 6px; }
.route-buttons button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e8e2dc;
  border-radius: 50%;
  background: #fff;
  color: var(--route-accent);
}
.route-buttons button:hover:not([aria-disabled="true"]) { background: #fff1f2; border-color: var(--route-accent); }
.route-buttons button[aria-disabled="true"] { color: #a0a0a0; cursor: default; }
.route-buttons svg { width: 20px; height: 20px; }
.route-stops:focus-visible, .route-buttons button:focus-visible { outline: 2px solid var(--route-accent); outline-offset: 2px; }
.route-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 767px) {
  .trip-itinerary { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .route-carousel[data-ready] .route-stops > li, .route-progress-track::after { transition: none; }
}

.route-time-panel {
  width: var(--route-width);
  margin: 0 auto 18px;
  text-align: center;
}
.route-time-panel > div:first-child { min-height: 86px; }
.route-time-panel strong { display: block; color: #E30613; font-size: 24px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.route-time-panel p { margin: 2px 0; color: #20252b; font-size: 13px; font-weight: 600; line-height: 1.4; }
.route-time-panel [data-route-panel-duration] { color: #62666b; font-size: 11px; }
.route-stop-progress { position: relative; display: flex; align-items: center; justify-content: space-between; height: 10px; margin-top: 8px; }
.route-stop-progress::before, .route-stop-progress::after { content: ""; position: absolute; inset: 4px 0; height: 2px; background: #e8e2dc; }
.route-stop-progress::after { background: #E30613; transform: scaleX(var(--stop-progress, 0)); transform-origin: left; transition: transform .28s ease; }
.route-stop-progress span { position: relative; z-index: 1; width: 7px; height: 7px; border-radius: 50%; background: #E4C7C9; }
.route-stop-progress span[data-reached] { background: #E30613; }
@media (prefers-reduced-motion: reduce) { .route-stop-progress::after { transition: none; } }
