/* =============================================
   Now Lightbox — now 페이지 전용
   ============================================= */
:root {
    --nlb-bg: rgba(10, 14, 13, 0.85);
    --nlb-accent: #2D4B43;
    --nlb-accent-light: #3d6357;
    --nlb-text: #f0f0ec;
    --nlb-muted: #9a9a94;
    --nlb-border: rgba(255,255,255,0.08);
    --nlb-panel: rgba(15,20,18,0.9);
    --nlb-orange: #FC4C02;
    --nlb-r: 4px;
}

#nlb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--nlb-bg);
    backdrop-filter: blur(2px);
    flex-direction: column;
}
#nlb-overlay.nlb-open { display: flex; }

/* ── 상단바 ── */
#nlb-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
}
#nlb-overlay.nlb-ui #nlb-topbar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#nlb-counter {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 1px;
    flex: 1;
}
#nlb-topbar-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

/* ── 버튼 ── */
.nlb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--nlb-r);
    background: rgba(0,0,0,0.45);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.nlb-btn:hover { background: var(--nlb-accent); color: #fff; border-color: var(--nlb-accent); }
.nlb-btn svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
}

/* ── 토글 스위치 ── */
#nlb-exif-toggle {
    display: flex; align-items: center; gap: 5px;
    cursor: pointer; padding: 0 4px;
}
.nlb-toggle-label {
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    transition: color 0.2s; user-select: none;
}
.nlb-toggle-label.active { color: var(--nlb-orange); }
#nlb-toggle-track {
    width: 32px; height: 17px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    position: relative; flex-shrink: 0;
    transition: background 0.25s;
}
#nlb-toggle-track.nlb-box-active { background: var(--nlb-accent); }
#nlb-toggle-thumb {
    position: absolute; top: 2px; left: 2px;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
#nlb-toggle-track.nlb-box-active #nlb-toggle-thumb { transform: translateX(15px); }

/* ── 이미지 영역 ── */
#nlb-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    margin: 2px;
}
#nlb-img {
    display: block;
    max-width: calc(100vw - 4px);
    max-height: calc(100vh - 4px);
    width: auto; height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
    transition: opacity 0.2s;
    user-select: none;
    -webkit-user-drag: none;
}
#nlb-overlay.nlb-mode-box #nlb-img {
    max-height: calc(100vh - 4px - 52px);
}
#nlb-img.nlb-loading { opacity: 0; }

/* 스피너 */
#nlb-spinner {
    display: none; position: absolute;
    width: 28px; height: 28px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--nlb-accent-light);
    border-radius: 50%;
    animation: nlb-spin 0.7s linear infinite; z-index: 3;
}
#nlb-spinner.active { display: block; }
@keyframes nlb-spin { to { transform: rotate(360deg); } }

/* ── 네비 ── */
.nlb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 56px;
    border-radius: var(--nlb-r); z-index: 10;
    opacity: 0; transition: opacity 0.22s;
}
#nlb-overlay.nlb-ui .nlb-nav { opacity: 1; }
#nlb-prev { left: 10px; }
#nlb-next { right: 10px; }
.nlb-nav.hidden { opacity: 0 !important; pointer-events: none; }

/* ── EXIF 오버레이 ── */
#nlb-exif-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    z-index: 15;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    padding: 28px 14px 10px;
    display: none;
}
#nlb-overlay.nlb-mode-overlay #nlb-exif-overlay { display: block; }
#nlb-exif-overlay-inner {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 4px 0;
}

/* ── 하단 EXIF 박스 ── */
#nlb-bottom {
    width: 100%; flex-shrink: 0;
    background: var(--nlb-panel);
    border-top: 1px solid var(--nlb-border);
    padding: 9px 16px 11px;
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 52px;
}
#nlb-overlay.nlb-mode-box #nlb-bottom { display: flex; }
#nlb-exif {
    display: flex; flex-wrap: wrap;
    justify-content: center; gap: 4px 0;
}

/* ── EXIF 공통 ── */
.nlb-exif-item {
    display: flex; align-items: center;
    gap: 4px; padding: 0 10px;
    border-right: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
}
.nlb-exif-item:last-child { border-right: none; }
.nlb-exif-label {
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase;
    color: var(--nlb-orange);
    display: flex; align-items: center; gap: 3px; flex-shrink: 0;
}
.nlb-exif-label svg {
    width: 11px; height: 11px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nlb-exif-text { display: inline; }
.nlb-exif-val {
    font-size: 12px; color: var(--nlb-text);
    font-variant-numeric: tabular-nums;
}
#nlb-exif-overlay-inner .nlb-exif-val {
    color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
#nlb-exif-overlay-inner .nlb-exif-label { text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* 렌즈 truncate */
.nlb-exif-lens-item { max-width: 260px; }
.nlb-exif-lens-val {
    max-width: 180px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
    cursor: pointer;
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}
.nlb-exif-lens-val:hover { border-bottom-color: var(--nlb-orange); }

/* ── 토스트 ── */
#nlb-toast {
    position: absolute; bottom: 68px; left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(20,26,24,0.96);
    border: 1px solid var(--nlb-border);
    color: var(--nlb-text); font-size: 12px;
    padding: 7px 14px; border-radius: 6px;
    white-space: nowrap; max-width: 90vw;
    overflow: hidden; text-overflow: ellipsis;
    pointer-events: none; opacity: 0;
    transition: opacity 0.2s, transform 0.2s; z-index: 30;
}
#nlb-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 페이드인 ── */
@keyframes nlb-fadein { from { opacity: 0; } to { opacity: 1; } }
.nlb-anim { animation: nlb-fadein 0.2s ease forwards; }

/* ── 모바일 ── */
@media (max-width: 768px) {
    .nlb-nav { width: 30px; height: 44px; }
    #nlb-prev { left: 4px; }
    #nlb-next { right: 4px; }
    .nlb-exif-item { padding: 0 7px; }
    .nlb-exif-text { display: none; }
    .nlb-exif-label svg { width: 12px; height: 12px; }
    .nlb-exif-lens-item { max-width: 130px; }
    .nlb-exif-lens-val { max-width: 90px; }
}
