/* Ketabestan R7 · EPUB review, isolated from existing admin selectors */
.kbr-edit-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding:13px;border:1px dashed #c9b88d;border-radius:12px;background:#faf7ef}
.kbr-edit-toolbar .kbr-open,.kbr-row-button{background:#2c433e;color:#f6f1e2;border:1px solid #567064;border-radius:9px;padding:9px 14px;cursor:pointer;font:inherit}
.kbr-edit-toolbar .kbr-open:hover,.kbr-row-button:hover{background:#38574e}
.kbr-edit-toolbar .kbr-open:disabled{opacity:.46;cursor:not-allowed}
.kbr-edit-toolbar .kbr-edit-help{font-size:12px;line-height:1.7;color:#695f51;flex:1;min-width:230px}
.kbr-row-button{margin:4px 6px;font-size:12px;padding:7px 10px;white-space:nowrap}
#kbr-epub-dialog{width:min(1080px,calc(100vw - 22px));max-width:1080px;max-height:min(94vh,960px);height:min(94vh,960px);padding:0;border:1px solid #bcae93;border-radius:18px;background:#f7f5ef;color:#302d28;box-shadow:0 30px 100px #0c1c1c77;overflow:hidden}
#kbr-epub-dialog::backdrop{background:#151f20b9;backdrop-filter:blur(5px)}
#kbr-epub-dialog .kbr-shell{height:100%;display:flex;flex-direction:column}
#kbr-epub-dialog .kbr-header{padding:14px 22px;display:flex;align-items:center;justify-content:space-between;background:#223b37;color:#fff9e9;gap:14px}
#kbr-epub-dialog .kbr-title-block{display:flex;flex-direction:column;gap:4px;min-width:0}
#kbr-epub-dialog .kbr-eyebrow{font-size:11px;letter-spacing:.2px;color:#d4bf8f}
#kbr-epub-dialog .kbr-title{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#kbr-epub-dialog .kbr-title-block small{color:#cbd8d1;font-size:11px}
#kbr-epub-dialog .kbr-close{font-size:28px;width:40px;height:40px;border:1px solid #638076;border-radius:10px;background:#36564d;color:white;cursor:pointer;flex-shrink:0}
#kbr-epub-dialog .kbr-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:11px 18px;border-bottom:1px solid #e0d9cc}
#kbr-epub-dialog .kbr-tools label{display:flex;align-items:center;gap:9px;font-size:13px;color:#675d4e}
#kbr-epub-dialog .kbr-chapters{min-width:220px;max-width:min(55vw,460px);border-radius:9px;padding:7px 11px;background:white;color:#322c23;border:1px solid #d9cdb6}
#kbr-epub-dialog .kbr-status{font-size:12px;color:#716653}
#kbr-epub-dialog .kbr-reader{flex:1;min-height:150px;position:relative;background:#fcfaf5;overflow:hidden}
#kbr-epub-dialog .kbr-frame{border:0;width:100%;height:100%;background:#fcfaf5;display:block}
#kbr-epub-dialog .kbr-frame[hidden]{display:none}
#kbr-epub-dialog .kbr-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:28px;text-align:center;line-height:2;color:#695f4c;background:#fcfaf5}
#kbr-epub-dialog .kbr-loading[hidden]{display:none}
#kbr-epub-dialog .kbr-footer{background:#eee9df;border-top:1px solid #dacfbb;display:flex;align-items:center;gap:12px;padding:12px 18px;flex-wrap:wrap}
#kbr-epub-dialog .kbr-footer button{border:1px solid #c9bea9;border-radius:9px;padding:9px 14px;background:#fffdf9;color:#423a2e;cursor:pointer;min-width:108px}
#kbr-epub-dialog .kbr-footer .kbr-primary{background:#223b37;color:#fff9e9;border-color:#223b37}
#kbr-epub-dialog .kbr-footer button:disabled{opacity:.4;cursor:not-allowed}
#kbr-epub-dialog .kbr-page{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:13px;color:#665a49;margin-inline:auto}
#kbr-epub-dialog .kbr-guide{font-size:11px;color:#736858}
@media(max-width:650px){#kbr-epub-dialog{width:calc(100vw - 12px);height:95vh;max-height:95vh;border-radius:12px}#kbr-epub-dialog .kbr-header{padding:10px 13px}#kbr-epub-dialog .kbr-tools{padding:8px 12px}#kbr-epub-dialog .kbr-chapters{min-width:160px;width:100%;max-width:60vw}#kbr-epub-dialog .kbr-footer{padding:9px;gap:7px}#kbr-epub-dialog .kbr-footer button{min-width:90px;padding:7px 8px}#kbr-epub-dialog .kbr-guide{display:none}}
.kbr-edit-toolbar[hidden]{display:none!important}
/* R9 additional viewer controls and structural alerts */
#kbr-epub-dialog .kbr-view{min-width:185px;max-width:300px;border-radius:9px;padding:7px 9px;border:1px solid #d9cdb6;background:white;color:#322c23;font:inherit}
#kbr-epub-dialog .kbr-quality{background:#f0eee8;color:#625845;border-bottom:1px solid #e1dcd3;padding:7px 18px;font-size:12px;line-height:1.8}
#kbr-epub-dialog .kbr-quality.kbr-warning{color:#8c451e;background:#fff2e6}
@media(max-width:650px){#kbr-epub-dialog .kbr-quality{padding:5px 10px}#kbr-epub-dialog .kbr-view{max-width:180px;min-width:140px}}

/* R11: EPUB.js owns all pagination and publication typography. */
#kbr-epub-dialog .kbr-stage{position:absolute;inset:0;background:white;overflow:hidden}
#kbr-epub-dialog .kbr-loading{z-index:5}
#kbr-epub-dialog .kbr-stage iframe{border:0}
