/* Keep native controls inside their grid cells, including Safari on iOS. */
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid>*, .form-grid label, .form-grid select, .form-grid input { min-width: 0; max-width: 100%; }
.form-grid input, .form-grid select { box-sizing: border-box; }
.birth-date { margin: 0; padding: 0; min-width: 0; }
.birth-date>legend { width: auto; padding: 0; margin: 0; border: 0; font-size: 11px; font-weight: 400; color: #444e3d; }
.birth-date-fields { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, .85fr) minmax(0, 1.1fr); gap: 6px; }
.birth-date-fields select { min-height: 46px; padding-left: 8px; padding-right: 4px; }
html[data-theme="dark"] .birth-date>legend { color: #d8e0d0; }
@media(min-width:601px) and (max-width:920px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
@media(max-width:600px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .form-grid label, .birth-date>legend { font-size: 12px; }
    .form-grid input, .form-grid select { min-height: 48px; font-size: 16px; }
    .birth-date-fields { gap: 10px; }
}
