.contact-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 32px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper); color: var(--onyx); box-shadow: var(--sh-win); }
.contact-dialog::backdrop { background: rgb(18 18 18 / .62); }
.contact-dialog h2 { padding-right: 32px; font-size: var(--fs-h3); font-weight: 500; line-height: 1.12; letter-spacing: -.028em; }
.contact-intro { margin: 12px 0 24px; color: var(--graphite); }
.contact-close { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; font-size: 28px; line-height: 1; cursor: pointer; }
.contact-close:hover { background: var(--tint); }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 6px; min-width: 0; font-size: var(--fs-small); font-weight: 500; }
.contact-field span { justify-self: start; font-weight: 400; color: var(--muted); }
.contact-field :is(input, select, textarea) { grid-column: 1 / -1; }
.contact-field-wide { grid-column: 1 / -1; }
.contact-field input, .contact-field select, .contact-field textarea { width: 100%; min-height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--white); color: var(--onyx); font: 400 16px/1.4 var(--font); }
.contact-field textarea { resize: vertical; min-height: 96px; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-note, .contact-fallback { font-size: var(--fs-small); color: var(--muted); }
.contact-note { margin: 16px 0; }
.contact-submit { width: 100%; }
.contact-submit:disabled { opacity: .65; cursor: wait; }
.contact-error { margin: 0 0 16px; padding: 12px; border-radius: var(--r-sm); background: var(--hold-soft); color: var(--hold); font-size: var(--fs-small); }
.contact-success { margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.contact-success h3 { margin-bottom: 8px; font-size: var(--fs-title); font-weight: 500; }
.contact-fallback { margin-top: 20px; text-align: center; }
.contact-fallback a { display: inline-block; min-height: 44px; padding: 10px 0; text-underline-offset: 3px; }
.contact-dialog [hidden] { display: none; }
@media (max-width: 600px) {
  .contact-dialog { padding: 28px 20px 20px; }
  .contact-fields { grid-template-columns: 1fr; gap: 12px; }
  .contact-intro { margin-bottom: 20px; }
}
