html:has(.contact-dialog[open]) { overflow: hidden; }
.contact-dialog {
  margin: auto;
  padding: 0;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  border: 1px solid #36303f;
  border-radius: 24px;
  background: #151219;
  color: var(--ink);
  box-shadow: 0 24px 100px rgb(0 0 0 / .4);
}
.contact-dialog::backdrop { background: rgb(5 5 8 / .76); backdrop-filter: blur(8px); }
.contact-dialog-panel { position: relative; padding: 36px 28px 28px; }
.contact-dialog h2 { margin: 0 32px 28px 0; font-size: 28px; letter-spacing: -.04em; line-height: 1.2; }
.contact-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.contact-dialog-close:hover { background: #28232f; color: var(--ink); }
.contact-dialog-options { display: grid; gap: 12px; }
.contact-method { display: flex; align-items: center; gap: 16px; padding: 18px; border: 1px solid #36303f; border-radius: 14px; background: #1d1923; font-size: 16px; font-weight: 700; transition: border-color .2s, background .2s; }
.contact-method:hover { border-color: #8c77ad; background: #272030; }
.contact-method small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; }
.contact-method-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; }
.contact-method-vk { color: #87baff; background: #202e48; font-size: 17px; letter-spacing: -.06em; }
.contact-method-telegram { color: #8dd7ed; background: #1f303b; }
.contact-dialog-email { margin-top: 22px; text-align: center; font-size: 14px; }
.contact-email-reveal { min-height: 44px; padding: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.contact-email-reveal:hover { color: var(--ink); }
#contact-email-address:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); overflow-wrap: anywhere; }
@media (max-width: 380px) {
  .contact-dialog-panel { padding: 32px 20px 22px; }
  .contact-dialog h2 { font-size: 25px; }
}
