.work-media { position: relative; display: grid; place-items: center; min-width: 0; height: 280px; background: #edf3ef; overflow: hidden; }
.work-media > img { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; }
.work-media > img:not([src]) { visibility: hidden; }
.results-grid > .result-card:only-child .work-media { height: min(52dvh, 560px); min-height: 220px; }
.gallery-grid .work-media { aspect-ratio: 1; height: auto; }
.image-load-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: #5b716c; background: #edf3ef; text-align: center; cursor: default; }
.image-load-state[hidden] { display: none; }
.image-load-state span { font-size: 12px; line-height: 1.7; }
.image-load-state progress { width: min(160px, 80%); height: 5px; accent-color: #187b6b; }
.image-load-state button { padding: 7px 13px; background: #fff; border: 1px solid #cadbd4; border-radius: 4px; color: #176e60; font: inherit; font-size: 12px; cursor: pointer; }
.card-actions .image-download { padding: 6px 10px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; border: 1px solid #d9e3d280; border-radius: 4px; background: #f2f7ed7d; color: #617c58; font-size: 12px; text-decoration: none; cursor: pointer; }
.card-actions .image-download:hover { background: #e6efdd; border-color: #a5ba96; color: var(--dark); }
.image-download[aria-disabled=true], .card-actions button:disabled { opacity: .6; cursor: default; }
.gallery-grid .card-actions .image-download { padding: 4px 6px; }
.preview-media { position: relative; }
.preview-media > img:not([src]) { visibility: hidden; }
.preview-info .image-download { display: inline-flex; justify-content: center; gap: 8px; align-items: center; text-decoration: none; }
.preview-info .download-note { color: #617570; font-size: 12px; line-height: 1.6; margin: 0; overflow: visible; }
.download-feedback { margin: 0 0 12px; color: #526c65; font-size: 12px; line-height: 1.7; }
@media (max-width: 820px) {
  .gallery-grid .card-actions .image-download { min-height: 29px; font-size: 10px; }
  .preview-info .download-note { display: block; max-height: none; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-grid .work-media { max-height: 360px; }
  .gallery-grid .card-actions .image-download { min-height: 36px; font-size: 12px; }
}
