/* ── FAMS lightbox: fullscreen image viewer (js/lightbox.js) ── */
.flb { position: fixed; inset: 0; z-index: 10050; display: flex; flex-direction: column; background: rgba(5,10,3,.96); color: #fff; opacity: 0; transition: opacity .25s ease; }
.flb[hidden] { display: none; }
.flb.is-open { opacity: 1; }
.flb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex: 0 0 auto; }
.flb-title { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flb-count { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.flb-btn { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, transform .2s; }
.flb-btn:hover { background: rgba(255,255,255,.18); }
.flb-btn:focus-visible, .flb-thumb:focus-visible { outline: 3px solid #d4a843; outline-offset: 2px; }
.flb-main { position: relative; flex: 1 1 auto; min-height: 0; }
.flb-stage { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 64px; touch-action: pan-y pinch-zoom; overscroll-behavior: contain; }
.flb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; cursor: zoom-in; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity .25s ease; }
.flb-img.is-loaded { opacity: 1; }
.flb-stage.is-zoomed { overflow: auto; display: block; padding: 0; cursor: grab; touch-action: auto; }
.flb-stage.is-zoomed.is-dragging { cursor: grabbing; }
.flb-stage.is-zoomed .flb-img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; display: block; margin: auto; }
.flb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; font-size: 28px; background: rgba(0,0,0,.45); }
.flb-prev { left: 10px; }
.flb-next { right: 10px; }
.flb-nav:hover { transform: translateY(-50%) scale(1.06); }
.flb-stage.is-zoomed ~ .flb-nav { opacity: .35; }
.flb-cap { flex: 0 0 auto; margin: 0; padding: 10px 16px 4px; min-height: 24px; text-align: center; font-size: 14px; color: rgba(255,255,255,.85); }
.flb-hint { flex: 0 0 auto; margin: 0; padding: 0 16px 6px; text-align: center; font-size: 12px; color: rgba(255,255,255,.6); }
.flb-thumbs { flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 16px 16px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; justify-content: safe center; }
.flb-thumb { flex: 0 0 auto; width: 72px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #111; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.flb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flb-thumb:hover { opacity: .85; }
.flb-thumb.is-active { opacity: 1; border-color: #d4a843; }
.flb-single .flb-nav, .flb-single .flb-thumbs, .flb-single .flb-count { display: none; }
html.flb-lock, html.flb-lock body { overflow: hidden; }
/* Fullscreen video player (FamsVideo) */
.fvp { position: fixed; inset: 0; z-index: 10060; display: flex; align-items: center; justify-content: center; background: #000; }
.fvp[hidden] { display: none; }
.fvp-box { width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9; }
.fvp-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.fvp-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 2; background: rgba(0,0,0,.55); }
@media (max-width: 640px) {
    .flb-stage { padding: 0 8px; }
    .flb-nav { width: 40px; height: 40px; font-size: 24px; }
    .flb-prev { left: 4px; }
    .flb-next { right: 4px; }
    .flb-thumb { width: 56px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .flb, .flb-img, .flb-thumbs { transition: none; scroll-behavior: auto; }
}
