/* Memory Lane only: intact photographs and persistent, readable captions. */
.memory-main .history-heading { max-width: 850px; }
.scrap-intro { max-width: 730px; }
.memory-features { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 40px 0; }
.memory-features article { padding: 28px; border-top: 3px solid var(--red); background: var(--white); }
.memory-features h2 { font-size: 1.7rem; line-height: 1.3; margin: 12px 0 18px; }
.memory-features a, .scrap-index a { color: var(--red); }
.scrap-index { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0; margin: 30px 0; border-block: 1px solid var(--line); font: .95rem/1.5 var(--sans); }
.scrap-section { margin-top: 56px; padding-top: 26px; border-top: 2px solid var(--line); scroll-margin-top: 20px; }
.scrap-section > h2 { font-size: 2rem; margin: 0 0 24px; }
.collection-intro { margin-bottom: 28px; }
.scrap-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 38px 40px; align-items: start; margin-top: 26px; }
.memory-main .scrap-photo { min-width: 0; }
.enlarge-photo { display: block; width: fit-content; max-width: 100%; margin-inline: auto; text-decoration: none; color: var(--red); }
.enlarge-photo img { display: block; width: auto; max-width: 100%; max-height: 360px; height: auto; object-fit: contain; margin: 0 auto; }
.enlarge-label { display: block; text-align: center; font: .78rem/1.5 var(--sans); margin-top: 8px; }
.memory-main .scrap-photo figcaption { font-size: .95rem; line-height: 1.65; color: var(--ink); }
.memory-main figcaption p + p { margin-top: 12px; }
.photo-identification { color: var(--red); font-weight: 600; }
.poem-layout { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 36px; max-width: 900px; }
.poem-layout img { max-height: 205px; }
.poem-byline { font-style: italic; margin-bottom: 22px; }
.memory-main .poem p { margin: 0; line-height: 1.8; }
.poem-note { margin-top: 28px; max-width: 680px; font-size: 1rem; }
.short-memory { max-width: 730px; margin-inline: auto; }
.short-memory .scrap-photo { margin-bottom: 28px; }
.tribute-intro { max-width: 730px; display: flow-root; }
.memory-main .tribute-portrait { float: right; width: 145px; margin: 0 0 24px 28px; }
.tribute-portrait .enlarge-photo img { max-height: 210px; }
.tribute-portrait figcaption { font-size: .8rem !important; }
.tribute-narrative .scrap-section { display: flow-root; }
.tribute-narrative .scrap-section:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.voice-note { font-style: italic; color: var(--muted); margin-bottom: 20px; }
#memory-dialog { width: min(1100px,95vw); max-width: 95vw; max-height: 94vh; border: 1px solid var(--red); padding: 20px; background: #f6f2e9; color: var(--ink); overflow: auto; }
#memory-dialog::backdrop { background: #000b; }
.photo-dialog-bar { display: flex; justify-content: space-between; gap: 20px; align-items: center; position: sticky; top: -20px; padding: 12px 0; background: #f6f2e9; z-index: 1; }
.photo-dialog-bar h2 { font-size: 1.2rem; }
#photo-close { background: var(--red); color: white; border: 0; padding: 12px 20px; font: 1rem var(--sans); cursor: pointer; }
.photo-dialog-image img { display: block; max-width: 100%; width: auto; height: auto; margin: 14px auto; }
#photo-dialog-caption { max-width: 800px; margin: 20px auto; font: 1rem/1.65 var(--sans); }
#photo-dialog-caption p + p { margin-top: 14px; }
#photo-original { color: var(--red); }
.memory-page :focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
@media (max-width: 750px) {
 .memory-features, .scrap-grid { grid-template-columns: 1fr; }
 .scrap-grid { gap: 38px; }
 .poem-layout { grid-template-columns: 1fr; gap: 24px; }
 .poem-layout .scrap-photo { max-width: 150px; margin-inline: auto; }
 .scrap-section { margin-top: 40px; }
 .enlarge-photo img { max-height: 430px; }
}
@media (max-width: 450px) {
 .memory-main .tribute-portrait { float: none; margin: 0 auto 24px; }
 .memory-features article { padding: 22px; }
 #memory-dialog { padding: 12px; }
 .photo-dialog-bar { top: -12px; }
}
@media print {
 .memory-features, .scrap-index, .enlarge-label, #memory-dialog { display: none !important; }
 .scrap-grid { display: block; }
 .memory-main .scrap-photo { margin: 20px auto; max-width: 150mm; break-inside: auto; }
 .memory-main .scrap-photo img { max-height: 65mm; max-width: 120mm; }
 .memory-main .scrap-photo figcaption { font-size: 10pt; }
 .scrap-section { margin-top: 24px; padding-top: 16px; }
 .poem-layout { display: block; }
 .poem-layout .scrap-photo { max-width: 30mm; }
 .poem-layout .scrap-photo img { max-height: 35mm; }
 .memory-main .tribute-portrait { float: right; width: 28mm; margin: 0 0 5mm 6mm; }
 .tribute-narrative .scrap-section { display: block; }
 .memory-main .poem p { line-height: 1.5; }
}
/* Reserve image space before lazy images load; never exceed source width. */
.enlarge-photo { width: min(100%, var(--photo-width)); }
.enlarge-photo img { width: 100%; }
#treasure-13, #treasure-20, #treasure-21 { grid-column: 1 / -1; max-width: 640px; width: 100%; justify-self: center; }
#graduation .scrap-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
@media print {
 .enlarge-photo { max-width: 120mm; }
 .enlarge-photo img { width: auto; }
}
@media print {
 .memory-main .scrap-photo { break-inside: avoid; }
 .memory-main .scrap-photo img { max-width: 100%; height: auto; }
 .memory-main .tribute-portrait img { max-height: 42mm; }
}

/* Modest LHS portraits accompanying the author and each contributor's opening. */
.memory-voice-opening { display: flow-root; }
.memory-main .memory-author-portrait { float: left; width: 140px; height: 180px; object-fit: contain; object-position: top center; margin: 0 26px 18px 0; }
.tribute-narrative .memory-voice-opening + p { margin-top: 18px; }
@media (max-width: 600px) {
 .memory-main .memory-author-portrait { float: none; display: block; margin: 0 auto 24px; }
}
@media print {
 .memory-main .memory-author-portrait { float: left; width: 25mm; height: 32mm; max-height: none; margin: 0 6mm 4mm 0; object-fit: contain; }
 .memory-voice-opening { break-inside: avoid; }
}
