        body {
            font-family: 'Inter', sans-serif;
            overflow-x: hidden;
            background-color: #89cff0;
        }

        /* Фон — отдельным фиксированным слоем на весь экран: не двигается при прокрутке,
           сразу во всю высоту. В отличие от background-attachment: fixed этот способ
           не вызывает тормозов на мобильных (слой обрабатывает композитор). */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            background-image: url('/img/common/background.png'), linear-gradient(180deg, #89cff0 0%, #e0f7fa 100%); /* фолбэк */
            background-image: image-set(url('/img/common/background.png.webp') type('image/webp'), url('/img/common/background.png') type('image/png')), linear-gradient(180deg, #89cff0 0%, #e0f7fa 100%);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        /* === БЛОКИРОВКА ПРОКРУТКИ ПРИ ОТКРЫТОМ МОДАЛЬНОМ ОКНЕ === */
        body.overflow-hidden {
            overflow: hidden !important;
            height: 100vh;
            touch-action: none;
        }

        section { scroll-margin-top: 100px; }

        @keyframes running-gradient {
            0% { background-position: 200% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes wave { 
            0%, 100% { transform: translateY(0); } 
            50% { transform: translateY(-6px); } 
        }

        /* === ЛОГОТИП === */
        .title-link {
            text-decoration: none; display: inline-block; cursor: pointer; outline: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; position: relative; z-index: 60;
            background: linear-gradient(90deg, #1f2937 0%, #3b82f6 25%, #1f2937 50%, #3b82f6 75%, #1f2937 100%);
            background-size: 200% auto; background-position: 0% 50%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; padding: 5px 10px 5px 0; transition: background-position 0.2s ease;
        }
        .title-link:hover { animation: running-gradient 2s linear infinite; }
        
        .title-char { display: inline-block; color: inherit; opacity: 1; }
        
        /* === АНИМАЦИЯ ВОЛНЫ И ГРАДИЕНТА ПРИ КЛИКЕ === */
        .title-link.click-anim {
            animation: running-gradient 2s linear infinite; /* Включаем градиент */
        }
        .title-link.click-anim .title-char {
            animation: wave 0.6s ease-in-out 1; /* Ускорили волну для динамичности */
        }
        /* Задержка для каждой из 15 букв, чтобы получилась волна */
        .title-link.click-anim .title-char:nth-child(1) { animation-delay: 0.00s; }
        .title-link.click-anim .title-char:nth-child(2) { animation-delay: 0.04s; }
        .title-link.click-anim .title-char:nth-child(3) { animation-delay: 0.08s; }
        .title-link.click-anim .title-char:nth-child(4) { animation-delay: 0.12s; }
        .title-link.click-anim .title-char:nth-child(5) { animation-delay: 0.16s; }
        .title-link.click-anim .title-char:nth-child(6) { animation-delay: 0.20s; }
        .title-link.click-anim .title-char:nth-child(7) { animation-delay: 0.24s; }
        .title-link.click-anim .title-char:nth-child(8) { animation-delay: 0.28s; }
        .title-link.click-anim .title-char:nth-child(9) { animation-delay: 0.32s; }
        .title-link.click-anim .title-char:nth-child(10) { animation-delay: 0.36s; }
        .title-link.click-anim .title-char:nth-child(11) { animation-delay: 0.40s; }
        .title-link.click-anim .title-char:nth-child(12) { animation-delay: 0.44s; }
        .title-link.click-anim .title-char:nth-child(13) { animation-delay: 0.48s; }
        .title-link.click-anim .title-char:nth-child(14) { animation-delay: 0.52s; }
        .title-link.click-anim .title-char:nth-child(15) { animation-delay: 0.56s; }

        /* === ТОЧКИ (ПАГИНАЦИЯ) === */
        .dots-container { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 25; padding: 4px 8px; border-radius: 12px; background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px); max-width: 70%; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
        .dots-container::-webkit-scrollbar { display: none; }
        .dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        .dot:hover { transform: scale(1.2); background-color: rgba(255, 255, 255, 0.8); }
        .dot.active { background-color: #ffffff; transform: scale(1.3); box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); }

        /* === КАЛЕНДАРЬ === */
        .calendar-container { position: relative; padding: 0 5px; outline: none; }
        .calendar-header { display: flex; justify-content: center; align-items: center; margin-bottom: 10px; font-weight: bold; color: #1f2937; }
        .calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; user-select: none; }
        .calendar-day { position: relative; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; height: 54px; padding-top: 4px; cursor: pointer; }
        .day-number { width: 28px; height: 28px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 0.95rem; font-weight: 800; position: relative; z-index: 2; transition: background-color 0.2s; }
        .day-price { font-size: 0.6rem; color: #6b7280; margin-top: 2px; font-weight: 600; z-index: 2; line-height: 1; }
        .calendar-day.header { cursor: default; }
        .calendar-day.header .day-number { font-weight: bold; color: #6b7280; width: auto; height: auto; border-radius: 0; }
        
        /* ЦВЕТА КАЛЕНДАРЯ */
        .calendar-day.booked .day-number { background-color: #fee2e2 !important; color: #991b1b; text-decoration: line-through; cursor: not-allowed; }
        .calendar-day.booked .day-price { display: none; }

        .calendar-day.booked-start .day-number {
             background: linear-gradient(90deg, #86efac 0%, #86efac calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #fee2e2 calc(50% + 1px), #fee2e2 100%) !important;
             color: #166534;
        }
        .calendar-day.booked-end .day-number {
             background: linear-gradient(90deg, #fee2e2 0%, #fee2e2 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #86efac calc(50% + 1px), #86efac 100%) !important;
             color: #166534; 
        }
        .calendar-day.booked-double .day-number {
             background: linear-gradient(90deg, #fee2e2 0%, #fee2e2 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #fee2e2 calc(50% + 1px), #fee2e2 100%) !important;
             color: #991b1b; text-decoration: line-through; cursor: not-allowed;
        }
        .calendar-day.booked-double .day-price { display: none; }

        .calendar-day.selectable .day-number { background-color: #86efac; color: #14532d; } 
        .calendar-day.selectable:hover .day-number { background-color: #4ade80; } 
        
        .calendar-day.past .day-number { color: #d1d5db; background-color: transparent; cursor: not-allowed; }
        .calendar-day.past .day-price { color: #e5e7eb; }
        .calendar-day.empty { visibility: hidden; }
        
        /* === СТИЛИ ДЛЯ ПРОШЕДШИХ БРОНЕЙ (Убираем зеленую часть) === */
        .calendar-day.booked-start.past .day-number {
             background: linear-gradient(90deg, transparent 0%, transparent calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #fee2e2 calc(50% + 1px), #fee2e2 100%) !important;
             color: #991b1b;
        }
        .calendar-day.booked-end.past .day-number {
             background: linear-gradient(90deg, #fee2e2 0%, #fee2e2 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), transparent calc(50% + 1px), transparent 100%) !important;
             color: #991b1b;
        }
        .calendar-day.booked.past .day-number,
        .calendar-day.booked-double.past .day-number {
             color: #991b1b;
        }
        
        .calendar-day.in-range .day-number { background-color: #3b82f6; color: white; } 

        .calendar-day.selected-start .day-number { 
            background: linear-gradient(90deg, #86efac 0%, #86efac calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #3b82f6 calc(50% + 1px), #3b82f6 100%) !important;
            color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }
        .calendar-day.selected-end .day-number { 
            background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #86efac calc(50% + 1px), #86efac 100%) !important;
            color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }

        .calendar-day.booked-end.selected-start .day-number {
            background: linear-gradient(90deg, #fee2e2 0%, #fee2e2 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #3b82f6 calc(50% + 1px), #3b82f6 100%) !important;
            color: white;
        }
        .calendar-day.booked-start.selected-end .day-number {
            background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), #fee2e2 calc(50% + 1px), #fee2e2 100%) !important;
            color: white;
        }

        .calendar-day.selected-start .day-price, 
        .calendar-day.selected-end .day-price,
        .calendar-day.in-range .day-price { color: #1e3a8a; }
        .calendar-day.in-range .day-price { color: white; }
        
        .scroll-smooth { scroll-behavior: smooth; }
        
        .carousel-container { position: relative; }
        .carousel { display: flex; transition: transform 0.5s ease-in-out; }
        .carousel-wrapper { overflow: visible; }
        .carousel-item { flex: 0 0 100%; cursor: pointer; position: relative; }
        @media (min-width: 640px) { .carousel-item { flex: 0 0 50%; } }
        @media (min-width: 1024px) { .carousel-item { flex: 0 0 33.333333%; } }
        @media (min-width: 1280px) { .carousel-item { flex: 0 0 25%; } }
        @media (min-width: 1536px) { .carousel-item { flex: 0 0 20%; } }
        /* Телефон в горизонтальной ориентации: ширина экрана большая, но высота маленькая.
           Показываем одну карточку на всю ширину, иначе фото остаются такими же мелкими, как в вертикальной. */
        @media (orientation: landscape) and (max-height: 600px) {
            .carousel-item { flex: 0 0 100% !important; }
        }
        
        /* === СТРЕЛКИ И НАВИГАЦИЯ === */
        .inner-nav, .details-photo-nav {
            position: absolute; top: 50%; transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px);
            color: white; border: none; border-radius: 50%; width: 36px; height: 36px;
            z-index: 30; display: flex; align-items: center; justify-content: center; 
            cursor: pointer; transition: all 0.2s ease; outline: none !important; opacity: 1 !important;
        }
        @media (min-width: 768px) {
            .inner-nav { opacity: 0 !important; background-color: rgba(0, 0, 0, 0.4); width: 32px; height: 32px; }
            .group:hover .inner-nav { opacity: 1 !important; }
        }
        .inner-nav:hover, .details-photo-nav:hover { background-color: rgba(0, 0, 0, 0.8); transform: translateY(-50%) scale(1.1); }
        .inner-nav.prev, .details-photo-nav.prev { left: 8px; }
        .inner-nav.next, .details-photo-nav.next { right: 8px; }
        .inner-nav svg, .details-photo-nav svg { pointer-events: none; width: 20px; height: 20px; }

        #sights-prev, #sights-next {
            position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background-color: white; color: #374151; box-shadow: 0 4px 10px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50; transition: all 0.3s ease; outline: none !important;
        }
        #sights-prev:hover, #sights-next:hover { background-color: #f3f4f6; transform: translateY(-50%) scale(1.1); }
        #sights-prev { left: -15px; } #sights-next { right: -15px; }
        #sights-prev.disabled, #sights-next.disabled { opacity: 0; pointer-events: none; }
        @media (max-width: 768px) { #sights-prev, #sights-next { display: none; } }

        /* Кнопки Навигации в шапке (apt prev/next) */
        #apartment-details-prev, #apartment-details-next, #details-prev, #details-next {
            position: absolute; z-index: 50; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.2s ease; background-color: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); outline: none !important;
        }
        #apartment-details-prev:hover, #apartment-details-next:hover, #details-prev:hover, #details-next:hover { background-color: #e5e7eb; color: #111827; transform: scale(1.1); }
        #apartment-details-prev svg, #apartment-details-next svg, #details-prev svg, #details-next svg { width: 24px; height: 24px; stroke-width: 2; }
        @media (min-width: 768px) { #apartment-details-prev, #details-prev { left: 20px; top: 30px; } #apartment-details-next, #details-next { right: 20px; top: 30px; } }
        @media (max-width: 767px) {
            #apartment-details-prev, #apartment-details-next, #details-prev, #details-next { top: -60px; background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(4px); transition: background-color 0.2s; }
            #apartment-details-prev, #details-prev { left: 0; right: auto; } #apartment-details-next, #details-next { right: 0; left: auto; }
            #back-to-main-from-apt, #back-to-main-from-sight { margin-bottom: 5.5rem; }
        }
        
        /* === 1. КАЛЕНДАРЬ: СКРЫТИЕ СТРЕЛОК (visibility: hidden) === */
        .calendar-arrow-styled { position: absolute; top: 50%; transform: translateY(-50%); background-color: #ffffff; color: #374151; border: 1px solid #e5e7eb; border-radius: 50%; width: 36px; height: 36px; z-index: 20; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); outline: none !important; visibility: visible; }
        .calendar-arrow-styled:hover { transform: translateY(-50%) scale(1.05); }
        .calendar-arrow-styled svg { width: 20px; height: 20px; stroke-width: 2; }
        #apartment-details-calendar-prev { left: -28px; } #apartment-details-calendar-next { right: -28px; }

        .page { transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; }
        .page.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; position: absolute; width: 100%; top: 0; left: 0; height: 0; overflow: hidden; }
        
        .inner-carousel-container, .details-photo-carousel { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; outline: none; }
        @media (max-height: 500px) and (orientation: landscape) { .inner-carousel-container, .details-photo-carousel { height: 80vh !important; aspect-ratio: auto !important; } .inner-carousel-slide img, .details-photo-slide img { object-fit: contain !important; background-color: #f3f4f6; } }
        .inner-carousel-container { border-radius: 0.75rem 0.75rem 0 0; }
        .details-photo-carousel { border-radius: 0.75rem; }

        .hero-section-container { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; max-height: 45vh; }
        .inner-carousel, .details-photo-slides { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; height: 100%; transition: transform 0.3s ease-in-out; touch-action: pan-y; }
        .inner-carousel-slide, .details-photo-slide { flex-shrink: 0; width: 100%; height: 100%; }
        .inner-carousel-slide img, .details-photo-slide img { width: 100%; height: 100%; object-fit: cover; }
        /* ===== СКЕЛЕТОНЫ: мягкое мерцание вместо пустого места, пока грузится фото ===== */
        .inner-carousel-slide, .details-photo-slide, .fullscreen-slide {
            background-color: #e5e7eb;
            background-image: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,.65) 50%, rgba(255,255,255,0) 80%);
            background-size: 220% 100%;
            background-repeat: no-repeat;
            animation: skeleton-shimmer 1.3s linear infinite;
        }
        /* В полноэкранном просмотре фон тёмный — мерцание не нужно, только плавное появление фото */
        .fullscreen-slide { background-color: transparent; background-image: none; animation: none; }
        @keyframes skeleton-shimmer {
            0%   { background-position: 120% 0; }
            100% { background-position: -120% 0; }
        }
        /* Фото проявляется плавно, скелетон гаснет */
        .inner-carousel-slide img, .details-photo-slide img, .fullscreen-slide img {
            opacity: 0;
            transition: opacity .45s ease;
        }
        .inner-carousel-slide img.img-loaded, .details-photo-slide img.img-loaded, .fullscreen-slide img.img-loaded { opacity: 1; }
        .inner-carousel-slide.img-done, .details-photo-slide.img-done, .fullscreen-slide.img-done {
            animation: none;
            background-image: none;
            background-color: transparent;
        }

        /* ===== ТЕКСТ: без выключки по ширине, с переносами (чтобы не было полупустых строк) ===== */
        .text-readable {
            text-align: left;
            hyphens: auto;
            -webkit-hyphens: auto;
            overflow-wrap: break-word;
            text-wrap: pretty;
        }

        /* ===== ИКОНКИ В ПРАВИЛАХ ПРОЖИВАНИЯ ===== */
        .rule-icon {
            flex-shrink: 0;
            width: 42px; height: 42px; margin-right: 14px;
            display: inline-flex; align-items: center; justify-content: center;
            border-radius: 9999px;
            background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
            color: #1d4ed8;
            box-shadow: 0 2px 8px rgba(37, 99, 235, .18);
            transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease;
        }
        .rule-icon svg { width: 22px; height: 22px; }
        @media (hover: hover) {
            .rules-list li:hover .rule-icon { transform: scale(1.08); box-shadow: 0 4px 14px rgba(37, 99, 235, .28); }
        }

        /* ===== МИКРОАНИМАЦИИ ===== */
        /* Мягкое появление секций при прокрутке (класс .reveal вешает JS, поэтому без JS всё видно) */
        .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
        .reveal.revealed { opacity: 1; transform: none; }
        /* Лёгкий подъём карточки при наведении (только там, где есть мышь) */
        @media (hover: hover) {
            .apartment-photo-card { transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease; }
            .apartment-photo-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0, 0, 0, .16); }
        }
        /* Уважаем системную настройку «меньше движения» */
        @media (prefers-reduced-motion: reduce) {
            .reveal, .reveal.revealed { opacity: 1; transform: none; transition: none; }
            .inner-carousel-slide, .details-photo-slide, .fullscreen-slide { animation: none; }
            .rule-icon { transition: none; }
        }

        /* Шапка — сплошной цвет (а не полупрозрачный поверх фона), чтобы системная
           панель телефона (theme-color) совпадала с ней ровно, без видимого шва.
           ВАЖНО: цвет должен совпадать с <meta name="theme-color"> в index.html. */
        header {
            background-color: #eaf5fb !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }

        /* Когда открыто бургер-меню, шапка переходит в меню — нижние углы не скругляем */
        header:has(#mobile-menu:not(.hidden)) {
            border-bottom-left-radius: 0 !important;
            border-bottom-right-radius: 0 !important;
        }

        /* Закрываем субпиксельный зазор между шапкой и открытым мобильным меню.
           Шапка выше по z-index, поэтому небольшое перекрытие не видно. */
        #mobile-menu { margin-top: -2px; }

        /* <picture>-обёртка должна вести себя как сам <img>, иначе ломается раскладка/центрирование */
        .inner-carousel-slide picture, .details-photo-slide picture { display: block; width: 100%; height: 100%; }
        .fullscreen-slide picture { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
        
        #apartment-details-calendar-prev.hidden, #apartment-details-calendar-next.hidden { display: none; }
        #hero-carousel .hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s ease-in-out; }
        #hero-carousel .hero-slide.active { opacity: 1; }
        
        #sights-carousel { scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; outline: none; }
        #sights-carousel::-webkit-scrollbar { display: none; }

        .container { width: 100%; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
        @media (min-width: 640px) { .container { max-width: 640px; padding-left: 2rem; padding-right: 2rem; } }
        @media (min-width: 768px) { .container { max-width: 768px; } }
        @media (min-width: 1024px) { .container { max-width: 1024px; } }
        @media (min-width: 1280px) { .container { max-width: 1280px; } }
        @media (min-width: 1536px) { .container { max-width: 1536px; } }

        [class*="ymaps-2"][class*="-balloon__layout"], [class*="ymaps-2"][class*="-balloon__content"] { border-radius: 12px !important; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important; }
        [class*="ymaps-2"][class*="-balloon__content"] { padding: 0 !important; margin: 0 !important; background-color: transparent !important; border: none !important; }
        [class*="ymaps-2"][class*="-balloon__shadow"] { box-shadow: none !important; }
        [class*="ymaps-2"][class*="-balloon__close-button"] { opacity: 0.6; right: 8px; top: 8px; transform: scale(1.1); }

        /* === FULLSCREEN GALLERY STYLES === */
        #fullscreen-gallery {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            z-index: 9999;
            display: none; opacity: 0; transition: opacity 0.3s ease;
            overflow: hidden;
        }
        #fullscreen-gallery.active { display: block; opacity: 1; pointer-events: auto; }
        
        #fullscreen-track {
            display: flex; height: 100%; width: 100%;
            transition: transform 0.3s ease-in-out; 
        }
        
        .fullscreen-slide {
            flex: 0 0 100%; 
            width: 100%;
            height: 100%;
            display: flex; align-items: center; justify-content: center;
            overflow: hidden;
        }

        /* Небольшой фиксированный отступ вместо процентов: края не сливаются,
           но фото занимает максимум площади экрана (проценты «съедали» много места). */
        .fullscreen-slide { padding: 8px; box-sizing: border-box; }

        /* Зум фото: свои жесты, поэтому браузерные отключаем (на всех вложенных тоже,
           иначе первый щипок может «съесть» браузер) */
        #fullscreen-gallery, #fullscreen-track, .fullscreen-slide, .fullscreen-slide picture, .fullscreen-slide img {
            touch-action: none;
        }
        .fullscreen-slide img { transform-origin: center center; will-change: transform; }
        #fullscreen-gallery.zoomed .fullscreen-slide img { cursor: grab; }
        /* Пока фото увеличено, стрелки листания не мешают */
        #fullscreen-gallery.zoomed #fullscreen-prev,
        #fullscreen-gallery.zoomed #fullscreen-next { opacity: 0; pointer-events: none; }

        /* Подсказка про зум (показывается один раз при открытии) */
        #fullscreen-hint {
            position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);
            z-index: 10002; pointer-events: none;
            background: rgba(0, 0, 0, .62); color: #fff;
            padding: 8px 16px; border-radius: 9999px;
            font-size: .85rem; white-space: nowrap;
            backdrop-filter: blur(2px);
            opacity: 0; transition: opacity .4s ease;
        }
        #fullscreen-hint.show { opacity: 1; }
        .fullscreen-slide img {
            width: auto !important;
            height: auto !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            display: block;
            border-radius: 0.75rem; /* Added this line */
        }

        #fullscreen-close {
            position: absolute; top: 20px; right: 20px;
            color: white; font-size: 2rem; cursor: pointer; z-index: 10001;
            background: rgba(0,0,0,0.6); border-radius: 50%; width: 44px; height: 44px;
            display: flex; align-items: center; justify-content: center;
            line-height: 1; padding-bottom: 4px; 
            backdrop-filter: blur(2px); transition: transform 0.2s ease;
        }
        #fullscreen-close:hover { transform: scale(1.1); background-color: rgba(0,0,0,0.8); }
        
        #fullscreen-prev, #fullscreen-next {
            position: absolute; top: 50%; transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px);
            color: white; border: none; border-radius: 50%; width: 44px; height: 44px;
            z-index: 10001;
            display: flex; align-items: center; justify-content: center; 
            cursor: pointer; transition: all 0.2s ease; outline: none !important;
        }
        #fullscreen-prev:hover, #fullscreen-next:hover { background-color: rgba(0, 0, 0, 0.8); transform: translateY(-50%) scale(1.1); }
        #fullscreen-prev { left: 20px; } #fullscreen-next { right: 20px; }
        #fullscreen-prev svg, #fullscreen-next svg { width: 24px; height: 24px; stroke-width: 2; pointer-events: none; }

        #fullscreen-dots {
            position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
            display: flex; gap: 8px; z-index: 10002;
            padding: 6px 12px; border-radius: 16px;
            background-color: rgba(0,0,0,0.5);
        }

        /* === MODERN SCROLLBAR FOR MODALS === */
        .custom-scrollbar { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
        .custom-scrollbar::-webkit-scrollbar { width: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }
        
        #landscape-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            z-index: 10000;
            align-items: center;
            justify-content: center;
            background-image: url('/img/common/background.png'), linear-gradient(180deg, #89cff0 0%, #e0f7fa 100%); /* фолбэк */
            background-image: image-set(url('/img/common/background.png.webp') type('image/webp'), url('/img/common/background.png') type('image/png')), linear-gradient(180deg, #89cff0 0%, #e0f7fa 100%);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        .rotate-icon {
            animation: rotatePhone 2s infinite ease-in-out;
        }
        
        @keyframes rotatePhone {
            0% { transform: rotate(0deg); }
            25% { transform: rotate(-90deg); }
            50% { transform: rotate(-90deg); }
            75% { transform: rotate(0deg); }
            100% { transform: rotate(0deg); }
        }
        
        @media screen and (orientation: landscape) and (max-height: 500px) {
            /* Добавили :not(.keyboard-open), чтобы заглушка не всплывала при вводе текста */
            body:not(.gallery-open):not(.keyboard-open) #landscape-overlay {
                display: flex !important;
            }
            body:not(.gallery-open):not(.keyboard-open) {
                overflow: hidden !important;
            }
        }
        
        #sights-prev svg, #sights-next svg {
            width: 25px;
            height: 25px;
            stroke-width: 2.5;
        }
        
        /* === ЖЕСТКОЕ ИСПРАВЛЕНИЕ ЗАЛИПАНИЯ СТРЕЛОК (ДЛЯ ВСЕХ ТЕЛЕФОНОВ) === */
        @media (hover: none), (pointer: coarse) {
            /* 1. Глушим залипший hover с помощью !important */
            .inner-nav:hover, .details-photo-nav:hover, #fullscreen-prev:hover, #fullscreen-next:hover { 
                background-color: rgba(0, 0, 0, 0.6) !important; 
                transform: translateY(-50%) !important; 
            }
            #sights-prev:hover, #sights-next:hover { 
                background-color: white !important; 
                transform: translateY(-50%) !important; 
            }
            #apartment-details-prev:hover, #apartment-details-next:hover, #details-prev:hover, #details-next:hover { 
                background-color: rgba(255, 255, 255, 0.9) !important; 
                color: #374151 !important; 
                transform: none !important; 
            }
            .calendar-arrow-styled:hover { 
                background-color: #ffffff !important; 
                transform: translateY(-50%) !important; 
            }

            /* 2. Делаем микро-отклик МГНОВЕННЫМ (убираем transition для сжатия) */
            .inner-nav:active, .details-photo-nav:active, #fullscreen-prev:active, #fullscreen-next:active {
                background-color: rgba(0, 0, 0, 0.8) !important;
                transform: translateY(-50%) scale(0.85) !important;
                transition: none !important; /* Молниеносное сжатие в 0 секунд */
            }
            #sights-prev:active, #sights-next:active, .calendar-arrow-styled:active {
                background-color: #f3f4f6 !important;
                transform: translateY(-50%) scale(0.85) !important;
                transition: none !important;
            }
            #apartment-details-prev:active, #apartment-details-next:active, #details-prev:active, #details-next:active {
                background-color: #e5e7eb !important;
                transform: scale(0.85) !important;
                transition: none !important;
            }
            
            /* 3. Отклик для логотипа и бургер-меню */
            #home-link:active, #mobile-menu-button:active {
                transform: scale(0.95) !important;
                transition: none !important;
            }
        }
