/* US — Ricordi carousel V1
   Existing album detail stays immersive; photographs now live in one swipeable
   stack instead of a second grid. The initial photo is still the cover.
   All album mutations, permissions, signed URLs and fullscreen viewer remain. */

/* One memory photo in front, the next peeking discreetly from behind. */
#usAlbumOverlay #usAlbumCarousel{
  position:relative!important;
  isolation:isolate;
  touch-action:pan-y;
  background:radial-gradient(circle at 58% 30%,rgba(103,64,112,.21),transparent 75%),#100d17!important;
  outline-offset:-4px;
}
#usAlbumOverlay #usAlbumCarousel:focus-visible{
  outline:2px solid var(--us-color-accent-ink,#ffc3d3);
}
#usAlbumOverlay #usAlbumCarousel img.us-album-peek{
  position:absolute!important;
  display:block;
  z-index:1!important;
  top:16px!important;
  right:6px!important;
  left:auto!important;
  width:calc(100% - 27px)!important;
  height:calc(100% - 33px)!important;
  min-height:0!important;
  border-radius:18px!important;
  object-fit:cover!important;
  object-position:center!important;
  transform:translateX(9px) rotate(1.1deg) scale(.973);
  transform-origin:50% 50%;
  filter:brightness(.68) saturate(.85);
  opacity:.87;
  box-shadow:0 12px 34px rgba(0,0,0,.3);
  pointer-events:none;
}
#usAlbumOverlay #usAlbumCarousel img.us-album-peek[hidden]{display:none!important}
#usAlbumOverlay #usAlbumCarousel[data-multiple="true"] img#usAlbumCover{
  width:calc(100% - 24px)!important;
  height:calc(100% - 12px)!important;
  border-radius:18px!important;
  transform:translateX(-8px) rotate(-.35deg);
  box-shadow:0 18px 40px rgba(0,0,0,.38);
  background:rgba(11,8,16,.9)!important;
}
#usAlbumOverlay #usAlbumCarousel[data-multiple="false"] img#usAlbumCover{
  width:100%!important;
  height:100%!important;
}
#usAlbumOverlay #usAlbumCarousel img#usAlbumCover.us-ricordi-next{
  animation:usRicordiShowNext 260ms var(--us-ease-enter,ease-out) both;
}
#usAlbumOverlay #usAlbumCarousel img#usAlbumCover.us-ricordi-prev{
  animation:usRicordiShowPrev 260ms var(--us-ease-enter,ease-out) both;
}
@keyframes usRicordiShowNext{
  from{opacity:.48;transform:translateX(18px) rotate(.7deg) scale(.97)}
  to{opacity:1;transform:translateX(-8px) rotate(-.35deg) scale(1)}
}
@keyframes usRicordiShowPrev{
  from{opacity:.48;transform:translateX(-28px) rotate(-.8deg) scale(.97)}
  to{opacity:1;transform:translateX(-8px) rotate(-.35deg) scale(1)}
}
/* Counter is a compact photo index, not another status bar. */
#usAlbumOverlay .us-album-carousel-counter{
  position:absolute;z-index:5;right:25px;top:calc(max(12px,var(--us-safe-top)) + 8px);
  min-width:48px;min-height:28px;padding:6px 11px;
  border-radius:999px;text-align:center;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(12,9,19,.70);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  color:#fff;font-size:11px;font-weight:680;letter-spacing:.03em;
  font-variant-numeric:tabular-nums;
}
#usAlbumOverlay .us-album-carousel-arrow{
  position:absolute;z-index:5;top:50%;
  width:44px;height:44px;min-width:44px;min-height:44px;
  display:grid;place-items:center;padding:0;border-radius:50%;
  background:rgba(14,10,21,.55);border:1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  color:#fff;transform:translateY(-50%);
}
#usAlbumOverlay .us-album-carousel-arrow .us-icon{--us-icon-size:18px}
#usAlbumOverlay .us-album-carousel-prev{left:8px}
#usAlbumOverlay .us-album-carousel-next{right:8px}
#usAlbumOverlay .us-album-carousel-hint{
  position:absolute;z-index:4;bottom:14px;left:50%;
  transform:translateX(-50%);
  padding:5px 11px;border-radius:999px;
  background:rgba(9,7,14,.62);color:rgba(255,255,255,.88);
  font-size:10px;font-weight:600;white-space:nowrap;
  pointer-events:none;
}
#usAlbumOverlay #usAlbumCarousel [hidden]{display:none!important}
#usAlbumOverlay .us-album-info{
  margin-top:-16px!important;
  padding:0 17px 3px!important;
}
#usAlbumOverlay .us-album-meta-line{
  margin-bottom:11px!important;
  min-height:28px;
  border-color:rgba(255,255,255,.12);
}
#usAlbumOverlay .us-album-caption-postit{
  margin:0 5px 15px!important;
  max-width:calc(100% - 10px)!important;
  padding:13px 15px 12px!important;
  transform:rotate(-.2deg)!important;
}
#usAlbumOverlay .us-album-current-delete{
  min-height:44px;
  padding:8px 12px;
  margin:0 8px 13px;
  border:1px solid rgba(255,145,174,.2);
  border-radius:14px;
  color:var(--us-color-rose-2,#ffb6cc);
  background:rgba(255,102,142,.06);
  font-size:12px;
}
#usAlbumOverlay .us-album-current-delete[hidden],
#usAlbumOverlay .us-album-carousel-status[hidden]{display:none!important}
#usAlbumOverlay .us-album-carousel-status{
  margin:8px 16px 16px;font-size:12px;
  line-height:1.45;color:var(--us-color-text-2);
}
#usAlbumOverlay .us-album-story{margin-top:4px}
/* A single photo sequence replaces the redundant masonry grid; the existing
   hidden composer/input and floating add action keep working as before. */
#usAlbumOverlay .us-album-section-head,
#usAlbumOverlay #usAlbumGrid,
#usAlbumOverlay #usAlbumAddTile{display:none!important}
#usAlbumOverlay .us-album-section:has(#usAlbumComposer[hidden]){
  padding:0!important;margin:0!important;
}
#usAlbumOverlay .us-album-section:not(:has(#usAlbumComposer[hidden])){
  padding:8px 17px 18px!important;
}

/* Compact, familiar scrapbook rhythm without removing Rivivi, calendar
   chapter dividers or individual memory cards. */
#moments .ricordi-rivivi{margin:2px 0 11px}
#moments .ricordi-rivivi-card img{max-height:min(40dvh,350px)}
#moments .ricordi-story-head{margin-top:17px}
#moments .ricordi-section-head{margin-bottom:9px}
#moments .ricordi-story .ricordi-period{
  margin-top:11px;padding-top:11px;
  border-color:rgba(226,178,217,.11);
}
#moments .ricordi-story .ricordi-period b{letter-spacing:-.25px}
#moments .ricordi-story .moment-card.moment-postit{
  box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
}

/* On short displays ensure notes and floating addition remain reachable. */
@media(max-width:360px){
  #usAlbumOverlay #usAlbumCarousel{height:min(50dvh,460px)!important;min-height:280px!important}
  #usAlbumOverlay .us-album-carousel-arrow{width:44px;height:44px}
  #usAlbumOverlay .us-album-carousel-hint{bottom:9px}
}
@media (orientation:landscape) and (max-height:560px){
  #usAlbumOverlay #usAlbumCarousel{height:min(70dvh,420px)!important;min-height:230px!important}
}
@media(prefers-reduced-motion:reduce){
  #usAlbumOverlay #usAlbumCarousel img#usAlbumCover{animation:none!important}
}
:root[data-us-motion="reduced"] #usAlbumOverlay #usAlbumCarousel img#usAlbumCover{animation:none!important}
