/* Frozen lounge photo contract and QR836 layout corrections, 2026-10-16. */
:root{--article-header-height:78px;--article-toc-height:58px}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .subnav{position:sticky!important;top:var(--article-header-height)!important;z-index:850!important;background:#fff!important;width:100%;max-width:100%;overflow:visible}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .subnav-in{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:12px;padding:12px 0!important;max-width:calc(100vw - 32px);scrollbar-width:thin}
article[data-qr836-canonical] .subnav-in a{flex:0 0 auto;white-space:nowrap;padding:4px 6px}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] [id]{scroll-margin-top:calc(var(--article-header-height) + var(--article-toc-height) + 16px)!important}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row{display:grid!important;gap:14px!important;align-items:start;max-width:100%;min-width:0;overflow:visible}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row--1{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;justify-content:start}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row--2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row--3{grid-template-columns:repeat(3,minmax(0,1fr))!important}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-card{min-width:0;width:100%;background:#fff}
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-card img{object-fit:contain!important;object-position:center!important;background:#f4f0e8}
/* Lounge: keep every image fully visible; never conceal the next card off-screen. */
.photo-grid,.alsafwa-reference-strip{min-width:0;max-width:100%}
.photo-grid .photo,.alsafwa-reference-strip .photo-card{min-width:0;max-width:100%}
.photo-grid .photo img,#other-visit-facility-photos .photo-card img{object-fit:contain!important;object-position:center!important;background:#f4f0e8;max-width:100%}
#other-visit-facility-photos .alsafwa-reference-strip{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;gap:14px!important}
@media(max-width:700px){:root{--article-header-height:68px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.photo-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))!important}.photo-grid .photo figcaption,#other-visit-facility-photos .photo-card figcaption{padding:8px;font-size:11px;overflow-wrap:anywhere}}
@media(max-width:600px){[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row{gap:10px!important}.photo-grid{gap:10px}.photo-card figcaption{overflow-wrap:anywhere}}
/* Reference diagrams retain their existing legible standalone treatment. */
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference article[data-qr836-canonical] .photo-row--1:has(.flight-route-map){grid-template-columns:minmax(0,640px)!important;justify-content:center}

/* QR836: clip horizontal overflow without creating a sticky scroll container. */
[data-page-type="FLIGHT"] .ms-page-content.ms-source-reference:has(article[data-qr836-canonical]){overflow-x:clip;overflow-y:visible}
