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

html, body {
    min-height: 100vh;
    background-color: #fff;
    font-family: Georgia, "Times New Roman", serif;
}

.frame {
    min-height: 100vh;
    border: 12px solid #c8102e;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

header {
    text-align: center;
    padding: 16px 0;
}

header h1 {
    font-size: 3rem;
    color: #c8102e;
    letter-spacing: 2px;
}

main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.book-button {
    width: 100%;
    flex: 1;
    min-height: 100px;
    font-size: 2rem;
    font-family: inherit;
    font-weight: bold;
    color: #fff;
    background-color: #c8102e;
    border: 4px solid #8b0a1f;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.book-button:not(.disabled):hover {
    background-color: #a00d25;
}

.book-button:not(.disabled):active {
    transform: scale(0.99);
}

.book-button.disabled {
    background-color: #d9d9d9;
    color: #888;
    border-color: #b0b0b0;
    cursor: not-allowed;
}

.book-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.back-button {
    justify-self: start;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #c8102e;
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    border: 4px solid #8b0a1f;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #a00d25;
}

.header-spacer {
    width: 56px;
}

.book-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    flex: 1;
}

.book-cover {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 4px solid #8b0a1f;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.book-text {
    white-space: pre-wrap;
    font-size: 1.9rem;
    line-height: 1.5;
    color: #222;
}

@media (max-width: 768px) {
    .book-detail {
        grid-template-columns: 1fr;
    }

    .book-text {
        font-size: 1.3rem;
    }
}
