/* lightbox.css — the accessible image viewer for the book. 2026-10-23.
   Palette rides the lookbook: gold #d4b670, hairline #8b6f3d, cream #f5e6d3.
   Day and night both work: the backdrop is near-opaque, so it reads the same
   over either theme. Reduced-motion honored: no animation unless allowed. */

/* triggers (added by lightbox.js only to zoomable images) */
.lb-trigger { cursor: zoom-in; }
.lb-trigger:focus-visible { outline: 3px solid #d4b670; outline-offset: 3px; }

/* scroll lock while the viewer is open */
html.lb-lock, html.lb-lock body { overflow: hidden; }

.lb-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(13, 8, 5, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.lb-backdrop[hidden] { display: none; }

.lb-dialog {
  display: flex; flex-direction: column;
  width: min(96vw, 1600px); height: min(94vh, 1200px);
  border: 1px solid #8b6f3d; border-radius: 10px;
  background: #1a120c;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.lb-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #8b6f3d;
  background: #2c1810;
}

.lb-caption {
  margin: 0; color: #f5e6d3;
  font: italic 0.9rem/1.4 Georgia, 'Times New Roman', serif;
  flex: 1 1 240px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.lb-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.lb-btn {
  appearance: none; border: 1px solid #8b6f3d; border-radius: 6px;
  background: transparent; color: #f5e6d3;
  font: 0.85rem/1 Georgia, serif; padding: 0.45rem 0.7rem;
  cursor: pointer; text-decoration: none;
}
.lb-btn:hover { background: #8b6f3d; color: #fff; }
.lb-btn:focus-visible { background: #8b6f3d; color: #fff; outline: 2px solid #d4b670; outline-offset: 2px; }

.lb-pane {
  flex: 1; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
}

/* white backing = the paper the exhibit sits on; SVGs stay crisp at any zoom */
.lb-img { max-width: 100%; height: auto; display: block; background: #fff; }

.lb-hint {
  margin: 0; padding: 0.5rem 0.9rem; border-top: 1px solid #8b6f3d;
  color: rgba(245, 230, 211, 0.65);
  font: 0.78rem/1.4 Georgia, serif;
  background: #2c1810;
}

@media (prefers-reduced-motion: no-preference) {
  .lb-backdrop { animation: lb-fade 0.18s ease-out; }
  @keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
}

@media (max-width: 640px) {
  .lb-dialog { width: 100vw; height: 100vh; border-radius: 0; border: none; }
  .lb-hint { display: none; }
}
