.jd-photo-editor{box-sizing:border-box;width:min(1100px,96vw);height:min(850px,94dvh);max-height:94dvh;max-width:96vw;margin:auto;padding:0;border:1px solid #e5ddff;border-radius:26px;background:#fff;color:#191544;box-shadow:0 24px 90px #19154440;overflow:hidden}
.jd-photo-editor[open]{display:flex;flex-direction:column}.jd-photo-editor::backdrop{background:#17132aab;backdrop-filter:blur(5px)}
.jd-photo-editor header,.jd-photo-editor .jd-photo-actions{display:flex;align-items:center;gap:12px;padding:16px 22px;flex-shrink:0;background:#fff}.jd-photo-editor header strong{font-size:19px}.jd-photo-editor .jd-photo-actions{justify-content:flex-end;border-top:1px solid #eee9f7}
.jd-photo-editor button{border:1px solid #ddd5f2;background:#f4f0fc;color:#242052;border-radius:999px;min-height:40px;padding:9px 16px;font-family:inherit;font-weight:700;font-size:14px;line-height:1.3;cursor:pointer;white-space:normal}.jd-photo-editor button[aria-pressed=true],.jd-photo-editor .jd-photo-save{background:#6536ed;border-color:#6536ed;color:white}.jd-photo-editor button:disabled{opacity:.45;cursor:default}.jd-photo-editor button:focus-visible,.jd-photo-edit-action:focus-visible{outline:2px solid #6536ed;outline-offset:3px}
.jd-photo-editor .jd-photo-close{margin-left:auto;background:white;border:0;font:300 30px/1 Arial;padding:0;width:40px}.jd-photo-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 20px;background:#faf8ff;flex-shrink:0}.jd-photo-tools input[type=color]{width:38px;height:36px;border:0;padding:2px;background:transparent}.jd-photo-tools input[type=range]{width:95px;accent-color:#6536ed}
.jd-photo-viewport{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#eeeaf6;padding:12px;scrollbar-width:thin;scrollbar-color:#ad92ed transparent}.jd-photo-stage{position:relative;margin:auto;flex-shrink:0;box-shadow:0 3px 20px #24205220}.jd-photo-stage canvas{position:absolute;inset:0;width:100%;height:100%;border:0;padding:0;max-width:none}.jd-photo-stage canvas:last-child{touch-action:none}.jd-photo-status{margin:0;padding:10px 22px;color:#706780;font-size:12px;line-height:1.5;flex-shrink:0}
.jd-photo-edit-action{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;border:1px solid #dcd0ff!important;background:#f0eaff!important;color:#191544!important;border-radius:999px!important;min-height:34px;min-width:34px;padding:7px 10px!important;font-size:13px!important;font-weight:700!important;cursor:pointer;flex-shrink:0}
.jd-photo-upload-action{margin:8px 0;position:static!important;width:auto!important}.jd-gallery-item>.jd-photo-edit-action,.jd-cover-item>.jd-photo-edit-action,.jd-edit-att>.jd-photo-edit-action,.fin-media-thumb>.jd-photo-edit-action,.fin-attachment-photo>.jd-photo-edit-action,.jd-outreach-preview>.jd-photo-edit-action{position:absolute!important;left:7px;bottom:7px;z-index:3}.jd-edit-att,.fin-attachment-photo,.jd-outreach-preview{position:relative}
.jd-photo-choose{display:flex;flex-wrap:wrap;gap:12px;padding:20px;overflow:auto}.jd-photo-choose button{display:flex;flex-direction:column;gap:8px;width:135px;word-break:break-word}.jd-photo-choose img{width:100%;height:90px;object-fit:cover;border-radius:12px}
@media(max-width:600px){.jd-photo-editor{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}.jd-photo-editor header,.jd-photo-editor .jd-photo-actions{padding:12px 14px}.jd-photo-tools{padding:8px;gap:6px}.jd-photo-editor button{padding:8px 11px;min-height:40px}.jd-photo-tools input[type=range]{width:75px}.jd-photo-status{padding:8px 14px}.jd-photo-editor .jd-photo-actions{padding-bottom:max(12px,env(safe-area-inset-bottom))}}

.jd-photo-existing-cover{position:relative}.jd-photo-existing-cover>.jd-photo-edit-action,.jd-attach-chip>.jd-photo-edit-action{position:absolute!important;left:6px;bottom:6px;z-index:4}

.jd-group-modal-avatar,.jd-flow-avatar-dot{position:relative}.jd-group-modal-avatar>.jd-photo-edit-action,.jd-flow-avatar-dot>.jd-photo-edit-action{position:absolute!important;right:-8px;bottom:-6px;z-index:4}

.jd-photo-edit-action:hover,.jd-photo-edit-action:focus-visible{background:#e8e5f4!important;border-color:#c9c3e1!important;color:#191544!important}
.jd-photo-tools button[aria-pressed=true]{background:#191544;border-color:#191544;color:#fff}

@media(max-width:600px){
 .jd-photo-editor .jd-photo-actions{flex-direction:column;align-items:stretch;gap:10px}
 .jd-photo-editor .jd-photo-actions>button{flex:0 0 auto;width:100%;min-width:0;max-width:none;min-height:48px;height:auto;margin:0;padding:12px 16px;white-space:nowrap;word-break:normal;overflow-wrap:normal;line-height:1.4}
}

.jd-photo-edit-hint{margin:8px 0 14px;color:#777389;font-size:.8rem;line-height:1.5;font-weight:500}

/* Icon-only photo actions must not inherit Finance's full-size button metrics. */
.fin-shell .jd-photo-edit-action,.fin-dossier .jd-photo-edit-action,.fin-media-picker .jd-photo-edit-action{
 box-sizing:border-box!important;width:36px!important;height:36px!important;
 min-width:36px!important;max-width:36px!important;min-height:36px!important;max-height:36px!important;
 padding:0!important;margin:0!important;aspect-ratio:1!important;border-radius:50%!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 36px!important;gap:0!important;line-height:1!important;
}
.fin-shell .jd-photo-edit-action i,.fin-dossier .jd-photo-edit-action i{display:block;line-height:1!important;font-size:15px!important;margin:0!important}
