/* =========================================================
   크게 보기 창 (lightbox) + 확인용 샘플 표시
   ========================================================= */

/* 누를 수 있는 카드 */
.is-zoomable { cursor: zoom-in; }
.is-zoomable:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 4px; }

/* 샘플 사진 칸: 오른쪽 위 작은 표시 (실제 사진을 넣으면 사라짐) */
.media.is-sample::before {
  content: "SAMPLE";
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 3px 6px;
  border-radius: var(--radius-btn);
  background: rgba(18, 18, 18, 0.72);
  color: var(--accent-4);
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  pointer-events: none;
}

/* 창이 열려 있는 동안 뒤 페이지는 스크롤되지 않음 */
html.lb-open, html.lb-open body { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  padding: calc(56px + var(--safe-top)) var(--pad) calc(24px + var(--safe-bottom));
  background: rgba(10, 10, 10, 0.97);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-figure {
  grid-column: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  height: 100%; min-width: 0; min-height: 0;
  margin: 0;
}
.lb-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 0;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}
.lb-sample {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: var(--radius-btn);
  background: rgba(18, 18, 18, 0.72);
  color: var(--accent-4);
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
}
.lb-quote {
  max-width: 34ch;
  font-size: clamp(22px, 3vw, 40px); font-weight: 600; line-height: 1.45; letter-spacing: -0.02em;
  color: var(--fg);
}
.lb-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); font-size: 18px;
}
.lb-empty small { font-size: 12px; letter-spacing: 0.04em; }

.lb-caption {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 4px 14px;
  max-width: 100%;
  text-align: center;
}
.lb-meta { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.lb-title { font-size: clamp(15px, 1.4vw, 19px); font-weight: 600; color: var(--fg); }
.lb-count { font-size: 11px; letter-spacing: 0.1em; color: var(--accent-4); }

.lb-close, .lb-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: rgba(18, 18, 18, 0.6);
  color: var(--fg);
  font-size: 18px;
  transition: background .25s, border-color .25s, color .25s;
}
.lb-close {
  position: absolute; top: calc(10px + var(--safe-top)); right: var(--pad);
}
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-nav[hidden] { visibility: hidden; display: inline-flex; }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
@media (hover: hover) {
  .lb-close:hover, .lb-nav:hover { background: var(--accent-5); border-color: var(--accent-5); color: var(--bg); }
}

/* 휴대폰: 화살표는 아래로, 사진은 화면 폭 가득 (밀어서 넘기기도 됨) */
@media (max-width: 560px) {
  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    padding-left: 12px; padding-right: 12px;
  }
  .lb-figure { grid-column: 1 / -1; grid-row: 1; }
  .lb-prev { grid-column: 1; grid-row: 2; justify-self: start; }
  .lb-next { grid-column: 2; grid-row: 2; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox { transition: none; }
}
