.person-create-photo {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid #d5e0e5;
    border-radius: 9px;
    background: #f8fafb;
}

.person-create-photo-preview {
    display: grid;
    place-items: center;
    width: 150px;
    height: 180px;
    overflow: hidden;
    border: 1px dashed #aebfc7;
    border-radius: 8px;
    background: #ffffff;
}

.person-create-photo-preview.has-image {
    border-style: solid;
}

.person-create-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-create-photo-placeholder {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 18px;
    color: #71838c;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
}

.person-create-photo-placeholder svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.person-create-photo-field {
    min-width: 0;
}

.person-create-photo-field input[type="file"] {
    width: 100%;
}

.person-create-photo-field .help-text,
.person-create-photo-field .form-help {
    margin-top: 7px;
    color: #71838c;
    font-size: 12px;
}

.personnel-number-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.personnel-number-row .form-check {
    margin: 0;
    white-space: nowrap;
}

.personnel-number-entry small {
    display: block;
    margin-top: 6px;
    color: #71838c;
}

.person-form-sections {
    display: grid;
    gap: 18px;
}

.person-form-section {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.person-form-section > header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.person-form-section > header > span {
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    height: 34px;
    border-radius: 9px;
    color: var(--accent-dark);
    background: #fff0ea;
    font-size: 12px;
    font-weight: 800;
}

.person-form-section > header h2,
.person-form-section > header p {
    margin: 0;
}

.person-form-section > header h2 {
    color: var(--text);
    font-size: 18px;
}

.person-form-section > header p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.person-form-section > header > strong {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    color: #9a341d;
    background: #fff0ea;
    font-size: 11px;
}

.person-form-section-sensitive {
    border-color: #efd7ce;
}

.person-form-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.person-form-option {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
}

.person-form-option .form-check {
    margin: 0;
}

.person-form-option .form-help,
.person-form-option .help-text {
    margin: 8px 0 0 24px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.person-form-size-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 680px) {
    .person-create-photo {
        grid-template-columns: 1fr;
    }

    .person-create-photo-preview {
        width: 130px;
        height: 156px;
    }

    .personnel-number-row {
        grid-template-columns: 1fr;
    }

    .person-form-section {
        padding: 16px;
    }

    .person-form-option-grid,
    .person-form-size-grid {
        grid-template-columns: 1fr;
    }
}

/* Keep form controls aligned regardless of help-text length or the active shell. */
.person-details-form .person-form-sections { counter-reset: personnel-section; }
.person-details-form .person-form-section { counter-increment: personnel-section; padding: 24px; }
.person-details-form .person-form-section > header > span::before { content: counter(personnel-section, decimal-leading-zero); }
.person-details-form .form-grid { align-items: start; gap: 20px 24px; }
.person-details-form .form-field { display: flex; flex-direction: column; align-self: start; gap: 7px; min-width: 0; }
.person-details-form .form-field > label { margin: 0; line-height: 1.4; }
.person-details-form .form-field input:not([type="checkbox"]),
.person-details-form .form-field select { box-sizing: border-box; width: 100%; height: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 8px 12px; font: inherit; }
.person-details-form .form-field .help-text,
.person-details-form .form-field .form-help,
.person-details-form .person-form-section > p { margin: 0 0 16px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.person-details-form .form-field .help-text,
.person-details-form .form-field .form-help { margin: 0; }
.person-details-form .person-checkbox-line { display: flex; align-items: center; gap: 10px; }
.person-details-form .person-checkbox-line input[type="checkbox"] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.person-details-form .person-checkbox-line label { margin: 0; font-size: 14px; font-weight: 650; cursor: pointer; }
.person-details-form .person-checkbox-field .help-text,
.person-details-form .person-checkbox-field .form-help { margin: 8px 0 0 30px; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.person-details-form .person-form-option { padding: 16px; background: var(--surface-muted); }
.person-details-form .person-form-option:has(input:checked) { border-color: var(--accent); }
.person-private-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.person-address-grid { display: grid; grid-template-columns: minmax(90px, .45fr) minmax(0, 1fr); gap: 20px 16px; }
.person-address-street { grid-column: 1 / -1; }
.person-wedding-panel { padding: 18px; border-radius: 10px; background: var(--surface-muted); }
.person-wedding-panel p { margin: 12px 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.person-milestone-badges { display: flex; gap: 8px; }
.person-milestone-badges span { display: grid; place-items: center; width: 36px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-muted); }
@media (max-width: 760px) {
 .person-details-form .form-grid, .person-private-grid { grid-template-columns: 1fr; }
 .person-details-form .person-form-section { padding: 16px; }
 .person-details-form .person-form-section > header { flex-wrap: wrap; }
 .person-details-form .person-form-section > header > div { flex: 1; min-width: 160px; }
 .person-details-form .person-form-option-grid { grid-template-columns: 1fr; }
}
