body {
    margin: 0;
    padding: 20px;

    background: #1c1a18;

    font-family: Georgia, "Times New Roman", serif;

    color: #2b1d0e;
}


/* =========================
   MAIN CONTAINER
   ========================= */

.container {
    max-width: 1000px;

    margin: 0 auto;
}


/* =========================
   CHARACTER / ENTRY CONTROLS
   ========================= */

.controls {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 15px;

    flex-wrap: wrap;
}


.controls label {
    color: #f4ecd8;

    font-weight: bold;
}


select {
    padding: 8px 12px;

    background: #f4ecd8;

    color: #2b1d0e;

    border: 2px solid #5c4128;

    border-radius: 4px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 16px;

    cursor: pointer;
}


/* =========================
   JOURNAL
   ========================= */

.journal {
    width: 408px;

    margin: 0 auto;

    background: #2b2118;

    padding: 15px;

    border: 6px solid #5c4128;

    border-radius: 6px;

    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.7);
}


/* =========================
   CHARACTER HEADER
   ========================= */

.header {
    padding: 15px;

    text-align: center;

    color: #f4ecd8;

    border-bottom: 2px solid #8a6a45;
}


.header h1 {
    margin: 0 0 5px 0;

    font-size: 28px;
}


.header p {
    margin: 0;

    font-style: italic;

    font-size: 14px;
}


/* =========================
   PARCHMENT PAGE
   ========================= */

.parchment {
    width: 408px;

    height: 612px;

    box-sizing: border-box;

    margin: 15px auto 0 auto;

    /*
       Put parchment.png in the same folder
       as this CSS file.
    */

    background-image: url("./parchment.png");

    background-size: 408px 612px;

    background-position: center;

    background-repeat: no-repeat;

    position: relative;

    overflow: hidden;
}


/* =========================
   WRITING AREA
   ========================= */

.page-content {
    position: absolute;

    top: 55px;
    left: 50px;

    width: 308px;

    height: 500px;

    box-sizing: border-box;

    overflow: hidden;
}


#entryTitle {
    margin: 0 0 12px 0;

    text-align: center;

    font-size: 24px;

    line-height: 1.2;
}


#entryDate {
    margin-bottom: 18px;

    text-align: right;

    font-style: italic;

    font-size: 14px;
}


#entryText {
    font-size: 16px;

    line-height: 1.65;

    white-space: pre-line;
}


/* =========================
   PAGE BUTTONS
   ========================= */

.page-controls {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    padding-top: 15px;
}


.page-controls button {
    padding: 7px 12px;

    background: #f4ecd8;

    color: #2b1d0e;

    border: 2px solid #5c4128;

    border-radius: 4px;

    font-family: Georgia, "Times New Roman", serif;

    cursor: pointer;
}


.page-controls button:hover {
    background: #d8c7a5;
}


.page-controls button:disabled {
    opacity: 0.4;

    cursor: default;
}


#pageNumber {
    color: #f4ecd8;

    font-size: 14px;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 500px) {

    body {
        padding: 5px;
    }


    .journal {
        transform-origin: top center;

        width: 408px;
    }


    .controls {
        flex-direction: column;

        align-items: stretch;
    }


    select {
        width: 100%;
    }

}