/* FIX190: mobile reader and editor; all existing controls retained. */
@media(max-width:767px){
 .reader-content, .lesson-content {font-size:16px;line-height:1.68;overflow-wrap:break-word;min-width:0}
 .reader-content :is(h1,h2,h3,h4),.lesson-content :is(h1,h2,h3,h4){line-height:1.3;overflow-wrap:break-word;margin-block:1.15em .55em}
 .reader-content :is(p,ul,ol),.lesson-content :is(p,ul,ol){margin-block:.55em .9em}
 .reader-content :is(ul,ol),.lesson-content :is(ul,ol){padding-inline-start:1.5em}
 .reader-content li+li,.lesson-content li+li{margin-top:.35em}
 .reader-content :is(pre,.nga-command-box),.lesson-content :is(pre,.nga-command-box){max-width:100%;overflow-x:auto!important;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;white-space:pre!important;overflow-wrap:normal!important;word-break:normal!important;tab-size:4}
 .reader-content pre *,.lesson-content pre *{white-space:inherit!important;overflow-wrap:normal!important;word-break:normal!important}
 .reader-content :is(code,pre),.lesson-content :is(code,pre){font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;font-variant-ligatures:none}
 .reader-content :is(table),.lesson-content :is(table){width:max-content;min-width:min(100%,480px);max-width:none!important;table-layout:auto!important;border-collapse:collapse;overflow-wrap:normal!important;word-break:normal!important}
 .reader-content :is(td,th),.lesson-content :is(td,th){min-width:90px;white-space:normal;word-break:normal!important;overflow-wrap:normal!important;vertical-align:top}
 .reader-content :is(td,th) code,.lesson-content :is(td,th) code{white-space:nowrap}
 .reader-content .nga190-table-scroll,.lesson-content .nga190-table-scroll{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin:1em 0;border-radius:8px}
 .reader-content :is(img,video,svg),.lesson-content :is(img,video,svg){max-width:100%;height:auto}
 .reader-content .nga190-zoomable,.lesson-content .nga190-zoomable{cursor:zoom-in}
 .rte .nga-ribbon-header{gap:4px;flex-wrap:wrap}
 .rte .nga-ribbon-tabs{max-width:100%;overflow-x:auto;scrollbar-width:thin;white-space:nowrap}
 .rte .nga-ribbon .rte-toolbar{align-content:flex-start;gap:5px!important}
 .rte .nga-ribbon-group{flex:0 0 auto;min-width:0}
 .rte .nga-ribbon-tools{gap:4px!important}
 .rte .nga-ribbon :is(button,select){max-width:100%}
 .rte .rte-command-actions{display:flex;flex-wrap:wrap;gap:5px}
 .rte.rte-fullscreen .nga-ribbon{max-height:min(48dvh,300px)!important;overflow-y:auto!important;overscroll-behavior:contain}
 .rte.rte-fullscreen .rte-editor{min-height:0;overflow:auto!important}
 .nga188-mini{max-width:calc(100vw - 16px);overflow-x:auto;touch-action:manipulation}
}
/* Selection toolbar must be visible even when parent editor moves in fullscreen. */
.nga188-mini:not([hidden]){display:flex!important;position:fixed!important;z-index:2147483000!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
.nga188-mini[hidden]{display:none!important}

.nga190-dialog{border:0;border-radius:12px;padding:42px 12px 12px;max-width:96vw;max-height:94dvh;background:#fff;box-shadow:0 12px 50px #0006}.nga190-dialog::backdrop{background:#000b}.nga190-dialog img{display:block;max-width:90vw;max-height:80dvh;object-fit:contain}.nga190-close{position:absolute;right:10px;top:8px;border:1px solid #cbd5e1;background:white;border-radius:6px;padding:6px 12px;cursor:pointer}
