/* Controls occupy dedicated rows independent of photo/caption dimensions. */
.stationary-scene-controls{background:#f5f3ee;padding:0 0 14px}.stationary-scene-controls .scene-buttons{margin:0;display:flex;flex-wrap:nowrap;gap:8px}.stationary-scene-controls .scene-buttons button{min-height:44px;min-width:44px}.stationary-scene-controls #surprise{min-width:132px}
#viewer{height:92dvh;max-height:92dvh;overflow:hidden;padding:20px 25px}
#viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}
#viewer .viewer-top{margin:0;min-height:44px}
#viewer .viewer-body{min-height:0;overflow:hidden}
#viewer .viewer-image{min-height:0;height:100%;overflow:hidden}
#viewer .viewer-image img{height:100%;width:100%;max-height:none;object-fit:contain}
#viewer .viewer-copy{min-height:0;overflow-y:auto;padding:8px 6px 8px 0}
#viewer .viewer-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:46px;border-top:1px solid #6f7e8f;padding-top:12px}
#viewer .viewer-buttons{margin:0;display:flex;gap:10px;flex-wrap:nowrap}
#viewer .viewer-buttons button{width:112px;min-height:44px}
#viewer #original{color:#a4d9ff;font-size:14px}
@media(max-width:950px){#viewer .viewer-body{grid-template-rows:minmax(0,1.7fr) minmax(0,1fr);gap:12px}#viewer .viewer-copy{padding:0 5px 0 0}}
@media(max-width:600px){#viewer{padding:14px}#viewer .viewer-footer{flex-wrap:wrap;gap:10px}#viewer .viewer-buttons{width:100%}#viewer #original{min-height:32px;display:flex;align-items:center}#viewer .viewer-copy h2{font-size:26px}}

footer .footer-logo,footer .footer-brand>.footer-logo{display:inline-block;background:white;padding:10px 14px;line-height:0;margin-bottom:18px}footer .footer-logo img{display:block;width:158px;height:auto;max-width:100%}

/* Fixed card geometry: caption scrolls; controls stay inside its bottom edge. */
.home .scene-layout{height:470px;grid-template-rows:minmax(0,1fr)}
.home .scene-picture{min-height:0}.home .scene-picture>a{height:100%;min-height:0}
.home .scene-copy{height:100%;min-height:0;align-self:stretch;display:grid;grid-template-rows:minmax(0,1fr) 108px;gap:18px;padding:28px 30px;overflow:hidden}
.home .scene-description{min-height:0;overflow-y:auto;padding:3px 6px 5px 3px;scrollbar-width:thin}
.home .scene-control-dock{height:108px;border-top:1px solid #89959e;padding-top:14px}
.home .scene-control-dock .scene-buttons{margin:0;display:flex;flex-wrap:nowrap;gap:8px}
.home .scene-control-dock .scene-buttons button{height:44px;min-width:44px;flex:0 0 auto;padding:8px 12px}
.home .scene-control-dock #surprise{min-width:132px}
.home .scene-control-dock .scene-status{margin:10px 0 0;font-size:12px;line-height:1.35;max-height:33px;overflow-y:auto}
@media(max-width:900px){.home .scene-copy{padding:22px 20px}.home .scene-layout{grid-template-columns:1.15fr 1fr}}
@media(max-width:600px){.home .scene-layout{height:650px;grid-template-columns:1fr;grid-template-rows:300px 350px}.home .scene-copy{padding:20px;gap:12px;grid-template-rows:minmax(0,1fr) 108px}.home .scene-description h2{font-size:30px}.home .scene-description p{font-size:16px}}

/* Interior gallery: stationary controls inside the description card. */
#viewer[open]{grid-template-rows:auto minmax(0,1fr)}
#viewer .viewer-copy{display:grid;grid-template-rows:minmax(0,1fr) 104px;gap:12px;height:100%;padding:18px;background:#172f4d;overflow:hidden}
#viewer .viewer-description{min-height:0;overflow-y:auto;padding:3px 5px 3px 3px;scrollbar-width:thin}
#viewer .viewer-control-dock{height:104px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;border-top:1px solid #6f7e8f;padding-top:12px}
#viewer .viewer-control-dock .viewer-buttons{margin:0;gap:8px;width:100%}
#viewer .viewer-control-dock .viewer-buttons button{width:104px;height:44px;min-height:44px;padding:8px;flex:0 0 auto}
#viewer .viewer-control-dock #original{display:flex;align-items:center;min-height:32px;margin:0}
@media(max-width:950px){#viewer .viewer-body{grid-template-rows:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:600px){#viewer .viewer-copy{padding:12px;gap:8px}}

@media(min-width:700px){#viewer .viewer-body{grid-template-columns:minmax(0,2fr) minmax(260px,1fr);grid-template-rows:minmax(0,1fr)}}
@media(max-width:699px){#viewer .viewer-body{grid-template-columns:1fr;grid-template-rows:minmax(70px,1fr) minmax(190px,1.3fr)}}
