.contact-dock {
  --dock-edge: max(24px, env(safe-area-inset-right));
  position: fixed;
  z-index: 3;
  right: var(--dock-edge);
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 70px));
  color: #14252c;
}

.contact-dock-rail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: calc(100dvh - 110px);
  padding: 5px;
  overflow-y: auto;
  border: 1px solid #d3e0e2;
  border-radius: 12px;
  background: #fbfdfdf5;
  box-shadow: 0 8px 26px #102e3919;
  backdrop-filter: blur(12px);
}

.contact-dock-trigger {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  transition: border-color .18s ease, background-color .18s ease;
}

.contact-dock-trigger:hover,
.contact-dock-trigger[aria-expanded="true"] {
  border-color: #9fcace;
  background: #e7f4f4;
}

.contact-dock-trigger img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.contact-dock-card {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  width: min(238px, calc(100vw - var(--dock-edge) - 80px));
  max-height: calc(100dvh - 106px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #cbdde0;
  border-radius: 12px;
  background: #fbfefe;
  box-shadow: 0 12px 32px #102e3926;
  text-align: center;
}

.contact-dock-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.contact-dock-card p {
  margin: 6px 0 0;
  color: #506169;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.contact-dock-qr {
  display: block;
  width: min(150px, 100%);
  height: auto;
  aspect-ratio: 1;
  margin: 13px auto;
  object-fit: contain;
  border-radius: 6px;
}

.contact-dock-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #132a32;
  border-radius: 6px;
  color: #f4ffff;
  background: #132a32;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
}

.contact-dock-link:hover { background: #16515a; border-color: #16515a; }
.contact-dock-link span:last-child { color: #69e4e9; }

@media (max-width: 680px) {
  .contact-dock { --dock-edge: max(16px, env(safe-area-inset-right)); bottom: max(78px, calc(env(safe-area-inset-bottom) + 62px)); }
  .contact-dock-card { max-height: calc(100dvh - 96px); padding: 15px; }
}

@media (max-height: 560px) {
  .contact-dock-rail { gap: 3px; padding: 4px; }
  .contact-dock-trigger { flex-basis: 40px; width: 40px; height: 40px; padding: 7px; }
  .contact-dock-qr { width: min(130px, 100%); margin-block: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-dock-trigger { transition: none; }
}
