.profile-photo-field {
    grid-column: 1 / -1;
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid #d8e2ef;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff, #eef4fb);
}

.profile-photo-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.profile-photo-heading h3 {
    margin: 0 0 4px;
    color: var(--navy-dark);
    font-size: 19px;
}

.profile-photo-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.profile-photo-recommendation {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #684800;
    border: 1px solid #e8c96c;
    border-radius: 999px;
    background: #fff7da;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.profile-photo-dropzone {
    min-height: 126px;
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 22px;
    text-align: center;
    border: 2px dashed #9ab0cf;
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.profile-photo-dropzone:hover,
.profile-photo-dropzone:focus-visible,
.profile-photo-dropzone.is-dragover {
    border-color: var(--gold);
    background: #fffaf0;
    outline: none;
    transform: translateY(-1px);
}

.profile-photo-dropzone input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.profile-photo-dropzone-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--navy);
    font-size: 25px;
    font-weight: 800;
}

.profile-photo-dropzone strong {
    color: var(--navy-dark);
    font-size: 16px;
}

.profile-photo-dropzone span:last-child {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.profile-photo-message {
    min-height: 20px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.profile-photo-message.is-error {
    color: #a22020;
}

.profile-photo-editor {
    display: grid;
    grid-template-columns: minmax(300px, 390px) minmax(190px, 1fr);
    gap: 24px;
    align-items: start;
    padding-top: 4px;
}

.profile-photo-editor[hidden] {
    display: none;
}

.profile-photo-crop-column {
    display: grid;
    gap: 13px;
}

.profile-photo-crop-stage {
    position: relative;
    width: min(100%, 390px);
    aspect-ratio: 1;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    border: 2px solid #173f82;
    border-radius: 17px;
    background: #dfe8f4;
    box-shadow: 0 14px 30px rgba(10, 42, 95, .14);
    cursor: grab;
}

.profile-photo-crop-stage:active {
    cursor: grabbing;
}

.profile-photo-crop-stage:focus-visible {
    outline: 3px solid rgba(202, 143, 0, .45);
    outline-offset: 3px;
}

.profile-photo-crop-image {
    position: absolute;
    max-width: none;
    pointer-events: none;
    transform-origin: top left;
    will-change: left, top, width, height;
}

.profile-photo-grid,
.profile-photo-circle-guide,
.profile-photo-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.profile-photo-grid span {
    position: absolute;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 0 0 1px rgba(8, 35, 76, .18);
}

.profile-photo-grid .grid-v1,
.profile-photo-grid .grid-v2 {
    top: 0;
    bottom: 0;
    width: 1px;
}

.profile-photo-grid .grid-v1 { left: 33.333%; }
.profile-photo-grid .grid-v2 { left: 66.666%; }

.profile-photo-grid .grid-h1,
.profile-photo-grid .grid-h2 {
    left: 0;
    right: 0;
    height: 1px;
}

.profile-photo-grid .grid-h1 { top: 33.333%; }
.profile-photo-grid .grid-h2 { top: 66.666%; }

.profile-photo-circle-guide {
    inset: 7.5%;
    border: 2px dashed rgba(255, 255, 255, .95);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(9, 38, 82, .28), 0 0 28px rgba(0, 0, 0, .16) inset;
}

.profile-photo-crop-hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 3;
    padding: 7px 10px;
    color: #fff;
    border-radius: 999px;
    background: rgba(5, 27, 61, .78);
    font-size: 12px;
    font-weight: 800;
    transform: translateX(-50%);
    white-space: nowrap;
}

.profile-photo-zoom {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px !important;
    color: #314765 !important;
    font-size: 13px !important;
}

.profile-photo-zoom input[type="range"] {
    min-height: 24px;
    padding: 0;
    accent-color: var(--gold);
}

.profile-photo-preview-column {
    display: grid;
    justify-items: center;
    gap: 13px;
    padding: 22px;
    border: 1px solid #d8e2ef;
    border-radius: 16px;
    background: #fff;
}

.profile-photo-preview-column h4 {
    margin: 0;
    color: var(--navy-dark);
    font-size: 16px;
}

.profile-photo-preview-frame {
    width: 144px;
    height: 144px;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    background: var(--navy);
    box-shadow: 0 0 0 1px #ccd8e8, 0 12px 26px rgba(15, 45, 92, .18);
}

.profile-photo-preview-frame canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.profile-photo-preview-column p {
    max-width: 260px;
    margin: 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.profile-photo-existing {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid #d8e2ef;
    border-radius: 13px;
    background: #fff;
}

.profile-photo-existing-image {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    box-shadow: 0 0 0 1px #cbd7e6;
}

.profile-photo-existing div {
    flex: 1;
    display: grid;
    gap: 3px;
}

.profile-photo-existing strong {
    color: var(--navy-dark);
}

.profile-photo-existing small {
    color: var(--muted);
    font-weight: 500;
}

.profile-photo-remove {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    color: #7b2020 !important;
    font-weight: 700 !important;
}

.profile-photo-remove input {
    width: auto !important;
    min-height: 0 !important;
}

.team-member-avatar.has-photo,
.team-responsibility-grid a > b.has-photo,
.team-user-avatar.has-photo {
    color: transparent !important;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 760px) {
    .profile-photo-heading {
        display: grid;
    }

    .profile-photo-recommendation {
        justify-self: start;
        white-space: normal;
    }

    .profile-photo-editor {
        grid-template-columns: 1fr;
    }

    .profile-photo-crop-stage {
        width: 100%;
    }
}
