/*
1. Стили переработаны под поведение для двух вариантов - desktop и mobile. Без адаптивного интерфейса.
2. Вид инфо-хотспотов изменен:
2.1. Якорь хотспота упрощен до круглого элемента с пиктограммой (или символом 'i').
2.2. При нажатии на него - открывается сразу развернутое окно с изображением, текстом, кнопкой аудио.
2.2.1. Возможно, это окно должно по-разному отображаться для десктопа и для мобильного (размеры)?
2.2.2. Не вполне понятно, нужен ли вообще в развернутом окне вызов лайтбокса?
*/

/* ===== МУЗЕЙ ИСТОРИИ ГИМНАЗИИ ИСКУССТВ — ВИРТУАЛЬНЫЙ ТУР ===== */
/* Стиль вдохновлён презентацией музея: терракотово-коричневая палитра,     */
/* коми-пас орнаменты, птица-Сирин мотивы, музейная строгость               */
/* Все иконки — чистый CSS, без картинок                                    */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Cormorant+Garamond:wght@400;500;600&family=Forum&display=swap');

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -ms-content-zooming: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

:root {
    /* Палитра — из презентации музея */
    --m-dark: #1a1410;
    --m-dark2: #241c14;
    --m-brown: #3a2c1e;
    --m-terra: #a0613a; /* терракот — основной акцент */
    --m-terra-light: #c07a4c;
    --m-terra-dark: #7a4a2c;
    --m-gold: #c49450;
    --m-gold-light: #dab06a;
    --m-cream: #f0e4cc;
    --m-cream-dim: #c8b898;
    --m-white: #f5efe3;
    --m-red: #c44e3d; /* орнаментный красный */
    --m-red-dark: #8b3328;
    --m-border: #6a5540;
    --m-text: #f6ead4;
    --m-text-dim: #d6c2a0;
    --m-panel: rgba(55, 40, 28, 0.88);
    --m-panel-solid: #37281c;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-family: 'Forum', 'Cormorant Garamond', 'Georgia', serif;
    font-size: 16px;
    background-color: #0e0b08;
    color: var(--m-text);
}

a, a:hover, a:active, a:visited {
    text-decoration: none;
    color: inherit;
}

/* ===== PANORAMA ===== */
#pano {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ===== TITLE BAR ===== */
#titleBar {
    position: absolute;
    top: 0;
    left: 0;
    right: 54px;
    height: 54px;
    text-align: center;
    z-index: 10;
}

.mobile #titleBar {
    height: 60px;
    right: 60px;
}

body.fullscreen-enabled #titleBar {
    right: 108px;
}

body.fullscreen-enabled.mobile #titleBar {
    right: 120px;
}

body.multiple-scenes #titleBar {
    left: 54px;
}

body.multiple-scenes.mobile #titleBar {
    left: 60px;
}

#titleBar .sceneName {
    width: 100%;
    height: 100%;
    line-height: 42px;
    padding: 6px 24px;
    background: var(--m-panel);
    border-bottom: 2px solid var(--m-terra);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--m-cream);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    -moz-user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.mobile #titleBar .sceneName {
    line-height: 48px;
    font-size: 15px;
}

/* Ромбы вокруг заголовка */
#titleBar .sceneName::before {
    content: '\25C6 \2014 ';
    color: var(--m-terra);
    font-size: 11px;
}

#titleBar .sceneName::after {
    content: ' \2014 \25C6';
    color: var(--m-terra);
    font-size: 11px;
}

/* ===== КНОПКИ УПРАВЛЕНИЯ ===== */
.vintage-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: var(--m-panel);
    border: 1px solid var(--m-border);
    border-bottom: 2px solid var(--m-terra);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.vintage-btn:hover {
    background: rgba(60, 44, 30, 0.95);
    border-color: var(--m-terra-light);
}

.vintage-btn:active {
    background: rgba(26, 20, 16, 0.95);
}

.mobile .vintage-btn {
    width: 60px;
    height: 60px;
}

/* ===== CSS ИКОНКИ ===== */

.icon-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent var(--m-terra);
    margin-left: 3px;
    transition: border-color var(--transition);
}

.vintage-btn:hover .icon-play {
    border-left-color: var(--m-terra-light);
}

.icon-pause {
    width: 14px;
    height: 16px;
    border-left: 4px solid var(--m-terra);
    border-right: 4px solid var(--m-terra);
    transition: border-color var(--transition);
}

.vintage-btn:hover .icon-pause {
    border-left-color: var(--m-terra-light);
    border-right-color: var(--m-terra-light);
}

.icon-fullscreen {
    width: 18px;
    height: 18px;
    position: relative;
}

.icon-fullscreen::before, .icon-fullscreen::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: var(--m-terra);
    border-style: solid;
    transition: border-color var(--transition);
}

.icon-fullscreen::before {
    top: 0;
    left: 0;
    border-width: 2px 0 0 2px;
}

.icon-fullscreen::after {
    bottom: 0;
    right: 0;
    border-width: 0 2px 2px 0;
}

.icon-fullscreen .corner-tr, .icon-fullscreen .corner-bl {
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: var(--m-terra);
    border-style: solid;
}

.icon-fullscreen .corner-tr {
    top: 0;
    right: 0;
    border-width: 2px 2px 0 0;
}

.icon-fullscreen .corner-bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 2px 2px;
}

.vintage-btn:hover .icon-fullscreen::before,
.vintage-btn:hover .icon-fullscreen::after,
.vintage-btn:hover .icon-fullscreen .corner-tr,
.vintage-btn:hover .icon-fullscreen .corner-bl {
    border-color: var(--m-terra-light);
}

.icon-windowed {
    width: 18px;
    height: 18px;
    position: relative;
}

.icon-windowed::before, .icon-windowed::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: var(--m-terra);
    border-style: solid;
}

.icon-windowed::before {
    top: 0;
    left: 0;
    border-width: 0 2px 2px 0;
}

.icon-windowed::after {
    bottom: 0;
    right: 0;
    border-width: 2px 0 0 2px;
}

.icon-windowed .corner-tr, .icon-windowed .corner-bl {
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: var(--m-terra);
    border-style: solid;
}

.icon-windowed .corner-tr {
    top: 0;
    right: 0;
    border-width: 0 0 2px 2px;
}

.icon-windowed .corner-bl {
    bottom: 0;
    left: 0;
    border-width: 2px 2px 0 0;
}

/* Гамбургер */
.icon-expand {
    width: 18px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.icon-expand span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--m-terra);
    border-radius: 1px;
    transition: background-color var(--transition);
}

.vintage-btn:hover .icon-expand span {
    background-color: var(--m-terra-light);
}

/* X (закрыть) */
.icon-collapse {
    width: 16px;
    height: 16px;
    position: relative;
}

.icon-collapse::before, .icon-collapse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background-color: var(--m-terra);
    border-radius: 1px;
}

.icon-collapse::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.icon-collapse::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.vintage-btn:hover .icon-collapse::before,
.vintage-btn:hover .icon-collapse::after {
    background-color: var(--m-terra-light);
}

/* Стрелки управления */
.icon-up {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 12px 8px;
    border-color: transparent transparent var(--m-terra) transparent;
}

.vintage-btn:hover .icon-up {
    border-bottom-color: var(--m-terra-light);
}

.icon-down {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 8px 0 8px;
    border-color: var(--m-terra) transparent transparent transparent;
}

.vintage-btn:hover .icon-down {
    border-top-color: var(--m-terra-light);
}

.icon-left {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 12px 8px 0;
    border-color: transparent var(--m-terra) transparent transparent;
}

.vintage-btn:hover .icon-left {
    border-right-color: var(--m-terra-light);
}

.icon-right {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent var(--m-terra);
}

.vintage-btn:hover .icon-right {
    border-left-color: var(--m-terra-light);
}

.icon-plus {
    width: 16px;
    height: 16px;
    position: relative;
}

.icon-plus::before, .icon-plus::after {
    content: '';
    position: absolute;
    background-color: var(--m-terra);
    border-radius: 1px;
}

.icon-plus::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.icon-plus::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.vintage-btn:hover .icon-plus::before,
.vintage-btn:hover .icon-plus::after {
    background-color: var(--m-terra-light);
}

.icon-minus {
    width: 16px;
    height: 2px;
    background-color: var(--m-terra);
    border-radius: 1px;
}

.vintage-btn:hover .icon-minus {
    background-color: var(--m-terra-light);
}

/* ===== ЗАМЕНА CSS-ИКОНОК НА PNG-КАРТИНКИ ===== */

.vintage-btn i {
    width: 38px;
    height: 38px;
    display: block;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    border: none !important;
    background-color: transparent !important;
    margin: 0 !important;
}

/* отключаем старую CSS-отрисовку */
.vintage-btn i::before,
.vintage-btn i::after,
.vintage-btn i span,
.vintage-btn i .corner-tr,
.vintage-btn i .corner-bl {
    display: none !important;
    content: none !important;
}

/* верхние/служебные кнопки */
.icon-play {
    background-image: url("../marzipano/img/play.png");
}

.icon-pause {
    background-image: url("../marzipano/img/pause.png");
}

.icon-fullscreen {
    background-image: url("../marzipano/img/fullscreen.png");
}

.icon-windowed {
    background-image: url("../marzipano/img/windowed.png");
}

.icon-expand {
    background-image: url("../marzipano/img/expand.png");
}

.icon-collapse {
    background-image: url("../marzipano/img/collapse.png");
}

/* стрелки */
.icon-up {
    background-image: url("../marzipano/img/up.png");
}

.icon-down {
    background-image: url("../marzipano/img/down.png");
}

.icon-left {
    background-image: url("../marzipano/img/left.png");
}

.icon-right {
    background-image: url("../marzipano/img/right.png");
}

/* масштаб */
.icon-plus {
    background-image: url("../marzipano/img/plus.png");
}

.icon-minus {
    background-image: url("../marzipano/img/minus.png");
}

/* ===== FULLSCREEN TOGGLE ===== */
#fullscreenToggle {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

body.fullscreen-enabled #fullscreenToggle {
    display: flex;
}

#fullscreenToggle .icon-on {
    display: none;
}

#fullscreenToggle .icon-off {
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullscreenToggle.enabled .icon-on {
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullscreenToggle.enabled .icon-off {
    display: none;
}

/* ===== AUTOROTATE ===== */
#autorotateToggle {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

body.fullscreen-enabled #autorotateToggle {
    right: 54px;
}

body.fullscreen-enabled.mobile #autorotateToggle {
    right: 60px;
}

#autorotateToggle .icon-on {
    display: none;
}

#autorotateToggle .icon-off {
    display: flex;
    align-items: center;
    justify-content: center;
}

#autorotateToggle.enabled .icon-on {
    display: flex;
    align-items: center;
    justify-content: center;
}

#autorotateToggle.enabled .icon-off {
    display: none;
}

/* ===== СПИСОК СЦЕН TOGGLE ===== */
#sceneListToggle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

#sceneListToggle .icon-on {
    display: none;
}

#sceneListToggle .icon-off {
    display: flex;
    align-items: center;
    justify-content: center;
}

#sceneListToggle.enabled .icon-on {
    display: flex;
    align-items: center;
    justify-content: center;
}

#sceneListToggle.enabled .icon-off {
    display: none;
}

/* ===== СПИСОК СЦЕН ===== */
#sceneList {
    position: absolute;
    top: 0;
    left: -260px;
    padding-top: 54px;
    width: 260px;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: 0;
    transition: margin-left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9;
}

.mobile #sceneList {
    padding-top: 60px;
}

#sceneList .scenes {
    width: 100%;
    background: 
    linear-gradient(135deg, rgba(255,255,255,0.025), rgba(0,0,0,0.04)),
    var(--m-panel);
    border-right: 2px solid var(--m-terra);
    border-bottom: 2px solid var(--m-terra);
    padding-bottom: 10px;
}

/* Заголовок списка */
#sceneList .scenes::before {
    content: '◆ ЭКСПОЗИЦИЯ ◆';
    display: block;
    margin: 0 0 8px 0;
    padding: 12px 10px 8px;
    text-align: center;
    font-family: 'Forum', 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--m-gold-light);
    background: transparent;
    border-top: none;
    border-bottom: 1px solid rgba(160, 97, 58, 0.45);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

/* Орнаментная красная полоска */
#sceneList .scenes::after {
    content: '\25C6\25C7\25C6\25C7\25C6\25C7\25C6\25C7\25C6\25C7\25C6\25C7\25C6';
    display: block;
    text-align: center;
    font-size: 6px;
    letter-spacing: 2px;
    color: var(--m-red);
    padding: 2px 0 6px;
    border-bottom: 1px solid rgba(160, 97, 58, 0.25);
}

.mobile #sceneList {
    width: 100%;
    height: 100%;
    left: -100%;
}

.mobile #sceneList.enabled {
    margin-left: 100%;
}

.mobile #sceneList .scenes {
    height: 100%;
}

#sceneList.enabled {
    margin-left: 260px;
}

#sceneList .scene {
    display: block;
    width: 100%;
    height: 42px;
    position: relative;
    transition: all var(--transition);
}

.mobile #sceneList .scene {
    height: 52px;
}

#sceneList .scene .text {
    width: 100%;
    height: 100%;
    padding: 0 18px 0 34px;
    line-height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Forum', serif;
    font-size: 17px;
    letter-spacing: 0.2px;
    color: var(--m-text-dim);
    transition: all var(--transition);
    position: relative;
}

/* Ромбик перед названием */
#sceneList .scene .text::before {
    content: '\25C8';
    position: absolute;
    left: 14px;
    font-size: 8px;
    color: var(--m-terra-dark);
    opacity: 0.6;
    transition: all var(--transition);
}

.mobile #sceneList .scene .text {
    line-height: 52px;
}

.no-touch #sceneList .scene:hover {
    background: linear-gradient(90deg, rgba(160, 97, 58, 0.15), transparent);
}

.no-touch #sceneList .scene:hover .text {
    color: var(--m-gold-light);
}

.no-touch #sceneList .scene:hover .text::before {
    color: var(--m-terra);
    opacity: 1;
}

#sceneList .scene.current {
     linear-gradient(90deg, rgba(196, 78, 61, 0.18), rgba(160, 97, 58, 0.12), transparent);
}

#sceneList .scene.current .text {
    color: var(--m-gold-light);
    font-weight: 600;
    letter-spacing: 0.6px;
}

#sceneList .scene.current .text::before {
    color: var(--m-terra);
    opacity: 1;
}

#sceneList .scene + .scene {
    border-top: 1px solid rgba(160, 97, 58, 0.12);
}

body.single-scene #sceneList, body.single-scene #sceneListToggle {
    display: none;
}

/* ——— Единый стильный скролл для всего сайта ——— */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--m-terra) rgba(20, 12, 6, 0.0);
}

/* Chrome / Safari / Edge */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(180, 110, 65, 0.0) 0%,
        var(--m-terra) 20%,
        var(--m-terra) 80%,
        rgba(180, 110, 65, 0.0) 100%
    );
    border-radius: 10px;
    border: none;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(210, 130, 75, 0.0) 0%,
        #c8723c 20%,
        #c8723c 80%,
        rgba(210, 130, 75, 0.0) 100%
    );
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Панель инфо — немного шире, дорожка видна */
.info-expanded-text::-webkit-scrollbar,
.info-expanded-body::-webkit-scrollbar {
    width: 8px;
}

.info-expanded-text::-webkit-scrollbar-track,
.info-expanded-body::-webkit-scrollbar-track {
    background: rgba(20, 12, 6, 0.25);
    border-radius: 10px;
    margin: 12px 0;
}

.info-expanded-text::-webkit-scrollbar-thumb,
.info-expanded-body::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(160, 97, 58, 0.0) 0%,
        var(--m-terra) 15%,
        #8a4e2a 85%,
        rgba(160, 97, 58, 0.0) 100%
    );
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.info-expanded-text::-webkit-scrollbar-thumb:hover,
.info-expanded-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(200, 114, 60, 0.0) 0%,
        #c8723c 15%,
        var(--m-terra) 85%,
        rgba(200, 114, 60, 0.0) 100%
    );
    background-clip: padding-box;
    border: 2px solid transparent;
}

/* sceneList — тонкий, тёмный фон */
#sceneList::-webkit-scrollbar {
    width: 5px;
}

#sceneList::-webkit-scrollbar-track {
    background: rgba(15, 9, 5, 0.4);
    border-radius: 3px;
}

#sceneList::-webkit-scrollbar-thumb {
    background: var(--m-terra);
    border-radius: 3px;
}


/* ============================================================== */
/* === LINK HOTSPOT — НАВИГАЦИОННАЯ СТРЕЛКА (БОЛЬШАЯ, ЯВНАЯ) === */
/* ============================================================== */

.link-hotspot {
    width: 90px;
    height: 90px;
    margin-left: -45px;
    margin-top: -45px;
    cursor: pointer;
    opacity: 0.92;
    transition: opacity 0.3s;
}

.no-touch .link-hotspot:hover {
    opacity: 1;
}

.mobile .link-hotspot {
    width: 100px;
    height: 100px;
    margin-left: -50px;
    margin-top: -50px;
}

/* Большой круглый индикатор */
.link-hotspot-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Круглая подложка — терракот */
.link-hotspot-icon::before {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle,
    rgba(160, 97, 58, 0.35) 0%,
    rgba(160, 97, 58, 0.18) 60%,
    transparent 100%
    );
    border: 2.5px solid rgba(240, 228, 204, 0.55);
    box-shadow: 0 0 0 1px rgba(160, 97, 58, 0.3),
    0 2px 12px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(160, 97, 58, 0.1);
    transition: all var(--transition);
}

/* Стрелка-шеврон — большая и заметная */
.link-hotspot-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-top: 3.5px solid var(--m-cream);
    border-right: 3.5px solid var(--m-cream);
    transform: rotate(-45deg) translate(-2px, 2px);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
    transition: all var(--transition);
}

/* Hover — подсветка */
.no-touch .link-hotspot:hover .link-hotspot-icon::before {
    border-color: rgba(240, 228, 204, 0.85);
    background: radial-gradient(circle,
    rgba(160, 97, 58, 0.5) 0%,
    rgba(160, 97, 58, 0.25) 60%,
    transparent 100%
    );
    box-shadow: 0 0 0 1px rgba(160, 97, 58, 0.5),
    0 0 20px rgba(160, 97, 58, 0.35),
    0 2px 14px rgba(0, 0, 0, 0.4),
    inset 0 0 20px rgba(160, 97, 58, 0.15);
}

.no-touch .link-hotspot:hover .link-hotspot-icon::after {
    border-color: #fff;
}

/* Подпись (всегда видна) */
.link-hotspot-label {
    display: block;
    text-align: center;
    margin-top: 6px;
    font-family: 'Forum', serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--m-cream);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9),
    0 0 10px rgba(0, 0, 0, 0.6),
    1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    pointer-events: none;
    line-height: 1.3;
}

/* Тултип при наведении */
.link-hotspot-tooltip {
    position: absolute;
    left: 100%;
    top: 14px;
    margin-left: 8px;
    font-family: 'Forum', serif;
    font-size: 14px;
    max-width: 300px;
    padding: 8px 14px;
    border-radius: 4px;
    background: var(--m-panel);
    border: 1px solid var(--m-terra);
    color: var(--m-cream);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateX(-8px);
    transition: transform 0.3s, opacity 0.3s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.tooltip-fallback .link-hotspot-tooltip {
    display: none;
}

.no-touch .tooltip-fallback .link-hotspot:hover .link-hotspot-tooltip {
    display: block;
}


/* ============================================================== */
/* === INFO HOTSPOT — КНОПКА ИНФОРМАЦИИ                      === */
/* ============================================================== */

.info-hotspot {
    position: absolute;
}

/* Только для не сенсорных дисплеев. */
.no-touch .info-hotspot:hover .info-hotspot-icon-wrapper {
    opacity: 0.9;
}

/* Иконка «i» — увеличенная */
.info-hotspot .info-hotspot-icon-wrapper {
    opacity: 0.5;
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--m-terra), var(--m-terra-light));
    border: 2px solid rgba(240, 228, 204, 0.45);
    cursor: pointer;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.15);
    transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out, box-shadow 0.3s;
}

.mobile .info-hotspot .info-hotspot-icon-wrapper {
    width: 56px;
    height: 56px;
    min-width: 56px;
}

.info-hotspot .info-hotspot-icon {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

/* ===== EXPANDED OVERLAY (image + text full view) ===== */
.info-expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    /* Резервируем место под футер экскурсовода, чтобы текст не прятался под ним. */
    padding-bottom: var(--guide-bar-h, 0px);
    z-index: 12000;
    background: rgba(20, 13, 9, 0.68);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.info-expanded-overlay.visible {
    opacity: 1;
}

.info-expanded-card {
    position: relative;
    display: flex;
    max-width: 900px;
    max-height: 80vh;
    width: 90vw;

    background:
    radial-gradient(circle at 20% 15%, rgba(255, 244, 214, 0.055), transparent 28%),
    radial-gradient(circle at 80% 85%, rgba(255, 244, 214, 0.04), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(0,0,0,0.05)),
    var(--m-panel);

    border: 2px solid rgba(181, 120, 58, 0.95);
    border-radius: 10px;
    overflow: visible;

    box-shadow:
    0 12px 42px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(230, 190, 120, 0.18),
    0 0 0 2px rgba(196, 78, 61, 0.12),
    inset 0 0 18px rgba(255, 214, 140, 0.05),
    inset 0 0 0 1px rgba(255, 235, 190, 0.04);

    transform: scale(0.95);
    transition: transform 0.3s;
}

.info-expanded-card::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(218, 176, 106, 0.38);
    border-radius: 6px;
    pointer-events: none;
}

.info-expanded-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.08),
    inset 0 -1px 0 rgba(120, 70, 30, 0.25);
}

.info-expanded-overlay.visible .info-expanded-card {
    transform: scale(1);
}

.info-expanded-close {
    position: absolute;
    top: 18px;
    right: -26px;

    width: 34px;
    height: 76px;
    padding: 0;

    color: transparent;
    font-size: 0;
    line-height: 0;

    background:
        url("../marzipano/img/close.png") center 20px / 15px 15px no-repeat,
        linear-gradient(180deg, rgba(164, 62, 42, 0.98), rgba(132, 53, 32, 0.98));

    border: 1px solid rgba(218, 176, 106, 0.78);
    border-left: none;
    border-radius: 0 8px 8px 0;

    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    z-index: 30;

    transition: transform 0.2s, filter 0.2s;
}

.info-expanded-close:hover {
    transform: translateX(2px);
    filter: brightness(1.15);
}

/* Magnifier lens */
.info-expanded-lens {
    display: none;
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 2px solid var(--m-terra);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 3;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.9);
}

.info-expanded-img {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.info-expanded-img img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.info-expanded-caption {
    font-family: 'Forum', serif;
    font-size: 13px;
    color: rgba(240, 228, 204, 0.6);
    padding: 6px 12px;
    text-align: center;
    font-style: italic;
}

.info-expanded-text {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;

    background:
        radial-gradient(circle at 20% 15%, rgba(255, 244, 214, 0.075), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(196, 148, 80, 0.07), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,0.035), rgba(0,0,0,0.035));
}

.info-expanded-title {
    font-family: 'Forum', 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    color: var(--m-gold-light);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(218, 176, 106, 0.65);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1.15;
}

.info-expanded-title::before,
.info-expanded-title::after {
    content: "❖";
    color: rgba(218, 176, 106, 0.85);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.info-expanded-body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.55;
    color: var(--m-text);
    flex: 1;
    overflow-y: auto;
    padding-top: 0px;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
    /* Убираем рамки, окно на весь экран. */
    .info-expanded-card {
        flex-direction: column;
        max-height: 100%;
        max-width: 100%;
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
    }

    .info-expanded-img {
        flex: 0 0 auto;
        max-height: 40vh;
    }

    /* Убираем рамки, изображение на весь экран. */
    .image-lightbox img {
        max-width: 100%;
        max-height: 100%;
        border: none;
        border-radius: 0;
    }
}

/* ===== Rich HTML styles inside text containers ===== */
.info-hotspot-text h1,
.info-hotspot-text-body h1,
.info-expanded-body h1,
.info-hotspot-modal .info-hotspot-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--m-cream);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.info-hotspot-text h2,
.info-hotspot-text-body h2,
.info-expanded-body h2,
.info-hotspot-modal .info-hotspot-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--m-cream);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.info-hotspot-text h3,
.info-hotspot-text-body h3,
.info-expanded-body h3,
.info-hotspot-modal .info-hotspot-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--m-cream);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

/* Цитаты и выделенные фрагменты внутри описаний */
.info-expanded-body blockquote,
.info-expanded-body .quote {
    margin: 12px 0;
    padding: 10px 14px;
    background: rgba(255, 244, 214, 0.055) !important;
    border-left: 3px solid rgba(218, 176, 106, 0.65);
    border-radius: 4px;
    color: var(--m-text) !important;
    font-style: italic;
    box-shadow: none !important;
}

.info-expanded-body blockquote p,
.info-expanded-body .quote p {
    margin: 0;
}

/* Смягчаем тёмные цитатные блоки, если фон задан прямо в HTML */
.info-expanded-body [style*="background"],
.info-expanded-body [style*="background-color"] {
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 244, 214, 0.06), transparent 35%),
        rgba(74, 51, 35, 0.45) !important;
    border: 1px solid rgba(218, 176, 106, 0.35) !important;
    border-left: 3px solid rgba(218, 176, 106, 0.75) !important;
    border-radius: 6px !important;
    color: var(--m-text) !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.12) !important;
}

/* Перебиваем цвет текста внутри цитатных блоков */
.info-expanded-body [style*="background"] *,
.info-expanded-body [style*="background-color"] * {
    color: var(--m-text) !important;
}

.info-expanded-body [style*="background"] strong,
.info-expanded-body [style*="background-color"] strong,
.info-expanded-body [style*="background"] b,
.info-expanded-body [style*="background-color"] b {
    color: var(--m-gold-light) !important;
}

/* DOKA: */
.info-hotspot-text p,
.info-hotspot-text-body p,
.info-expanded-body p,
.info-hotspot-modal .info-hotspot-text p {
    margin: 12px 0 0 0;
}

.info-hotspot-text p:first-child,
.info-hotspot-text-body p:first-child,
.info-expanded-body p:first-child,
.info-hotspot-modal .info-hotspot-text p:first-child {
    margin-top: 0;
}

/* /DOKA */

.info-hotspot-text strong,
.info-hotspot-text-body strong,
.info-expanded-body strong,
.info-hotspot-modal .info-hotspot-text strong,
.info-hotspot-text b,
.info-hotspot-text-body b,
.info-expanded-body b,
.info-hotspot-modal .info-hotspot-text b {
    font-weight: 700;
    color: var(--m-cream);
}

.info-hotspot-text em,
.info-hotspot-text-body em,
.info-expanded-body em,
.info-hotspot-modal .info-hotspot-text em,
.info-hotspot-text i,
.info-hotspot-text-body i,
.info-expanded-body i,
.info-hotspot-modal .info-hotspot-text i {
    font-style: italic;
}

.info-hotspot-text ul,
.info-hotspot-text-body ul,
.info-expanded-body ul,
.info-hotspot-modal .info-hotspot-text ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
    list-style: disc;
}

.info-hotspot-text ol,
.info-hotspot-text-body ol,
.info-expanded-body ol,
.info-hotspot-modal .info-hotspot-text ol {
    margin: 0 0 12px 0;
    padding-left: 20px;
    list-style: decimal;
}

.info-hotspot-text li,
.info-hotspot-text-body li,
.info-expanded-body li,
.info-hotspot-modal .info-hotspot-text li {
    margin-bottom: 4px;
}

.info-hotspot-text a,
.info-hotspot-text-body a,
.info-expanded-body a,
.info-hotspot-modal .info-hotspot-text a {
    color: var(--m-terra-light);
    text-decoration: underline;
}

.info-hotspot-text a:hover,
.info-hotspot-text-body a:hover,
.info-expanded-body a:hover {
    color: var(--m-cream);
}

.info-hotspot-text br,
.info-hotspot-text-body br,
.info-expanded-body br {
    display: block;
    content: '';
    margin-top: 4px;
}

/* ===== STANDALONE IMAGE HOTSPOT ===== */
.image-hotspot {
}

.image-hotspot-inner {
    cursor: pointer;
    position: relative;
    width: auto; /* 120px;*/
    height: auto; /* 90px; */
    border-radius: 6px;
    border: 2px solid var(--m-terra);
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(160, 97, 58, 0.25);
    overflow: hidden;
    background: var(--m-panel);
    transform: translate(-50%, -50%);
    transition: box-shadow 0.3s, transform 0.3s;
}

.image-hotspot-inner:hover {
    box-shadow: 0 5px 24px rgba(0, 0, 0, 0.65), 0 0 0 2px var(--m-terra);
    transform: translate(-50%, -50%) scale(1.06);
}

.image-hotspot-inner img {
    width: auto; /* 100%; */
    height: auto; /* 100%; */
    object-fit: contain; /* cover; */
    display: block;
}

.image-hotspot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    background: linear-gradient(transparent, rgba(36, 28, 20, 0.88));
    font-family: 'Forum', serif;
    font-size: 11px;
    color: var(--m-cream);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== IMAGE LIGHTBOX ===== */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12000;
    background: rgba(14, 11, 8, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
}

.image-lightbox.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0s 0s;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 6px;
    border: 2px solid var(--m-terra);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    transition: transform 0.3s;
}

.image-lightbox.visible img {
    transform: scale(1);
}

.image-lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Forum', serif;
    font-size: 16px;
    color: var(--m-cream);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    max-width: 70vw;
    text-align: center;
}

.image-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(160, 97, 58, 0.6);
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 9999;
}

.image-lightbox-close:hover {
    background: var(--m-terra);
}

.image-lightbox-close::before,
.image-lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--m-cream);
    border-radius: 1px;
}

.image-lightbox-close::before {
    transform: rotate(45deg);
}

.image-lightbox-close::after {
    transform: rotate(-45deg);
}

/* ===== VIEW CONTROL BUTTONS ===== */
.viewControlButton {
    display: none;
    position: absolute;
    bottom: 16px;
    left: 50%;
    z-index: 10;
}

body.view-control-buttons .viewControlButton {
    display: flex;
}

@media (max-width: 600px) {
    body.view-control-buttons .viewControlButton {
        display: none;
    }
}

.viewControlButton-1 {
    margin-left: -167px;
}

.viewControlButton-2 {
    margin-left: -111px;
}

.viewControlButton-3 {
    margin-left: -55px;
}

.viewControlButton-4 {
    margin-left: 1px;
}

.viewControlButton-5 {
    margin-left: 57px;
}

.viewControlButton-6 {
    margin-left: 113px;
}

.viewControlButton-5::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: var(--m-terra-dark);
    opacity: 0.5;
}

/* ===== NADIR PATCH ===== */
.nadir-patch {
    position: absolute;
    width: 600px;
    height: 600px;
    margin-left: -300px;
    margin-top: -300px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.nadir-patch-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
            circle at center,
            rgba(180, 173, 155, 0.85) 0%,
            rgba(180, 173, 155, 0.7) 25%,
            rgba(180, 173, 155, 0.4) 50%,
            rgba(180, 173, 155, 0.15) 75%,
            transparent 100%
    );
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, black 25%, transparent 65%);
    mask-image: radial-gradient(circle at center, black 0%, black 25%, transparent 65%);
}


/* ============================================================== */
/* === ДЕКОРАТИВНЫЕ ОРНАМЕНТЫ — СТИЛЬ ПРЕЗЕНТАЦИИ МУЗЕЯ       === */
/* ============================================================== */

/* Нижний орнамент — красные коми-пас ромбы */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
            90deg,
            var(--m-red) 0px, var(--m-red) 6px,
            transparent 6px, transparent 8px,
            var(--m-terra) 8px, var(--m-terra) 14px,
            transparent 14px, transparent 16px
    );
    opacity: 0.7;
    z-index: 100;
    pointer-events: none;
}

/* Верхний орнамент */
body::before {
    content: '';
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
            90deg,
            var(--m-terra) 0px, var(--m-terra) 4px,
            transparent 4px, transparent 6px,
            var(--m-red) 6px, var(--m-red) 8px,
            transparent 8px, transparent 10px
    );
    opacity: 0.45;
    z-index: 100;
    pointer-events: none;
}


/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#sceneList .scene {
    animation: fadeInUp 0.4s ease-out backwards;
}

#sceneList .scene:nth-child(1) {
    animation-delay: 0.05s;
}

#sceneList .scene:nth-child(2) {
    animation-delay: 0.1s;
}

#sceneList .scene:nth-child(3) {
    animation-delay: 0.15s;
}

#sceneList .scene:nth-child(4) {
    animation-delay: 0.2s;
}

#sceneList .scene:nth-child(5) {
    animation-delay: 0.25s;
}

#sceneList .scene:nth-child(6) {
    animation-delay: 0.3s;
}

#sceneList .scene:nth-child(7) {
    animation-delay: 0.35s;
}

#sceneList .scene:nth-child(8) {
    animation-delay: 0.4s;
}

#sceneList .scene:nth-child(9) {
    animation-delay: 0.45s;
}

/* ===== RESPONSIVE ===== */
@media (max-height: 400px) {
    .viewControlButton {
        bottom: 4px;
    }
}
/* ===== ЗАМЕНА HOTSPOT-ИКОНОК НА PNG-КАРТИНКИ ===== */

/* Link-hotspot: переходы между сценами */
.link-hotspot-icon {
    width: 64px !important;
    height: 64px !important;
    background-image: url("../marzipano/img/link.png") !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* отключаем старую CSS-отрисовку круга и стрелки */
.link-hotspot-icon::before,
.link-hotspot-icon::after {
    display: none !important;
    content: none !important;
}

/* Info-hotspot: информационные точки */
.info-hotspot .info-hotspot-icon-wrapper {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    opacity: 0.9 !important;

    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;

    background-image: url("../marzipano/img/info.png") !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    filter: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.no-touch .info-hotspot:hover .info-hotspot-icon-wrapper {
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* убираем внутреннюю букву i */
.info-hotspot .info-hotspot-icon {
    display: none !important;
}

/* ===================================================== */
/* === MOBILE FIXES: аккуратная версия для телефонов === */
/* ===================================================== */

@media (max-width: 600px) {

    /* Общая верхняя панель тура */
    /* Базово: 1 кнопка справа (autorotate, 48px) */
    #titleBar,
    .mobile #titleBar {
        height: 48px !important;
        right: 48px !important;
    }

    /* С fullscreen: 2 кнопки справа (autorotate + fullscreen = 96px) */
    body.fullscreen-enabled #titleBar,
    body.fullscreen-enabled.mobile #titleBar {
        right: 96px !important;
    }

    /* Autorotate сдвигается влево когда рядом fullscreen */
    body.fullscreen-enabled #autorotateToggle,
    body.fullscreen-enabled.mobile #autorotateToggle {
        right: 48px !important;
    }

    body.multiple-scenes #titleBar,
    body.multiple-scenes.mobile #titleBar {
        left: 48px !important;
    }

    #titleBar .sceneName {
        height: 48px;
        line-height: 40px;
        padding: 4px 10px;
        font-size: 13px;
        letter-spacing: 1.5px;
    }

    #titleBar .sceneName::before,
    #titleBar .sceneName::after {
        font-size: 8px;
    }

    .vintage-btn,
    .mobile .vintage-btn {
        width: 48px;
        height: 48px;
    }

    .vintage-btn i {
        width: 34px;
        height: 34px;
    }

    body::before {
        top: 48px;
    }

    /* Список сцен */
    #sceneList {
        padding-top: 48px;
    }

    #sceneList .scenes::before {
        font-size: 14px;
        letter-spacing: 2px;
        padding: 10px 8px 6px;
    }

    #sceneList .scene,
    .mobile #sceneList .scene {
        height: 44px;
    }

    #sceneList .scene .text,
    .mobile #sceneList .scene .text {
        line-height: 44px;
        font-size: 15px;
    }

    /* Навигационные хотспоты между зонами */
    .link-hotspot,
    .mobile .link-hotspot {
        width: 72px;
        height: 72px;
        margin-left: -36px;
        margin-top: -24px; /* сдвиг: центр иконки (48px) на якорную точку */
    }

    .link-hotspot-icon {
        width: 48px !important;
        height: 48px !important;
    }

    .link-hotspot-label {
        font-size: 10px;
        max-width: 90px;
        margin-top: 2px;
    }

    /* Инфо-хотспоты */
    .info-hotspot .info-hotspot-icon-wrapper,
    .mobile .info-hotspot .info-hotspot-icon-wrapper {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    /* Отдельные image-hotspots: баннеры, птицы, логотипы */
    .image-hotspot-inner {
        transform: translate(-50%, -50%) scale(0.72);
        transform-origin: center center;
    }

    .image-hotspot-inner:hover {
        transform: translate(-50%, -50%) scale(0.78);
    }

    .image-hotspot-caption {
        font-size: 10px;
        padding: 2px 5px;
    }

    /* Развёрнутая карточка экспоната */
    .info-expanded-overlay {
        align-items: stretch;
        justify-content: stretch;
        background: rgba(20, 13, 9, 0.78);
    }

    .info-expanded-card {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        flex-direction: column;
        border: none;
        border-radius: 0;
        overflow: hidden;
        transform: none;
    }

    .info-expanded-card::before,
    .info-expanded-card::after {
        display: none;
    }

    .info-expanded-img {
        flex: 0 0 auto;
        height: 34vh;
        max-height: 34vh;
        min-height: 220px;
        background:
            radial-gradient(circle at center, rgba(255, 244, 214, 0.04), transparent 45%),
            rgba(20, 13, 9, 0.35);
    }

    .info-expanded-img img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
    }

    .info-expanded-text {
        flex: 1;
        min-height: 0;
        padding: 14px 16px 18px;
        overflow-y: auto;
    }

    .info-expanded-title {
        font-size: 22px;
        line-height: 1.12;
        letter-spacing: 1.2px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        gap: 6px;
    }

    .info-expanded-title::before,
    .info-expanded-title::after {
        font-size: 10px;
    }

    .backgroundAudioButton {
        min-height: 44px;
        margin: 0 0 12px 0;
        padding: 7px 10px;
        gap: 10px;
        justify-content: center;
    }

    .backgroundAudioButton img {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .backgroundAudioButton::after {
        font-size: 17px;
        letter-spacing: 0.8px;
    }

    .info-expanded-body {
        font-size: 20px;
        line-height: 1.45;
        overflow-y: visible;
        padding-top: 0;
    }

    .info-expanded-body p {
        margin: 10px 0 0 0;
    }

    .info-expanded-body [style*="background"],
    .info-expanded-body [style*="background-color"],
    .info-expanded-body blockquote,
    .info-expanded-body .quote {
        padding: 10px 12px !important;
        margin: 10px 0 !important;
        font-size: 20px;
        line-height: 1.45;
    }

    /* Кнопка закрытия на мобильном — обычная круглая, без боковой закладки */
    .info-expanded-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;

        background:
            url("../marzipano/img/close.png") center / 30px 30px no-repeat;

        border: none;
        border-radius: 50%;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
        clip-path: none;
        z-index: 50;
    }

    .info-expanded-close:hover {
        transform: scale(1.05);
        filter: brightness(1.08);
    }

    /* Лупу на телефоне лучше отключить: пальцем она неудобная */
    .info-expanded-lens {
        display: none !important;
    }

    .info-expanded-img img {
        cursor: zoom-in;
    }

    /* Нижние кнопки управления */
    .viewControlButton {
        bottom: 8px;
    }

    body.view-control-buttons .viewControlButton {
        display: none;
    }
}

@media (max-width: 600px) {

    /* Уменьшаем все отдельные картинки-хотспоты на телефоне */
    .image-hotspot-inner {
    transform: translate(-50%, -50%) scale(0.68) !important;
    transform-origin: center center;
}

.image-hotspot-inner:hover {
    transform: translate(-50%, -50%) scale(0.72) !important;
}

.image-hotspot-inner img {
    max-width: 82vw !important;
    max-height: 26vh !important;
    object-fit: contain !important;
}
}
/* ================================================================ */
/* === ЭКСКУРСОВОД — нижняя панель / футер (v6, редизайн)        === */
/* ================================================================ */

#guide-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12001; /* выше overlay карточки (12000) */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(40, 24, 12, 0.98) 0%, rgba(18, 11, 6, 0.99) 100%);
    border-top: 1px solid rgba(196, 146, 86, 0.35);
    box-shadow: 0 -8px 34px rgba(0, 0, 0, 0.55);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--m-cream);
    transform: translateY(120%);
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}
#guide-bar.visible { transform: translateY(0); }

/* --- верхняя строка: статус | зал | управление --- */
#guide-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

#guide-status {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
#guide-icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    animation: guide-pulse 2.6s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(196, 146, 86, 0.55));
}
@keyframes guide-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}
#guide-progress {
    min-width: 0;
    font-size: 13.5px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(245, 235, 218, 0.82);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* --- выбор зала --- */
#guide-hall {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-hall-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: rgba(196, 146, 86, 0.85);
}
.guide-select {
    max-width: 240px;
    background: rgba(255, 244, 224, 0.05);
    border: 1px solid rgba(196, 146, 86, 0.4);
    color: var(--m-cream);
    font: inherit;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.guide-select:hover {
    border-color: rgba(196, 146, 86, 0.75);
    background: rgba(255, 244, 224, 0.08);
}
.guide-select:focus-visible { outline: 2px solid var(--m-cream); outline-offset: 2px; }
.guide-select option { color: #1c120a; background: #f4e9d8; }

/* --- управление: назад · CTA · вперёд --- */
#guide-nav {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.guide-btn {
    box-sizing: border-box;
    font: inherit;
    color: var(--m-cream);
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s, transform 0.1s;
    flex: 0 0 auto;
}
.guide-btn:disabled { opacity: 0.32; cursor: default; }
.guide-btn:active:not(:disabled) { transform: translateY(1px); }
.guide-btn:focus-visible { outline: 2px solid var(--m-cream); outline-offset: 2px; }

/* вторичные иконочные кнопки ‹ › */
.guide-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    background: rgba(255, 244, 224, 0.04);
    border-color: rgba(196, 146, 86, 0.30);
    color: rgba(245, 235, 218, 0.85);
}
.guide-icon-btn:hover:not(:disabled) {
    background: rgba(196, 146, 86, 0.16);
    border-color: rgba(196, 146, 86, 0.6);
}

/* главный CTA — Пауза / Продолжить */
.guide-cta {
    min-width: 134px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #2a1708;
    background: linear-gradient(180deg, #d8a766 0%, #b5783a 100%);
    border-color: rgba(255, 226, 178, 0.55);
    box-shadow: 0 3px 12px rgba(150, 92, 40, 0.4), inset 0 1px 0 rgba(255, 240, 214, 0.4);
}
.guide-cta:hover:not(:disabled) {
    background: linear-gradient(180deg, #e6b876 0%, #c4854a 100%);
    box-shadow: 0 4px 18px rgba(180, 110, 50, 0.55), inset 0 1px 0 rgba(255, 245, 224, 0.5);
}

/* завершить (×) — спокойный, вторичный */
.guide-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    background: rgba(255, 244, 224, 0.03);
    border-color: rgba(180, 120, 110, 0.32);
    color: rgba(226, 178, 168, 0.82);
}
.guide-close:hover {
    background: rgba(150, 60, 48, 0.26);
    border-color: rgba(190, 90, 74, 0.58);
    color: #f0d6cf;
}

/* --- маршрут экспозиции (stepper) --- */
#guide-exhibits {
    display: flex;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(196, 146, 86, 0.5) transparent;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
#guide-exhibits::-webkit-scrollbar { height: 5px; }
#guide-exhibits::-webkit-scrollbar-thumb { background: rgba(196, 146, 86, 0.45); border-radius: 3px; }
#guide-exhibits::-webkit-scrollbar-track { background: transparent; }
#guide-exhibits:empty { display: none; }

.guide-step {
    flex: 0 0 auto;
    max-width: 230px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 7px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(240, 230, 214, 0.62);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.guide-step-num {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: rgba(240, 230, 214, 0.7);
    background: rgba(255, 244, 224, 0.06);
    border: 1px solid rgba(196, 146, 86, 0.35);
}
.guide-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.guide-step:hover {
    color: var(--m-cream);
    background: rgba(255, 244, 224, 0.05);
}
.guide-step:focus-visible { outline: 2px solid var(--m-cream); outline-offset: 2px; }
.guide-step.active {
    color: var(--m-cream);
    background: rgba(196, 146, 86, 0.16);
    border-color: rgba(196, 146, 86, 0.5);
    font-weight: 600;
}
.guide-step.active .guide-step-num {
    color: #2a1708;
    background: linear-gradient(180deg, #d8a766, #b5783a);
    border-color: rgba(255, 226, 178, 0.6);
}

/* ===== Планшет (768–1023) ===== */
@media (max-width: 1023px) {
    #guide-bar { padding: 11px 18px; }
    #guide-main { gap: 12px; }
    .guide-select { max-width: 190px; }
}

/* ===== Мобильные (≤767) ===== */
@media (max-width: 767px) {
    #guide-bar { padding: 6px 10px; gap: 5px; }
    /* Прячем строку статуса (наушники + текст) ради места под текст карточки:
       зал виден в дропдауне, экспонат — в маршруте, пауза — на самой кнопке. */
    #guide-status { display: none; }
    /* Ряд 1: всё управление в одну строку — зал · ‹ · Пауза · › · ✕ */
    #guide-main { flex-wrap: wrap; gap: 6px; align-items: center; }
    #guide-hall { order: 1; flex: 0 1 34%; min-width: 0; }
    .guide-hall-label { display: none; }
    .guide-select { width: 100%; max-width: none; min-height: 42px; padding: 6px 8px; font-size: 12px; }
    #guide-nav { order: 2; flex: 1 1 auto; min-width: 0; justify-content: center; gap: 6px; }
    .guide-cta {
        flex: 1 1 auto;
        min-width: 64px;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .guide-icon-btn { width: 34px; height: 42px; font-size: 18px; }
    #guide-stop-btn { order: 3; }
    .guide-close { width: 34px; height: 42px; }
    /* Ряд 2: маршрут */
    #guide-exhibits { padding: 0 0 2px; }
    .guide-step { font-size: 11.5px; min-height: 32px; max-width: 170px; padding: 4px 10px 4px 5px; }
    .guide-step-num { width: 19px; height: 19px; font-size: 11px; }
}
