.contact-dialog {
  --contact-ink: #202944; --contact-muted: #626e88; --contact-blue: #4a58d5;
  color: var(--contact-ink); width: min(520px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); padding: 0; margin: auto; border: 1px solid #ffffffde; border-radius: 26px;
  background: radial-gradient(ellipse at 95% 0, #bccdffbd, transparent 54%), radial-gradient(ellipse at 0 15%, #f5e8ffcf, transparent 60%), linear-gradient(145deg, #fcfaff 5%, #e7edff 58%, #dcefff);
  box-shadow: 0 32px 110px #0c163955, inset 0 1px 0 #fff; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  box-sizing: border-box; overflow: hidden; isolation: isolate;
}
.contact-dialog[open] { animation: contact-enter .24s cubic-bezier(.2,.7,.3,1) both; }
.contact-dialog::backdrop { background: #111b365e; backdrop-filter: blur(6px); }
.contact-dialog [hidden] { display: none !important; }
.contact-dialog *, .contact-dialog *::before, .contact-dialog *::after { box-sizing: border-box; }
.contact-dialog button, .contact-dialog a, .contact-dialog summary { font: inherit; -webkit-tap-highlight-color: transparent; }
.contact-dialog button, .contact-dialog summary { cursor: pointer; }
.contact-dialog button:focus-visible, .contact-dialog a:focus-visible, .contact-dialog summary:focus-visible { outline: 3px solid #655cdd; outline-offset: 4px; }
.contact-shell { position: relative; display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.contact-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex: 0 0 auto; padding: 28px 26px 0; position: relative; z-index: 1; background: transparent; }
.contact-eyebrow { font-size: 12px; letter-spacing: .16em; color: #5e64b3; margin: 0 0 11px; font-weight: 600; }
.contact-heading h2 { font-size: 24px; line-height: 1.4; font-weight: 650; letter-spacing: -.04em; margin: 0; outline: none; }
.contact-close { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; padding: 0; border: 1px solid #ffffffc7; border-radius: 50%; background: #ffffff73; color: #737c98; font-size: 25px !important; line-height: 1; margin: -16px -14px 0 0; transition: background .2s, transform .2s; }
.contact-close:hover { background: #fff; transform: rotate(90deg); }
.contact-body { position: relative; z-index: 1; padding: 12px 26px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.contact-intro { margin: 0 0 20px; color: var(--contact-muted); font-size: 14px; line-height: 1.8; }
.contact-options { display: grid; gap: 12px; padding: 3px; margin: -3px; }
.contact-option { display: flex; gap: 14px; align-items: center; width: 100%; min-height: 84px; text-align: left; padding: 14px 16px; border: 1px solid #ffffffeb; border-radius: 16px; color: var(--contact-ink); background: #ffffff85; box-shadow: 0 5px 16px #6165bc06, inset 0 1px 0 #fff; backdrop-filter: blur(10px); transition: border-color .2s, background .2s, box-shadow .2s, transform .2s; }
.contact-option:hover, .contact-option[aria-pressed="true"] { border-color: #a694f5; background: #ffffffbe; box-shadow: 0 8px 24px #7771c51a; transform: translateY(-2px); }
.contact-option-icon { position: relative; border-radius: 15px; color: #7867db; background: linear-gradient(145deg,#ffffff,#e3d8ff); border: 1px solid #fff; box-shadow: 0 6px 12px #8c6de521, inset 0 -3px 5px #b7a1f12b; flex: 0 0 44px; height: 44px; display: grid; place-items: center; transform: rotate(-5deg); }
.contact-option-icon svg { width: 27px; height: 27px; }
.contact-option[data-contact-icon="private"] .contact-option-icon { color: #517bd7; background: linear-gradient(145deg,#fff,#cddfff); box-shadow: 0 6px 12px #638ad921; transform: rotate(5deg); }
.contact-option[data-contact-icon="other"] .contact-option-icon { color: #618db3; background: linear-gradient(145deg,#fff,#d5ecfa); transform: rotate(-4deg); }
.contact-option-content { flex: 1; min-width: 0; }
.contact-option-content strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 600; }
.contact-option-content>span { display: block; color: var(--contact-muted); font-size: 13px; line-height: 1.7; margin-top: 4px; }
.contact-arrow { font-size: 22px; color: #9296bd; }
.contact-footnote { font-size: 12px; color: #6d7793; text-align: center; margin: 17px 0 0; }
.contact-art { pointer-events: none; position: absolute; top: 28px; right: 49px; width: 88px; height: 72px; opacity: .65; transform: scale(.75); transform-origin: top right; }
.contact-art-back { position: absolute; width: 58px; height: 52px; top: 0; right: 0; transform: rotate(13deg); border: 1px solid #ffffffd9; border-radius: 15px; background: linear-gradient(140deg,#cfd6ff8c,#a9c8ffad); box-shadow: 0 8px 20px #7685d21a; }
.contact-art-front { position: absolute; width: 64px; height: 56px; top: 15px; left: 2px; transform: rotate(-12deg); border: 1px solid #fff; border-radius: 15px; background: linear-gradient(150deg,#ffffffdf,#d8cbff80); box-shadow: 0 8px 18px #6769c326; color: #8b81d6; }
.contact-art-front svg { width: 100%; height: 100%; padding: 6px; }
.contact-art i { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(140deg,#fff,#b5a0ef); top: -11px; left: -6px; }
.contact-art b { position: absolute; right: -16px; bottom: -8px; color: #fff; font-size: 25px; }
.contact-dialog[data-step="contact"] .contact-heading { justify-content: center; padding-top: 24px; text-align: center; }
.contact-dialog[data-step="contact"] .contact-heading>div { flex: 1; }
.contact-dialog[data-step="contact"] .contact-close { position: absolute; right: 29px; top: 31px; }
.contact-dialog[data-step="contact"] .contact-eyebrow { margin-bottom: 10px; }
.contact-dialog[data-step="contact"] .contact-art { opacity: .2; right: 35px; top: 82px; }
.contact-dialog[data-step="contact"] .contact-body { padding-top: 12px; }
.contact-current { display: table; color: #6161a3; text-align: center; font-size: 12px; line-height: 1.6; margin: 0 auto 15px; padding: 5px 15px; background: #ffffff8c; border: 1px solid #fff; border-radius: 99px; }
.contact-qr-area { position: relative; background: linear-gradient(#fff,#fff) padding-box, linear-gradient(140deg,#ac91f7,#a3caff 55%,#eac3ef) border-box; border: 2px solid transparent; border-radius: 20px; width: 234px; max-width: 100%; min-height: 234px; margin: 0 auto; padding: 17px; display: grid; place-items: center; box-shadow: 0 12px 30px #7278c01c, 0 0 0 7px #ffffff50; }
.contact-qr { display: block; width: 196px; max-width: 100%; height: auto; object-fit: contain; -webkit-touch-callout: default; user-select: auto; }
.contact-qr-message { padding: 18px 10px; color: var(--contact-muted); text-align: center; font-size: 14px; line-height: 1.8; }
.contact-qr-message p { margin: 0 0 10px; }
.contact-retry { min-height: 44px; border: 1px solid #d8e5ff; border-radius: 8px; background: #eef4ff; color: var(--contact-blue); padding: 8px 12px; }
.contact-scan-caption { text-align: center; font-size: 14px; font-weight: 500; color: #515d80; margin: 14px 0; }
.contact-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #ffffff85; border: 1px solid #ffffffdf; border-radius: 14px; }
.contact-note>div { flex: 1; min-width: 0; }
.contact-note span { display: block; font-size: 11px; color: #74809b; margin-bottom: 5px; }
.contact-note-text { color: #414a79; font-size: 14px; line-height: 1.6; margin: 0; user-select: text; overflow-wrap: anywhere; }
.contact-copy { flex: 0 0 auto; background: linear-gradient(110deg,#7862de,#557ae5); color: #fff; border: 1px solid #ffffff70; border-radius: 99px; min-height: 40px; padding: 8px 17px; font-size: 12px !important; font-weight: 500 !important; box-shadow: 0 4px 12px #7164cb20; transition: box-shadow .2s; }
.contact-copy:hover { box-shadow: 0 5px 16px #7164cb40; }
.contact-copy:disabled { opacity: .65; cursor: progress; }
.contact-copy-status { min-height: 18px; text-align: center; font-size: 11px; line-height: 18px; color: #556381; margin: 2px 0; }
.contact-mobile-help { display: none; margin: 0 0 12px; text-align: center; color: var(--contact-muted); font-size: 11px; line-height: 1.8; }
.contact-alternatives { text-align: center; font-size: 12px; line-height: 1.8; color: var(--contact-muted); }
.contact-alternatives summary { width: fit-content; margin: auto; padding: 7px 12px; min-height: 36px; }
.contact-channels { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px 16px; padding: 8px 0; }
.contact-channels a { color: #495e9c; text-decoration: underline; text-underline-offset: 3px; min-height: 28px; overflow-wrap: anywhere; }
.contact-back { display: block; margin: 3px auto -10px; min-height: 40px; border: 0; background: transparent; color: #697398; font-size: 12px !important; }
.contact-fab {
  position: fixed; z-index: 1000; right: 0; bottom: 100px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 78px; min-height: 87.2px; gap: 4px; padding: 20px 15px; box-sizing: border-box;
  border: 0; border-radius: 8px 0 0 8px; background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: -2px 2px 10px rgb(0 0 0 / 20%); color: #fff !important; text-decoration: none !important;
  font: 400 12px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif; white-space: nowrap;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
/* Stack above the existing 87.2px back-to-top card with a 12px gap. */
body:has(.vertical-nav) .contact-fab { bottom: 199.2px; }
.contact-fab::before {
  content: ''; display: block; flex: 0 0 24px; width: 24px; height: 24px; background: currentColor;
  --contact-chat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7l-5 3v-3H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='M7 9h10M7 13h6' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  mask: var(--contact-chat-icon) center / contain no-repeat;
  -webkit-mask: var(--contact-chat-icon) center / contain no-repeat;
  transition: transform .3s ease;
}
.contact-fab:hover { background: rgb(0 0 0 / 80%); color: #0061ff !important; box-shadow: -4px 4px 15px rgb(0 0 0 / 30%); }
.contact-fab:hover::before { transform: translateY(-2px) scale(1.1); }
.contact-fab:focus-visible { outline: 3px solid #80acff; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .contact-fab, .contact-fab::before { transition: none; } }
@keyframes contact-enter { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 768px) {
  .contact-fab { display: none; }
  .contact-dialog { border-radius: 25px; }
  .contact-heading { padding: 25px 22px 0; }
  .contact-heading h2 { font-size: 23px; }
  .contact-eyebrow { font-size: 11px; margin-bottom: 13px; }
  .contact-close { margin: -15px -9px 0 0; }
  .contact-body { padding: 12px 20px 18px; }
  .contact-intro { font-size: 12px; margin-bottom: 15px; }
  .contact-option { gap: 12px; padding: 13px 13px; min-height: 88px; border-radius: 16px; }
  .contact-option-icon { flex-basis: 43px; height: 45px; border-radius: 13px; }
  .contact-option-icon svg { width: 27px; height: 27px; }
  .contact-option-content strong { font-size: 15px; }
  .contact-option-content>span { font-size: 12px; }
  .contact-arrow { font-size: 18px; }
  .contact-art { top: 48px; right: 18px; transform: scale(.65); transform-origin: top right; opacity: .45; }
  .contact-dialog[data-step="contact"] .contact-heading { padding-top: 23px; }
  .contact-dialog[data-step="contact"] .contact-close { right: 22px; top: 27px; }
  .contact-dialog[data-step="contact"] .contact-art { display: none; }
  .contact-qr-area { width: 234px; min-height: 234px; padding: 17px; }
  .contact-qr { width: 196px; }
  .contact-current { margin-bottom: 15px; }
  .contact-scan-caption { margin: 15px 0; font-size: 13px; }
  .contact-note { padding: 11px 12px; }
  .contact-note-text { font-size: 12px; }
  .contact-copy { padding: 8px 12px; }
  .contact-mobile-help { display: block; }
  .contact-channels { flex-direction: column; gap: 0; }
  .contact-channels a { display: flex; align-items: center; justify-content: center; min-height: 44px; }
}
@media (max-width: 370px) { .contact-art { display: none; } .contact-heading h2 { font-size: 21px; } .contact-option { gap: 9px; } .contact-option-icon { flex-basis: 35px; height: 39px; } .contact-option-content strong { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .contact-dialog[open], .contact-dialog * { animation: none !important; transition: none !important; } }

.contact-auto-dismiss { display: block; margin: 14px auto 0; padding: 8px 16px; min-height: 36px; border: 1px solid #ffffffb3; border-radius: 99px; color: #65718c; background: #ffffff73; font-size: 12px !important; }
.contact-auto-dismiss:hover { background: #fff; color: #4a58d5; }
