.memory-layout {
  grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: stretch;
}
.memory-collection {
  display: flex;
  flex-direction: column;
  padding-top: clamp(19px, 2.2vw, 30px);
}
.memory-collection-head { min-height: 28px; margin-bottom: 16px; gap: 12px; }
.memory-layout > .card > h3 { min-height: 28px; display: flex; align-items: center; }
.memory-album-shell {
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}
.memory-album-spread { grid-column: 1 / -1; grid-row: 1; min-height: 0; }
.memory-album-page { min-height: 0; max-height: none; overflow: visible; }
.memory-album-page .album-photo { height: auto; aspect-ratio: 4 / 3; }
.memory-album-shell > .album-turn { grid-row: 2; align-self: center; }
#previousMemoryPage { grid-column: 2; }
#nextMemoryPage { grid-column: 3; }
.memory-album-footer { margin-top: 8px; }
.memory-album-spread:has(.album-empty) {
  min-height: 320px;
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  padding: 24px;
}
.album-empty { margin: 0; padding: 24px 12px; border: 0; background: transparent; border-radius: 0; }
.memory-album-shell:has(.album-empty) > .album-turn,
.memory-collection:has(.album-empty) .memory-album-footer { display: none; }
.memory-album-shell:has(.album-empty) { grid-template-rows: minmax(0, 1fr); }
@media (max-width: 1100px) {
  .memory-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .memory-collection { padding-top: 0; margin-top: 0; }
  .memory-album-spread:has(.album-empty) { min-height: 260px; }
}
@media (max-width: 620px) {
  .memory-collection-head { align-items: center; }
  .memory-collection-head h3 { font-size: .95rem; }
  .memory-album-spread { padding: 8px; }
  .memory-album-page { padding: 17px 16px; }
  .memory-album-spread:has(.album-empty) { min-height: 220px; padding: 16px; }
}
