/* Shared accessible image gestures and enlarged viewer. */
#photoDialog,#photoViewer{font-family:"Reunite Nunito",sans-serif;color:#192c4c;border:1px solid #dce4f2;border-radius:22px;padding:24px;max-height:calc(100dvh - 24px);overflow:auto;background:white}dialog::backdrop{background:#192c4c80;backdrop-filter:blur(3px)}
#photoDialog .dialog-header,#photoViewer .dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#photoDialog button,#photoViewer button{min-height:44px;font:800 14px "Reunite Nunito",sans-serif;border:1px solid #ccdaef;border-radius:12px;padding:12px 16px;background:white;color:#17325a;cursor:pointer}
#photoDialog .primary-btn{background:linear-gradient(105deg,#bf246d,#a82286);color:white;border:0}
#photoDialog .button-row{display:flex;gap:12px}#photoDialog canvas:focus-visible,#photoViewer canvas:focus-visible{outline:3px solid #2861b9;outline-offset:-4px}
#photoDialog{width:min(500px,calc(100vw - 24px))}
#photoFrameTitle{font-size:21px;line-height:1.25;margin:0;color:var(--navy)}
.photo-frame-help{font-size:14px;line-height:1.5;color:#536b8e}
.photo-frame-window{width:min(260px,100%);aspect-ratio:1;border-radius:50%;overflow:hidden;background:#eaf2fa;margin:20px auto;border:3px solid #d7d7f2}
.photo-frame-window img{display:block;width:100%;height:100%;object-fit:cover}
.photo-frame-controls{display:grid;gap:2px}
.photo-frame-controls label{display:flex;justify-content:space-between;font-size:13px;font-weight:800;color:var(--navy)}
.photo-frame-controls input{width:100%;height:34px;accent-color:#6631cf;margin:0 0 7px}
#photoDialog .button-row{justify-content:space-between;margin-top:12px}
@media(max-width:420px){.finder-avatar.finder-face-photo{width:180px;height:180px}.photo-frame-window{width:min(220px,100%)}#photoFrameTitle{font-size:18px}#photoDialog .button-row{gap:8px}#photoDialog .button-row button{padding:10px 12px;font-size:13px}}

/* One approved crop, shared unchanged at every portrait size. */


.photo-enlarge-hint{font-size:12px;color:#536b8e;margin:-8px 0 16px}
.photo-frame-window{border:0;box-shadow:0 0 0 3px #d7d7f2}
.photo-frame-window canvas{display:block;width:100%;height:100%}
#photoFrameCanvas,#photoViewerCanvas{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
#photoFrameCanvas.dragging,#photoViewerCanvas.dragging{cursor:grabbing}
#photoViewer{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:20px;border:0;border-radius:0;box-sizing:border-box;background:#f7f9ff}
#photoViewer[open]{display:flex;flex-direction:column;gap:12px}
#photoViewer .dialog-header{flex:none;margin:0}#photoViewerTitle{font-size:21px;margin:0;color:var(--navy)}
#photoViewerHelp{margin:0;text-align:center;flex:none}
.photo-viewer-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;container-type:size}
#photoViewerCanvas{width:min(100cqw,100cqh);height:min(100cqw,100cqh);border-radius:12px;display:block}
.photo-viewer-controls{display:flex;justify-content:center;align-items:center;gap:10px;flex:none;padding-bottom:env(safe-area-inset-bottom)}
.photo-viewer-controls button{min-width:44px;padding:10px 14px}.photo-viewer-controls output{min-width:48px;text-align:center;font-weight:800;color:var(--navy)}
@media(max-width:420px){#photoViewer{padding:14px}.photo-viewer-controls{gap:6px}.photo-viewer-controls button{padding:10px;font-size:13px}}



#finder-photo-open{border:0;padding:0;cursor:zoom-in;position:relative;display:block;overflow:hidden;flex:none}#finder-photo-open:disabled{cursor:default}#finder-photo-open:has(img:not([hidden])){width:200px;height:200px}#finder-photo-open img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.photo-enlarge-hint{text-align:center}
@media(max-width:600px){#finder-photo-open:has(img:not([hidden])){width:180px;height:180px}}
.finder-live-shell .finder-person{flex-direction:column;align-items:center;text-align:center;gap:8px}.finder-live-shell .finder-person #finder-photo-open{flex:none}.finder-live-shell #finder-photo-hint{margin:6px 0 12px}.finder-live-shell #finder-photo-open img[hidden]{display:none}
