:root{--ebook-bg:#151719;--ebook-panel:#202326;--ebook-line:rgba(255,255,255,.12);--ebook-text:#f5f5f2;--ebook-muted:#a7aaad;--ebook-accent:#d7b36a}
*{box-sizing:border-box}.ebook-list-wrap{max-width:1320px;margin:0 auto;padding:80px 24px 110px}.ebook-list-head{margin-bottom:42px}.ebook-kicker{margin:0 0 12px;font-size:12px;letter-spacing:.22em;font-weight:700;color:#9d7a38}.ebook-list-head h1{margin:0;font-size:clamp(34px,5vw,62px);letter-spacing:-.045em}.ebook-list-head>p:last-child{margin:14px 0 0;color:#73777b;font-size:16px}.ebook-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px}.ebook-card{overflow:hidden;border:1px solid #e5e5e1;border-radius:18px;background:#fff;box-shadow:0 18px 45px rgba(0,0,0,.06);transition:.25s}.ebook-card:hover{transform:translateY(-5px);box-shadow:0 24px 55px rgba(0,0,0,.1)}.ebook-cover{display:flex;aspect-ratio:3/4;align-items:center;justify-content:center;overflow:hidden;background:#ecebe7}.ebook-cover img{width:100%;height:100%;object-fit:cover}.ebook-cover-placeholder{font-size:14px;letter-spacing:.2em;color:#777}.ebook-card-body{padding:22px}.ebook-category{display:inline-block;margin-bottom:10px;font-size:12px;color:#8b6b2f}.ebook-card h2{margin:0;font-size:20px;line-height:1.35}.ebook-card h2 a{color:#17191b;text-decoration:none}.ebook-card-body>p{min-height:44px;margin:10px 0 18px;color:#777;font-size:14px;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ebook-card-meta{display:flex;justify-content:space-between;align-items:center;color:#999;font-size:12px}.ebook-card-meta a{font-size:13px;font-weight:700;color:#222;text-decoration:none}.ebook-empty{padding:90px 20px;border:1px solid #e6e6e2;border-radius:16px;text-align:center;color:#888}
.ebook-viewer-shell{min-height:100vh;background:radial-gradient(circle at 50% 15%,#2b2e31 0,#151719 55%,#0f1011 100%);color:var(--ebook-text);display:flex;flex-direction:column}.ebook-viewer-header{height:72px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ebook-line);background:rgba(12,13,14,.78);backdrop-filter:blur(16px);z-index:10}.ebook-brand-block{display:flex;align-items:center;gap:16px;min-width:0}.ebook-brand{font-size:13px;font-weight:800;letter-spacing:.14em;color:#fff;text-decoration:none;white-space:nowrap}.ebook-header-divider{width:1px;height:26px;background:var(--ebook-line)}.ebook-viewer-title{min-width:0}.ebook-viewer-title strong{display:block;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.ebook-viewer-title span{display:block;margin-top:3px;font-size:11px;color:var(--ebook-muted)}.ebook-viewer-actions{display:flex;gap:8px;align-items:center}.ebook-viewer-actions button,.ebook-viewer-actions a,.ebook-toolbar button{border:1px solid var(--ebook-line);border-radius:9px;background:rgba(255,255,255,.06);color:#fff;padding:10px 13px;text-decoration:none;font-size:12px;cursor:pointer}.ebook-viewer-actions .ebook-action-primary{background:#f3f1eb;color:#18191a;border-color:#f3f1eb;font-weight:700}.ebook-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:24px 80px;overflow:hidden}.ebook-loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:8px;text-align:center}.ebook-loading strong{font-size:17px}.ebook-loading span{font-size:13px;color:var(--ebook-muted)}.ebook-book{visibility:hidden}.ebook-page{background:#fff;overflow:hidden}.ebook-page img{display:block;width:100%;height:100%;object-fit:contain;background:#fff}.ebook-toolbar{height:66px;display:flex;align-items:center;justify-content:center;gap:18px;border-top:1px solid var(--ebook-line);background:rgba(12,13,14,.8)}.ebook-page-status{min-width:90px;text-align:center;font-size:14px;color:#d4d4d1}
@media(max-width:1024px){.ebook-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ebook-stage{padding:20px 40px}.ebook-viewer-actions a:not(.ebook-action-primary){display:none}}
@media(max-width:767px){.ebook-list-wrap{padding:52px 16px 80px}.ebook-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ebook-card{border-radius:13px}.ebook-card-body{padding:15px}.ebook-card h2{font-size:16px}.ebook-card-body>p{display:none}.ebook-viewer-header{height:auto;min-height:66px;padding:9px 10px;gap:8px}.ebook-brand{font-size:11px;letter-spacing:.1em}.ebook-header-divider{display:none}.ebook-viewer-title strong{max-width:34vw;font-size:13px}.ebook-viewer-title span{display:none}.ebook-viewer-actions button,.ebook-viewer-actions a{padding:9px 10px;font-size:11px}.ebook-viewer-actions #shareBtn{display:none}.ebook-stage{padding:14px 8px}.ebook-toolbar{height:60px}}
@media(max-width:420px){.ebook-grid{grid-template-columns:1fr 1fr}.ebook-card h2{font-size:14px}.ebook-category{font-size:10px}.ebook-card-meta span{display:none}.ebook-brand{display:none}.ebook-viewer-title strong{max-width:42vw}.ebook-viewer-actions .ebook-action-primary{padding:9px}.ebook-viewer-actions #fullscreenBtn{padding:9px}}

/* =========================================================
   E-BOOK VISUAL POLISH STEP 4
   PageFlip 크기 계산은 건드리지 않고 시각 완성도만 개선
   ========================================================= */

.ebook-standalone-body {
    margin: 0;
    background: #0f1113;
    color: var(--ebook-text);
    overflow: hidden;
}

.ebook-viewer-shell {
    position: relative;
    isolation: isolate;
}

.ebook-viewer-shell::before,
.ebook-viewer-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .2;
    z-index: 0;
}

.ebook-viewer-shell::before {
    width: 34vw;
    height: 34vw;
    min-width: 280px;
    min-height: 280px;
    left: 8%;
    top: 8%;
    background: rgba(215,179,106,.18);
}

.ebook-viewer-shell::after {
    width: 28vw;
    height: 28vw;
    min-width: 240px;
    min-height: 240px;
    right: 5%;
    bottom: 5%;
    background: rgba(88,110,130,.18);
}

.ebook-viewer-header,
.ebook-stage,
.ebook-toolbar {
    position: relative;
    z-index: 1;
}

.ebook-viewer-header {
    box-shadow: 0 10px 30px rgba(0,0,0,.16);
}

.ebook-viewer-actions button,
.ebook-viewer-actions a,
.ebook-toolbar button {
    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease,
        opacity .2s ease,
        transform .2s ease;
}

.ebook-viewer-actions button:hover,
.ebook-viewer-actions a:hover,
.ebook-toolbar button:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.24);
    transform: translateY(-1px);
}

.ebook-viewer-actions .ebook-action-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #111;
}

.ebook-toolbar button:disabled {
    opacity: .28;
    cursor: default;
    transform: none;
}

.ebook-toolbar button:disabled:hover {
    background: rgba(255,255,255,.06);
    border-color: var(--ebook-line);
    transform: none;
}

.ebook-stage {
    background:
        radial-gradient(circle at 50% 52%, rgba(255,255,255,.045), transparent 42%);
}

.ebook-book {
    transition: opacity .35s ease, filter .35s ease;
}

.ebook-book[style*="visible"] {
    filter: drop-shadow(0 26px 42px rgba(0,0,0,.42));
}

.ebook-loading {
    min-width: 260px;
    padding: 28px 30px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    background: rgba(18,20,22,.7);
    box-shadow: 0 22px 50px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
}

.ebook-loading::before {
    content: "";
    display: block;
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border: 3px solid rgba(255,255,255,.14);
    border-top-color: var(--ebook-accent);
    border-radius: 50%;
    animation: ebook-spin .9s linear infinite;
}

@keyframes ebook-spin {
    to { transform: rotate(360deg); }
}

.ebook-page-status {
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    font-variant-numeric: tabular-nums;
}

.ebook-viewer-shell:fullscreen {
    background: #0d0f11;
}

.ebook-viewer-shell:fullscreen .ebook-viewer-header {
    height: 58px;
    background: rgba(8,9,10,.6);
}

.ebook-viewer-shell:fullscreen .ebook-toolbar {
    height: 54px;
    background: rgba(8,9,10,.62);
}

.ebook-viewer-shell:fullscreen .ebook-stage {
    padding-top: 14px;
    padding-bottom: 14px;
}

@media (max-width: 767px) {
    .ebook-viewer-shell::before,
    .ebook-viewer-shell::after {
        opacity: .12;
        filter: blur(70px);
    }

    .ebook-viewer-actions {
        gap: 6px;
    }

    .ebook-viewer-actions button,
    .ebook-viewer-actions a,
    .ebook-toolbar button {
        min-height: 40px;
        border-radius: 10px;
    }

    .ebook-loading {
        width: calc(100vw - 40px);
        max-width: 340px;
        min-width: 0;
        padding: 24px 20px;
    }

    .ebook-page-status {
        min-width: 76px;
        padding: 7px 10px;
    }
}

/* =========================================================
   E-BOOK MOBILE & TABLET STEP 5
   PageFlip 크기와 JS 동작은 변경하지 않음
   ========================================================= */

.ebook-viewer-header {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
}

.ebook-toolbar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 1024px) {
    .ebook-viewer-header {
        gap: 12px;
    }

    .ebook-brand-block {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ebook-viewer-title strong {
        max-width: 34vw;
    }

    .ebook-viewer-actions {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .ebook-standalone-body {
        min-height: 100dvh;
    }

    .ebook-viewer-shell {
        min-height: 100dvh;
        height: 100dvh;
    }

    .ebook-viewer-header {
        min-height: 58px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
        align-items: center;
    }

    .ebook-brand-block {
        gap: 8px;
    }

    .ebook-brand {
        display: none;
    }

    .ebook-viewer-title {
        min-width: 0;
    }

    .ebook-viewer-title strong {
        max-width: 42vw;
        font-size: 13px;
        line-height: 1.25;
    }

    .ebook-viewer-title span {
        display: none;
    }

    .ebook-viewer-actions {
        gap: 5px;
    }

    .ebook-viewer-actions button,
    .ebook-viewer-actions a {
        min-width: 42px;
        min-height: 40px;
        padding: 9px 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    .ebook-viewer-actions .ebook-action-primary {
        font-size: 0;
        width: 42px;
        padding: 0;
    }

    .ebook-viewer-actions .ebook-action-primary::before {
        content: "목록";
        font-size: 11px;
    }

    .ebook-viewer-actions #shareBtn {
        display: inline-flex;
        font-size: 0;
    }

    .ebook-viewer-actions #shareBtn::before {
        content: "공유";
        font-size: 11px;
    }

    .ebook-viewer-actions #fullscreenBtn {
        font-size: 0;
    }

    .ebook-viewer-actions #fullscreenBtn::before {
        content: "확대";
        font-size: 11px;
    }

    .ebook-stage {
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .ebook-toolbar {
        min-height: 64px;
        height: auto;
        gap: 12px;
    }

    .ebook-toolbar button {
        min-width: 74px;
        min-height: 44px;
        padding: 11px 16px;
        font-size: 13px;
        font-weight: 700;
    }

    .ebook-page-status {
        min-width: 82px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .ebook-viewer-title strong {
        max-width: 38vw;
    }

    .ebook-viewer-actions button,
    .ebook-viewer-actions a,
    .ebook-viewer-actions .ebook-action-primary {
        width: 40px;
        min-width: 40px;
        padding-left: 0;
        padding-right: 0;
    }

    .ebook-toolbar {
        gap: 8px;
    }

    .ebook-toolbar button {
        min-width: 66px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ebook-page-status {
        min-width: 68px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .ebook-viewer-header {
        min-height: 50px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .ebook-toolbar {
        min-height: 50px;
        height: 50px;
        padding-bottom: 0;
    }

    .ebook-toolbar button {
        min-height: 36px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .ebook-stage {
        padding-top: 6px;
        padding-bottom: 6px;
    }
}


/* =========================================================
   PAGEBRICK v3.7 VIEWER CONTROLS
   PageFlip 내부 크기 계산은 변경하지 않고 외부 조작 UI만 개선
   ========================================================= */
.ebook-stage{
    overscroll-behavior:contain;
}
.ebook-book{
    --viewer-zoom:1;
    transform:scale(var(--viewer-zoom));
    transform-origin:center center;
    transition:transform .18s ease;
    will-change:transform;
}
.ebook-stage.is-zoomed{
    overflow:auto;
    align-items:flex-start;
    justify-content:flex-start;
    padding-top:40px;
    padding-bottom:40px;
}
.ebook-stage.is-zoomed .ebook-book{
    margin:auto;
}
.ebook-toolbar{
    min-height:70px;
    height:auto;
    padding-top:10px;
    padding-bottom:max(10px,env(safe-area-inset-bottom));
    gap:12px;
    flex-wrap:wrap;
}
.ebook-toolbar-group{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
}
.ebook-toolbar button{
    min-width:44px;
    min-height:40px;
    padding:9px 12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height:1;
    white-space:nowrap;
}
.ebook-toolbar button:disabled{
    opacity:.35;
    cursor:not-allowed;
}
.ebook-toolbar button:not(:disabled):hover,
.ebook-viewer-actions button:hover,
.ebook-viewer-actions a:hover{
    border-color:rgba(255,255,255,.28);
    background:rgba(255,255,255,.12);
}
.ebook-page-status{
    min-width:88px;
    padding:8px 12px;
    border:1px solid var(--ebook-line);
    border-radius:9px;
    background:rgba(0,0,0,.18);
    font-variant-numeric:tabular-nums;
}
#zoomResetBtn{
    min-width:68px;
    font-variant-numeric:tabular-nums;
}
#zoomOutBtn,#zoomInBtn{
    font-size:18px;
}
@media(max-width:767px){
    .ebook-toolbar{
        min-height:72px;
        padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
        gap:7px;
        justify-content:space-between;
        flex-wrap:nowrap;
    }
    .ebook-toolbar-group{gap:4px}
    .ebook-toolbar button{
        min-width:40px;
        min-height:42px;
        padding:8px 9px;
        font-size:11px;
        border-radius:9px;
    }
    .ebook-page-status{
        min-width:68px;
        padding:8px 7px;
        font-size:12px;
    }
    #firstBtn,#lastBtn{
        display:none;
    }
    #zoomResetBtn{
        min-width:58px;
        padding-left:7px;
        padding-right:7px;
    }
    .ebook-stage.is-zoomed{
        padding:24px 12px;
    }
}
@media(max-width:390px){
    .ebook-toolbar button{min-width:38px;padding-left:7px;padding-right:7px}
    .ebook-page-status{min-width:62px}
    #zoomResetBtn{min-width:54px}
}


/* =========================================================
   PAGEBRICK v3.8 ACTUAL ZOOM MODE
   PageFlip 내부 크기값은 유지하고 외부 캔버스만 확대
   ========================================================= */
.ebook-stage{
    position:relative;
    overflow:hidden;
    cursor:default;
}
.ebook-zoom-canvas{
    position:relative;
    flex:0 0 auto;
    width:100%;
    height:100%;
    min-width:100%;
    min-height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.ebook-zoom-canvas .ebook-book{
    flex:0 0 auto;
}
.ebook-stage.is-zoomed{
    overflow:auto;
    align-items:initial;
    justify-content:initial;
    padding:0;
    cursor:grab;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}
.ebook-stage.is-zoomed.is-dragging{
    cursor:grabbing;
}
.ebook-stage.is-zoomed .ebook-book{
    margin:0;
    pointer-events:none;
}
.ebook-zoom-guide{
    position:absolute;
    top:14px;
    left:50%;
    z-index:30;
    transform:translate(-50%,-8px);
    padding:7px 11px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:999px;
    background:rgba(18,20,24,.78);
    color:rgba(255,255,255,.84);
    font-size:11px;
    font-weight:700;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease,transform .18s ease;
    backdrop-filter:blur(8px);
}
.ebook-zoom-guide.is-visible{
    opacity:1;
    transform:translate(-50%,0);
}
.ebook-toolbar button.is-zoom-locked{
    opacity:.38;
}
@media(max-width:767px){
    .ebook-zoom-guide{top:10px;max-width:calc(100% - 24px);white-space:nowrap}
}

/* =========================================================
   PAGEBRICK v3.8.1 TOOLBAR LAYOUT FIX
   PageFlip 렌더링 후에도 하단 조작바를 뷰포트 안에 고정
   ========================================================= */
html,
body.ebook-standalone-body{
    width:100%;
    height:100%;
    min-height:100%;
}
body.ebook-standalone-body{
    overflow:hidden;
}
.ebook-viewer-shell{
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    max-height:100vh;
    max-height:100dvh;
    overflow:hidden;
}
.ebook-viewer-header,
.ebook-toolbar{
    flex:0 0 auto;
}
.ebook-stage{
    flex:1 1 0;
    width:100%;
    min-width:0;
    min-height:0;
    overflow:hidden;
}
.ebook-zoom-canvas{
    position:absolute;
    inset:0;
    width:auto;
    height:auto;
    min-width:100%;
    min-height:100%;
}
.ebook-stage.is-zoomed{
    overflow:auto;
}
.ebook-stage.is-zoomed .ebook-zoom-canvas{
    inset:auto;
}
.ebook-toolbar{
    position:relative;
    z-index:50;
    width:100%;
    margin:0;
}
@supports not (height:100dvh){
    .ebook-viewer-shell{
        height:100vh;
        max-height:100vh;
    }
}


/* =========================================================
   PAGEBRICK v3.9 STABLE DETAIL ZOOM
   PageFlip와 완전히 분리된 고정 확대 레이어
   ========================================================= */
.ebook-detail-zoom{
    position:absolute;
    inset:0;
    z-index:40;
    display:none;
    overflow:hidden;
    background:#101214;
}
.ebook-detail-zoom.is-open{
    display:block;
}
.ebook-detail-zoom-backdrop{
    position:absolute;
    inset:0;
    background:radial-gradient(circle at 50% 40%,#272a2d 0,#111315 62%,#0c0d0f 100%);
}
.ebook-detail-zoom-stage{
    position:absolute;
    inset:0;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:grab;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
}
.ebook-detail-zoom.is-dragging .ebook-detail-zoom-stage{
    cursor:grabbing;
}
.ebook-detail-zoom-stage img{
    display:block;
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
    transform-origin:center center;
    will-change:transform;
    pointer-events:none;
    box-shadow:0 24px 70px rgba(0,0,0,.48);
}
.ebook-detail-zoom-guide{
    position:absolute;
    top:18px;
    left:50%;
    z-index:2;
    transform:translate(-50%,-8px);
    padding:8px 12px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:999px;
    background:rgba(12,14,16,.78);
    color:rgba(255,255,255,.86);
    font-size:11px;
    font-weight:700;
    opacity:0;
    pointer-events:none;
    backdrop-filter:blur(10px);
    transition:opacity .18s ease,transform .18s ease;
}
.ebook-detail-zoom-guide.is-visible{
    opacity:1;
    transform:translate(-50%,0);
}
body.ebook-detail-zoom-open{
    overflow:hidden!important;
}
@media(max-width:767px){
    .ebook-detail-zoom-guide{
        top:10px;
        max-width:calc(100% - 24px);
        white-space:nowrap;
    }
}


/* v3.9.1 spread zoom */
.ebook-detail-zoom.is-spread .ebook-detail-zoom-stage img{
    max-width:calc(100% - 28px);
    max-height:calc(100% - 28px);
}
@media(max-width:767px){
    .ebook-detail-zoom.is-spread .ebook-detail-zoom-stage img{
        max-width:100%;
        max-height:100%;
    }
}


/* =========================================================
   PAGEBRICK v4.0 MOBILE VIEW MODE
   휴대폰 세로 한 페이지 / 가로 펼침 보기
   ========================================================= */
@media (max-width:767px) and (orientation:portrait){
    .ebook-stage{
        padding-left:max(6px,env(safe-area-inset-left));
        padding-right:max(6px,env(safe-area-inset-right));
    }
    .ebook-toolbar{
        min-height:68px;
        gap:6px;
    }
    .ebook-toolbar-pages{
        flex:1 1 auto;
    }
    .ebook-toolbar-zoom{
        flex:0 0 auto;
    }
    #prevBtn,#nextBtn{
        min-width:48px;
    }
}

@media (max-width:767px) and (orientation:landscape){
    .ebook-viewer-header{
        min-height:46px;
        padding-top:5px;
        padding-bottom:5px;
    }
    .ebook-toolbar{
        min-height:48px;
        height:48px;
        padding-top:5px;
        padding-bottom:5px;
        flex-wrap:nowrap;
    }
    .ebook-toolbar button{
        min-height:34px;
        padding-top:6px;
        padding-bottom:6px;
    }
    .ebook-stage{
        padding-top:4px;
        padding-bottom:4px;
    }
}


/* =========================================================
   PAGEBRICK v4.1 PAGE THUMBNAILS
   ========================================================= */
.ebook-thumbnail-panel{
    position:absolute;
    inset:0;
    z-index:35;
    visibility:hidden;
    pointer-events:none;
}
.ebook-thumbnail-panel.is-open{
    visibility:visible;
    pointer-events:auto;
}
.ebook-thumbnail-backdrop{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(0,0,0,.48);
    opacity:0;
    transition:opacity .18s ease;
}
.ebook-thumbnail-panel.is-open .ebook-thumbnail-backdrop{
    opacity:1;
}
.ebook-thumbnail-sheet{
    position:absolute;
    top:0;
    bottom:0;
    left:0;
    width:min(360px,88vw);
    display:flex;
    flex-direction:column;
    background:#17191b;
    border-right:1px solid rgba(255,255,255,.12);
    box-shadow:18px 0 48px rgba(0,0,0,.36);
    transform:translateX(-102%);
    transition:transform .22s ease;
}
.ebook-thumbnail-panel.is-open .ebook-thumbnail-sheet{
    transform:translateX(0);
}
.ebook-thumbnail-head{
    min-height:66px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:13px 16px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.ebook-thumbnail-head strong{
    display:block;
    font-size:15px;
}
.ebook-thumbnail-head span{
    display:block;
    margin-top:4px;
    color:var(--ebook-muted);
    font-size:11px;
}
.ebook-thumbnail-head button{
    min-width:56px;
    min-height:36px;
    padding:8px 11px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:8px;
    background:rgba(255,255,255,.06);
    color:#fff;
    cursor:pointer;
}
.ebook-thumbnail-list{
    flex:1;
    min-height:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    align-content:start;
    overflow:auto;
    padding:15px;
    overscroll-behavior:contain;
}
.ebook-thumbnail-item{
    position:relative;
    display:flex;
    flex-direction:column;
    gap:7px;
    width:100%;
    margin:0;
    padding:7px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:10px;
    background:rgba(255,255,255,.035);
    color:#fff;
    cursor:pointer;
    transition:border-color .16s ease,background .16s ease,transform .16s ease;
}
.ebook-thumbnail-item:hover{
    border-color:rgba(255,255,255,.28);
    background:rgba(255,255,255,.07);
}
.ebook-thumbnail-item.is-active{
    border-color:var(--ebook-accent);
    background:color-mix(in srgb,var(--ebook-accent) 16%,transparent);
    box-shadow:0 0 0 1px color-mix(in srgb,var(--ebook-accent) 55%,transparent);
}
.ebook-thumbnail-preview{
    position:relative;
    display:block;
    width:100%;
    aspect-ratio:3 / 4;
    overflow:hidden;
    border-radius:6px;
    background:#fff;
}
.ebook-thumbnail-preview img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    background:#fff;
}
.ebook-thumbnail-number{
    display:block;
    text-align:center;
    color:#c9cbcd;
    font-size:11px;
    font-weight:700;
}
.ebook-toolbar-navigation{
    flex:0 0 auto;
}
body.ebook-thumbnail-open{
    overflow:hidden!important;
}

@media(max-width:767px){
    .ebook-thumbnail-sheet{
        top:auto;
        right:0;
        bottom:0;
        left:0;
        width:100%;
        max-height:min(72vh,620px);
        border-top:1px solid rgba(255,255,255,.12);
        border-right:0;
        border-radius:16px 16px 0 0;
        box-shadow:0 -18px 48px rgba(0,0,0,.4);
        transform:translateY(102%);
    }
    .ebook-thumbnail-panel.is-open .ebook-thumbnail-sheet{
        transform:translateY(0);
    }
    .ebook-thumbnail-list{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:10px;
        padding:12px;
    }
    .ebook-thumbnail-head{
        min-height:58px;
        padding:10px 13px;
    }
}

@media(max-width:420px){
    .ebook-thumbnail-list{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:8px;
        padding:10px;
    }
    .ebook-thumbnail-item{
        padding:5px;
    }
}


/* =========================================================
   PAGEBRICK v4.2 SHARE AND QR
   ========================================================= */
.ebook-share-panel{
    position:absolute;
    inset:0;
    z-index:38;
    visibility:hidden;
    pointer-events:none;
}
.ebook-share-panel.is-open{
    visibility:visible;
    pointer-events:auto;
}
.ebook-share-backdrop{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(0,0,0,.58);
    opacity:0;
    transition:opacity .18s ease;
}
.ebook-share-panel.is-open .ebook-share-backdrop{
    opacity:1;
}
.ebook-share-sheet{
    position:absolute;
    top:50%;
    left:50%;
    width:min(680px,calc(100% - 32px));
    max-height:calc(100% - 40px);
    overflow:auto;
    border:1px solid rgba(255,255,255,.13);
    border-radius:16px;
    background:#191b1e;
    box-shadow:0 28px 80px rgba(0,0,0,.52);
    transform:translate(-50%,-46%) scale(.98);
    opacity:0;
    transition:transform .2s ease,opacity .2s ease;
}
.ebook-share-panel.is-open .ebook-share-sheet{
    transform:translate(-50%,-50%) scale(1);
    opacity:1;
}
.ebook-share-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 18px;
    border-bottom:1px solid rgba(255,255,255,.1);
}
.ebook-share-head strong{
    display:block;
    font-size:16px;
}
.ebook-share-head span{
    display:block;
    margin-top:4px;
    color:var(--ebook-muted);
    font-size:11px;
}
.ebook-share-head button{
    min-width:56px;
    min-height:36px;
    padding:8px 11px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:8px;
    background:rgba(255,255,255,.06);
    color:#fff;
    cursor:pointer;
}
.ebook-share-body{
    display:grid;
    grid-template-columns:240px minmax(0,1fr);
    gap:22px;
    padding:20px;
}
.ebook-share-qr-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:10px;
    border-radius:12px;
    background:#fff;
}
.ebook-share-qr-wrap canvas{
    display:block;
    width:220px;
    height:220px;
    max-width:100%;
}
.ebook-share-info{
    min-width:0;
}
.ebook-share-info>label{
    display:block;
    margin-bottom:7px;
    color:#ddd;
    font-size:12px;
    font-weight:700;
}
.ebook-share-url-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px;
}
.ebook-share-url-row input{
    min-width:0;
    height:42px;
    padding:0 11px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:8px;
    background:#101214;
    color:#fff;
    font:inherit;
    font-size:12px;
}
.ebook-share-url-row button,
.ebook-share-actions button{
    min-height:42px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:8px;
    background:rgba(255,255,255,.07);
    color:#fff;
    font-weight:700;
    cursor:pointer;
}
.ebook-share-options{
    margin-top:13px;
    color:#d7d7d7;
    font-size:12px;
}
.ebook-share-options label{
    display:flex;
    align-items:center;
    gap:7px;
}
.ebook-share-options input{
    width:16px;
    height:16px;
}
.ebook-share-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:18px;
}
.ebook-share-actions button:first-child{
    background:var(--ebook-accent);
    border-color:var(--ebook-accent);
}
.ebook-share-notice{
    min-height:18px;
    margin:12px 0 0;
    color:#9fd7ae;
    font-size:11px;
}
body.ebook-share-open{
    overflow:hidden!important;
}

@media(max-width:640px){
    .ebook-share-sheet{
        top:auto;
        right:0;
        bottom:0;
        left:0;
        width:100%;
        max-height:86vh;
        border-right:0;
        border-bottom:0;
        border-left:0;
        border-radius:16px 16px 0 0;
        transform:translateY(102%);
    }
    .ebook-share-panel.is-open .ebook-share-sheet{
        transform:translateY(0);
    }
    .ebook-share-body{
        grid-template-columns:1fr;
        gap:16px;
        padding:16px;
    }
    .ebook-share-qr-wrap{
        width:220px;
        max-width:100%;
        margin:0 auto;
    }
}


/* PAGEBRICK v4.2.2 copy feedback */
#copyShareUrlBtn.is-copy-success{
    background:#23864b!important;
    border-color:#23864b!important;
    color:#fff!important;
}

/* PAGEBRICK v4.2.4 copy status */
#copyShareUrlBtn.is-copy-success{background:#23864b!important;border-color:#23864b!important;color:#fff!important}

/* PAGEBRICK v4.2.5 top copy feedback */
#shareBtn.is-copy-success{
    background:#23864b!important;
    border-color:#23864b!important;
    color:#fff!important;
}

/* PAGEBRICK v4.2.6 QR panel stability */
.ebook-share-panel{position:fixed!important;inset:0!important;z-index:99999!important;}
.ebook-share-panel.is-open{display:block!important;visibility:visible!important;pointer-events:auto!important;}
.ebook-share-panel.is-open .ebook-share-sheet{opacity:1!important;}
