.card-inside {
  position: relative;
  width: 100%;
}
.card-inside .letter { z-index: 1; }
.photo-reel {
  max-width: 29rem;
  margin: 1.3rem auto 0;
}
.photo-frame {
  --landscape-height: clamp(10rem, 82vw, 23rem);
  --portrait-height: clamp(12rem, 112vw, 35rem);
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: var(--landscape-height);
  transition: height .28s ease-out;
}
.photo-frame:has(img.portrait) { height: var(--portrait-height); }
.photo-frame-right { display: none; }
.photo-frame img {
  grid-area: 1 / 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(100%, var(--landscape-height));
  padding: .24rem;
  border: 1px solid var(--gold);
  border-radius: .25rem;
  background: #120e12;
  box-shadow: 0 .8rem 2.3rem #000a;
  animation: photo-in .64s ease both;
}
.photo-frame img.portrait { max-height: 100%; }
.photo-frame img.fading-out { animation: photo-out .64s ease both; }
.photo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .48rem;
  margin: .8rem auto 0;
}
.photo-controls button {
  appearance: none;
  min-height: 2.6rem;
  padding: .37rem .95rem .45rem;
  border: 1px solid var(--gold);
  border-radius: 100vw;
  background: #0b080ded;
  color: var(--light-gold);
  font: 600 .985rem/1.2 "EB Garamond", Garamond, "Times New Roman", serif;
  cursor: pointer;
}
.photo-controls button:hover {
  background: var(--light-gold);
  color: #000;
}
.photo-controls button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}
@keyframes photo-in {
  from { opacity: 0; transform: translateY(.65rem) scale(.98); }
}
@keyframes photo-out {
  to { opacity: 0; transform: translateY(-.4rem) scale(.98); }
}
@media (min-width: 68rem) {
  .stage:has(details[open]) { padding-inline: clamp(1.5rem, 2.5vw, 2.75rem); }
  .cover:has(details[open]) { width: min(100%, 104rem); }
  .card-inside {
    --letter-width: clamp(32rem, 43vw, 36rem);
    --photo-overlap: clamp(3rem, 5vw, 4.5rem);
  }
  .card-inside .letter {
    width: min(100%, var(--letter-width));
    padding-inline: clamp(2.2rem, 3.25vw, 2.9rem);
  }
  .card-inside .letter h2 { font-size: clamp(2.45rem, 3.55vw, 2.9rem); }
  .photo-reel { margin-top: 1rem; }
  .photo-frame {
    --landscape-height: clamp(17rem, 44vh, 26rem);
    --portrait-height: clamp(21rem, 59vh, 35rem);
    position: absolute;
    width: min(31rem, calc((100% - var(--letter-width)) / 2 + var(--photo-overlap)));
  }
  .photo-frame-left {
    top: 35%;
    left: 0;
    transform: translateY(-50%) rotate(-4deg);
  }
  .photo-frame-right {
    display: grid;
    top: 64%;
    right: 0;
    transform: translateY(-50%) rotate(4deg);
  }
  .photo-controls { margin-top: 0; }
}
