:root {
  color-scheme: dark;
  --stage-ink: #fff8ed;
  --stage-muted: rgba(255, 248, 237, 0.76);
  --stage-line: rgba(255, 248, 237, 0.4);
  --stage-focus: #fff1ba;
  --stage-shadow: rgba(18, 29, 43, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #203b56;
}

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

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.city-stage {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #203b56;
  touch-action: pan-y;
}

.city-stage a,
.city-stage button {
  touch-action: manipulation;
}

.city-stage::before,
.city-stage::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  content: "";
}

.city-stage::before {
  background:
    linear-gradient(90deg, rgba(14, 26, 40, 0.7) 0%, rgba(14, 26, 40, 0.23) 47%, transparent 74%),
    linear-gradient(0deg, rgba(12, 25, 39, 0.42), transparent 48%);
}

.city-stage::after {
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 110px rgba(9, 19, 31, 0.24);
}

.city-scene {
  position: absolute;
  z-index: 0;
  inset: -3%;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.055) translate3d(0, 1.2%, 0);
  transition:
    opacity 1.1s cubic-bezier(0.22, 0.72, 0.2, 1),
    transform 1.55s cubic-bezier(0.22, 0.72, 0.2, 1);
}

.city-scene.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
}

.city-scene__art {
  display: block;
  width: 100%;
  height: 100%;
}

.city-scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.city-stage__masthead {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding:
    calc(27px + env(safe-area-inset-top))
    calc(34px + env(safe-area-inset-right))
    20px
    calc(34px + env(safe-area-inset-left));
}

.city-stage__brand {
  margin: 0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 15px;
  letter-spacing: 0.24em;
  text-shadow: 0 2px 18px var(--stage-shadow);
}

.city-stage__controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.city-indicators {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(20, 37, 54, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.city-indicator {
  display: grid;
  min-width: 58px;
  min-height: 44px;
  place-items: center;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 248, 237, 0.68);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.city-indicator span {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.city-indicator[aria-pressed="true"] {
  color: #273746;
  background: rgba(255, 248, 233, 0.9);
}

.city-stage__copy {
  position: absolute;
  z-index: 5;
  bottom: clamp(100px, 13vh, 145px);
  left: max(6.5vw, calc(28px + env(safe-area-inset-left)));
  width: min(420px, calc(100% - 64px));
  text-shadow: 0 3px 25px var(--stage-shadow);
}

.city-stage__kicker {
  margin: 0 0 15px;
  color: var(--stage-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.city-stage__visit {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin: 0 0 12px;
  padding: 2px 11px;
  border-left: 2px solid #f4c3b3;
  color: #fff4df;
  background: rgba(30, 41, 51, 0.2);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.city-stage__visit[hidden] {
  display: none;
}

.city-stage h1 {
  margin: 0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: clamp(66px, 8.6vw, 132px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.96;
  text-wrap: balance;
}

.city-stage__tagline {
  max-width: 25em;
  margin: 21px 0 0;
  color: var(--stage-muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.8;
}

.city-stage__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 29px;
}

.city-enter {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 27px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: #263945;
  background: #fff5e3;
  box-shadow: 0 14px 34px rgba(17, 29, 42, 0.2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.city-enter::after {
  margin-left: 12px;
  content: "↗";
  font-size: 17px;
}

.city-enter:hover {
  transform: translateY(-2px);
  background: #fffaf0;
  box-shadow: 0 18px 42px rgba(17, 29, 42, 0.28);
}

.scene-qingdao-ferry,
.scene-wuhan-ferry { opacity: 0; transform-origin: 320px 780px; }
.city-stage[data-entering-city] .city-stage__masthead,
.city-stage[data-entering-city] .city-stage__copy,
.city-stage[data-entering-city] .city-switch,
.city-stage[data-entering-city] .city-fallback,
.city-stage[data-entering-city] .city-ticket {
  opacity: 0;
  pointer-events: none;
}
.city-stage[data-entering-city] .city-stage__masthead { transform: translateY(-80px); }
.city-stage[data-entering-city="qingdao"] .city-stage__copy { transform: translateX(-10vw); }
.city-stage[data-entering-city="qingdao"] .city-switch { transform: translateX(12vw); }
.city-stage[data-entering-city="wuhan"] .city-stage__copy { transform: translateX(10vw); }
.city-stage[data-entering-city="wuhan"] .city-switch { transform: translateX(-12vw); }
.city-stage[data-entering-city="qingdao"] .city-scene--qingdao .scene-qingdao-ferry { animation: qingdao-ferry-depart 1200ms cubic-bezier(.18,.76,.25,1) both; }
.city-stage[data-entering-city="wuhan"] .city-scene--wuhan .scene-wuhan-ferry { animation: wuhan-ferry-depart 1200ms cubic-bezier(.18,.76,.25,1) both; }
.city-stage[data-entering-city] .city-stage__masthead,
.city-stage[data-entering-city] .city-stage__copy,
.city-stage[data-entering-city] .city-switch,
.city-stage[data-entering-city] .city-fallback,
.city-stage[data-entering-city] .city-ticket { transition: opacity 500ms ease, transform 760ms cubic-bezier(.22,.73,.25,1); }
@keyframes qingdao-ferry-depart {
  0% { opacity: 0; transform: translate(0, 70px) scale(1.18); }
  16% { opacity: 1; }
  100% { opacity: .18; transform: translate(520px, -390px) scale(.22); }
}
@keyframes wuhan-ferry-depart {
  0% { opacity: 0; transform: translate(-20px, 68px) scale(1.15); }
  16% { opacity: 1; }
  100% { opacity: .18; transform: translate(600px, -255px) scale(.24); }
}

.city-stage__actions p {
  margin: 0;
  color: rgba(255, 248, 237, 0.58);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.city-switch {
  position: absolute;
  z-index: 5;
  right: calc(30px + env(safe-area-inset-right));
  bottom: calc(38px + env(safe-area-inset-bottom));
  display: inline-flex;
  min-width: 156px;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--stage-line);
  color: var(--stage-ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-align: left;
}

.city-switch::after {
  display: grid;
  width: 36px;
  height: 36px;
  margin-left: 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  place-items: center;
  content: "→";
  transition: transform 180ms ease, background 180ms ease;
}

.city-switch:hover::after {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.12);
}

.city-ticket {
  position: absolute;
  z-index: 6;
  right: 10%;
  bottom: 24%;
  display: flex;
  width: 132px;
  height: 43px;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 15px;
  border: 1px solid rgba(89, 55, 56, 0.3);
  border-radius: 5px;
  color: #594241;
  background: #f2d8b2;
  box-shadow: 0 7px 20px rgba(20, 35, 48, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: rotate(-4deg) translateX(24px);
}

.city-ticket span {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.city-ticket i {
  width: 19px;
  height: 19px;
  margin-left: auto;
  border: 1px solid rgba(89, 55, 56, 0.45);
  border-radius: 50%;
}

.city-ticket__punch {
  position: absolute;
  top: 16px;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #516b78;
}

.city-ticket.is-travelling {
  animation: ticket-travel 760ms cubic-bezier(0.2, 0.72, 0.24, 1) both;
}

.river-current,
.sea-line {
  transform-box: fill-box;
  transform-origin: center;
}

.city-scene.is-active .river-current--one,
.city-scene.is-active .sea-line--one {
  animation: water-drift 9s ease-in-out infinite alternate;
}

.city-scene.is-active .river-current--two,
.city-scene.is-active .sea-line--two {
  animation: water-drift 12s ease-in-out infinite alternate-reverse;
}

.city-scene.is-active .scene-qingdao-gull {
  transform-box: fill-box;
  transform-origin: center;
  animation: gull-flight 10s ease-in-out infinite;
}

.city-scene.is-active .scene-wuhan-blossom {
  transform-box: fill-box;
  transform-origin: left top;
  animation: blossom-breathe 7s ease-in-out infinite alternate;
}

@keyframes water-drift {
  from { transform: translateX(-1.2%); opacity: 0.24; }
  to { transform: translateX(1.6%); opacity: 0.5; }
}

@keyframes gull-flight {
  0%, 100% { transform: translate3d(-1%, 1%, 0) rotate(-1deg); }
  50% { transform: translate3d(2.5%, -2%, 0) rotate(1deg); }
}

@keyframes blossom-breathe {
  from { transform: rotate(-0.4deg); }
  to { transform: rotate(0.7deg); }
}

@keyframes ticket-travel {
  0% { opacity: 0; transform: rotate(-6deg) translate3d(42px, 18px, 0); }
  22% { opacity: 0.96; }
  72% { opacity: 0.96; }
  100% { opacity: 0; transform: rotate(3deg) translate3d(-150px, -38px, 0); }
}

.city-enter:focus-visible,
.city-switch:focus-visible,
.city-indicator:focus-visible,
.city-fallback a:focus-visible {
  outline: 3px solid var(--stage-focus);
  outline-offset: 4px;
}

.city-fallback {
  position: absolute;
  z-index: 5;
  right: calc(30px + env(safe-area-inset-right));
  bottom: calc(38px + env(safe-area-inset-bottom));
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 5px;
  padding: 0 4px 0 15px;
  border-bottom: 1px solid var(--stage-line);
  color: var(--stage-ink);
  background: rgba(20, 37, 54, 0.34);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.city-fallback span {
  margin-right: 7px;
  color: var(--stage-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.city-fallback a {
  display: inline-grid;
  min-width: 48px;
  min-height: 44px;
  border-radius: 999px;
  place-items: center;
  color: var(--stage-ink);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.city-fallback a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.city-stage[data-enhanced="true"] .city-fallback {
  display: none;
}

.city-stage:not([data-enhanced="true"]) .city-switch,
.city-stage:not([data-enhanced="true"]) .city-indicators {
  visibility: hidden;
}

.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;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .city-indicators {
    background: rgba(20, 37, 54, 0.82);
  }

  .city-fallback {
    background: rgba(20, 37, 54, 0.82);
  }
}

@media (max-width: 700px) {
  .city-stage::before {
    background:
      linear-gradient(0deg, rgba(13, 28, 42, 0.82) 0%, rgba(13, 28, 42, 0.22) 58%, transparent 78%),
      linear-gradient(90deg, rgba(13, 28, 42, 0.28), transparent 68%);
  }

  .city-stage__masthead {
    align-items: center;
    padding:
      calc(15px + env(safe-area-inset-top))
      calc(17px + env(safe-area-inset-right))
      12px
      calc(19px + env(safe-area-inset-left));
  }

  .city-stage__brand {
    max-width: 7em;
    font-size: 12px;
    line-height: 1.55;
  }

  .city-stage__controls {
    display: grid;
    gap: 4px;
    justify-items: end;
  }

  .city-indicators {
    gap: 2px;
  }

  .city-indicator {
    min-width: 51px;
    padding: 0 10px;
  }

  .city-indicator span {
    font-size: 12px;
  }

  .city-stage__copy {
    bottom: calc(116px + env(safe-area-inset-bottom));
    left: calc(22px + env(safe-area-inset-left));
    width: min(340px, calc(100% - 44px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }

  .city-stage__kicker {
    margin-bottom: 11px;
    font-size: 10px;
  }

  .city-stage__visit {
    margin-bottom: 9px;
  }

  .city-stage h1 {
    font-size: clamp(56px, 18vw, 74px);
  }

  .city-stage__tagline {
    max-width: 19em;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  .city-stage__actions {
    margin-top: 21px;
  }

  .city-enter {
    min-height: 48px;
    padding: 0 22px;
    font-size: 14px;
  }

  .city-stage__actions p {
    display: none;
  }

  .city-switch {
    right: calc(17px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: calc(17px + env(safe-area-inset-left));
    width: auto;
    min-height: 52px;
    padding-left: 6px;
  }

  .city-ticket {
    right: 8%;
    bottom: 32%;
    transform: scale(0.86) rotate(-4deg);
  }

  .city-scene--wuhan .city-scene__art {
    width: 152%;
    margin-left: -26%;
  }

  .city-scene--qingdao .city-scene__art {
    width: 160%;
    margin-left: -30%;
  }
}

@media (max-height: 360px) and (min-width: 500px) {
  .city-stage__masthead {
    align-items: flex-start;
    padding:
      calc(8px + env(safe-area-inset-top))
      calc(16px + env(safe-area-inset-right))
      4px
      calc(16px + env(safe-area-inset-left));
  }

  .city-stage__brand {
    max-width: none;
    font-size: 12px;
    line-height: 1.4;
  }

  .city-stage__controls {
    display: flex;
    gap: 6px;
  }

  .city-indicators {
    gap: 2px;
  }

  .city-indicator {
    min-width: 50px;
    min-height: 44px;
    padding: 0 10px;
  }

  .city-stage__copy {
    top: calc(64px + env(safe-area-inset-top));
    bottom: auto;
    left: max(4vw, calc(22px + env(safe-area-inset-left)));
    width: min(300px, calc(55vw - env(safe-area-inset-left)));
  }

  .city-stage__kicker {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .city-stage__visit,
  .city-stage__tagline,
  .city-stage__actions p,
  .city-ticket {
    display: none;
  }

  .city-stage h1 {
    font-size: clamp(42px, 7vw, 52px);
    line-height: 0.95;
  }

  .city-stage__actions {
    margin-top: 9px;
  }

  .city-enter {
    min-height: 44px;
    padding: 0 20px;
    font-size: 13px;
  }

  .city-switch,
  .city-fallback {
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .city-switch {
    min-height: 44px;
  }
}

@media (max-width: 370px), (min-height: 361px) and (max-height: 700px) {
  .city-stage__copy {
    bottom: calc(101px + env(safe-area-inset-bottom));
  }

  .city-stage h1 {
    font-size: 54px;
  }

  .city-stage__tagline {
    margin-top: 10px;
  }

  .city-stage__actions {
    margin-top: 15px;
  }

  .city-enter {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .city-stage[data-entering-city="qingdao"] .city-scene--qingdao .scene-qingdao-ferry,
  .city-stage[data-entering-city="wuhan"] .city-scene--wuhan .scene-wuhan-ferry { animation: none; }
  .city-scene,
  .city-enter,
  .city-switch::after,
  .city-indicator,
  .city-ticket,
  .river-current,
  .sea-line,
  .scene-qingdao-gull,
  .scene-wuhan-blossom {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .city-ticket {
    display: none;
  }
}
