.psv-canvas-page {
    margin: 0;
}

.psv-canvas-page #wpadminbar {
    position: fixed;
}

.psv-page {
    --psv-bg: #dfe3e8;
    --psv-ink: #0f2740;
    --psv-rule: rgba(15, 39, 64, 0.38);
    --psv-page-shadow: 0 2px 6px rgba(0, 0, 0, 0.34);
    --psv-cover-border: #415164;
    background: var(--psv-bg);
    color: var(--psv-ink);
    min-height: 100vh;
    padding: 24px 14px 64px;
}

.psv-viewer {
    margin: 0 auto;
    max-width: 1120px;
}

.psv-toolbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 auto 24px;
    max-width: 920px;
}

.psv-toolbar h1 {
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.psv-download {
    background: #0f2740;
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    line-height: 1;
    padding: 11px 14px;
    text-decoration: none;
    white-space: nowrap;
}

.psv-download:hover,
.psv-download:focus {
    color: #fff;
    opacity: 0.86;
}

.psv-loading,
.psv-error {
    font-size: 18px;
    margin: 48px auto;
    max-width: 720px;
    text-align: center;
}

.psv-spreads {
    display: flex;
    flex-direction: column;
}

.psv-spread {
    border-top: 1px solid var(--psv-rule);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: center;
    margin: 0 auto;
    max-width: min(100%, calc((var(--psv-page-width, 420px) * 2) + 0px));
    padding: 18px 0 40px;
    width: 100%;
}

.psv-spread:first-child {
    border-top: 0;
    padding-top: 0;
}

.psv-slot {
    align-items: center;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.psv-slot-left {
    align-items: flex-end;
}

.psv-slot-right {
    align-items: flex-start;
}

.psv-blank {
    min-height: 1px;
}

.psv-canvas-wrap {
    background: #fff;
    box-sizing: border-box;
    box-shadow: var(--psv-page-shadow);
    line-height: 0;
    max-width: 100%;
    position: relative;
}

.psv-cover-page {
    border: 3px solid var(--psv-cover-border);
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.42);
}

.psv-canvas-wrap canvas {
    display: block;
    height: auto;
    max-width: 100%;
}

.psv-canvas-wrap::after {
    background: linear-gradient(135deg, rgba(255,255,255,0) 48%, #f7f7f7 50%, #cfcfcf 52%, #ffffff 100%);
    border-left: 1px solid rgba(0,0,0,0.18);
    border-top: 1px solid rgba(0,0,0,0.18);
    bottom: 0;
    content: "";
    height: 22px;
    pointer-events: none;
    position: absolute;
    right: 0;
    width: 22px;
}

.psv-slot-left .psv-canvas-wrap::after {
    background: linear-gradient(225deg, rgba(255,255,255,0) 48%, #f7f7f7 50%, #cfcfcf 52%, #ffffff 100%);
    border-left: 0;
    border-right: 1px solid rgba(0,0,0,0.18);
    left: 0;
    right: auto;
}

.psv-label {
    color: var(--psv-ink);
    display: block;
    font-size: 15px;
    line-height: 1.3;
    margin-top: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

.psv-message {
    background: rgba(255,255,255,0.78);
    border-radius: 8px;
    margin: 30px auto;
    max-width: 760px;
    padding: 18px;
    text-align: center;
}

@media (max-width: 720px) {
    .psv-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .psv-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .psv-spread {
        padding-bottom: 28px;
    }

    .psv-label {
        font-size: 13px;
    }
}
