:root {
  --surface: #f7f7f8;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: rgba(17, 17, 17, 0.18);
  --accent: #ff4f00;
  --pine: #12382f;
  --page-x: 24px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
}

body.is-locked {
  overflow: hidden;
}

.ending-embed {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #ffffff;
  overflow-anchor: none;
}

.ending-frame {
  display: block;
  width: 100%;
  min-height: 100svh;
  border: 0;
  background: #ffffff;
  overflow-anchor: none;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
video {
  display: block;
}

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

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #111111;
}

.hero__video,
.hero__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__video {
  object-fit: cover;
  object-position: 50% 50%;
}

.hero__veil {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.52));
  pointer-events: none;
}

.hero__brand {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(72px, calc(env(safe-area-inset-bottom) + 54px));
  width: min(82%, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero__brand img {
  width: 204px;
  height: auto;
}

.hero__brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
}

.motion-control {
  position: absolute;
  z-index: 3;
  top: max(22px, env(safe-area-inset-top));
  right: var(--page-x);
  width: 44px;
  height: 44px;
  display: grid;
  grid-template-columns: 3px 3px;
  place-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.motion-control span {
  width: 3px;
  height: 13px;
  background: currentColor;
}

.motion-control.is-paused {
  grid-template-columns: 0;
}

.motion-control.is-paused span:first-child {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  background: transparent;
}

.motion-control.is-paused span:last-child {
  display: none;
}

.home-flow {
  position: relative;
  min-height: 300svh;
  overflow: hidden;
  padding-bottom: max(72px, env(safe-area-inset-bottom));
  background: var(--paper);
}

.introduction {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 86px var(--page-x) 64px;
}

.swipe-cue {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #9a9a9a;
}

.swipe-cue span {
  margin-bottom: 15px;
  font-size: 16px;
}

.swipe-cue i {
  width: 30px;
  height: 30px;
  margin-top: -16px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
  animation: cue-rise 2.2s ease-in-out infinite;
}

.swipe-cue i:nth-of-type(2) {
  animation-delay: 120ms;
  opacity: 0.7;
}

.swipe-cue i:nth-of-type(3) {
  animation-delay: 240ms;
  opacity: 0.4;
}

.introduction__copy {
  width: min(100%, 820px);
  margin: auto 0;
  color: var(--ink);
  text-align: center;
}

.introduction__logo {
  width: 176px;
  height: auto;
  margin: 0 auto 28px;
}

.introduction__copy div {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
}

.introduction__copy p {
  margin: 0;
  white-space: pre-line;
}

.city-portals {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 40px 0 74px;
  display: flex;
  flex-direction: column;
  gap: 54px;
}

.city-portal-entry {
  position: relative;
  width: 100%;
}

.city-portal {
  position: relative;
  width: min(82vw, 430px);
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #333333;
  cursor: pointer;
  isolation: isolate;
}

.city-portal--left {
  align-self: flex-start;
  transform: translateX(-24%);
}

.city-portal--right {
  align-self: flex-end;
  transform: translateX(24%);
}

.city-portal img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--drift-x-start, 50%) var(--drift-y-start, 50%);
  scale: 1.005;
  filter: saturate(0.76) contrast(0.92) brightness(0.78);
  transition: transform 600ms ease, filter 600ms ease;
  animation: city-image-drift var(--drift-duration, 11s) ease-in-out infinite alternate paused;
}

.city-portal.is-in-view img {
  animation-play-state: running;
}

.city-portal[data-city="haikou"] {
  --drift-x-start: 46%;
  --drift-x-end: 51%;
  --drift-y-start: 50%;
  --drift-y-end: 52%;
  --drift-duration: 11s;
}

.city-portal[data-city="boao"] {
  --drift-x-start: 53%;
  --drift-x-end: 48%;
  --drift-y-start: 49%;
  --drift-y-end: 51%;
  --drift-duration: 12s;
}

.city-portal[data-city="wanning"] {
  --drift-x-start: 48%;
  --drift-x-end: 53%;
  --drift-y-start: 51%;
  --drift-y-end: 48%;
  --drift-duration: 10s;
}

.city-portal[data-city="sanya"] {
  --drift-x-start: 52%;
  --drift-x-end: 48%;
  --drift-y-start: 48%;
  --drift-y-end: 52%;
  --drift-duration: 13s;
}

.city-portal::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
}

.city-portal__copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.city-discovery-cue {
  position: absolute;
  z-index: 2;
  top: 52%;
  left: 52%;
  width: 138px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 8px;
  border: 0;
  color: #8e7046;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transform: translateY(-50%);
}

.city-discovery-cue span {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
}

.city-discovery-cue i {
  position: relative;
  width: 72px;
  height: 12px;
  animation: city-cue-point 1s ease-in-out infinite;
}

.city-discovery-cue i::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 72px;
  height: 1px;
  background: currentColor;
  transform: translateY(-50%);
}

.city-discovery-cue i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.city-portal strong {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.1;
}

.city-title-motion {
  display: inline-flex;
  overflow: hidden;
  color: #ffffff;
  transition: color 180ms ease, transform 180ms ease;
}

.city-title-motion__char {
  display: inline-block;
  opacity: 0;
  transform: translateY(115%);
}

.city-portal.is-in-view .city-title-motion__char {
  animation: city-title-reveal 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.city-portal.is-in-view .city-title-motion__char:nth-child(2) {
  animation-delay: 100ms;
}

.city-portal:active .city-title-motion {
  color: #fffdf7;
  transform: translateY(-2px);
}

@media (hover: hover) {
  .city-portal:hover .city-title-motion,
  .city-portal:focus-visible .city-title-motion {
    color: #fffdf7;
    transform: translateY(-2px);
  }
}

.city-portal small {
  font-size: 14px;
  line-height: 1.45;
}

.city-portal:hover img,
.city-portal:focus-visible img {
  transform: scale(1.035);
  filter: saturate(0.86) contrast(0.96) brightness(0.84);
}

@keyframes city-cue-point {
  0%, 100% { transform: translateX(5px); opacity: 0.62; }
  55% { transform: translateX(-6px); opacity: 1; }
}

@keyframes city-image-drift {
  from {
    scale: 1.005;
    object-position: var(--drift-x-start, 50%) var(--drift-y-start, 50%);
  }
  to {
    scale: 1.045;
    object-position: var(--drift-x-end, 52%) var(--drift-y-end, 50%);
  }
}

@keyframes city-title-reveal {
  from {
    opacity: 0;
    transform: translateY(115%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.city-view,
.concierge-view {
  position: fixed;
  z-index: 50;
  inset: 0;
  visibility: hidden;
  overflow-y: auto;
  opacity: 0;
  background: var(--paper);
  transition: opacity 240ms ease, visibility 240ms ease;
}

.city-view.is-open,
.concierge-view.is-open {
  visibility: visible;
  opacity: 1;
}

.subpage-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--page-x) 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.subpage-nav img {
  width: 138px;
  height: auto;
}

.icon-button,
.home-link {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
}

.icon-button span {
  width: 12px;
  height: 12px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
}

.home-link {
  justify-self: start;
  color: var(--muted);
  font-size: 14px;
}

.city-heading {
  min-height: 48svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 78px var(--page-x) 62px;
  text-align: center;
}

.city-index {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
}

.city-heading h2 {
  margin: 0;
  color: var(--pine);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
}

.city-story {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.experience-list {
  width: min(100%, 980px);
  margin: 0 auto;
}

.experience {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.experience:last-child {
  border-bottom: 1px solid var(--line);
}

.experience--reverse {
  grid-template-columns: minmax(0, 1fr);
}

.experience figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.experience img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.experience__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  padding: 28px var(--page-x) 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.experience--reverse figure {
  order: initial;
}

.experience--reverse .experience__copy {
  order: initial;
  border-right: 0;
  border-left: 0;
}

.experience__copy h3 {
  margin: 0;
  color: var(--pine);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
}

.experience__copy p {
  max-width: 36em;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.city-footer {
  min-height: 42svh;
  display: grid;
  place-items: center;
  padding: 72px var(--page-x);
}

.concierge-view {
  overflow: hidden;
  background: #ededed;
}

.concierge-view .subpage-nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
}

.chat-shell {
  width: min(100%, 760px);
  height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: calc(104px + env(safe-area-inset-top)) var(--page-x) max(18px, env(safe-area-inset-bottom));
  background: #ededed;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.advisor-avatar {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--pine);
  font-size: 17px;
}

.chat-header h2,
.chat-header p {
  margin: 0;
}

.chat-header h2 {
  font-size: 24px;
  font-weight: 500;
}

.chat-header p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.chat-header p > span:first-child {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f8d58;
}

.chat-messages {
  overflow-y: auto;
  padding: 24px 0;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
}

.chat-row--guest {
  justify-content: flex-end;
}

.message-avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #ffffff;
  background: var(--pine);
  font-size: 14px;
}

.message-avatar--guest {
  color: var(--ink);
  background: #d9d9d9;
  font-size: 12px;
}

.chat-message {
  position: relative;
  width: fit-content;
  max-width: calc(86% - 53px);
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: #ffffff;
  font-size: 16px;
  line-height: 1.65;
}

.chat-message--advisor::before,
.chat-message--guest::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.chat-message--advisor::before {
  left: -7px;
  border-right: 8px solid #ffffff;
}

.chat-message--guest {
  color: var(--ink);
  background: #95ec69;
}

.chat-message--guest::after {
  right: -7px;
  border-left: 8px solid #95ec69;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #d5d5d5;
  background: #f7f7f7;
}

.chat-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  padding: 11px 13px;
  border: 0;
  border-radius: 5px;
  outline: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.45;
}

.chat-composer textarea:focus {
  box-shadow: inset 0 0 0 1px #c9c9c9;
}

.send-button {
  width: 64px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  background: #07c160;
  cursor: pointer;
  font-size: 15px;
}

.send-button:hover,
.send-button:focus-visible {
  background: #06ad56;
}

.chat-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes cue-rise {
  0%, 100% { transform: translateY(5px) rotate(45deg); }
  50% { transform: translateY(-3px) rotate(45deg); }
}

@media (min-width: 480px) and (max-width: 759px) {
  .introduction__copy div {
    font-size: 17px;
  }
}

@media (min-width: 760px) {
  :root {
    --page-x: 56px;
  }

  .hero__brand {
    bottom: 86px;
  }

  .hero__brand img {
    width: 250px;
  }

  .hero__brand h1 {
    font-size: 21px;
  }

  .introduction {
    padding-top: 94px;
  }

  .swipe-cue span,
  .introduction__copy div {
    font-size: 22px;
  }

  .introduction__logo {
    width: 220px;
    margin-bottom: 34px;
  }

  .city-portals {
    gap: 72px;
  }

  .city-portal--left {
    transform: translateX(-30%);
  }

  .city-portal--right {
    transform: translateX(30%);
  }

  .city-portal strong {
    font-size: 44px;
  }

  .city-portal small {
    font-size: 16px;
  }

  .subpage-nav img {
    width: 176px;
  }

  .city-heading h2 {
    font-size: 72px;
  }

  .city-story {
    font-size: 19px;
  }

  .experience {
    width: min(100%, 920px);
    margin: 0 auto;
  }

  .experience figure {
    aspect-ratio: 16 / 11;
  }

  .experience__copy {
    padding: 34px 48px 42px;
  }

  .experience__copy h3 {
    font-size: 30px;
  }

  .experience__copy p {
    font-size: 17px;
  }

  .chat-shell {
    padding-right: 48px;
    padding-left: 48px;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .chat-message {
    max-width: calc(72% - 53px);
  }
}

@media (max-height: 700px) {
  .hero {
    min-height: 100svh;
  }

  .hero__brand {
    bottom: max(38px, calc(env(safe-area-inset-bottom) + 24px));
  }

  .introduction {
    padding-top: 58px;
  }

  .swipe-cue {
    min-height: 118px;
  }

  .chat-shell {
    padding-top: calc(92px + env(safe-area-inset-top));
  }

  .chat-header {
    padding-bottom: 14px;
  }

  .chat-messages {
    padding: 14px 0;
  }

  .chat-message {
    padding: 10px 13px;
    font-size: 14px;
  }

  .chat-composer textarea,
  .send-button {
    min-height: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* B 1.1.0 city integration shell. Approved city layouts render full-bleed. */
.city-view {
  overflow: hidden;
  background: var(--surface);
}

.city-frame-shell,
.city-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.city-frame {
  z-index: 1;
  border: 0;
  opacity: 0;
  background: var(--paper);
  transition: opacity 240ms ease;
}

.city-frame.is-ready {
  opacity: 1;
}

.city-frame-loader {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
  transition: opacity 180ms ease;
}

.city-frame-loader span {
  width: 46px;
  height: 1px;
  overflow: hidden;
  background: rgba(18, 56, 47, 0.18);
}

.city-frame-loader span::after {
  content: "";
  display: block;
  width: 55%;
  height: 100%;
  background: var(--pine);
  animation: city-load 900ms ease-in-out infinite alternate;
}

.city-frame-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.city-back--floating {
  position: fixed;
  z-index: 58;
  top: max(18px, calc(env(safe-area-inset-top) + 10px));
  right: var(--page-x);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 22px rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.city-back--floating span {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
}

.city-back--floating:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

@keyframes city-load {
  from { transform: translateX(-42%); }
  to { transform: translateX(122%); }
}

@media (prefers-reduced-motion: reduce) {
  .city-frame-loader span::after {
    animation: none;
  }
}
