:root {
    --museum-ink: #171614;
    --museum-paper: #e9e3d6;
    --museum-gold: #a88a55;
    --museum-header-height: 70px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

[hidden] {
    display: none !important;
}

body {
    background: #11100e;
    color: var(--museum-paper);
    font-family: Inter, Arial, sans-serif;
    overflow: hidden;
}

button,
a {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
}

.museum-skip {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 1rem;
    padding: 0.75rem 1rem;
    background: #f4efe4;
    color: #151412;
    transform: translateY(-110%);
}

.museum-skip:focus {
    transform: translateY(0);
}

.museum-header {
    position: fixed;
    z-index: 20;
    inset: 0 0 auto;
    height: var(--museum-header-height);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgb(255 255 255 / 12%);
    background: linear-gradient(180deg, rgb(10 10 9 / 88%), rgb(10 10 9 / 44%));
    backdrop-filter: blur(12px);
}

.museum-brand {
    width: 120px;
}

.museum-brand img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.museum-header > p {
    margin: 0;
    display: none;
    color: rgb(255 255 255 / 64%);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.museum-back {
    justify-self: end;
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    font-size: 0;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.museum-back span {
    color: var(--museum-gold);
    font-size: 1.4rem;
    transition: transform 180ms ease;
}

.museum-back:hover span,
.museum-back:focus-visible span {
    transform: translateX(-0.3rem);
}

.museum-shell,
.museum-viewport {
    width: 100%;
    height: 100svh;
}

.museum-viewport {
    position: relative;
    overflow: hidden;
    outline: none;
    background:
        radial-gradient(circle at 50% 42%, #6c665c 0, #2a2824 35%, #11100e 77%);
    cursor: grab;
    perspective: 900px;
    perspective-origin: 50% 50%;
    touch-action: none;
    user-select: none;
}

.museum-viewport.is-dragging {
    cursor: grabbing;
}

.museum-world {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.museum-plane,
.museum-artwork,
.museum-light,
.museum-door,
.museum-bench {
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
}

.museum-wall {
    background:
        linear-gradient(90deg, rgb(87 76 58 / 8%) 1px, transparent 1px) 0 0 / 420px 100%,
        linear-gradient(180deg, #eee9dd 0, #e6dfd1 72%, #d2c7b3 72.3%, #dad0bd 75%, #c7bba5 75.3%);
    box-shadow: inset 0 0 140px rgb(79 62 38 / 14%);
    backface-visibility: visible;
}

.museum-floor {
    background:
        linear-gradient(90deg, transparent 49%, rgb(20 13 9 / 35%) 50%, transparent 51%) 0 0 / 120px 100%,
        repeating-linear-gradient(0deg, #3b2418 0 52px, #27170f 54px 57px, #513021 59px 112px);
    box-shadow: inset 0 0 180px #130d08;
    backface-visibility: visible;
}

.museum-ceiling {
    background:
        repeating-linear-gradient(90deg, #d9d2c5 0 340px, #c4bbac 341px 345px),
        #d7d0c3;
    box-shadow: inset 0 0 120px rgb(40 32 23 / 30%);
    backface-visibility: visible;
}

.museum-back-wall {
    background:
        radial-gradient(ellipse at 50% 20%, rgb(255 248 223 / 55%), transparent 36%),
        linear-gradient(180deg, #ebe5d8, #d7cdbc);
}

.museum-back-wall::before {
    position: absolute;
    inset: 12% 24% 18%;
    border: 1px solid rgb(110 88 53 / 35%);
    content: "";
}

.museum-back-wall::after {
    position: absolute;
    top: 24%;
    left: 50%;
    width: 9rem;
    color: #6e5a3a;
    content: "MUSIC HAS NO BOUNDARIES";
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    line-height: 1.3;
    text-align: center;
    transform: translateX(-50%);
}

.museum-rail {
    background: linear-gradient(180deg, #a99476, #64533e);
    box-shadow: 0 2px 5px rgb(35 25 17 / 34%);
    backface-visibility: visible;
}

.museum-artwork {
    padding: 0;
    background: none;
    outline: none;
    backface-visibility: visible;
}

/* The painting itself is a button that opens the full-size view */
.museum-artwork-view {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    outline: none;
}

.museum-artwork-frame {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 17px;
    border: 3px solid #050505;
    background:
        linear-gradient(135deg, #292724 0, #050505 22%, #181715 48%, #020202 74%, #26231f 100%);
    box-shadow:
        0 18px 35px rgb(20 14 8 / 35%),
        0 5px 8px rgb(20 14 8 / 35%),
        inset 0 0 0 2px #34312d,
        inset 0 0 0 6px #080808;
    transition: filter 220ms ease, transform 220ms ease;
}

.museum-artwork-frame::before {
    position: absolute;
    z-index: 2;
    inset: 8px;
    border: 1px solid rgb(255 255 255 / 13%);
    box-shadow: inset 0 0 6px #000;
    content: "";
    pointer-events: none;
}

.museum-artwork img {
    display: block;
    width: 100%;
    height: 100%;
    background: #171512;
    object-fit: contain;
    box-shadow: 0 0 8px #000;
}

/* Rectangular black plaque below each painting: title + date in white,
   opens the description. Kept clear of the canvas — never overlaps it. */
.museum-artwork-emblem {
    position: absolute;
    /* All plaques share one bottom line in room space (flush), regardless of
       each painting's frame height: line = artwork centre + 255px, anchored
       at the plaque's bottom edge via translateY(-100%). */
    top: calc(50% + 255px);
    left: 50%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 132px;
    max-width: 240px;
    min-height: 46px;
    padding: 9px 18px 8px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 2px;
    background: linear-gradient(180deg, #101010 0, #050505 100%);
    box-shadow: 0 9px 20px rgb(0 0 0 / 55%);
    color: #f5f2ea;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    text-align: center;
    transform: translate(-50%, -100%);
    transition: border-color 200ms ease, filter 200ms ease;
}

/* fine inner hairline, like an engraved label edge */
.museum-artwork-emblem::before {
    position: absolute;
    inset: 3px;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 1px;
    content: "";
    pointer-events: none;
}

.museum-emblem-title {
    max-width: 200px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.2;
    text-transform: uppercase;
}

.museum-emblem-date {
    color: rgb(255 255 255 / 62%);
    font-size: 0.62rem;
    font-style: italic;
    letter-spacing: 0.16em;
}

.museum-artwork-emblem:hover,
.museum-artwork-emblem:focus-visible {
    border-color: rgb(255 255 255 / 55%);
    filter: brightness(1.25);
}

.museum-artwork-emblem:focus-visible {
    outline: 3px solid #f0d68c;
    outline-offset: 3px;
}

.museum-artwork:hover .museum-artwork-frame,
.museum-artwork-view:focus-visible .museum-artwork-frame {
    filter: brightness(1.08);
    transform: translateZ(14px);
}

.museum-artwork-view:focus-visible .museum-artwork-frame {
    outline: 3px solid #b0915b;
    outline-offset: 6px;
}

.museum-light {
    width: 120px;
    height: 18px;
    margin: -9px 0 0 -60px;
    border-radius: 50%;
    background: rgb(255 239 196 / 90%);
    box-shadow:
        0 0 24px rgb(255 229 168 / 85%),
        0 0 80px rgb(255 226 157 / 50%);
}

.museum-bench {
    width: 360px;
    height: 105px;
    margin: -52px 0 0 -180px;
    border-radius: 4px;
    background: linear-gradient(180deg, #4b3326, #241711);
    box-shadow: 0 20px 25px rgb(0 0 0 / 38%);
}

.museum-bench::before,
.museum-bench::after {
    position: absolute;
    top: 95%;
    width: 22px;
    height: 125px;
    background: #1a110d;
    content: "";
}

.museum-bench::before {
    left: 36px;
}

.museum-bench::after {
    right: 36px;
}

.museum-vignette {
    position: absolute;
    z-index: 4;
    inset: 0;
    background:
        linear-gradient(180deg, rgb(0 0 0 / 35%), transparent 16%, transparent 77%, rgb(0 0 0 / 45%)),
        radial-gradient(ellipse at center, transparent 50%, rgb(0 0 0 / 55%) 118%);
    pointer-events: none;
}

.museum-cursor {
    position: absolute;
    z-index: 6;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    display: none;
    border: 1px solid rgb(255 255 255 / 62%);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgb(0 0 0 / 12%);
    opacity: 0.5;
    transform: translate(-50%, -50%) translateZ(0);
    pointer-events: none;
}

.museum-loading,
.museum-intro,
.museum-empty {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    /* Force an own compositing layer: without it Chrome may sort the
       preserve-3d world planes ABOVE these overlays (half-hidden intro). */
    transform: translateZ(0);
}

.museum-vignette,
.museum-status,
.museum-progress {
    transform: translateZ(0);
}

.museum-loading {
    background: #11100e;
    transition: opacity 500ms ease, visibility 500ms ease;
}

.museum-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.museum-loading span {
    width: 38px;
    height: 38px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-top-color: var(--museum-gold);
    border-radius: 50%;
    animation: museum-spin 900ms linear infinite;
}

.museum-loading p {
    margin: 1.2rem 0 0;
    color: rgb(255 255 255 / 55%);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.museum-intro {
    justify-content: flex-end;
    align-items: flex-start;
    padding: 2rem 1.25rem 7.5rem;
    background: linear-gradient(0deg, rgb(11 10 9 / 94%) 0, rgb(11 10 9 / 55%) 55%, transparent);
    text-align: left;
    transition: opacity 700ms ease, visibility 700ms ease;
}

/* Uli with "The Alchemy of Light" — hero figure of the intro screen.
   Mobile: upper half, fading into the dark text area below. */
.museum-intro-figure {
    position: absolute;
    z-index: 0;
    inset: 0 0 auto;
    width: 100%;
    height: 64%;
    object-fit: cover;
    object-position: 50% 18%;
    opacity: 0.92;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 97%);
    mask-image: linear-gradient(180deg, #000 52%, transparent 97%);
}

/* Text and button stay above the figure */
.museum-intro > :not(.museum-intro-figure) {
    position: relative;
    z-index: 1;
}

/* One-line usage hint below the enter button */
.museum-intro-hint {
    margin: 1.1rem 0 0;
    color: rgb(255 255 255 / 42%);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.museum-intro.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.museum-kicker {
    margin: 0 0 1rem;
    color: #bea16a;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.21em;
    text-transform: uppercase;
}

.museum-intro h1 {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(4rem, 20vw, 6.5rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.72;
}

.museum-intro-copy {
    max-width: 22rem;
    margin: 1.5rem 0;
    color: rgb(255 255 255 / 70%);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.4;
}

.museum-intro button {
    display: inline-flex;
    gap: 3.5rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.05rem 1.6rem 1rem 1.9rem;
    border: 1px solid #6d5017;
    border-radius: 999px;
    background:
        radial-gradient(ellipse at 50% 0%, rgb(255 248 218 / 45%) 0, transparent 45%),
        linear-gradient(168deg, #eeda9c 0, #d6af59 34%, #a67a26 62%, #c39738 84%, #e6d387 100%);
    box-shadow:
        0 10px 24px rgb(0 0 0 / 55%),
        inset 0 1px 0 rgb(255 246 214 / 85%),
        inset 0 0 0 2px rgb(122 86 24 / 50%),
        inset 0 -6px 12px rgb(96 64 14 / 35%);
    color: #33240c;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-shadow: 0 1px 0 rgb(255 240 200 / 45%);
    text-transform: uppercase;
    transition: filter 180ms ease, box-shadow 180ms ease;
}

.museum-intro button:hover,
.museum-intro button:focus-visible {
    box-shadow:
        0 12px 30px rgb(0 0 0 / 60%),
        0 0 34px rgb(224 178 96 / 35%),
        inset 0 1px 0 rgb(255 246 214 / 90%),
        inset 0 0 0 2px rgb(122 86 24 / 50%),
        inset 0 -6px 12px rgb(96 64 14 / 35%);
    filter: brightness(1.1);
}

.museum-intro button:focus-visible {
    outline: 3px solid #f0d68c;
    outline-offset: 3px;
}

.museum-intro button span {
    color: #5a3f10;
    font-size: 1.1rem;
}

.museum-status {
    position: absolute;
    z-index: 7;
    right: 1rem;
    bottom: 1.8rem;
    display: block;
    gap: 1.5rem;
    align-items: baseline;
    text-align: right;
    pointer-events: none;
}

.museum-status p {
    margin: 0;
    margin-bottom: 0.25rem;
    color: rgb(255 255 255 / 62%);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.museum-status > span {
    color: rgb(255 255 255 / 48%);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
}

.museum-status strong {
    color: #fff;
    font-size: 2rem;
    font-weight: 400;
}

.museum-progress {
    position: absolute;
    z-index: 7;
    right: 1rem;
    bottom: 1.1rem;
    width: 120px;
    height: 1px;
    overflow: hidden;
    background: rgb(255 255 255 / 20%);
}

.museum-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: #b89961;
    transform: scaleX(0);
    transform-origin: left;
}

.museum-controls {
    position: fixed;
    z-index: 8;
    bottom: 1.4rem;
    left: 2rem;
    display: none;
    gap: 1.5rem;
    align-items: center;
    color: rgb(255 255 255 / 48%);
    pointer-events: none;
}

.museum-controls > div {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.museum-controls p {
    margin: 0 0 0 0.3rem;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.control-key {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 27%);
    font-size: 0.58rem;
}

.control-mouse {
    width: 16px;
    height: 23px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 8px;
}

.control-mouse::before {
    display: block;
    width: 1px;
    height: 6px;
    margin: 3px auto 0;
    background: rgb(255 255 255 / 55%);
    content: "";
}

.museum-touch-controls {
    position: fixed;
    z-index: 10;
    bottom: 1.2rem;
    left: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(2, 48px);
    gap: 6px;
}

.museum-touch-controls button {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgb(255 255 255 / 22%);
    background: rgb(12 11 9 / 58%);
    color: #fff;
    backdrop-filter: blur(8px);
}

.museum-touch-controls button[data-move="forward"] {
    grid-column: 2;
}

.museum-touch-controls button[data-move="left"] {
    grid-row: 2;
    grid-column: 1;
}

.museum-touch-controls button[data-move="backward"] {
    grid-row: 2;
    grid-column: 2;
}

.museum-touch-controls button[data-move="right"] {
    grid-row: 2;
    grid-column: 3;
}

.museum-empty {
    background: rgb(17 16 14 / 92%);
}

.museum-empty h2 {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
}

.museum-empty p:last-child {
    color: rgb(255 255 255 / 62%);
}

.museum-empty code {
    color: #d2b67e;
}

.art-dialog {
    position: fixed;
    z-index: 100;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100svh;
    max-height: none;
    margin: 0;
    padding: 3.5rem 1rem 1.5rem;
    border: 0;
    background:
        radial-gradient(ellipse at center, rgb(45 34 22 / 97%) 0, rgb(12 10 8 / 98%) 50%, #030302 100%);
    color: #fff;
    overflow: hidden;
}

.art-dialog:not([hidden]) {
    display: grid;
    place-items: center;
}

.museum-page.is-dialog-open .museum-header,
.museum-page.is-dialog-open .museum-shell {
    visibility: hidden;
}

.art-dialog figure {
    position: relative;
    z-index: 2;
    display: grid;
    width: min(92vw, 1180px);
    height: min(86vh, 850px);
    margin: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1.3rem;
    place-self: center;
}

.art-dialog-frame {
    position: relative;
    z-index: 2;
    align-self: center;
    justify-self: center;
    display: grid;
    max-width: 100%;
    max-height: 100%;
    padding: clamp(18px, 2.3vw, 34px);
    border: 7px solid #050403;
    outline: 2px solid #8d6938;
    outline-offset: 3px;
    background:
        linear-gradient(122deg, #625746 0, #0a0806 13%, #3a3026 31%, #020201 53%, #4b3c2d 78%, #070503 100%);
    box-shadow:
        0 34px 70px rgb(0 0 0 / 80%),
        0 8px 18px #000,
        0 0 54px rgb(218 151 63 / 25%),
        inset 0 0 0 3px #776044,
        inset 0 0 0 11px #090807;
}

.art-dialog-frame::before {
    position: absolute;
    z-index: 2;
    inset: 11px;
    border: 3px ridge #9f7841;
    box-shadow:
        inset 0 0 8px #000,
        0 0 5px rgb(184 126 53 / 16%);
    content: "";
    pointer-events: none;
}

.art-dialog-frame::after {
    position: absolute;
    inset: 4px;
    border: 1px solid rgb(255 232 190 / 24%);
    content: "";
    pointer-events: none;
}

.art-dialog img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(88vh - 190px);
    margin: auto;
    background: #080706;
    object-fit: contain;
    box-shadow: 0 0 12px #000;
}

/* Caption as a small golden cartouche — echoes the wall emblems.
   It is a button: clicking it opens the written description. */
.art-dialog figcaption {
    position: relative;
    z-index: 3;
    justify-self: center;
    text-align: center;
}

.art-caption-btn {
    padding: 0.65rem 1.9rem;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 2px;
    background: linear-gradient(180deg, #101010 0, #050505 100%);
    box-shadow: 0 8px 18px rgb(0 0 0 / 60%);
    color: #f5f2ea;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-align: center;
    transition: border-color 200ms ease, filter 200ms ease;
}

.art-caption-btn:hover:not(:disabled),
.art-caption-btn:focus-visible {
    border-color: rgb(255 255 255 / 55%);
    filter: brightness(1.25);
}

.art-caption-btn:focus-visible {
    outline: 3px solid #f0d68c;
    outline-offset: 3px;
}

.art-caption-btn:disabled {
    cursor: default;
}

.art-dialog-close {
    position: absolute;
    z-index: 5;
    top: 0.8rem;
    right: 0.8rem;
    width: 44px;
    height: 44px;
    border: 1px solid #98713c;
    background: #15110d;
    color: #d6b77d;
    cursor: pointer;
    font-size: 1.8rem;
}

/* ---- Description panel (opened via the golden emblem) ---- */
.art-dialog-info {
    position: relative;
    z-index: 2;
    width: min(92vw, 640px);
    max-height: calc(100svh - 7rem);
    overflow-y: auto;
    padding: 2rem 1.4rem 1.8rem;
    border: 1px solid #8d6938;
    border-radius: 3px;
    background: linear-gradient(180deg, #1c1610 0, #141009 100%);
    box-shadow:
        0 30px 60px rgb(0 0 0 / 75%),
        0 0 40px rgb(218 151 63 / 15%),
        inset 0 0 0 1px rgb(240 214 140 / 12%);
    color: #e4d9c2;
    outline: none;
}

.art-dialog-info:focus-visible {
    outline: 3px solid #b0915b;
    outline-offset: 3px;
}

.art-dialog-info header {
    margin-bottom: 1.3rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgb(176 145 91 / 35%);
    text-align: center;
}

/* Clickable thumbnail — leads to the full-size view */
.art-info-thumb {
    display: block;
    margin: 0 auto 1.1rem;
    max-width: min(240px, 70%);
    padding: 7px;
    border: 2px solid #050403;
    outline: 1px solid #8d6938;
    outline-offset: 2px;
    background: linear-gradient(122deg, #3f362b 0, #0a0806 30%, #2c241c 60%, #070503 100%);
    box-shadow:
        0 10px 24px rgb(0 0 0 / 65%),
        0 0 18px rgb(218 151 63 / 14%),
        inset 0 0 0 2px #2a251e;
    cursor: zoom-in;
    transition: filter 200ms ease, transform 200ms ease;
}

.art-info-thumb img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 0 8px #000;
}

.art-info-thumb:hover,
.art-info-thumb:focus-visible {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.art-info-thumb:focus-visible {
    outline: 3px solid #b0915b;
    outline-offset: 3px;
}

.art-dialog-info h2 {
    margin: 0 0 0.35rem;
    color: #e8c987;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.15;
}

.art-info-date {
    margin: 0 0 0.3rem;
    color: #b08d52;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    letter-spacing: 0.2em;
}

.art-info-medium {
    margin: 0;
    color: rgb(228 217 194 / 55%);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.art-info-text p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.75;
}

.art-info-text p:last-child {
    margin-bottom: 0;
}

.museum-noscript {
    position: fixed;
    z-index: 100;
    inset: auto 1rem 1rem;
    padding: 1rem;
    background: #fff;
    color: #111;
    text-align: center;
}

/* Chiaroscuro gallery: aged European materials with monumental sci-fi structure. */
.museum-page {
    --museum-ink: #100c09;
    --museum-paper: #e3d4b9;
    --museum-gold: #b58a45;
    background: #080706;
}

.museum-header {
    border-bottom-color: rgb(188 137 64 / 23%);
    background:
        linear-gradient(90deg, transparent, rgb(181 134 65 / 7%) 50%, transparent),
        linear-gradient(180deg, rgb(7 6 5 / 95%), rgb(14 11 8 / 76%));
}

.museum-viewport {
    background: radial-gradient(circle at 50% 42%, #5f4930 0, #241b13 40%, #0a0806 82%);
}

.museum-plane,
.museum-pilaster,
.museum-ceiling-beam {
    transform-style: preserve-3d;
}

.museum-wall {
    background:
        /* picture rail near the ceiling */
        linear-gradient(180deg, transparent 0 7.5%, rgb(199 148 66 / 30%) 7.6% 7.9%, transparent 8%),
        radial-gradient(ellipse at 18% 27%, rgb(197 141 67 / 12%) 0 2%, transparent 8%),
        radial-gradient(ellipse at 72% 58%, rgb(0 0 0 / 28%) 0 3%, transparent 11%),
        radial-gradient(ellipse at 41% 78%, rgb(126 72 39 / 18%) 0 2%, transparent 9%),
        /* faint damask sheen */
        repeating-linear-gradient(83deg, transparent 0 92px, rgb(232 194 132 / 3%) 94px 96px, transparent 98px 183px),
        /* aubergine-umber wall over a darker panelled wainscot */
        linear-gradient(180deg, #5b4536 0, #43322a 40%, #37281f 54%, #2b1e18 72%, #16100c 72.4%, #362720 75%, #150e0a 75.4%);
    box-shadow:
        inset 0 0 190px rgb(0 0 0 / 62%),
        inset 0 0 42px rgb(197 142 68 / 16%);
}

.museum-wall::before {
    position: absolute;
    inset: 0;
    background:
        repeating-radial-gradient(ellipse at 20% 30%, transparent 0 24px, rgb(0 0 0 / 4%) 25px 27px, transparent 28px 61px),
        linear-gradient(102deg, transparent 0 46%, rgb(255 222 163 / 3%) 48%, transparent 50%);
    content: "";
    opacity: 0.42;
}

.museum-wall-left {
    background-position: 0 0, 21% 9%, 57% 4%, 0 0, 0 0;
}

.museum-wall-right {
    background-position: 33% 4%, 66% 12%, 17% 3%, 0 0, 0 0;
}

/* Herringbone parquet in dark chestnut with a warm sheen */
.museum-floor {
    background:
        radial-gradient(ellipse at 50% 38%, rgb(214 148 66 / 12%), transparent 55%),
        repeating-linear-gradient(45deg,
            #2e1b12 0 12px, #241510 12px 14px,
            #382215 14px 26px, #1d110c 26px 28px) 0 0 / 112px 112px,
        repeating-linear-gradient(-45deg,
            transparent 0 12px, rgb(0 0 0 / 22%) 12px 14px,
            transparent 14px 26px, rgb(255 190 110 / 4%) 26px 28px) 0 0 / 112px 112px,
        #241510;
    box-shadow:
        inset 0 0 260px #050403,
        inset 0 0 70px rgb(124 64 27 / 32%);
}

/* Burgundy salon runner with a double gold border */
.museum-floor-runner {
    border-right: 3px double rgb(199 148 66 / 55%);
    border-left: 3px double rgb(199 148 66 / 55%);
    background:
        linear-gradient(90deg, rgb(0 0 0 / 45%) 0, transparent 9%, transparent 91%, rgb(0 0 0 / 45%) 100%),
        linear-gradient(90deg, transparent 0 5%, rgb(199 148 66 / 22%) 5.2% 5.6%, transparent 5.8% 94.2%, rgb(199 148 66 / 22%) 94.4% 94.8%, transparent 95%),
        repeating-linear-gradient(0deg, #3a0f12 0 118px, #4c161a 120px 124px, #2c0b0e 126px 236px),
        #360e11;
    box-shadow:
        inset 26px 0 32px rgb(0 0 0 / 56%),
        inset -26px 0 32px rgb(0 0 0 / 56%),
        0 0 28px rgb(0 0 0 / 55%);
    backface-visibility: visible;
}

/* Coffered bronze ceiling — recessed panels between the beams */
.museum-ceiling {
    background:
        linear-gradient(90deg, transparent 49.7%, rgb(180 129 59 / 15%) 50%, transparent 50.3%),
        repeating-linear-gradient(90deg,
            rgb(255 214 150 / 5%) 0 2px, transparent 2px 16px,
            #17191a 16px 320px, #060707 322px 338px),
        repeating-linear-gradient(0deg,
            transparent 0 14px, rgb(0 0 0 / 55%) 14px 18px,
            transparent 18px 360px, rgb(255 214 150 / 4%) 360px 362px),
        #0e0f10;
    box-shadow:
        inset 0 0 190px #000,
        inset 0 -35px 90px rgb(125 76 30 / 18%);
}

.museum-back-wall {
    background:
        radial-gradient(ellipse at 50% 39%, rgb(221 161 75 / 22%), transparent 28%),
        linear-gradient(90deg, #171412 0 23%, #4b3b2d 23.2% 24%, #211a15 24.2% 76%, #4b3b2d 76.2% 77%, #171412 77.2%),
        linear-gradient(180deg, #3e342b, #18120e);
}

.museum-back-wall::before {
    inset: 10% 31% 8%;
    border: 2px solid rgb(181 130 58 / 34%);
    border-radius: 48% 48% 3% 3% / 15% 15% 3% 3%;
    background:
        linear-gradient(90deg, transparent, rgb(204 144 61 / 8%) 50%, transparent),
        #0c0b0a;
    box-shadow:
        0 0 55px rgb(0 0 0 / 80%),
        inset 0 0 55px #000,
        inset 0 0 0 12px #171717,
        inset 0 0 0 14px rgb(189 135 60 / 22%);
}

.museum-back-wall::after {
    color: #b88b4d;
    font-size: 1.3rem;
    text-shadow: 0 0 18px rgb(213 148 63 / 42%);
}

.museum-entrance-wall {
    background:
        radial-gradient(ellipse at 50% 42%, rgb(185 124 50 / 18%), transparent 28%),
        linear-gradient(90deg, #171412 0 29%, #4b3b2d 29.2% 30%, #211a15 30.2% 70%, #4b3b2d 70.2% 71%, #171412 71.2%),
        linear-gradient(180deg, #4a3b2f, #1a130f);
}

.museum-entrance-wall::before {
    inset: 9% 34% 5%;
    border: 2px solid rgb(181 130 58 / 30%);
    border-radius: 48% 48% 2% 2% / 13% 13% 2% 2%;
    background:
        linear-gradient(90deg, transparent, rgb(204 144 61 / 8%) 50%, transparent),
        #0b0a09;
    box-shadow:
        0 0 55px rgb(0 0 0 / 82%),
        inset 0 0 55px #000,
        inset 0 0 0 12px #171717,
        inset 0 0 0 14px rgb(189 135 60 / 20%);
    content: "";
    opacity: 1;
}

.museum-entrance-wall::after {
    position: absolute;
    top: 23%;
    left: 50%;
    width: 12rem;
    color: #b88b4d;
    content: "THE ULIVERSE";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    letter-spacing: 0.24em;
    line-height: 1.3;
    text-align: center;
    text-shadow: 0 0 18px rgb(213 148 63 / 38%);
    transform: translateX(-50%);
}

.museum-rail {
    background:
        linear-gradient(90deg, #161616, #8b6739 48%, #1a1815),
        #2a2119;
    box-shadow:
        0 3px 8px #000,
        0 0 12px rgb(173 116 46 / 18%);
}

.museum-pilaster {
    background:
        linear-gradient(90deg, #090909 0, #32302c 20%, #121314 50%, #3b3329 82%, #080808),
        #151515;
    box-shadow:
        0 0 18px rgb(0 0 0 / 80%),
        inset 0 0 0 2px rgb(177 127 59 / 16%),
        inset 0 0 25px #000;
    backface-visibility: visible;
}

.museum-pilaster::before {
    position: absolute;
    inset: 3% 22%;
    border: 1px solid rgb(190 139 66 / 18%);
    background: linear-gradient(180deg, rgb(188 132 58 / 8%), transparent 22%, transparent 78%, rgb(188 132 58 / 8%));
    content: "";
}

.museum-ceiling-beam {
    border-top: 1px solid rgb(186 134 62 / 20%);
    border-bottom: 1px solid #050505;
    background: linear-gradient(180deg, #282827, #090a0a 60%, #1e1b17);
    box-shadow:
        0 12px 28px rgb(0 0 0 / 75%),
        inset 0 1px rgb(255 224 164 / 7%);
    backface-visibility: visible;
}

.museum-artwork-frame {
    padding: 19px;
    border: 4px solid #030303;
    background: linear-gradient(118deg, #39342d 0, #060606 13%, #221e19 31%, #020202 51%, #302a22 77%, #050505 100%);
    box-shadow:
        0 24px 42px rgb(0 0 0 / 72%),
        0 6px 10px #000,
        0 0 34px rgb(197 132 50 / 13%),
        inset 0 0 0 2px #4b4032,
        inset 0 0 0 7px #070707;
    backface-visibility: hidden;
}

.museum-artwork-frame::before {
    border-color: rgb(195 147 81 / 22%);
}

.museum-artwork img {
    background: #0d0b09;
    backface-visibility: hidden;
    filter: none;
}

/* Dark-theme: soft neutral lift so the black plaque reads on dark walls */
.museum-artwork-emblem {
    box-shadow:
        0 8px 20px rgb(0 0 0 / 70%),
        0 0 18px rgb(255 255 255 / 5%);
}

.museum-light {
    width: 124px;
    height: 12px;
    margin: -6px 0 0 -62px;
    border: 1px solid rgb(226 202 159 / 30%);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgb(255 244 214 / 90%), rgb(184 147 91 / 78%) 46%, rgb(43 34 24 / 96%));
    box-shadow:
        0 0 16px rgb(255 229 177 / 54%),
        0 0 54px rgb(221 180 112 / 31%),
        0 0 110px rgb(181 129 68 / 15%);
    /* NOTE: no idle animation here — a permanent filter animation on all 26
       lamps forced constant repaints of the huge 3D layers and caused
       visible flicker in Chrome on some GPUs. Lamps are static now. */
}

.museum-light::before {
    position: absolute;
    z-index: -1;
    top: 7px;
    left: 50%;
    width: 350px;
    height: 440px;
    background:
        radial-gradient(ellipse at 50% 12%, rgb(255 244 216 / 25%), rgb(226 204 167 / 11%) 37%, rgb(181 149 105 / 4%) 61%, transparent 78%);
    content: "";
    filter: blur(16px);
    opacity: 0.62;
    pointer-events: none;
    transform: translateX(-50%);
}

.museum-light::after {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 150px;
    height: 22px;
    border: 1px solid rgb(170 140 94 / 36%);
    border-radius: 50% 50% 28% 28%;
    background:
        linear-gradient(90deg, #0a0908, #514533 18%, #171512 37%, #756246 50%, #171512 63%, #514533 82%, #0a0908);
    box-shadow:
        0 4px 7px rgb(0 0 0 / 68%),
        inset 0 1px rgb(255 239 207 / 22%);
    content: "";
    pointer-events: none;
    transform: translateX(-50%);
}

/* Leather-topped salon bench with gold piping */
.museum-bench {
    border: 1px solid rgb(165 113 53 / 32%);
    border-radius: 4px;
    background:
        radial-gradient(ellipse at 50% 14%, rgb(214 148 66 / 12%), transparent 58%),
        repeating-linear-gradient(90deg, transparent 0 86px, rgb(0 0 0 / 35%) 88px 90px, transparent 92px),
        linear-gradient(180deg, #46301d 0 55%, #191009 58%, #241a12);
    box-shadow:
        0 28px 38px rgb(0 0 0 / 70%),
        inset 0 1px 0 rgb(224 178 112 / 25%),
        inset 0 -10px 18px rgb(0 0 0 / 55%);
}

.museum-bench::before,
.museum-bench::after {
    background: linear-gradient(90deg, #080808, #292724, #080808);
}

.museum-vignette {
    background:
        linear-gradient(180deg, rgb(0 0 0 / 44%), transparent 20%, transparent 75%, rgb(0 0 0 / 55%)),
        radial-gradient(ellipse at center, transparent 47%, rgb(0 0 0 / 58%) 120%),
        radial-gradient(ellipse at 50% 12%, rgb(204 176 128 / 4%), transparent 46%);
    overflow: hidden;
}

.museum-vignette::before,
.museum-vignette::after {
    position: absolute;
    inset: -20%;
    background-image:
        radial-gradient(circle, rgb(255 237 201 / 30%) 0 0.7px, transparent 1.25px),
        radial-gradient(circle, rgb(220 193 150 / 18%) 0 0.7px, transparent 1.3px);
    background-position: 0 0, 43px 67px;
    background-size: 118px 118px, 173px 173px;
    content: "";
    filter: blur(0.5px);
    mix-blend-mode: screen;
    opacity: 0.055;
    pointer-events: none;
}

.museum-vignette::before {
    animation: museum-dust-drift 42s linear infinite;
}

.museum-vignette::after {
    background-size: 211px 211px, 287px 287px;
    filter: blur(0.8px);
    opacity: 0.025;
    animation: museum-dust-drift-reverse 58s linear infinite;
}

.museum-intro {
    background: linear-gradient(0deg, rgb(11 10 9 / 94%) 0, rgb(11 10 9 / 55%) 55%, transparent);
}

@keyframes museum-spin {
    to {
        transform: rotate(360deg);
    }
}


@keyframes museum-dust-drift {
    to {
        transform: translate3d(70px, -100px, 0);
    }
}

@keyframes museum-dust-drift-reverse {
    to {
        transform: translate3d(-90px, -60px, 0);
    }
}

@media (min-width: 768px) {
    :root {
        --museum-header-height: 82px;
    }

    .museum-header {
        grid-template-columns: 1fr auto 1fr;
        padding: 0 2rem;
    }

    .museum-header > p {
        display: block;
    }

    .museum-brand {
        width: 148px;
    }

    .museum-back {
        font-size: 0.72rem;
    }

    .museum-back span {
        font-size: 1.15rem;
    }

    .museum-intro {
        justify-content: center;
        padding: 2rem;
        padding-left: clamp(2rem, 10vw, 10rem);
        background:
            linear-gradient(90deg, rgb(8 6 5 / 97%) 0, rgb(15 10 7 / 82%) 38%, transparent 72%),
            linear-gradient(0deg, rgb(0 0 0 / 52%), transparent);
    }

    /* Desktop: the figure fills the right half, blending into the dark left */
    .museum-intro-figure {
        inset: 0 0 0 auto;
        width: min(60%, 940px);
        height: 100%;
        object-position: 50% 20%;
        opacity: 0.96;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%);
        mask-image: linear-gradient(90deg, transparent 0, #000 34%);
    }

    .museum-intro h1 {
        font-size: clamp(4.5rem, 10vw, 9rem);
    }

    .museum-intro-copy {
        max-width: 32rem;
        margin: 2.2rem 0 2rem;
        font-size: clamp(1.2rem, 2vw, 1.65rem);
    }

    .museum-intro button {
        width: auto;
        justify-content: normal;
    }

    .museum-controls {
        display: flex;
    }

    .museum-touch-controls {
        display: none;
    }

    .museum-status {
        right: 2rem;
        bottom: 2rem;
        display: flex;
        text-align: start;
    }

    .museum-status p {
        margin-bottom: 0;
    }

    .museum-progress {
        right: 2rem;
        bottom: 1.25rem;
        width: 180px;
    }

    .museum-cursor {
        display: block;
    }

    .art-dialog {
        width: 100vw;
        height: 100vh;
        padding: clamp(3.5rem, 6vw, 5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .museum-light,
    .museum-vignette::before,
    .museum-vignette::after {
        animation: none;
    }
}

/* ============================================================
   SALON MODE — scrollable exhibition for phones and tablets.
   The CSS-3D walk is desktop-only (its giant composited planes
   crash mobile GPUs); museum.js adds .is-salon on <body> and
   builds the works into .museum-salon-list instead.
   ============================================================ */

body.is-salon {
    overflow-y: auto;
    overflow-x: hidden;
}

.is-salon .museum-shell {
    height: auto;
}

/* The viewport becomes a plain hero holding the intro */
.is-salon .museum-viewport {
    position: relative;
    height: 94svh;
    cursor: default;
    perspective: none;
    touch-action: auto;
    user-select: auto;
}

.is-salon .museum-world,
.is-salon .museum-vignette,
.is-salon .museum-cursor,
.is-salon .museum-status,
.is-salon .museum-progress,
.is-salon .museum-controls,
.is-salon .museum-touch-controls {
    display: none;
}

/* Intro stays visible as the page hero; no fade-out state is used */
.is-salon .museum-intro {
    position: absolute;
}

/* ---- The works ---- */
.museum-salon {
    padding: clamp(2.5rem, 7vw, 5rem) 1.25rem clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(ellipse at 50% 0%, rgb(95 73 48 / 30%), transparent 60%),
        linear-gradient(180deg, #211a14 0, #14100c 30%, #0b0906 100%);
}

.museum-salon-list {
    display: grid;
    width: min(100%, 30rem);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: clamp(3rem, 9vw, 4.5rem);
}

.salon-work {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.salon-view {
    width: 100%;
}

.salon-work .museum-artwork-frame img {
    display: block;
    width: 100%;
    height: auto;
    background: #0d0b09;
    box-shadow: 0 0 8px #000;
}

/* Static plaque variant for the salon — sits BELOW the frame, never
   overlapping the painting */
.museum-artwork-emblem--static {
    position: relative;
    z-index: 2;
    top: auto;
    left: auto;
    margin: 14px auto 0;
    transform: none;
}

.museum-salon-end {
    margin: clamp(3.5rem, 9vw, 5rem) 0 0;
    color: #b58a45;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 0.14em;
    text-align: center;
}

/* Tablet: still one work per row — just a little more breathing room */
@media (min-width: 768px) {
    .museum-salon-list {
        width: min(100%, 36rem);
        gap: clamp(3.5rem, 7vw, 5rem);
    }
}

/* ============================================================
   View toggle — desktop only (museum.js unhides it): lets the
   visitor switch between the 3D walk and the salon view.
   ============================================================ */
.museum-view-toggle {
    position: fixed;
    z-index: 30;
    right: 2rem;
    bottom: 6rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgb(199 148 66 / 45%);
    border-radius: 999px;
    background: rgb(10 9 7 / 80%);
    color: #d6b77d;
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    transition: border-color 180ms ease, color 180ms ease;
}

.museum-view-toggle:hover,
.museum-view-toggle:focus-visible {
    border-color: rgb(224 178 96 / 85%);
    color: #f0d68c;
}

.museum-view-toggle:focus-visible {
    outline: 3px solid #f0d68c;
    outline-offset: 3px;
}

/* Salon has no status bar bottom-right — tuck the toggle lower */
.is-salon .museum-view-toggle {
    bottom: 1.5rem;
}

/* ---- Performance hint (shown once if the 3D walk runs too slowly) ---- */
.museum-perf-hint {
    position: fixed;
    z-index: 40;
    bottom: 1.5rem;
    left: 50%;
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 0.7rem 0.8rem 0.7rem 1.2rem;
    border: 1px solid rgb(199 148 66 / 55%);
    border-radius: 999px;
    background: rgb(10 9 7 / 92%);
    box-shadow: 0 12px 30px rgb(0 0 0 / 60%);
    color: rgb(255 255 255 / 78%);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
}

.museum-perf-hint-switch {
    padding: 0.45rem 0.9rem;
    border: 1px solid rgb(199 148 66 / 60%);
    border-radius: 999px;
    background: transparent;
    color: #e8c987;
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background 180ms ease, color 180ms ease;
}

.museum-perf-hint-switch:hover,
.museum-perf-hint-switch:focus-visible {
    background: #d6b06a;
    color: #171106;
}

.museum-perf-hint-dismiss {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgb(255 255 255 / 55%);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.museum-perf-hint-dismiss:hover,
.museum-perf-hint-dismiss:focus-visible {
    color: #fff;
}
