/* General Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body
     #content
       .page

*/

html {                     font-size: 16px;   }
#toc {                     font-size: 1.2rem; }
h1 {                       font-size: 3.6rem; }
h2 {                       font-size: 2.8rem; }
h3 {                       font-size: 2.0rem; }
.title {                   font-size: 1.8rem; }
#content p {               font-size: 1.4rem;
    line-height: 1.8;
}
#preamble p {              font-size: 1.0rem; }
footer p {                 font-size: 1.4rem; }





body {
    font-family: 'Cormorant Garamond', serif;
    background-color: #1a202c; /* Deep, dark slate blue/gray for the surrounding area */
    color: #EAE0D5; /* Warm, creamy off-white for text */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem;
}



/* The main "book page" container */
#content {
    text-align: left; /* Left-align text for readability */
}

.page {
    background-color: #2d3748; /* The base color of the page */
    background-image: url('img/tile.png');
    background-repeat: repeat;
    background-blend-mode: overlay; /* Blend the texture with the page color */

    max-width: 650px;
    width: 100%;
    padding: 3rem 4rem;
    border: 2px solid #C6A969; /* A muted, elegant gold */
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5),
    0 0 0 6px #1a202c,
    0 0 0 8px #C6A969;
    margin-bottom: 2rem;
}

#toc {
    text-align: center;
    margin-bottom: 2rem;
}

#toc ul {
    list-style: none;
    padding: 0;
}

#toc li {
    display: inline;
}

#toc li:not(:last-child)::after {
    content: ' ★ ';
    color: #C6A969;
    padding: 0 0.25rem;
}

#content #preamble p {
    font-style: italic;
}

/* Header styling for the chapter title */
h1 {
    : 3.5rem;
    font-weight: 700;
    color: #E6D5B8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), 0 0 20px #E6D5B8;
    margin-bottom: 2rem;
    text-align: center;
}

.e6,.e9,.e12,.e15,.e18,.e21,.e24,.e27 {
    /*text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 0 0 30px #E6D5B8;*/
    background: -webkit-linear-gradient(45deg,
    #EAE0D5 0%,
    #EAE0D5 10%,
    #C6A969 20%,
    #EAE0D5 30%,
    #EAE0D5 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.e9,.e12,.e15,.e18,.e21,.e24,.e27 {
    font-weight: 800;
    letter-spacing: 0.1em;
}
.e12 {
    font-size: 1.2em;
    letter-spacing: 0.2em;
}
.e15 {
    font-size: 1.4em;
    letter-spacing: 0.3em;
}
.e18 {
    font-size: 1.6em;
    letter-spacing: 0.4em;
    word-break: break-word;
}
.e21 {
    font-size: 1.8em;
    letter-spacing: 0.45em;
    word-break: break-word;
}
.e24 {
    font-size: 2em;
    letter-spacing: 0.50em;
    word-break: break-word;
}
.e27 {
    font-size: 2.2em;
    letter-spacing: 0.55em;
    word-break: break-word;
}

/* Section Headline Styling */
h2 {
    color: #E6D5B8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    color: #E6D5B8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}


/* Main story text styling */
#content p {
    margin-bottom: 1.5rem;
}

#content p:last-child {
    margin-bottom: 2.5rem;
}

#content img {
    display: block;
    margin: 0 auto 1.5rem;
}

/* Link Styling */
a {
    color: #E6B85C;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #E6D5B8;
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(230, 213, 184, 0.5);
}


footer p {
    font-style: italic;
    color: #C6A969;
}

.numbers .title::BEFORE {
    content: "★ ";
    margin-left: -2.4rem;
}

#popup {
    border: 2px solid #C6A969;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    background-color: #2d3748;
    padding: 1.5rem;
    border-radius: 8px;
    width: 33vw;
    max-width: 400px;
    z-index: 1000;
    color: #EAE0D5;
    font-size: 1.2rem;
    line-height: 1.6;
}


@media (max-width: 768px) {
    body {
        padding: 0;
    }

    #popup { width: 100%; }

    #content {
        max-width: 100%;
        border-radius: 0;
        padding: 3rem 1.5rem;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5), 0 0 0 2px #C6A969; /* Simplified shadow for mobile */
    }

}
