.swipe-gallery { touch-action: pan-y pinch-zoom; }
.gallery-open { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.gallery-expand-hint { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 7px; background: #14201bce; color: white; font-size: 11px; }
.gallery-expand-hint .icon { width: 16px; height: 16px; }
.gallery-count { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 5px 9px; border-radius: 20px; background: #14201bce; color: white; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.gallery-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff55; border-radius: 50%; background: #14201bbd; color: white; transform: translateY(-50%); cursor: pointer; }
.gallery-arrow .icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-video-fullscreen { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-top: 1px solid #ffffff30; background: #213c30; color: white; font-size: 13px; font-weight: 600; cursor: pointer; }
.gallery-video-fullscreen .icon { width: 19px; height: 19px; }
.gallery-open:focus-visible, .gallery-arrow:focus-visible, .gallery-video-fullscreen:focus-visible, .media-viewer-close:focus-visible { outline: 3px solid #c8df84; outline-offset: -3px; }
dialog.media-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #101512; color: white; animation: none; }
.media-viewer::backdrop { background: #101512; }
.media-viewer-shell { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; background: #101512; color: white; }
.media-viewer-shell:fullscreen { width: 100vw; height: 100dvh; }
.media-viewer-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
.media-viewer-header > div { min-width: 0; }
.media-viewer-title { display: block; overflow: hidden; max-width: 80vw; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; line-height: 1.5; }
.media-viewer-count { display: block; margin-top: 3px; color: #cbd5ce; font-size: 12px; font-variant-numeric: tabular-nums; }
.media-viewer-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #ffffff50; border-radius: 50%; background: #ffffff15; color: white; font-size: 22px; cursor: pointer; }
.media-viewer-body { position: relative; flex: 1 1 0; min-height: 0; }
.media-viewer-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; touch-action: pan-y pinch-zoom; }
.media-viewer-stage > img, .media-viewer-stage > video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.media-viewer-stage.is-video { touch-action: auto; }
.media-viewer-notice { flex: 0 0 auto; margin: 0; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); color: #cbd5ce; text-align: center; font-size: 12px; line-height: 1.45; }
.media-viewer [hidden] { display: none !important; }
@media (max-width: 740px) {
  .detail-media .gallery-count { top: 14px; }
  .media-viewer-title { font-size: 12px; }
  .gallery-arrow { width: 42px; height: 42px; }
  .media-viewer-notice { font-size: 11px; }
}
