/* v18.87 — quiet arrow navigation for the existing shared/host memory viewer. */
#lightbox .p87-memory-nav[hidden]{display:none!important}
#lightbox .p87-memory-nav{
  position:absolute;z-index:4;top:43%;left:clamp(5px,2vw,20px);right:clamp(5px,2vw,20px);
  display:flex;justify-content:space-between;align-items:center;pointer-events:none;
}
#lightbox .p87-memory-nav button{
  pointer-events:auto;display:grid;place-items:center;appearance:none;
  width:46px;height:50px;min-width:46px;border-radius:999px;
  color:#fffdf7;background:rgba(30,28,27,.82);border:1px solid rgba(255,255,255,.4);
  box-shadow:0 5px 20px rgba(0,0,0,.2);cursor:pointer;
  font:400 36px/1 Georgia,serif;touch-action:manipulation;
}
#lightbox .p87-memory-nav button:disabled{
  opacity:.27;pointer-events:none;
}
#lightbox .p87-memory-nav button:focus-visible{
  outline:3px solid #d8b461;outline-offset:3px;
}
/* v18.89: mobile counter belongs in the header, not on top of memories. */
#lightbox .lightbox-top{display:flex;align-items:center;gap:12px;min-height:52px;min-width:0}
#lightbox .lightbox-top #lightboxTitle{
  min-width:0;flex:1 1 auto;overflow:hidden;white-space:nowrap;
  text-overflow:ellipsis;
}
#lightbox .p87-memory-count[hidden]{display:none!important}
#lightbox .p87-memory-count{
  pointer-events:none;position:static;transform:none;top:auto;left:auto;
  flex:0 0 auto;margin:0 4px;
  font:600 12px/1.4 system-ui,sans-serif;
  padding:5px 8px;border:1px solid rgba(255,255,255,.24);
  background:rgba(26,25,24,.82);color:#fffdf7;border-radius:999px;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
#lightbox #lightboxMedia img{touch-action:pan-y}
@media(max-width:430px){
 #lightbox .p87-memory-nav{left:3px;right:3px}
 #lightbox .p87-memory-nav button{
   width:42px;height:48px;min-width:42px;font-size:32px;
 }
}
@media(prefers-reduced-motion:reduce){
 #lightbox .p87-memory-nav button{transition:none}
}


/* v18.88 photo consistency: show complete original frame in the square tile;
   open photo retains natural dimensions inside the same calm viewer scale
   as videos. Original bytes, canvas, QR, cover and download never change. */
#guestGalleryCard #gallery > .photo.photo-with-story:not(.p76-video-tile) .photo-visual{
  background:#e7e0d4;
}
#guestGalleryCard #gallery > .photo.photo-with-story:not(.p76-video-tile) .photo-visual img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center center;
}
#lightbox #lightboxMedia img{
  display:block;
  width:auto !important;
  height:auto !important;
  max-width:min(100%, 900px) !important;
  max-height:min(56dvh, 600px) !important;
  object-fit:contain !important;
  border-radius:12px;
  background:#1b1b1a;
}
#lightbox #lightboxMedia{min-width:0;overflow:hidden}
