html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    cursor: default;
    width: 100%;
    height: 100%;
}

#panorama {
    width: 100%;
    height: 100%;
}

.custom-hotspot {
    height: 40px;
    width: 40px;
    background: #00ff0fc4;
    border-radius: 40%;
}

div.custom-tooltip span {
    visibility: hidden;
    position: absolute;
    border-radius: 3px;
    background-color: #fff;
    color: #000;
    text-align: center;
    max-width: 200px;
    padding: 5px 10px;
    margin-left: -220px;
    cursor: default;
}

div.custom-tooltip:hover span {
    visibility: visible;
}

div.custom-tooltip:hover span:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    bottom: -20px;
    left: -10px;
    margin: 0 50%;
}

#xemthamquanmenu {
    position: absolute;
    top: 134px;
    left: 3px;
    width: 38px;
    height: 38px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

body.panorama-intro-active #xemthamquanmenu,
body.panorama-intro-active #thamquanmenu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#xemthamquanmenu a,
#xemthamquanmenu svg {
    width: 20px;
    height: 20px;
    display: flex;
    margin: auto;
    color: #fff;
}

#xemthamquanmenu a {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#xemthamquanmenu:hover {
    background: rgba(0, 0, 0, 0.65);
}

#thamquanmenu {
    height: 60vh;
    position: absolute;
    /* Bắt đầu dưới nút fullscreen (kết thúc ở 128px) một khoảng 6px, không đè lên cột nút bên trái */
    top: calc(15% + 70px);
    visibility: inherit;
    width: 20vw;
    min-width: 300px;
    max-width: 380px;
    z-index: 3;
    display: none;
    left: 8px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

#thamquanmenu.active {
    display: inherit;
}

#thamquanmenu .search-box {
    position: absolute;
    top: 12px;
    display: flex;
    height: 40px;
    width: calc(100% - 24px);
    gap: 8px;
}

#thamquanmenu .search-box a {
    display: flex;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #0d6efd;
    color: #fff;
}

#thamquanmenu .search-box a:hover {
    background: #0b5ed7;
}

#thamquanmenu .search-box .input-data {
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
}

#thamquanmenu .search-box .input-data::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#thamquanmenu .search-box .input-data:focus {
    border-color: rgba(13, 110, 253, 0.8);
    background: rgba(255, 255, 255, 0.18);
}

#listdiadiemthamquan {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    height: calc(60vh - 116px);
    top: 62px;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    visibility: inherit;
    width: calc(100% - 42px);
    pointer-events: auto;
    opacity: 1;
    z-index: 3;
    list-style-type: none;
    padding: 8px;
    margin: 0;
    border-radius: 12px;
}

#listdiadiemthamquan li {
    height: 52px;
    width: 100%;
    margin-bottom: 6px;
}

#listdiadiemthamquan li a {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    height: 60px;
    padding-left: 15px;
    padding-right: 12px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    overflow: hidden;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

#listdiadiemthamquan li a:hover,
#listdiadiemthamquan li a.active {
    border-color: rgba(13, 110, 253, 0.75);
    border-left-color: #0d6efd;
    background: rgba(13, 110, 253, 0.18);
}

#diadiempreview {
    display: none;
    object-fit: contain;
    position: absolute;
    width: 50vw;
    height: 60vh;
    top: 20vh;
    left: 25vw;
    z-index: 3;
    background: white;
    border-radius: 5px;
}

#diadiempreview.active {
    display: inherit;
}

#diadiemphantrang {
    display: none;
    position: absolute;
    top: calc(60vh - 44px);
    width: calc(100% - 24px);
}

#diadiemphantrang.active {
    display: inherit;
}

#diadiemphantrang nav {
    display: flex;
}

#diadiemphantrang ul {
    margin: auto;
}

#keyword_place {
    width: 100%;
}

@media (max-width: 767px) {
    #xemthamquanmenu {
        top: 134px;
        left: 8px;
    }

    #thamquanmenu {
        top: 176px;
        left: 8px;
        width: calc(100vw - 16px);
        min-width: 0;
        max-width: none;
        height: 56vh;
    }

    #listdiadiemthamquan {
        height: calc(56vh - 116px);
    }

    #diadiemphantrang {
        top: calc(56vh - 44px);
    }
}

#logo_img {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 2;
    top: 5px;
    right: 5px;
}

.pnlm-load-button {
    background-color: rgb(0 136 90 / 93%);
    border-radius: 5px;
    height: 80px;
}

.pnlm-load-button:hover {
    background-color: rgb(0 122 80);
}

/* ===== Pannellum zoom / fullscreen controls – đồng bộ nút tròn của trang ===== */
/* Cột dọc bên trái, cùng hàng với #xemthamquanmenu / #sodothamquan-control / #hienvat-control:
   zoom-in (2px) -> zoom-out (46px) -> fullscreen (90px), kết thúc ở 128px.
   3 nút của trang được đẩy xuống 44px (138 / 182 / 226) để nhường chỗ. */
.pnlm-controls-container {
    top: 2px;
    left: 4px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Khung zoom mặc định (hộp trắng 26x52 + viền) -> cột nút tròn trong suốt */
.pnlm-container .pnlm-zoom-controls {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* 3 nút mặc định: tròn 38px, kính mờ, giống #xemthamquanmenu / #sodothamquan-control / #hienvat-control */
.pnlm-container .pnlm-zoom-in,
.pnlm-container .pnlm-zoom-out,
.pnlm-container .pnlm-fullscreen-toggle-button {
    position: relative;
    top: auto;
    bottom: auto;
    margin: 0;
    box-sizing: border-box;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.55);
    background-image: none; /* bỏ sprite đen của pannellum */
    background-position: 0 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.18s ease;
}

    .pnlm-container .pnlm-zoom-in:hover,
    .pnlm-container .pnlm-zoom-out:hover,
    .pnlm-container .pnlm-fullscreen-toggle-button:hover {
        background-color: rgba(0, 0, 0, 0.65);
    }

/* Icon trắng vẽ bằng mask: glyph sprite gốc màu đen sẽ mất hút trên nền tối */
.pnlm-container .pnlm-zoom-in::after,
.pnlm-container .pnlm-zoom-out::after,
.pnlm-container .pnlm-fullscreen-toggle-button::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    background-color: #fff;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.pnlm-container .pnlm-zoom-in::after {
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E");
}

.pnlm-container .pnlm-zoom-out::after {
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11h14v2H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11h14v2H5z'/%3E%3C/svg%3E");
}

.pnlm-container .pnlm-fullscreen-toggle-button-inactive::after {
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9V4h5v2H6v3H4zm16 0h-2V6h-3V4h5v5zM4 15h2v3h3v2H4v-5zm16 0v5h-5v-2h3v-3h2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9V4h5v2H6v3H4zm16 0h-2V6h-3V4h5v5zM4 15h2v3h3v2H4v-5zm16 0v5h-5v-2h3v-3h2z'/%3E%3C/svg%3E");
}

.pnlm-container .pnlm-fullscreen-toggle-button-active::after {
    -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4v5H4V7h3V4h2zm6 0h2v3h3v2h-5V4zM4 15h5v5H7v-3H4v-2zm16 0v2h-3v3h-2v-5h5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 4v5H4V7h3V4h2zm6 0h2v3h3v2h-5V4zM4 15h5v5H7v-3H4v-2zm16 0v2h-3v3h-2v-5h5z'/%3E%3C/svg%3E");
}

/* Ẩn cùng lúc với các nút khác khi còn ở màn hình giới thiệu */
body.panorama-intro-active .pnlm-controls-container {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767px) {
    .pnlm-controls-container {
        left: 8px;
    }
}

#loadingcontainer {
    display: none;
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: 4;
    background: white;
}

#loadingcontainer.active {
    display: inherit;
}

#loadingcontainer img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

#loadingcontainer a {
    position: absolute;
    width: 190px;
    height: 40px;
    z-index: 5;
    background-color: rgb(0 136 90 / 93%);
    border-radius: 5px;
    top: calc(50vh - 40px);
    left: calc(50vw - 100px);
    text-align: center;
    font-size: 0.95rem;
    color: white;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

#loadingcontainer a svg {
    width: 35px;
    height: 35px;
}

#loadingcontainer a:hover {
    background-color: rgb(0 122 80);
}

.scale-shine {
    display: inline-flex;
    animation: scaleAndShine 1.2s ease-in-out infinite;
    text-shadow: none;
    background-color: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #0d6efd !important;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
}

@keyframes scaleAndShine {
    0%, to {
        transform: scale(1);
        box-shadow: none;
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(255, 255, 255, .8);
    }
}

/* Nút "Bắt đầu tham quan" / "Đang tải thông tin, vui lòng chờ" trên ảnh preview */
#loadingcontainer a#btn-start-tour {
    left: 0;
    right: 0;
    margin: 0 auto;
    width: max-content;
    max-width: calc(100vw - 32px);
    height: auto;
    min-height: 42px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    white-space: nowrap;
    line-height: 1.25;
}

#loadingcontainer a#btn-start-tour.is-loading {
    animation: none;
    cursor: default;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.88) !important;
    color: #495057 !important;
    border-color: rgba(0, 0, 0, 0.12);
}

#loadingcontainer a#btn-start-tour.is-error {
    animation: none;
    cursor: pointer;
    background-color: rgba(255, 243, 205, 0.95) !important;
    color: #9a5b00 !important;
    border-color: rgba(0, 0, 0, 0.15);
}

.start-tour-spinner {
    display: inline-block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(13, 110, 253, 0.25);
    border-top-color: #0d6efd;
    animation: startTourSpin 0.8s linear infinite;
}

.start-tour-icon {
    display: inline-flex;
    align-items: center;
}

.start-tour-label {
    display: inline-block;
}

@keyframes startTourSpin {
    to {
        transform: rotate(360deg);
    }
}



#panorama {
    position: relative;
    background: #000;
}

    #panorama.panorama-intro-hidden > :not(#panorama-intro-layer) {
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    #panorama .pnlm-load-box,
    #panorama.panorama-intro-hidden .pnlm-lbox,
    #panorama.panorama-intro-hidden .pnlm-load-button {
        display: none !important;
    }

    #panorama #panorama-intro-layer {
        position: absolute;
        inset: 0;
        z-index: 50;
        pointer-events: auto;
        background: #000;
        opacity: 1;
        transition: opacity 0.9s ease;
    }

        #panorama #panorama-intro-layer.fading-out {
            opacity: 0;
        }

        #panorama #panorama-intro-layer canvas {
            width: 100% !important;
            height: 100% !important;
            display: block;
        }

#tour-language-control,
#tour-audio-control {
    position: absolute;
    z-index: 6;
    display: none;
    pointer-events: auto;
}

#tour-language-control {
    top: 2px;
    right: 44px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 20px;
    padding: 4px;
}

    #tour-language-control .lang-btn {
        border: 0;
        background: transparent;
        color: #fff;
        border-radius: 16px;
        min-width: 54px;
        height: 30px;
        font-size: 12px;
        font-weight: 700;
    }

        #tour-language-control .lang-btn.active {
            background: #0d6efd;
            color: #fff;
        }

#tour-audio-control {
    right: 14px;
    bottom: 14px;
    width: min(320px, calc(100vw - 28px));
    background: rgba(0, 0, 0, 0.62);
    border-radius: 12px;
    padding: 8px 10px;
    color: #fff;
}

    /* 1 hàng duy nhất: nút Play/Pause + nút Quay lại + thanh tiến trình audio */
    #tour-audio-control .tour-audio-top {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #tour-audio-control .tour-audio-btn {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 18px;
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
        font-weight: 700;
        background: #0d6efd;
        color: #fff;
    }

    #tour-audio-control #tour-audio-toggle {
        width: 34px;
        padding: 0;
    }

    #tour-audio-control .tour-audio-btn svg {
        width: 16px;
        height: 16px;
        display: block;
        fill: currentColor;
    }

    #tour-audio-control #tour-audio-toggle .icon-pause {
        display: none;
    }

    #tour-audio-control #tour-audio-toggle.is-playing .icon-play {
        display: none;
    }

    #tour-audio-control #tour-audio-toggle.is-playing .icon-pause {
        display: block;
    }

    #tour-audio-control .tour-audio-btn.back-btn {
        background: #ff5000;
        text-decoration: none;
        white-space: nowrap;
    }

    #tour-audio-control .tour-audio-seek {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        margin: 0;
        accent-color: #0d6efd;
        cursor: pointer;
    }

body.panorama-intro-active #tour-language-control,
body.panorama-intro-active #tour-audio-control,
body.panorama-intro-active #tour-mc-image {
    display: none !important;
}

#loadingcontainer.active ~ #tour-mc-image {
    display: none !important;
}

#loadingcontainer.active ~ #tour-language-control {
    display: none !important;
}

#tour-mc-image {
    position: absolute;
    right: calc(14px + min(320px, calc(100vw - 28px)) / 2);
    transform: translateX(50%);
    bottom: 90px;
    z-index: 6;
    display: none;
    height: 100px;
    width: auto;
    object-fit: contain;
    pointer-events: auto;
}

#sodothamquan-control {
    position: absolute;
    top: 178px;
    left: 3px;
    width: 38px;
    height: 38px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

    #sodothamquan-control a,
    #sodothamquan-control svg {
        width: 20px;
        height: 20px;
        display: flex;
        margin: auto;
        color: #fff;
    }

    #sodothamquan-control a {
        width: 100%;
        height: 100%;
        border-radius: 20px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    #sodothamquan-control:hover {
        background: rgba(0, 0, 0, 0.65);
    }

body.panorama-intro-active #sodothamquan-control {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Khi nút ☰ bị ẩn (địa điểm không có danh sách) thì kéo 2 nút dưới lên một nấc 44px */
body.tour-menu-closed #sodothamquan-control {
    top: 134px;
}

body.tour-menu-closed #hienvat-control {
    top: 178px;
}

body.panorama-intro-active #sodothamquan-overlay {
    display: none !important;
}

#sodothamquan-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.82);
}

    #sodothamquan-overlay.active {
        display: flex;
    }

    #sodothamquan-overlay .sodo-thamquan-box {
        position: relative;
        max-width: 96vw;
        max-height: 92vh;
        display: flex;
        flex-direction: column;
        background: rgba(20, 20, 20, 0.94);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    }

    #sodothamquan-overlay .sodo-thamquan-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 14px;
        color: #fff;
        font-weight: 700;
        font-size: 15px;
        background: rgba(0, 0, 0, 0.35);
    }

    #sodothamquan-overlay .sodo-thamquan-message {
        color: #fff;
        font-size: 14px;
        padding: 18px 22px;
        display: none;
    }

    #sodothamquan-overlay .sodo-thamquan-close {
        cursor: pointer;
        color: #fff;
        font-size: 22px;
        line-height: 1;
        text-decoration: none;
    }

        #sodothamquan-overlay .sodo-thamquan-close:hover {
            color: #ffd166;
        }

    #sodothamquan-overlay .sodo-thamquan-canvas {
        position: relative;
        overflow: auto;
        padding: 14px;
    }

    #sodothamquan-overlay .sodo-thamquan-image-wrap {
        position: relative;
        display: inline-block;
        line-height: 0;
    }

    #sodothamquan-overlay .sodo-thamquan-canvas img {
        display: block;
        max-width: calc(94vw - 28px);
        max-height: calc(92vh - 80px);
        user-select: none;
    }

    #sodothamquan-overlay .sodo-thamquan-icon {
        position: absolute;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2px solid #fff;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
        transform: translate(-50%, -50%);
        cursor: pointer;
        transition: transform 0.15s ease;
        z-index: 2;
        /* màu điểm thường, lấy từ cấu hình SoDoThamQuanVR.Icon */
        background-color: var(--sodo-icon-color, #8a8a8a);
    }

        /* Điểm đang tham quan (JS gắn class .sodo-thamquan-icon-active) */
        #sodothamquan-overlay .sodo-thamquan-icon.sodo-thamquan-icon-active {
            /* màu lấy từ cấu hình SoDoThamQuanVR.ActiveIcon */
            background-color: var(--sodo-icon-active-color, #0d6efd);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 10px rgba(0, 0, 0, 0.6);
            z-index: 5;
        }

            #sodothamquan-overlay .sodo-thamquan-icon.sodo-thamquan-icon-active::after {
                content: '';
                position: absolute;
                top: 48%;
                left: 50%;
                width: calc(100% + 8px);
                height: calc(100% + 8px);
                box-sizing: border-box;
                border-radius: 50%;
                border: 2px solid var(--sodo-icon-active-color, #0d6efd);
                animation: thamquan-icon-ping 1.6s ease-out infinite;
                pointer-events: none;
                will-change: transform, opacity;
            }

@keyframes thamquan-icon-ping {
    0% {
        transform: translate(-50%, -50%) scale(0.55);
        opacity: 1;
    }

    80%, 100% {
        transform: translate(-50%, -50%) scale(1.35);
        opacity: 0;
    }
}

#sodothamquan-overlay .sodo-thamquan-icon:hover {
    transform: translate(-50%, -50%) scale(1.25);
    z-index: 10;
}

#sodothamquan-overlay .sodo-thamquan-icon .sodo-thamquan-label {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 140%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#sodothamquan-overlay .sodo-thamquan-icon:hover .sodo-thamquan-label {
    display: block;
}

/* PC: sơ đồ thu nhỏ neo bên trái, không che toàn bộ phần VR360 */
@media (min-width: 768px) {
    #sodothamquan-overlay {
        inset: auto;
        left: 50px;
        bottom: 50px;
        padding: 0;
        background: transparent;
        align-items: flex-start;
        justify-content: flex-start;
        pointer-events: none;
    }

        #sodothamquan-overlay.active {
            display: block;
        }

        #sodothamquan-overlay .sodo-thamquan-box {
            width: min(500px, 34vw);
            max-width: min(500px, 34vw);
            max-height: 62vh;
            pointer-events: auto;
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
            /* cho phép nhãn tên điểm tham quan tràn ra ngoài panel nhỏ */
            overflow: visible;
        }

        #sodothamquan-overlay .sodo-thamquan-header {
            font-size: 13px;
            padding: 6px 10px;
            border-radius: 13px 13px 0 0;
        }

        #sodothamquan-overlay .sodo-thamquan-message {
            font-size: 13px;
            padding: 12px 12px;
        }

        #sodothamquan-overlay .sodo-thamquan-canvas {
            padding: 8px;
            overflow: visible;
        }

            #sodothamquan-overlay .sodo-thamquan-canvas img {
                max-width: 100%;
                max-height: calc(62vh - 80px);
            }

        #sodothamquan-overlay .sodo-thamquan-icon {
            width: 14px;
            height: 14px;
            border-width: 2px;
        }

            #sodothamquan-overlay .sodo-thamquan-icon .sodo-thamquan-label {
                font-size: 11px;
                padding: 2px 6px;
            }
}

@media (max-width: 767px) {
    #tour-language-control {
        right: 8px;
    }

    #tour-audio-control {
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
    }

    #tour-mc-image {
        right: calc(8px + (100vw - 16px) / 2);
        transform: translateX(50%);
        bottom: 74px;
    }
}

/* ===== Panel Hiện vật (ảnh hiện vật Loai = 5) ===== */
#hienvat-control {
    position: absolute;
    top: 222px;
    left: 3px;
    width: 38px;
    height: 38px;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

    #hienvat-control a,
    #hienvat-control svg {
        width: 20px;
        height: 20px;
        display: flex;
        margin: auto;
        color: #fff;
    }

    #hienvat-control a {
        width: 100%;
        height: 100%;
        border-radius: 20px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    #hienvat-control:hover {
        background: rgba(0, 0, 0, 0.65);
    }

body.panorama-intro-active #hienvat-control {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#loadingcontainer.active ~ #hienvat-control {
    display: none !important;
}

body.panorama-intro-active #hienvat-overlay,
body.panorama-intro-active #hienvat-detail {
    display: none !important;
}

#hienvat-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.82);
}

    #hienvat-overlay.active {
        display: flex;
    }

    #hienvat-overlay .hienvat-box {
        position: relative;
        width: 100%;
        max-width: 96vw;
        max-height: 92vh;
        display: flex;
        flex-direction: column;
        background: rgba(20, 20, 20, 0.94);
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    }

    #hienvat-overlay .hienvat-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 14px;
        color: #fff;
        font-weight: 700;
        font-size: 15px;
        background: rgba(0, 0, 0, 0.35);
    }

    #hienvat-overlay .hienvat-close {
        cursor: pointer;
        color: #fff;
        font-size: 22px;
        line-height: 1;
        text-decoration: none;
    }

        #hienvat-overlay .hienvat-close:hover {
            color: #ffd166;
        }

    #hienvat-overlay .hienvat-message {
        color: #fff;
        font-size: 14px;
        padding: 18px 22px;
        display: none;
    }

    #hienvat-overlay .hienvat-canvas {
        overflow-y: auto;
        overflow-x: hidden;
        padding: 14px;
        -webkit-overflow-scrolling: touch;
    }

    #hienvat-overlay .hienvat-group + .hienvat-group {
        margin-top: 16px;
    }

    #hienvat-overlay .hienvat-group-title {
        color: #ffd166;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    #hienvat-overlay .hienvat-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 10px;
    }

    #hienvat-overlay .hienvat-item {
        cursor: pointer;
        border-radius: 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.16);
        transition: transform 0.15s ease, border-color 0.15s ease;
    }

        #hienvat-overlay .hienvat-item:hover {
            border-color: #ffd166;
            transform: translateY(-2px);
        }

        #hienvat-overlay .hienvat-item img {
            display: block;
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            background: #000;
        }

    #hienvat-overlay .hienvat-item-name {
        color: #fff;
        font-size: 12px;
        line-height: 1.3;
        padding: 6px;
        text-align: center;
        max-height: 44px;
        overflow: hidden;
    }

/* PC: panel hiện vật thu nhỏ neo bên phải (mobile: full màn hình) */
@media (min-width: 768px) {
    #hienvat-overlay {
        inset: auto;
        top: 138px;
        right: 14px;
        bottom: 90px;
        padding: 0;
        background: transparent;
        align-items: flex-start;
        justify-content: flex-end;
        pointer-events: none;
    }

        #hienvat-overlay.active {
            display: block;
        }

        #hienvat-overlay .hienvat-box {
            width: min(420px, 32vw);
            max-width: min(420px, 32vw);
            max-height: 100%;
            pointer-events: auto;
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
        }

        #hienvat-overlay .hienvat-header {
            font-size: 13px;
            padding: 6px 10px;
            border-radius: 13px 13px 0 0;
        }

        #hienvat-overlay .hienvat-message {
            font-size: 13px;
            padding: 12px;
        }

        #hienvat-overlay .hienvat-canvas {
            padding: 8px;
            max-height: calc(100vh - 138px - 90px - 34px);
        }

        #hienvat-overlay .hienvat-grid {
            grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
            gap: 8px;
        }
}

/* ===== Ảnh hiện vật chi tiết: full màn hình ===== */
#hienvat-detail {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: none;
    background: rgba(0, 0, 0, 0.94);
}

    #hienvat-detail.active {
        display: block;
    }

    #hienvat-detail .hienvat-detail-wrap {
        position: absolute;
        inset: 0;
        display: flex;
    }

    /* Trái: 2/3 - khung ảnh + next/prev + zoom */
    #hienvat-detail .hienvat-detail-left {
        position: relative;
        flex: 0 0 66.6667%;
        max-width: 66.6667%;
        height: 100%;
        overflow: hidden;
        background: #000;
    }

    #hienvat-detail .hienvat-detail-stage {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        touch-action: none;
    }

        #hienvat-detail .hienvat-detail-stage.is-zoomed {
            cursor: grab;
        }

        #hienvat-detail .hienvat-detail-stage.is-dragging {
            cursor: grabbing;
        }

    #hienvat-detail #hienvat-detail-img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        user-select: none;
        -webkit-user-drag: none;
        transform-origin: center center;
        transition: transform 0.15s ease;
        will-change: transform;
    }

    #hienvat-detail .hienvat-detail-stage.is-dragging #hienvat-detail-img {
        transition: none;
    }

    /* Phải: 1/3 - khu vực, mô tả, audio */
    #hienvat-detail .hienvat-detail-info {
        flex: 1 1 auto;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 18px 20px 24px;
        color: #fff;
        font-size: 14px;
        line-height: 1.55;
        background: rgba(18, 18, 18, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.12);
    }

    #hienvat-detail .hienvat-detail-khuvuc {
        display: none;
        color: #ffd166;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        margin-bottom: 6px;
        padding-right: 40px;
    }

    #hienvat-detail .hienvat-detail-info h3 {
        margin: 0 0 12px;
        font-size: 20px;
        font-weight: 700;
        color: #fff;
        padding-right: 40px;
    }

    #hienvat-detail .hienvat-detail-mota {
        padding-bottom: 14px;
    }

        #hienvat-detail .hienvat-detail-mota img {
            max-width: 100%;
            height: auto;
        }

    #hienvat-detail .hienvat-detail-audio {
        align-items: center;
        gap: 10px;
        margin-top: 4px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        position: sticky;
        bottom: -24px;
        margin-bottom: -24px;
        padding-bottom: 24px;
        background: linear-gradient(to top, rgba(18, 18, 18, 0.98) 65%, rgba(18, 18, 18, 0));
    }

    /* Nút đóng + next/prev */
    #hienvat-detail .hienvat-detail-close {
        position: absolute;
        top: 8px;
        right: 14px;
        z-index: 7;
        color: #fff;
        font-size: 30px;
        line-height: 1;
        cursor: pointer;
        text-decoration: none;
        text-shadow: 0 2px 8px #000;
    }

        #hienvat-detail .hienvat-detail-close:hover {
            color: #ffd166;
        }

    #hienvat-detail .hienvat-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 6;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.45);
        color: #fff;
        font-size: 26px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        #hienvat-detail .hienvat-nav:hover {
            background: rgba(0, 0, 0, 0.7);
        }

    #hienvat-detail .hienvat-prev {
        left: 10px;
    }

    #hienvat-detail .hienvat-next {
        right: 10px;
    }

    /* Thanh điều khiển zoom (góc dưới phải khung ảnh) */
    #hienvat-detail .hienvat-zoom-controls {
        position: absolute;
        right: 14px;
        bottom: 14px;
        z-index: 6;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 4px 6px;
        border-radius: 22px;
        background: rgba(0, 0, 0, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(6px);
    }

        #hienvat-detail .hienvat-zoom-controls button {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 0;
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            font-size: 18px;
            font-weight: 700;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

            #hienvat-detail .hienvat-zoom-controls button:hover {
                background: #0d6efd;
            }

    #hienvat-detail #hienvat-zoom-level {
        color: #fff;
        font-size: 12px;
        min-width: 40px;
        text-align: center;
    }

    #hienvat-detail #hienvat-audio-toggle {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 0;
        background: #0d6efd;
        color: #fff;
        font-size: 14px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    #hienvat-detail #hienvat-audio-seek {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        accent-color: #0d6efd;
        cursor: pointer;
    }

    #hienvat-detail .hienvat-detail-counter {
        position: absolute;
        left: 14px;
        bottom: 16px;
        z-index: 6;
        font-size: 12px;
        color: #fff;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 12px;
        padding: 3px 10px;
        white-space: nowrap;
    }

/* Mobile: ảnh và thông tin xếp dọc, mỗi phần full chiều ngang */
@media (max-width: 767px) {
    #hienvat-detail .hienvat-detail-wrap {
        flex-direction: column;
    }

    #hienvat-detail .hienvat-detail-left {
        flex: 0 0 58%;
        width: 100%;
        max-width: 100%;
        height: 58%;
    }

    #hienvat-detail .hienvat-detail-info {
        flex: 0 0 42%;
        width: 100%;
        height: 42%;
        padding: 14px 16px 18px;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

        #hienvat-detail .hienvat-detail-info h3 {
            font-size: 17px;
            margin-bottom: 8px;
        }

    #hienvat-detail .hienvat-nav {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    #hienvat-detail .hienvat-detail-audio {
        bottom: -18px;
        margin-bottom: -18px;
        padding-bottom: 18px;
    }
}

div.pnlm-tooltip span{
    font-size:13.5px;
    /* Bỏ giới hạn 200px của pannellum + luôn 1 dòng, không xuống 2 dòng */
    max-width: none;
    white-space: nowrap;
}