/* Makindo R28.11 — owner source + live preview, edge-aligned authoring. */
.mk-admin-page #mk-html-preview-split {
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;align-items:start;width:100%;max-width:none;margin:12px 0;
  text-align:left;
}
.mk-admin-page #mk-html-preview-split .mk-source-pane,
.mk-admin-page #mk-html-preview-split .editor-preview-area {
  min-width:0;width:100%;max-width:none;margin:0;box-sizing:border-box;
  border:1px solid #acbec3;border-radius:8px;background:#fff;
}
.mk-admin-page #mk-html-preview-split .mk-source-pane{overflow:hidden}
.mk-admin-page #mk-html-preview-split .mk-editor-pane-heading{
  display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap;
  margin:0;padding:9px 12px;background:#e9f1f2;color:#182f38;border-bottom:1px solid #b4cbd0;
  font:700 13px/1.4 system-ui,sans-serif;text-align:left;
}
.mk-admin-page #mk-html-preview-split .mk-editor-pane-heading button{padding:5px 9px;margin:0;font-size:12px}
.mk-admin-page #mk-html-preview-split textarea#editor-html{
  box-sizing:border-box;display:block!important;width:100%!important;max-width:none!important;
  height:70vh;min-height:420px;margin:0;border:0;border-radius:0;
  padding:12px 14px;resize:vertical;white-space:pre;overflow:auto;
  font:13px/1.48 ui-monospace,SFMono-Regular,Consolas,monospace;
  text-align:left;direction:ltr;tab-size:2;
}
.mk-admin-page #mk-html-preview-split .editor-preview-area{display:block!important;overflow:hidden}
.mk-admin-page #mk-html-preview-split .editor-preview-area h2{display:none}
.mk-admin-page #mk-html-preview-split iframe#editor-frame{
  display:block;box-sizing:border-box;width:100%;height:70vh;min-height:420px;
  border:0;border-radius:0;background:#fff;
}
.mk-admin-page #editor-image-drop,.mk-admin-page #editor-upload-status,.mk-admin-page #editor-title,
.mk-admin-page #mk-pane-pages,.mk-admin-page .editor-actionrow {text-align:left}
.mk-admin-page #mk-visual-editor {display:none!important}
.mk-admin-page #editor-mode-toggle{display:none!important}
.mk-admin-page #mk-html-preview-split [hidden]{display:none!important}
/* Images and captions: align left in source preview, reading pages and legacy figure sizes. */
.bookbody figure,.bookbody figure.makindo-figure,.bookbody figure.mk-fig-lg,.bookbody figure.mk-fig-md,.bookbody figure.mk-fig-sm,
.mk-admin-page .mk-rich-editor figure {
 margin-left:0!important;margin-right:auto!important;text-align:left!important;
}
.bookbody figure img,.mk-admin-page .mk-rich-editor figure img{
 margin-left:0!important;margin-right:auto!important;
}
.bookbody figure figcaption {text-align:left!important}
@media (max-width:860px){
 .mk-admin-page #mk-html-preview-split{grid-template-columns:minmax(0,1fr)}
 .mk-admin-page #mk-html-preview-split textarea#editor-html{height:48vh;min-height:280px}
 .mk-admin-page #mk-html-preview-split iframe#editor-frame{height:58vh;min-height:300px}
}

.mk-admin-page #mk-html-preview-split input.mk-editor-native-file{
  color:#19333d;background:#fff;border:1px solid #adbec4;border-radius:6px;
  padding:4px;font:12px system-ui,sans-serif;max-width:210px;
}

/* Keep editor workspace hard left and use the browser width on desktop. */
.mk-admin-page .home-shell{width:100%!important;max-width:none!important;margin:0!important;padding:12px 14px 75px!important;box-sizing:border-box!important}
.mk-admin-page .home-inner,.mk-admin-page .edit-panel,.mk-admin-page .mk-admin-content{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;text-align:left}
@media(max-width:620px){.mk-admin-page .home-shell{padding:8px 7px 75px!important}}

/* R28.12: compact image-library panel, left aligned, no off-screen popups */
.mk-admin-page #mk-saved-image-gallery{margin:8px 0;border:1px solid #b1c3c9;border-radius:8px;background:#fff;text-align:left}
.mk-admin-page #mk-saved-image-gallery[hidden]{display:none!important}
.mk-admin-page .mk-saved-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(124px,1fr));gap:8px;padding:12px;max-height:360px;overflow:auto}
.mk-admin-page button.mk-saved-image{background:#fff;border:1px solid #b7c7cb;border-radius:5px;padding:6px;text-align:left;cursor:pointer}
.mk-admin-page button.mk-saved-image img{width:100%;height:88px;object-fit:contain;display:block;margin:0}
.mk-admin-page button.mk-saved-image small{display:block;font:10px/1.2 monospace;word-break:break-all}
