.image-map-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 60px;
    display: flex;
}

#target-map, 
.maphilight canvas {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    padding: 20px; box-sizing: border-box;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.modal-overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff; width: 100%; max-width: 700px;
    max-height: 95vh;
    position: relative; padding: 40px 30px 30px; border-radius: 8px;
    overflow-y: auto; box-shadow: 0 5px 30px rgba(0,0,0,0.5);
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.modal-overlay.is-open .modal-content {
    opacity: 1; transform: translateY(0);
}

#modal-slider-wrapper {
    position: relative; width: 100%; margin-bottom: 20px;
}

.bx-viewport {
    transition: height 0.5s ease !important;
}

.modal-bxslider { margin: 0; padding: 0; list-style: none; display: block; 
}

.modal-bxslider:not(.bx-initialised) li:not(:first-child) {
    display: none !important;
}

.modal-bxslider li img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 65vh;
}

.bx-wrapper { 
    box-shadow: none !important; border: none !important; 
    background: none !important; margin: 0 auto !important; 
}
.bx-wrapper .bx-controls-direction a {
    text-indent: -9999px !important;
    width: 40px !important; height: 40px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50% !important;
    position: absolute !important; top: 50% !important; margin-top: -20px !important;
    z-index: 999;
}
.bx-wrapper .bx-controls-direction a::after {
    content: ''; display: block; width: 10px; height: 10px;
    border-top: 2px solid #fff; border-left: 2px solid #fff; position: absolute; top: 14px;
}
.bx-wrapper .bx-prev { left: 10px !important; }
.bx-wrapper .bx-prev::after { left: 16px; transform: rotate(-45deg); }
.bx-wrapper .bx-next { right: 10px !important; }
.bx-wrapper .bx-next::after { right: 14px; transform: rotate(135deg); }

.bx-wrapper .bx-controls-direction a.disabled {
    opacity: 0.2 !important; cursor: default;
}

.modal-close { position: absolute; top: 10px; right: 15px; font-size: 32px; background: none; border: none; cursor: pointer; z-index: 100; color: #333; }
#modal-title { font-size: 1.5rem; font-weight: bold; margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 10px; color: #333; margin-top:0;}
#modal-description { color: #444; line-height: 1.8; }

/* スマホ用レスポンシブ調整 */
@media screen and (max-width: 767px) {
    .modal-content {
        padding: 30px 15px 15px !important;
        width: 95% !important;
        max-height: 90vh !important;
    }

    .modal-bxslider li img {
        max-height: 45vh !important;
        object-fit: contain;
    }

    #modal-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }
    #modal-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .bx-wrapper .bx-controls-direction a {
        width: 30px !important;
        height: 30px !important;
        margin-top: -15px !important;
    }
    .bx-wrapper .bx-controls-direction a::after {
        top: 9px !important;
        width: 8px !important;
        height: 8px !important;
    }
}


.exhibition-nav-brick {
    max-width: 800px;
    margin: 40px auto 60px;
    padding: 0 15px;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

.brick-nav-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.brick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.brick-btn {
    background: #fdfdfd;
    border: 2px solid #a83a32;
    border-radius: 4px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: 70px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.brick-btn:hover {
    background: #a83a32;
    box-shadow: 0 4px 10px rgba(168, 58, 50, 0.3);
    transform: translateY(-2px);
}

.brick-btn:active {
    background: #a83a32;
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.brick-num {
    font-size: 1.4rem;
    font-weight: bold;
    color: #a83a32;
    border-right: 2px solid #e0e0e0;
    padding-right: 15px;
    margin-right: 15px;
    transition: all 0.3s ease;
    width: 30px; text-align: center;
}

.brick-name {
    color: #333;
    font-size: 1.0rem;
    font-weight: bold;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.brick-btn:hover .brick-num {
    color: #fff;
    border-right-color: rgba(255,255,255,0.3);
}
.brick-btn:hover .brick-name {
    color: #fff;
}

.brick-btn:active .brick-num {
    color: #fff;
}
.brick-btn:active .brick-name {
    color: #fff;
}


@media screen and (max-width: 767px) {
    .modal-content {
        padding: 30px 15px 15px !important; 
        width: 95% !important;
        max-height: 90vh !important; 
    }

    .modal-bxslider li img {
        max-height: 45vh !important;
        object-fit: contain;
    }

    #modal-title {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
    }
    #modal-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .bx-wrapper .bx-controls-direction a {
        width: 30px !important;
        height: 30px !important;
        margin-top: -15px !important;
    }
    .bx-wrapper .bx-controls-direction a::after {
        top: 9px !important;
        width: 8px !important;
        height: 8px !important;
    }

    .exhibition-nav-brick {
        margin: 20px auto 40px;
    }
    .brick-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .brick-btn {
        padding: 12px 15px;
        min-height: 60px;
    }
    .brick-num {
        font-size: 1.2rem;
        padding-right: 10px;
        margin-right: 10px;
    }
    .brick-name {
        font-size: 0.95rem;
    }
}

.perm-att li {
	list-style: circle;
}