/* ============================================
   ENARGEIA — The Crossroads (writing.html)
   A fork in the road in the dark woods.
   ============================================ */

html:has(.crossroads-page),
html:has(.crossroads-page) body {
    overflow: hidden !important;
    height: 100vh;
    height: 100dvh;
}

.crossroads-page {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
    background: #020108;
}

/* --- Nav --- */
.crossroads-nav {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 50;
}

.return-link {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.8rem;
    color: #8a8098;
    letter-spacing: 0.1em;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.return-link:hover {
    color: #c4b5fd;
    text-shadow: 0 0 8px rgba(196, 181, 253, 0.3);
}

/* --- Night Sky --- */
.crossroads-sky {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        #050215 0%,
        #0a0520 30%,
        #120a28 60%,
        #1a0f30 100%
    );
}

/* --- Ground --- */
.crossroads-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    z-index: 3;
    background: linear-gradient(
        180deg,
        #0a0815 0%,
        #080612 30%,
        #060510 100%
    );
    /* Subtle texture */
    background-image:
        linear-gradient(180deg, #0a0815, #060510),
        radial-gradient(1px 1px at 30% 20%, rgba(94, 234, 212, 0.03) 50%, transparent 50%),
        radial-gradient(1px 1px at 70% 60%, rgba(196, 181, 253, 0.02) 50%, transparent 50%);
    background-size: 100% 100%, 80px 80px, 120px 120px;
}

/* --- Paths (lighter streaks on ground) --- */
.crossroads-paths {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    z-index: 4;
    pointer-events: none;
}

.path {
    position: absolute;
    bottom: 0;
    background: linear-gradient(
        0deg,
        rgba(196, 181, 253, 0.04),
        rgba(196, 181, 253, 0.02) 60%,
        transparent
    );
}

/* Center path (where you're standing) */
.path-center {
    left: 42%;
    width: 16%;
    height: 50%;
    clip-path: polygon(35% 100%, 65% 100%, 55% 0%, 45% 0%);
}

/* Left path (fiction) */
.path-left {
    left: 5%;
    width: 45%;
    height: 70%;
    clip-path: polygon(80% 60%, 95% 100%, 60% 100%, 10% 30%, 20% 20%);
    background: linear-gradient(
        -30deg,
        rgba(255, 126, 179, 0.03),
        rgba(255, 126, 179, 0.01) 60%,
        transparent
    );
}

/* Right path (nonfiction) */
.path-right {
    right: 5%;
    width: 45%;
    height: 70%;
    clip-path: polygon(20% 60%, 5% 100%, 40% 100%, 90% 30%, 80% 20%);
    background: linear-gradient(
        30deg,
        rgba(94, 234, 212, 0.03),
        rgba(94, 234, 212, 0.01) 60%,
        transparent
    );
}

/* --- Trees (CSS silhouettes) --- */
.crossroads-trees {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.tree {
    position: absolute;
    bottom: 35%;
    background: #020108;
}

/* Tree shape using clip-path */
.tree::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #020108;
}

/* Left side trees */
.tree-1 {
    left: 2%;
    width: 30px;
    height: 35%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-1::before {
    width: 100px;
    height: 200px;
    clip-path: polygon(50% 0%, 0% 100%, 15% 85%, 5% 70%, 20% 55%, 10% 40%, 50% 0%, 90% 40%, 80% 55%, 95% 70%, 85% 85%, 100% 100%);
}

.tree-2 {
    left: 10%;
    width: 25px;
    height: 30%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-2::before {
    width: 80px;
    height: 170px;
    clip-path: polygon(50% 0%, 5% 100%, 20% 80%, 10% 60%, 25% 45%, 50% 0%, 75% 45%, 90% 60%, 80% 80%, 95% 100%);
}

.tree-3 {
    left: 20%;
    width: 20px;
    height: 25%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-3::before {
    width: 70px;
    height: 140px;
    clip-path: polygon(50% 0%, 10% 100%, 25% 75%, 15% 55%, 50% 0%, 85% 55%, 75% 75%, 90% 100%);
}

/* Right side trees */
.tree-4 {
    right: 3%;
    width: 28px;
    height: 33%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-4::before {
    width: 95px;
    height: 190px;
    clip-path: polygon(50% 0%, 0% 100%, 15% 85%, 5% 65%, 20% 50%, 50% 0%, 80% 50%, 95% 65%, 85% 85%, 100% 100%);
}

.tree-5 {
    right: 12%;
    width: 22px;
    height: 28%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-5::before {
    width: 75px;
    height: 155px;
    clip-path: polygon(50% 0%, 5% 100%, 20% 80%, 10% 60%, 50% 0%, 90% 60%, 80% 80%, 95% 100%);
}

.tree-6 {
    right: 22%;
    width: 18px;
    height: 22%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
}
.tree-6::before {
    width: 65px;
    height: 130px;
    clip-path: polygon(50% 0%, 10% 100%, 25% 75%, 50% 0%, 75% 75%, 90% 100%);
}

/* Center background trees (smaller, further away) */
.tree-7 {
    left: 35%;
    width: 12px;
    height: 15%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
    opacity: 0.5;
}
.tree-7::before {
    width: 45px;
    height: 90px;
    clip-path: polygon(50% 0%, 10% 100%, 50% 0%, 90% 100%);
    opacity: 0.5;
}

.tree-8 {
    right: 35%;
    width: 14px;
    height: 18%;
    clip-path: polygon(40% 100%, 60% 100%, 55% 0%, 45% 0%);
    opacity: 0.4;
}
.tree-8::before {
    width: 50px;
    height: 100px;
    clip-path: polygon(50% 0%, 5% 100%, 50% 0%, 95% 100%);
    opacity: 0.4;
}

/* --- Signpost --- */
.signpost {
    position: absolute;
    bottom: 38%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    pointer-events: none;
}

.signpost-pole {
    width: 6px;
    height: 120px;
    background: linear-gradient(90deg, #1a1425, #2a2040, #1a1425);
    margin: 0 auto;
    position: relative;
}

/* Wood grain hint */
.signpost-pole::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent,
        rgba(196, 181, 253, 0.03) 3px,
        transparent 6px
    );
}

.signpost-arm {
    position: absolute;
    top: 5px;
    padding: 0.3rem 1.2rem 0.3rem 0.8rem;
    font-family: 'MedievalSharp', cursive;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, #1a1425, #221835);
    border: 1px solid rgba(196, 181, 253, 0.08);
    white-space: nowrap;
}

.signpost-arm-left {
    right: 50%;
    margin-right: 3px;
    color: #ff7eb3;
    text-shadow: 0 0 8px rgba(255, 126, 179, 0.3);
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 15% 100%, 0% 50%);
    padding-left: 1.2rem;
    text-align: right;
}

.signpost-arm-right {
    left: 50%;
    margin-left: 3px;
    color: #5eead4;
    text-shadow: 0 0 8px rgba(94, 234, 212, 0.3);
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
    padding-right: 1.2rem;
}

/* Second arm lower */
.signpost-arm-right {
    top: 35px;
}

/* --- Clickable Path Areas --- */
.crossroads-link {
    position: absolute;
    bottom: 5%;
    width: 35%;
    height: 35%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 5%;
    cursor: pointer;
    transition: all 0.4s ease;
}

.crossroads-link-left {
    left: 3%;
}

.crossroads-link-right {
    right: 3%;
}

.crossroads-link-label {
    font-family: 'Uncial Antiqua', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.2em;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(5px);
}

.crossroads-link-hint {
    font-family: 'MedievalSharp', cursive;
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
    transform: translateY(5px);
    color: #8a8098;
    font-style: italic;
}

.crossroads-link-left .crossroads-link-label {
    color: #ff7eb3;
    text-shadow: 0 0 15px rgba(255, 126, 179, 0.4);
}

.crossroads-link-right .crossroads-link-label {
    color: #5eead4;
    text-shadow: 0 0 15px rgba(94, 234, 212, 0.4);
}

/* Hover: path glows, text appears */
.crossroads-link:hover .crossroads-link-label {
    opacity: 1;
    transform: translateY(0);
}

.crossroads-link:hover .crossroads-link-hint {
    opacity: 0.7;
    transform: translateY(0);
}

/* Soft glow on hover path area */
.crossroads-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 0 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.crossroads-link-left::before {
    background: radial-gradient(
        ellipse at 50% 80%,
        rgba(255, 126, 179, 0.06),
        transparent 70%
    );
}

.crossroads-link-right::before {
    background: radial-gradient(
        ellipse at 50% 80%,
        rgba(94, 234, 212, 0.06),
        transparent 70%
    );
}

.crossroads-link:hover::before {
    opacity: 1;
}

/* --- Hidden Dream Diary Link --- */
.crossroads-secret {
    position: absolute;
    bottom: 42%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 18;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.secret-glow {
    font-size: 0.6rem;
    color: #fde68a;
    opacity: 0;
    animation: secret-pulse 6s ease-in-out infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes secret-pulse {
    0%, 70%, 100% { opacity: 0; }
    75%, 95% { opacity: 0.25; }
    85% { opacity: 0.4; }
}

.crossroads-secret:hover .secret-glow {
    opacity: 1;
    transform: scale(1.5);
    text-shadow: 0 0 12px rgba(253, 230, 138, 0.6);
    animation: none;
}

/* Tooltip on hover */
.crossroads-secret::after {
    content: 'dream diary';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'MedievalSharp', cursive;
    font-size: 0.65rem;
    color: #fde68a;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-bottom: 4px;
    text-shadow: 0 0 8px rgba(253, 230, 138, 0.3);
}

.crossroads-secret:hover::after {
    opacity: 0.8;
}

/* --- Fog Overlay --- */
.crossroads-fog {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 30% 70%,
            rgba(196, 181, 253, 0.03),
            transparent 50%
        ),
        radial-gradient(
            ellipse at 70% 65%,
            rgba(94, 234, 212, 0.02),
            transparent 40%
        );
    animation: fog-drift 20s ease-in-out infinite alternate;
}

@keyframes fog-drift {
    0% { transform: translateX(0) translateY(0); opacity: 0.8; }
    50% { transform: translateX(20px) translateY(-10px); opacity: 1; }
    100% { transform: translateX(-15px) translateY(5px); opacity: 0.7; }
}

/* --- Fireflies --- */
.crossroads-fireflies {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.firefly {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fde68a;
    box-shadow: 0 0 6px 2px rgba(253, 230, 138, 0.4);
    animation: firefly-float var(--dur) ease-in-out infinite alternate;
    animation-delay: var(--delay);
}

@keyframes firefly-float {
    0% {
        transform: translate(0, 0);
        opacity: 0.2;
    }
    25% {
        opacity: 0.8;
    }
    50% {
        transform: translate(15px, -20px);
        opacity: 0.3;
    }
    75% {
        opacity: 0.9;
    }
    100% {
        transform: translate(-10px, 10px);
        opacity: 0.15;
    }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .crossroads-link {
        width: 42%;
    }

    .signpost-arm {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
}

/* --- Creepy Moon (dream diary link) --- */

.crossroads-moon {
    position: absolute;
    top: 4%;
    right: 16%;
    z-index: 6;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.moon-body {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: url(/assets/images/meliesmoon.png) no-repeat center/cover;
    position: relative;
    transition: transform 0.4s ease;
}


/* Ambient glow behind */


@keyframes moon-breathe {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Tooltip */
.moon-tooltip {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'MedievalSharp', cursive;
    font-size: 0.7rem;
    color: #fde68a;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 8px rgba(253, 230, 138, 0.3);
    pointer-events: none;
}

/* --- Hover: moon gets creepier --- */

.crossroads-moon:hover .moon-body {
    transform: scale(1.05);
}

.crossroads-moon:hover .moon-eye {
    height: 12px;
    transform: scaleX(0.85);
}

.crossroads-moon:hover .moon-eye::after {
    opacity: 1;
    box-shadow: 0 0 6px rgba(196, 181, 253, 0.9);
}

.crossroads-moon:hover .moon-mouth {
    width: 20px;
    height: 10px;
}

.crossroads-moon:hover .moon-glow {
    opacity: 1;
    animation: none;
}

.crossroads-moon:hover .moon-tooltip {
    opacity: 0.8;
}

/* Slow idle wobble */
.crossroads-moon {
    animation: moon-drift 12s ease-in-out infinite alternate;
}

@keyframes moon-drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(3px, -2px) rotate(1deg); }
    66% { transform: translate(-2px, 3px) rotate(-1deg); }
    100% { transform: translate(1px, -1px) rotate(0.5deg); }
}

/* ============================================
   THE SHADE — rare mysterious visitor
   ============================================ */

.shade {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 21;
    width: clamp(100px, 12vw, 180px);
    height: clamp(200px, 24vw, 360px);
    cursor: pointer;
    opacity: 0;
    animation: shade-materialize 3s ease-out forwards;
    animation-delay: 1.5s;
    filter: brightness(0.7);
    transition: filter 0.3s ease;
}

.shade img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 12px rgba(196, 181, 253, 0.15));
}

/* Subtle idle hover/drift */
.shade::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(196, 181, 253, 0.08), transparent 70%);
    animation: shade-shadow-pulse 4s ease-in-out infinite alternate;
}

@keyframes shade-materialize {
    0% {
        opacity: 0;
        filter: blur(8px) brightness(0.3);
        transform: translateX(-50%) translateY(10px);
    }
    60% {
        opacity: 0.7;
        filter: blur(2px) brightness(0.5);
    }
    100% {
        opacity: 0.85;
        filter: blur(0px) brightness(0.7);
        transform: translateX(-50%) translateY(0);
    }
}

.shade.idle {
    animation: shade-materialize 3s ease-out forwards,
               shade-drift 6s ease-in-out infinite alternate 4.5s;
}

@keyframes shade-drift {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-6px);
    }
    100% {
        transform: translateX(-50%) translateY(2px);
    }
}

@keyframes shade-shadow-pulse {
    0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.2; transform: translateX(-50%) scale(0.7); }
}

.shade:hover {
    filter: brightness(0.9);
}

.shade:hover img {
    filter: drop-shadow(0 0 20px rgba(196, 181, 253, 0.3));
}

/* --- Dissipate animation (on click) --- */

.shade.dissipate {
    animation: shade-dissipate 1.8s ease-in forwards !important;
    pointer-events: none;
}

@keyframes shade-dissipate {
    0% {
        opacity: 0.85;
        filter: blur(0px) brightness(0.7);
        transform: translateX(-50%) translateY(0) scale(1);
    }
    30% {
        opacity: 0.6;
        filter: blur(3px) brightness(0.5);
        transform: translateX(-50%) translateY(-15px) scale(1.05);
    }
    60% {
        opacity: 0.3;
        filter: blur(8px) brightness(0.3);
        transform: translateX(-50%) translateY(-30px) scale(1.1);
    }
    100% {
        opacity: 0;
        filter: blur(20px) brightness(0);
        transform: translateX(-50%) translateY(-50px) scale(1.2);
    }
}

/* --- Screen fade to black (after shade dissipates) --- */

.shade-fade-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.shade-fade-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   PATH SWEEP TRANSITION
   ============================================ */

.path-sweep {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    overflow: hidden;
}

.path-sweep-bg {
    position: absolute;
    top: 0;
    width: 120%;
    height: 100%;
    transform: translateX(-120%);
    will-change: transform;
}

/* Left sweep (fiction) — enters from the right, sweeps left */
.path-sweep.sweep-left .path-sweep-bg {
    right: 0;
    left: auto;
    transform: translateX(120%);
    background: linear-gradient(
        270deg,
        rgba(255, 126, 179, 0.08) 0%,
        rgba(10, 5, 15, 0.97) 30%,
        #08060e 60%
    );
    animation: sweep-from-right 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Right sweep (nonfiction) — enters from the left, sweeps right */
.path-sweep.sweep-right .path-sweep-bg {
    left: 0;
    right: auto;
    transform: translateX(-120%);
    background: linear-gradient(
        90deg,
        rgba(94, 234, 212, 0.08) 0%,
        rgba(10, 5, 15, 0.97) 30%,
        #08060e 60%
    );
    animation: sweep-from-left 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sweep-from-right {
    0% {
        transform: translateX(120%);
    }
    100% {
        transform: translateX(0%);
    }
}

@keyframes sweep-from-left {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Directional label that rides the sweep */
.path-sweep-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Uncial Antiqua', serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    letter-spacing: 0.3em;
    opacity: 0;
    animation: sweep-label-fade 1s ease forwards;
    animation-delay: 0.3s;
}

.sweep-left .path-sweep-label {
    right: 10%;
    color: #ff7eb3;
    text-shadow: 0 0 20px rgba(255, 126, 179, 0.4);
}

.sweep-right .path-sweep-label {
    left: 10%;
    color: #5eead4;
    text-shadow: 0 0 20px rgba(94, 234, 212, 0.4);
}

@keyframes sweep-label-fade {
    0% {
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
    }
}

/* ============================================
   MOON CLICK — sparkles + fade transition
   ============================================ */

.moon-sparkle-burst {
    position: fixed;
    inset: 0;
    z-index: 199;
    pointer-events: none;
    overflow: hidden;
}

.moon-sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fde68a;
    opacity: 0;
    animation: sparkle-fly var(--dur, 1.5s) ease-out forwards;
    animation-delay: var(--delay, 0s);
    box-shadow: 0 0 6px 2px rgba(253, 230, 138, 0.5);
}

/* Some sparkles are bigger and brighter */
.moon-sparkle.large {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 10px 3px rgba(253, 230, 138, 0.6);
}

/* Some are cool-toned — moonlight */
.moon-sparkle.cool {
    background: #c4b5fd;
    box-shadow: 0 0 6px 2px rgba(196, 181, 253, 0.5);
}

@keyframes sparkle-fly {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translate(
            calc(var(--dx, 30px) * 0.2),
            calc(var(--dy, -30px) * 0.2)
        ) scale(1);
    }
    60% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx, 30px), var(--dy, -30px)) scale(0.3);
    }
}

/* Moon reacts to click — brief flash */
.crossroads-moon.clicked .moon-body {
    animation: moon-flash 0.6s ease-out forwards;
}

@keyframes moon-flash {
    0% {
        filter: brightness(1);
    }
    30% {
        filter: brightness(2.5) drop-shadow(0 0 20px rgba(253, 230, 138, 0.8));
    }
    100% {
        filter: brightness(0.6) drop-shadow(0 0 10px rgba(253, 230, 138, 0.3));
    }
}

/* Dream fade overlay */
.dream-fade-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        ellipse at var(--moon-x, 80%) var(--moon-y, 10%),
        rgba(253, 230, 138, 0.15),
        rgba(20, 14, 30, 0.98) 40%,
        #08060e 70%
    );
    transition: opacity 1.2s ease;
}

.dream-fade-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Text that appears during the fade */
.dream-fade-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'MedievalSharp', cursive;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    color: #fde68a;
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.8s ease;
    transition-delay: 0.4s;
}

.dream-fade-overlay.active .dream-fade-text {
    opacity: 0.6;
}