.customer-area,
.reader-page {
    background: #f7fbfc;
}

.customer-flash {
    padding-top: 18px;
}

.nav-logout {
    border: 1px solid #d6e5e9;
    border-radius: 999px;
    background: #ffffff;
    color: #003b46;
    padding: 10px 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.customer-main {
    min-height: calc(100vh - 160px);
}

.customer-welcome {
    padding: 64px 0 38px;
    background: linear-gradient(180deg, #eaf5f7 0%, #f7fbfc 100%);
}

.customer-welcome-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
    gap: 34px;
    align-items: center;
}

.customer-welcome h1,
.customer-page-title {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.customer-welcome p,
.customer-page-copy {
    max-width: 760px;
    color: #667783;
    font-size: 16px;
}

.customer-account-note {
    border: 1px solid #c9e0e5;
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    padding: 24px;
    box-shadow: 0 18px 45px rgba(0, 59, 70, .08);
}

.customer-account-note span,
.customer-account-note strong,
.customer-account-note small {
    display: block;
}

.customer-account-note span {
    color: #66a5ad;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.customer-account-note strong {
    margin: 6px 0 8px;
    color: #003b46;
    font-size: 22px;
}

.customer-account-note small {
    color: #667783;
    line-height: 1.6;
}

.customer-stats-section {
    padding: 0 0 24px;
}

.customer-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.customer-stat-card {
    min-height: 138px;
    border: 1px solid #dce9ec;
    border-radius: 18px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 12px 34px rgba(0, 59, 70, .06);
}

.customer-stat-card span,
.customer-stat-card strong,
.customer-stat-card small {
    display: block;
}

.customer-stat-card span {
    color: #667783;
    font-size: 12px;
    font-weight: 700;
}

.customer-stat-card strong {
    margin: 6px 0;
    color: #003b46;
    font-size: 30px;
}

.customer-stat-card small {
    color: #7b8c96;
}

.reward-stat-card {
    background: linear-gradient(145deg, #003b46, #07575b);
    color: #ffffff;
}

.reward-stat-card span,
.reward-stat-card strong,
.reward-stat-card small {
    color: #ffffff;
}

.customer-section {
    padding: 34px 0;
}

.customer-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 24px;
}

.reward-panel,
.last-read-panel {
    border: 1px solid #dce9ec;
    border-radius: 22px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 16px 42px rgba(0, 59, 70, .06);
}

.reward-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.reward-panel h2,
.last-read-panel h3 {
    margin: 0;
    color: #003b46;
}

.reward-progress-row {
    display: flex;
    gap: 12px;
    margin: 28px 0 18px;
}

.reward-dot {
    width: 46px;
    height: 46px;
    border: 1px solid #c8dde1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f8fbfc;
    color: #78909a;
    font-weight: 800;
}

.reward-dot.is-filled {
    border-color: #07575b;
    background: #07575b;
    color: #ffffff;
}

.last-read-book {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.last-read-book img {
    width: 104px;
    height: 142px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(23, 32, 51, .14);
}

.last-read-book h3 {
    margin-bottom: 7px;
}

.last-read-book p {
    margin: 0 0 14px;
    color: #667783;
    font-size: 13px;
}

.reading-complete-badge {
    display: inline-flex;
    margin: 0 8px 10px 0;
    border-radius: 999px;
    background: #e9f8f2;
    color: #17795a;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
}

.customer-library-section {
    padding-bottom: 80px;
}

.customer-library-grid,
.reward-book-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.library-book-card,
.reward-book-card {
    overflow: hidden;
    border: 1px solid #dce9ec;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(0, 59, 70, .06);
}

.library-cover,
.reward-book-cover {
    display: block;
    height: 310px;
    background: #edf4f5;
    padding: 20px;
}

.library-cover img,
.reward-book-cover img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(23, 32, 51, .15);
}

.library-book-body,
.reward-book-body {
    padding: 20px;
}

.library-book-body small,
.reward-book-body small {
    color: #6f7f89;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: 10px;
    font-weight: 800;
}

.library-book-body h3,
.reward-book-body h3 {
    margin: 8px 0 4px;
    color: #003b46;
    font-size: 18px;
    line-height: 1.3;
}

.library-book-body p {
    margin: 0 0 16px;
    color: #7c8a93;
    font-size: 13px;
}

.reading-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #e7eff1;
}

.reading-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #07575b;
}

.reading-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 7px 0 14px;
    color: #71818b;
    font-size: 11px;
}

.library-read-button {
    width: 100%;
}

.customer-pagination {
    margin-top: 28px;
}

.customer-auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(102, 165, 173, .25), transparent 38%),
        #f5fafb;
}

.customer-auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 18px;
}

.customer-auth-card {
    width: min(520px, 100%);
    border: 1px solid #dbe8eb;
    border-radius: 26px;
    background: #ffffff;
    padding: 38px;
    box-shadow: 0 30px 80px rgba(0, 59, 70, .12);
}

.customer-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    color: #003b46;
    text-decoration: none;
}

.customer-auth-brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
}

.customer-auth-brand strong,
.customer-auth-brand small {
    display: block;
}

.customer-auth-brand small {
    color: #71818b;
    font-size: 11px;
}

.customer-auth-card h1 {
    margin: 0 0 14px;
    color: #003b46;
    font-size: clamp(32px, 7vw, 46px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.customer-auth-card > p {
    color: #6b7d86;
}

.customer-auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.customer-auth-form label {
    display: grid;
    gap: 7px;
    color: #334e57;
    font-size: 12px;
    font-weight: 750;
}

.customer-auth-form input {
    width: 100%;
    border: 1px solid #d1e1e4;
    border-radius: 12px;
    background: #ffffff;
    padding: 13px 14px;
    color: #172033;
    font: inherit;
    outline: none;
}

.customer-auth-form input:focus {
    border-color: #66a5ad;
    box-shadow: 0 0 0 3px rgba(102, 165, 173, .14);
}

.customer-auth-submit {
    width: 100%;
    margin-top: 4px;
}

.customer-auth-help {
    display: grid;
    gap: 4px;
    margin: 22px 0;
    border-radius: 14px;
    background: #f1f7f8;
    padding: 15px;
    color: #536b74;
}

.customer-auth-help small,
.password-rule {
    color: #71818b;
    line-height: 1.6;
}

.account-login-warning {
    margin: 20px 0;
    border: 1px solid #f0d6a6;
    border-radius: 14px;
    background: #fff9eb;
    padding: 16px;
    color: #6f5517;
}

.account-login-warning p {
    margin: 5px 0 10px;
}

.account-login-warning a {
    color: #07575b;
    font-weight: 800;
}

.reader-shell {
    min-height: calc(100vh - 150px);
    background: #eef5f6;
    padding: 20px;
}

.reader-topbar {
    width: min(1180px, 100%);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.reader-topbar-copy {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.reader-topbar-copy strong,
.reader-topbar-copy small {
    display: block;
}

.reader-topbar-copy strong {
    max-width: 680px;
    overflow: hidden;
    color: #003b46;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-topbar-copy small {
    color: #6e8089;
}

.reader-back {
    flex: 0 0 auto;
    color: #07575b;
    font-weight: 800;
    text-decoration: none;
}

.reader-progress-summary {
    min-width: 88px;
    text-align: right;
}

.reader-progress-summary span,
.reader-progress-summary small {
    display: block;
}

.reader-progress-summary span {
    color: #003b46;
    font-size: 22px;
    font-weight: 850;
}

.reader-progress-summary small {
    color: #71818b;
}

.secure-reader {
    position: relative;
    width: min(1180px, 100%);
    margin: auto;
    overflow: hidden;
    border: 1px solid #cadde1;
    border-radius: 22px;
    background: #26363b;
    box-shadow: 0 28px 70px rgba(0, 59, 70, .15);
}

.book-frame-wrap {
    position: relative;
}

.book-frame {
    display: block;
    width: 100%;
    height: min(76vh, 900px);
    border: 0;
    background: #39484d;
}


.reader-interaction-shield {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background: transparent;
}


.reader-controls {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    background: #ffffff;
    padding: 14px 18px;
}

.reader-control {
    border: 1px solid #ccdde1;
    border-radius: 11px;
    background: #ffffff;
    padding: 11px 14px;
    color: #07575b;
    font-weight: 800;
    cursor: pointer;
}

.reader-control:last-child {
    justify-self: end;
}

.reader-control:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.reader-page-status {
    color: #667783;
    font-size: 13px;
    text-align: center;
}

.reader-security-note {
    position: relative;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #e1eaec;
    background: #f7fbfc;
    padding: 12px 18px;
    color: #657780;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 980px) {
    .customer-welcome-grid,
    .customer-two-column {
        grid-template-columns: 1fr;
    }

    .customer-stat-grid,
    .customer-library-grid,
    .reward-book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .book-frame {
        height: 70vh;
    }
}

@media (max-width: 640px) {
    .customer-welcome {
        padding: 42px 0 26px;
    }

    .customer-stat-grid,
    .customer-library-grid,
    .reward-book-grid {
        grid-template-columns: 1fr;
    }

    .reward-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .reward-progress-row {
        justify-content: space-between;
        gap: 6px;
    }

    .reward-dot {
        width: 40px;
        height: 40px;
    }

    .last-read-book {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .last-read-book img {
        width: 82px;
        height: 112px;
    }

    .library-cover,
    .reward-book-cover {
        height: 360px;
    }

    .customer-auth-card {
        border-radius: 20px;
        padding: 26px 20px;
    }

    .reader-shell {
        padding: 10px;
    }

    .reader-topbar {
        align-items: flex-start;
    }

    .reader-topbar-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .reader-topbar-copy strong {
        max-width: 240px;
    }

    .book-frame {
        height: 68vh;
    }

    .reader-controls {
        grid-template-columns: 1fr 1fr;
    }

    .reader-page-status {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .reader-control:last-child {
        justify-self: stretch;
    }

    .reader-control {
        width: 100%;
    }

}

.customer-session-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 37, 44, .68);
    backdrop-filter: blur(8px);
}

.customer-session-modal-card {
    width: min(480px, 100%);
    border: 1px solid #d9e7ea;
    border-radius: 24px;
    background: #ffffff;
    padding: 30px;
    text-align: center;
    box-shadow: 0 28px 80px rgba(0, 35, 42, .28);
}

.session-modal-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff1d8;
    color: #8b5d00;
    font-size: 28px;
    font-weight: 900;
}

.customer-session-modal-card h2 {
    margin: 0 0 10px;
    color: #003b46;
}

.customer-session-modal-card p {
    margin: 0;
    color: #637781;
    line-height: 1.7;
}

.session-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Reader header: desktop first, existing mobile breakpoints remain active. */
.reader-topbar{
    display:block;
    width:min(1360px,100%);
    margin:0 auto 16px;
}
.reader-back{
    display:inline-flex;
    margin-bottom:12px;
}
.reader-book-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
    border:1px solid #d5e6e9;
    border-radius:18px;
    background:#ffffff;
    padding:18px 22px;
    box-shadow:0 12px 30px rgba(0,59,70,.06);
}
.reader-book-copy{
    min-width:0;
}
.reader-label{
    display:block;
    margin-bottom:4px;
    color:#66a5ad;
    font-size:10px;
    font-weight:850;
    letter-spacing:.12em;
    text-transform:uppercase;
}
.reader-book-copy h1{
    margin:0;
    overflow:hidden;
    color:#003b46;
    font-size:clamp(20px,2.1vw,30px);
    line-height:1.2;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.reader-book-copy p{
    margin:5px 0 0;
    color:#6e8089;
    font-size:13px;
}
.reader-progress-card{
    min-width:190px;
    text-align:right;
}
.reader-progress-card>span,
.reader-progress-card>small{
    display:block;
}
.reader-progress-card>span{
    color:#003b46;
    font-size:24px;
    font-weight:850;
}
.reader-progress-card>small{
    color:#71818b;
    font-size:11px;
}
.reader-progress-track{
    width:190px;
    height:7px;
    margin-top:8px;
    overflow:hidden;
    border-radius:999px;
    background:#e4eef0;
}
.reader-progress-track i{
    display:block;
    height:100%;
    border-radius:inherit;
    background:#07575b;
}
.secure-reader{
    width:min(1360px,100%);
}
.reward-book-single{
    width:min(760px,100%);
    margin-top:26px;
    display:grid;
    grid-template-columns:220px minmax(0,1fr);
}
.reward-book-single .reward-book-cover{
    height:310px;
}
.reward-status{
    margin:14px 0 18px;
    color:#637781;
    line-height:1.6;
}
.reward-status.success{
    color:#17795a;
    font-weight:750;
}
.password-input-wrap{
    position:relative;
    display:block;
}
.customer-auth-form .password-input-wrap input{
    padding-right:96px;
}
.password-visibility-toggle{
    position:absolute;
    top:50%;
    right:8px;
    transform:translateY(-50%);
    border:0;
    border-radius:9px;
    background:#eaf5f7;
    color:#07575b;
    padding:7px 10px;
    font:inherit;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
@media (max-width:640px){
    .reader-book-summary{
        align-items:flex-start;
        flex-direction:column;
        gap:14px;
        padding:16px;
    }
    .reader-book-copy h1{
        white-space:normal;
    }
    .reader-progress-card{
        width:100%;
        min-width:0;
        text-align:left;
    }
    .reader-progress-track{
        width:100%;
    }
    .reward-book-single{
        grid-template-columns:1fr;
    }
    .reward-book-single .reward-book-cover{
        height:360px;
    }
}

/* REV4 - Scroll-aware PDF reader */
.pdf-scroll-reader {
    position: relative;
    height: min(76vh, 900px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: #242424;
    scroll-behavior: smooth;
}

.pdf-reader-loading {
    min-height: 320px;
    display: grid;
    place-content: center;
    gap: 5px;
    padding: 30px;
    color: #e8f2f3;
    text-align: center;
}

.pdf-reader-loading strong,
.pdf-reader-loading span {
    display: block;
}

.pdf-reader-loading span {
    color: #b8c9cc;
    font-size: 12px;
}

.pdf-pages {
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 18px;
}

.pdf-page {
    position: relative;
    width: min(920px, 100%);
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .34);
}

.pdf-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #ffffff;
}

.pdf-page-canvas {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
}



.pdf-page-number {
    position: absolute;
    right: 10px;
    bottom: 8px;
    z-index: 3;
    border-radius: 999px;
    background: rgba(0, 59, 70, .78);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 800;
    pointer-events: none;
}

.book-frame-fallback {
    width: 100%;
    height: min(76vh, 900px);
    border: 0;
    background: #39484d;
}

.book-frame-fallback.is-visible {
    display: block;
}

/* REV4 - Loyalty experience inspired by a familiar stamp-card metaphor. */
.loyalty-page-section {
    padding-top: 44px;
    padding-bottom: 80px;
}

.loyalty-heading {
    max-width: 800px;
    margin-top: 18px;
}

.loyalty-book-card {
    position: relative;
    width: min(920px, calc(100% - 18px));
    min-height: 360px;
    margin: 34px 0 42px 18px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    border-radius: 8px 24px 24px 8px;
    background: #f4ead5;
    box-shadow: 0 28px 70px rgba(0, 59, 70, .18);
    isolation: isolate;
}

.loyalty-book-spine {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(180deg, #002f38, #07575b);
    color: #ffffff;
    box-shadow: inset -8px 0 16px rgba(0, 0, 0, .18);
}

.loyalty-book-spine span {
    transform: rotate(-90deg);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}

.loyalty-book-cover-face {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 0 22px 22px 0;
    background:
        radial-gradient(circle at 88% 14%, rgba(196, 223, 230, .24), transparent 26%),
        linear-gradient(145deg, #003b46 0%, #07575b 62%, #0b6870 100%);
    padding: 42px 46px 38px;
    color: #ffffff;
}

.loyalty-book-cover-face::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    pointer-events: none;
}

.loyalty-book-pages {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: calc(100% - 48px);
    height: calc(100% - 14px);
    z-index: 0;
    border-radius: 0 24px 24px 0;
    background:
        repeating-linear-gradient(
            180deg,
            #fffdf7 0,
            #fffdf7 3px,
            #e8ddc8 4px,
            #fffdf7 5px
        );
    box-shadow: 8px 10px 22px rgba(64, 47, 19, .15);
}

.loyalty-book-brand {
    position: relative;
    z-index: 2;
}

.loyalty-book-kicker {
    display: block;
    margin-bottom: 8px;
    color: #c4dfe6;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.loyalty-book-brand strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.06;
}

.loyalty-book-brand small {
    display: block;
    margin-top: 9px;
    color: #d7eaed;
    font-size: 12px;
}

.loyalty-stamps {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    gap: 12px;
    margin: 34px 0 26px;
}

.loyalty-stamp {
    min-height: 74px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px dashed rgba(255, 255, 255, .45);
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    color: #d6e8eb;
    backdrop-filter: blur(5px);
}

.loyalty-stamp b,
.loyalty-stamp small {
    display: block;
}

.loyalty-stamp b {
    font-size: 20px;
}

.loyalty-stamp small {
    margin-top: 2px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.loyalty-stamp.is-filled {
    border-style: solid;
    border-color: #c4dfe6;
    background: #c4dfe6;
    color: #003b46;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.loyalty-progress-copy {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: end;
}

.loyalty-progress-copy strong,
.loyalty-progress-copy span {
    display: block;
}

.loyalty-progress-copy strong {
    font-size: 15px;
}

.loyalty-progress-copy span {
    max-width: 390px;
    color: #c8dde1;
    font-size: 11px;
    text-align: right;
}

.loyalty-progress-track {
    position: relative;
    z-index: 2;
    height: 7px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
}

.loyalty-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #c4dfe6;
}

.loyalty-reward-panel {
    width: min(920px, 100%);
    border: 1px solid #d7e7ea;
    border-radius: 24px;
    background: #ffffff;
    padding: 26px;
    box-shadow: 0 16px 42px rgba(0, 59, 70, .07);
}

.loyalty-reward-panel.is-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.loyalty-reward-panel h3 {
    margin: 2px 0 8px;
    color: #003b46;
}

.loyalty-reward-panel p {
    margin: 0;
    color: #6a7c85;
}

.loyalty-reward-book {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 26px;
    align-items: center;
}

.loyalty-reward-cover {
    position: relative;
    height: 236px;
    padding: 13px 16px 13px 13px;
    border-radius: 5px 15px 15px 5px;
    background: #edf5f6;
    box-shadow: 0 16px 34px rgba(0, 59, 70, .14);
}

.loyalty-reward-cover::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 6px;
    bottom: 8px;
    width: 8px;
    border-radius: 0 8px 8px 0;
    background: repeating-linear-gradient(180deg, #ffffff 0 2px, #d9e1e3 3px 4px);
}

.loyalty-reward-cover img,
.loyalty-reward-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 4px 10px 10px 4px;
    object-fit: cover;
}

.loyalty-reward-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #003b46, #07575b);
    color: #ffffff;
    font-weight: 850;
    text-align: center;
}

.loyalty-reward-copy small {
    display: block;
    color: #70818a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.loyalty-reward-copy h3 {
    margin: 8px 0 6px;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.15;
}

.reward-panel-book {
    position: relative;
    overflow: hidden;
    border-left: 10px solid #07575b;
}

.reward-panel-book::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -20px;
    width: 120px;
    height: 160px;
    border: 8px double #e4eef0;
    border-radius: 5px 18px 18px 5px;
    opacity: .45;
    transform: rotate(14deg);
    pointer-events: none;
}

@media (max-width: 760px) {
    .pdf-scroll-reader,
    .book-frame-fallback {
        height: 72vh;
    }

    .pdf-pages {
        gap: 12px;
        padding: 10px;
    }


    .loyalty-book-card {
        width: calc(100% - 8px);
        margin-left: 8px;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .loyalty-book-cover-face {
        padding: 28px 22px 26px;
    }

    .loyalty-book-spine span {
        font-size: 8px;
    }

    .loyalty-stamps {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        margin-top: 26px;
    }

    .loyalty-stamp {
        min-height: 60px;
        border-radius: 12px;
    }

    .loyalty-stamp b {
        font-size: 16px;
    }

    .loyalty-stamp small {
        font-size: 7px;
    }

    .loyalty-progress-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .loyalty-progress-copy span {
        text-align: left;
    }

    .loyalty-reward-panel.is-empty,
    .loyalty-reward-book {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .loyalty-reward-panel.is-empty {
        display: grid;
    }

    .loyalty-reward-cover {
        width: min(240px, 100%);
        height: 330px;
        margin: auto;
    }
}


/* REV5 - Bookshelf loyalty redesign */
.reward-progress-row,
.reward-dot,
.loyalty-stamps,
.loyalty-stamp,
.loyalty-book-card,
.loyalty-book-spine,
.loyalty-book-cover-face,
.loyalty-book-pages {
    all: unset;
}

.bookshelf-widget {
    position: relative;
    margin: 24px 0 14px;
}

.bookshelf-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.bookshelf-plank {
    height: 14px;
    margin-top: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #835d33 0%, #6d4925 100%);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.22), 0 8px 18px rgba(61, 41, 20, .18);
}

.bookshelf-book {
    position: relative;
    min-height: 138px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px 12px 16px;
    border-radius: 12px 12px 4px 4px;
    color: #ffffff;
    box-shadow: 0 14px 22px rgba(0, 59, 70, .16);
    overflow: hidden;
}

.bookshelf-book::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8px;
    width: 8px;
    height: 100%;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
}

.bookshelf-book::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 32%, rgba(0,0,0,.12) 100%);
    pointer-events: none;
}

.bookshelf-book .book-number,
.bookshelf-book strong,
.bookshelf-book small {
    position: relative;
    z-index: 1;
}

.bookshelf-book .book-number {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    font-size: 12px;
    font-weight: 800;
}

.bookshelf-book strong {
    font-size: 15px;
    line-height: 1.1;
}

.bookshelf-book small {
    font-size: 11px;
    color: rgba(255,255,255,.86);
}

.bookshelf-book.is-filled:nth-child(1) { background: linear-gradient(180deg, #003b46 0%, #07575b 100%); }
.bookshelf-book.is-filled:nth-child(2) { background: linear-gradient(180deg, #0c5060 0%, #66a5ad 100%); }
.bookshelf-book.is-filled:nth-child(3) { background: linear-gradient(180deg, #1e5663 0%, #4f8d9b 100%); }
.bookshelf-book.is-filled:nth-child(4) { background: linear-gradient(180deg, #07575b 0%, #0b6870 100%); }
.bookshelf-book.is-filled:nth-child(5) { background: linear-gradient(180deg, #345d72 0%, #5f879a 100%); }

.bookshelf-book.is-empty {
    background: linear-gradient(180deg, #edf5f6 0%, #dbe8eb 100%);
    color: #4a646e;
    box-shadow: inset 0 0 0 1px #c9dce0;
}

.bookshelf-book.is-empty small,
.bookshelf-book.is-empty .book-number {
    color: #58727c;
}

.bookshelf-book.is-empty .book-number {
    background: rgba(0,59,70,.08);
}

.bookshelf-widget-compact .bookshelf-row {
    gap: 12px;
}

.bookshelf-widget-compact .bookshelf-book {
    min-height: 108px;
    padding: 14px 10px 12px;
}

.bookshelf-widget-compact .bookshelf-book strong {
    font-size: 13px;
}

.bookshelf-widget-compact .bookshelf-book small {
    font-size: 10px;
}

.loyalty-bookshelf-card {
    width: min(980px, 100%);
    border-radius: 28px;
    padding: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(196, 223, 230, .16), transparent 30%),
        linear-gradient(145deg, #003b46 0%, #07575b 62%, #0b6870 100%);
    box-shadow: 0 28px 70px rgba(0, 59, 70, .18);
}

.loyalty-bookshelf-heading {
    max-width: 760px;
}

.loyalty-bookshelf-heading strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.12;
}

.loyalty-bookshelf-heading small {
    display: block;
    margin-top: 10px;
    color: #d7eaed;
    font-size: 12px;
}

.loyalty-bookshelf-card .loyalty-progress-copy {
    margin-top: 22px;
}

.reward-panel p,
.loyalty-reward-panel p {
    line-height: 1.7;
}

@media (max-width: 900px) {
    .bookshelf-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
    }

    .bookshelf-book {
        min-height: 118px;
        padding: 14px 8px 12px;
    }

    .bookshelf-book strong {
        font-size: 12px;
    }

    .bookshelf-book small {
        font-size: 9px;
    }

    .loyalty-bookshelf-card {
        padding: 24px 20px;
        border-radius: 22px;
    }
}

@media (max-width: 640px) {
    .bookshelf-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bookshelf-book {
        min-height: 112px;
    }

    .bookshelf-widget-compact .bookshelf-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bookshelf-plank {
        height: 12px;
    }
}


/* REV7 - Mini bookshelf loyalty redesign */
.mini-bookshelf {
    margin: 24px 0 18px;
}

.mini-bookshelf-books {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.mini-book {
    position: relative;
    width: 82px;
    min-height: 126px;
    border-radius: 10px 10px 4px 4px;
    padding: 14px 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    text-align: center;
    color: #fff;
    box-shadow: 0 16px 28px rgba(0, 59, 70, .16);
    overflow: hidden;
}

.mini-book::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    width: 7px;
    height: 100%;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
}

.mini-book::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.12), transparent 35%, rgba(0,0,0,.12) 100%);
    pointer-events: none;
}

.mini-book-top,
.mini-book strong,
.mini-book small {
    position: relative;
    z-index: 1;
}

.mini-book-top {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
}

.mini-book strong {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}

.mini-book small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.88);
}

.mini-book-1 { height: 132px; }
.mini-book-2 { height: 120px; }
.mini-book-3 { height: 140px; }
.mini-book-4 { height: 128px; }
.mini-book-5 { height: 136px; }

.mini-book.is-filled.mini-book-1 { background: linear-gradient(180deg, #003b46 0%, #07575b 100%); }
.mini-book.is-filled.mini-book-2 { background: linear-gradient(180deg, #0a4e59 0%, #0b6870 100%); }
.mini-book.is-filled.mini-book-3 { background: linear-gradient(180deg, #275f73 0%, #3f8397 100%); }
.mini-book.is-filled.mini-book-4 { background: linear-gradient(180deg, #0c5060 0%, #66a5ad 100%); }
.mini-book.is-filled.mini-book-5 { background: linear-gradient(180deg, #3d6a78 0%, #6a93a3 100%); }

.mini-book.is-empty {
    background: linear-gradient(180deg, #eef5f6 0%, #d8e7ea 100%);
    color: #46616b;
    box-shadow: inset 0 0 0 1px #c9dce0;
}

.mini-book.is-empty small {
    color: #5e7780;
}

.mini-book.is-empty .mini-book-top {
    background: rgba(0,59,70,.08);
}

.mini-book-gift {
    width: 98px;
    height: 146px;
    background: linear-gradient(180deg, #fff7e7 0%, #f4e0af 100%);
    color: #845e10;
    box-shadow: inset 0 0 0 1px #efd690, 0 16px 28px rgba(132, 94, 16, .16);
}

.mini-book-gift small {
    color: #8a6518;
}

.mini-book-gift .mini-book-top {
    background: rgba(132,94,16,.12);
}

.mini-book-gift.is-open {
    background: linear-gradient(180deg, #ffe08a 0%, #e8bd4a 100%);
    color: #5a430b;
}

.mini-bookshelf-shelf {
    height: 14px;
    margin-top: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8a6437 0%, #6f4b26 100%);
    box-shadow: inset 0 2px 3px rgba(255,255,255,.22), 0 10px 20px rgba(61,41,20,.16);
}

.mini-bookshelf-compact .mini-book {
    width: 56px;
    min-height: 96px;
    padding: 10px 6px 10px;
}

.mini-bookshelf-compact .mini-book strong {
    font-size: 20px;
}

.mini-bookshelf-compact .mini-book small {
    font-size: 9px;
}

.mini-bookshelf-compact .mini-book-1 { height: 102px; }
.mini-bookshelf-compact .mini-book-2 { height: 92px; }
.mini-bookshelf-compact .mini-book-3 { height: 110px; }
.mini-bookshelf-compact .mini-book-4 { height: 98px; }
.mini-bookshelf-compact .mini-book-5 { height: 106px; }

.mini-bookshelf-large .mini-book {
    width: 104px;
}

.mini-bookshelf-large .mini-book strong {
    font-size: 32px;
}

@media (max-width: 768px) {
    .mini-bookshelf-books {
        gap: 10px;
    }

    .mini-book,
    .mini-bookshelf-large .mini-book {
        width: 72px;
        min-height: 112px;
        padding: 12px 8px 10px;
    }

    .mini-book strong,
    .mini-bookshelf-large .mini-book strong {
        font-size: 24px;
    }

    .mini-book small {
        font-size: 10px;
    }

    .mini-book-gift {
        width: 84px;
        height: 126px;
    }
}

/* REV9 - Customer profile */
.profile-section {
    padding-top: 48px;
    padding-bottom: 72px;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
    gap: 28px;
    align-items: start;
}

.profile-intro-card,
.profile-form-card {
    border: 1px solid #d9e8eb;
    border-radius: 24px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 18px 46px rgba(0, 59, 70, .07);
}

.profile-intro-card h1 {
    margin: 8px 0 12px;
    color: #003b46;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.08;
}

.profile-intro-card > p {
    color: #667a84;
    line-height: 1.7;
}

.profile-identity-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 16px;
    border-radius: 16px;
    background: #eef7f8;
}

.profile-identity-summary > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #07575b;
    color: #fff;
    font-weight: 900;
}

.profile-identity-summary strong,
.profile-identity-summary small {
    display: block;
}

.profile-identity-summary strong {
    color: #003b46;
}

.profile-identity-summary small {
    margin-top: 3px;
    color: #71818b;
}

.profile-form-card {
    display: grid;
    gap: 18px;
}

.profile-form-card label {
    display: grid;
    gap: 7px;
    color: #334e57;
    font-size: 12px;
    font-weight: 800;
}

.profile-form-card input {
    width: 100%;
    border: 1px solid #d1e1e4;
    border-radius: 12px;
    background: #fff;
    padding: 13px 14px;
    color: #172033;
    font: inherit;
    outline: none;
}

.profile-form-card input[readonly] {
    background: #f5f8f9;
    color: #667a84;
}

.profile-form-card input:focus:not([readonly]) {
    border-color: #66a5ad;
    box-shadow: 0 0 0 3px rgba(102, 165, 173, .14);
}

.profile-form-card label small {
    color: #7b8c96;
    font-weight: 500;
    line-height: 1.5;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-meta-grid > div {
    border-radius: 14px;
    background: #f1f7f8;
    padding: 14px;
}

.profile-meta-grid span,
.profile-meta-grid strong {
    display: block;
}

.profile-meta-grid span {
    color: #71818b;
    font-size: 11px;
}

.profile-meta-grid strong {
    margin-top: 4px;
    color: #003b46;
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .profile-intro-card,
    .profile-form-card {
        padding: 22px 18px;
    }

    .profile-meta-grid {
        grid-template-columns: 1fr;
    }
}


/* REV17 - Sharper PDF reader + compact fullscreen control; watermark removed */
.reader-fullscreen-toggle {
    position: absolute;
    right: 14px;
    bottom: 54px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(0,59,70,.90);
    color: #fff;
    padding: 8px 11px;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(0,0,0,.20);
    backdrop-filter: blur(8px);
}
.reader-fullscreen-toggle:hover { background: #07575b; }

.secure-reader:fullscreen,
.secure-reader.is-reader-focus-mode {
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #1f2527;
}
.secure-reader:fullscreen .pdf-scroll-reader,
.secure-reader.is-reader-focus-mode .pdf-scroll-reader {
    flex: 1 1 auto;
    height: 100vh;
    max-height: none;
}
.secure-reader:fullscreen .reader-security-note,
.secure-reader.is-reader-focus-mode .reader-security-note { display: none; }
.secure-reader:fullscreen .reader-fullscreen-toggle,
.secure-reader.is-reader-focus-mode .reader-fullscreen-toggle {
    position: fixed;
    right: 14px;
    bottom: 14px;
}
.secure-reader.is-reader-focus-mode {
    position: fixed;
    inset: 0;
    z-index: 9999;
}
body.reader-focus-active { overflow: hidden; }
.pdf-page-canvas { image-rendering: auto; }

@media (max-width: 760px) {
    .reader-fullscreen-toggle {
        right: 10px;
        bottom: 58px;
        padding: 7px 10px;
        font-size: 9px;
    }
    .pdf-pages { padding-left: 8px; padding-right: 8px; }
}


/* REV18 - Reader control spacing: fullscreen button no longer overlaps legal note */
.reader-action-bar {
    position: relative;
    z-index: 18;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 54px;
    padding: 10px 14px;
    border-top: 1px solid #334449;
    background: #ffffff;
}

.reader-action-bar .reader-fullscreen-toggle {
    position: static;
    right: auto;
    bottom: auto;
    margin: 0;
    flex: 0 0 auto;
}

.secure-reader:fullscreen .reader-action-bar,
.secure-reader.is-reader-focus-mode .reader-action-bar {
    position: absolute;
    inset: auto 0 0 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.secure-reader:fullscreen .reader-action-bar .reader-fullscreen-toggle,
.secure-reader.is-reader-focus-mode .reader-action-bar .reader-fullscreen-toggle {
    position: fixed;
    right: 16px;
    bottom: 16px;
    pointer-events: auto;
}

@media (max-width: 760px) {
    .reader-action-bar {
        min-height: 58px;
        padding: 10px 16px;
    }

    .reader-action-bar .reader-fullscreen-toggle {
        min-height: 38px;
        padding: 9px 13px;
        font-size: 10px;
    }
}
