@layer memento-photo-corners {
/* Applied at display time: existing and newly uploaded originals stay intact. */
:root { --photo-corner-radius: 18px; }
html body img:where(:not([src$=".svg"]):not([data-photo-corners="off"])) {
  border-radius: var(--photo-corner-radius) !important;
}
/* Preserve marks, machine-readable QR squares and intentionally circular avatars. */
html body :is(.site-logo,.site-brand,.brand-logo,.memento-logo,[data-qr],.qr,.qr-code,.qrcode) img,
html body img:is(.site-logo,.brand-logo,.qr-code,.qrcode,[data-photo-corners="off"],[src$="/qr.svg"],[src*="site-qr-"]) {
  border-radius: 0 !important;
}
html body img:is(.rounded-full,.avatar,.user-avatar,.profile-avatar),
html body :is(.avatar,.user-avatar,.profile-avatar) img {
  border-radius: 50% !important;
}
/* User photos also occur as background layers in invitation and ceremony scenes. */
html body :is(.inv-scene-portrait,.obituary-portrait,.pm-connection-photo,.connection-frame,
 .reader-chapter-motif,.reader-photo,.reader-portrait,#ceremony #photo,#ceremony #song-portrait) {
  border-radius: var(--photo-corner-radius) !important;
  overflow: hidden;
}
@media print { :root { --photo-corner-radius: 3mm; } }

}
