.gallery-main { width: min(1100px, 100%); padding: 0 32px; margin: 0 auto; }
.gallery-intro { padding: 32px 0 42px; max-width: 700px; }
.gallery-intro h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: .06em; line-height: 1.2; margin: 24px 0 18px; }
.gallery-intro p { color: #bbb; margin: 0; }
.community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.community-photo { margin: 0; min-width: 0; }
.community-photo > a { display: block; aspect-ratio: 1; overflow: hidden; background: #141414; }
.community-photo > a:focus-visible { position: relative; outline: 2px solid #fff; outline-offset: -4px; }
.community-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-submit { border-top: 1px solid #333; margin-top: 72px; padding: 36px 0 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 60px; scroll-margin-top: 24px; }
.gallery-submit form { min-width: 0; }
.gallery-submit p { margin-top: 0; }
.gallery-submit input[type="file"] { line-height: 1.6; font-size: .8125rem; padding: 12px; }
.gallery-submit input::file-selector-button { border: 1px solid #777; background: #171717; color: #fff; font: inherit; margin: 0 12px 0 0; padding: 8px 10px; cursor: pointer; }
.gallery-submit fieldset > .small-copy { margin-top: 10px; }
.photo-link-option { margin: 8px 0 26px; border-bottom: 0 !important; }
.photo-link-option summary { font-size: .8125rem; padding: 8px 0; }
.photo-link-option .disclosure-body { padding: 14px 0 0; }
.submission-preview { margin: 18px 0; }
.submission-preview img { display: block; max-width: 100%; max-height: 240px; height: auto; }
.submission-preview figcaption { overflow-wrap: anywhere; font-size: .75rem; color: #aaa; margin-top: 8px; }
.submission-preview button { background: none; color: #ddd; font: inherit; font-size: .75rem; padding: 12px 0; border: 0; text-decoration: underline; cursor: pointer; }
.community-viewer { background: #000; color: #fff; border: 1px solid #444; padding: 12px 20px 20px; max-width: calc(100vw - 28px); max-height: calc(100dvh - 28px); }
.community-viewer::backdrop { background: rgba(0,0,0,.94); }
.community-viewer > button { display: block; margin-left: auto; min-height: 44px; padding: 8px 0 12px 20px; border: 0; background: none; font: inherit; font-size: .8125rem; color: #fff; cursor: pointer; }
.community-viewer figure { margin: 0; }
.community-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 180px); width: auto; height: auto; margin: 0 auto; }
.community-viewer figcaption { font-size: .75rem; line-height: 1.8; color: #aaa; padding-top: 14px; }
.community-viewer figcaption span, .community-viewer figcaption time, .community-viewer figcaption a { display: block; }
.community-viewer .photo-credit { color: #ddd; }
.community-viewer time { letter-spacing: .06em; }
@media (max-width: 700px) {
  .gallery-main { padding: 0 22px; }
  .gallery-intro { padding-top: 12px; }
  .community-grid { gap: 3px; margin-inline: -14px; }
  .gallery-submit { grid-template-columns: 1fr; gap: 20px; margin-top: 48px; }
}
