﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   9. CHAPTER OVERLAY (drawer)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.ovl {
  position: fixed; inset: 0;
  z-index: 900;
  background: var(--ink-deep);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out);
}
.ovl.active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.ovl-head {
  flex-shrink: 0;
  padding: 18px var(--page-gutter);
  background: rgba(10,9,8,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(196, 167, 108, 0.12);
  display: flex; align-items: center; justify-content: space-between;
  z-index: 2;
}
.ovl-body {
  flex: 1;
  overflow-y: auto;
  padding: 48px var(--page-gutter) 80px;
}
.ovl-head-info { display: flex; align-items: baseline; gap: 24px; }
.ovl-num {
  font-family: var(--font-sc);
  font-size: 11px;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--bronze-pale);
}
.ovl-title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--warm-white);
}
.ovl-close {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid rgba(196, 167, 108, 0.3);
  color: var(--bronze-pale);
  transition: background 0.4s, color 0.4s, border-color 0.4s, transform 0.4s;
}
.ovl-close:hover { background: var(--bronze-pale); color: var(--ink-deep); transform: rotate(90deg); }

.ovl-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  min-height: 1px;
}
.ovl-item {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-warm);
  cursor: zoom-in;
}
.ovl-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s var(--ease-out), transform 2.2s var(--ease-out);
}
.ovl-item img.is-loaded { opacity: 1; transform: scale(1); }
.ovl-item:hover img { transform: scale(1.06); }

.ovl-loading {
  display: flex; justify-content: center; gap: 8px;
  padding: 40px 0;
}
.ovl-loading span {
  width: 6px; height: 6px;
  background: var(--bronze-pale);
  border-radius: 50%;
  animation: ovlDot 1.2s ease-in-out infinite;
}
.ovl-loading span:nth-child(2) { animation-delay: 0.15s; }
.ovl-loading span:nth-child(3) { animation-delay: 0.3s; }
.ovl-loading.hidden { display: none; }
.ovl-empty {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--font-sc);
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(196, 167, 108, 0.38);
}
@keyframes ovlDot {
  0%,100% { opacity: 0.3; transform: scale(0.7); }
  50%     { opacity: 1;   transform: scale(1); }
}

@media (max-width: 820px) { .ovl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ovl-grid { grid-template-columns: 1fr; } }


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   10. LIGHTBOX
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.lb {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(10, 9, 8, 0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}
.lb.active { opacity: 1; pointer-events: auto; }

.lb-figure {
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 120px);
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
.lb-caption {
  font-family: var(--font-sc);
  font-size: 10px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--bronze-pale);
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 1px solid rgba(196, 167, 108, 0.25);
  color: var(--warm-white);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: var(--bronze-pale);
  color: var(--ink-deep);
  border-color: var(--bronze-pale);
}
.lb-close { top: 32px; right: 32px; }
.lb-prev  { left: 32px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 32px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lb-figure { max-width: calc(100vw - 24px); }
  .lb-close { top: 16px; right: 16px; }
  .lb-prev  { left: 8px; }
  .lb-next  { right: 8px; }
  .lb-close, .lb-prev, .lb-next { width: 44px; height: 44px; }
}

/* Mobile chapter quick-view â€” hidden base; mobile.css enables on â‰¤640px */
.hs-quick, .hs-quick-backdrop { display: none; }
