.design-two .gallery-section { padding-bottom: 72px; }
.gallery-viewer [hidden] { display: none; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
#gallery-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.gallery-help { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.gallery-grid { columns: 3; column-gap: 24px; list-style: none; margin: 0; padding: 0; }
.gallery-grid > li { break-inside: avoid; margin-bottom: 24px; }
.gallery-grid figure { margin: 0; border-radius: 18px; background: var(--navy); color: white; overflow: hidden; }
.gallery-photo { display: block; position: relative; background: #0b2538; }
.gallery-photo img { width: 100%; height: auto; }
.gallery-expand { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--navy); transition: transform 180ms ease; }
.gallery-expand .icon { width: 18px; height: 18px; }
.gallery-photo:focus-visible { outline: 4px solid var(--yellow); outline-offset: -4px; }
.gallery-viewer { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); border: 1px solid #ffffff30; border-radius: 20px; padding: 0; background: #0b2538; color: white; margin: auto; }
.gallery-viewer::backdrop { background: #04121bef; }
.gallery-viewer-inner { padding: 16px; }
.gallery-viewer-top, .gallery-viewer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-viewer-top { padding-bottom: 12px; }
.gallery-viewer-top p { color: #c6dbe8; font-size: 13px; }
.gallery-viewer button { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 8px 12px; background: #ffffff12; border: 1px solid #ffffff40; border-radius: 100px; color: #fff; font-size: 14px; }
.gallery-viewer button:hover { background: var(--yellow); color: var(--navy); }
.gallery-viewer button:focus-visible, .gallery-viewer a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.gallery-close span { font-size: 26px; line-height: 1; }
.gallery-stage { display: grid; place-items: center; height: min(70dvh, 800px); min-height: 100px; background: #061725; border-radius: 10px; touch-action: pan-y pinch-zoom; }
#gallery-full-photo { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
#gallery-error { padding: 24px; text-align: center; }
#gallery-error a { color: var(--yellow); text-decoration: underline; }
.gallery-viewer-bottom { padding-top: 14px; }
.gallery-prev .icon { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
  .gallery-photo:hover .gallery-expand { transform: scale(1.12); }
}
@media (max-width: 960px) { .gallery-grid { columns: 2; } }
@media (max-width: 600px) {
  .gallery-grid { columns: 1; }
  .gallery-toolbar { gap: 14px; }
  .gallery-viewer { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .gallery-viewer-inner { padding: 12px; }
  .gallery-stage { height: 65dvh; }
  .gallery-viewer-bottom { gap: 10px; }
}
@media (max-height: 500px) { .gallery-stage { height: 52dvh; } }
@media (prefers-reduced-motion: reduce) { .gallery-expand { transition: none; } }
