.identity-profile,
.identity-auth-layout {
    min-width: 0;
}

.identity-profile .profile-grid > *,
.identity-summary-details,
.identity-setting-details,
.identity-profile .setting-leading {
    min-width: 0;
}

.identity-summary-details,
.identity-detail-value,
.identity-auth code {
    overflow-wrap: anywhere;
}

.identity-profile .identity-photo {
    flex: 0 0 auto;
    display: block;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 0 0 1px var(--line, #e3e4da);
    border-radius: 50%;
}

.identity-profile .setting-row form,
.identity-profile .setting-leading > .icon,
.identity-profile .panel-heading > .icon {
    flex: 0 0 auto;
}

.identity-profile .setting-row .identity-detail-value {
    color: var(--ink, #242620);
}

.identity-profile .form-actions {
    margin-top: 26px;
}

.identity-status {
    display: block;
    margin: 20px 0;
}

.identity-status p {
    margin: 5px 0 0;
}

.identity-security-note {
    align-items: flex-start;
}

.identity-security-note > .icon {
    flex: 0 0 auto;
}

.identity-auth-layout .auth-brand > img {
    height: auto;
    object-fit: contain;
}

.identity-auth {
    min-width: 0;
}

.identity-auth .identity-field {
    margin: 15px 0;
}

.identity-auth .identity-submit {
    width: 100%;
    margin-top: 18px;
}

.identity-auth .identity-google {
    min-height: 46px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.identity-google-mark {
    font-size: 18px;
    line-height: 1;
    font-weight: 750;
}

.identity-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    margin-top: 16px;
}

.identity-text-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 0;
    border: 0;
    background: none;
    color: var(--ink, #242620);
    font: inherit;
    font-size: 12px;
    font-weight: 620;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.identity-help,
.identity-auth > p.identity-help {
    display: block;
    margin: 18px 0 0;
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted, #65685e);
}

.identity-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
}

.identity-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ink, #242620);
}

.identity-enrollment {
    margin: 20px 0;
    padding: 16px;
    border: 1px solid var(--line, #e3e4da);
    border-radius: 10px;
    font-size: 12px;
}

.identity-enrollment img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 14px auto;
}

.identity-enrollment code {
    display: block;
    margin-top: 8px;
    padding: 10px;
    background: var(--canvas, #f6f5f0);
    border-radius: 6px;
    font-size: 13px;
}

.identity-photo-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 28px;
    border: 0;
    border-radius: 16px;
    background: white;
    color: var(--ink, #242620);
    box-shadow: 0 20px 70px #0003;
    overflow-y: auto;
}

.identity-photo-dialog::backdrop {
    background: #24262070;
    backdrop-filter: blur(3px);
}

.identity-photo-dialog h2 {
    font-size: 21px;
}

.identity-photo-dialog .icon-button {
    flex-shrink: 0;
    font-size: 24px;
    font-weight: 400;
}

.identity-photo-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 24px 0;
}

.identity-photo-intro p {
    font-size: 13px;
    color: var(--muted, #65685e);
}

.identity-photo-dialog input[type="file"] {
    font-size: 13px;
    overflow: hidden;
}

.identity-photo-dialog input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line, #e3e4da);
    border-radius: 5px;
    background: var(--canvas, #f6f5f0);
    font: inherit;
    cursor: pointer;
}

.identity-photo-feedback {
    min-height: 20px;
    font-size: 12px;
    color: var(--muted, #65685e);
}

.identity-photo-feedback[data-error="true"] {
    color: var(--red, #a4322a);
}

.identity-photo-preview:not([hidden]) {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 0 20px;
}

.identity-photo-remove {
    margin-top: 10px;
}

.identity-photo-dialog [hidden] {
    display: none !important;
}

@media (max-width: 650px) {
    .identity-auth .field input,
    .identity-profile .field select {
        font-size: 16px;
    }

    .identity-photo-dialog {
        width: calc(100% - 28px);
        padding: 22px;
    }

    .identity-photo-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .identity-profile .profile-summary .identity-photo {
        width: 60px;
        height: 60px;
    }

    .identity-profile .profile-summary {
        display: grid;
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 14px;
    }

    .identity-profile .profile-summary .actions {
        grid-column: 2;
        margin: 0;
    }

    .identity-profile .form-actions {
        flex-wrap: wrap;
    }
}

.identity-profile .identity-photo { background: #fff6c4; }
