/* Photo viewer + /photos gallery (2026-11-14, editor preview). See viewer.js. */
.pv-can { cursor: zoom-in; }
.pv-can:focus-visible { outline: 3px solid #4fc6b8; outline-offset: 3px; }
html.pv-open { overflow: hidden; }
.pv { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 14, 17, .97); color: #eadfb8; overscroll-behavior: contain; }
.pv::backdrop { background: rgba(8, 14, 17, .9); }
.pv[open] { animation: pv-in .18s ease-out; }
@keyframes pv-in { from { opacity: 0; } }
.pv-stage { position: absolute; inset: 0 0 calc(var(--pv-bar, 74px) + var(--pv-strip, 72px)); z-index: 1; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
.pv-img { max-width: calc(100vw - 24px); max-height: calc(100dvh - var(--pv-bar, 74px) - var(--pv-strip, 72px) - 24px); width: auto; height: auto; object-fit: contain;
  user-select: none; -webkit-user-drag: none; cursor: zoom-in; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.pv.zoomed .pv-stage { display: block; overflow: auto; touch-action: auto; cursor: grab; }
.pv.zoomed .pv-stage.drag { cursor: grabbing; }
.pv.zoomed .pv-img { max-width: none; max-height: none; cursor: zoom-out; box-shadow: none; }
.pv-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(19, 38, 45, .72); color: #eadfb8; font: 400 34px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.pv-btn:hover, .pv-btn:focus-visible { background: #0f7168; color: #fff; outline: none; }
.pv-x { top: 12px; right: 12px; font-size: 32px; }
.pv-prev, .pv-next { z-index: 2; top: calc(50% - 24px - (var(--pv-bar, 74px) + var(--pv-strip, 72px)) / 2); font-size: 40px; padding-bottom: 4px; }
.pv-prev { left: 12px; } .pv-next { right: 12px; }
.pv.single .pv-prev, .pv.single .pv-next, .pv.zoomed .pv-prev, .pv.zoomed .pv-next { display: none; }
.pv-bar { position: absolute; left: 0; right: 0; bottom: 0; min-height: var(--pv-bar, 74px); display: flex; align-items: center; gap: 14px;
  padding: 8px max(16px, calc((100vw - 1100px) / 2)); background: rgba(19, 38, 45, .9); border-top: 1px solid rgba(234, 223, 184, .15); }
.pv-cap { flex: 1; margin: 0; font: 15px/1.4 "Public Sans", system-ui, sans-serif; max-height: 4.3em; overflow-y: auto; }
.pv-cap .credit { opacity: .75; font-size: 13px; margin-left: 4px; }
.pv-cap a { color: #4fc6b8; }
.pv-n { font: 600 13px/1 "Oswald", sans-serif; letter-spacing: .08em; opacity: .8; white-space: nowrap; }
.pv-zoom { position: static; width: 40px; height: 40px; font-size: 24px; flex: none; }
.pv.zoomed .pv-bar { opacity: .35; }
@media (max-width: 600px) {
  .pv { --pv-bar: 124px; }
  .pv-cap { font-size: 14px; max-height: 4.3em; flex: 1 1 100%; }
  .pv-bar { flex-wrap: wrap; row-gap: 6px; column-gap: 12px; justify-content: flex-end; padding-top: 10px; }
  .pv-bar > .pv-act { margin: 0 auto 0 0; padding: 6px 14px; }
  .pv-zoom { width: 36px; height: 36px; }
  .pv-prev, .pv-next { width: 40px; height: 40px; font-size: 32px; top: auto; bottom: calc(var(--pv-bar) + var(--pv-strip) + 10px); }
  .pv-img { max-width: 100vw; }
}
@media (prefers-reduced-motion: reduce) { .pv[open] { animation: none; } }

/* /photos */
.gal-page { max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }
.gal-page h1 { margin: 18px 0 6px; }
.gal-lede { max-width: 62ch; color: var(--ink-2); margin: 0 0 22px; }
.gal-set { margin: 0 0 38px; }
.gal-set h2 { margin: 0 0 4px; font-size: 22px; }
.gal-set h2 a { text-decoration: none; }
.gal-set h2 a:hover { text-decoration: underline; }
.gal-meta { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.gal-grid { columns: 4 230px; column-gap: 10px; }
.gal-item { display: block; break-inside: avoid; margin: 0 0 10px; border-radius: 6px; overflow: hidden; background: var(--paper-2); position: relative; }
.gal-item img { display: block; width: 100%; height: auto; transition: transform .35s ease, filter .35s; cursor: zoom-in; }
.gal-item:hover img, .gal-item:focus-visible img { transform: scale(1.035); filter: brightness(1.06); }
.gal-item:focus-visible { outline: 3px solid #0f7168; outline-offset: 2px; }
@media (max-width: 520px) { .gal-grid { columns: 2; column-gap: 6px; } .gal-item { margin-bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .gal-item img { transition: none; } }

/* access photos on the river pages (access_pics() in src/access.php) */
.acc-pics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.acc-pics .gal-item { width: 96px; height: 64px; margin: 0; border-radius: 5px; }
.acc-pics .gal-item img { width: 100%; height: 100%; object-fit: cover; }
.acc-pics-n { font-size: 13px; color: var(--ink-2); margin-left: 2px; }

/* "Just for fun" band: coloring book + backyard bugs (family_band() in src/coloring.php) */
.fam { margin: 26px 0 30px; }
.fam-h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; padding-bottom: 6px; border-bottom: 3px solid var(--ink, #eadfb8); font-size: 26px; }
.fam-h span { font: 600 13px/1 "Oswald", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #4fc6b8; }
.fam-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.fam-card p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.fam-card p a { text-decoration: none; } .fam-card p b { display: block; font-size: 19px; color: var(--ink); margin-bottom: 2px; }
.fam-card p a:hover b { text-decoration: underline; }
.cbk-promo { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.cbk-promo img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.cbk-promo:hover img, .cbk-promo:focus-visible img { transform: scale(1.025); }
.cbk-promo:focus-visible { outline: 3px solid #4fc6b8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cbk-promo img { transition: none; } }
.pv-act { display: inline-flex; align-items: center; margin-left: 8px; padding: 3px 12px; border-radius: 999px; background: #4fc6b8; color: #13262d; font: 600 13px/1.3 "Oswald", sans-serif; letter-spacing: .03em; text-decoration: none; white-space: nowrap; }
.pv-act:hover { background: #7fdccf; }
.pv-cap b { color: #fff; margin-right: 4px; }
.ac-slide { display: none; font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .ac-slide { display: inline; } }

/* viewer extras (2026-11-14): the photo's own colors glow softly behind it, photos slide in, a strip of thumbnails, slideshow */
.pv { background: #070d10; }
.pv-amb { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; filter: blur(48px) saturate(1.3) brightness(.42); opacity: .9; pointer-events: none; transition: opacity .4s; }
.pv-x, .pv-bar, .pv-strip { z-index: 2; }
.pv.zoomed .pv-amb { opacity: .35; }
.pv-in-r { animation: pv-from-r .32s cubic-bezier(.2, .8, .2, 1); } .pv-in-l { animation: pv-from-l .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes pv-from-r { from { opacity: 0; transform: translateX(40px) scale(.985); } }
@keyframes pv-from-l { from { opacity: 0; transform: translateX(-40px) scale(.985); } }
.pv-img { border-radius: 4px; }
.pv-strip { position: absolute; left: 0; right: 0; bottom: var(--pv-bar, 74px); height: var(--pv-strip, 72px); display: flex; gap: 6px; align-items: center; justify-content: safe center; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.pv-strip::-webkit-scrollbar { display: none; }
.pv-th { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #000; opacity: .55; cursor: pointer; transition: opacity .2s, border-color .2s, transform .2s; }
.pv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-th:hover, .pv-th:focus-visible { opacity: .9; outline: none; }
.pv-th.on { opacity: 1; border-color: #4fc6b8; transform: translateY(-3px); }
.pv.single { --pv-strip: 0px; } .pv.single .pv-play { display: none; }
.pv-play { position: static; width: 40px; height: 40px; font-size: 15px; flex: none; }
.pv.playing .pv-play { background: #0f7168; color: #fff; }
.pv.zoomed .pv-strip { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .pv { --pv-strip: 58px; } .pv-th { width: 52px; height: 40px; } .pv-play { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { .pv-in-r, .pv-in-l { animation: none; } .pv-th { transition: none; } }
/* editor tools on /photos */
.gal-cell, .gal-hid { break-inside: avoid; margin: 0 0 10px; position: relative; }
.gal-cell .gal-item { margin: 0; }
.gal-ed { position: absolute; top: 6px; right: 6px; margin: 0; }
.gal-ed button { padding: 5px 12px; border: 0; border-radius: 999px; background: rgba(10, 18, 22, .82); color: #fff; font: 600 13px/1.2 "Oswald", sans-serif; letter-spacing: .03em; cursor: pointer; }
.gal-ed button:hover { background: #c4473d; }
.gal-hid { border-radius: 6px; overflow: hidden; outline: 2px dashed rgba(196, 71, 61, .7); outline-offset: -2px; }
.gal-hid img { display: block; width: 100%; height: auto; opacity: .3; filter: grayscale(1); }
.gal-hid .gal-ed button { background: #0f7168; }
@media (max-width: 520px) { .gal-cell, .gal-hid { margin-bottom: 6px; } }
