.trip-map-page {
  min-width: 320px;
  font-size: 17px;
}

.trip-map-page .site-header {
  grid-template-columns: minmax(210px, 1fr) auto minmax(110px, 1fr);
}

.map-hero {
  padding: clamp(58px, 8vw, 104px) 0 96px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 2%, rgba(140, 198, 215, 0.38), transparent 28rem),
    radial-gradient(circle at 10% 20%, rgba(230, 174, 69, 0.2), transparent 24rem),
    linear-gradient(155deg, #0d3445 0%, #176b83 58%, #e8d4a6 58.2%, #f8f1e4 100%);
}

.map-hero-copy,
.map-frame {
  width: min(100% - 40px, var(--content-width));
  margin-inline: auto;
}

.map-hero-copy {
  max-width: 850px;
  margin-bottom: 42px;
  margin-left: max(20px, calc((100vw - var(--content-width)) / 2));
  color: #fff;
}

.map-hero-copy h1 {
  margin: 15px 0 18px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(46px, 7vw, 80px);
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.map-hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 1.8vw, 20px);
}

.map-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.map-summary span {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(7, 34, 44, 0.3);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
}

.map-summary strong {
  color: #ffd97d;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  line-height: 1;
}

.map-frame {
  padding: clamp(18px, 2.6vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 36px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 34px 90px rgba(6, 31, 42, 0.3);
}

.map-frame-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 20px;
}

.map-frame-heading h2 {
  margin: 3px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.transport-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.transport-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.legend-swatch {
  width: 24px;
  height: 4px;
  border-radius: 999px;
}

.legend-flight {
  background: var(--gold);
}

.legend-car {
  background: var(--coral);
}

.legend-ferry {
  background: var(--sea);
}

.legend-walk {
  background: var(--green);
}

.map-artboard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 8px solid #efe2c8;
  border-radius: 26px;
  background: #d8eef4;
  box-shadow:
    inset 0 0 0 1px rgba(16, 45, 58, 0.13),
    0 18px 44px rgba(16, 45, 58, 0.16);
}

.map-artboard::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: inset 0 0 50px rgba(255, 250, 236, 0.2);
  content: "";
}

.map-artboard img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.map-route-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.map-line {
  position: absolute;
  height: 0;
  border-top: 4px dashed rgba(207, 79, 48, 0.92);
  filter: drop-shadow(0 2px 1px rgba(255, 255, 255, 0.92));
  transform-origin: left center;
}

.map-line::after {
  position: absolute;
  top: -7px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  color: #b6442e;
  content: "";
  transform: rotate(45deg);
}

.map-line-flight {
  top: 17%;
  left: 15%;
  width: 24%;
  border-color: rgba(226, 161, 36, 0.98);
  transform: rotate(19deg);
}

.map-line-flight::after {
  color: #b57a08;
}

.map-line-airport-miyajimaguchi {
  top: 27%;
  left: 39%;
  width: 19%;
  transform: rotate(137deg);
}

.map-line-ferry {
  top: 42%;
  left: 28%;
  width: 13%;
  border-color: rgba(16, 112, 139, 0.96);
  transform: rotate(156deg);
}

.map-line-ferry::after {
  color: #0e6d83;
}

.map-line-miyajimaguchi-onomichi {
  top: 43%;
  left: 26%;
  width: 62%;
  transform: rotate(-20deg);
}

.map-line-onomichi-omishima {
  top: 24%;
  left: 84%;
  width: 48%;
  transform: rotate(136deg);
}

.map-line-omishima-imabari {
  top: 63%;
  left: 54%;
  width: 32%;
  transform: rotate(25deg);
}

.map-line-imabari-airport {
  top: 76%;
  left: 83%;
  width: 68%;
  border-color: rgba(167, 64, 42, 0.72);
  transform: rotate(-132deg);
}

.map-pin {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.map-pin strong {
  display: grid;
  min-width: 40px;
  height: 40px;
  place-items: center;
  padding-inline: 5px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--coral-dark);
  box-shadow: 0 6px 18px rgba(16, 45, 58, 0.32);
  font-size: 12px;
  white-space: nowrap;
}

.map-pin span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 6px 18px rgba(16, 45, 58, 0.2);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.map-pin:hover span,
.map-pin:focus-visible span {
  color: #fff;
  background: var(--sea-dark);
}

.map-pin-chitose {
  top: 17%;
  left: 14%;
}

.map-pin-airport {
  top: 27%;
  left: 39%;
}

.map-pin-miyajimaguchi {
  top: 42%;
  left: 28%;
}

.map-pin-miyajima {
  top: 47%;
  left: 18%;
  flex-direction: row-reverse;
}

.map-pin-onomichi {
  top: 23%;
  left: 85%;
  flex-direction: row-reverse;
}

.map-pin-omishima {
  top: 63%;
  left: 54%;
}

.map-pin-imabari {
  top: 76%;
  left: 83%;
  flex-direction: row-reverse;
}

.map-pin-wood-egg {
  top: 34%;
  left: 32%;
}

.map-place-key {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.map-place-key a {
  display: grid;
  min-height: 92px;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  text-decoration: none;
}

.map-place-key a:hover,
.map-place-key a:focus-visible {
  border-color: rgba(219, 93, 62, 0.5);
  background: #fff5e8;
}

.map-place-key span {
  grid-row: span 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral-dark);
  font-size: 10px;
  font-weight: 900;
}

.map-place-key strong {
  align-self: end;
  font-size: 13px;
  line-height: 1.25;
}

.map-place-key small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 2px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.route-overview {
  padding-top: 106px;
  padding-bottom: 110px;
}

.route-detail-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid rgba(23, 107, 131, 0.28);
  border-radius: 999px;
  color: var(--sea);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.route-detail-link:hover,
.route-detail-link:focus-visible {
  color: #fff;
  background: var(--sea-dark);
}

.journey-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.journey-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 530px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow-sm);
}

.journey-day::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: var(--day-color, var(--sea));
  content: "";
}

.journey-day-1 {
  --day-color: #d69728;
}

.journey-day-2 {
  --day-color: #bd4b36;
}

.journey-day-3 {
  --day-color: #c4773d;
}

.journey-day-4 {
  --day-color: #147c92;
}

.journey-day-5 {
  --day-color: #52795f;
}

.journey-day header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding: 8px 0 15px;
  border-bottom: 1px solid var(--line);
}

.journey-day header > span {
  padding: 5px 7px;
  border-radius: 8px;
  color: #fff;
  background: var(--day-color);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.journey-day header time {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.journey-day h3 {
  margin: 1px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 19px;
  line-height: 1.35;
}

.journey-stops {
  position: relative;
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.journey-stops::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 5px;
  width: 2px;
  background: rgba(23, 107, 131, 0.24);
  content: "";
}

.journey-stops li {
  position: relative;
  display: grid;
  min-height: 84px;
  grid-template-columns: 42px 1fr;
  gap: 3px 9px;
  align-content: start;
  padding: 0 0 15px 20px;
}

.journey-stops li::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--day-color);
  box-shadow: 0 0 0 1px rgba(23, 107, 131, 0.24);
  content: "";
}

.journey-stops time {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mode-tag {
  justify-self: start;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.5;
}

.mode-flight {
  color: #6f4b00;
  background: #ffe3a5;
}

.mode-car {
  color: #84331f;
  background: #ffe0d6;
}

.mode-ferry {
  color: #075268;
  background: #d7eff4;
}

.mode-walk {
  color: #365840;
  background: #dfecdf;
}

.mode-stay,
.mode-home {
  color: #583b70;
  background: #eee2f4;
}

.journey-stops strong,
.journey-stops small {
  grid-column: 1 / -1;
  margin-left: 0;
}

.journey-stops strong {
  font-size: 14px;
  line-height: 1.45;
}

.journey-stops small {
  color: var(--ink-soft);
  font-size: 12px;
}

.journey-guide-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: auto;
  color: var(--sea);
  font-size: 12px;
  font-weight: 850;
}

.journey-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: auto;
}

.journey-guide-links .journey-guide-link {
  margin-top: 0;
}

.stay-overview {
  padding: 90px 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(230, 174, 69, 0.2), transparent 25rem),
    linear-gradient(140deg, #12384a, #176b83);
}

.stay-overview .section-heading p:not(.section-kicker) {
  color: rgba(255, 255, 255, 0.72);
}

.stay-overview h2 {
  color: #fff;
}

.stay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stay-grid article {
  position: relative;
  min-height: 280px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.stay-grid article::after {
  position: absolute;
  right: -28px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.stay-grid .stay-featured {
  border-color: rgba(255, 221, 139, 0.52);
  background: rgba(255, 237, 190, 0.14);
}

.stay-map-link {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 280px;
  padding: 25px;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.stay-map-link:hover,
.stay-map-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.stay-night {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #183b49;
  background: #ffdb87;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.stay-illustration {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: 25px 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 24px;
}

.stay-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.stay-grid h3 {
  margin: 3px 0 7px;
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 24px;
  line-height: 1.4;
}

.stay-grid small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.stay-map-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 43, 57, 0.34);
  font-size: 12px;
  font-weight: 850;
}

.map-next {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(480px, 1.2fr);
  gap: 50px;
  align-items: center;
  padding-top: 92px;
  padding-bottom: 120px;
}

.map-next h2 {
  margin: 4px 0 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.25;
}

.map-next p:not(.section-kicker) {
  margin: 0;
  color: var(--ink-soft);
}

.map-next nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.map-next nav a {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--sea-dark);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.map-next nav a:hover,
.map-next nav a:focus-visible,
.map-next nav .map-next-primary {
  color: #fff;
  background: var(--sea-dark);
}

@media (max-width: 1100px) {
  .journey-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-day {
    min-height: 0;
  }

  .map-place-key {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .trip-map-page .site-header {
    grid-template-columns: 1fr auto;
  }

  .map-hero {
    padding-top: 54px;
  }

  .map-hero-copy,
  .map-frame {
    width: auto;
    margin-right: max(20px, env(safe-area-inset-right));
    margin-left: max(20px, env(safe-area-inset-left));
  }

  .map-frame-heading {
    align-items: start;
    flex-direction: column;
  }

  .transport-legend {
    justify-content: start;
  }

  .map-pin {
    font-size: 10px;
  }

  .map-pin strong {
    min-width: 36px;
    height: 36px;
    font-size: 10px;
  }

  .map-pin span {
    padding: 5px 7px;
  }

  .map-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .trip-map-page {
    font-size: 16px;
  }

  .map-hero {
    padding: 40px 0 70px;
  }

  .map-hero-copy,
  .map-frame {
    margin-right: max(12px, env(safe-area-inset-right));
    margin-left: max(12px, env(safe-area-inset-left));
  }

  .map-hero-copy {
    margin-bottom: 28px;
  }

  .map-hero-copy h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .map-hero-copy > p:not(.eyebrow) {
    font-size: 16px;
  }

  .map-summary span {
    min-height: 44px;
    padding: 7px 11px;
    font-size: 9px;
  }

  .map-summary strong {
    font-size: 18px;
  }

  .map-frame {
    padding: 12px;
    border-radius: 24px;
  }

  .map-frame-heading {
    gap: 13px;
    margin: 6px 4px 14px;
  }

  .map-frame-heading h2 {
    font-size: 24px;
  }

  .transport-legend {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transport-legend li {
    font-size: 11px;
  }

  .map-artboard {
    border-width: 4px;
    border-radius: 17px;
  }

  .map-artboard::after {
    border-radius: 12px;
  }

  .map-line {
    border-top-width: 2px;
  }

  .map-line::after {
    top: -5px;
    width: 6px;
    height: 6px;
    border-width: 2px 2px 0 0;
  }

  .map-pin {
    min-height: 32px;
  }

  .map-pin strong {
    min-width: 29px;
    height: 29px;
    border-width: 2px;
    font-size: 8px;
  }

  .map-pin span {
    display: none;
  }

  .map-place-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-place-key a {
    min-height: 82px;
  }

  .map-place-key strong {
    font-size: 14px;
  }

  .map-place-key small {
    font-size: 12px;
  }

  .map-caption {
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
  }

  .route-overview {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .route-detail-link {
    min-height: 48px;
    font-size: 13px;
  }

  .journey-days,
  .stay-grid,
  .map-next nav {
    grid-template-columns: 1fr;
  }

  .journey-day {
    min-height: 0;
    padding: 20px;
  }

  .journey-day h3 {
    font-size: 21px;
  }

  .journey-stops strong {
    font-size: 15px;
  }

  .stay-overview {
    padding: 72px 0;
  }

  .stay-grid article {
    min-height: 240px;
  }

  .stay-map-link {
    min-height: 240px;
  }

  .map-next {
    gap: 26px;
    padding-top: 76px;
    padding-bottom: 98px;
  }

  .map-next nav a {
    min-height: 52px;
    font-size: 14px;
  }

  .trip-map-page .mobile-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trip-map-page .publish-lock {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .trip-map-page * {
    scroll-behavior: auto !important;
  }
}

@media print {
  .trip-map-page {
    padding-bottom: 0;
    background: #fff;
  }

  .trip-map-page .site-header,
  .trip-map-page .mobile-nav,
  .trip-map-page .publish-lock,
  .trip-map-page .game-launcher,
  .trip-map-page .route-detail-link {
    display: none !important;
  }

  .map-hero {
    padding: 24px 0;
    background: #fff;
  }

  .map-hero-copy {
    color: var(--ink);
  }

  .map-hero-copy > p:not(.eyebrow) {
    color: var(--ink-soft);
  }

  .map-frame {
    box-shadow: none;
  }

  .journey-day,
  .stay-grid article {
    break-inside: avoid;
  }
}
