.gallery-action-row .media-gallery, .gallery-action-row .media-photo-actions:not([hidden]) { display: contents; }
.gallery-action-row:not(:has(*)) { display: none; }
.gallery-action-row .media-photos-heading { flex-basis: 100%; order: -3; margin: 0; }
.gallery-action-row:not(:has([data-media-gallery-target=saved] > *)) .media-photos-heading { display: none; }
.gallery-action-row:has(.thumb-gallery > *) { margin-top: 0; }
.gallery-action-row .thumb-gallery { flex-basis: 100%; order: -2; margin: .5rem 0 0; }
.gallery-action-row:has(.media-photos-heading):has([data-media-gallery-target=saved] > *) .thumb-gallery { margin-top: 0; }
.gallery-action-row .thumb-gallery:not(:has(*)) { display: none; }
.gallery-action-row .thumb-gallery .thumb-remove { padding: 0; font-size: 11px; line-height: 1; }
.gallery-action-row .thumb-gallery .thumb-make-cover { padding: 0; font-size: 12px; line-height: 1; }
.gallery-action-row .media-photo-options { min-width: 0; }
.gallery-action-row .media-photo-options summary { display: inline-block; list-style: none; cursor: pointer; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--accent); font: 550 .9rem Arial, sans-serif; line-height: normal; white-space: nowrap; }
.gallery-action-row .media-photo-options summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.gallery-action-row .media-photo-options summary::-webkit-details-marker { display: none; }
.gallery-action-row .media-photo-options[open] { flex-basis: 100%; }
.gallery-action-row .media-photo-options-panel { max-width: 100%; padding-top: .5rem; }
.gallery-action-row .media-photo-options-panel .card-sub { margin: .4rem 0 0; }
.gallery-action-row .media-gallery > [data-media-gallery-target=status]:empty { display: none; }
