/* Shared photo card presentation; private actions remain in their existing partials. */
.memory-tile{overflow:hidden;background:white;border:1px solid #e4e6e6;border-radius:16px;box-shadow:0 8px 28px #213e7209;transition:box-shadow .2s}.memory-tile:hover{box-shadow:0 12px 32px #213e7215}.memory-image-link{position:relative;display:flex;align-items:center;justify-content:center;height:270px;background:linear-gradient(135deg,#efeadf,#f8f6f1);padding:14px;text-decoration:none}.memory-image-link img{display:block;width:100%;height:100%;object-fit:contain;border-radius:8px}.memory-expand{position:absolute;right:22px;bottom:22px;display:flex;padding:8px;background:#ffffffed;border-radius:50%;box-shadow:0 2px 10px #252b2e10;color:#213e72}.memory-expand .nav-icon{width:16px;height:16px}.memory-state{position:absolute;left:20px;top:20px;box-shadow:0 2px 10px #252b2e10}.memory-caption{padding:20px 22px 22px}.workspace .memory-caption h3,.public-site .memory-caption h3{font:20px/1.3 var(--font-editorial,system-ui,sans-serif);margin:0;overflow-wrap:anywhere}.memory-caption h3 a{color:#252b2e;text-decoration:none}.memory-meta{display:flex;flex-wrap:wrap;gap:10px 16px;margin:12px 0 0;color:var(--ui-muted,#58677a);font-size:12px;line-height:1.5}.memory-meta span{display:inline-flex;align-items:center;gap:6px}.memory-meta .nav-icon{width:14px;height:14px;flex:none}
.workspace .memory-author,.public-site .memory-author{font:12px/1.5 var(--font-text,'Helvetica Neue',Helvetica,system-ui,sans-serif);color:var(--ui-muted,#58677a);margin:0 0 12px;text-transform:none;letter-spacing:normal;white-space:normal;overflow-wrap:anywhere}
.workspace .memory-people .memory-people-title,.public-site .memory-people .memory-people-title{font:600 12px/1.5 var(--font-text,'Helvetica Neue',Helvetica,system-ui,sans-serif);color:var(--ui-muted,#718097);margin:16px 0 8px}

.photo-owner-menu{position:relative}.photo-owner-menu>summary{list-style:none;cursor:pointer;padding:3px 8px;color:#77828a;font:20px/1 var(--font-text,'Helvetica Neue',Helvetica,system-ui,sans-serif)}.photo-owner-menu>summary::-webkit-details-marker{display:none}.photo-owner-menu>div{position:absolute;right:0;bottom:100%;z-index:10;background:#fffefa;border:1px solid #e0e5ed;border-radius:7px;padding:4px;min-width:150px;box-shadow:0 6px 20px #213e7215}.photo-owner-menu>div>a,:is(.workspace,.public-site) .photo-owner-menu button{display:block;width:100%;padding:9px 10px;color:#213e72;text-align:left;background:transparent;text-decoration:none;font:11px/1.4 var(--font-text,'Helvetica Neue',Helvetica,system-ui,sans-serif)}.photo-owner-menu>div>a:hover,:is(.workspace,.public-site) .photo-owner-menu button:hover{background:#edf2f8}@media(max-width:700px){.photo-owner-menu>summary{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}}

/* Compact identities belong to photo consultation only. */
.photo-person{position:relative;display:inline-flex;align-items:center;align-self:flex-start;flex:0 0 auto;width:max-content;max-width:40px;min-width:40px;padding:4px;overflow:hidden;border-radius:999px;background:var(--ui-male-bg,#d8e6f7);color:var(--ui-male-text,#213e72);text-decoration:none;font:400 12px/1.5 var(--font-text,'Helvetica Neue',Helvetica,system-ui,sans-serif);vertical-align:middle;transition:max-width .65s cubic-bezier(.25,.1,.25,1)}
.photo-person.person-chip--female{background:var(--ui-female-bg,#f2d3e0);color:var(--ui-female-text,#713b53)}
.photo-person.person-chip--unknown{background:var(--ui-surface-soft,#f0eee8);color:var(--ui-muted,#51575b)}
.photo-person-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;overflow:hidden;border-radius:50%;background:var(--ui-surface,#fff);color:inherit}
.photo-person-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.photo-person-name{display:block;min-width:0;flex:none;width:var(--photo-person-name-width,auto);margin-inline:8px 12px;opacity:0;overflow:hidden;white-space:nowrap;overflow-wrap:anywhere;color:inherit;transform:translateX(-4px);transition:opacity .4s ease,transform .5s ease}
.photo-person-name .person-name{color:inherit}
.photo-person.is-expanded{max-width:var(--photo-person-expanded-width,100%);border-radius:24px}
.photo-person.is-expanded .photo-person-name{white-space:normal;opacity:1;transform:translateX(0);transition-delay:.2s}
.photo-person:focus-visible{outline:2px solid var(--ui-link,#213e72);outline-offset:3px}
@media(pointer:coarse){.photo-person{max-width:44px;min-height:44px;min-width:44px}.photo-person-avatar{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.photo-person,.photo-person-name{transition:none;transform:none}.photo-person.is-expanded .photo-person-name{transition-delay:0s}}

/* Names float above fixed portraits: no gallery reflow on hover or focus. */
.photo-person,.photo-person.is-expanded{width:40px;max-width:40px;overflow:visible;transition:none;border-radius:50%}
.photo-person .photo-person-name{position:fixed;z-index:30;display:flex;align-items:center;gap:8px;width:max-content;max-width:min(320px,calc(100vw - 24px));margin:0;padding:10px 14px;border:0;border-radius:999px;background:inherit;color:inherit;box-shadow:0 4px 14px #213e7212;white-space:normal;visibility:hidden;pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .25s ease,transform .25s ease,visibility .25s}
.photo-person.is-expanded .photo-person-name{visibility:visible;pointer-events:auto;opacity:1;transform:translateY(0);transition-delay:0s}
.photo-person .photo-person-text{min-width:0;overflow-wrap:anywhere}
@media(pointer:coarse){.photo-person,.photo-person.is-expanded{width:44px;max-width:44px}}
@media(prefers-reduced-motion:reduce){.photo-person .photo-person-name{transition:none;transform:none}}

/* All private memory galleries share full-width natural images, including tag pages. */
.profile-memories .memory-gallery{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
.workspace .memory-gallery .memory-image-link{height:auto;aspect-ratio:auto;padding:0;background:transparent;border-radius:16px;overflow:hidden}
.workspace .memory-gallery .memory-image-link img{width:100%;height:auto;object-fit:contain;border-radius:16px}
.workspace .memory-caption h3,.public-site .memory-caption h3{font-size:18px;line-height:1.35}
:is(.workspace,.public-site) .memory-caption h3 a{font-weight:600!important}
:is(.workspace,.public-site) .memory-people .memory-people-title{font-weight:200!important}
@media(max-width:1000px){.profile-memories .memory-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.profile-memories .memory-gallery{grid-template-columns:1fr}}

.profile-memories .memory-caption{height:auto}
.profile-memories .memory-people{margin-top:14px}
:is(.workspace,.public-site) .profile-memories .memory-people .memory-people-title{margin-top:0}

/* Shared gallery contract: natural images, full rows, common typography. */
.workspace :is(.memory-gallery,.account-media .account-media-grid,.family-home .home-memories){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;align-items:start;gap:20px}
.workspace .family-home .home-memories .memory-card{display:block;min-width:0;margin:0}
.workspace .family-home .home-memories .memory-photo,.workspace .account-media .account-media-image,.workspace .account-media .account-media-image>a{display:block;position:relative;height:auto;min-height:0;aspect-ratio:auto;padding:0;background:transparent;overflow:hidden;border-radius:16px}
.workspace .family-home .home-memories .memory-photo img,.workspace .account-media .account-media-image img{display:block;position:static;inset:auto;width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;border-radius:16px}
.workspace .account-media .account-media-tile{height:auto;align-self:start}
.workspace .account-media .account-media-caption{height:auto;flex:none}
.workspace .account-media .account-media-caption h2,.workspace .family-home .home-memories .home-memory-title{font-size:18px;line-height:1.35;min-height:0;font-weight:600!important}
.workspace .account-media .account-media-caption h2 a{display:block;-webkit-line-clamp:unset;overflow:visible;font-weight:600!important}
.workspace :is(.memory-caption,.memory-copy,.account-media-caption) .memory-people{margin-top:14px}
.workspace :is(.memory-caption,.memory-copy,.account-media-caption) .memory-people-title{margin-top:0;font-weight:200!important}
@media(max-width:1000px){.workspace :is(.memory-gallery,.account-media .account-media-grid,.family-home .home-memories){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.workspace :is(.memory-gallery,.account-media .account-media-grid,.family-home .home-memories){grid-template-columns:1fr}}

.workspace :is(.memory-gallery,.account-media .account-media-grid).photo-masonry{row-gap:0}

.workspace .memory-excerpt{font-size:14px;line-height:1.5;color:var(--ui-muted,#58677a);margin:10px 0 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
