/* Keep full photographs and overlay captions inside each image. */
main section.part .mini-gallery { height:auto; }
main section.part .mini-gallery .items { height:auto; align-items:flex-start; }
main section.part .mini-gallery .items .item { background:#051d3b; display:grid; position:relative; }
main section.part .mini-gallery .items .item .picture { width:100%; height:auto; overflow:hidden; grid-area:1 / 1; align-self:stretch; }
main section.part .mini-gallery .items .item .picture::before { content:""; background:linear-gradient(180deg,rgba(5,29,59,0) 30%,rgba(5,29,59,.4) 62%,rgba(5,29,59,.95) 100%); }
main section.part .mini-gallery .items .item .picture img { display:block; width:100%; height:auto; max-height:none; object-fit:contain; }
main section.part .mini-gallery .items .item .title { position:relative; grid-area:1 / 1; align-self:end; width:auto; top:auto; bottom:auto; left:auto; margin:0; padding:48px 24px 24px; box-sizing:border-box; color:#fff; font-size:18px; line-height:1.45; letter-spacing:0; z-index:2; }
main section.part.part-2 .mapping-3d { display:grid; }
main section.part.part-2 .mapping-3d .picture { grid-area:1 / 1; }
main section.part.part-2 .mapping-3d .title { position:relative; grid-area:1 / 1; align-self:end; transform:none; left:auto; bottom:auto; width:auto; max-width:none; margin:0; padding:40px 24px 20px; background:linear-gradient(transparent,rgba(5,29,59,.9)); font-size:18px; line-height:1.45; text-align:center; }
/* Reserve separate, non-overlapping places for purchase and contact. */
main section.top .description-and-tickets .tickets .order-button.fixed { right:108px; bottom:24px; height:52px; }
#contact-wa { right:24px; bottom:24px; width:52px; height:52px; border-radius:50%; }
#contact-wa a { width:52px; height:52px; }
body { padding-bottom:88px; }
@media (min-width:1260px) {
 main section.part .mini-gallery .items { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
 main section.part .mini-gallery .items .item { width:auto; min-width:0; }
 main section.part .mini-gallery .items .item:nth-child(2) { position:relative; top:auto; left:auto; transform:none; margin-top:60px; }
}
/* Cover the fractional-pixel seam at the end of the white SVG wave. */
main section.part.part-2::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:9px; background:#fff; pointer-events:none; }
@media (min-width:768px) and (max-width:1259px) {
 main section.part .mini-gallery { height:auto; }
 main section.part .mini-gallery .items .item { height:auto; }
}
@media (max-width:1259px) {
 body.has-fixed-actions::after { content:""; position:fixed; z-index:9998; left:0; right:0; bottom:0; height:calc(76px + env(safe-area-inset-bottom,0px)); background:#fff; box-shadow:0 -3px 14px rgba(5,29,59,.10); pointer-events:none; }
 main section.top .description-and-tickets .tickets .order-button.fixed { left:24px; right:auto; transform:none; width:min(340px,calc(100% - 120px)); bottom:calc(12px + env(safe-area-inset-bottom,0px)); font-size:13px; letter-spacing:1.5px; }
 #contact-wa { left:auto; right:16px; transform:none; bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
 body { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
}
@media (max-width:767px) {
 .to-page-content,section>.content { min-width:0; width:calc(100% - 40px); max-width:335px; }
 .to-page-content.allows-overflow .overflow-content,section>.content.allows-overflow .overflow-content { margin-left:calc((min(335px,calc(100vw - 40px)) - 100vw)/2); }
 main section.part .mini-gallery { width:100%; margin-left:0; }
 main section.part .mini-gallery .items > * { width:100%; margin-top:28px !important; }
 main section.part .mini-gallery .items > *:first-child { margin-top:0 !important; }
 main section.part .mini-gallery .items .item .title { font-size:17px; padding:42px 18px 18px; }
 main section.part.part-2 .mapping-3d .title { font-size:15px; line-height:1.3; padding:30px 14px 12px; text-align:left; margin-top:0; }
 main section.part.part-2 .mini-gallery { margin-top:32px; }
 main section.top .description-and-tickets { width:100%; }
 main section.slider-section .title { max-width:100%; }
 .popup { max-width:calc(100vw - 32px); box-sizing:border-box; }
}
@media (max-width:767px) {
 main section.top .description-and-tickets .description .title { width:100%; max-width:335px; }
 main section.tickets-and-contacts .contacts .map { width:100vw; }
}
@media (max-width:359px) {
 main section.tickets-and-contacts .tickets .left .prices { gap:12px; }
 main section.tickets-and-contacts .tickets .left .prices .separator { display:none; }
 main section.tickets-and-contacts .tickets .left .prices .column { min-width:0; width:calc((100% - 12px)/2); }
 main section.tickets-and-contacts .tickets .left .prices .column .main .price { font-size:42px; }
 main section.tickets-and-contacts .tickets .left .prices .column .main .name { font-size:22px; }
}
body { padding-bottom:0; }
.body-container { padding-bottom:88px; }
@media (max-width:1259px) {
 .body-container { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
}
@media (max-width:767px) {
 header .to-page-content { width:calc(100% - 40px) !important; }
}
/* Gift and children SVGs are 91px / 88px wide: preserve their full viewBox. */
main section.top .advantages .item .icon { width:96px; max-width:100%; }
main section.top .advantages .item .icon img { display:block; max-width:100%; max-height:100%; object-fit:contain; }
/* Compact the mobile transition after the last programme card. */
@media (max-width:767px) {
 main section.part.part-2 { padding-bottom:120px; }
 main section.part.part-3 { padding-top:40px; }
}
/* Programme cards share a square frame on desktop, tablet and mobile. */
main section.part .mini-gallery .items .item { aspect-ratio:1 / 1; min-width:0; }
main section.part .mini-gallery .items .item .picture { position:relative; height:100%; min-height:0; }
main section.part .mini-gallery .items .item .picture img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 35%; }
main section.part .mini-gallery .items .item .picture img[src$="quick-change.png"] { object-position:50% 0%; }
main section.part .mini-gallery .items .item .picture img[src$="with-musical-artists.jpg"] { object-position:50% 35%; }
/* The palace-to-FAQ wave needs the same fractional-pixel seam protection. */
main section.about-palace::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:9px; background:#fff; pointer-events:none; }
