/* YouTube Song Downloader screenshot carousel. Loaded after the page stylesheet. */
.gallery-section { background: #fff; }
.gallery-stage { position: relative; width: 100%; margin: 0 auto; padding: 12px 72px 0; overflow: visible; outline: none; }
.gallery-track { position: relative; width: 100%; }
.gallery-figure { position: relative; width: 100%; margin: 0; cursor: zoom-in; }
.gallery-figure:not(.is-active) { display: none; }
.gallery-media-frame { position: relative; display: grid; place-items: center; width: min(90%, 990px); aspect-ratio: 5 / 3; margin: 0 auto; overflow: hidden; }
.gallery-media-frame::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(3,111,163,.1); border-radius: 8px; pointer-events: none; }
.gallery-media-frame img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; filter: none; }
.gallery-figure figcaption { display: grid; gap: 6px; max-width: 760px; margin: 26px auto 0; text-align: center; }
.gallery-figure figcaption strong { color: var(--ink-strong); font-size: clamp(20px, 2.8vw, 34px); line-height: 1.1; letter-spacing: -.045em; }
.gallery-figure figcaption span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.gallery-arrow { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 32px; height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--accent-dark); cursor: pointer; transform: translateY(-50%); transition: color .2s ease, transform .2s ease; }
.gallery-arrow:hover { background: transparent; color: var(--accent); transform: translateY(-50%) scale(1.06); }
.gallery-arrow svg { width: 34px; height: 34px; stroke-width: 1.7; }
.gallery-arrow-prev { left: 22px; }
.gallery-arrow-next { right: 22px; }
.gallery-footer { display: grid; justify-items: center; gap: 0; padding-top: 28px; }
.gallery-dots { display: flex; align-items: center; justify-content: center; gap: 9px; }
.gallery-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #c8d3d9; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.gallery-dot:hover { background: var(--accent); transform: scale(1.15); }
.gallery-dot.is-active { background: var(--accent-gradient); transform: scale(1.15); }
.gallery-hint { margin: 12px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.gallery-media-frame:focus-visible, .gallery-arrow:focus-visible, .gallery-dot:focus-visible { outline: 3px solid rgba(3,111,163,.35); outline-offset: 4px; }
.gallery-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(3,22,39,.88); backdrop-filter: blur(10px); }
.gallery-modal[hidden] { display: none; }
.gallery-modal-inner { position: relative; width: min(1240px, calc(100vw - 56px)); max-height: 94vh; padding: 24px; border: 1px solid rgba(255,255,255,.25); border-radius: 20px; background: #f4f9fb; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.gallery-modal img { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px; }
.gallery-modal figcaption { display: grid; gap: 4px; margin-top: 14px; color: var(--ink-strong); font-size: 13px; text-align: center; }
.gallery-modal figcaption span { color: var(--muted); }
.gallery-modal-close { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: var(--accent-gradient); color: #fff; cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.gallery-modal-close:focus-visible { outline: 3px solid rgba(3,111,163,.5); outline-offset: 3px; }
body.modal-open { overflow: hidden; }
@media (max-width: 800px) {
  .gallery-stage { padding: 8px 48px 0; }
  .gallery-media-frame { width: 90%; }
  .gallery-figure figcaption { margin-top: 20px; }
  .gallery-figure figcaption strong { font-size: clamp(19px, 5.5vw, 30px); }
  .gallery-figure figcaption span { font-size: 13px; }
  .gallery-arrow { width: 30px; height: 44px; }
  .gallery-arrow-prev { left: 8px; }
  .gallery-arrow-next { right: 8px; }
}
@media (max-width: 520px) {
  .gallery-stage { padding: 4px 38px 0; }
  .gallery-media-frame { width: 90%; }
  .gallery-figure figcaption { margin-top: 16px; }
  .gallery-figure figcaption strong { font-size: 20px; }
  .gallery-figure figcaption span { font-size: 12px; line-height: 1.55; }
  .gallery-arrow { width: 28px; height: 40px; }
  .gallery-arrow svg { width: 28px; height: 28px; }
  .gallery-arrow-prev { left: 4px; }
  .gallery-arrow-next { right: 4px; }
  .gallery-hint { font-size: 10px; }
  .gallery-modal { padding: 12px; }
  .gallery-modal-inner { width: 100%; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-arrow, .gallery-dot { transition: none; } }
