.contact-widget {
  position: fixed;
  right: -2px;
  bottom: 16px;
  z-index: 40;
  font-family: inherit;
}

.contact-trigger,
.contact-close,
.contact-copy {
  appearance: none;
  border: 0;
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.contact-trigger {
  width: 118px;
  height: 178px;
  padding: 0;
  position: relative;
  display: block;
  border-radius: 8px;
  color: #34373d;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  transition: transform 180ms ease;
}

.contact-trigger::before {
  padding: 8px 11px;
  position: absolute;
  top: 26px;
  right: calc(100% - 18px);
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  color: #34373d;
  background: #ffffff;
  box-shadow: 0 9px 24px rgba(16, 17, 20, 0.12);
  content: "联系我们";
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(7px, 0);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.contact-trigger:hover,
.contact-trigger:focus-visible,
.contact-widget.is-open .contact-trigger {
  background: transparent;
  box-shadow: none;
  transform: translateY(-3px);
}

.contact-trigger:active {
  transform: translateY(-1px);
}

.contact-trigger:focus-visible {
  outline: 2px solid #2167d9;
  outline-offset: 3px;
}

.contact-character-stage {
  width: 100%;
  height: 100%;
  position: relative;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.contact-character-static,
.contact-character-canvas {
  width: auto;
  max-width: 100%;
  height: 100%;
  position: absolute;
  left: 50%;
  bottom: 0;
  display: block;
  transform: translateX(-50%);
  filter: drop-shadow(0 9px 12px rgba(16, 17, 20, 0.14));
  pointer-events: none;
  user-select: none;
}

.contact-character-canvas {
  opacity: 0;
}

.contact-character-stage[data-canvas-ready="true"] .contact-character-static {
  visibility: hidden;
}

.contact-character-stage[data-canvas-ready="true"] .contact-character-canvas {
  opacity: 1;
}

.contact-character-fallback {
  width: 52px;
  height: 52px;
  padding: 15px;
  position: absolute;
  right: 8px;
  bottom: 4px;
  display: none;
  box-sizing: border-box;
  border-radius: 8px;
  color: #ffffff;
  background: #101114;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  box-shadow: 0 12px 30px rgba(16, 17, 20, 0.2);
}

.contact-trigger[data-image-failed="true"] .contact-character-stage {
  display: none;
}

.contact-trigger[data-image-failed="true"] .contact-character-fallback {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .contact-trigger:hover::before,
  .contact-trigger:focus-visible::before {
      opacity: 1;
      transform: translate(0, 0);
    }

  .contact-widget.is-open .contact-trigger::before {
      opacity: 0;
      transform: translate(7px, 0);
    }
}

.contact-trigger[data-focus-restored='true'] {
  transform: none;
  transition: none;
}

.contact-trigger[data-focus-restored='true']::before {
  opacity: 0;
  transform: translate(7px, 0);
  transition: none;
}

.contact-panel {
  width: min(294px, calc(100vw - 28px));
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  position: absolute;
  right: calc(100% + 4px);
  bottom: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 27, 35, 0.11);
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, 8px) scale(0.985);
  transform-origin: right bottom;
  visibility: hidden;
  transition:
    visibility 0s linear 200ms,
    opacity 160ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-widget.is-open .contact-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition-delay: 0s;
}

.contact-panel-header {
  min-height: 56px;
  padding: 8px 9px 8px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #eceef1;
  background: #ffffff;
}

.contact-panel-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-panel-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(16, 17, 20, 0.1);
}

.contact-panel-header h2 {
  margin: 0;
  color: #17191d;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.3;
}

.contact-panel-header p {
  margin: 2px 0 0;
  color: #777c85;
  font-size: 9.5px;
  font-weight: 450;
  line-height: 1.4;
}

.contact-close {
  width: 28px;
  height: 28px;
  padding: 0;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #676c75;
  background: transparent;
  transition: color 160ms ease, background-color 160ms ease;
}

.contact-close:hover,
.contact-close:focus-visible {
  color: #101114;
  background: #f3f4f6;
}

.contact-close svg,
.contact-copy svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-close svg {
  width: 16px;
  height: 16px;
}

.contact-panel-content {
  padding: 0 13px 11px;
}

.contact-empty {
  min-height: 68px;
  margin: 0;
  display: grid;
  place-items: center;
  color: #8a8f97;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.contact-qr {
  margin: 0;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eceef1;
}

.contact-qr-frame {
  width: 82px;
  height: 82px;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 3px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px #dfe3e8,
    0 3px 10px rgba(25, 31, 40, 0.06);
}

.contact-qr img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.contact-qr figcaption {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.contact-qr figcaption > span,
.contact-qr figcaption > strong,
.contact-qr figcaption > small {
  display: block;
  margin: 0;
  letter-spacing: 0;
}

.contact-qr figcaption > span {
  color: #087f62;
  font-size: 10px;
  font-weight: 720;
  line-height: 1.4;
}

.contact-qr figcaption > strong {
  color: #202329;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.5;
}

.contact-qr figcaption > small {
  color: #777d86;
  font-size: 9.5px;
  font-weight: 450;
  line-height: 1.55;
}

.contact-qr-services {
  display: flex !important;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.contact-qr-services span {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
}

.contact-qr-services .is-support {
  color: #2563d9;
  font-weight: 650;
}

.contact-qr-services .is-account {
  color: #087f62;
  font-weight: 650;
}

.contact-qr-services .is-business {
  color: #b5680f;
  font-weight: 650;
}

.contact-qr-services .contact-qr-service-separator {
  color: #b7bdc6;
  font-weight: 500;
}

.contact-method-section {
  padding-top: 8px;
}

.contact-method-section h3 {
  margin: 0;
  color: #696f78;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.5;
}

.contact-methods {
  margin-top: 2px;
  border-top: 1px solid #eceef1;
}

.contact-method:first-child {
  border-top: 0;
}

.contact-method {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #eceef1;
}

.contact-method-detail {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.contact-method-label {
  color: #8a8f97;
  font-size: 9px;
  font-weight: 550;
  line-height: 1.3;
}

.contact-method-value {
  overflow: hidden;
  color: #24272c;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.contact-method-value:hover,
a.contact-method-value:focus-visible {
  color: #2167d9;
}

.contact-copy {
  min-width: 48px;
  height: 24px;
  padding: 0 6px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 5px;
  border: 1px solid #e4e7eb;
  color: #5f646d;
  background: #ffffff;
  font-size: 10px;
  font-weight: 650;
  transition: color 160ms ease, background-color 160ms ease;
}

.contact-copy:hover,
.contact-copy:focus-visible {
  color: #101114;
  border-color: #d8dce1;
  background: #f5f6f7;
}

.contact-copy.is-copied {
  border-color: #cfe9df;
  color: #147a55;
  background: #edf8f3;
}

.contact-copy svg {
  width: 12px;
  height: 12px;
}

.contact-hours {
  margin: 8px -13px -11px;
  padding: 8px 13px 9px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  border-top: 1px solid #eceef1;
  background: #f7f8fa;
}

.contact-hours svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  fill: none;
  stroke: #8a6a27;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-hours span,
.contact-hours strong {
  display: block;
  margin: 0;
  letter-spacing: 0;
}

.contact-hours span {
  color: #8a8f97;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
}

.contact-hours strong {
  margin-top: 1px;
  color: #616872;
  font-size: 9.5px;
  font-weight: 550;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .contact-widget {
      right: 2px;
      bottom: 4px;
    }

  .contact-trigger {
      width: 48px;
      height: 75px;
    }

  .contact-panel {
      width: min(292px, calc(100vw - 24px));
      max-height: calc(100vh - 154px);
      max-height: calc(100dvh - 154px);
      right: 0;
      bottom: calc(100% + 6px);
    }

  .contact-panel-content {
      padding-right: 12px;
      padding-left: 12px;
    }

  .contact-qr {
      gap: 9px;
    }

  .contact-qr-frame {
      width: 80px;
      height: 80px;
    }

  .contact-hours {
      margin-right: -12px;
      margin-left: -12px;
      padding-right: 12px;
      padding-left: 12px;
    }
}

@media (max-width: 520px) and (max-height: 620px) {
  .contact-widget {
    right: 2px;
    bottom: 4px;
  }

  .contact-trigger {
    width: 46px;
    height: 72px;
  }
}

@media (max-width: 360px) {
  .contact-widget {
    right: 0;
    bottom: 4px;
  }

  .contact-trigger {
    width: 44px;
    height: 69px;
  }

  .auth-body .auth-layout {
    padding-right: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-trigger,
  .contact-trigger::before,
  .contact-character-static,
  .contact-character-canvas,
  .contact-panel,
  .contact-close,
  .contact-copy {
      transition: none;
    }
}
