.profile-readonly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 26px;
}

.profile-readonly-grid > div {
    min-width: 0;
    padding: 15px 17px;
    border: 1px solid #d7e4f0;
    border-radius: 14px;
    background: #f5f9fd;
}

.profile-readonly-grid small,
.profile-readonly-grid strong { display: block; }

.profile-readonly-grid small {
    margin-bottom: 5px;
    color: #64778b;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.profile-readonly-grid strong {
    overflow-wrap: anywhere;
    color: #123154;
}

.settings-subheading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 28px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1eaf2;
    color: #123154;
}

.security-card {
    position: sticky;
    top: 24px;
}

.family-settings-card { grid-column: 1 / -1; }
.family-list { display: grid; gap: 12px; }
.family-record { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #dbe6ef; border-radius: 14px; background: #f7fafc; }
.family-record__avatar { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 50%; overflow: hidden; background: #dcecff; color: #075f9d; font-size: 22px; }
.family-record__avatar img { width: 100%; height: 100%; object-fit: cover; }
.family-record__body { min-width: 0; flex: 1; }
.family-record__body strong,.family-record__body small { display: block; }
.family-record__body small { margin-top: 4px; color: #687d90; }
.family-record__actions { display: flex; flex-wrap: wrap; gap: 7px; }
.family-status { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.family-status.pending { background: #fff0bd; color: #735700; }
.family-status.verified { background: #d7fae7; color: #08723c; }
.family-action { border: 0; border-radius: 9px; padding: 9px 12px; font-weight: 750; cursor: pointer; }
.family-action.accept { background: #daf9e8; color: #08723c; }
.family-action.reject,.family-action.remove { background: #fee5e7; color: #a4212d; }
.family-empty { margin: 0; padding: 18px; border: 1px dashed #cbd9e5; border-radius: 12px; color: #687d90; text-align: center; }
.family-request-form { margin-top: 4px; }

.photo-editor {
    display: grid;
    justify-items: center;
    gap: 10px;
    flex: 0 0 230px;
}

.photo-crop-viewport {
    position: relative;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 18px;
    background: #dfeaf4;
    box-shadow: 0 0 0 1px #cad9e6, 0 12px 28px rgba(18,49,84,.15);
    touch-action: none;
    cursor: grab;
}

.photo-crop-viewport:active { cursor: grabbing; }
.photo-crop-viewport::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.75);
    box-shadow: inset 0 0 0 1px rgba(8,67,122,.1);
}

.photo-crop-viewport img {
    position: absolute;
    display: block;
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-crop-controls {
    width: 230px;
    color: #4f6680;
    font-size: 12px;
}

.photo-crop-controls label {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 6px;
}

.photo-crop-controls input { padding: 0; }
.photo-crop-controls small { display: block; margin-top: 4px; line-height: 1.4; text-align: center; }

.photo-editor .photo-upload {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #0057d9;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 900px) {
    .security-card { position: static; }
}

@media (max-width: 620px) {
    .profile-readonly-grid { grid-template-columns: 1fr; }
    .settings-card { padding: 20px 16px; border-radius: 16px; }
}
