:root {
  --ivory: #f5f1e7;
  --ink: #33464f;
  --soft-ink: rgba(51, 70, 79, .68);
  --sea: #6daec5;
  --mist: #d9edf1;
  --wood: #9a8062;
  --line: rgba(51, 70, 79, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button, a { font: inherit; }

body {
  color: var(--ink);
  background: #d9ebef;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.harbor {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #cce5ed;
}

.harbor__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s ease, filter .8s ease;
}

.harbor__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 248, 247, .12), transparent 50%, rgba(28, 57, 67, .08));
}

.harbor__heading {
  position: absolute;
  z-index: 2;
  top: clamp(24px, 5vw, 72px);
  left: clamp(24px, 6vw, 96px);
  text-shadow: 0 1px 14px rgba(245, 241, 231, .72);
}

.harbor__back {
  display: inline-block;
  margin-bottom: 19px;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  color: var(--soft-ink);
  text-decoration: none;
  font-size: .7rem;
  letter-spacing: .1em;
  transition: color .22s ease, border-color .22s ease;
}
.harbor__back:hover, .harbor__back:focus-visible { color: #386f82; border-color: rgba(56, 111, 130, .48); outline: none; }
.harbor__heading p { margin: 0 0 8px; color: #4f879a; font: 700 .65rem Georgia, serif; letter-spacing: .22em; }
.harbor__heading h1 { margin: 0; font: 600 clamp(2rem, 4vw, 4.4rem)/1.05 "Songti SC", "STSong", serif; letter-spacing: .12em; }
.harbor__heading span { display: block; margin-top: 14px; color: var(--soft-ink); font: 600 clamp(.78rem, 1.2vw, 1rem)/1.6 "Songti SC", "STSong", serif; letter-spacing: .08em; }

.harbor__hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(22px, 5vh, 54px);
  margin: 0;
  padding: 10px 17px;
  border: 1px solid rgba(245, 241, 231, .75);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(245, 241, 231, .74);
  box-shadow: 0 8px 30px rgba(44, 74, 83, .12);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  font-size: .78rem;
  letter-spacing: .08em;
  transition: opacity .35s ease, transform .35s ease;
}
.harbor__hint span { display: inline-block; margin-right: 5px; animation: drift 1.8s ease-in-out infinite; }

.hotspot {
  position: absolute;
  z-index: 4;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.hotspot--pier { left: 36%; top: 61%; }
.hotspot--boat-one { left: 53%; top: 63%; }
.hotspot--boat-two { left: 64%; top: 61%; }
.hotspot__ring {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(245, 241, 231, .96);
  border-radius: 50%;
  background: rgba(71, 128, 146, .28);
  box-shadow: 0 0 0 7px rgba(245, 241, 231, .2), 0 2px 18px rgba(35, 67, 78, .28);
  animation: pulse 2.2s ease-out infinite;
}
.hotspot__label {
  position: absolute;
  left: 50%;
  top: 48px;
  width: max-content;
  max-width: 120px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245, 241, 231, .86);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: .25s ease;
  font-size: .7rem;
  letter-spacing: .08em;
}
.hotspot:hover .hotspot__label, .hotspot:focus-visible .hotspot__label { opacity: 1; transform: translate(-50%, 0); }
.hotspot:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; border-radius: 50%; }

.routes {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  align-items: end;
  padding: clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(25, 52, 62, .04) 5%, rgba(27, 53, 62, .5));
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
}

.routes__sheet {
  position: relative;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 4px 34px 4px 34px;
  background: rgba(247, 244, 234, .94);
  box-shadow: 0 28px 70px rgba(26, 54, 64, .28);
  backdrop-filter: blur(16px);
  transform: translateY(28px);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}
.routes__sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(78, 116, 126, .2);
  border-radius: 2px 26px 2px 26px;
  pointer-events: none;
}
.routes__eyebrow { margin: 0 0 7px; color: #5f91a0; font: 700 .6rem Georgia, serif; letter-spacing: .2em; }
.routes h2 { margin: 0; font: 600 clamp(1.45rem, 3vw, 2.7rem) "Songti SC", "STSong", serif; letter-spacing: .08em; }
.routes__intro { margin: 8px 0 22px; color: var(--soft-ink); font: .82rem/1.6 "Songti SC", "STSong", serif; }
.routes__close {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--soft-ink);
  background: rgba(255,255,255,.4);
  cursor: pointer;
  font-size: 1.3rem;
}
.routes__close:hover, .routes__close:focus-visible { color: var(--ink); border-color: var(--sea); outline: none; }

.route-chart { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 2vw, 22px); }
.route {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  min-height: 122px;
  padding: 18px 10px 15px;
  color: var(--ink);
  text-decoration: none;
  border-top: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.route:hover, .route:focus-visible { transform: translateY(-5px); border-color: var(--sea); outline: none; }
.route[aria-current="true"] { border-color: var(--sea); background: linear-gradient(180deg, rgba(109, 174, 197, .09), transparent); }
.route__avatar {
  display: block;
  align-self: start;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: rgba(255,255,255,.5);
  box-shadow: 0 0 0 1px rgba(75, 111, 121, .2), 0 5px 12px rgba(45, 70, 77, .13);
}
.route:hover .route__avatar, .route:focus-visible .route__avatar, .route[aria-current="true"] .route__avatar {
  box-shadow: 0 0 0 2px rgba(109, 174, 197, .5), 0 7px 16px rgba(45, 70, 77, .18);
}
.route strong { display: block; margin-bottom: 5px; font: 600 1.05rem "Songti SC", serif; letter-spacing: .08em; }
.route small { display: block; color: var(--soft-ink); font-size: .68rem; line-height: 1.55; }
.route i { grid-column: 1 / -1; color: rgba(51, 70, 79, .46); font: normal .58rem Georgia, serif; letter-spacing: .1em; }
.route__line { position: absolute; left: 25px; bottom: 0; width: 45%; border-bottom: 1px dashed rgba(78, 116, 126, .32); transform: rotate(-8deg); transform-origin: left; }
.route__line::after { content: ""; position: absolute; right: -2px; top: -3px; width: 5px; height: 5px; border-radius: 50%; background: #7da6ae; }
.wechat-route {
  display: grid;
  grid-template-columns: 1fr 142px;
  align-items: center;
  gap: 24px;
  max-height: 0;
  margin-top: 0;
  padding: 0 22px;
  overflow: hidden;
  border: 0 solid rgba(91, 134, 145, .2);
  background: rgba(218, 237, 239, .28);
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, margin .4s ease, padding .4s ease, border-width .4s ease;
}
.wechat-route.is-visible { max-height: 210px; margin-top: 18px; padding: 18px 22px; border-width: 1px; opacity: 1; }
.wechat-route__copy p { margin: 0 0 6px; color: #648e98; font: 700 .55rem Georgia, serif; letter-spacing: .18em; }
.wechat-route__copy h3 { margin: 0 0 8px; font: 600 clamp(1rem, 2vw, 1.35rem) "Songti SC", serif; letter-spacing: .08em; }
.wechat-route__copy span { color: var(--soft-ink); font: .74rem/1.6 "Songti SC", serif; }
.wechat-route img { width: 142px; height: 142px; padding: 5px; object-fit: contain; background: #fff; box-shadow: 0 5px 18px rgba(48, 74, 81, .13); }
.routes__status { min-height: 1.4em; margin: 18px 0 0; color: #577b87; text-align: center; font: .75rem "Songti SC", serif; letter-spacing: .08em; }

.harbor.is-choosing .routes { opacity: 1; visibility: visible; }
.harbor.is-choosing .routes__sheet { transform: translateY(0); }
.harbor.is-choosing .harbor__scene { transform: scale(1.025); filter: saturate(.82) brightness(.88); }
.harbor.is-choosing .harbor__hint, .harbor.is-choosing .hotspot { opacity: 0; pointer-events: none; }

@keyframes pulse { 0% { transform: scale(.75); opacity: .9; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
@keyframes drift { 50% { transform: translateY(-3px); } }

@media (max-width: 760px) {
  .harbor__scene { object-position: 42% center; }
  .harbor__heading { top: 24px; left: 22px; }
  .hotspot--pier { left: 35%; top: 65%; }
  .hotspot--boat-one { left: 60%; top: 65%; }
  .hotspot--boat-two { display: none; }
  .routes { padding: 10px; }
  .routes__sheet { max-height: 88svh; overflow: auto; padding: 28px 22px 24px; border-radius: 4px 24px 4px 24px; }
  .route-chart { grid-template-columns: 1fr 1fr; }
  .route { min-height: 108px; }
  .routes__close { position: sticky; float: right; top: 0; margin-top: -12px; }
  .wechat-route { grid-template-columns: 1fr 116px; }
  .wechat-route img { width: 116px; height: 116px; }
}

@media (max-width: 440px) {
  .route-chart { grid-template-columns: 1fr; gap: 0; }
  .route { min-height: 88px; grid-template-columns: 42px 1fr; }
  .route i { display: none; }
  .harbor__hint { width: max-content; max-width: calc(100vw - 32px); }
  .wechat-route, .wechat-route.is-visible { grid-template-columns: 1fr; justify-items: center; max-height: 390px; text-align: center; }
  .wechat-route img { width: 156px; height: 156px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
