/* The photograph made for study (DS1, DS2: the owner's picks of 17 Nov 2026). The large view of
   partials/gallery_script.php (.nv-*) and the row of buttons under a gallery's picture (.gv-*), shared by the
   pick, variety and archive piece pages and every other page that shows photographs. Notes:
   docs/notes-2026-11-17/variety.md. The view is dark in both looks, like the old lightbox. */

/* ---------- under the gallery's picture: Turn over, Enlarge, which side is showing ---------- */
.gv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin-top: .7rem; }
.gv-tools[hidden], .gv-tools .btn[hidden] { display: none; }
.gv-tools .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gv-tools .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; }
.gv-side { margin-left: auto; font-size: .86rem; color: var(--muted); }
.gv-side b { color: var(--navy); }
.gv-side:empty { display: none; }
/* the turn: the picture folds to its edge, the other side is put in, and it unfolds */
#gallery-main-img { transition: transform .17s ease-in; }
#gallery-main-img.gv-turning { transform: perspective(1400px) rotateY(90deg); }
#gallery-main-img.gv-turned-in { transform: perspective(1400px) rotateY(-90deg); transition: none; }
@media (prefers-reduced-motion: reduce) { #gallery-main-img { transition: none; } }
@media (max-width: 560px) {
  .gv-tools .btn { flex: 1 1 0; min-height: 44px; }
  .gv-side { width: 100%; text-align: center; margin: 0; }
}

/* ---------- the large view ---------- */
html.nv-lock, html.nv-lock body { overflow: hidden; }
.nv { position: fixed; inset: 0; z-index: 400; background: #0a101e; color: #e8edf6; display: block; }
.nv[hidden] { display: none; }
.nv-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: zoom-in;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.nv.nv-zoomed .nv-stage { cursor: grab; }
.nv.nv-drag .nv-stage { cursor: grabbing; }
.nv-img { position: absolute; max-width: none; transform-origin: 50% 50%; will-change: transform; border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55); -webkit-user-drag: none; }
.nv-img.nv-ease { transition: transform .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .nv-img.nv-ease { transition: none; } }
.nv-wait { position: absolute; left: 50%; bottom: 5.2rem; transform: translateX(-50%); background: rgba(0, 0, 0, .55);
  color: #e8edf6; font-size: .82rem; border-radius: 8px; padding: .25rem .65rem; pointer-events: none; }
.nv-wait[hidden] { display: none; }

.nv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem;
  background: linear-gradient(rgba(10, 16, 30, .8), rgba(10, 16, 30, 0)); pointer-events: none; }
.nv-top > * { pointer-events: auto; }
.nv-count { font-size: .9rem; font-weight: 600; color: #c9d4e6; margin-right: auto; padding-left: .3rem; font-variant-numeric: tabular-nums; }
.nv-zoom { display: inline-flex; gap: .35rem; }
.nv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 44px; min-height: 44px; padding: .4rem .85rem;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: rgba(22, 34, 58, .9); color: #fff;
  font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.nv-btn:hover { background: #2a3d63; }
.nv-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nv-zoom .nv-btn { padding: .4rem; }
.nv-btn:focus-visible, .nv-nav:focus-visible { outline: 3px solid #8fb4ff; outline-offset: 2px; }
.nv-close { background: #fff; color: #16223a; border-color: #fff; }
.nv-close:hover { background: #e8edf6; }

.nv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: rgba(22, 34, 58, .75); color: #fff; cursor: pointer; }
.nv-nav:hover { background: rgba(42, 61, 99, .95); }
.nv-nav[hidden] { display: none; }
.nv-nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nv-prev { left: .7rem; }
.nv-next { right: .7rem; }
.nv.nv-zoomed .nv-nav { opacity: .35; }

.nv-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1rem .7rem; text-align: center; pointer-events: none;
  background: linear-gradient(rgba(10, 16, 30, 0), rgba(10, 16, 30, .85)); }
.nv-cap { font-size: .88rem; color: #e8edf6; max-width: 70ch; margin: 0 auto; overflow-wrap: anywhere; }
.nv-cap:empty { display: none; }
.nv-tip { font-size: .8rem; color: #a9b6cc; margin-top: .2rem; }
.nv.nv-zoomed .nv-foot { opacity: .25; }

@media (max-width: 560px) {
  .nv-top { padding: .45rem .5rem; gap: .35rem; }
  .nv-full { padding-inline: .6rem; }
  /* on a phone the arrows sit low, clear of the picture, above the caption */
  .nv-nav { top: auto; bottom: 5.4rem; transform: none; width: 52px; height: 48px; }
  .nv-prev { left: .5rem; } .nv-next { right: .5rem; }
}
@media print { .nv, .gv-tools { display: none !important; } }
