/* Shared contact rail. Native details retain keyboard and no-JS disclosure support. */
.mr-contact-tools {
  position: fixed;
  z-index: 25;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: 60px;
  border: 1px solid var(--mr-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 24px #182d4814;
  font-family: var(--mr-font);
}
.mr-contact-tools__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 64px;
  padding: 8px 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--mr-muted);
  cursor: pointer;
  list-style: none;
  font: inherit;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mr-contact-tools__button::-webkit-details-marker { display: none; }
.mr-contact-tools__button::marker { content: ''; }
.mr-contact-tools__button > span { font-size: 13px; line-height: 1.5; font-weight: 500; }
.mr-contact-tools__button .mr-icon { width: 25px; height: 25px; stroke-width: 1.7; }
.mr-contact-tools__consult { border-radius: 11px 11px 0 0; background: var(--mr-blue); color: #fff !important; }
.mr-contact-tools__consult:hover { background: #0054d0; }
.mr-contact-tools__item { margin: 0; border-bottom: 1px solid var(--mr-line); }
.mr-contact-tools__item[open] > summary, .mr-contact-tools__item > summary:hover { background: #f0f6ff; color: var(--mr-blue); }
.mr-contact-tools__item[open] > .mr-contact-tools__wechat, .mr-contact-tools__wechat:hover { color: #138b49; }
.mr-contact-tools__top { border-radius: 0 0 11px 11px; }
.mr-contact-tools__top:hover { background: #f0f6ff; color: var(--mr-blue); }
.mr-contact-tools__button:focus-visible { outline: 3px solid var(--mr-blue); outline-offset: 3px; }
.mr-contact-tools__panel {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  width: 244px;
  max-width: calc(100vw - 106px);
  padding: 24px;
  border: 1px solid var(--mr-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mr-navy);
  box-shadow: 0 8px 32px #182d481a;
  text-align: center;
  line-height: 1.6;
}
/* Bridge the visual gap so the pointer can move from icon to contact card. */
.mr-contact-tools__panel::after { content: ''; position: absolute; top: 0; bottom: 0; right: -14px; width: 14px; }
.mr-contact-tools__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.mr-contact-tools__number { display: block; color: var(--mr-blue) !important; font-size: 24px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mr-contact-tools__hint { margin: 8px 0 0; color: var(--mr-muted); font-size: 14px; line-height: 1.7; }
.mr-contact-tools__qr { display: block; width: 192px; max-width: 100%; height: auto; margin: 0 auto 12px; object-fit: contain; background: #fff; }
.mr-contact-tools__wechat-number { display: block; margin-top: 5px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; user-select: all; }
html.mi-lock .mr-contact-tools { visibility: hidden; }
@media (max-width: 600px) {
  .mr-contact-tools { width: 48px; right: max(10px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); border-radius: 10px; }
  .mr-contact-tools__button { min-height: 52px; padding: 6px 0; gap: 2px; }
  .mr-contact-tools__button .mr-icon { width: 22px; height: 22px; }
  .mr-contact-tools__button > span { font-size: 12px; }
  .mr-contact-tools__consult { border-radius: 9px 9px 0 0; }
  .mr-contact-tools__top { border-radius: 0 0 9px 9px; }
  .mr-contact-tools__panel { right: calc(100% + 10px); max-width: calc(100vw - 84px); padding: 20px; }
  .mr-contact-tools__number { font-size: 23px; }
}
@media (max-height: 480px) {
  .mr-contact-tools { bottom: max(12px, env(safe-area-inset-bottom)); }
  .mr-contact-tools__button { min-height: 44px; padding-block: 5px; }
  .mr-contact-tools__button > span { display: none; }
  .mr-contact-tools__panel { max-height: calc(100dvh - 40px); overflow-y: auto; }
  .mr-contact-tools__qr { width: 144px; }
}
