:root {
    --rosa: #f4d5d8;
    --rosa-fuerte: #c46872;
    --texto: #3f2635;
    --papel: #fffefa;
}


* {
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}


body {
    overflow: hidden;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--texto);

    background:
        linear-gradient(
            145deg,
            #fffaf6 0%,
            #f7e4e4 55%,
            #efd0d5 100%
        );
}


.viewer {
    display: grid;

    grid-template-rows:
        auto
        minmax(0, 1fr)
        auto;

    gap: 10px;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    padding: 12px;
}


.toolbar {
    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    gap: 10px;

    width: min(100%, 1160px);

    margin: 0 auto;
    padding: 8px;

    border:
        1px solid
        rgba(196, 104, 114, 0.25);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.85);

    box-shadow:
        0 8px 28px
        rgba(86, 46, 64, 0.12);
}


.toolbar button {
    min-height: 42px;

    padding: 8px 14px;

    border:
        1px solid
        rgba(196, 104, 114, 0.40);

    border-radius: 10px;

    background: white;
    color: var(--texto);

    font-size: 16px;

    cursor: pointer;
}


.toolbar button:first-child {
    justify-self: start;
}


.toolbar button:last-child {
    justify-self: end;
}


.toolbar button:hover {
    border-color: var(--rosa-fuerte);
    background: #fff7f7;
}


.toolbar button:disabled {
    opacity: 0.40;
    cursor: default;
}


.status {
    display: grid;

    justify-items: center;

    gap: 2px;

    min-width: 170px;

    text-align: center;
}


.status strong {
    font-size: 16px;
}


.status span {
    color: #765868;
    font-size: 14px;
}


.book-shell {
    display: flex;

    align-items: center;
    justify-content: center;

    width: min(100%, 1160px);
    height: 100%;

    min-width: 0;
    min-height: 0;

    margin: 0 auto;

    overflow: hidden;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.30);
}


.flip-book {
    width: 100%;
    height: 100%;
}


.page {
    position: relative;

    overflow: hidden;

    background: var(--papel);

    box-shadow:
        inset 0 0 0 1px
        rgba(63, 38, 53, 0.08);
}


.page-crop {
    position: absolute;

    inset: 0;

    overflow: hidden;

    background: var(--papel);
}


.page-crop img {
    position: absolute;

    top: 0;
    left: 0;

    display: block;

    width: 200%;
    max-width: none;
    height: 100%;

    object-fit: fill;

    pointer-events: none;
    user-select: none;
}


.page-crop.is-right img {
    left: -100%;
}


.hint {
    margin: 0;

    color: #705564;

    font-size: 13px;
    text-align: center;
}


@media (max-width: 600px) {

    .viewer {
        gap: 6px;
        padding: 6px;
    }


    .toolbar {
        gap: 5px;
        padding: 5px;

        border-radius: 10px;
    }


    .toolbar button {
        min-width: 42px;

        padding: 7px;

        font-size: 0;
    }


    .toolbar button:first-child::after {
        content: "‹";

        font-size: 28px;
    }


    .toolbar button:last-child::after {
        content: "›";

        font-size: 28px;
    }


    .status {
        min-width: 0;
    }


    .status strong {
        font-size: 14px;
    }


    .status span {
        font-size: 12px;
    }


    .book-shell {
        border-radius: 10px;
    }


    .hint {
        font-size: 11px;
    }

}