/* Photographs door: clusters, cluster page, licensing, shortlist, photograph sections on records. Tokens only; no italics. */
.ph { max-width: 1480px; margin: 0 auto; }
.ph-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.ph-head h1 { margin: 6px 0 0; }
.ph-lead { max-width: 64ch; color: var(--ink-60); margin: 0; }
.ph-one .ph-lead { margin: 0 0 16px; }
.ph-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.ph-toolbar select { width: auto; }
.ph-search { flex: 1 1 280px; max-width: 420px; }
.ph-toollink { text-decoration: none; padding: 6px 10px; }
.ph-gap { margin-top: 40px; }

/* B/W preview: the exhibition look, for every frame of the photographs door */
body.bw .ph-card img, body.bw .ph-frame img, body.bw .ph-sheet img, body.bw .arch-results img, body.bw .vw img { filter: grayscale(1) contrast(1.05); }

/* Cluster wall */
.ph-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ph-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.ph-card:hover { border-color: var(--ink-40); }
.ph-card-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 4 / 3; background: var(--surface-2); align-items: center; justify-items: center; }
.ph-card-thumbs.n1 { grid-template-columns: 1fr; }
.ph-card-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-card-thumbs.n3 img:first-child { grid-row: span 2; }
.ph-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.ph-card-id { color: var(--muted); }
.ph-card-title { font-weight: 500; line-height: 1.3; }
.ph-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* One cluster */
.ph-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.ph-section-head { display: flex; align-items: center; gap: 10px; }
.ph-side h2 { font-size: 15px; margin: 24px 0 10px; }
.ph-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ph-frame { position: relative; display: block; aspect-ratio: 1; padding: 6px; background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.ph-frame img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.ph-frame-id { position: absolute; left: 0; bottom: 0; font-size: 10px; padding: 3px 5px; background: var(--bg); color: var(--ink-60); }
.ph-frame-marks { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; }
.ph-gate { margin: 0; padding-left: 18px; }
.ph-ephlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ph-ephlist li { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Footage, stories, charts */
.ph-footages { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.ph-footage { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: var(--surface); }
.ph-footage-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.ph-footage-title { font-weight: 500; }
.ph-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0; }
.ph-dl dt { color: var(--muted); }
.ph-dl dd { margin: 0; overflow-wrap: anywhere; }
.ph-links { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ph-link { color: var(--ink-60); }
.ph-link:hover { color: var(--ink); }
.ph-videowrap { display: flex; flex-direction: column; gap: 4px; }
.ph-video { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-radius: var(--radius); overflow: hidden; }
.ph-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ph-play { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: var(--ink-60); }
.ph-play:hover { color: var(--ink); }
.ph-play-icon { font-size: 28px; line-height: 1; }
.ph-story { border-left: 2px solid var(--line); padding: 2px 0 2px 14px; margin: 12px 0; }
.ph-story p { margin: 6px 0; line-height: 1.55; }
.ph-story-archive { border-left-color: var(--warn); }
.ph-charts { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.ph-chartlist { list-style: none; margin: 4px 0; padding: 0; }
.ph-cluster-title { font-weight: 500; margin: 0 0 4px; }
.ph-suggest { color: var(--warn); }

/* Triage on a photograph record */
.ph-triage-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.ph-triage-label { flex: 0 0 120px; color: var(--muted); }

/* Licensing */
.ph-caveats { border: 1px solid var(--line); background: var(--surface); padding: 10px 14px; margin-bottom: 20px; border-radius: var(--radius); }
.ph-caveats p { margin: 4px 0; }
.ph-holders { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.ph-holders > p { grid-column: 1 / -1; margin: 0; }
.ph-holder h2 { font-size: 17px; margin: 0; }
.ph-holder.is-focus { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-soft); }
.ph-holder-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ph-holder-set { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.ph-holder-set input { flex: 1 1 160px; }
.ph-hist { margin: 6px 0 0; padding-left: 18px; }
.ph-reltable { width: 100%; border-collapse: collapse; }
.ph-reltable th, .ph-reltable td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.ph-reltable th { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* Shortlist sheet, printable */
.ph-print-head { display: none; }
.ph-print { display: flex; flex-direction: column; gap: 16px; }
.ph-sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; border: 1px solid var(--line); padding: 14px; break-inside: avoid; border-radius: var(--radius); }
.ph-sheet img { width: 100%; height: auto; display: block; }
.ph-sheet h2 { font-size: 18px; margin: 4px 0 8px; }
.ph-sheet p { margin: 4px 0; }
@media print {
  .topbar, .footer, .no-print, .toasts { display: none !important; }
  main#view { padding: 0; }
  .ph-print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #E5E0D8; padding-bottom: 8px; margin-bottom: 12px; }
  .ph-print-head .dot { font-style: italic; }
  .ph-sheet { page-break-inside: avoid; }
}

@media (max-width: 900px) {
  .ph-cols { grid-template-columns: 1fr; }
  .ph-holders { grid-template-columns: 1fr; }
  .ph-sheet { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ph-wall { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ph-frames { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .ph-search { max-width: none; }
  .ph-reltable { display: block; overflow-x: auto; }
  .ph-triage-label { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .ph-wall { grid-template-columns: 1fr; }
}

/* Releases (albums and singles) */
.ph-releases { list-style: none; margin: 6px 0 12px; padding: 0; border-top: 1px solid var(--line); }
.ph-release { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ph-release-main { display: flex; flex-direction: column; gap: 2px; }
.ph-release-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.ph-release-cols h3 { font-size: 16px; margin: 0 0 4px; }
@media (max-width: 720px) { .ph-release { grid-template-columns: 1fr; } }

/* Known items (ephemera door) */
.kn-list { display: flex; flex-direction: column; gap: 12px; }
.kn-item { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kn-photos { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.kn-photos a { display: block; flex: 1 1 140px; max-width: 100%; }
.kn-photos img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.kn-title { font-size: 18px; margin: 4px 0 8px; }
@media (max-width: 720px) { .kn-item { grid-template-columns: 1fr; } }
.ph-known { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ph-known-item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.ph-known-item img { width: 64px; height: 48px; object-fit: cover; display: block; }
.ph-frame-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.ph-frame-tools select { width: auto; max-width: 360px; }
.ph-frames.is-editable .ph-frame[draggable="true"] { cursor: grab; }
.ph-frame.is-dragging { opacity: 0.35; }
.ph-frame[aria-selected="true"] { outline: 3px solid var(--accent); outline-offset: -3px; }
.ph-frame[aria-selected="true"]::after { content: '✓'; position: absolute; left: 6px; top: 4px; font-size: 14px; color: var(--accent-ink); background: var(--accent); width: 20px; height: 20px; text-align: center; line-height: 20px; border-radius: 50%; }
