.contact-dock {
  position: fixed;
  z-index: 80;
  top: 50%;
  right: 0;
  color: #17324d;
  font-family: inherit;
  transform: translateY(-50%);
}

.contact-dock__trigger {
  position: relative;
  z-index: 3;
  width: 60px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #135ca8;
  box-shadow: 0 10px 28px rgba(11, 48, 84, 0.25);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
}

.contact-dock__trigger svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-dock__trigger:hover,
.contact-dock__trigger[aria-expanded="true"] {
  background: #0b477f;
}

.contact-dock__panel {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 72px;
  width: 324px;
  padding: 24px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(12, 47, 79, 0.24);
  transform: translateY(-50%);
}

.contact-dock__panel::after {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid #dbe5ef;
  border-right: 1px solid #dbe5ef;
  background: #fff;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.contact-dock__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.contact-dock__header span {
  display: block;
  margin-bottom: 3px;
  color: #6b7d90;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.contact-dock__header h2 {
  margin: 0;
  color: #17324d;
  font-size: 22px;
  line-height: 1.25;
}

.contact-dock__close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dbe5ef;
  border-radius: 50%;
  background: #f6f9fc;
  color: #52677c;
  cursor: pointer;
}

.contact-dock__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.contact-dock__phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 6px;
  background: #eff6fc;
  color: #456078;
  text-decoration: none;
}

.contact-dock__phone span {
  font-size: 13px;
}

.contact-dock__phone strong {
  color: #0c4f91;
  font-size: 17px;
  white-space: nowrap;
}

.contact-dock__wechat {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  margin: 18px 0;
}

.contact-dock__wechat img {
  width: 138px;
  height: 138px;
  display: block;
  padding: 6px;
  border: 1px solid #dbe5ef;
  background: #fff;
  object-fit: contain;
}

.contact-dock__wechat figcaption strong,
.contact-dock__wechat figcaption span {
  display: block;
}

.contact-dock__wechat figcaption strong {
  color: #17324d;
  font-size: 16px;
}

.contact-dock__wechat figcaption span {
  margin-top: 6px;
  color: #6b7d90;
  font-size: 13px;
  line-height: 1.6;
}

.contact-dock a.contact-dock__service {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 6px;
  background: #135ca8;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.contact-dock a.contact-dock__service:visited {
  color: #fff;
}

.contact-dock a.contact-dock__service:hover,
.contact-dock a.contact-dock__service:focus {
  background: #0b477f;
  color: #fff;
}

.contact-dock__trigger:focus-visible,
.contact-dock__close:focus-visible,
.contact-dock__phone:focus-visible,
.contact-dock__service:focus-visible,
.contact-dock__panel:focus-visible {
  outline: 3px solid #80b9e8;
  outline-offset: 3px;
}

.contact-dock__backdrop {
  display: none;
}

.contact-dock__backdrop[hidden],
.contact-dock__panel[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .contact-dock {
    top: auto;
    right: 14px;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: none;
  }

  .contact-dock__trigger {
    width: 58px;
    min-height: 58px;
    border-radius: 50%;
    font-size: 12px;
  }

  .contact-dock__trigger svg {
    width: 23px;
    height: 23px;
  }

  .contact-dock__backdrop {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: block;
    background: rgba(4, 22, 39, 0.46);
  }

  .contact-dock__panel {
    position: fixed;
    z-index: 2;
    top: auto;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 22px;
    border-radius: 14px;
    transform: none;
  }

  .contact-dock__panel::after {
    display: none;
  }

  .contact-dock__wechat {
    grid-template-columns: minmax(0, 158px) minmax(0, 1fr);
  }

  .contact-dock__wechat img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
}

@media (max-width: 380px) {
  .contact-dock__panel {
    padding: 19px;
  }

  .contact-dock__wechat {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 13px;
  }

  .contact-dock__phone {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-dock * {
    scroll-behavior: auto !important;
  }
}

@media print {
  .contact-dock {
    display: none !important;
  }
}
