.mts-contact-dialog {
  --mts-bg: #101213;
  --mts-ink: #f1f2ef;
  --mts-muted: #a9adab;
  --mts-line: rgba(241, 242, 239, .2);
  --mts-soft: #d9ddda;
  width: min(100% - 32px, 560px);
  max-height: min(90dvh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--mts-line);
  background: var(--mts-bg);
  color: var(--mts-ink);
  font-family: "Manrope", sans-serif;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}
.mts-contact-dialog::backdrop {
  background: rgba(5, 6, 6, .78);
  backdrop-filter: blur(5px);
}
.mts-contact-panel { padding: clamp(24px, 6vw, 42px); }
.mts-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.mts-contact-overline {
  margin: 0;
  color: var(--mts-muted);
  font: 10px/1.5 "DM Mono", monospace;
  letter-spacing: .15em;
}
.mts-contact-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--mts-line);
  background: transparent;
  color: var(--mts-ink);
  font: 28px/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.mts-contact-close:hover { border-color: rgba(241, 242, 239, .55); background: rgba(241, 242, 239, .07); }
.mts-contact-title {
  margin: 0 0 28px;
  font-size: clamp(38px, 8vw, 58px);
  font-weight: 600;
  letter-spacing: -.075em;
  line-height: .98;
}
.mts-contact-form { display: grid; gap: 20px; }
.mts-contact-field { display: grid; gap: 9px; }
.mts-contact-field label {
  color: #d1d4d2;
  font: 10px/1.5 "DM Mono", monospace;
  letter-spacing: .07em;
}
.mts-contact-field input,
.mts-contact-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--mts-line);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, .025);
  color: var(--mts-ink);
  font: 14px/1.6 "Manrope", sans-serif;
  transition: border-color .2s ease, background-color .2s ease;
}
.mts-contact-field textarea { min-height: 126px; resize: vertical; }
.mts-contact-field input:focus,
.mts-contact-field textarea:focus { border-color: rgba(241, 242, 239, .72); background: rgba(255, 255, 255, .045); }
.mts-contact-field input::placeholder,
.mts-contact-field textarea::placeholder { color: #777d7a; }
.mts-contact-status {
  min-height: 20px;
  margin: -3px 0 0;
  color: var(--mts-muted);
  font-size: 12px;
  line-height: 1.6;
}
.mts-contact-status[data-state="error"],
.mts-contact-status[data-state="unavailable"] { color: #e2b8a8; }
.mts-contact-status[data-state="success"] { color: var(--mts-soft); }
.mts-contact-submit {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid var(--mts-ink);
  background: var(--mts-ink);
  color: #101213;
  font: 700 12px "Manrope", sans-serif;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.mts-contact-submit:hover:not(:disabled) { background: var(--mts-soft); border-color: var(--mts-soft); }
.mts-contact-submit:disabled { opacity: .42; cursor: not-allowed; }
form[data-contact-sent="true"] > :not(.mts-contact-status):not(button):not(input[type="submit"]) {
  display: none;
}
form[data-contact-sent="true"] button[type="submit"],
form[data-contact-sent="true"] input[type="submit"] {
  opacity: 1;
  cursor: default;
}
.mts-contact-dialog button:focus-visible,
.mts-contact-dialog input:focus-visible,
.mts-contact-dialog textarea:focus-visible {
  outline: 2px solid var(--mts-soft);
  outline-offset: 3px;
}
.mts-contact-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
form[data-mts-contact] .mts-contact-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: #a9adab;
  font-size: 12px;
  line-height: 1.6;
}
form[data-mts-contact] .mts-contact-status[data-state="error"],
form[data-mts-contact] .mts-contact-status[data-state="unavailable"] { color: #e2b8a8; }
form[data-mts-contact] .mts-contact-status[data-state="success"] { color: #d9ddda; }
form[data-mts-contact] [type="submit"]:disabled { opacity: .48; cursor: not-allowed; }
.mts-contact-dialog[open] { animation: mts-contact-arrive .24s ease both; }
@keyframes mts-contact-arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 520px) {
  .mts-contact-dialog { width: calc(100% - 20px); max-height: 94dvh; }
  .mts-contact-panel { padding: 23px 20px 25px; }
  .mts-contact-header { margin-bottom: 26px; }
  .mts-contact-form { gap: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .mts-contact-dialog[open] { animation: none; }
  .mts-contact-close, .mts-contact-field input, .mts-contact-field textarea, .mts-contact-submit { transition: none; }
}
