:root {
  --amap-phone-width: 330px;
  --amap-phone-height: 678.333px;
}

.online-demo > .amap-phone-scale-shell {
  position: relative;
  flex: 0 0 auto;
  width: min(402px, 34vw);
  aspect-ratio: 9 / 18.5;
  overflow: visible;
}

.online-demo > .amap-phone-scale-shell > .palace-phone {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--amap-phone-width) !important;
  height: var(--amap-phone-height) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 9px !important;
  border-radius: 50px !important;
  transform-origin: 0 0;
  container-type: inline-size;
  will-change: transform;
}

.online-demo > .amap-phone-scale-shell > .palace-phone > .palace-screen {
  border-radius: 42px !important;
}

html.is-cover .amap-phone-scale-shell {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  background: transparent;
}

html.is-cover .amap-phone-scale-shell > .palace-phone {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

html.is-cover .amap-phone-scale-shell > .palace-phone > .palace-screen {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.cover-vision {
  display: none;
}

html.is-cover .cover-vision {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #536c77;
  color: #fff;
  font-family: "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s ease;
  isolation: isolate;
}

html.is-cover .cover-vision[data-stage="enter"],
html.is-cover .cover-vision[data-stage="locate"],
html.is-cover .cover-vision[data-stage="poi"],
html.is-cover .cover-vision[data-stage="answer"],
html.is-cover .cover-vision[data-stage="static"] {
  opacity: 1;
}

html.is-cover .cover-vision::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 24, .08) 0 46%, rgba(7, 13, 18, .82) 76%, rgba(5, 9, 12, .93));
  opacity: 0;
  transition: opacity .7s ease;
}

html.is-cover .cover-vision[data-stage="answer"]::after,
html.is-cover .cover-vision[data-stage="static"]::after {
  opacity: 1;
}

.cover-vision-camera {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url("assets/amap/taihe-palace-cover.webp") 50% center / auto 100% no-repeat;
  filter: saturate(.93) contrast(1.03);
  transform: scale(1.08) translate3d(-2.8%, 0, 0);
  transform-origin: 50% 55%;
  transition: transform 1.3s cubic-bezier(.22, 1, .36, 1), filter .7s ease;
}

[data-stage="locate"] .cover-vision-camera,
[data-stage="poi"] .cover-vision-camera {
  transform: scale(1.035) translate3d(0, 0, 0);
}

[data-stage="answer"] .cover-vision-camera,
[data-stage="static"] .cover-vision-camera {
  filter: saturate(.72) contrast(1.04) brightness(.72);
  transform: scale(1.015) translate3d(0, -.5%, 0);
}

.cover-vision-controls {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 14px;
  display: grid;
  gap: 9px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease .2s, transform .5s cubic-bezier(.22, 1, .36, 1) .2s;
}

.cover-vision-controls i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(248, 250, 252, .9);
  box-shadow: 0 5px 15px rgba(8, 18, 25, .18);
  color: #121a1f;
  font: 700 14px/1 Arial, sans-serif;
  font-style: normal;
  backdrop-filter: blur(12px);
}

.cover-vision-controls i:last-child {
  font-size: 22px;
  transform: rotate(180deg);
}

[data-stage]:not([data-stage="idle"]) .cover-vision-controls {
  opacity: 1;
  transform: none;
}

.cover-vision-poi {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.cover-vision-poi > i {
  position: absolute;
  left: calc(50% - 16px);
  top: 286px;
  width: 32px;
  height: 32px;
  border: 5px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: #f05237;
  box-shadow: 0 4px 16px rgba(33, 21, 15, .3), 0 0 0 7px rgba(240, 82, 55, .12);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .22s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
}

.cover-vision-poi article {
  position: absolute;
  left: 52px;
  top: 78px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  width: 218px;
  min-height: 94px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  background: rgba(22, 31, 39, .84);
  box-shadow: 0 12px 28px rgba(5, 12, 18, .28);
  opacity: 0;
  transform: translateY(12px) scale(.96);
  transition: opacity .32s ease, transform .62s cubic-bezier(.22, 1, .36, 1);
  backdrop-filter: blur(15px) saturate(1.18);
}

.cover-vision-poi article::after {
  content: "";
  position: absolute;
  left: calc(50% - 9px);
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: rgba(22, 31, 39, .84);
  transform: rotate(45deg);
}

.cover-vision-poi article > span {
  border-radius: 9px;
  background: url("assets/amap/taihe-palace-cover.webp") center / auto 100% no-repeat;
}

.cover-vision-poi article div {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 3px 2px 2px 9px;
}

.cover-vision-poi b,
.cover-vision-poi p,
.cover-vision-poi small {
  display: block;
  margin: 0;
}

.cover-vision-poi b {
  font-size: 17px;
  line-height: 1.25;
}

.cover-vision-poi p {
  margin-top: 7px;
  color: #cfd6db;
  font-size: 10px;
  white-space: nowrap;
}

.cover-vision-poi p strong,
.cover-vision-poi p em {
  display: inline-block;
  margin-right: 3px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #287cff;
  color: #fff;
  font-style: normal;
}

.cover-vision-poi p em {
  background: rgba(40, 124, 255, .45);
}

.cover-vision-poi small {
  margin-top: 7px;
  overflow: hidden;
  color: #aeb9bf;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-stage="locate"] .cover-vision-poi > i,
[data-stage="poi"] .cover-vision-poi > i,
[data-stage="answer"] .cover-vision-poi > i,
[data-stage="static"] .cover-vision-poi > i {
  opacity: 1;
  transform: scale(1);
}

[data-stage="poi"] .cover-vision-poi article,
[data-stage="answer"] .cover-vision-poi article,
[data-stage="static"] .cover-vision-poi article {
  opacity: 1;
  transform: none;
}

.cover-vision-heading {
  position: absolute;
  z-index: 5;
  left: 18px;
  top: 392px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .38s ease .08s, transform .7s cubic-bezier(.22, 1, .36, 1) .08s;
}

.cover-vision-heading b,
.cover-vision-heading span {
  display: block;
}

.cover-vision-heading b {
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -.04em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .32);
}

.cover-vision-heading span {
  margin-top: 5px;
  color: #c9fff6;
  font-size: 16px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .34);
}

.cover-vision-answer {
  position: absolute;
  z-index: 5;
  left: 10px;
  right: 10px;
  bottom: 75px;
  min-height: 112px;
  margin: 0;
  padding: 19px 17px 18px 38px;
  border-radius: 19px;
  background: rgba(25, 32, 38, .76);
  box-shadow: 0 13px 28px rgba(2, 9, 14, .32), inset 0 1px 0 rgba(255, 255, 255, .11);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .4s ease .16s, transform .75s cubic-bezier(.22, 1, .36, 1) .16s;
  backdrop-filter: blur(17px) saturate(1.18);
}

.cover-vision-answer::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(59, 143, 255, .35), #29d8d1, #8d6bff, rgba(59, 143, 255, .35));
  background-size: 220% 100%;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: coverVisionGlow 2.8s linear infinite;
}

.cover-vision-answer > i {
  position: absolute;
  left: 17px;
  top: 20px;
  color: #d9fff8;
  font-style: normal;
}

.cover-vision-answer p {
  margin: 0;
  color: #e3e8eb;
  font-size: 13px;
  line-height: 1.65;
}

.cover-vision-answer strong {
  color: #fff;
  font-weight: 750;
}

[data-stage="answer"] .cover-vision-heading,
[data-stage="static"] .cover-vision-heading,
[data-stage="answer"] .cover-vision-answer,
[data-stage="static"] .cover-vision-answer {
  opacity: 1;
  transform: none;
}

.cover-vision-dock {
  position: absolute;
  z-index: 6;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  height: 54px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease .2s, transform .55s cubic-bezier(.22, 1, .36, 1) .2s;
}

[data-stage]:not([data-stage="idle"]) .cover-vision-dock {
  opacity: 1;
  transform: none;
}

.cover-vision-map,
.cover-vision-talk {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(35, 42, 46, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(15px);
}

.cover-vision-map {
  border-radius: 50%;
}

.cover-vision-map svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cover-vision-talk {
  grid-template-columns: 30px auto;
  gap: 8px;
  border-radius: 27px;
}

.cover-vision-talk > i {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f6f7f7;
}

.cover-vision-talk > i::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 10px;
  height: 10px;
  background: repeating-linear-gradient(90deg, #192226 0 2px, transparent 2px 4px);
}

.cover-vision-talk b {
  font-size: 15px;
  font-weight: 650;
}

@keyframes coverVisionGlow {
  to { background-position: 220% 0; }
}

@media (max-width: 1000px) {
  .online-demo > .amap-phone-scale-shell {
    width: min(380px, 58vw, calc((100vh - 92px) * 9 / 18.5));
  }
}

@media (max-width: 700px) {
  .online-demo > .amap-phone-scale-shell {
    width: min(360px, 90vw);
  }

  html:not(.from-amap-cover) .hero .online-demo > .amap-phone-scale-shell {
    width: min(280px, 72vw, calc((100svh - 275px) * 9 / 18.5));
  }

  html:not(.from-amap-cover) .hero .online-screen {
    overflow: hidden !important;
    contain: layout paint;
  }

  html:not(.from-amap-cover) .hero .live-answer-sheet {
    top: 165px;
    right: 0;
    bottom: auto !important;
    left: 0;
    width: auto;
    height: calc(100% - 232px);
    min-width: 0;
    max-width: 100%;
    max-height: calc(100% - 232px);
    box-sizing: border-box;
  }

  html:not(.from-amap-cover) .hero .live-answer-sheet.expanded {
    transform: none !important;
    transition: none;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  html:not(.from-amap-cover) .hero .online-demo > .amap-phone-scale-shell {
    width: min(205px, 52vw, calc((100svh - 92px) * 9 / 18.5));
  }
}

.online-screen,
.live-answer-sheet,
.answer-copy,
.answer-detail,
.place-list,
.place-list article {
  min-width: 0;
  max-width: 100%;
}

.live-answer-sheet.expanded {
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  contain: layout paint;
}

.live-answer-sheet.expanded .answer-copy,
.live-answer-sheet.expanded .answer-detail {
  overflow-wrap: anywhere;
}

.place-list article {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

@media (min-width: 901px) and (max-height: 800px) {
  .hero .online-demo > .amap-phone-scale-shell {
    width: min(330px, 29vw, calc((100vh - 100px) * 9 / 18.5));
  }
}

@media (prefers-reduced-motion: reduce) {
  .online-demo > .amap-phone-scale-shell > .palace-phone {
    will-change: auto;
  }

  .cover-vision,
  .cover-vision::after,
  .cover-vision * {
    animation: none !important;
    transition: none !important;
  }
}
