/* Real photos (src/photos.mjs). CC BY / BY-SA photos carry a small camera button (.pcred) that opens the credit;
   public domain and CC0 photos show none. */
.pband { margin-block: var(--sp-8) var(--sp-24); position: relative; }
.pband img { display: block; width: 100%; height: clamp(220px, 38vw, 470px); object-fit: cover; border-radius: var(--radius); background: #e9e1d2; }
.pph { position: relative; }
/* A place page's photos (place-image.mjs placeBand, owner 2026-11-22): a wide screen shows them side by side with the
   first one larger; a phone swipes through them with arrows and a count. */
.pg-track { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); grid-template-columns: 2fr 1fr; grid-auto-rows: clamp(110px, 19vw, 235px); }
.pgal[data-n="2"] .pg-track { grid-template-columns: 3fr 2fr; grid-auto-rows: clamp(220px, 38vw, 470px); }
.pg-track li:first-child { grid-row: span 2; }
.pgal[data-n="2"] .pg-track li:first-child { grid-row: auto; }
.pgal .pg-track img { height: 100%; }
.pg-bar { display: flex; align-items: center; gap: var(--sp-8); }
.pg-n { display: none; }
.pg-cred { margin-left: auto; }
.pg-b { width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font: 500 1rem/1 var(--sans); cursor: pointer; }
.pg-b:disabled { opacity: .35; cursor: default; }
@media (max-width: 759px) {
  .pg-track, .pgal[data-n="2"] .pg-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 0; border-radius: var(--radius); }
  .pg-track::-webkit-scrollbar { display: none; }
  .pg-track li { flex: 0 0 100%; scroll-snap-align: start; }
  .pgal .pg-track img { height: clamp(220px, 62vw, 340px); border-radius: 0; }
  .pg-n { display: inline; font: 600 .9rem var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: center; }
}
@media (min-width: 760px) { .pg-b { display: none; } }
/* event page: the organizer's photo or flyer in a fixed 16:10 frame at the top of the text column. The photo is never
   cropped (flyers carry text); a blurred copy of itself fills the frame around a tall or square one. */
.ev1-photo { margin: 0 0 var(--sp-24); max-width: 680px; }
.ev1-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: #e9e1d2; }
.ev1-frame img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ev1-frame .ev1-bg { object-fit: cover; filter: blur(24px) saturate(1.15); transform: scale(1.2); opacity: .9; }
.ev1-frame .ev1-fg { object-fit: contain; }
.ev1-photo:not(:has(.ev1-fg)) { display: none; }
.ev1-main .pband.ev1-band { margin: 0 0 var(--sp-24); max-width: 680px; padding-inline: 0; }
.ev1-main .pband.ev1-band img { height: auto; aspect-ratio: 16 / 10; }
.pcap { margin-top: var(--sp-8); font-size: .75rem; color: var(--ink-3); }

.pcred { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-size: .75rem; line-height: 1.35; }
.pcred summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(10, 18, 36, .42); color: #fff; opacity: .75; transition: opacity .2s, background .2s; }
.pcred summary::-webkit-details-marker { display: none; }
.pcred summary:hover, .pcred summary:focus-visible, .pcred[open] summary { opacity: 1; background: rgba(10, 18, 36, .72); }
.pcred summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pcred-t { position: absolute; right: 0; bottom: 34px; width: max-content; max-width: min(280px, 80vw); padding: var(--sp-8) var(--sp-8); border-radius: 8px; background: rgba(255, 255, 255, .96); color: var(--ink-2); box-shadow: 0 4px 16px rgba(10, 18, 36, .18); text-align: left; }
/* a borrowed venue or landmark photo on a listing row or card keeps its credit button (code review 2026-11-22) */
.ev-time:has(> .pcred), .kx-row:has(> .pcred), :is(.ma-ph, .ff-ph, .lm-ph, .hc-ph, .pick-img):has(> .pcred) { position: relative; }
:is(.ev-time, .kx-row, .ma-ph, .ff-ph) > .pcred { right: var(--sp-8); bottom: var(--sp-8); }
:is(.ev-time, .kx-row, .ma-ph, .ff-ph) > .pcred summary { width: 22px; height: 22px; }
:is(.ev-time, .kx-row, .ma-ph, .ff-ph) > .pcred summary svg { width: 12px; height: 12px; }
:is(.ev-time, .ma-ph, .ff-ph) > .pcred .pcred-t { right: auto; left: 0; bottom: 28px; } /* thumbnails sit at the row's left */
:is(.ma-ph, .ff-ph, .lm-ph, .hc-ph, .pick-img):has(> .pcred[open]) { overflow: visible; }
.pick .pcred { z-index: 3; } /* above the card's cover link */
/* a kids row's thumbnail is its top-right 72px square: the button sits on the photo's bottom corner, the note opens below */
.kx-row > .pcred { top: calc(var(--sp-12) + 72px - 26px); bottom: auto; right: 4px; }
.kx-row > .pcred .pcred-t { bottom: auto; top: 26px; }
.pcred-t a, .pc-list a { color: inherit; text-decoration: underline; text-decoration-color: rgba(71, 81, 93, .35); text-underline-offset: 2px; }

.pcard { margin: -20px -22px var(--sp-16); position: relative; }
.pcard img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: #e9e1d2; }

.pstrip { list-style: none; margin: 0; padding: 0 0 var(--sp-8); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: var(--sp-16); overflow-x: auto; scroll-snap-type: x mandatory; }
.pstrip li { scroll-snap-align: start; min-width: 0; position: relative; }
.pstrip .pcred { top: 10px; bottom: auto; }
.pstrip .pcred-t { top: 34px; bottom: auto; }
.pstrip li > a { position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; }
.pstrip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s ease; background: #e9e1d2; }
.pstrip li > a:hover img, .pstrip li > a:focus-visible img { transform: scale(1.04); }
.pstrip li > a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 18, 40, .62), transparent 45%); }
.pstrip-l { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font: 500 1.3rem/1.2 var(--serif); }
/* mouse below 1100px: a wheel cannot scroll the strip sideways, so the six photos sit three by two */
@media (hover: hover) and (pointer: fine) and (max-width: 1099px) { .pstrip { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }
@media (min-width: 1100px) { .pstrip { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; } }

.pc-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-16); }
.pc-list img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-sm); }
.pc-list p { margin: var(--sp-8) 0 0; font-size: .82rem; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .pstrip img { transition: none; } }
