/* Keep the tour and custom controls at the device's actual viewport scale. */
html, body { width: 100%; height: 100%; height: 100dvh; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.main-menu { overscroll-behavior: contain; }
.main-menu > * { flex-shrink: 0; }
dialog { overscroll-behavior: contain; overflow-x: hidden; }
.gallery-header { position: sticky; top: -1px; z-index: 2; background: #061c4b; padding: 4px 0 10px; }
.gallery-header > button { flex-shrink: 0; }
.store-content > *, .store-description { min-width: 0; }
.store-description { overflow-wrap: break-word; }
@media (max-width: 768px) {
    #preloadContainer.welcome-screen { flex-direction: column; align-items: stretch; }
    .welcome-content { width: 100%; max-width: 560px; margin: auto 0; padding: max(24px, env(safe-area-inset-top)) 24px 24px; flex-shrink: 0; }
    .welcome-logo { width: clamp(130px, 36vw, 190px); margin: 0 0 12px; }
    #welcomeTitle { font-size: clamp(32px, 8.5vw, 52px); letter-spacing: -1.3px; }
    .welcome-description { font-size: 15px; line-height: 1.7; }
    .welcome-description br { display: none; }
    .welcome-eyebrow { font-size: 10px; letter-spacing: 2px; }
    #exploreStore { width: 100%; max-width: 340px; }
    .welcome-footer { position: static; margin: 0 24px; padding: 16px 0 max(20px, env(safe-area-inset-bottom)); flex-wrap: wrap; font-size: 9px; gap: 8px; flex-shrink: 0; }
    .main-menu { width: min(260px, calc(100vw - 84px)); max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))); padding: 16px 12px 12px; }
    .main-menu .brand-logo { width: min(150px, 100%); }
    .main-menu .menu-link { min-height: 48px; font-size: 15px; }
    #floatingLogo { width: clamp(100px, 30vw, 140px); }
    #floatingWhatsApp { max-width: calc(100vw - 28px); }
    #photoGallery, #locationModal, #storeModal {
        width: calc(100% - 20px); max-width: 100%; padding: 12px;
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
        border-radius: 16px;
    }
    .store-content { grid-template-columns: 1fr; gap: 18px; }
    .store-content > img { max-height: 35dvh; }
    .store-description h3 { font-size: 24px; margin: 10px 0 16px; }
    .store-description p { font-size: 15px; }
    .store-contact { width: 100%; margin-bottom: 4px; }
    .gallery-stage { position: relative; display: block; }
    #galleryPhoto { height: clamp(180px, 48dvh, 480px); }
    #previousPhoto, #nextPhoto { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; background: rgba(6,28,75,.85); }
    #previousPhoto { left: 6px; }
    #nextPhoto { right: 6px; }
    .gallery-thumbnails { overscroll-behavior-x: contain; }
    #locationModal iframe { height: max(220px, 60dvh); }
}
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-content { padding: 16px 24px; max-width: 600px; }
    .welcome-logo { width: 100px; margin-bottom: 0; }
    .welcome-eyebrow { margin: 2px 0 10px; }
    #welcomeTitle { font-size: 30px; margin-bottom: 12px; }
    .welcome-description { margin-bottom: 14px; }
    .welcome-footer { padding-top: 0; }
    .main-menu .brand-logo { width: 90px; }
    .main-menu h2 { padding-bottom: 8px; }
    #floatingLogo { width: 100px; }
    #galleryPhoto { height: 52dvh; }
    .store-content { grid-template-columns: 1fr 1fr; }
    .store-content > img { max-height: 65dvh; }
}
@media (hover: none) {
    .main-menu .menu-link:hover, #menuToggle:hover, #exploreStore:hover { transform: none; }
}
