/* 全站客服和社交入口。 */
.service-avatar {
  display: block;
  position: relative;
  width: 124px;
  height: 108.5px;
  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 {
  position: fixed;
  z-index: 42;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 124px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.service-float-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 38px;
  margin-top: -8px;
  border: 1px solid #ffffffcc;
  border-radius: 22px;
  background: #286d79;
  color: #fff;
  box-shadow: 0 5px 14px #163d4729;
  font-size: 15px;
  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: 16px;
}
.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: 14px;
  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: 13px;
  margin-bottom: 7px;
}
.contact-dialog .dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.contact-dialog .dialog-head h2 {
  font-size: 23px;
}
.contact-dialog .dialog-head > .icon-button {
  flex-shrink: 0;
}
#contact-message {
  font-size: 16px;
  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: 18px;
}
.contact-actions small {
  font-size: 15px;
  color: #606c83;
  margin-top: 3px;
}
.contact-address {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 14px;
  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));
    align-items: stretch;
    gap: 0;
    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;
  }
  .mobile-nav-surface {
    position: absolute;
    inset: 36px 0 0;
    z-index: -1;
    /* 白底上提，盖住曲线下沿的抗锯齿缝 */
    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;
    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: 11px;
    font-weight: 500;
    line-height: 1.45;
    white-space: nowrap;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  .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 {
    position: absolute;
    width: 82px;
    height: 71.75px;
    left: 50%;
    top: -26px;
    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 .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;
  }
  body[data-page='plan']:has(
      #plan-form input:not([type='radio']):not([type='checkbox']):focus
    )
    .mobile-bottom,
  body[data-page='plan']:has(#plan-form textarea:focus) .mobile-bottom,
  body[data-page='plan']:has(#plan-submit:focus) .mobile-bottom,
  body[data-page='plan']:has(#plan-submit:active) .mobile-bottom {
    visibility: hidden;
  }
  .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: 20px;
  }
  .contact-actions > a {
    gap: 10px;
    padding: 14px;
  }
  .contact-actions > a > .icon:last-child {
    width: 16px;
  }
  .contact-actions strong {
    font-size: 17px;
  }
  .contact-actions small {
    font-size: 14px;
  }
  .social-link {
    padding: 8px 10px;
    font-size: 13px;
  }
}
