body {
    margin: 0;
    background:
        radial-gradient(circle at top, #263024 0%, #10140f 55%, #080a08 100%);
    font-family: Georgia, serif;
    animation: pageFadeIn 0.55s ease;
}

body.page-exit {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.42s ease, transform 0.42s ease;
}

.storybook {
    max-width: 1050px;
    margin: 18px auto;
    padding: 14px;
}

.scene-stage {
    position: relative;
    width: 100%;
    height: 620px;
    overflow: hidden;
    border-radius: 22px;
    background: #111;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5);
}

.scene-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;

    animation: bgDrift 24s ease-in-out infinite alternate;
    transform-origin: center center;
}

.scene-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    border-radius: 22px;

    box-shadow:
        inset 0 0 55px rgba(0, 0, 0, 0.28),
        inset 0 -38px 75px rgba(0, 0, 0, 0.2);
}

.story-box {
    margin-top: 14px;
    background: #fff4d6;
    color: #3b2600;
    padding: 18px 22px;
    border-radius: 18px;
    font-size: 24px;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

#story-text {
    margin: 0 0 14px 0;
    min-height: 34px;
    opacity: 0;
    transition: opacity 0.65s ease;
}

#story-text.visible {
    opacity: 1;
}

#choices {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

#choices.visible {
    opacity: 1;
    transform: translateY(0);
}

.choice {
    display: block;
    margin: 10px auto;
    padding: 13px 18px;
    max-width: 560px;

    background: linear-gradient(#f6cf66, #e7ad36);
    color: #2b2100;

    border-radius: 14px;
    text-decoration: none;
    font-weight: bold;

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        filter 0.22s ease;

    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.26);
}

.choice:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.34);
    filter: brightness(1.03);
}

#start-button {
    display: block;
    margin: 0 auto;
    padding: 14px 30px;

    font-size: 20px;
    font-weight: bold;
    font-family: Georgia, serif;

    border: none;
    border-radius: 16px;

    background: linear-gradient(#f6cf66, #e7ad36);
    color: #2b2100;

    cursor: pointer;

    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        opacity 0.35s ease;
}

#start-button:hover {
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

#start-button.start-hidden {
    opacity: 0;
    transform: translateY(3px) scale(0.98);
    pointer-events: none;
}

#mute-button {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 999;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 244, 214, 0.92);
    color: #2b2100;

    font-size: 20px;
    cursor: pointer;

    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#mute-button:hover {
    transform: scale(1.06);
}

#mute-button.muted {
    opacity: 0.72;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bgDrift {
    from {
        transform: scale(1.015) translateX(0);
    }

    to {
        transform: scale(1.045) translateX(-8px);
    }
}

@media (max-width: 700px) {
    .storybook {
        margin: 8px auto;
        padding: 8px;
    }

    .scene-stage {
        height: 440px;
        border-radius: 18px;
    }

    .scene-bg {
        object-fit: cover;
        background: #111;
    }

    .story-box {
        margin-top: 10px;
        font-size: 19px;
        padding: 15px;
        border-radius: 16px;
    }

    #story-text {
        min-height: 30px;
    }

    .choice {
        padding: 12px 15px;
        margin: 9px auto;
    }

    #start-button {
        font-size: 18px;
        padding: 13px 24px;
    }

    #mute-button {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}
