/* User photos share one portrait format. Never resize logos, charts or videos. */
:root[data-app-theme] :is(#app, [role="dialog"]) :is(.workout-progress-photo-feed, .workout-progress-photo-picker figure, .profile-progress-photo-frame, .profile-photo-timeline-card) {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
}
:root[data-app-theme] :is(#app, [role="dialog"]) :is(.workout-progress-photo-feed, .workout-progress-photo-picker figure, .profile-progress-photo-frame) > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
:root[data-app-theme] .profile-timeline-add-form figure:not(:has(img + img)),
:root[data-app-theme] .profile-timeline-add-form figure:has(img + img) img {
  aspect-ratio: 3 / 4 !important;
}
:root[data-app-theme] .profile-timeline-add-form figure:has(img + img) img { height: auto; }
:root[data-app-theme] :is(.checkin-photo-upload img, .checkin-photo-grid img, .message-attachment-image) {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover !important;
}
:root[data-app-theme] .chat-compose-attachment-media:has(img) { height: auto; aspect-ratio: 3 / 4; }
/* Fullscreen displays fit the portrait in the available space without stretching. */
:root[data-app-theme] .profile-progress-viewer-slide img {
  width: min(calc(100vw - 36px), calc((100dvh - 150px) * .75)) !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 150px) !important;
  object-fit: contain !important;
}
:root[data-app-theme] :is(.profile-photo-preview.large, .coach-profile-photo-editor .profile-photo-preview, .signup-avatar-preview) {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  border-radius: 12px !important;
  overflow: hidden;
}
:root[data-app-theme] #app .profile-hero-avatar {
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  overflow: hidden;
}
