/* MarkdownHub v39 — shared mobile workspace skin.
   Loaded AFTER tool-specific CSS. Screen-only: never modifies PDF print rules. */
@media screen and (max-width: 860px) {
  .tool-workspace.viewer-workspace .panels-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .tool-workspace.viewer-workspace .panels-container > .editor-pane,
  .tool-workspace.viewer-workspace .panels-container > .preview-pane {
    display: flex;
    flex-direction: column;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 300px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .tool-workspace.viewer-workspace .panels-container > .editor-pane {
    background: #1e1e1e !important;
    color: #f5f5f5 !important;
    border-right: 0;
    border-bottom: 1px solid #dcdfe4;
  }
  .tool-workspace.viewer-workspace .panels-container > .preview-pane {
    background: #fff !important;
    color: #111 !important;
    border: 0;
  }
  .tool-workspace.viewer-workspace .editor-pane textarea,
  .tool-workspace.viewer-workspace .editor-pane .editor-textarea,
  .tool-workspace.viewer-workspace .editor-pane .table-grid-wrapper {
    background: #1e1e1e !important;
    color: #f5f5f5 !important;
  }
  .tool-workspace.viewer-workspace .preview-pane textarea,
  .tool-workspace.viewer-workspace .preview-pane .editor-textarea,
  .tool-workspace.viewer-workspace .preview-pane .preview-content,
  .tool-workspace.viewer-workspace .preview-pane .html-code-output,
  .tool-workspace.viewer-workspace .preview-pane .preview-html-view,
  .tool-workspace.viewer-workspace .preview-pane .html-output-wrapper {
    background: #fff !important;
    color: #111 !important;
  }
  .tool-workspace.viewer-workspace .editor-toolbar,
  .tool-workspace.viewer-workspace .preview-toolbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 48px;
    padding: 6px 8px;
    box-sizing: border-box;
    background: #f0f1f4 !important;
    border-bottom: 1px solid #dcdfe4 !important;
    color: #374151 !important;
  }
  .tool-workspace.viewer-workspace .editor-toolbar-title,
  .tool-workspace.viewer-workspace .preview-toolbar-title {
    color: #374151 !important;
    white-space: nowrap;
    font-size: 0.78rem;
  }
  .tool-workspace.viewer-workspace .toolbar-title-group { flex: 0 0 auto; min-width: 0; }
  .tool-workspace.viewer-workspace .toolbar-actions-group {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .tool-workspace.viewer-workspace .toolbar-btn.icon-only {
    flex: 0 0 34px;
    width: 34px;
    height: 36px;
    min-width: 34px;
    min-height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
  }
  .tool-workspace.viewer-workspace .toolbar-btn.icon-only svg { stroke: currentColor; }
  .tool-workspace.viewer-workspace .editor-pane .editor-textarea,
  .tool-workspace.viewer-workspace .preview-pane .editor-textarea,
  .tool-workspace.viewer-workspace .preview-pane .preview-content {
    min-height: 280px;
    height: auto;
    padding: 16px;
    box-sizing: border-box;
  }
  .tool-workspace.viewer-workspace .preview-pane .pdf-sheet-preview {
    background: #f3f4f6 !important;
    color: #111 !important;
    overflow-x: auto;
    padding: 12px;
  }
  .tool-workspace.viewer-workspace .preview-pane .pdf-sheet {
    background: #fff !important;
    color: #000 !important;
    min-height: 0;
    padding: 20px;
  }
}
@media screen and (max-width: 380px) {
  .tool-workspace.viewer-workspace .editor-toolbar,
  .tool-workspace.viewer-workspace .preview-toolbar { padding: 5px 6px; gap: 4px; }
  .tool-workspace.viewer-workspace .toolbar-actions-group { gap: 3px; }
  .tool-workspace.viewer-workspace .toolbar-btn.icon-only { flex-basis: 32px; min-width: 32px; width: 32px; }
}
