body:not(.dark-theme) .baize-resource-viewer-dialog.zib-modal-dialog {
    width: min(920px, calc(100vw - 32px)) !important;
    max-width: 920px !important;
}

body:not(.dark-theme) .baize-post-paid-box {
    margin: 16px 0 0;
    overflow: hidden;
    border: 1px solid #d8e6fb;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 34%);
    box-shadow: 0 14px 28px rgba(20, 60, 125, 0.06);
}

body:not(.dark-theme) .baize-post-paid-box .box-body {
    padding: 20px 22px;
}

body:not(.dark-theme) .baize-post-paid-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

body:not(.dark-theme) .baize-post-paid-head strong {
    color: #132746;
    font-size: 20px;
    line-height: 1.45;
}

body:not(.dark-theme) .baize-post-paid-pill,
body:not(.dark-theme) .baize-post-paid-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

body:not(.dark-theme) .baize-post-paid-pill {
    color: #2d6df6;
    background: #ebf3ff;
}

body:not(.dark-theme) .baize-post-paid-state {
    color: #0f8f58;
    background: #ecfbf3;
}

body:not(.dark-theme) .baize-post-paid-summary {
    margin-top: 12px;
    color: #607392;
    font-size: 14px;
    line-height: 1.85;
}

body:not(.dark-theme) .baize-post-paid-note,
body:not(.dark-theme) .baize-post-paid-extra {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #d8e6fb;
    border-radius: 8px;
    background: #f6f9ff;
    color: #38517c;
    font-size: 14px;
    line-height: 1.85;
}

body:not(.dark-theme) .baize-post-paid-actions {
    margin-top: 16px;
}

body:not(.dark-theme) .baize-post-paid-actions .but {
    min-width: 180px;
    border-radius: 8px;
}

body:not(.dark-theme) .zib-modal.bottom .baize-resource-viewer-dialog.zib-modal-dialog {
    width: 100% !important;
    max-width: none !important;
}

body:not(.dark-theme) .baize-resource-viewer-dialog .zib-modal-content {
    background: #ffffff;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
    box-shadow: 0 28px 60px rgba(24, 63, 135, 0.18);
    overflow: hidden;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}

body:not(.dark-theme) .baize-resource-viewer {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 18%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body:not(.dark-theme) .baize-resource-viewer-header {
    padding: 26px 28px 18px;
    border-bottom: 1px solid #e4eefc;
    flex: 0 0 auto;
}

body:not(.dark-theme) .baize-resource-viewer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #2d6df6;
    background: #edf4ff;
}

body:not(.dark-theme) .baize-resource-viewer-header h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    color: #10213f;
}

body:not(.dark-theme) .baize-resource-viewer-summary {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.8;
    color: #5f6f8d;
}

body:not(.dark-theme) .baize-resource-viewer-body {
    padding: 24px 28px 28px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

body:not(.dark-theme) .baize-resource-viewer-notice,
body:not(.dark-theme) .baize-resource-viewer-details {
    padding: 16px 18px;
    margin-bottom: 18px;
    border: 1px solid #d7e5ff;
    border-radius: 8px;
    background: #f4f8ff;
    color: #35507b;
    font-size: 14px;
    line-height: 1.85;
}

body:not(.dark-theme) .baize-resource-viewer-content-card {
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #d9e6fb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(28, 69, 145, 0.05);
}

body:not(.dark-theme) .baize-resource-viewer-richtext,
body:not(.dark-theme) .baize-resource-viewer-downloads,
body:not(.dark-theme) .baize-resource-viewer-gallery-grid,
body:not(.dark-theme) .baize-resource-viewer-video,
body:not(.dark-theme) .baize-resource-viewer-copy-list,
body:not(.dark-theme) .baize-resource-viewer-hidden-section {
    margin-top: 18px;
}

body:not(.dark-theme) .baize-resource-viewer-richtext:first-child,
body:not(.dark-theme) .baize-resource-viewer-downloads:first-child,
body:not(.dark-theme) .baize-resource-viewer-gallery-grid:first-child,
body:not(.dark-theme) .baize-resource-viewer-video:first-child,
body:not(.dark-theme) .baize-resource-viewer-copy-list:first-child,
body:not(.dark-theme) .baize-resource-viewer-content-card:first-child {
    margin-top: 0;
}

body:not(.dark-theme) .baize-resource-viewer-richtext {
    color: #21314d;
    font-size: 15px;
    line-height: 1.9;
}

body:not(.dark-theme) .baize-resource-viewer-richtext p:first-child {
    margin-top: 0;
}

body:not(.dark-theme) .baize-resource-viewer-richtext p:last-child {
    margin-bottom: 0;
}

body:not(.dark-theme) .baize-resource-viewer-paid-card {
    margin-top: 18px;
    border: 1px solid #d8e5fb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(28, 69, 145, 0.05);
    overflow: hidden;
}

body:not(.dark-theme) .baize-resource-viewer-paid-card:first-child {
    margin-top: 0;
}

body:not(.dark-theme) .baize-resource-viewer-paid-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #e4eefc;
    cursor: pointer;
    list-style: none;
}

body:not(.dark-theme) .baize-resource-viewer-paid-summary::-webkit-details-marker {
    display: none;
}

body:not(.dark-theme) .baize-resource-viewer-paid-summary span {
    color: #14284b;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

body:not(.dark-theme) .baize-resource-viewer-paid-value {
    max-height: min(56vh, 520px);
    overflow: auto;
    padding: 18px 20px;
    color: #21314d;
    font-size: 15px;
    line-height: 1.9;
}

body:not(.dark-theme) .baize-resource-viewer-paid-value p:first-child {
    margin-top: 0;
}

body:not(.dark-theme) .baize-resource-viewer-paid-value p:last-child {
    margin-bottom: 0;
}

.baize-resource-viewer-dialog.zib-modal-dialog {
    width: min(920px, calc(100vw - 32px)) !important;
    max-width: 920px !important;
}

.baize-resource-viewer-dialog .zib-modal-content,
.baize-resource-viewer-dialog .modal-content {
    max-height: calc(100vh - 48px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.baize-resource-viewer {
    max-height: calc(100vh - 48px) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.baize-resource-viewer-header,
.baize-resource-viewer-footer {
    flex: 0 0 auto !important;
}

.baize-resource-viewer-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

.baize-resource-viewer-paid-card {
    max-height: calc(100vh - 230px) !important;
    display: flex !important;
    flex-direction: column !important;
}

.baize-resource-viewer-paid-summary {
    flex: 0 0 auto !important;
}

.baize-resource-viewer-paid-value {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: min(52vh, 460px) !important;
    overflow-y: auto !important;
}

body:not(.dark-theme) .baize-resource-viewer-richtext pre,
body:not(.dark-theme) .baize-resource-viewer-code {
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid #d7e3f9;
    background: #0f2340;
    color: #f5f9ff;
    overflow: auto;
    font-size: 13px;
    line-height: 1.8;
}

body:not(.dark-theme) .baize-resource-viewer-copy-list {
    display: grid;
    gap: 14px;
}

body:not(.dark-theme) .baize-resource-viewer-copy-card {
    padding: 0;
    border: 1px solid #d8e5fb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(28, 69, 145, 0.05);
    overflow: hidden;
}

body:not(.dark-theme) .baize-resource-viewer-copy-dropdown {
    margin-top: 18px;
}

body:not(.dark-theme) .baize-resource-viewer-copy-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #e4eefc;
    cursor: pointer;
    list-style: none;
}

body:not(.dark-theme) .baize-resource-viewer-copy-summary::-webkit-details-marker {
    display: none;
}

body:not(.dark-theme) .baize-resource-viewer-copy-summary span {
    color: #14284b;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

body:not(.dark-theme) .baize-resource-viewer-copy-head {
    margin-bottom: 12px;
}

body:not(.dark-theme) .baize-resource-viewer-copy-meta {
    min-width: 0;
}

body:not(.dark-theme) .baize-resource-viewer-copy-head strong {
    display: block;
    color: #14284b;
    font-size: 17px;
    line-height: 1.4;
}

body:not(.dark-theme) .baize-resource-viewer-copy-head p {
    margin: 8px 0 0;
    color: #617392;
    font-size: 13px;
    line-height: 1.75;
}

body:not(.dark-theme) .baize-resource-viewer-copy-value {
    max-height: 360px;
    overflow: auto;
    margin: 16px;
    padding: 14px 16px;
    border: 1px solid #d7e3f9;
    border-radius: 8px;
    background: #f7faff;
}

body:not(.dark-theme) .baize-resource-viewer-copy-value code {
    display: block;
    color: #21314d;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

body:not(.dark-theme) .baize-resource-viewer-copy-actions {
    margin-top: 14px;
}

body:not(.dark-theme) .baize-resource-viewer-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #4aa7ff 0%, #2d6df6 100%);
    box-shadow: 0 10px 20px rgba(45, 109, 246, 0.18);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

body:not(.dark-theme) .baize-resource-viewer-copy-button:hover {
    color: #ffffff;
    opacity: 0.96;
}

body:not(.dark-theme) .baize-resource-viewer-copy-button.is-copied {
    background: linear-gradient(135deg, #32b67a 0%, #1b9a5f 100%);
    box-shadow: 0 10px 20px rgba(27, 154, 95, 0.18);
}

body:not(.dark-theme) .baize-resource-viewer-code {
    margin: 0;
}

body:not(.dark-theme) .baize-resource-viewer-downloads .but,
body:not(.dark-theme) .baize-resource-viewer-downloads .box-body {
    border-radius: 8px;
}

body:not(.dark-theme) .baize-resource-viewer-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

body:not(.dark-theme) .baize-resource-viewer-gallery-item {
    display: block;
    overflow: hidden;
    border: 1px solid #d6e4fb;
    border-radius: 8px;
    background: #eff5ff;
}

body:not(.dark-theme) .baize-resource-viewer-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

body:not(.dark-theme) .baize-resource-viewer-video .new-dplayer,
body:not(.dark-theme) .baize-resource-viewer-native-video {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

body:not(.dark-theme) .baize-resource-viewer-video .featured-video-episode {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

body:not(.dark-theme) .baize-resource-viewer-video .switch-video {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d7e4fb;
    border-radius: 8px;
    background: #f7faff;
    color: #1d3157;
}

body:not(.dark-theme) .baize-resource-viewer-video .switch-video.active {
    border-color: #8cb3ff;
    background: #edf4ff;
    color: #2d6df6;
}

body:not(.dark-theme) .baize-resource-viewer-empty {
    padding: 20px 18px;
    border: 1px dashed #c8d9fb;
    border-radius: 8px;
    background: #f7faff;
    color: #5f7394;
    font-size: 14px;
    line-height: 1.9;
    text-align: center;
}

body:not(.dark-theme) .baize-resource-viewer-empty-action {
    margin-top: 16px;
    text-align: center;
}

body:not(.dark-theme) .baize-resource-viewer-footer {
    padding: 0 28px 28px;
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    body:not(.dark-theme) .baize-post-paid-box .box-body {
        padding: 18px 16px;
    }

    body:not(.dark-theme) .baize-post-paid-head {
        flex-direction: column;
        align-items: flex-start;
    }

    body:not(.dark-theme) .baize-post-paid-actions .but {
        width: 100%;
        min-width: 0;
    }

    body:not(.dark-theme) .baize-resource-viewer-header,
    body:not(.dark-theme) .baize-resource-viewer-body,
    body:not(.dark-theme) .baize-resource-viewer-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    body:not(.dark-theme) .baize-resource-viewer-header h3 {
        font-size: 23px;
    }

    body:not(.dark-theme) .baize-resource-viewer-content-card,
    body:not(.dark-theme) .baize-resource-viewer-copy-card {
        padding: 0;
    }

    body:not(.dark-theme) .baize-resource-viewer-content-card {
        padding: 16px;
    }

    body:not(.dark-theme) .baize-resource-viewer-copy-summary,
    body:not(.dark-theme) .baize-resource-viewer-paid-summary {
        align-items: stretch;
        flex-direction: column;
    }

    body:not(.dark-theme) .baize-resource-viewer-copy-button {
        width: 100%;
    }

    body:not(.dark-theme) .baize-resource-viewer-paid-value {
        max-height: 360px;
        padding: 16px;
    }

    body:not(.dark-theme) .baize-resource-viewer-copy-value {
        max-height: 300px;
        margin: 12px;
    }

    body:not(.dark-theme) .baize-resource-viewer-gallery-grid {
        grid-template-columns: 1fr;
    }

    body:not(.dark-theme) .baize-resource-viewer-gallery-item img {
        min-height: 180px;
    }
}
