dialog.contact-modal {
  width: 560px;
  height: 721px;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 32px);
}

.contact-modal > form:last-of-type {
  gap: 12px;
  padding: 12px 0 24px;
}

.contact-modal-body {
  box-sizing: border-box;
  flex: 0 1 569px;
  height: 569px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* overflow-y: auto, not hidden -- 569px is this content's natural
     height at the design's own desktop-portrait proportions, but
     `flex: 0 1 569px` already lets this shrink below that whenever the
     dialog itself is capped shorter (short-viewport/landscape). `hidden`
     silently clipped that shrunk-past content with no way to reach it --
     the exact bug modal.css's own `.modal-body` comment already
     describes fixing once for #trainingModal, reintroduced here by this
     selector's higher specificity overriding that rule's `overflow-y:
     auto`. Real report: 도입 문의 modal in landscape mobile, dialog
     shrinks correctly but the fields below "이름" become permanently
     unreachable, no scrollbar, no gesture response. */
  overflow-x: hidden;
  overflow-y: auto;
}

.contact-field-group {
  /* flex: none -- as a flex ITEM of .contact-modal-body (unrelated to
     this rule's own display:flex for its OWN label+input children
     below), the default flex-shrink:1 let every field silently compress
     below its natural size whenever the form's total content exceeded
     .contact-modal-body's 569px box (confirmed live: .contact-privacy
     below rendered at 82px, not its own specified 100px, purely from
     this proportional shrink -- not from any breakpoint or viewport
     constraint). `.contact-divider` already protected itself the same
     way; every other child needed the same protection so the *whole*
     form scrolls as one unit (via .contact-modal-body's own
     overflow-y: auto, already fixed) instead of each field distorting
     its own size to avoid it. */
  flex: none;
  display: flex;
  flex-direction: column;
  /* The label-to-control rhythm is 12px, but an inline validation message
     owns its own 8px top margin. A flex gap here would be added again
     before that message, producing a visibly incorrect 20px gap. */
  gap: 0;
}

.contact-field-label {
  margin-bottom: 12px;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
}

.contact-message {
  /* flex: none -- see .contact-field-group's own comment; min-height
     alone doesn't stop a flex item's used height from shrinking below
     it under flex-shrink, only flex:none does. */
  flex: none;
  height: 120px;
  min-height: 120px;
  resize: none;
  padding: 12px 16px;
}

.contact-divider {
  flex: none;
  height: 1px;
  background: var(--color-border-faint);
}

/* Wraps .contact-consent so its own real-time validation error has
   somewhere to render below the row instead of squeezing onto the same
   line -- .contact-consent itself is `flex-direction: row` (checkbox +
   label text side by side), which isn't a sensible place to also stack
   an error message underneath. Same "flex: none as a .contact-modal-body
   item" protection every other direct child here already has, see
   .contact-field-group's own comment for the full reasoning. */
.contact-consent-group {
  flex: none;
  display: flex;
  flex-direction: column;
  /* Same rule as regular contact fields: error text supplies the complete
     8px control-to-message gap itself. */
  gap: 0;
}

.contact-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  line-height: 22.5px;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.contact-privacy {
  /* flex: none -- real report: this box measured 82px live, not its own
     specified 100px, purely from proportionally absorbing .contact-
     modal-body's own shrink deficit as a default-shrinkable flex item.
     See .contact-field-group's own comment for the full root cause. */
  flex: none;
  box-sizing: border-box;
  height: 100px;
  padding: 16px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: var(--color-nav-bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 16, 17, 0.25) transparent;
}

.contact-privacy p {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.28px;
  color: var(--color-text-faint);
}

.contact-modal-footer {
  box-sizing: border-box;
  height: 48px;
  padding: 12px 24px 0;
}

@media (max-width: 767px) {
  /* Keep the 16px Mobile gutters while letting the dialog use the
     available width on every phone, rather than freezing it at 328px. */
  dialog.contact-modal {
    width: calc(100vw - 32px);
    height: 718px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 42px);
  }

  .contact-modal .modal-title {
    font-size: 16px;
    line-height: 24px;
  }

  .contact-modal-body {
    flex-basis: 566px;
    height: 566px;
    gap: 24px;
  }

  .contact-field-group {
    gap: 0;
  }

  .contact-field-label {
    font-size: 15px;
    line-height: 22.5px;
  }

  .contact-consent {
    font-size: 14px;
    line-height: 21px;
  }
}
