main > section:first-of-type {
    margin-top: var(--header-height-1px, 120px);
}

.flipbook-section { 
    background-color: transparent; 
    box-sizing: border-box; 
    padding-bottom: 40px;
    overflow: hidden;
}

.flipbook-section > ._container {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.flipbook-layout-wrapper { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start; 
    width: 100%; 
    box-sizing: border-box; 
}

.flipbook-viewer-col { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    background: transparent; 
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box; 
    position: relative;
}

.flipbook-wrapper { 
    width: 100%; 
    display: flex; 
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    background: #14254b;
    border: none;
    border-radius: 0;
    padding: 24px 24px 86px 24px;
    box-shadow: none;
    box-sizing: border-box; 
    position: relative;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.flipbook-wrapper.is-zoomed {
    touch-action: none;
}

.flipbook-viewer-col.is-immersive .flipbook-controls,
.flipbook-viewer-col.is-immersive .flipbook-progress-track {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(25px) !important;
}

.flipbook-zoom-wrapper { 
    width: 100%;
    aspect-ratio: 1000 / 707;
    max-height: calc(70vh - 40px);
    max-width: calc((70vh - 40px) * 1.4144);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center center;
    will-change: transform;
    transition: max-width 0.4s ease-in-out, aspect-ratio 0.4s ease-in-out;
}

.flip-book { 
    display: block; 
    width: 100%; 
    height: 100%;
}

@media (min-width: 769px) {
    .flipbook-zoom-wrapper:has(.stf-orientation-portrait) {
        max-width: calc((70vh - 40px) * 0.7072) !important;
        aspect-ratio: 500 / 707 !important;
    }
    .is-fullscreen .flipbook-zoom-wrapper:has(.stf-orientation-portrait) {
        max-width: calc((100vh - 140px) * 0.7072) !important;
        aspect-ratio: 500 / 707 !important;
    }
}

/* Reading Progress Bar */
.flipbook-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 60;
    overflow: hidden;
}
.flipbook-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hotkeys Modal */
.flipbook-hotkeys-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.flipbook-hotkeys-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.hotkeys-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 15, 33, 0.75);
    backdrop-filter: blur(4px);
}
.hotkeys-modal-card {
    position: relative;
    z-index: 2;
    width: 360px;
    max-width: 100%;
    background: #0b152e;
    border: 1px solid #1f366a;
    border-radius: 0 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}
.flipbook-hotkeys-modal.is-open .hotkeys-modal-card {
    transform: scale(1);
}
.hotkeys-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #1f366a;
    background: #080f21;
}
.hotkeys-modal-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: "Roboto", sans-serif;
}
.hotkeys-modal-header .close-hotkeys {
    color: #cbd5e1;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    transition: color 0.2s, background 0.2s;
}
.hotkeys-modal-header .close-hotkeys:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}
.hotkeys-modal-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hotkey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hotkey-row:last-child {
    border-bottom: none;
}
.hotkey-desc {
    font-family: "Roboto", sans-serif;
    font-size: 0.85rem;
    color: #cbd5e1;
}
.hotkey-keys {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #94a3b8;
}
.hotkey-keys kbd {
    display: inline-block;
    padding: 3px 6px;
    font-size: 0.78rem;
    font-family: monospace, sans-serif;
    font-weight: 700;
    line-height: 1;
    color: #e2e8f0;
    background: #1e3567;
    border: 1px solid #335398;
    border-radius: 0 !important;
    box-shadow: 0 2px 0 #0d1a38;
}

/* Thumbnails Drawer */
.flipbook-thumbnails-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 86%;
    background: rgba(11, 21, 46, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid #1f366a;
    border-radius: 0 !important;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
    box-shadow: none;
}

.flipbook-thumbnails-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 15px 0 35px rgba(0, 0, 0, 0.6);
}

.thumbnails-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #1f366a;
    background: #080f21;
    flex-shrink: 0;
}

.thumbnails-drawer-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: "Roboto", sans-serif;
}

.thumbnails-drawer-header .close-thumbnails {
    color: #cbd5e1;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
    .thumbnails-drawer-header .close-thumbnails:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
    }
}

.thumbnails-drawer-header .close-thumbnails:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.thumbnails-drawer-grid {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.thumbnails-drawer-grid::-webkit-scrollbar {
    width: 5px;
}
.thumbnails-drawer-grid::-webkit-scrollbar-thumb {
    background: #1f366a;
    border-radius: 0;
}

.thumbnail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
    .thumbnail-item:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.thumbnail-item:active {
    background: rgba(255, 255, 255, 0.15);
}

.thumbnail-item.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.thumbnail-preview {
    width: 100%;
    aspect-ratio: 500 / 707;
    background: #ffffff;
    border-radius: 0 !important;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.thumbnail-preview img,
.thumbnail-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0 !important;
}

.thumbnail-preview .thumb-spin {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-top: 2px solid #16295b;
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
}

.thumbnail-number {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    font-family: "Roboto", sans-serif;
}

.thumbnail-item.active .thumbnail-number {
    color: #60a5fa;
    font-weight: 700;
}

.btn-icon.active {
    background: rgba(30, 64, 175, 0.12);
    color: #1e40af;
}

.flipbook-page { 
    background-color: #ffffff; 
    overflow: hidden; 
    box-sizing: border-box; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    border: 4px solid #ffffff;
}

.flipbook-page:nth-child(odd) {
    border-left: none;
}

.flipbook-page:nth-child(even) {
    border-right: none;
}

.flipbook-page canvas { 
    width: 100%; 
    height: 100%; 
    object-fit: fill; 
    pointer-events: none; 
}

.flip-book.is-zoomed {
    pointer-events: none !important;
}

.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.loader-spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--color-blue-200, #16295b);
    width: 40px; height: 40px;
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
    margin-bottom: 15px;
}
.loader-text { font-family: "Roboto", sans-serif; color: var(--color-blue-200, #16295b); font-size: 1.1rem; font-weight: 600; }
@keyframes loaderSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Controls Bar & Grouping */
.flipbook-controls { 
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex; 
    align-items: center; 
    font-family: "Roboto", sans-serif; 
    height: 50px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 !important;
    padding: 0 12px; 
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 100;
    gap: 2px;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.flipbook-controls-group { 
    display: flex; 
    align-items: center; 
    gap: 3px; 
}

.flipbook-more-tools {
    display: none !important;
}

#btn-more-toggle {
    display: none !important;
}

.flipbook-controls-divider {
    width: 1px;
    height: 22px;
    background: rgba(22, 41, 91, 0.15);
    margin: 0 5px;
    flex-shrink: 0;
}

.btn-icon, .flipbook-controls .btn-primary { 
    background: transparent; 
    border: none; 
    color: var(--color-blue-200, #16295b); 
    width: 36px; 
    height: 36px; 
    border-radius: 0 !important; 
    display: flex; 
    align-items: center; 
    flex-shrink: 0; 
    justify-content: center; 
    cursor: pointer; 
    transition: background 0.15s ease, color 0.15s ease; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
    .btn-icon:hover, .flipbook-controls .btn-primary:hover { 
        background: rgba(22, 41, 91, 0.08); 
        color: #1e40af;
    }
}

.btn-icon:active, .flipbook-controls .btn-primary:active { 
    background: rgba(22, 41, 91, 0.15); 
    color: #1e40af;
}

.btn-icon.active {
    background: rgba(22, 41, 91, 0.12);
    color: #1e40af;
}

.btn-icon:disabled, 
.btn-icon.disabled, 
.flipbook-controls .btn-primary:disabled, 
.flipbook-controls .btn-primary.disabled {
    opacity: 0.25 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.flipbook-pagination { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Roboto", sans-serif; 
    color: var(--color-blue-200, #16295b); 
    user-select: none;
    margin: 0 4px;
    height: 36px;
    position: relative;
}

.pagination-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1;
    font-family: "Roboto", sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

@media (hover: hover) and (pointer: fine) {
    .pagination-display:hover {
        background: rgba(22, 41, 91, 0.08);
    }
}

.pagination-display:active {
    background: rgba(22, 41, 91, 0.14);
}

.page-current,
.page-total {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-blue-200, #16295b);
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.pagination-separator {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(22, 41, 91, 0.4);
    line-height: 1;
    margin: 0 5px;
    display: inline-block;
    vertical-align: middle;
    user-select: none;
}

.page-current-input {
    width: 44px;
    height: 28px;
    line-height: 26px;
    padding: 0 4px !important;
    margin: 0 !important;
    border: 1px solid #1e40af !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: var(--color-blue-200, #16295b) !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    font-family: "Roboto", sans-serif !important;
    text-align: center !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2) !important;
    box-sizing: border-box !important;
    font-variant-numeric: tabular-nums !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
}

.page-current-input::-webkit-outer-spin-button,
.page-current-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.flipbook-viewer-col.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #14254b !important; 
    padding: max(10px, env(safe-area-inset-top, 10px)) max(10px, env(safe-area-inset-right, 10px)) max(10px, env(safe-area-inset-bottom, 10px)) max(10px, env(safe-area-inset-left, 10px)) !important; 
    box-sizing: border-box !important;
    margin: 0 !important;
    border: none !important;
    z-index: 999999 !important;
}

.flipbook-viewer-col.is-fullscreen .flipbook-wrapper {
    flex: 1;
    height: 100%;
    padding: 10px 10px 86px 10px;
    box-shadow: none;
}

.flipbook-viewer-col.is-fullscreen .flipbook-zoom-wrapper {
    max-height: calc(100vh - 140px);
    max-width: calc((100vh - 140px) * 1.4144);
}

.flipbook-menu-col { width: 350px; min-width: 280px; background: #14254b; padding: 0; border: 1px solid #1f366a; border-radius: 0; box-sizing: border-box; }
.flipbook-menu-title { font-size: 1.1rem; font-weight: 700; color: #ffffff; background: #0b152e; margin: 0; padding: 20px; text-transform: uppercase; letter-spacing: 0.05em; }

.flipbook-menu-grid { display: flex; flex-direction: column; gap: 0; }

.flipbook-menu-card { display: flex; flex-direction: row; align-items: center; padding: 15px 20px; gap: 15px; text-decoration: none; cursor: pointer; box-sizing: border-box; transition: all 0.2s ease; border-bottom: 1px solid #1f366a; background: transparent; }
.flipbook-menu-card:last-child { border-bottom: none; }
.flipbook-menu-card:hover { background: #1a2f5c; }

.menu-card-thumb-wrapper { width: 60px; min-width: 60px; height: 85px; position: relative; background: #ffffff; border: 1px solid #2a4380; box-sizing: border-box; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.menu-card-thumb { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; }
.menu-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 2px solid #2a4380; border-top: 2px solid #ffffff; width: 20px; height: 20px; border-radius: 50%; animation: loaderSpin 0.8s linear infinite; }

.menu-card-title { font-family: "Roboto", sans-serif; font-size: 0.95rem; font-weight: 600; color: #e2e8f0; line-height: 1.3; text-align: left; }

.flipbook-menu-card.active { background: #1f366a; border-bottom-color: #1f366a; }
.flipbook-menu-card.active .menu-card-title { color: #ffffff; }
.flipbook-menu-card.active .menu-card-thumb-wrapper { border-color: #ffffff; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }

@media (max-width: 1024px) {
    .flipbook-layout-wrapper { flex-direction: column; gap: 20px; }
    .flipbook-menu-col { width: 100%; min-width: 0; }
    .flipbook-menu-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .flipbook-viewer-col { height: auto; min-height: 500px; }
}

/* Portrait orientation on mobile/tablet (Single page mode) */
@media (orientation: portrait) and (max-width: 1024px) {
    .flipbook-zoom-wrapper {
        aspect-ratio: 500 / 707 !important;
        max-height: calc(70vh - 40px) !important;
        max-width: min(100%, calc((70vh - 40px) * 0.7072)) !important;
        align-items: center !important;
        justify-content: center !important;
        transform-origin: center center !important;
        margin: 0 auto !important;
    }
    .flipbook-viewer-col.is-fullscreen .flipbook-zoom-wrapper {
        max-height: calc(100dvh - 110px) !important;
        max-width: min(100%, calc((100dvh - 110px) * 0.7072)) !important;
        aspect-ratio: 500 / 707 !important;
        align-items: center !important;
        justify-content: center !important;
        transform-origin: center center !important;
    }
    .flipbook-wrapper {
        padding: 20px 10px 75px 10px;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .flipbook-viewer-col.is-fullscreen .flipbook-wrapper {
        align-items: center;
        justify-content: center;
    }
    .flipbook-viewer-col {
        height: 75vh;
        min-height: 480px;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
}

/* Landscape orientation on mobile/tablet (Two-page spread mode) */
@media (orientation: landscape) and (max-width: 1024px) {
    .flipbook-zoom-wrapper {
        aspect-ratio: 1000 / 707 !important;
        max-height: calc(88vh - 40px) !important;
        max-height: calc(88dvh - 40px) !important;
        max-width: calc((88dvh - 40px) * 1.4144) !important;
        align-items: center !important;
        justify-content: center !important;
        transform-origin: center center !important;
        margin: 0 auto !important;
    }
    .flipbook-viewer-col.is-fullscreen .flipbook-zoom-wrapper {
        max-height: calc(100dvh - 70px) !important;
        max-width: calc((100dvh - 70px) * 1.4144) !important;
        aspect-ratio: 1000 / 707 !important;
        align-items: center !important;
        justify-content: center !important;
        transform-origin: center center !important;
    }
    .flipbook-wrapper {
        padding: 10px 10px 60px 10px;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .flipbook-viewer-col.is-fullscreen .flipbook-wrapper {
        align-items: center;
        justify-content: center;
    }
    .flipbook-viewer-col {
        height: auto;
        min-height: 90vh;
        min-height: 90dvh;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    main > section:first-of-type { margin-top: var(--header-height-1px, 60px); }

    .flipbook-section,
    .flipbook-layout-wrapper,
    .flipbook-viewer-col {
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .flipbook-viewer-col {
        height: 75vh;
        min-height: 420px;
        padding: 0;
    }

    .flipbook-wrapper {
        padding: 15px 10px 70px 10px;
    }

    .flipbook-zoom-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .flipbook-controls {
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        height: 44px;
        padding: 0 6px;
        width: auto;
        max-width: calc(100% - 16px);
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
        border-radius: 0 !important;
        gap: 2px;
        border: 1px solid rgba(22, 41, 91, 0.12);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.06);
    }

    .btn-desktop-only {
        display: none !important;
    }

    #btn-more-toggle {
        display: flex !important;
    }

    .divider-desktop-only {
        display: none !important;
    }

    .flipbook-more-tools {
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(8px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(22, 41, 91, 0.15);
        border-radius: 0 !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.08);
        height: 42px;
        padding: 0 6px;
        display: flex !important;
        align-items: center;
        gap: 2px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
        z-index: 120;
    }

    .flipbook-more-tools.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .flipbook-controls-group { gap: 1px; }

    .flipbook-controls-divider {
        height: 18px;
        margin: 0 2px;
    }

    .btn-icon, .flipbook-controls .btn-primary {
        width: 34px;
        height: 34px;
    }

    .btn-icon svg, .flipbook-controls .btn-primary svg {
        width: 18px;
        height: 18px;
    }

    .flipbook-pagination {
        font-size: 0.85rem;
        margin: 0 2px;
        height: 34px;
    }

    .pagination-display {
        padding: 3px 5px;
    }

    .page-current,
    .page-total {
        font-size: 0.85rem;
    }

    .pagination-separator {
        font-size: 0.85rem;
        margin: 0 4px;
    }

    .page-current-input {
        width: 38px;
        height: 24px;
        line-height: 22px;
        font-size: 0.85rem !important;
    }

    .flipbook-thumbnails-drawer {
        width: 270px;
        max-width: 85%;
    }

    .thumbnails-drawer-header {
        padding: 12px 14px;
    }

    .thumbnails-drawer-header h4 {
        font-size: 0.85rem;
    }

    .thumbnails-drawer-grid {
        padding: 10px;
        gap: 10px;
    }

    .thumbnail-item {
        padding: 4px;
    }

    .thumbnail-number {
        margin-top: 4px;
        font-size: 0.75rem;
    }

    .flipbook-menu-title { font-size: 1rem; padding: 14px 16px; }
    .flipbook-menu-grid { display: flex; flex-direction: column; gap: 0; }
    .flipbook-menu-card { padding: 12px 14px; gap: 12px; }
    .menu-card-thumb-wrapper { width: 44px; min-width: 44px; height: 62px; }
    .menu-card-title { font-size: 0.88rem; }
}

@media (max-width: 380px) {
    .flipbook-controls { 
        padding: 0 4px;
        gap: 1px;
        height: 40px;
        bottom: max(8px, env(safe-area-inset-bottom, 8px));
    }

    .flipbook-more-tools {
        height: 38px;
        padding: 0 4px;
        gap: 1px;
        bottom: calc(100% + 6px);
    }

    .flipbook-thumbnails-drawer {
        width: 240px;
        max-width: 88%;
    }

    .thumbnails-drawer-grid {
        padding: 8px;
        gap: 8px;
    }

    .btn-icon, .flipbook-controls .btn-primary {
        width: 30px;
        height: 30px;
    }

    .btn-icon svg, .flipbook-controls .btn-primary svg {
        width: 16px;
        height: 16px;
    }

    .flipbook-controls-divider {
        height: 14px;
        margin: 0 1px;
    }

    .flipbook-pagination {
        font-size: 0.8rem;
        margin: 0 1px;
        height: 30px;
    }

    .pagination-display {
        padding: 2px 4px;
    }

    .page-current,
    .page-total {
        font-size: 0.8rem;
    }

    .pagination-separator {
        font-size: 0.8rem;
        margin: 0 3px;
    }

    .page-current-input {
        width: 34px;
        height: 22px;
        line-height: 20px;
        font-size: 0.8rem !important;
    }
}
