.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:22px;margin:28px 0}.gallery-photo{margin:0;border:1px solid var(--line);border-radius:8px;background:#fff;overflow:hidden;min-width:0}.gallery-photo img{display:block;width:100%;height:280px;object-fit:contain;background:#e7edf1}.gallery-photo figcaption,.gallery-photo .photo-controls{padding:16px;overflow-wrap:anywhere}.gallery-photo figcaption{white-space:pre-wrap}.gallery-photo .photo-controls p{margin:4px 0 12px}.gallery-photo button{margin:4px 6px 4px 0}.gallery-action{display:inline-block;padding:10px 16px;background:var(--teal);color:white!important;border-radius:4px;text-decoration:none}.share-preview{display:block;max-width:100%;max-height:340px;object-fit:contain;margin:16px 0}.account-main input[type=file]{font-size:14px}.gallery-owner-email{overflow-wrap:anywhere;font-size:13px}@media(max-width:550px){.gallery-grid{grid-template-columns:1fr}.gallery-photo img{height:270px}}

.example-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0 28px;
}
.example-gallery-grid a {
  display: block;
}
.example-gallery-grid a:focus-visible {
  outline: 3px solid white;
  outline-offset: -5px;
}
.example-gallery-grid img {
  height: auto;
}
@media (max-width: 600px) {
  .example-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Compact public thumbnails; owner and upload screens retain their styles. */
.keepsake-gallery .gallery-grid{grid-template-columns:repeat(auto-fill,minmax(110px,140px));gap:12px;margin:12px 0 24px}.keepsake-gallery .gallery-photo img{height:185px;object-fit:contain}.keepsake-gallery .gallery-photo a{display:block}.keepsake-gallery .gallery-photo a:focus-visible{outline:3px solid var(--teal);outline-offset:-3px}.keepsake-gallery .gallery-photo figcaption{padding:10px;font-size:12px;line-height:1.45}.gallery-thumbnail-hint{font-size:13px;color:var(--muted)}@media(max-width:600px){.keepsake-gallery .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:436px}.keepsake-gallery .gallery-photo img{height:auto;aspect-ratio:3/4;object-fit:contain}}

.gallery-design-prompt{margin:16px 0 24px}.account-main a.gallery-start-design{display:inline-flex;align-items:center;justify-content:center;min-width:180px;min-height:48px;padding:12px 26px;border:1px solid var(--teal);border-radius:6px;background:var(--teal);color:#fff;font:600 17px/1.4 "Segoe UI",Arial,sans-serif;text-decoration:none;box-shadow:0 2px 5px #102e4d17}.gallery-start-design:hover{background:#22547c;border-color:#22547c}.gallery-start-design:focus-visible{outline:3px solid #c99556;outline-offset:4px}@media(max-width:600px){.gallery-start-design{width:100%}}

/* Paired gallery actions wrap on narrow screens. */
.gallery-design-prompt,.keepsake-gallery #cylinder-lanterns>p:last-child{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.account-main button.gallery-start-design{display:inline-flex;align-items:center;justify-content:center;min-width:180px;min-height:48px;padding:12px 26px;border:1px solid var(--teal);border-radius:6px;background:#fff;color:var(--teal);font:600 17px/1.4 "Segoe UI",Arial,sans-serif;cursor:pointer;box-shadow:0 2px 5px #102e4d17}.account-main button.gallery-view-designs:hover{background:#edf3f8}.account-main button.gallery-view-designs:focus-visible{outline:3px solid #c99556;outline-offset:4px}@media(max-width:600px){.keepsake-gallery .gallery-start-design{width:100%}}
