@media print {
    /* Hide everything except the active pane content */
    #header,
    #bookmarks-bar,
    #sidebar,
    .resize-handle,
    #ref-panel,
    #status-bar,
    .pane-header,
    .add-pane-btn,
    .close-pane-btn,
    .copy-verse-btn,
    #ctx-menu,
    #topic-detail-overlay,
    #dict-overlay,
    #plan-overlay,
    #bm-dialog,
    #toast {
        display: none !important;
    }

    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    html, body { height: auto; overflow: visible; background: #fff; color: #000; }

    #app { display: block; height: auto; }

    #workspace { display: block; overflow: visible; }

    #panes-container { display: block; overflow: visible; }

    .reader-pane {
        display: block !important;
        overflow: visible;
        border: none;
        page-break-after: always;
    }

    .reader-pane:last-child { page-break-after: avoid; }

    .pane-content {
        overflow: visible;
        padding: 0;
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 12pt;
        color: #000;
        line-height: 1.6;
    }

    .chapter-heading {
        font-size: 16pt;
        font-weight: bold;
        color: #000;
        margin-bottom: 14pt;
        padding-bottom: 6pt;
        border-bottom: 1pt solid #ccc;
        font-family: Arial, sans-serif;
    }

    .verse-block {
        display: flex;
        gap: 6pt;
        margin-bottom: 4pt;
        page-break-inside: avoid;
        background: transparent !important;
    }

    .vnum {
        font-size: 8pt;
        font-weight: bold;
        color: #555;
        font-family: Arial, sans-serif;
        line-height: 2;
        min-width: 18pt;
        flex-shrink: 0;
    }

    .vtext {
        font-size: 12pt;
        color: #000;
        line-height: 1.7;
    }

    .rl-verse .vtext { color: #8b0000; }

    sup.snum { display: none; }

    .has-note { border-left: 2pt solid #888; padding-left: 5pt; }

    /* Highlight colours map to light tints that survive B&W printing */
    .hl-yellow { background: #fffde0 !important; }
    .hl-green  { background: #e8f5e9 !important; }
    .hl-blue   { background: #e3f2fd !important; }
    .hl-pink   { background: #fce4ec !important; }
}
