/* Publishing tools use the Portal × Hub tokens; all rules are scoped to the editor. */
#portal-post-editor-overlay .portal-editor-modal { width:min(1400px,calc(100vw - 32px)); max-height:94vh; background:var(--hub-bg,#090f1f); border:1px solid var(--hub-line,#293a51); border-radius:20px; overflow:hidden; padding:0; }
#portal-post-editor-overlay .portal-editor-header { background:var(--hub-panel,#101a2b); padding:20px 24px; gap:16px; }
#portal-post-editor-overlay .portal-editor-scroll { padding:20px 24px 24px; }
#portal-post-editor-overlay .composer-command-bar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 24px; border-bottom:1px solid var(--hub-line); background:var(--hub-field); }
#portal-post-editor-overlay .composer-command-bar strong { font-size:13px; color:var(--hub-text); }
#portal-post-editor-overlay .composer-command-bar p { font-size:12px; margin-top:5px; max-width:650px; }
#portal-post-editor-overlay .composer-commands { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
#portal-post-editor-overlay .portal-lang-tabs { flex-wrap:wrap; gap:6px; }
#portal-post-editor-overlay .portal-lang-tab { font-size:12px; padding:9px 12px; }
#portal-post-editor-overlay .tsb-editor-toolbar { gap:8px; flex-wrap:wrap; padding:12px; background:var(--hub-field); border-bottom:1px solid var(--hub-line); }
#portal-post-editor-overlay .tsb-editor-toolbar-group { gap:5px; }
#portal-post-editor-overlay .tsb-rich-editor[contenteditable] { min-height:340px; padding:22px; font-size:16px; line-height:1.8; background:var(--hub-field); color:var(--hub-text); overflow-wrap:anywhere; }
#portal-post-editor-overlay .tsb-rich-editor.composer-dragover { outline:2px dashed var(--hub-cyan); outline-offset:-8px; background:var(--hub-tint); }
#portal-post-editor-overlay .composer-status { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; color:var(--hub-muted); font-size:12px; padding:8px 0; }
#portal-post-editor-overlay .composer-review { padding:22px; border:1px solid var(--hub-line); border-radius:14px; background:var(--hub-panel); min-width:0; }
#portal-post-editor-overlay .composer-review h3 { margin-bottom:12px; }
#portal-post-editor-overlay .composer-review p { font-size:13px; margin-bottom:10px; overflow-wrap:anywhere; }
#portal-post-editor-overlay .composer-translation-notice { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px; margin:0 0 12px; border:1px solid var(--hub-line); border-radius:10px; background:var(--hub-tint); }
#portal-post-editor-overlay .composer-translation-notice[hidden] { display:none; }
#portal-post-editor-overlay .composer-translation-notice p { flex:1 1 250px; font-size:12px; color:var(--hub-accent-text); margin:0; }
#portal-post-editor-overlay #composer-preview-body img { max-width:100%; max-height:450px; object-fit:contain; }
#portal-post-editor-overlay .portal-editor-status-text { position:sticky; bottom:0; background:var(--hub-panel); padding:12px 16px; border:1px solid var(--hub-line); border-radius:10px; }
#portal-post-editor-overlay .portal-editor-status-text:has(.form-status:empty) { display:none; }
#portal-post-editor-overlay .portal-editor-head-actions { flex-wrap:wrap; }
@media(max-width:800px) { #portal-post-editor-overlay .composer-command-bar { align-items:flex-start; flex-direction:column; gap:12px; } #portal-post-editor-overlay .portal-editor-header { flex-wrap:wrap; } }
@media(max-width:480px) { #portal-post-editor-overlay .portal-editor-modal { width:100%; height:100dvh; max-height:100dvh; border-radius:0; } #portal-post-editor-overlay .portal-editor-header,#portal-post-editor-overlay .composer-command-bar { padding:14px; } #portal-post-editor-overlay .portal-editor-scroll { padding:14px; } #portal-post-editor-overlay .portal-editor-head-actions { gap:6px; } #portal-post-editor-overlay .tsb-editor-toolbar { padding:8px; } #portal-post-editor-overlay .tsb-rich-editor[contenteditable] { padding:16px; } }
.composer-post-draft { display:inline-block; font-size:11px; padding:4px 9px; border:1px solid var(--hub-line,#293a51); border-radius:20px; color:var(--hub-accent-text,#78bcff); margin-bottom:10px; }
#portal-post-editor-overlay { z-index:110; }
#portal-post-editor-overlay .portal-editor-grid { grid-template-columns:minmax(0,1fr); }
#portal-post-editor-overlay :is(.portal-editor-language-shell,.portal-lang-panel,.portal-editor-field-card,.field,.tsb-editor) { min-width:0; }
#portal-post-editor-overlay .tsb-editor-toolbar-group { flex-wrap:wrap; min-width:0; max-width:100%; }
#portal-post-editor-overlay .tsb-editor-size-select { width:72px; min-width:72px; height:32px; padding:2px 8px; font-size:12px; }
@media(max-width:480px) {
  #portal-post-editor-overlay { padding:0; }
  #portal-post-editor-overlay .portal-editor-form { height:100dvh; max-height:100dvh; }
  #portal-post-editor-overlay .portal-editor-head-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  #portal-post-editor-overlay .portal-editor-status-inline { grid-column:1/-1; }
  #portal-post-editor-overlay .portal-editor-head-actions>.btn { min-width:0; min-height:40px; padding:7px 4px; font-size:11px; white-space:normal; }
  #portal-post-editor-overlay .portal-cover-head { align-items:flex-start; }
  #portal-post-editor-overlay .portal-cover-collapse-btn { margin-left:0; }
}
body.portal-hub:has(#portal-post-editor-overlay[style*="flex"]) { overflow:hidden; }
