.project-caption:has(> .project-gallery-action) { flex-wrap: wrap; gap: 8px 12px; }
.project-open.project-gallery-action {
  flex: 0 0 100%; display: flex; justify-content: flex-start; align-items: center;
  width: auto; height: auto; min-height: 44px; gap: 12px; padding: 8px 0;
  border: 0; background: transparent; color: var(--bronze); font-family: var(--font);
  font-size: 16px; line-height: 1.4; cursor: pointer; text-align: left;
}
.project-gallery-action [data-gallery-label] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.project-gallery-action [data-gallery-count] { color: var(--muted); white-space: nowrap; font-size: 14px; }
.project-gallery-action .icon { width: 22px; height: 22px; flex: 0 0 22px; }
.project-gallery-action:hover [data-gallery-label] { text-decoration-thickness: 2px; }
.project-gallery-action:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.gallery-caption-reserve { display: none; }
@media (min-width: 700px) {
  .project-rail .project:has(.project-gallery-action) { display: flex; flex-direction: column; }
  .project-rail .project-caption:has(> .project-gallery-action) { flex: 1; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: space-between; }
  .project-rail .project-open.project-gallery-action { flex: 0 0 auto; }
  @supports (grid-template-rows: subgrid) {
    .project-rail:has(.project-gallery-action) { grid-template-rows: auto auto auto; row-gap: 0; }
    .project-rail .project:has(.project-gallery-action) { display: grid; grid-row: 1 / span 3; grid-template-rows: subgrid; row-gap: 0; }
    .project-rail .project-caption:has(> .project-gallery-action) { display: grid; grid-row: 2 / span 2; grid-template-rows: subgrid; }
  }
}
@media (max-width: 699px) {
  .mobile-project-caption:has(> .project-gallery-action) { gap: 8px; }
  .mobile-project-caption [data-gallery-caption-stack] { display: grid; width: 100%; min-width: 0; }
  .mobile-project-caption [data-gallery-caption-slot], .mobile-project-caption .gallery-caption-reserve { grid-area: 1 / 1; align-self: start; }
  .mobile-project-caption .gallery-caption-reserve { display: block; visibility: hidden; pointer-events: none; }
  .project-open.project-gallery-action { flex-wrap: wrap; }
}
