/* ============================================================
   Gallery overrides + Cat-travel pair + Picture book albums
   ============================================================ */

/* --- AI Images mosaic: 3-col dense filling, no awkward gaps --- */
.mosaic {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
}
.mosaic .m--lg { grid-column: span 2; aspect-ratio: 16/9; }
.mosaic .m--md { grid-column: span 1; aspect-ratio: 4/5; }
.mosaic .m--sm { grid-column: span 1; aspect-ratio: 1/1; }
.mosaic .m--w  { grid-column: span 1; aspect-ratio: 16/9; }
@media (max-width: 720px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic .m--lg { grid-column: span 2; }
}
@media (max-width: 480px) {
  .mosaic { grid-template-columns: 1fr; }
  .mosaic .m--lg, .mosaic .m--md, .mosaic .m--w, .mosaic .m--sm {
    grid-column: span 1; aspect-ratio: 16/9;
  }
}

/* --- Vertical video pair (cat travel) --- */
.video-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 480px;
}
.video-pair__item {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.video-pair__item iframe,
.video-pair__item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video-pair__item .lbl {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
  background: var(--bg-0);
  border: 1px solid rgba(0,0,0,.85);
  padding: 3px 9px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Click-to-play poster */
.video-pair__poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, #c9b5ec, #b8ebe1);
  cursor: pointer;
  border: 0;
  padding: 0;
  overflow: hidden;
}
.video-pair__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-pair__poster .play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #0a0a0a;
  transition: all 220ms cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.video-pair__poster:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}
.video-pair__poster.is-loaded {
  display: none;
}

/* --- Picture book albums (auto-cycling carousel) --- */
.albums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 8px auto 0;
  max-width: 920px;
}
@media (max-width: 900px) {
  .albums { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .albums { grid-template-columns: 1fr; }
}

.album {
  display: flex;
  flex-direction: column;
}

.album__frame {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: linear-gradient(135deg, #f5b9d3, #c9b5ec 50%, #b8ebe1);
  border: 1px solid var(--line);
}
.album__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(.22,.61,.36,1);
}
.album__img.is-active { opacity: 1; }

.album__counter {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(255,255,255,.92);
  padding: 4px 9px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #2a2a2a;
}

.album__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
  transition: opacity 200ms;
  z-index: 3;
}
.album__frame:hover .album__nav { opacity: 1; }
.album__nav:hover { background: var(--text); color: #fff; border-color: var(--text); }
.album__nav.prev { left: 10px; }
.album__nav.next { right: 10px; }

.album__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--text);
  line-height: 1.2;
}
.album__title em { font-style: italic; font-weight: 400; }

.album__sub {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.album__dots {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.album__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,.2);
  cursor: pointer;
  transition: background 200ms, transform 200ms;
}
.album__dots span:hover { background: rgba(0,0,0,.45); }
.album__dots span.is-active {
  background: var(--text);
  transform: scale(1.3);
}

.album__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #555;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,.3);
}
