@charset "utf-8";
/* ==========================================================================
   부품 — 이미지 뷰어 (rb.js/bf.viewer.js)
   사진이 주인공이라 라이트 · 다크 모드와 상관없이 어두운 바탕이다. 강조는 사이트 하늘색.
   ========================================================================== */

/* 글 속 사진 — 누를 수 있다는 표시 */
.view-body img.bfv-zoomable,
.view-wrap a.view_image img { cursor: zoom-in; }
.view-body img.bfv-zoomable:focus-visible,
.view-wrap a.view_image:focus-visible img { outline: 3px solid var(--sky-400); outline-offset: 3px; }

.bfv {
  --bfv-bg: rgba(7, 13, 19, .96);
  --bfv-btn: rgba(255, 255, 255, .08);
  --bfv-btn-h: rgba(255, 255, 255, .16);
  --bfv-tx: #E9F1F7;
  --bfv-tx2: rgba(233, 241, 247, .62);
  position: fixed; inset: 0;
  z-index: 100000000;   /* 리빌더 관리 도구 막대(99999997)보다 위 — 관리자에게도 사진이 가리지 않게 */
  display: flex; flex-direction: column;
  background: var(--bfv-bg);
  color: var(--bfv-tx);
  opacity: 0;
  transition: opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.bfv.is-open { opacity: 1; }
.bfv[hidden] { display: none; }

/* 위 줄 — 3 / 7 · 도구 */
.bfv-top {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px; padding: 0 16px 0 22px;
}
.bfv-count { margin: 0; font-family: var(--font-en); font-size: 14px; font-weight: 600; color: var(--bfv-tx2); letter-spacing: .02em; }
.bfv-tools { display: flex; align-items: center; gap: 6px; }
.bfv-zoom {
  min-width: 50px; text-align: center;
  font-family: var(--font-en); font-size: 13px; font-weight: 600; color: var(--bfv-tx2);
}
.bfv-btn,
.bfv-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--bfv-btn);
  color: var(--bfv-tx);
  cursor: pointer;
  transition: background .18s, opacity .18s;
}
.bfv-btn:hover,
.bfv-nav:hover { background: var(--bfv-btn-h); }
.bfv-btn:disabled { opacity: .35; cursor: default; background: var(--bfv-btn); }
.bfv-btn svg,
.bfv-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bfv-close { margin-left: 6px; background: rgba(255, 255, 255, .14); }
.bfv :focus-visible { outline: 2px solid var(--sky-400); outline-offset: 2px; }

/* 무대 — 사진 한 장 */
.bfv-stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.bfv.is-zoomed .bfv-stage { cursor: grab; }
.bfv.is-zoomed .bfv-stage:active { cursor: grabbing; }
.bfv-img {
  position: absolute; left: 50%; top: 50%;
  max-width: none; max-height: none;
  transform-origin: 50% 50%;
  user-select: none; -webkit-user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.bfv-img.is-anim { transition: transform .22s ease; }

.bfv-spin {
  display: none;
  position: absolute; left: 50%; top: 50%;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 3px solid rgba(255, 255, 255, .18); border-top-color: var(--sky-400);
  border-radius: 50%;
  animation: bfv-spin .8s linear infinite;
}
.bfv.is-loading .bfv-spin { display: block; }
@keyframes bfv-spin { to { transform: rotate(360deg); } }

.bfv-err {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; padding: 16px 20px;
  border-radius: 12px; background: rgba(255, 255, 255, .08);
  font-size: 14px; color: var(--bfv-tx); text-align: center;
}
.bfv-err a { margin-left: 6px; color: var(--sky-300); text-decoration: underline; }

/* 이전 · 다음 */
.bfv-nav {
  position: absolute; top: 50%; z-index: 2;
  width: 52px; height: 52px; margin-top: -26px;
  background: rgba(255, 255, 255, .1);
}
.bfv-nav svg { width: 24px; height: 24px; }
.bfv-prev { left: 18px; }
.bfv-next { right: 18px; }
.bfv.is-single .bfv-nav { display: none; }

/* 아래 — 설명 · 작은 그림 */
.bfv-foot { flex: none; padding: 8px 16px 16px; text-align: center; }
.bfv-cap {
  max-width: 760px; margin: 0 auto 10px;
  font-size: 14px; line-height: 1.5; color: var(--bfv-tx2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bfv-cap[hidden] { display: none; }
.bfv-thumbs {
  display: flex; justify-content: center; gap: 8px;
  max-width: 100%; overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
.bfv-thumbs::-webkit-scrollbar { display: none; }
.bfv-th {
  flex: none;
  width: 58px; height: 58px; padding: 0;
  border: 2px solid transparent; border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  opacity: .5;
  cursor: pointer;
  transition: opacity .18s, border-color .18s;
}
.bfv-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bfv-th:hover { opacity: .85; }
.bfv-th.on { opacity: 1; border-color: var(--sky-400); }

/* 좁은 화면 — 옆 단추는 숨기고 밀어서 넘긴다. 도구는 줄인다 */
@media (max-width: 640px) {
  .bfv-top { height: 56px; padding: 0 10px 0 16px; }
  .bfv-tools { gap: 4px; }
  .bfv-zoom, .bfv-btn[data-act="out"], .bfv-btn[data-act="in"] { display: none; }
  .bfv-btn { width: 38px; height: 38px; }
  .bfv-nav { display: none; }
  .bfv-th { width: 48px; height: 48px; }
  .bfv-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .bfv, .bfv-img.is-anim { transition: none; }
  .bfv-spin { animation-duration: 2s; }
}
