/* 全站客服和社交入口。尺寸随屏宽 clamp 缩放 */
.service-avatar {
  --service-w: clamp(5.5rem, 4.5rem + 4vw, 7.75rem);
  display: block;
  position: relative;
  width: var(--service-w);
  height: calc(var(--service-w) * 108.5 / 124);
  flex-shrink: 0;
  isolation: isolate;
  pointer-events: none;
}
.service-avatar::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 15%;
  bottom: 0;
  width: 65%;
  height: 78%;
  border-radius: 48% 48% 45% 45%;
  background: linear-gradient(145deg, #f0f8f4, #d0e6e3);
  box-shadow: inset 0 0 0 1px #ffffffc2;
}
.service-avatar-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 2px #183c4920);
}
.service-wave {
  transform-box: view-box;
  transform-origin: 109px 106px;
  animation: meiya-wave 4.8s ease-in-out 1;
}
.service-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: meiya-blink 4.8s ease-in-out 1;
}
.service-greeting-lines {
  opacity: 0;
  animation: meiya-hello 4.8s ease-in-out 1;
}
.service-float {
  /* 随视口明显缩放：1051px 附近约 81px，1600px 以上到上限 112px */
  --service-w: clamp(4rem, 1.75rem + 5vw, 7rem);
  position: fixed;
  z-index: 42;
  right: clamp(12px, 1.5vw, 20px);
  top: 82%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--service-w);
  padding: 0 0 3px;
  border: 0;
  border-radius: calc(var(--service-w) * 0.19);
  background: transparent;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.service-float .service-avatar {
  --service-w: inherit;
  width: 100%;
  height: calc(var(--service-w) * 108.5 / 124);
}
.service-float-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  min-height: clamp(1.875rem, 0.3 * var(--service-w), 2.375rem);
  margin-top: calc(var(--service-w) * -0.065);
  border: 1px solid #ffffffcc;
  border-radius: 999px;
  background: #286d79;
  color: #fff;
  box-shadow: 0 5px 14px #163d4729;
  font-size: clamp(0.75rem, 0.55rem + 0.4vw, 0.9375rem);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.06em;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.service-float:hover .service-float-label {
  background: #1f5765;
  box-shadow: 0 7px 18px #163d4738;
}
.service-float:focus-visible {
  outline: 2px solid #286d79;
  outline-offset: 4px;
}
@keyframes meiya-wave {
  0%,
  6%,
  52%,
  100% {
    transform: rotate(0);
  }
  13%,
  27%,
  41% {
    transform: rotate(-9deg);
  }
  20%,
  34%,
  47% {
    transform: rotate(9deg);
  }
}
@keyframes meiya-wave-again {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-9deg);
  }
  40%,
  80% {
    transform: rotate(9deg);
  }
}
@keyframes meiya-blink {
  0%,
  60%,
  66%,
  100% {
    transform: scaleY(1);
  }
  63% {
    transform: scaleY(0.12);
  }
}
@keyframes meiya-hello {
  0%,
  6%,
  53%,
  100% {
    opacity: 0;
  }
  12%,
  43% {
    opacity: 1;
  }
}
@media (hover: hover) and (pointer: fine) {
  .service-float:hover .service-wave,
  .mobile-online:hover .service-wave {
    animation: meiya-wave-again 1.6s ease-in-out 1;
  }
}
.service-float:focus-visible .service-wave,
.mobile-online:focus-visible .service-wave {
  animation: meiya-wave-again 1.6s ease-in-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .service-wave,
  .service-eyes,
  .service-greeting-lines {
    animation: none !important;
  }
  .service-float-label {
    transition: none;
  }
}
.footer-social {
  margin-top: 28px;
}
.footer-social h3 {
  color: #fff;
  font-size: 1rem;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid #cbd1e04d;
  border-radius: 5px;
  color: #e9eef8;
  transition: background 0.2s;
}
.social-link:hover {
  background: #ffffff16;
}
.social-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: #ffffff18;
  border-radius: 5px;
  font:
    700 13px/1 Arial,
    sans-serif;
  flex-shrink: 0;
}
.contact-dialog {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
}
.contact-kicker {
  display: block;
  color: #626e9c;
  font-size: 0.8125rem;
  margin-bottom: 7px;
}
.contact-dialog .dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.contact-dialog .dialog-head h2 {
  font-size: 1.4375rem;
}
.contact-dialog .dialog-head > .icon-button {
  flex-shrink: 0;
}
#contact-message {
  font-size: 1rem;
  color: #606c83;
  line-height: 1.8;
  margin-bottom: 22px;
}
.contact-actions {
  display: grid;
  gap: 12px;
}
.contact-actions > a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 16px;
  border: 1px solid #dce2ec;
  border-radius: 7px;
  background: #f6f7fa;
}
.contact-actions > a:hover {
  border-color: #626e9c;
}
.contact-actions > a > span {
  flex: 1;
  min-width: 0;
}
.contact-actions strong,
.contact-actions small {
  display: block;
  overflow-wrap: anywhere;
}
.contact-actions strong {
  font-size: 1.125rem;
}
.contact-actions small {
  font-size: 0.9375rem;
  color: #606c83;
  margin-top: 3px;
}
.contact-address {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: #606c83;
  margin: 22px 0 0;
}
.contact-address .icon {
  margin-top: 3px;
  flex-shrink: 0;
}
.meiya-contact .contact-online {
  margin-bottom: 16px;
  margin-right: 16px;
}
.meiya-contact .contact-secondary {
  display: inline-flex;
  width: fit-content;
}
.footer-grid a.footer-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  margin-top: 8px;
  border: 1px solid #cbd1e077;
  border-radius: 5px;
  color: #fff;
}
.meiya-contact-social {
  margin-top: 28px;
}
.meiya-contact-social .social-link {
  color: #424b66;
  border-color: #d3d9e3;
}
.meiya-contact-social .social-mark {
  background: #e8ecf4;
}
@media (max-width: 1050px) {
  .service-float {
    display: none;
  }
  body,
  body[data-page='plan'] {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }
  .mobile-bottom,
  body[data-page='plan'] .mobile-bottom {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: calc(108px + env(safe-area-inset-bottom));
    padding: 36px 0 env(safe-area-inset-bottom);
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    filter: drop-shadow(0 -3px 8px #263e5012);
    isolation: isolate;
    pointer-events: none;
    transform: none;
    visibility: visible;
    overflow: visible;
    z-index: 45;
  }
  .mobile-nav-surface {
    position: absolute;
    top: 36px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    width: auto;
    margin: 0;
    /* 白底上提，盖住曲线下沿的抗锯齿缝 */
    background: linear-gradient(transparent 46px, #fff 46px);
    pointer-events: none;
  }
  .mobile-nav-surface::before,
  .mobile-nav-surface::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    background: #fff;
  }
  /* 五项时客服居中。左右白条各伸进曲线 4px，避免深色页底从接缝透出 */
  .mobile-nav-surface::before {
    left: 0;
    right: calc(50% + 70px);
    border-radius: 20px 0 0;
  }
  .mobile-nav-surface::after {
    left: calc(50% + 70px);
    right: 0;
    border-radius: 0 20px 0 0;
  }
  .mobile-nav-curve {
    position: absolute;
    top: 0;
    left: calc(50% - 74px);
    width: 148px;
    height: 52px;
  }
  .mobile-nav-item {
    position: relative;
    z-index: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
    min-height: 60px;
    padding: 9px 2px 10px;
    border-radius: 16px;
    color: #758395;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.45;
    white-space: nowrap;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-home {
    grid-column: 1;
  }
  .mobile-destinations {
    grid-column: 2;
  }
  .mobile-online {
    grid-column: 3;
  }
  .mobile-themes {
    grid-column: 4;
  }
  .mobile-plan {
    grid-column: 5;
  }
  .mobile-nav-item > .icon {
    width: 25px;
    height: 25px;
    stroke-width: 1.65;
  }
  .mobile-nav-item[aria-current='page'] {
    color: #26717d;
    font-weight: 750;
  }
  .mobile-nav-item[aria-current='page'] > .icon {
    fill: #e2f0ed;
    stroke-width: 2;
  }
  .mobile-nav-item[aria-current='page']::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: #26717d;
  }
  .mobile-nav-item:focus-visible {
    outline: 2px solid #26717d;
    outline-offset: -3px;
  }
  .mobile-online {
    color: #286d79;
    font-weight: 650;
  }
  .mobile-online .service-avatar {
    --service-w: clamp(4rem, 3.2rem + 6vw, 5.125rem);
    position: absolute;
    width: var(--service-w);
    height: calc(var(--service-w) * 71.75 / 82);
    left: 50%;
    top: calc(var(--service-w) * -0.32);
    transform: translateX(-50%);
    pointer-events: auto;
  }
  .mobile-online .service-avatar::before {
    left: 15%;
    bottom: 0;
    width: 65%;
    height: 78%;
    background: linear-gradient(145deg, #f5f9ee, #d7eae2);
  }
  .mobile-online .service-wave,
  .mobile-online .service-eyes,
  .mobile-online .service-greeting-lines {
    animation-iteration-count: infinite;
  }
  .mobile-online .mobile-nav-label {
    position: relative;
  }
  body[data-page='home'] .mobile-bottom {
    transform: none;
    background: transparent;
  }
  body[data-page='home'] .v-back-top {
    bottom: calc(118px + env(safe-area-inset-bottom));
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .toast {
    bottom: calc(120px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 700px) {
  .contact-dialog .dialog-head {
    padding: 18px;
  }
  .contact-dialog .dialog-content {
    padding: 20px;
  }
  .contact-dialog .dialog-head h2 {
    font-size: 1.25rem;
  }
  .contact-actions > a {
    gap: 10px;
    padding: 14px;
  }
  .contact-actions > a > .icon:last-child {
    width: 16px;
  }
  .contact-actions strong {
    font-size: 1.0625rem;
  }
  .contact-actions small {
    font-size: 0.875rem;
  }
  .social-link {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }
}
