/* ===========================================
   Project Stargate Prototype v1.0 — Foundation
   The Digital Archives — explorable hub
   Palette: Obsidian Black, Midnight Blue,
   Ancient Parchment, Deep Amethyst, Aged Gold
   Accents: Deep Ruby, Emerald Moss,
   Moonlight Silver
=============================================== */

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

body {
    background:
        radial-gradient(circle at top,
            #2d2144 0%,
            #161220 35%,
            #090910 100%);

    color: #f7e6b3;

    font-family: "Palatino Linotype", Palatino, "Book Antiqua",
                 Georgia, "Times New Roman", serif;

    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow-x: hidden;
}

/* =============== THE CORRIDOR =============== */
/* Ancient stone. Glowing runes. Soft lantern
   light. Shadows. Silence. Almost nothing else. */

#corridor {
    position: fixed;
    inset: 0;
    z-index: 3;
    background: #000000;
    overflow: hidden;
    transition: opacity 3.5s ease;
}

#corridor.fading {
    opacity: 0;
    pointer-events: none;
}

.corridor-walls {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 44%,
            rgba(60, 48, 72, .22) 0%,
            rgba(28, 22, 36, .12) 34%,
            rgba(0, 0, 0, 0) 62%),
        linear-gradient(to right,
            rgba(24, 19, 30, .95) 0%,
            rgba(24, 19, 30, 0) 30%,
            rgba(24, 19, 30, 0) 70%,
            rgba(24, 19, 30, .95) 100%),
        linear-gradient(to top,
            rgba(20, 16, 24, .9) 0%,
            rgba(20, 16, 24, 0) 40%);
    opacity: 0;
    transition: opacity 5s ease;
}

#corridor.walls-visible .corridor-walls {
    opacity: 1;
}

.corridor-lantern {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 44%,
        rgba(255, 205, 115, .85) 0%,
        rgba(255, 190, 100, .28) 3%,
        rgba(255, 175, 90, .10) 9%,
        rgba(0, 0, 0, 0) 24%);
    opacity: 0;
    transform: scale(.25);
    transform-origin: 50% 44%;
    transition: opacity 4.5s ease, transform 9s ease;
}

#corridor.lantern-lit .corridor-lantern {
    opacity: 1;
    transform: scale(1);
}

.corridor-runes {
    position: absolute;
    inset: 0;
}

.floor-rune {
    position: absolute;
    transform: translateX(-50%);
    color: #b98fe8;
    text-shadow:
        0 0 8px rgba(150, 100, 220, .9),
        0 0 22px rgba(130, 80, 200, .55),
        0 0 40px rgba(200, 170, 120, .18);
    opacity: 0;
    transition: opacity 2.2s ease;
}

.floor-rune.lit {
    opacity: var(--rune-brightness, .8);
}

#corridorCaption {
    position: absolute;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    text-align: center;
    font-size: 1.35rem;
    line-height: 2;
    letter-spacing: .03em;
    color: #e9dcb6;
    opacity: 0;
    transition: opacity 2s ease;
}

#corridorCaption.visible {
    opacity: 1;
}

#corridorCaption.footsteps {
    font-style: italic;
    font-size: 1.1rem;
    color: #b8a87f;
    letter-spacing: .12em;
}

#corridorHint {
    position: absolute;
    bottom: 26px;
    right: 34px;
    font-size: .85rem;
    font-style: italic;
    color: rgba(233, 220, 182, .35);
}

/* =============== THE NIGHT SKY =============== */

.sky,
.dust {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.star {
    position: absolute;
    background: #fff8e1;
    border-radius: 50%;
    opacity: 0;
    animation:
        starAppear 6s ease forwards,
        twinkle 7s ease-in-out infinite;
}

@keyframes starAppear {
    to { opacity: var(--star-brightness, .5); }
}

@keyframes twinkle {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.6); }
}

/* =============== DRIFTING DUST =============== */

.mote {
    position: absolute;
    background: radial-gradient(circle,
        rgba(255, 230, 170, .85) 0%,
        rgba(255, 230, 170, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    animation: drift linear infinite;
}

@keyframes drift {
    0%   { transform: translate(0, 0);            opacity: 0; }
    10%  {                                        opacity: .55; }
    90%  {                                        opacity: .35; }
    100% { transform: translate(var(--drift-x, 40px), -110vh); opacity: 0; }
}

/* =============== THE ENTRANCE =============== */

main {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 40px;
    animation: fadeIn 3.5s ease;
}

.lantern-wrap {
    position: relative;
    display: inline-block;
    animation: floating 7s ease-in-out infinite;
}

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

.lantern-glow {
    position: absolute;
    inset: -12%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 210, 120, .30) 0%,
        rgba(255, 190, 100, .12) 45%,
        rgba(255, 190, 100, 0) 72%);
    animation: glowPulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: .65; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}

.runewick {
    position: relative;
    width: 420px;
    max-width: 90%;
    margin-bottom: 30px;
    /* The glow follows Runewick himself, not a frame. */
    filter: drop-shadow(0 0 22px rgba(255, 215, 120, .3));
}

/* =============== TYPOGRAPHY =============== */

h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: normal;
    letter-spacing: .06em;
    color: #f3d47d;
    margin-bottom: 22px;
    text-shadow:
        0 0 10px rgba(255, 220, 120, .45),
        0 0 25px rgba(255, 220, 120, .25);
}

.welcome {
    font-size: 1.5rem;
    font-style: italic;
    letter-spacing: .04em;
    margin-bottom: 20px;
    color: #fff5d6;
}

.quote {
    font-size: 1.2rem;
    line-height: 2;
    letter-spacing: .02em;
    color: #d7c79f;
    margin-bottom: 44px;
}

/* =============== BUTTONS =============== */
/* Elegant plaques. Never flashy.          */

button {
    background: linear-gradient(#7a5c20, #5a4315);
    color: #fdf3d7;
    border: 2px solid #d2a84b;
    padding: 15px 44px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    letter-spacing: .08em;
    cursor: pointer;
    transition: box-shadow 1.2s ease, background 1.2s ease, color 1.2s ease;
}

button:hover,
button:focus-visible {
    background: linear-gradient(#8d6b28, #6b511c);
    box-shadow: 0 0 28px rgba(255, 210, 110, .45);
}

/* =============== THE ARCHIVE PLAQUE =============== */
/* An engraved brass plaque, mounted beneath
   Runewick's lantern. It has hung here for
   centuries. It happens to open the Archives.

   Not modern UI. An artifact that functions
   as navigation.                                  */

.plaque-wrap {
    position: relative;
    display: inline-block;
}

.archive-plaque {
    position: relative;

    /* Undo the plaque-button inheritance; this is metal. */
    border: none;
    border-radius: 10px 13px 9px 12px / 12px 9px 13px 10px;  /* softly worn, imperfect corners */

    padding: 16px 46px 15px;

    cursor: pointer;

    font-family: inherit;

    /* ----- Antique brushed brass ----- */
    background:
        /* warm lantern reflection falling from above */
        radial-gradient(ellipse at 32% -10%,
            rgba(255, 200, 115, .32) 0%,
            rgba(0, 0, 0, 0) 55%),
        /* age darkening the corners unevenly */
        radial-gradient(ellipse at 8% 100%,
            rgba(45, 30, 8, .4) 0%, rgba(0, 0, 0, 0) 40%),
        radial-gradient(ellipse at 96% 6%,
            rgba(45, 30, 8, .3) 0%, rgba(0, 0, 0, 0) 35%),
        /* fine brushed grain */
        repeating-linear-gradient(92deg,
            rgba(255, 244, 200, .05) 0 1px,
            rgba(0, 0, 0, 0) 1px 3px),
        /* the brass itself */
        linear-gradient(163deg,
            #8f6f30 0%, #b3903f 28%, #86672a 52%,
            #a8873c 74%, #6f5522 100%);

    /* ----- Depth: bevel and weight ----- */
    box-shadow:
        inset 0 2px 2px rgba(255, 240, 190, .55),   /* light catching the top bevel  */
        inset 0 -3px 5px rgba(50, 33, 8, .65),      /* shadow under the lower bevel  */
        inset 2px 0 3px rgba(255, 240, 190, .18),
        inset -2px 0 4px rgba(50, 33, 8, .35),
        0 7px 20px rgba(0, 0, 0, .55),              /* weight against the stone wall */
        0 1px 3px rgba(0, 0, 0, .6);

    transition: transform 1s ease, filter 1.2s ease, box-shadow 1s ease;
}

/* ----- Approaching the plaque ----- */

.archive-plaque:hover,
.archive-plaque:focus-visible {
    background:
        radial-gradient(ellipse at 32% -10%,
            rgba(255, 200, 115, .32) 0%,
            rgba(0, 0, 0, 0) 55%),
        radial-gradient(ellipse at 8% 100%,
            rgba(45, 30, 8, .4) 0%, rgba(0, 0, 0, 0) 40%),
        radial-gradient(ellipse at 96% 6%,
            rgba(45, 30, 8, .3) 0%, rgba(0, 0, 0, 0) 35%),
        repeating-linear-gradient(92deg,
            rgba(255, 244, 200, .05) 0 1px,
            rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(163deg,
            #8f6f30 0%, #b3903f 28%, #86672a 52%,
            #a8873c 74%, #6f5522 100%);

    filter: brightness(1.09);
    transform: translateY(-4px);
    outline: none;

    box-shadow:
        inset 0 2px 2px rgba(255, 240, 190, .55),
        inset 0 -3px 5px rgba(50, 33, 8, .65),
        inset 2px 0 3px rgba(255, 240, 190, .18),
        inset -2px 0 4px rgba(50, 33, 8, .35),
        0 11px 26px rgba(0, 0, 0, .5),
        0 0 24px rgba(255, 205, 115, .22);
}

/* ----- Pressing the plaque ----- */
/* It gives way slowly, like a heavy
   mechanism accepting its key.      */

.archive-plaque:active {
    transition-duration: .18s;
    transform: translateY(0);
    filter: brightness(1.04);
    box-shadow:
        inset 0 3px 7px rgba(50, 33, 8, .7),        /* pressed into the wall */
        inset 0 -1px 2px rgba(255, 240, 190, .3),
        0 3px 10px rgba(0, 0, 0, .55);
}

/* ----- The engraved border groove ----- */

.plaque-frame {
    position: absolute;
    inset: 6px;
    border-radius: 7px 9px 6px 8px;
    border: 1px solid rgba(62, 44, 12, .9);
    box-shadow:
        0 1px 0 rgba(255, 238, 185, .3),            /* light on the groove's lower lip */
        inset 0 1px 0 rgba(255, 238, 185, .12);
    pointer-events: none;
}

/* The golden pulse that travels the border on click. */

.archive-plaque.plaque-clicked .plaque-frame {
    animation: framePulse 1.8s ease-out 1;
}

@keyframes framePulse {
    0%   { box-shadow: 0 1px 0 rgba(255, 238, 185, .3),
                       0 0 0 rgba(255, 214, 130, 0); }
    30%  { box-shadow: 0 1px 0 rgba(255, 238, 185, .3),
                       0 0 18px rgba(255, 214, 130, .8),
                       inset 0 0 12px rgba(255, 214, 130, .5); }
    100% { box-shadow: 0 1px 0 rgba(255, 238, 185, .3),
                       0 0 0 rgba(255, 214, 130, 0); }
}

/* ----- Filigree corners ----- */
/* Carved by a patient hand.    */

.plaque-corner {
    position: absolute;
    font-size: .68rem;
    color: rgba(62, 44, 12, .85);
    text-shadow: 0 1px 0 rgba(255, 238, 185, .3);
    pointer-events: none;
}

.plaque-corner.tl { top: 5px;    left: 10px;  }
.plaque-corner.tr { top: 5px;    right: 10px; transform: scaleX(-1); }
.plaque-corner.bl { bottom: 5px; left: 10px;  transform: scaleY(-1); }
.plaque-corner.br { bottom: 5px; right: 10px; transform: scale(-1); }

/* ----- The carved runes ----- */

.plaque-runes {
    display: block;
    font-size: .5rem;
    line-height: 1;
    letter-spacing: .6em;
    text-indent: .6em;      /* balances the letter-spacing */
    color: rgba(62, 44, 12, .8);
    text-shadow: 0 1px 0 rgba(255, 238, 185, .28);
    pointer-events: none;
}

.plaque-runes.top    { margin-bottom: 7px; }
.plaque-runes.bottom { margin-top: 7px; }

.plaque-runes i {
    font-style: normal;
    transition: color 1.1s ease, text-shadow 1.1s ease;
    transition-delay: calc(var(--ri) * .09s);   /* they wake one after another */

    /* Idle: once in a long while, a rune remembers it is magic. */
    animation: runeShimmer 13s ease-in-out infinite;
    animation-delay: calc(var(--ri) * 1.9s);
}

@keyframes runeShimmer {
    0%, 96%, 100% { color: rgba(62, 44, 12, .8);   text-shadow: 0 1px 0 rgba(255, 238, 185, .28); }
    98%           { color: rgba(255, 223, 154, .95); text-shadow: 0 0 7px rgba(255, 214, 130, .8); }
}

.archive-plaque:hover .plaque-runes i,
.archive-plaque:focus-visible .plaque-runes i {
    color: rgba(255, 223, 154, .95);
    text-shadow: 0 0 7px rgba(255, 214, 130, .8);
    animation: none;
}

/* ----- The inscription ----- */
/* Cut into the metal, not printed on it. */

.plaque-text {
    display: block;
    font-size: 1.18rem;
    font-variant: small-caps;
    letter-spacing: .14em;

    color: #45320f;

    /* engraving: shadow above the cut, light below it */
    text-shadow:
        0 -1px 1px rgba(30, 20, 5, .85),
        0 1px 0 rgba(255, 240, 190, .5);

    pointer-events: none;
}

/* ----- Centuries of light on the metal ----- */

.plaque-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;

    background: linear-gradient(115deg,
        rgba(0, 0, 0, 0) 32%,
        rgba(255, 246, 214, .1) 45%,
        rgba(255, 250, 226, .18) 50%,
        rgba(255, 246, 214, .1) 55%,
        rgba(0, 0, 0, 0) 68%);
    background-size: 320% 100%;

    animation: sheenDrift 16s ease-in-out infinite alternate;

    pointer-events: none;
}

@keyframes sheenDrift {
    from { background-position: 0% 0; }
    to   { background-position: 100% 0; }
}

/* Click: light sweeps the brass once, quickly. */

.archive-plaque.plaque-clicked .plaque-sheen {
    animation: sheenSweep 1.4s ease-out 1;
}

@keyframes sheenSweep {
    from { background-position: 0% 0; }
    to   { background-position: 100% 0; }
}

/* ----- Dust in the lantern light ----- */

.plaque-dust {
    position: absolute;
    inset: -46px -30px -20px;
    overflow: hidden;
    pointer-events: none;
}

.plaque-mote {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 230, 170, .8) 0%,
        rgba(255, 230, 170, 0) 70%);
    opacity: 0;
    animation: plaqueDrift linear infinite;
}

@keyframes plaqueDrift {
    0%   { transform: translateY(0);     opacity: 0; }
    15%  {                               opacity: .5; }
    85%  {                               opacity: .3; }
    100% { transform: translateY(-58px); opacity: 0; }
}

/* ----- The lantern answers the Traveler ----- */
/* Approaching the plaque brightens Runewick's
   lantern; accepting the invitation makes it
   flare, once.                                 */

#entrance.plaque-near .lantern-glow {
    filter: brightness(1.4);
    transition: filter 1.4s ease;
}

#entrance.lantern-flare .lantern-glow {
    animation: lanternFlare 1.6s ease-out 1;
}

@keyframes lanternFlare {
    0%   { filter: brightness(1); }
    22%  { filter: brightness(2); }
    100% { filter: brightness(1); }
}

/* =============== THE GRAND ATRIUM =============== */
/* The heart of the Archives. Every Wing begins
   here. Every Traveler returns here.             */

#atrium {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    padding: 60px 30px 80px;
    text-align: center;
    animation: fadeIn 3.5s ease;
}

.atrium-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: normal;
    letter-spacing: .1em;
    color: #f3d47d;
    text-shadow:
        0 0 10px rgba(255, 220, 120, .4),
        0 0 25px rgba(255, 220, 120, .2);
}

.atrium-motto {
    margin-top: 10px;
    font-style: italic;
    letter-spacing: .05em;
    color: #b8a87f;
}

/* Runewick, near the central staircase. */

.atrium-runewick {
    position: relative;
    margin: 38px auto 14px;
    max-width: 320px;
    animation: floating 8s ease-in-out infinite;
}

.atrium-runewick-glow {
    position: absolute;
    inset: -14%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 210, 120, .25) 0%,
        rgba(255, 190, 100, .10) 45%,
        rgba(255, 190, 100, 0) 72%);
    animation: glowPulse 6s ease-in-out infinite;
    pointer-events: none;
}

.atrium-runewick-img {
    position: relative;
    width: 230px;
    max-width: 70%;
    /* The glow follows Runewick himself, not a frame. */
    filter: drop-shadow(0 0 18px rgba(255, 215, 120, .28));
}

.atrium-greeting {
    margin-top: 16px;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #f3d47d;
    opacity: .9;
}

/* ---------- The Wings ---------- */
/* Doorways into real places. Environmental
   storytelling, not UI. Each Wing interior is
   painted with CSS light and shadow only —
   no images, nothing heavy.

   "I am walking toward a doorway."           */

.wings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 40px 28px;
    margin: 48px auto 0;
    max-width: 1150px;
}

/* The whole doorway is one quiet, walkable
   destination. No plaque-button styling.    */

.wing-door {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    cursor: pointer;

    display: block;
    text-align: center;

    transition: transform 1.2s ease;
}

.wing-door:hover,
.wing-door:focus-visible {
    background: none;
    box-shadow: none;
    outline: none;
    transform: translateY(-7px);
}

/* ----- The stone arch itself ----- */

.doorway {
    position: relative;
    display: block;
    height: 252px;

    /* Chiselled stone frame around the opening. */
    padding: 11px 11px 0;
    border-radius: 120px 120px 6px 6px;

    background: linear-gradient(#3b3348, #221d2d 70%, #191521);

    box-shadow:
        inset 0 1px 0 rgba(190, 175, 215, .18),   /* moonlit top edge  */
        inset 0 -6px 12px rgba(0, 0, 0, .5),      /* worn lower stone  */
        0 10px 28px rgba(0, 0, 0, .45);           /* weight on the floor */
}

/* The opening. Everything inside is the room beyond. */

.door-interior {
    position: absolute;
    inset: 11px 11px 0;
    border-radius: 110px 110px 4px 4px;
    overflow: hidden;

    background: #0a0812;

    perspective: 520px;

    transition: filter 1.4s ease;
}

/* Stepping closer: the light inside answers. */

.wing-door:hover .door-interior,
.wing-door:focus-visible .door-interior {
    filter: brightness(1.22);
}

/* Two paintable layers for each Wing scene. */

.scene,
.scene-extra {
    position: absolute;
    inset: 0;
}

/* ----- Heavy carved wooden doors -----
   Present only on Wings that keep their doors.
   They rest slightly ajar — warm light spills
   through — and open a fraction more as the
   Traveler approaches.                        */

.door-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 51%;
    z-index: 4;

    background:
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, .28) 0 2px,
            rgba(0, 0, 0, 0) 2px 15px),
        linear-gradient(90deg, #4a3120, #5d3f27 45%, #38251633);

    background-color: #46301f;

    box-shadow: inset 0 0 26px rgba(0, 0, 0, .55);

    transition: transform 2s ease;
}

.door-panel.left {
    left: 0;
    transform-origin: left center;
    transform: rotateY(calc(-1 * var(--ajar, 8deg)));
    border-right: 2px solid #171009;
}

.door-panel.right {
    right: 0;
    transform-origin: right center;
    transform: rotateY(var(--ajar, 8deg));
}

/* Iron door rings. */

.door-panel::after {
    content: "";
    position: absolute;
    top: 52%;
    width: 9px;
    height: 9px;
    border: 2px solid #1d1610;
    border-radius: 50%;
}

.door-panel.left::after  { right: 8px; }
.door-panel.right::after { left: 8px; }

/* The doors open a fraction. Never fully. */

.wing-door:hover .door-panel.left,
.wing-door:focus-visible .door-panel.left {
    transform: rotateY(calc(-3 * var(--ajar, 8deg)));
}

.wing-door:hover .door-panel.right,
.wing-door:focus-visible .door-panel.right {
    transform: rotateY(calc(3 * var(--ajar, 8deg)));
}

/* ----- Carved keystone rune ----- */
/* Cut into the stone above each doorway.
   It remembers its Wing, and brightens
   when a Traveler draws near.           */

.keystone-rune {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;

    font-size: .95rem;
    color: rgba(160, 140, 190, .4);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .8);

    transition: color 1.4s ease, text-shadow 1.4s ease;
}

.wing-door:hover .keystone-rune,
.wing-door:focus-visible .keystone-rune {
    color: rgba(230, 210, 255, .95);
    text-shadow: 0 0 12px var(--wing-halo, rgba(210, 168, 75, .5));
}

/* ----- The lantern beside each doorway ----- */
/* It burns low... until someone approaches.   */

.door-lantern {
    position: absolute;
    right: -5px;
    top: 42%;
    z-index: 5;

    width: 10px;
    height: 10px;
    border-radius: 50%;

    background: radial-gradient(circle,
        #ffd98f 0%, rgba(255, 190, 100, 0) 70%);

    box-shadow: 0 0 10px 3px rgba(255, 190, 100, .35);

    animation: lanternFlicker 4.5s ease-in-out infinite;

    transition: box-shadow 1.4s ease;
}

@keyframes lanternFlicker {
    0%, 100% { opacity: .75; }
    42%      { opacity: 1; }
    58%      { opacity: .82; }
}

.wing-door:hover .door-lantern,
.wing-door:focus-visible .door-lantern {
    box-shadow: 0 0 20px 7px rgba(255, 200, 110, .6);
}

/* ----- Tiny particles on approach ----- */
/* Dust, sparks, fireflies — spawned by
   script.js when a Traveler draws near.  */

.door-particles {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

.door-spark {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: sparkRise 2.2s ease-out forwards;
}

@keyframes sparkRise {
    0%   { opacity: 0;   transform: translateY(0); }
    25%  { opacity: .85; }
    100% { opacity: 0;   transform: translateY(-52px); }
}

/* ----- Carved name beneath the arch ----- */
/* Engraved in stone, not printed on a card. */

.door-name {
    display: block;
    margin-top: 15px;

    font-size: 1.05rem;
    letter-spacing: .14em;

    color: #cfc1a2;
    text-shadow:
        0 -1px 1px rgba(0, 0, 0, .9),
        0 1px 1px rgba(255, 240, 200, .12);

    transition: color 1.4s ease;
}

.wing-door:hover .door-name,
.wing-door:focus-visible .door-name {
    color: #f0e2ba;
}

.door-whisper {
    display: block;
    margin-top: 6px;
    font-size: .82rem;
    font-style: italic;
    line-height: 1.6;
    color: #857a62;
}

/* ==================================================
   THE SIX WINGS — each interior its own place
   ================================================== */

/* ----- LIBRARY WING -----
   Warm light spilling from bookshelves.
   Old wood. Ancient knowledge.          */

.wing-library .scene {
    background:
        /* warm light spilling outward */
        radial-gradient(ellipse at 50% 60%,
            rgba(255, 198, 110, .5) 0%,
            rgba(140, 90, 35, .2) 45%,
            rgba(0, 0, 0, 0) 78%),
        /* shelf boards */
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0 40px,
            #201107 40px 47px),
        /* book spines, shoulder to shoulder */
        repeating-linear-gradient(90deg,
            #4a2c17 0 5px,  #6b3c1e 5px 9px,
            #8a5a26 9px 12px, #703549 12px 16px,
            #3c2413 16px 21px, #5d4a1f 21px 25px),
        linear-gradient(#2a190c, #170d06);
}

.wing-library .scene-extra {
    /* the faintest haze of drifting dust */
    background: radial-gradient(circle at 46% 38%,
        rgba(255, 224, 150, .14) 0%,
        rgba(0, 0, 0, 0) 55%);
}

/* ----- STARGATE WING -----
   Cosmic light. Moving stars.
   Slow portal energy.          */

.wing-stargate .scene {
    background:
        /* pinprick stars, tiled */
        radial-gradient(1px 1px at 22% 28%, rgba(255,255,255,.7), rgba(0,0,0,0) 100%),
        radial-gradient(1px 1px at 68% 60%, rgba(255,255,255,.5), rgba(0,0,0,0) 100%),
        radial-gradient(1px 1px at 45% 82%, rgba(255,255,255,.6), rgba(0,0,0,0) 100%),
        /* deep portal heart */
        radial-gradient(circle at 50% 46%,
            rgba(190, 150, 255, .4) 0%,
            rgba(90, 55, 150, .3) 24%,
            rgba(20, 14, 40, .95) 62%),
        #0b0918;
    background-size:
        90px 90px, 70px 70px, 110px 110px, auto, auto;
}

.wing-stargate .scene-extra {
    /* slow portal energy, turning for centuries */
    inset: 10%;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        rgba(0, 0, 0, 0) 0deg,
        rgba(170, 120, 255, .45) 80deg,
        rgba(0, 0, 0, 0) 165deg,
        rgba(120, 160, 255, .3) 250deg,
        rgba(0, 0, 0, 0) 340deg);
    filter: blur(7px);
    animation: portalSpin 48s linear infinite;
}

@keyframes portalSpin {
    to { transform: rotate(360deg); }
}

/* ----- RELICS WING -----
   Stone. Glass displays. Ancient keys.
   Museum atmosphere.                    */

.wing-relics .scene {
    background:
        /* pale shafts of display light from above */
        linear-gradient(103deg,
            rgba(0, 0, 0, 0) 30%,
            rgba(220, 225, 240, .08) 36%,
            rgba(0, 0, 0, 0) 44%,
            rgba(220, 225, 240, .06) 58%,
            rgba(0, 0, 0, 0) 66%),
        /* stone block joints */
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0 34px,
            rgba(15, 13, 18, .8) 34px 36px),
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0 46px,
            rgba(15, 13, 18, .55) 46px 48px),
        linear-gradient(#3a3641, #211e28);
}

/* A single relic on its pedestal: an ancient key. */

.wing-relics .scene-extra::before {
    content: "";
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 44px;
    background: linear-gradient(#4c4854, #2b2731);
    box-shadow: 0 -1px 0 rgba(220, 220, 235, .25);
}

.wing-relics .scene-extra::after {
    content: "🗝";
    position: absolute;
    bottom: 41%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(195, 74, 90, .8));
    animation: relicFloat 7s ease-in-out infinite;
}

@keyframes relicFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -7px); }
}

/* ----- GAMES WING -----
   Creative workshop. Blueprints.
   Screens. Living inventions.    */

.wing-games .scene {
    background:
        /* blueprint grid on the far wall */
        repeating-linear-gradient(0deg,
            rgba(90, 190, 140, .09) 0 1px,
            rgba(0, 0, 0, 0) 1px 17px),
        repeating-linear-gradient(90deg,
            rgba(90, 190, 140, .09) 0 1px,
            rgba(0, 0, 0, 0) 1px 17px),
        linear-gradient(#0d1913, #070f0a);
}

/* The workbench, and whatever is being built on it. */

.wing-games .scene::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(#1e1811, #0d0a06);
    border-top: 2px solid #3a2f1c;
}

/* A screen still glowing. Someone was just here. */

.wing-games .scene-extra::after {
    content: "";
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 34px;
    border: 2px solid #26543c;
    border-radius: 3px;
    background: linear-gradient(#144631, #0a2418);
    box-shadow: 0 0 16px rgba(78, 200, 140, .5);
    animation: screenBreath 7s ease-in-out infinite;
}

@keyframes screenBreath {
    0%, 100% { box-shadow: 0 0 12px rgba(78, 200, 140, .35); }
    50%      { box-shadow: 0 0 22px rgba(78, 200, 140, .6); }
}

/* ----- HIDDEN GARDENS -----
   Moonlight. Trees. Water.
   Lanterns. Peace.           */

.wing-gardens .scene {
    background:
        /* the moon, high and quiet */
        radial-gradient(circle at 70% 15%,
            rgba(225, 232, 246, .9) 0px,
            rgba(225, 232, 246, .85) 6px,
            rgba(190, 205, 230, .25) 13px,
            rgba(0, 0, 0, 0) 34px),
        /* foliage leaning in from both sides */
        radial-gradient(ellipse at 0% 32%,
            rgba(28, 56, 36, .95) 0%,
            rgba(0, 0, 0, 0) 52%),
        radial-gradient(ellipse at 100% 48%,
            rgba(24, 48, 32, .95) 0%,
            rgba(0, 0, 0, 0) 48%),
        /* still water at the path's end */
        linear-gradient(to top,
            rgba(52, 84, 110, .55) 0%,
            rgba(30, 50, 70, .25) 16%,
            rgba(0, 0, 0, 0) 30%),
        linear-gradient(#111a28, #0a101b);
}

/* Moonlight breathing on the water. */

.wing-gardens .scene-extra {
    top: auto;
    height: 22%;
    background: repeating-linear-gradient(90deg,
        rgba(0, 0, 0, 0) 0 9px,
        rgba(210, 225, 245, .12) 9px 12px);
    animation: waterShimmer 12s ease-in-out infinite alternate;
}

@keyframes waterShimmer {
    from { opacity: .35; background-position-x: 0; }
    to   { opacity: .7;  background-position-x: 26px; }
}

/* ----- RUNEWICK'S STUDY -----
   Warm fireplace. Stacks of books.
   Notes. Ink. Quills.               */

.wing-study .scene {
    background:
        /* firelight from a hearth just out of view */
        radial-gradient(ellipse at 50% 92%,
            rgba(255, 145, 60, .6) 0%,
            rgba(190, 85, 30, .28) 32%,
            rgba(0, 0, 0, 0) 64%),
        linear-gradient(#2b1a10, #150c06);
    animation: fireBreath 5.5s ease-in-out infinite;
}

@keyframes fireBreath {
    0%, 100% { filter: brightness(1); }
    30%      { filter: brightness(1.12); }
    60%      { filter: brightness(.96); }
}

/* Stacks of well-loved books either side of the hearth. */

.wing-study .scene-extra::before,
.wing-study .scene-extra::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 24px;
    height: 34px;
    background: repeating-linear-gradient(0deg,
        #5a3a22 0 6px, #7c5a2c 6px 11px, #6b3549 11px 17px);
    box-shadow: 0 -1px 0 rgba(255, 200, 130, .18);
}

.wing-study .scene-extra::before { left: 13%; }
.wing-study .scene-extra::after  { right: 13%; height: 26px; }

.atrium-footer {
    margin-top: 54px;
    font-style: italic;
    font-size: .95rem;
    color: rgba(233, 220, 182, .45);
}

/* ---------- A hidden detail ---------- */
/* Careful observers are rewarded.       */

#hiddenCandle {
    position: fixed;
    left: 22px;
    bottom: 18px;

    background: none;
    border: none;
    padding: 6px;

    font-size: 1.1rem;
    opacity: .18;
    cursor: pointer;

    transition: opacity 2s ease;
}

#hiddenCandle:hover,
#hiddenCandle:focus-visible {
    background: none;
    box-shadow: none;
    opacity: .7;
}

#hiddenNote {
    position: fixed;
    left: 26px;
    bottom: 64px;
    z-index: 4;

    max-width: 300px;
    padding: 20px 24px;

    background: linear-gradient(#efe3c0, #e2d2a8);
    border-radius: 4px 14px 4px 14px;
    box-shadow: 0 6px 26px rgba(0, 0, 0, .55);

    text-align: left;

    animation: fadeIn 1.5s ease;
}

.hidden-note-text {
    font-style: italic;
    font-size: .95rem;
    line-height: 1.8;
    color: #3a3020;
}

.hidden-note-sign {
    margin-top: 10px;
    text-align: right;
    font-style: italic;
    color: #6b5a38;
}

/* =============== A WING ROOM =============== */
/* One room, redressed for whichever Wing the
   Traveler chooses to enter.                  */

#wingRoom {
    position: fixed;
    inset: 0;
    z-index: 2;

    overflow-y: auto;

    background: #0a0810;
}

.room-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%,
        var(--wing-glow, rgba(210, 168, 75, .18)) 0%,
        rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

.room-inner {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 70px 30px 90px;
    text-align: center;
    animation: fadeIn 2.5s ease;
}

.room-emblem {
    font-size: 3.4rem;
    filter: drop-shadow(0 0 14px var(--wing-halo, rgba(210, 168, 75, .4)));
}

.room-title {
    margin-top: 18px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: normal;
    letter-spacing: .09em;
    color: #f3d47d;
    text-shadow: 0 0 14px rgba(255, 220, 120, .3);
}

.room-whisper {
    margin-top: 10px;
    font-style: italic;
    color: #b8a87f;
    letter-spacing: .04em;
}

.room-desc {
    margin: 34px auto 0;
    max-width: 640px;
    font-size: 1.12rem;
    line-height: 2.1;
    color: #e0d3ab;
}

/* Runewick's note for this Wing. */

.room-note {
    margin: 30px auto 0;
    max-width: 560px;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 2;
    color: #f3d47d;
    opacity: .85;
}

.room-note::before { content: "“"; }
.room-note::after  { content: "”"; }

/* ---------- Alcoves ---------- */
/* Placeholder shelves for future collections.
   Each will one day hold its own Records.     */

.alcoves {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin: 46px auto 50px;
    max-width: 760px;
}

.alcove {
    padding: 26px 20px;

    border: 1px solid rgba(120, 100, 140, .35);
    border-radius: 10px;

    background: linear-gradient(
        rgba(22, 17, 30, .85),
        rgba(14, 11, 20, .9));

    transition: border-color 1s ease, box-shadow 1s ease;
}

.alcove:hover {
    border-color: var(--wing-halo, rgba(210, 168, 75, .45));
    box-shadow: 0 0 18px rgba(0, 0, 0, .4);
}

.alcove-name {
    font-size: 1.02rem;
    letter-spacing: .05em;
    color: #e9dcb6;
}

.alcove-state {
    margin-top: 10px;
    font-size: .82rem;
    font-style: italic;
    line-height: 1.6;
    color: #756a52;
}

/* ==================================================
   THE NEW WINGS — v0.7 interiors
   ================================================== */

/* ----- THE SCRIPTORIUM -----
   Candlelit desks. Carefully copied pages.
   Everything here may be carried home.      */

.wing-scriptorium .scene {
    background:
        radial-gradient(ellipse at 50% 68%,
            rgba(255, 205, 125, .4) 0%,
            rgba(150, 100, 45, .18) 42%,
            rgba(0, 0, 0, 0) 74%),
        linear-gradient(#241709, #120b05);
}

/* A stack of copied scrolls, waiting to be taken. */

.wing-scriptorium .scene-extra::before {
    content: "";
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 30px;
    border-radius: 4px;
    background: repeating-linear-gradient(0deg,
        #d9c396 0 5px, #b89f6f 5px 9px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}

/* An inkwell keeping the scrolls company. */

.wing-scriptorium .scene-extra::after {
    content: "";
    position: absolute;
    bottom: 12%;
    left: 68%;
    width: 11px;
    height: 13px;
    border-radius: 2px 2px 4px 4px;
    background: linear-gradient(#2c2438, #17121f);
    box-shadow: 0 0 6px rgba(120, 90, 200, .35);
}

/* ----- CHARACTER RECORDS -----
   A quiet gallery of portraits.  */

.wing-characters .scene {
    background:
        /* gallery spotlights from above */
        linear-gradient(100deg,
            rgba(0, 0, 0, 0) 24%,
            rgba(255, 225, 180, .08) 30%,
            rgba(0, 0, 0, 0) 38%,
            rgba(0, 0, 0, 0) 58%,
            rgba(255, 225, 180, .08) 64%,
            rgba(0, 0, 0, 0) 72%),
        linear-gradient(#231a18, #120d0c);
}

/* Two portraits. One ancient. One a new arrival. */

.wing-characters .scene-extra::before,
.wing-characters .scene-extra::after {
    content: "";
    position: absolute;
    top: 30%;
    width: 28px;
    height: 36px;
    border: 2px solid #8a6a2e;
    background: radial-gradient(circle at 50% 42%,
        rgba(240, 205, 160, .4) 0%,
        rgba(80, 55, 40, .9) 68%);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .55);
}

.wing-characters .scene-extra::before { left: 22%; }
.wing-characters .scene-extra::after  { right: 22%; top: 36%; }

/* ----- HIDDEN RECORDS -----
   Most of this Wing has not agreed
   to be seen yet.                   */

.wing-hidden .scene {
    background: linear-gradient(#0b0a10, #060509);
}

/* The faintest outline of a door that
   is not quite there.                 */

.wing-hidden .scene-extra::before {
    content: "";
    position: absolute;
    bottom: 16%;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 86px;
    border: 1px solid rgba(150, 140, 190, .13);
    border-radius: 22px 22px 0 0;
}

/* A keyhole, glowing very faintly. */

.wing-hidden .scene-extra::after {
    content: "";
    position: absolute;
    bottom: 42%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(155, 130, 220, .5);
    box-shadow: 0 0 8px rgba(155, 130, 220, .6);
}

/* Approaching reveals a little more than most doors do. */

.wing-door.wing-hidden:hover .door-interior,
.wing-door.wing-hidden:focus-visible .door-interior {
    filter: brightness(1.9);
}

/* ----- ARCHIVE KEY REGISTRY -----
   Ledgers, seals, and every Key ever forged. */

.wing-registry .scene {
    background:
        radial-gradient(circle at 50% 46%,
            rgba(210, 168, 75, .28) 0%,
            rgba(120, 90, 35, .12) 34%,
            rgba(0, 0, 0, 0) 66%),
        linear-gradient(#1d1610, #0e0a06);
}

/* The great Registry sigil, turning as slowly
   as the centuries it has recorded.           */

.wing-registry .scene-extra::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    border: 2px dashed rgba(210, 168, 75, .55);
    border-radius: 50%;
    box-shadow:
        0 0 16px rgba(210, 168, 75, .3),
        inset 0 0 14px rgba(210, 168, 75, .2);
    animation: portalSpin 90s linear infinite;
}

.wing-registry .scene-extra::after {
    content: "ᛟ";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(240, 205, 130, .9);
    text-shadow: 0 0 12px rgba(255, 214, 130, .8);
}

/* =============== WING LORE =============== */
/* Deeper writing, for Wings that carry it. */

.room-lore {
    margin: 34px auto 0;
    max-width: 620px;
    padding: 26px 30px;

    font-size: 1.02rem;
    line-height: 2.1;
    text-align: left;
    color: #d6c8a0;

    border-left: 2px solid rgba(210, 168, 75, .4);
    background: linear-gradient(
        rgba(22, 17, 30, .6),
        rgba(14, 11, 20, .7));
}

/* =============== THE RECORDS SHELF =============== */
/* Records preserved in a Wing. Ledger slips and
   bound artifacts — not product cards.            */

.records-heading {
    margin-top: 46px;
    font-size: .9rem;
    font-style: italic;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #8f8268;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin: 22px auto 0;
    max-width: 760px;
}

.record-card {
    /* An artifact tag, not a plaque-button. */
    background: linear-gradient(#1c1626, #120e1b);
    border: 1px solid rgba(120, 100, 140, .35);
    border-radius: 6px 10px 6px 10px;
    padding: 20px 16px;

    font-family: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;

    transition: border-color 1s ease, transform 1s ease, box-shadow 1s ease;
}

.record-card:hover,
.record-card:focus-visible {
    background: linear-gradient(#221b2e, #151020);
    border-color: var(--wing-halo, rgba(210, 168, 75, .5));
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
    transform: translateY(-4px);
    outline: none;
}

/* A miniature preserved volume: leather, a
   blind-tooled frame, and the Archive's mark. */

.record-card-cover {
    position: relative;
    display: block;
    width: 58px;
    height: 76px;
    margin: 0 auto 14px;

    border-radius: 2px 6px 6px 2px;
    border-left: 5px solid rgba(0, 0, 0, .35);

    background:
        radial-gradient(ellipse at 100% 100%,
            rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, 0) 40%),
        linear-gradient(110deg, #43301f, #2a1c11 70%, #221610);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, .5),
        inset 0 0 12px rgba(0, 0, 0, .45);
}

.record-card-cover .mini-frame {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(0, 0, 0, .55);
    box-shadow: 0 0 0 1px rgba(255, 224, 150, .12);
    border-radius: 1px 3px 3px 1px;
}

.record-card-cover .mini-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: .95rem;
    color: #e8c987;
    text-shadow:
        0 -1px 1px rgba(0, 0, 0, .9),
        0 0 6px rgba(255, 214, 130, .25);
}

.record-card-title {
    display: block;
    font-size: .98rem;
    letter-spacing: .04em;
    line-height: 1.6;
    color: #e9dcb6;
}

.record-card-meta {
    display: block;
    margin-top: 8px;
    font-size: .76rem;
    font-style: italic;
    letter-spacing: .06em;
    color: #756a52;
}

/* =============== A RECORD PAGE =============== */
/* The permanent home of one preserved artifact. */

#recordPage {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow-y: auto;
    background: #0a0810;
}

.record-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 70px 30px 90px;
    text-align: center;
    animation: fadeIn 2.5s ease;
}

.record-id {
    font-size: .85rem;
    font-style: italic;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: #8f8268;
}

.record-title {
    margin-top: 14px;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: normal;
    letter-spacing: .07em;
    color: #f3d47d;
    text-shadow: 0 0 14px rgba(255, 220, 120, .3);
}

.record-meta {
    margin-top: 10px;
    font-style: italic;
    color: #b8a87f;
}

/* ----- The preserved volume ----- */
/* Not an icon container: the Record's own cover,
   bound in leather, blind-tooled, the title
   embossed in gold. When real artwork arrives
   (record.cover), it fills this same frame.      */

.record-cover {
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 196px;
    height: 264px;
    margin: 38px auto 0;
    padding: 30px 22px;

    border-radius: 4px 10px 10px 4px;

    /* the spine edge, then aged leather:
       worn corners, mottling, the grain */
    border-left: 9px solid rgba(0, 0, 0, .35);

    background:
        radial-gradient(ellipse at 0% 0%,
            rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, 0) 30%),
        radial-gradient(ellipse at 100% 100%,
            rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 32%),
        radial-gradient(ellipse at 65% 30%,
            rgba(255, 235, 190, .06) 0%, rgba(0, 0, 0, 0) 50%),
        repeating-linear-gradient(115deg,
            rgba(0, 0, 0, .05) 0 3px, rgba(0, 0, 0, 0) 3px 7px),
        linear-gradient(110deg, #43301f, #2a1c11 70%, #221610);

    box-shadow:
        0 14px 36px rgba(0, 0, 0, .6),
        inset 0 0 34px rgba(0, 0, 0, .45),
        inset 2px 0 3px rgba(255, 235, 190, .08);
}

/* the blind-tooled double frame pressed into the leather */

.cover-frame {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(0, 0, 0, .55);
    box-shadow:
        0 0 0 1px rgba(255, 224, 150, .14),
        inset 0 0 0 3px rgba(0, 0, 0, 0),
        inset 0 0 0 4px rgba(255, 224, 150, .08);
    border-radius: 2px 6px 6px 2px;
    pointer-events: none;
}

/* the title, embossed in gold leaf */

.cover-title {
    position: relative;
    max-width: 100%;

    font-size: 1.02rem;
    font-variant: small-caps;
    letter-spacing: .1em;
    line-height: 1.7;
    text-align: center;

    color: #e8c987;
    text-shadow:
        0 -1px 1px rgba(0, 0, 0, .9),      /* the press of the stamp */
        0 1px 1px rgba(255, 240, 200, .15),
        0 0 8px rgba(255, 214, 130, .18);  /* gilt catching the light */
}

/* a tooled rule beneath the title */

.cover-rule {
    width: 58px;
    height: 1px;
    margin: 16px 0 14px;
    background: linear-gradient(90deg,
        rgba(232, 195, 120, 0),
        rgba(232, 195, 120, .6),
        rgba(232, 195, 120, 0));
}

/* a small gilt centrepiece below the rule:
   the Archive's own mark, tooled in gold  */

.cover-emblem {
    font-size: 1.5rem;
    color: #e8c987;
    text-shadow:
        0 -1px 1px rgba(0, 0, 0, .9),
        0 1px 1px rgba(255, 240, 200, .15),
        0 0 10px rgba(255, 214, 130, .25);
}

/* when real cover artwork exists, it fills the frame */

.record-cover.has-art {
    padding: 0;
    background-size: cover;
    background-position: center;
}

.record-desc {
    margin: 36px auto 0;
    max-width: 560px;
    font-size: 1.1rem;
    line-height: 2.1;
    color: #e0d3ab;
}

/* ----- The Archive Key binding site ----- */
/* The sigil that will one day tie this
   Record to its physical creation.        */

.record-key {
    margin-top: 48px;
}

.key-sigil {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 0 auto;

    border: 2px dashed rgba(210, 168, 75, .5);
    border-radius: 50%;

    box-shadow:
        0 0 18px rgba(210, 168, 75, .25),
        inset 0 0 16px rgba(210, 168, 75, .15);

    animation: portalSpin 90s linear infinite;
}

.key-sigil span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-size: 1.7rem;
    color: rgba(240, 205, 130, .9);
    text-shadow: 0 0 12px rgba(255, 214, 130, .7);

    /* the glyph holds still while its ring turns */
    animation: portalSpin 90s linear infinite reverse;
}

.key-caption {
    margin-top: 16px;
    font-size: .85rem;
    font-style: italic;
    color: #756a52;
}

.record-related {
    margin: 46px 0 40px;
}

.related-link {
    display: inline-block;
    margin: 10px 8px 0;

    background: none;
    border: none;
    border-bottom: 1px solid rgba(210, 168, 75, .4);
    border-radius: 0;
    padding: 4px 2px;

    font-family: inherit;
    font-size: 1rem;
    font-style: italic;
    letter-spacing: .04em;
    color: #e0c98a;

    cursor: pointer;

    transition: color 1s ease, border-color 1s ease;
}

.related-link:hover,
.related-link:focus-visible {
    background: none;
    box-shadow: none;
    color: #ffe9ad;
    border-bottom-color: rgba(255, 214, 130, .8);
    outline: none;
}

/* =============== THE LIBRARY WING ROOM =============== */
/* Sprint 001: the first truly explorable room.
   Designed as a place, not a page. Warm lantern
   light, towering shelf bays, ancient wood, dust
   in the air, and Records a Traveler can reach
   for. Everything painted with CSS light.        */

#libraryWing {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow-y: auto;

    /* old wood and stone, warmest at the floor */
    background:
        linear-gradient(to bottom,
            #050308 0%,
            #140c08 30%,
            #1e1209 62%,
            #241608 100%);
}

/* The ceiling disappears upward into darkness. */

.library-ceiling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, .92), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 1;
}

/* The warm pool of lantern light over the hall. */

.library-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 58%,
        rgba(255, 196, 110, .16) 0%,
        rgba(160, 105, 45, .07) 40%,
        rgba(0, 0, 0, 0) 72%);
    pointer-events: none;
}

.library-dust {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ----- Lanterns on their chains ----- */

.library-lanterns {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.hall-lantern {
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;

    background: radial-gradient(circle,
        #ffdf9a 0%, rgba(255, 190, 100, 0) 70%);

    box-shadow: 0 0 18px 6px rgba(255, 195, 105, .4);

    /* the lantern hangs at the end of its chain */
    transform: translateY(64px);

    animation: lanternFlicker 5s ease-in-out infinite;
}

/* the chain itself */

.hall-lantern::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0), rgba(120, 100, 80, .5));
}

/* ----- The hall ----- */

.library-inner {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 30px 90px;
    text-align: center;
}

.library-kicker {
    font-size: .8rem;
    font-style: italic;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: #8f8268;
}

.library-title {
    margin-top: 12px;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: normal;
    letter-spacing: .12em;
    color: #f3d47d;
    text-shadow:
        0 0 12px rgba(255, 220, 120, .4),
        0 0 30px rgba(255, 220, 120, .18);
}

.library-whisper {
    margin-top: 10px;
    font-style: italic;
    letter-spacing: .05em;
    color: #b8a87f;
}

.library-note {
    margin: 26px auto 0;
    max-width: 480px;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 2;
    color: #e0c98a;
    opacity: .9;
}

.library-footer {
    margin-top: 52px;
    margin-bottom: 36px;
    font-size: .92rem;
    font-style: italic;
    line-height: 2;
    color: rgba(233, 220, 182, .45);
}

/* ----- The shelf bays ----- */
/* Towering wooden units, warm light caught
   between the boards, books shoulder to
   shoulder. Built from LIBRARY_SHELVES.     */

.shelf-hall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 34px 28px;
    margin-top: 54px;
    text-align: left;
}

.shelf-bay {
    position: relative;

    padding: 18px 18px 0;

    /* old wood, planed by hand */
    background:
        radial-gradient(ellipse at 50% 0%,
            rgba(255, 200, 120, .07) 0%, rgba(0, 0, 0, 0) 60%),
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, .18) 0 2px, rgba(0, 0, 0, 0) 2px 26px),
        linear-gradient(#241408, #170c05);

    border: 5px solid #1c0f06;
    border-top-width: 9px;
    border-radius: 4px;

    box-shadow:
        inset 0 0 26px rgba(0, 0, 0, .6),
        inset 0 2px 0 rgba(255, 220, 150, .06),
        0 10px 26px rgba(0, 0, 0, .5);
}

/* the small brass plate naming each bay */

.bay-plate {
    display: inline-block;
    margin-bottom: 14px;
    padding: 3px 14px;

    font-size: .72rem;
    font-variant: small-caps;
    letter-spacing: .22em;
    text-indent: .22em;

    color: #f0dfae;
    text-shadow: 0 -1px 1px rgba(30, 20, 5, .8);

    background: linear-gradient(#8a6a2e, #5d4517);
    border-radius: 3px;
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 190, .4),
        0 2px 5px rgba(0, 0, 0, .5);
}

/* the shelf board the books stand on */

.shelf-row {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex-wrap: wrap;

    min-height: 182px;
    padding: 0 8px 0;

    border-bottom: 11px solid #150a04;
    box-shadow: 0 12px 10px -8px rgba(0, 0, 0, .55);
}

/* ----- The books themselves ----- */
/* Real volumes, bound in leather centuries ago.
   Raised bands across the spine, gold tooling at
   head and tail, a pale scuff where generations
   of hands have pulled each one down. Sizes and
   leans vary per book (set inline by script.js). */

.book-spine {
    position: relative;

    width: 44px;                        /* varied per book by script.js */
    padding: 14px 0;

    border: none;
    border-radius: 3px 5px 2px 3px;

    /* a book contains its own title — nothing spills past the boards */
    overflow: hidden;

    /* leather over boards:
       1. soiling near the tail (books darken at the bottom)
       2. the pale scuff line where hands have worn it (--wear-y)
       3. mottled, aged leather blotches
       4. raised sewing bands across the spine
       5. curvature of the round spine
       6. the leather itself                                   */
    background:
        linear-gradient(to top,
            rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, 0) 22%),
        linear-gradient(0deg,
            rgba(0, 0, 0, 0) calc(var(--wear-y, 50%) - 3px),
            rgba(226, 204, 158, .10) var(--wear-y, 50%),
            rgba(0, 0, 0, 0) calc(var(--wear-y, 50%) + 3px)),
        radial-gradient(ellipse at 30% 20%,
            rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 45%),
        radial-gradient(ellipse at 70% 74%,
            rgba(255, 235, 190, .05) 0%, rgba(0, 0, 0, 0) 40%),
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0 26px,
            rgba(255, 240, 200, .13) 26px 28px,
            rgba(0, 0, 0, .3) 28px 31px),
        linear-gradient(90deg,
            rgba(0, 0, 0, .45) 0%,
            rgba(255, 240, 200, .16) 16%,
            rgba(0, 0, 0, 0) 44%,
            rgba(0, 0, 0, .12) 70%,
            rgba(0, 0, 0, .42) 100%),
        var(--spine-color, #6b3c1e);
    background-color: var(--spine-color, #6b3c1e);

    box-shadow:
        inset 0 0 8px rgba(0, 0, 0, .5),
        1px 0 3px rgba(0, 0, 0, .65);

    cursor: pointer;

    /* a book may lean gently against its neighbour */
    transform: rotate(var(--lean, 0deg));
    transform-origin: bottom center;

    transition: transform .8s ease, box-shadow .8s ease;
}

/* gold tooling at head and tail — two fine fillets */

.book-spine::before {
    content: "";
    position: absolute;
    inset: 7px 5px;
    border-top: 1px solid rgba(232, 195, 120, .55);
    border-bottom: 1px solid rgba(232, 195, 120, .4);
    pointer-events: none;
}

/* the title, tooled in gold down the spine */

.spine-title {
    display: block;

    writing-mode: vertical-rl;
    text-orientation: mixed;

    /* the title is bound to its own book: it can never be taller
       than the leather that holds it (book height, less padding).
       A long title on a short volume truncates cleanly with a
       gilded ellipsis instead of spilling past head and tail.     */
    max-height: 100%;
    max-width: 100%;
    overflow: hidden;

    margin: 0 auto;

    font-family: inherit;
    font-size: .72rem;
    font-variant: small-caps;
    letter-spacing: .1em;
    line-height: 1;
    white-space: nowrap;
    text-overflow: ellipsis;

    /* gilded lettering, catching the lantern light */
    color: #f0d894;
    text-shadow:
        0 0 2px rgba(0, 0, 0, .95),
        0 0 7px rgba(255, 214, 130, .3);
}

/* reaching for a book: it slides from the shelf,
   keeping whatever lean it has settled into      */

.book-spine:hover,
.book-spine:focus-visible {
    background:
        linear-gradient(to top,
            rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, 0) 22%),
        linear-gradient(0deg,
            rgba(0, 0, 0, 0) calc(var(--wear-y, 50%) - 3px),
            rgba(226, 204, 158, .10) var(--wear-y, 50%),
            rgba(0, 0, 0, 0) calc(var(--wear-y, 50%) + 3px)),
        radial-gradient(ellipse at 30% 20%,
            rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 45%),
        radial-gradient(ellipse at 70% 74%,
            rgba(255, 235, 190, .05) 0%, rgba(0, 0, 0, 0) 40%),
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0 26px,
            rgba(255, 240, 200, .13) 26px 28px,
            rgba(0, 0, 0, .3) 28px 31px),
        linear-gradient(90deg,
            rgba(0, 0, 0, .45) 0%,
            rgba(255, 240, 200, .16) 16%,
            rgba(0, 0, 0, 0) 44%,
            rgba(0, 0, 0, .12) 70%,
            rgba(0, 0, 0, .42) 100%),
        var(--spine-color, #6b3c1e);

    transform: translateY(-11px) rotate(var(--lean, 0deg));
    box-shadow:
        inset 0 0 8px rgba(0, 0, 0, .5),
        0 0 16px rgba(255, 205, 115, .5),
        2px 6px 10px rgba(0, 0, 0, .6);
    outline: none;
}

/* videos live in slide-cases, a little wider */

.book-spine.slide-case {
    border-radius: 4px;
}

/* the mark on a slide-case is placed by the emblem
   renderer in script.js (see EMBLEMS), so future
   Archive iconography swaps in one place only.     */

.book-spine .case-mark {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .78rem;
    opacity: .85;
    pointer-events: none;
}

/* ----- Unnamed volumes ----- */
/* The quieter books between the Records. Bound in
   the same leathers, worn by the same centuries —
   they simply have not been catalogued for
   Travelers yet. Decoration, not doors.           */

.shelf-filler {
    display: block;

    border-radius: 2px 4px 2px 2px;

    background:
        linear-gradient(to top,
            rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, 0) 24%),
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0 24px,
            rgba(255, 240, 200, .08) 24px 26px,
            rgba(0, 0, 0, .28) 26px 29px),
        linear-gradient(90deg,
            rgba(0, 0, 0, .5) 0%,
            rgba(255, 240, 200, .09) 18%,
            rgba(0, 0, 0, 0) 46%,
            rgba(0, 0, 0, .45) 100%),
        var(--spine-color, #3d2c1c);

    box-shadow:
        inset 0 0 7px rgba(0, 0, 0, .55),
        1px 0 2px rgba(0, 0, 0, .6);

    transform: rotate(var(--lean, 0deg));
    transform-origin: bottom center;

    opacity: .82;
}

/* ----- Still Being Cataloged ----- */
/* Honest shelves. The spines rest in the dark,
   unlabeled, until Runewick is ready.          */

.shelf-bay.cataloging .shelf-row {
    opacity: .45;
}

.dim-spine {
    display: block;

    border-radius: 2px 3px 1px 2px;

    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, .5) 0%,
            rgba(255, 240, 200, .05) 20%,
            rgba(0, 0, 0, .4) 100%),
        #2c1d10;

    box-shadow: inset 0 0 6px rgba(0, 0, 0, .6);
}

/* the parchment tag hanging from the bay */

.catalog-tag {
    position: absolute;
    top: 10px;
    right: 14px;

    padding: 5px 12px;

    font-size: .68rem;
    font-style: italic;
    letter-spacing: .08em;

    color: #4a3a20;

    background: linear-gradient(#efe3c0, #ddcb9e);
    border-radius: 2px 8px 2px 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .5);

    transform: rotate(3.5deg);
}

/* the string it hangs by */

.catalog-tag::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 18px;
    width: 1px;
    height: 12px;
    background: rgba(220, 200, 160, .5);
}

/* =============== SHARED =============== */
/* !important ensures .hidden always wins,
   even against ID selectors.              */

.hidden {
    display: none !important;
}

.fading-out {
    opacity: 0 !important;
    transition: opacity 2.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============== SKIP INTRO =============== */
/* A quiet, clearly visible way past the arrival. Fixed in the
   corner so it is always reachable; a comfortable tap target on
   touch; keyboard-focusable like any button. Hidden with the
   corridor once the Traveler is through.                        */

.skip-intro {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 40;

    padding: 11px 22px;
    min-height: 44px;                       /* comfortable touch target */

    border: 1px solid rgba(210, 168, 75, .5);
    border-radius: 8px;
    background: rgba(12, 10, 18, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);

    font-family: inherit;
    font-size: .8rem;
    font-variant: small-caps;
    letter-spacing: .18em;
    color: #e9dcb6;

    opacity: .72;
    cursor: pointer;
    transition: opacity .4s ease, border-color .4s ease, background .4s ease;
}

.skip-intro:hover,
.skip-intro:focus-visible {
    opacity: 1;
    border-color: rgba(210, 168, 75, .9);
    background: rgba(20, 16, 28, .72);
    outline: none;
}

.skip-intro.hidden { display: none; }

/* A quiet reset in the Atrium: walk the full arrival again.
   Deliberately understated so it never competes with the room. */
.replay-arrival {
    display: block;
    margin: 4px auto 0;
    padding: 8px 16px;
    min-height: 40px;

    border: none;
    background: transparent;

    font-family: inherit;
    font-size: .74rem;
    font-variant: small-caps;
    letter-spacing: .18em;
    color: rgba(233, 220, 182, .38);

    cursor: pointer;
    transition: color .5s ease;
}

.replay-arrival:hover,
.replay-arrival:focus-visible {
    color: rgba(240, 205, 130, .8);
    outline: none;
}

/* =============== INTERACTIVE RECORDS =============== */
/* A Record that can be entered offers a brass way in,
   and opens framed within the Archives — never as a
   standalone site.                                    */

.record-launch-slot { margin: 22px 0 4px; }

.record-launch {
    display: inline-block;
    padding: 13px 34px;

    border: none;
    border-radius: 9px 12px 8px 11px / 11px 8px 12px 9px;

    background:
        radial-gradient(ellipse at 32% -10%,
            rgba(255, 200, 115, .30) 0%, transparent 55%),
        linear-gradient(163deg,
            #8f6f30 0%, #b3903f 28%, #86672a 52%,
            #a8873c 74%, #6f5522 100%);

    box-shadow:
        inset 0 2px 2px rgba(255, 240, 190, .5),
        inset 0 -3px 5px rgba(50, 33, 8, .6),
        0 6px 16px rgba(0, 0, 0, .5);

    font-family: inherit;
    font-size: 1rem;
    font-variant: small-caps;
    letter-spacing: .12em;

    color: #45320f;
    text-shadow:
        0 -1px 1px rgba(30, 20, 5, .8),
        0 1px 0 rgba(255, 240, 190, .5);

    cursor: pointer;
    transition: transform .5s ease, filter .6s ease;
}

.record-launch:hover,
.record-launch:focus-visible {
    transform: translateY(-3px);
    filter: brightness(1.08);
    outline: none;
}

/* the overlay: the Archives dim and the Record opens full-frame */

.launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;

    background: rgba(9, 9, 16, .86);
    animation: launchFade .5s ease;
}

.launch-overlay.hidden { display: none; }

@keyframes launchFade { from { opacity: 0; } to { opacity: 1; } }

/* the Archives hold still while a Record is open */
body.launch-open { overflow: hidden; }

.launch-frame {
    display: flex;
    flex-direction: column;

    width: min(1100px, 100%);
    height: min(760px, 100%);

    border: 2px solid #8a6a2e;
    border-radius: 10px;
    overflow: hidden;

    background: #120c1a;
    box-shadow:
        inset 0 0 0 1px rgba(255, 224, 150, .18),
        0 18px 50px rgba(0, 0, 0, .6),
        0 0 34px rgba(255, 205, 115, .12);
}

.launch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 9px 14px;

    background: linear-gradient(#241408, #170c05);
    border-bottom: 1px solid rgba(232, 195, 120, .3);
}

.launch-title {
    font-family: inherit;
    font-size: .85rem;
    font-variant: small-caps;
    letter-spacing: .22em;
    color: #f0dfae;
    text-shadow: 0 -1px 1px rgba(30, 20, 5, .8);
}

.launch-close {
    flex: none;
    padding: 7px 18px;

    border: none;
    border-radius: 6px;

    background: linear-gradient(#8a6a2e, #5d4517);
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 190, .4),
        0 2px 5px rgba(0, 0, 0, .5);

    font-family: inherit;
    font-size: .78rem;
    font-variant: small-caps;
    letter-spacing: .1em;
    color: #f7eccf;

    cursor: pointer;
    transition: filter .4s ease;
}

.launch-close:hover,
.launch-close:focus-visible {
    filter: brightness(1.12);
    outline: none;
}

.launch-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    background: #000;
}

/* the curated exhibit: a Wing's Records shown as plaques */

#roomAlcoves .records-heading,
#roomAlcoves .exhibit-gallery { grid-column: 1 / -1; }

.exhibit-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 8px;
    text-align: left;
}

.exhibit-plaque {
    display: flex;
    flex-direction: column;
    padding: 24px 24px 22px;

    border: 1px solid rgba(210, 168, 75, .3);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at 50% 0%,
            rgba(255, 200, 120, .06) 0%, transparent 60%),
        linear-gradient(rgba(28, 20, 38, .9), rgba(16, 12, 22, .94));
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, .4),
        0 8px 22px rgba(0, 0, 0, .4);

    transition: border-color .8s ease, box-shadow .8s ease;
}

.exhibit-plaque:hover {
    border-color: var(--wing-halo, rgba(210, 168, 75, .55));
    box-shadow:
        inset 0 0 22px rgba(0, 0, 0, .4),
        0 10px 26px rgba(0, 0, 0, .5);
}

.exhibit-id {
    font-size: .72rem;
    font-variant: small-caps;
    letter-spacing: .22em;
    color: rgba(210, 168, 75, .8);
}

.exhibit-title {
    margin-top: 6px;
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: .04em;
    color: #f3d47d;
    text-shadow: 0 0 14px rgba(255, 220, 120, .3);
}

.exhibit-type {
    margin-top: 4px;
    font-size: .8rem;
    font-variant: small-caps;
    letter-spacing: .14em;
    color: #9fb69f;
}

.exhibit-desc {
    margin-top: 14px;
    font-size: .92rem;
    line-height: 1.7;
    color: #cfc3a6;
}

.exhibit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.exhibit-launch { font-size: .9rem; padding: 11px 26px; }

.exhibit-open {
    padding: 11px 24px;
    border: 1px solid rgba(210, 168, 75, .5);
    border-radius: 8px;
    background: transparent;

    font-family: inherit;
    font-size: .9rem;
    font-variant: small-caps;
    letter-spacing: .1em;
    color: #e9dcb6;

    cursor: pointer;
    transition: background .4s ease, border-color .4s ease;
}

.exhibit-open:hover,
.exhibit-open:focus-visible {
    background: rgba(210, 168, 75, .12);
    border-color: rgba(210, 168, 75, .8);
    outline: none;
}

/* the reserved slot for the Interactive Records still to come */
.exhibit-future {
    align-items: center;
    justify-content: center;
    text-align: center;

    border-style: dashed;
    border-color: rgba(150, 130, 90, .35);
    background: linear-gradient(rgba(20, 15, 26, .6), rgba(14, 11, 20, .7));
    box-shadow: none;
}

.exhibit-future-mark {
    font-size: 1.8rem;
    color: rgba(210, 168, 75, .4);
    text-shadow: 0 0 10px rgba(210, 168, 75, .2);
}

.exhibit-future-text {
    margin-top: 10px;
    font-size: .85rem;
    font-style: italic;
    line-height: 1.6;
    color: #7d7358;
    max-width: 210px;
}

@media (prefers-reduced-motion: reduce) {
    .launch-overlay { animation: none; }
    .record-launch,
    .exhibit-plaque,
    .exhibit-open,
    .skip-intro,
    .replay-arrival { transition: none; }
}

/* =============== SMALL SCREENS =============== */
/* On a phone the shelves stand closer and the
   spine lettering is set a little finer, so long
   titles like "Welcome to the Archives" scale to
   fit their books and, if still too long, truncate
   cleanly within the leather — never spilling out. */

@media (max-width: 600px) {

    /* finer gilt lettering fits more of a long title
       down a short spine before any ellipsis          */
    .spine-title {
        font-size: .62rem;
        letter-spacing: .05em;
    }

    /* a touch more vertical room inside each book */
    .book-spine {
        padding: 10px 0;
    }

    /* the shelf bays stack in a single column so no
       bay is forced wider than the screen             */
    .shelf-hall {
        grid-template-columns: 1fr;
    }

    /* a launched Record fills the phone; its bar stacks
       so the "Return" control is easy to reach          */
    .launch-overlay { padding: 0; }

    .launch-frame {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .launch-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        text-align: center;
    }

    /* the Skip control sits a touch closer to the corner on phones */
    .skip-intro {
        top: 14px;
        right: 14px;
        padding: 10px 16px;
        font-size: .75rem;
        letter-spacing: .14em;
    }
}

/* =============== ACCESSIBILITY =============== */
/* Every Traveler is welcome.                    */

@media (prefers-reduced-motion: reduce) {

    .lantern-wrap,
    .lantern-glow,
    .atrium-runewick,
    .atrium-runewick-glow,
    .star,
    .mote,
    .door-lantern,
    .door-spark,
    .plaque-sheen,
    .plaque-runes i,
    .plaque-mote,
    .hall-lantern,
    .wing-registry .scene-extra::before,
    .key-sigil,
    .key-sigil span,
    #entrance.lantern-flare .lantern-glow,
    .wing-stargate .scene-extra,
    .wing-relics .scene-extra::after,
    .wing-games .scene-extra::after,
    .wing-gardens .scene-extra,
    .wing-study .scene {
        animation: none;
    }

    .star { opacity: .5; }
    .mote { opacity: 0; }

    main,
    #atrium,
    .room-inner,
    #hiddenNote {
        animation: none;
    }

    #corridor,
    .corridor-walls,
    .corridor-lantern,
    .floor-rune,
    #corridorCaption,
    .wing-door,
    .door-interior,
    .book-spine,
    .door-panel,
    .keystone-rune,
    .door-lantern,
    .door-name,
    .fading-out {
        transition: none;
    }
}
