/* yamato.quest - Victorian Cabinet of Curiosities meets Yamato Period */
/* Palette: Analogous indigo-violet-plum with gilded bronze accents */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-night: #1B1340;
    --murasaki: #4A2D6B;
    --koubai: #8B3A6B;
    --kinsei: #C4956A;
    --washi: #F5ECD7;
    --sumi: #2A2420;
    --kinka: #D4AF6E;
    --fuji: #9B7DB8;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    background: var(--deep-night);
    color: var(--washi);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* =============================================
   LEFT MARGIN PANEL (Marginalia)
   ============================================= */

#margin-panel {
    position: sticky;
    top: 0;
    left: 0;
    width: 38%;
    height: 100vh;
    flex-shrink: 0;
    background: var(--washi);
    overflow-y: auto;
    z-index: 10;
    /* Deckle edge on right border */
    clip-path: polygon(
        0% 0%,
        97% 0%,
        98% 2%,
        96% 4%,
        98% 6%,
        97% 8%,
        99% 10%,
        97% 12%,
        98% 14%,
        96% 16%,
        98% 18%,
        97% 20%,
        99% 22%,
        97% 24%,
        98% 26%,
        96% 28%,
        98% 30%,
        97% 32%,
        99% 34%,
        97% 36%,
        98% 38%,
        96% 40%,
        98% 42%,
        97% 44%,
        99% 46%,
        97% 48%,
        98% 50%,
        96% 52%,
        98% 54%,
        97% 56%,
        99% 58%,
        97% 60%,
        98% 62%,
        96% 64%,
        98% 66%,
        97% 68%,
        99% 70%,
        97% 72%,
        98% 74%,
        96% 76%,
        98% 78%,
        97% 80%,
        99% 82%,
        97% 84%,
        98% 86%,
        96% 88%,
        98% 90%,
        97% 92%,
        99% 94%,
        97% 96%,
        98% 98%,
        97% 100%,
        0% 100%
    );
}

#margin-panel::-webkit-scrollbar {
    width: 4px;
}

#margin-panel::-webkit-scrollbar-track {
    background: transparent;
}

#margin-panel::-webkit-scrollbar-thumb {
    background: var(--kinsei);
    border-radius: 2px;
}

.margin-inner {
    padding: clamp(2rem, 4vw, 4rem);
    padding-right: clamp(2.5rem, 5vw, 5rem);
}

.margin-section {
    margin-bottom: clamp(3rem, 6vh, 6rem);
    padding-bottom: clamp(2rem, 4vh, 4rem);
    border-bottom: 1px solid rgba(107, 91, 78, 0.2);
}

.margin-section:last-child {
    border-bottom: none;
}

.margin-note {
    margin-bottom: 1.5rem;
}

.handwritten {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 1.1rem;
    color: #6B5B4E;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.welcome-note .handwritten:first-child {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--sumi);
    margin-bottom: 0.8rem;
}

.annotation-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--sumi);
    margin-bottom: 0.6rem;
    text-decoration: underline;
    text-decoration-color: rgba(107, 91, 78, 0.3);
    text-underline-offset: 4px;
}

.small-note {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

.ink-compass {
    display: block;
    margin: 1.5rem auto;
    opacity: 0.7;
}

/* Depth indicator for Kofun room */
.depth-indicator {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.depth-track {
    position: relative;
    width: 3px;
    height: 200px;
    background: linear-gradient(to bottom, #6B5B4E, var(--kinsei));
    border-radius: 2px;
    margin-left: 2rem;
}

.depth-marker {
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--koubai);
    border: 2px solid var(--kinsei);
    border-radius: 50%;
    transition: top 0.3s ease;
}

.depth-label {
    position: absolute;
    left: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    color: #6B5B4E;
    white-space: nowrap;
    transform: translateY(-50%);
}

.shaku-labels {
    position: relative;
    width: 0;
    height: 200px;
    margin-left: 3.5rem;
}

.shaku-labels .depth-label {
    left: 0;
    color: var(--koubai);
    opacity: 0.7;
}

/* =============================================
   RIGHT MAIN PANEL
   ============================================= */

#main-panel {
    flex: 1;
    min-width: 0;
    position: relative;
    background: var(--deep-night);
}

/* Grain texture overlay */
#main-panel::before {
    content: '';
    position: fixed;
    top: 0;
    left: 38%;
    right: 0;
    bottom: 0;
    background-image:
        repeating-radial-gradient(circle at 20% 50%, transparent 0, var(--deep-night) 2px),
        repeating-radial-gradient(circle at 80% 20%, transparent 0, var(--deep-night) 1.5px);
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* =============================================
   EXHIBITION ROOMS
   ============================================= */

.exhibition-room {
    min-height: 100vh;
    padding: clamp(4rem, 8vh, 8rem) clamp(2rem, 4vw, 5rem);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.room-content {
    position: relative;
    z-index: 2;
}

.room-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    letter-spacing: 0.02em;
    color: var(--washi);
    margin-bottom: 0.5rem;
}

.room-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--kinka);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

/* =============================================
   ORNATE FRAMES
   ============================================= */

.ornate-frame {
    position: relative;
    border: 1px solid rgba(196, 149, 106, 0.4);
    padding: clamp(2rem, 4vw, 4rem);
    margin: 1rem;
    box-shadow:
        0 0 0 3px rgba(196, 149, 106, 0.1),
        inset 0 0 40px rgba(27, 19, 64, 0.5);
}

.frame-corner {
    position: absolute;
    width: 40px;
    height: 40px;
}

.frame-corner::before,
.frame-corner::after {
    content: '';
    position: absolute;
}

.frame-corner-tl {
    top: -4px;
    left: -4px;
}
.frame-corner-tl::before {
    top: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--kinsei);
}
.frame-corner-tl::after {
    top: 0;
    left: 0;
    width: 2px;
    height: 30px;
    background: var(--kinsei);
}

.frame-corner-tr {
    top: -4px;
    right: -4px;
}
.frame-corner-tr::before {
    top: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--kinsei);
}
.frame-corner-tr::after {
    top: 0;
    right: 0;
    width: 2px;
    height: 30px;
    background: var(--kinsei);
}

.frame-corner-bl {
    bottom: -4px;
    left: -4px;
}
.frame-corner-bl::before {
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--kinsei);
}
.frame-corner-bl::after {
    bottom: 0;
    left: 0;
    width: 2px;
    height: 30px;
    background: var(--kinsei);
}

.frame-corner-br {
    bottom: -4px;
    right: -4px;
}
.frame-corner-br::before {
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--kinsei);
}
.frame-corner-br::after {
    bottom: 0;
    right: 0;
    width: 2px;
    height: 30px;
    background: var(--kinsei);
}

/* =============================================
   ROOM 1: ENTRY HALL
   ============================================= */

.entry-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.title-frame {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 2rem;
}

.letter-framed {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    letter-spacing: 0.02em;
    color: var(--washi);
    border: 1px solid rgba(212, 175, 110, 0.5);
    padding: 0.1em 0.2em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.4s ease, color 0.4s ease;
}

.letter-framed.dot {
    border-color: transparent;
    color: var(--kinka);
}

.letter-framed:hover {
    border-color: var(--kinsei);
    color: var(--kinka);
}

.letter-framed::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 0.5px solid rgba(212, 175, 110, 0.15);
}

.subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--fuji);
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.72;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: subtlePulse 3s ease-in-out infinite;
}

.scroll-hint-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kinka);
    opacity: 0.6;
}

.scroll-arrow {
    opacity: 0.6;
}

@keyframes subtlePulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* =============================================
   ORNAMENTAL DIVIDERS
   ============================================= */

.ornamental-divider {
    height: 15vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
}

.divider-svg {
    width: 100%;
    height: 80px;
    overflow: visible;
}

.morph-victorian {
    animation: morphDivider 8s ease-in-out infinite;
}

.morph-kumo {
    animation: morphDivider 8s ease-in-out infinite reverse;
    opacity: 0.5;
}

@keyframes morphDivider {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* =============================================
   ROOM 2: MIRROR ROOM
   ============================================= */

.mirror-content {
    text-align: center;
}

.mirror-collage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.bronze-mirror {
    max-width: 100%;
    height: auto;
    animation: mirrorRotate 60s linear infinite;
    filter: drop-shadow(0 0 20px rgba(196, 149, 106, 0.2));
}

@keyframes mirrorRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mirror-triangles {
    animation: triangleShift 20s ease-in-out infinite;
}

@keyframes triangleShift {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

.circuit-traces {
    animation: circuitPulse 4s ease-in-out infinite;
}

@keyframes circuitPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* Holographic shimmer */
.bronze-mirror::after {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(155, 125, 184, 0.1) 60deg,
        transparent 120deg,
        rgba(196, 149, 106, 0.1) 180deg,
        transparent 240deg,
        rgba(139, 58, 107, 0.1) 300deg,
        transparent 360deg
    );
    animation: holoShimmer 20s linear infinite;
    mix-blend-mode: screen;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes holoShimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mirror-description {
    max-width: 500px;
    text-align: left;
}

.mirror-description p {
    margin-bottom: 1rem;
    color: rgba(245, 236, 215, 0.8);
}

/* =============================================
   ROOM 3: KOFUN ARCHIVE
   ============================================= */

.kofun-content {
    text-align: center;
}

.kofun-diagram {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kofun-svg {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.kofun-artifact {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kofun-artifact:hover {
    transform: scale(1.3);
}

.kofun-popups {
    position: relative;
    width: 100%;
    min-height: 80px;
}

.artifact-popup {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}

.artifact-popup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.popup-frame {
    background: rgba(74, 45, 107, 0.3);
    border: 1px solid rgba(196, 149, 106, 0.4);
    padding: 1.2rem 1.5rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.popup-frame h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--kinka);
    margin-bottom: 0.4rem;
}

.popup-frame p {
    font-size: 0.9rem;
    color: rgba(245, 236, 215, 0.75);
    line-height: 1.6;
}

/* =============================================
   ROOM 4: MAGATAMA LABORATORY
   ============================================= */

.magatama-content {
    text-align: center;
}

.specimen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 2vw, 2rem);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.specimen-card {
    cursor: pointer;
}

.specimen-frame {
    background: rgba(74, 45, 107, 0.15);
    border: 1px solid rgba(196, 149, 106, 0.3);
    padding: 1rem;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.specimen-card:hover .specimen-frame {
    border-color: var(--kinsei);
    box-shadow: 0 0 20px rgba(196, 149, 106, 0.15);
}

.specimen-svg {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.8rem;
}

.specimen-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kinka);
}

.specimen-card:hover .specimen-historical {
    opacity: 0.2;
    transition: opacity 0.6s ease;
}

.specimen-card:hover .specimen-futuristic {
    opacity: 1 !important;
    transition: opacity 0.6s ease;
}

.specimen-card:hover .specimen-dot {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.specimen-historical,
.specimen-futuristic,
.specimen-dot {
    transition: opacity 0.6s ease;
}

.workshop-description {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.workshop-description p {
    margin-bottom: 1rem;
    color: rgba(245, 236, 215, 0.8);
}

/* =============================================
   ROOM 5: CLOUD ARCHIVE
   ============================================= */

.cloud-content {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cloudscape {
    position: relative;
    min-height: 60vh;
    margin-top: 2rem;
}

.cloud {
    position: absolute;
    background: rgba(155, 125, 184, 0.08);
    border-radius: 100px;
    padding: 2rem 3rem;
    max-width: 400px;
}

.cloud::before {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    background: rgba(155, 125, 184, 0.06);
    border-radius: 100px;
    top: -30%;
    left: 20%;
}

.cloud::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 50%;
    background: rgba(155, 125, 184, 0.05);
    border-radius: 100px;
    top: -20%;
    right: 15%;
}

.cloud-1 {
    top: 5%;
    left: 5%;
    animation: cloudFloat1 12s ease-in-out infinite;
}

.cloud-2 {
    top: 25%;
    right: 5%;
    animation: cloudFloat2 15s ease-in-out infinite;
}

.cloud-3 {
    top: 50%;
    left: 10%;
    animation: cloudFloat3 18s ease-in-out infinite;
}

.cloud-4 {
    top: 75%;
    right: 10%;
    animation: cloudFloat4 14s ease-in-out infinite;
}

@keyframes cloudFloat1 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(15px) translateY(-8px); }
}

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

@keyframes cloudFloat3 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(10px) translateY(-12px); }
}

@keyframes cloudFloat4 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-8px) translateY(10px); }
}

.cloud-text {
    position: relative;
    z-index: 1;
}

.cloud-text p {
    font-size: 0.95rem;
    color: rgba(245, 236, 215, 0.7);
    line-height: 1.6;
    animation: cloudTextFade 10s ease-in-out infinite;
}

.cloud-1 .cloud-text p { animation-delay: 0s; }
.cloud-2 .cloud-text p { animation-delay: 2.5s; }
.cloud-3 .cloud-text p { animation-delay: 5s; }
.cloud-4 .cloud-text p { animation-delay: 7.5s; }

@keyframes cloudTextFade {
    0%, 20%, 80%, 100% { opacity: 0.5; }
    40%, 60% { opacity: 1; }
}

.star-chart {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.stars-svg {
    width: 100%;
    height: 100%;
}

/* =============================================
   COMPASS NAVIGATION
   ============================================= */

#compass-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

#compass-btn:hover {
    transform: scale(1.1);
}

#compass-btn svg {
    display: block;
}

#compass-menu {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#compass-menu.compass-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.compass-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: rgba(42, 36, 32, 0.95);
    border: 1px solid rgba(196, 149, 106, 0.4);
    color: var(--washi);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: border-color 0.3s ease, background 0.3s ease;
    white-space: nowrap;
}

.compass-link:hover {
    border-color: var(--kinsei);
    background: rgba(74, 45, 107, 0.4);
}

.compass-link::before {
    content: attr(data-kanji);
    font-size: 1rem;
    color: var(--kinka);
    min-width: 1.2em;
    text-align: center;
}

/* =============================================
   MOBILE ASIDE SYSTEM
   ============================================= */

#mobile-asides {
    display: none;
}

.aside-tab {
    background: var(--washi);
    border: 1px solid rgba(107, 91, 78, 0.3);
    margin: 0.5rem 1rem;
    overflow: hidden;
}

.tab-label {
    display: block;
    padding: 0.8rem 1rem;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #6B5B4E;
    cursor: pointer;
    position: relative;
}

.tab-label::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--kinsei);
}

.aside-content {
    padding: 0 1rem 0.8rem;
    display: none;
}

.aside-tab.open .aside-content {
    display: block;
}

.aside-tab.open .tab-label::after {
    content: '\2212';
}

/* =============================================
   GOLDEN BORDER SHIMMER
   ============================================= */

@keyframes goldShimmer {
    0% { border-color: rgba(196, 149, 106, 0.3); }
    50% { border-color: rgba(212, 175, 110, 0.6); }
    100% { border-color: rgba(196, 149, 106, 0.3); }
}

.ornate-frame {
    animation: goldShimmer 6s ease-in-out infinite;
}

/* =============================================
   RESPONSIVE: Mobile Layout
   ============================================= */

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    #margin-panel {
        display: none;
    }

    #mobile-asides {
        display: block;
    }

    #main-panel {
        width: 100%;
    }

    #main-panel::before {
        left: 0;
    }

    .exhibition-room {
        padding: clamp(2rem, 4vh, 4rem) clamp(1rem, 3vw, 2rem);
    }

    .title-frame {
        gap: 3px;
    }

    .letter-framed {
        font-size: clamp(2rem, 10vw, 3.5rem);
        padding: 0.05em 0.12em;
    }

    .specimen-grid {
        grid-template-columns: 1fr;
        max-width: 250px;
    }

    .ornate-frame {
        margin: 0.5rem;
        padding: clamp(1rem, 3vw, 2rem);
    }

    .frame-corner {
        width: 25px;
        height: 25px;
    }

    .frame-corner-tl::before,
    .frame-corner-tr::before,
    .frame-corner-bl::before,
    .frame-corner-br::before {
        width: 20px;
    }

    .frame-corner-tl::after,
    .frame-corner-tr::after,
    .frame-corner-bl::after,
    .frame-corner-br::after {
        height: 20px;
    }

    .cloud {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }

    .compass-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .mirror-collage {
        flex-direction: column;
    }

    .bronze-mirror {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 480px) {
    .letter-framed {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }

    .specimen-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   HALFTONE PATTERN OVERLAY
   ============================================= */

.exhibition-room::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(
        circle,
        rgba(245, 236, 215, 0.02) 0px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* =============================================
   ROOM FADE-IN ANIMATIONS
   ============================================= */

.exhibition-room .room-content,
.exhibition-room .ornate-frame {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.exhibition-room.in-view .room-content,
.exhibition-room.in-view .ornate-frame {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure entry room is always visible initially */
#room-entry .room-content {
    opacity: 1;
    transform: translateY(0);
}
