/* Match the photo cards to their native 3:4 portrait proportions.
   Keep each complete source frame, without cropping or white letterboxing. */
.draw-screen .draw-card.has-artwork {
  padding: 0;
  background: #080a0c;
  aspect-ratio: 3 / 4;
}
.draw-screen .has-artwork .card-media {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #080a0c;
}
.draw-screen .has-artwork .card-media img {
  object-fit: contain;
  object-position: center;
}

@media (max-width: 720px) {
  .draw-screen.is-active {
    --card-height: calc(((100vw - 34px) / 3) * 4 / 3);
  }
}
@media (min-width: 721px) {
  .draw-screen.is-active {
    --photo-card-height: min(var(--card-height), calc((100vw - 64px - var(--card-gap) * 2) / 2.25));
  }
  .draw-screen .card-stage {
    width: calc(var(--photo-card-height) * 2.25 + var(--card-gap) * 2);
    height: var(--photo-card-height);
  }
  .draw-screen .draw-controls {
    top: calc(var(--card-top) + var(--photo-card-height) + 14px);
  }
}

/* The enlarged card and lesson also retain the whole photograph. */
.card-viewer-panel {
  width: min(620px, 100%, calc((100dvh - 110px) * .75));
  height: auto;
  max-height: calc(100dvh - 24px);
}
.card-viewer-panel > img {
  flex: 0 1 auto;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 100px);
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #080a0c;
}
.kata-player__stage {
  width: min(100%, 360px, calc(min(52svh, 480px) * .75));
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 4;
}
.kata-player--compact .kata-player__stage {
  width: min(100%, 190px, calc(min(26svh, 240px) * .75));
  height: auto;
  min-height: 0;
}
