.contact-dialog {
  width: min(780px, calc(100vw - 40px));
  max-width: none;
  max-height: min(780px, calc(100dvh - 32px));
  margin: auto;
  padding: clamp(24px, 3vw, 40px);
  overflow: auto;
  border: 1px solid #3b3b3b;
  border-radius: 2px;
  background: #171717;
  color: #d2d2d2;
  box-shadow: 0 24px 90px #0009;
  font: 400 20px/1.4 Onest, Arial, sans-serif;
}
.contact-dialog::backdrop { background: #000b; backdrop-filter: blur(5px); }
.contact-dialog[open] { animation: contact-enter .38s ease-in-out both; }
@keyframes contact-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.contact-dialog__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.contact-dialog h2 { margin: 0; color: #d2d2d2; font: 300 clamp(32px, 3.5vw, 48px)/1.12 Onest, Arial, sans-serif; letter-spacing: -.035em; }
.contact-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid #454545; border-radius: 50%; background: transparent; color: #aaa; cursor: pointer; transition: color .22s ease-in-out, border-color .22s ease-in-out; }
.contact-dialog__close:hover { color: #fff; border-color: #888; }
.contact-dialog__close svg { width: 16px; height: 16px; }
.contact-dialog__lead { margin: 22px 0 30px; color: #989898; font: inherit; }
.contact-dialog__label { display: block; margin: 0 0 12px; color: #bbb; font: inherit; }
.contact-dialog__optional { color: #777; }
.contact-dialog__templates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
.contact-dialog__template { min-height: 52px; padding: 12px 16px; border: 1px solid #393939; border-radius: 28px; background: transparent; color: #929292; text-align: left; font: inherit; cursor: pointer; transition: color .22s ease-in-out, background .22s ease-in-out, border-color .22s ease-in-out; }
.contact-dialog__template:hover { border-color: #666; color: #ddd; }
.contact-dialog__template[aria-pressed="true"] { border-color: #777; background: #272727; color: #ededed; }
.contact-dialog__field { display: block; width: 100%; border: 1px solid #494949; border-radius: 2px; background: #1d1d1d; color: #eee; font: inherit; transition: border-color .22s ease-in-out; }
.contact-dialog__field:hover, .contact-dialog__field:focus { border-color: #888; }
.contact-dialog__field::placeholder { color: #737373; }
.contact-dialog__name { height: 52px; padding: 11px 15px; margin: 0 0 22px; }
.contact-dialog__message { min-height: 155px; max-height: 32dvh; margin: 0; padding: 15px; resize: vertical; }
.contact-dialog__field:focus-visible, .contact-dialog button:focus-visible { outline: 1px solid #bbb; outline-offset: 3px; }
.contact-dialog__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 24px; }
.contact-dialog__note { max-width: 390px; margin: 0; color: #858585; font: inherit; }
.contact-dialog__send { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 52px; padding: 10px 20px; border: 1px solid #696969; border-radius: 28px; background: transparent; color: #dedede; white-space: nowrap; font: inherit; cursor: pointer; transition: color .22s ease-in-out, border-color .22s ease-in-out, background .22s ease-in-out; }
.contact-dialog__send:hover { border-color: #aaa; background: #252525; color: #fff; }
@media (max-width: 640px) {
  .contact-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 24px 20px; font-size: 20px; }
  .contact-dialog__templates { grid-template-columns: 1fr; gap: 8px; margin-bottom: 22px; }
  .contact-dialog__template { min-height: 44px; padding: 9px 14px; }
  .contact-dialog__lead { margin: 14px 0 22px; }
  .contact-dialog__bottom { align-items: stretch; flex-direction: column; gap: 18px; }
  .contact-dialog__send { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .contact-dialog[open] { animation: none; } .contact-dialog * { transition: none !important; } }
