/* Documentary photographs retain their source frame. Their containers, rather
   than the people in the photograph, adapt to the available reading width. */
@media screen {
 .photo-open[data-photo]>img {
  display:block;width:100%;height:auto!important;max-height:none;
  aspect-ratio:var(--photo-ratio)!important;object-fit:contain;
 }
 .photo-open[data-photo]:hover>img {scale:1}
 .home-practice-photo {max-width:380px}
 .school-spread .school-image {max-inline-size:400px;align-self:start}
 .family-cover-spread>figure {width:100%;max-inline-size:440px}
 .family-cover-spread>figure>img {width:100%;height:auto;object-fit:contain}
 .chapter-story .family-at-home:not(.family-interests)>figure {max-inline-size:360px;align-self:start;justify-self:end}
 .family-photo-passage>figure {width:100%;max-inline-size:360px}
 .family-photo-passage .passage-celebration {margin-top:24px}
 .band-story-spread .band-garden {grid-row:auto;max-inline-size:600px}
 .band-story-spread .band-stage {max-inline-size:560px}
 .band-story-spread .band-rehearsal {grid-column:auto;width:100%;max-inline-size:560px;margin:0}
 .exchange-encounters--meetings {padding:0}
 .exchange-encounters--meetings .exchange-conversation {width:72%;margin:24px 0 0 auto}
 .life-cover-photo {max-inline-size:620px;object-fit:contain;object-position:50% 0}
 .life-portrait-inset {max-inline-size:360px}
 .life-period-photo {max-inline-size:420px}
 .life-period-photo.life-press-photo {max-inline-size:380px}
 .recognition-display .recognition-main {max-inline-size:260px;justify-self:center}
 .recognition-display .recognition-medal {max-inline-size:180px;justify-self:center}
 .exchange-cover-photo {width:100%;max-inline-size:380px;align-self:start;min-height:0}
 .exchange-cover-photo>img {width:100%;height:auto;object-fit:contain}
 .contact-portrait {height:auto;max-inline-size:340px;justify-self:center}
 .contact-portrait img {width:100%;height:auto;object-fit:contain}

 /* A stable, portrait-shaped album stage avoids both wide empty bands and
    page movement when changing between its four portrait photographs. */
 .family-album-view {grid-template-columns:minmax(144px,180px) minmax(0,360px);justify-content:center;align-items:start}
 .memory-stage {width:100%;max-inline-size:360px}
 .memory-stage>figure {position:relative}
 .memory-stage .photo-open {aspect-ratio:2/3}
 .memory-stage .photo-open[data-photo]>img {height:100%!important;aspect-ratio:auto!important;object-fit:contain}
 .memory-stage figcaption {
  position:absolute;left:12px;right:64px;bottom:12px;margin:0;padding:8px 10px;
  color:#edf4ec;background:#0f171be6;pointer-events:none;
 }
 .memory-tabs.album-tabs button img {object-fit:contain}

 /* Full frames form a compact photographic wall, without tall shared rows
    dictated by a neighbouring portrait or a narrow certificate. */
 .archive-story .photo-grid[data-view=gallery] {display:block;columns:3;column-gap:22px}
 .archive-story .photo-grid[data-view=gallery]>figure {
  display:inline-block;vertical-align:top;width:100%;break-inside:avoid;
  margin:0 0 24px;
 }
 body .archive-story .photo-grid[data-view=gallery] .photo-open[data-photo]>img {
  padding:0;aspect-ratio:var(--photo-ratio)!important;object-fit:contain!important;
 }
 .archive-story .photo-grid[data-view=sheet] .photo-open[data-photo]>img {
  aspect-ratio:1!important;object-fit:contain;
 }
 .collection-wall .wall-journey {margin-top:24px}
 .collection-wall .wall-family {margin-top:16px}
 .collection-wall .wall-document {margin-top:48px;max-inline-size:170px;justify-self:center}
 .collection-wall .wall-document .photo-open img {padding:12px}

 /* Bound the source frame itself: a portrait no longer fills a landscape
    track, and no fixed image height crops faces or adds a letterboxed row. */
 .lab-cover-photo,.band-cover>figure {width:100%;height:auto;align-self:center;justify-self:center}
 .lab-cover-photo {max-inline-size:460px}
 .band-cover>figure {max-inline-size:640px}
 .lab-cover-photo img,.band-cover>figure>img {position:static;width:100%;height:auto;object-fit:contain}
 .programme-screen .film-poster {height:auto;aspect-ratio:1280/993}
 .programme-screen {width:100%;max-inline-size:600px}
 .home-archive {align-items:center}
 .home-archive-photo .photo-open {height:auto;min-height:0}
 .family-music-bridge,.music-family-bridge,.life-world-bridge {align-items:center}
 .family-music-bridge>img,.music-family-bridge>img,.life-world-bridge>img {
  width:100%;height:auto;min-height:0;object-fit:contain;justify-self:center;
 }
 .family-music-bridge>img {max-inline-size:640px}
 .music-family-bridge>img,.life-world-bridge>img {max-inline-size:400px}
 .publications-cover .utility-photo-strip {height:auto;max-inline-size:600px;align-self:center;align-items:start}
 .publications-cover .utility-photo-strip>.photo-open,
 .publications-cover .utility-photo-strip>.photo-open:first-child,
 .publications-cover .utility-photo-strip>.photo-open:hover {flex:1;height:auto;min-height:0}

 /* These are navigation covers, with the complete photo above a dark reading
    area. Hover emphasis uses brightness, not an additional crop of the frame. */
 .resource-cards img,.chapter-turn img,.collection-themes img {
  object-fit:contain;object-position:50% 0;
 }
 .resource-cards>a:hover img,.chapter-turn>a:hover img,.collection-themes>a:hover img {scale:1;transform:none}
 .menu-worlds img {object-fit:contain;object-position:100% 50%}
}

/* Keep the photograph at the final panel measure during expansion, just like
   the text. Closed panels remain photographic strips; the open frame is whole. */
@media screen and (min-width:701px) and (min-height:501px), screen and (min-width:1001px) {
 .home-opening .world-panel .world-photo {
  position:absolute;inset:auto;top:0;left:50%;
  width:calc(100cqw * var(--world-active-share,.5));max-width:none;height:auto;
  object-fit:contain;object-position:50% 0;transform:translateX(-50%);
  mask-image:linear-gradient(#000 70%,transparent);
 }
}
@media screen and (max-width:1100px) {
 .band-cover {display:flex;flex-direction:column;min-height:0}
 .band-cover-type {padding-bottom:36px}
 .band-cover>figure {width:100%}
 .band-cover-note {margin-top:0;padding-top:32px}
 .home-archive,.family-music-bridge,.music-family-bridge,.life-world-bridge {
  display:flex;flex-direction:column;align-items:stretch;
 }
 .music-family-bridge {flex-direction:column-reverse}
 .family-music-bridge>img,.music-family-bridge>img,.life-world-bridge>img {align-self:center}
 .music-family-bridge>img,.life-world-bridge>img {max-inline-size:400px}
 .family-cover-spread>figure {max-inline-size:420px}
 .family-cover-spread {align-items:start}
 .collection-wall {grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
 .collection-wall .wall-journey {margin-top:16px}
 .collection-wall .wall-document {margin-top:16px;max-inline-size:170px;justify-self:center}
 .collection-wall .wall-family {margin-top:0}
}
@media screen and (min-width:701px) and (max-width:1100px) {
 .band-cover-type {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:end;column-gap:48px;padding:24px var(--gutter) 36px;
 }
 .band-cover-type>.chapter-return {grid-column:1/-1;justify-self:start}
 .band-cover-type>.eyebrow {grid-column:1/-1;margin:32px 0 24px}
 .band-cover-note {display:block;padding-top:0}
 .band-cover-cta {margin-top:24px}
}
@media screen and (max-width:700px) {
 .archive-story .photo-grid[data-view=gallery] {columns:2;column-gap:12px}
 .archive-story .photo-grid[data-view=gallery]>figure {margin-bottom:20px}
 .collection-wall {gap:20px 12px}
 .family-album-view {align-items:flex-start}
 .memory-stage {align-self:center}
 .family-cover-spread>figure,.lab-cover-photo {max-inline-size:360px}
 .life-cover-photo {width:100%;max-inline-size:420px;height:auto;right:50%;top:52px;transform:translateX(50%)}
 .family-at-home>figure {margin-top:28px}
 .exchange-cover-photo {max-inline-size:360px;margin-bottom:24px}
 .home-opening .world-panel[data-world=science] .world-photo {object-position:24% 0!important}
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=family] .world-photo {object-position:50% 50%}
 html[data-worlds-ready=true] .home-opening .world-panel:not([data-world=biography]):after {
  background:linear-gradient(180deg,#0b101705 0,#0b101719 145px,#0b1017e8 235px,#0b1017 315px);
 }
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=music] .world-photo {
  object-fit:contain;object-position:50% 0;
 }
}
@media screen and (max-width:500px) {
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=family] .world-photo {object-position:50% 65%}
}
@media screen and (min-width:601px) and (max-width:1000px) and (max-height:500px) {
 html[data-worlds-ready=true] .home-opening .world-panel .world-photo {object-fit:contain;object-position:50% 0!important}
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=family] .world-photo {object-fit:cover;object-position:50% 50%!important}
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=science] .world-photo {object-fit:contain;object-position:50% 0!important}
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=world] .world-photo {object-fit:cover;object-position:50% 30%!important}
 html[data-worlds-ready=true] .home-opening .world-panel[data-world=music] .world-photo {object-fit:cover;object-position:50% 25%!important}
 html[data-worlds-ready=true] .home-opening .world-panel .world-content {padding-top:220px}
}
