
        /* Базовые стили страницы */
        body {
            background-color: #D0CCB8;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            margin: 0;
            padding: 15px;
            color: #111111;
        }
        a {
            color: #004B91;
            text-decoration: none;
        }
        .container {
            max-width: 1100px;
            margin: 0 auto;
            width: 100%;
        }
        h1 {
            font-size: 26px;
            margin: 10px 0 20px 0;
        }

        /* Сетка галереи на 5 изображений */
        .main-layout {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        nav {
            border-top: 1px solid #888;
            border-bottom: 1px solid #888;
            padding: 10px 0;
        }
        nav h3 {
            margin: 8px 0;
            font-size: 16px;
        }
        .content-area {
            flex: 1;
        }
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            gap: 15px;
            justify-items: center;
            align-items: center;
        }
        .gallery-item {
            text-align: center;
            width: 100%;
        }

        /* Стили ссылок-оберток галереи */
        .local-gallery-link {
            display: inline-block;
            max-width: 100%;
            cursor: pointer;
            overflow: hidden;
            border-radius: 4px;
            -webkit-tap-highlight-color: transparent;
        }
        .local-gallery-link img {
            display: block;
            max-width: 100%;
            height: auto;
            border: 0;
            box-shadow: 0 1px 4px rgba(0,0,0,0.15);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            will-change: transform;
        }
        .local-gallery-link:hover img {
            transform: scale(1.04);
            box-shadow: 0 4px 12px rgba(0,0,0,0.25);
        }

        footer {
            margin-top: 40px;
            padding-top: 15px;
            border-top: 1px solid #aaaaaa;
            font-size: 14px;
        }

        /* =======================================================
           ИНТЕРФЕЙС МОДАЛЬНОГО ОКНА (МАТОВОЕ СТЕКЛО + ТРИ ЗОНЫ)
           ======================================================= */
        .local-modal {
            display: none !important; /* Управляется строго через JavaScript */
            position: fixed;
            z-index: 999999;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            
            /* Эффект размытия */
            background-color: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            
            /* Строгое деление экрана на 3 независимых вертикальных блока */
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: stretch;
            user-select: none;
        }

        /* Боковые панели навигации (Занимают по 20% ширины экрана слева и справа) */
        .modal-btn {
            width: 20%;
            min-width: 60px;
            height: 100vh;
            color: rgba(255, 255, 255, 0.4);
            font-size: 48px;
            font-weight: bold;
            cursor: pointer;
            background: transparent;
            display: flex;
            align-items: center;
            border: none;
            outline: none;
            z-index: 1000005; /* Поверх любых других элементов */
            transition: color 0.2s, background-color 0.2s;
            -webkit-tap-highlight-color: transparent;
        }
        .modal-prev {
            justify-content: flex-start;
            padding-left: 20px;
        }
        .modal-next {
            justify-content: flex-end;
            padding-right: 20px;
        }

        @media (min-width: 901px) {
            .modal-prev:hover { color: #ffffff; background-color: rgba(255, 255, 255, 0.03); }
            .modal-next:hover { color: #ffffff; background-color: rgba(255, 255, 255, 0.03); }
        }

        /* Центральная вертикальная часть экрана (Занимает оставшиеся 60% ширины) */
        .modal-center-column {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            height: 100vh;
            position: relative;
            z-index: 1000001;
        }

        /* Верхняя и нижняя пустые зоны закрытия окна */
        .close-zone {
            width: 100%;
            flex: 1;
            cursor: zoom-out;
            display: flex;
            justify-content: center;
            transition: background-color 0.2s;
        }
        @media (min-width: 901px) {
            .close-zone:hover { background-color: rgba(0, 0, 0, 0.15); }
        }
        .close-zone-top { align-items: flex-end; }
        .close-zone-bottom { align-items: flex-start; flex-direction: column; }

        /* Обертка большой фотографии */
        .modal-wrapper {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            max-width: 100%;
            max-height: 70vh;
            z-index: 1000003;
        }
        .local-modal img {
            max-width: 100%;
            max-height: 70vh;
            object-fit: contain;
            border-radius: 4px;
            box-shadow: 0 4px 30px rgba(0,0,0,0.6);
            cursor: default; /* Клики по картинке ничего не делают */
        }
        .modal-caption {
            color: #ffffff;
            margin-top: 20px;
            font-size: 16px;
            text-align: center;
            width: 100%;
            cursor: default;
            text-shadow: 0 1px 4px rgba(0,0,0,0.8);
        }

        /* Адаптивность под десктоп и мобильные устройства */
        @media (min-width: 768px) {
            .main-layout { flex-direction: row; align-items: flex-start; }
            nav { width: 20%; border-top: none; border-bottom: none; padding: 0; }
            .content-area { width: 80%; }
            .gallery-grid { grid-template-columns: repeat(5, 1fr); }
        }
        @media (max-width: 900px) {
            .modal-btn { font-size: 32px; width: 12%; padding-left: 8px; padding-right: 8px; }
        }