/* Images own their aspect ratio; neither theme paints a letterbox around them. */
.panel-image,
body:has(#theme-toggle-input:checked) .panel-image,
.detail-hero,
body:has(#theme-toggle-input:checked) .detail-hero,
.float-photo,
body:has(#theme-toggle-input:checked) .float-photo { background: transparent; }
.panel-image--story { aspect-ratio: auto; }
.panel-image--story > img,
.panel-uncropped-image { width:100%;height:auto;object-fit:contain; }
.panel-image--archive { aspect-ratio:var(--media-ratio,16 / 10); }
.panel-image--archive .panel-image-crop { left:0!important;top:0!important;width:100%!important;height:100%!important; }
.detail-hero > img,
.detail-hero.fallback-hero > img { width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain; }
.media-crop { display:block;position:relative;width:100%;aspect-ratio:var(--media-ratio);overflow:hidden; }
.media-crop > img { position:absolute;max-width:none;max-height:none;object-fit:fill; }
.detail-thumbs button { background:transparent; }
.detail-thumbs img { width:auto;height:auto;max-width:84px;max-height:70px;object-fit:contain; }
.detail-motion-ghost { position:fixed;z-index:120;pointer-events:none;overflow:hidden;background:transparent;border:0;box-shadow:none; }
.detail-motion-ghost > img { position:absolute;display:block;max-width:none;max-height:none;object-fit:fill; }
[data-detail-motion-hidden] { visibility:hidden!important;transition:none!important; }
#detail-sheet.detail-motion-sheet { transform:none!important;visibility:visible;transition:none!important;will-change:clip-path; }
.detail-motion-sheet[data-detail-motion-kind="enter"] .detail-body { animation:detail-body-arrive 660ms var(--ease) both; }
.detail-motion-sheet[data-detail-motion-kind="exit"] .detail-body { opacity:0;transition:opacity 180ms ease; }
@keyframes detail-body-arrive { from {opacity:0;transform:translateY(12px)} to {opacity:1;transform:none} }
@media (prefers-reduced-motion:reduce) { .detail-motion-sheet .detail-body {animation:none;} }

.detail-thumbs .media-crop { width:84px; }
.detail-thumbs .media-crop > img { max-width:none;max-height:none; }
