/* Configurable tool workspaces. Canvas editors alone fill the viewport. */
.editor-container { width: 100%; max-width: var(--workspace-width); margin: 0 auto; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: none; backdrop-filter: none; min-width: 0; }
.tool-panel { padding: 0; margin: 0; min-width: 0; animation: none; }
.stitch-topbar { position: relative; display: flex; flex-direction: column; flex-shrink: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--surface); box-shadow: none; z-index: var(--z-toolbar); }
.stitch-topbar-row-1, .stitch-topbar-row-2, .stitch-topbar-row-3 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 56px; padding: 12px 20px; background: var(--surface); }
.stitch-topbar-row-1 { justify-content: space-between; }
.stitch-topbar-row-2, .stitch-topbar-row-3 { border-top: 1px solid var(--border-subtle); }
.stitch-topbar-row-3 { background: var(--background); }
.stitch-doc-meta, .stitch-tool-group { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; color: var(--text-secondary); font-size: var(--text-small); font-weight: 500; }
.stitch-doc-meta > span { min-width: 0; overflow-wrap: anywhere; }
.stitch-divider-vert { width: 1px; height: 24px; margin: 0 4px; flex-shrink: 0; background: var(--border); }
.stitch-tool-btn { display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; min-width: 44px; min-height: 44px; height: auto; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--text-secondary); box-shadow: none; cursor: pointer; }
.stitch-tool-btn svg { width: 18px; height: 18px; }
.stitch-tool-btn span { font-size: var(--text-caption); font-weight: 500; line-height: 1.2; margin: 0; }
.stitch-tool-btn:hover { color: var(--accent); background: var(--surface-selected); }
.stitch-tool-btn.active { color: var(--accent); background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.stitch-tool-btn.active svg, .stitch-tool-btn.active span { color: inherit; }
.stitch-canvas-viewport { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; min-width: 0; padding: 24px; margin: 0; background: var(--background); border: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); overflow: auto; }
.stitch-canvas-viewport > * { flex-shrink: 0; min-width: 0; max-width: 100%; }
.stitch-canvas-viewport > .control-box, .stitch-canvas-viewport > .file-preview-card { width: 100%; max-width: 720px; margin: 0; box-shadow: none; }
.stitch-workspace-body { display: flex; min-width: 0; min-height: 0; flex: 1; }
.stitch-inspector-panel { width: 320px; padding: 20px; background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; box-shadow: none; }
.stitch-sidebar-light, .stitch-sidebar-dark { width: 176px; padding: 16px 12px; display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; overflow: auto; background: var(--surface); border-right: 1px solid var(--border); }
.stitch-card-grid, .pages-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 20px; white-space: normal; }
.stitch-page-card, .page-card { border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); padding: 12px; box-shadow: none; min-width: 0; }
.page-card:hover, .stitch-page-card:hover { box-shadow: none; transform: none; border-color: var(--border-strong); }
.page-card.selected, .stitch-page-card.selected { border-color: var(--accent-bright); background: var(--surface-selected); box-shadow: 0 0 0 1px var(--accent-bright); }
.page-card img { max-width: 100%; }
.page-card .page-toolbar { opacity: 1; transform: none; }
.page-toolbar button, .btn-page-action { min-width: 36px; min-height: 36px; }
.panel-tip { color: var(--text-secondary); font-size: var(--text-small); margin: 0; width: 100%; }
.files-list { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); min-width: 0; box-shadow: none; }
.file-item:hover { box-shadow: none; transform: none; border-color: var(--border-strong); }
.file-item-info { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.file-item-info > div { min-width: 0; }
.file-item-name { font-size: var(--text-body); font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; white-space: normal; }
.file-item-size { font-size: var(--text-caption); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.file-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.merge-thumb-wrap { width: 40px; height: 56px; flex-shrink: 0; }
.merge-thumbnail, .merge-thumbnail-placeholder { width: 40px; height: 56px; object-fit: contain; }
.action-section { display: none; margin: 0; padding: 0; border: 0; }
#action-section.active-overlay { display: flex; flex-direction: column; gap: 0; margin: 0; border: 0; }
#action-section.active-overlay > :is(.process-loading, .download-box) { width: 100%; min-width: 0; max-width: 440px; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-modal); box-shadow: var(--shadow-popover); }
#action-section #btn-execute-process { display: none !important; }
body[data-stage=process] .workspace-primary-action { pointer-events: none; opacity: .5; }
/* Document geometry stays inside the canvas, never a nested 100vw panel. */
body.pdfed-fullscreen-active { height: 100dvh; overflow: hidden; }
body.pdfed-fullscreen-active > header.navbar, body.pdfed-fullscreen-active > haz-footer,
body.pdfed-fullscreen-active #view-workspace > :is(.btn-back, .workspace-header, .tool-steps, .security-banner) { display: none; }
body.pdfed-fullscreen-active .main-content.container { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; padding: 0; margin: 0; }
/* app.js sets inline display:block when opening a panel; !important is
   required here so the fullscreen flex chain can calculate the viewport. */
body.pdfed-fullscreen-active #view-workspace,
body.pdfed-fullscreen-active #editor-area,
body.pdfed-fullscreen-active #panel-editpdf { width: 100%; height: 100%; max-width: none; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; display: flex !important; flex-direction: column; overflow: hidden; }
body.pdfed-fullscreen-active .stitch-topbar { border-radius: 0; }
.pdfed-top-left, .pdfed-top-right { min-width: 0; display: flex; align-items: center; gap: 12px; }
.pdfed-top-center { display: flex; align-items: center; gap: 8px; }
.pdfed-doc-info { max-width: 240px; overflow: hidden; }
.pdfed-status-filename { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-small); }
.pdfed-status-dot { display: none; }
.pdfed-btn-export-top span { display: inline; }
.pdfed-status-page-indicator { display: inline-flex; }
body.pdfed-fullscreen-active .editpdf-workspace { flex: 1; display: flex; min-height: 0; height: auto; max-height: none; width: 100%; overflow: hidden; border: 0; border-radius: 0; }
body.pdfed-fullscreen-active .editpdf-page-strip { flex: 0 0 176px; width: 176px; height: 100%; max-height: none; min-height: 0; padding: 16px 12px; overflow-y: auto !important; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; -webkit-overflow-scrolling: touch; scrollbar-width: auto; scrollbar-color: var(--border-strong) transparent; border-right: 1px solid var(--border); background: var(--surface); }
body.pdfed-fullscreen-active .editpdf-page-strip::-webkit-scrollbar { width: 10px; }
body.pdfed-fullscreen-active .editpdf-page-strip::-webkit-scrollbar-track { background: transparent; }
body.pdfed-fullscreen-active .editpdf-page-strip::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid transparent; border-radius: 999px; background-clip: content-box; }
body.pdfed-fullscreen-active .editpdf-page-strip.collapsed { display: none; }
body.pdfed-fullscreen-active .editpdf-canvas-area { flex: 1 1 auto; width: 0; min-width: 0; min-height: 0; height: 100%; max-height: none; padding: 32px 24px; background: var(--surface-secondary); overflow-x: auto !important; overflow-y: auto !important; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; -webkit-overflow-scrolling: touch; scrollbar-width: auto; scrollbar-color: var(--border-strong) transparent; border: 0; border-radius: 0; position: relative; }
body.pdfed-fullscreen-active .editpdf-canvas-area::-webkit-scrollbar { width: 12px; height: 12px; }
body.pdfed-fullscreen-active .editpdf-canvas-area::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.04); }
body.pdfed-fullscreen-active .editpdf-canvas-area::-webkit-scrollbar-thumb { background: var(--border-strong); border: 3px solid transparent; border-radius: 999px; background-clip: content-box; }
body.pdfed-fullscreen-active .editpdf-canvas-area::-webkit-scrollbar-thumb:hover,
body.pdfed-fullscreen-active .editpdf-page-strip::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: content-box; }
body.pdfed-fullscreen-active .editpdf-pages-list { flex: 0 0 auto; width: 100%; min-width: 100%; min-height: max-content; max-width: none; padding-bottom: 32px; }
.editpdf-pages-list { max-width: none; }
.pdfed-page-slot { flex-shrink: 0; }
.pdfed-toolbar { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; overflow: visible; padding: 8px 20px; }
.pdfed-toolbar > .stitch-tool-group { flex-wrap: wrap; }
.pdfed-tool-dd-menu { z-index: var(--z-popover); border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: var(--shadow-popover); background: var(--surface); }
.pdfed-tool-dd-menu button { min-height: 40px; color: var(--text-primary); }
.pdfed-text-format-group { gap: 8px; overflow: visible; }
.pdfed-search-group { margin-left: auto; min-width: 180px; display: flex; align-items: center; gap: 4px; }
.pdfed-text-format-group > .pdfed-btn-export-top { margin-left: 0; flex-shrink: 0; white-space: nowrap; }
.pdfed-text-format-group > .pdfed-btn-export-top span { display: inline; }
.pdfed-search-input { flex: 1; min-width: 100px; }
.pdfed-sidebar-toggle { min-width: 40px; min-height: 40px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-control); }
.pdfed-search-nav { min-width: 24px; height: 26px; padding: 2px 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: var(--radius-control); font-size: 12px; }
.pdfed-sidebar-toggle { position: sticky; top: 0; left: 0; align-self: flex-start; z-index: 10; flex-shrink: 0; }
.pdfed-page-position {
    position: sticky;
    top: 0;
    align-self: flex-end;
    z-index: 10;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin: -40px 0 8px auto;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: var(--text-caption);
    font-variant-numeric: tabular-nums;
    box-shadow: var(--shadow-subtle);
    pointer-events: none;
}
.pdfed-page-position strong { color: var(--text-primary); font-weight: 700; }
.pdfed-page-position-separator { color: var(--text-muted); }
.pdfed-context-message { font-size: var(--text-small); color: var(--text-secondary); margin: 0; }
.pdfed-more-button { display: none; }
.pdfed-object-controls { display: flex; align-items: center; gap: 8px; }
.pdfed-strip-card { border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--background); box-shadow: none; }
.pdfed-strip-card.active { border-color: var(--accent-bright); background: var(--surface-selected); box-shadow: none; }
.pdfed-strip-actions button { min-width: 32px; min-height: 32px; }
.pdfed-sign-panel { padding: 24px; }
.pdfed-sign-canvas { max-width: 100%; touch-action: none; }
/* Tool arrangements, using shared controls and surfaces. */
.compress-card-container, .compress-batch-container { width: 100%; max-width: 880px; margin: 0 auto; padding: 24px; }
.compress-target-section, .compress-file-card, .compress-results-section, .compress-loading-section { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: none; }
.compress-target-section { padding: 24px; }
.compress-preset-btn { border-radius: var(--radius-control); min-height: 44px; box-shadow: none; }
.compress-preset-btn.active { background: var(--surface-selected); border-color: var(--accent-bright); color: var(--accent); }
.compress-size-values, .compress-result-stats { flex-wrap: wrap; gap: 16px; }
.compress-result-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.compress-results-section::before, .compress-results-section::after { display: none; }
#panel-protect .control-box { max-width: 560px; }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 52px; }
.password-field button { position: absolute; inset: 0 0 0 auto; width: 44px; border: 0; background: transparent; color: var(--text-secondary); }
.img-options-bar { width: 100%; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; margin: 0; padding: 20px; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); }
.img-card { border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: none; min-width: 0; }
.img-card-footer { flex-wrap: wrap; }
.img-top-actions { width: 100%; }
.md-studio-grid { grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; min-width: 0; }
.md-editor-panel, .md-preview-panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: none; }
.md-options-row { border: 1px solid var(--border); border-radius: var(--radius-control); box-shadow: none; margin: 0; }
.md-preview-body { overflow-wrap: anywhere; }
.md-preview-body pre, .pdf-md-output-box { max-width: 100%; overflow: auto; }
#panel-mailmerge .stitch-canvas-viewport { align-items: stretch; }
.mm-fields-sidebar { max-width: 100%; height: auto; }
.mm-interactive-area { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; min-height: 520px; }
.web-grid-wrapper { max-width: 100%; }
.web-grid-wrapper input { min-width: 120px; }
/* AI PDF: on phones the document viewer is an explicit alternate view. */
#panel-chatdoc { padding: 0; }
.chatdoc-layout { width: 100%; max-width: none; min-width: 0; border-radius: var(--radius-card); border: 0; box-shadow: none; height: min(720px, calc(100dvh - 220px)); min-height: 480px; }
.chatdoc-chat-panel { min-width: 0; background: var(--surface); }
.chatdoc-header { background: var(--surface); color: var(--text-primary); border-bottom: 1px solid var(--border); }
.chatdoc-header-left, .chatdoc-header-right { min-width: 0; }
.chatdoc-upload { background: var(--surface); padding: 32px; }
.chatdoc-upload h3, .chatdoc-upload-title { color: var(--text-primary); font-size: var(--text-section); }
.chatdoc-upload-icon { color: var(--accent); background: none; box-shadow: none; }
.chatdoc-upload p { color: var(--text-secondary); }
.chatdoc-input, .chatdoc-input-wrap, .chatdoc-input-row { min-width: 0; }
.chatdoc-messages { min-height: 0; }
.chatdoc-message { max-width: 100%; overflow-wrap: anywhere; }
.chatdoc-quick-prompts { max-width: 100%; }
.chatdoc-viewer-panel { min-width: 0; background: var(--surface-secondary); }
.chatdoc-viewer-rail { background: var(--surface); border-color: var(--border); }
.chatdoc-page-tab { color: var(--text-secondary); min-height: 40px; }
.chatdoc-page-tab:hover { color: var(--accent); background: var(--surface-selected); }
.chatdoc-pdf-page-canvas { box-shadow: var(--shadow-paper); border-radius: 0; }
/* Watermark shares button hierarchy and mobile export priority. */
body.wm-studio-active { height: 100dvh; }
body.wm-studio-active haz-footer, body.wm-studio-active .tool-steps { display: none; }
.wm-studio-fullscreen { z-index: var(--z-toolbar); height: 100dvh !important; }
.wm-studio-topbar { box-shadow: none; border-bottom: 1px solid var(--border); }
.wm-studio-btn-primary { background: var(--accent) !important; box-shadow: none; }
.wm-studio-btn-secondary { background: var(--surface) !important; border-color: var(--border) !important; color: var(--text-primary) !important; }
.wm-studio-btn-primary:hover, .wm-studio-btn-secondary:hover { transform: none !important; }
.wm-panel-section { padding: 16px 0 !important; border: 0 !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none; }
.wm-studio-sidebar-settings { background: var(--surface) !important; box-shadow: none; }
.wm-studio-segmented { border-radius: var(--radius-control) !important; background: var(--surface-secondary) !important; }
.wm-studio-seg-item { border-radius: 4px !important; }
.wm-pos-btn { min-height: 40px; font-size: var(--text-small); box-shadow: none; }
.wm-mobile-settings-toggle { box-shadow: none; background: var(--surface) !important; color: var(--accent) !important; border: 1px solid var(--border) !important; }
@media (max-width: 960px) {
    .pdfed-doc-info { max-width: 160px; }
    .pdfed-top-center .stitch-pill-badge { display: none; }
    .stitch-inspector-panel { width: 280px; }
}
@media (max-width: 768px) {
    .has-active-workspace .main-content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
    .has-active-workspace .workspace-primary-action, .wm-studio-active .workspace-primary-action {
        position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 16px; right: 16px;
        width: calc(100% - 32px); min-height: 48px; margin: 0; padding: 12px 16px; z-index: var(--z-toolbar); font-size: var(--text-body); box-shadow: 0 0 0 12px var(--surface); border-radius: var(--radius-control);
    }
    .has-active-workspace .workspace-primary-action span, .wm-studio-active .workspace-primary-action span { display: inline !important; }
    .has-active-workspace::after { content: ''; position: fixed; bottom: 0; left: 0; right: 0; height: calc(76px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); z-index: calc(var(--z-toolbar) - 1); }
    body[data-stage=process]::after { display: none; }
    .stitch-topbar-row-1, .stitch-topbar-row-2, .stitch-topbar-row-3 { padding: 12px; gap: 8px; }
    .stitch-topbar-row-1 > div:empty { display: none; }
    .stitch-doc-meta { gap: 8px; }
    .stitch-canvas-viewport { padding: 16px; }
    .stitch-canvas-viewport > .control-box { padding: 20px 16px; }
    .stitch-card-grid, .pages-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .page-card { padding: 8px; }
    .page-toolbar { position: static; width: 100%; display: flex; flex-wrap: wrap; background: var(--surface); }
    .page-toolbar button, .btn-page-action { min-width: 44px; min-height: 44px; }
    .file-item { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 12px; }
    .file-item-info { width: 100%; flex-basis: 100%; gap: 12px; }
    .file-item-actions { margin-left: auto; }
    .file-item-name { font-size: var(--text-small); }
    .compress-card-container, .compress-batch-container { padding: 16px; }
    .compress-target-section { padding: 16px; }
    .compress-result-actions > button { width: 100%; }
    .compress-file-info { min-width: 0; }
    .compress-file-name { overflow-wrap: anywhere; white-space: normal; }
    .compress-size-input { max-width: 100%; }
    .compress-preset-buttons, .compress-presets { flex-wrap: wrap; }
    .img-options-bar { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 16px; gap: 16px; }
    .md-studio-grid { grid-template-columns: minmax(0,1fr); }
    .md-options-row { padding: 16px; gap: 16px; }
    .md-option-group { width: 100%; justify-content: space-between; }
    .mm-interactive-area { grid-template-columns: minmax(0,1fr); }
    .mm-fields-sidebar.stitch-inspector-panel { width: 100%; max-height: none; border-left: 0; }
    .pdf-canvas-wrapper { max-width: 100%; overflow: auto; }
    .web-grid-toolbar { gap: 8px; }
    body.pdfed-fullscreen-active .main-content.container { padding: 0; }
    body.pdfed-fullscreen-active::after { display: none; }
    body.pdfed-fullscreen-active .stitch-topbar-row-1 { min-height: 56px; padding: 8px; justify-content: space-between; flex-wrap: nowrap; }
    body.pdfed-fullscreen-active .pdfed-top-left { max-width: calc(100% - 56px); flex-wrap: nowrap; gap: 6px; overflow: hidden; }
    body.pdfed-fullscreen-active .pdfed-top-left .pdfed-btn-exit { min-width: 44px; padding: 8px; }
    body.pdfed-fullscreen-active .pdfed-top-left .pdfed-btn-exit span { display: none; }
    body.pdfed-fullscreen-active .pdfed-status-filename { max-width: 132px; text-overflow: ellipsis; }
    body.pdfed-fullscreen-active .pdfed-top-right { flex: 0 0 auto; gap: 0; }
    body.pdfed-fullscreen-active .pdfed-btn-export-top { position: static !important; inset: auto !important; width: 44px !important; min-width: 44px !important; height: 44px; padding: 10px !important; margin: 0 !important; box-shadow: none !important; }
    body.pdfed-fullscreen-active .pdfed-btn-export-top span { display: none !important; }
    .pdfed-top-center { display: none; }
    body.pdfed-fullscreen-active .pdfed-toolbar { min-height: 76px; overflow-x: auto !important; overflow-y: hidden; flex-wrap: nowrap; padding: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    body.pdfed-fullscreen-active .pdfed-toolbar::-webkit-scrollbar,
    body.pdfed-fullscreen-active .pdfed-text-format-group::-webkit-scrollbar { display: none; }
    body.pdfed-fullscreen-active .pdfed-toolbar > .stitch-tool-group { gap: 4px; width: max-content; min-width: max-content; flex-wrap: nowrap; justify-content: flex-start; }
    .pdfed-toolbar .stitch-tool-btn { padding: 6px; min-width: 44px; }
    .pdfed-toolbar .stitch-tool-btn span { font-size: var(--text-caption); }
    .pdfed-more-button { display: inline-flex; }
    .pdfed-toolbar:not(.more-open) [data-secondary-tool] { display: none; }
    .pdfed-toolbar.more-open > .stitch-tool-group { justify-content: flex-start; }
    .pdfed-tool-dd-menu { position: fixed; top: auto; bottom: calc(88px + env(safe-area-inset-bottom)); left: 16px; right: 16px; width: auto; min-width: 0; max-height: 45dvh; overflow-y: auto; }
    .pdfed-tool-dd-menu button { min-height: 44px; }
    body.pdfed-fullscreen-active .pdfed-text-format-group { min-height: 58px; max-height: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    body.pdfed-fullscreen-active .pdfed-text-format-group > * { flex: 0 0 auto; }
    body.pdfed-fullscreen-active .pdfed-search-group { flex: 0 0 220px !important; width: 220px !important; max-width: 220px !important; margin: 0; }
    body.pdfed-fullscreen-active .pdfed-scan-banner { margin: 0; padding: 10px 12px; font-size: var(--text-small); }
    body.pdfed-fullscreen-active .editpdf-page-strip { display: none; }
    body.pdfed-fullscreen-active .editpdf-page-strip.mobile-open { display: flex; position: absolute; left: 0; top: 0; bottom: 0; height: 100%; width: 160px; max-height: none; z-index: var(--z-popover); box-shadow: var(--shadow-popover); flex-direction: column; }
    body.pdfed-fullscreen-active .editpdf-workspace { position: relative; }
    body.pdfed-fullscreen-active .editpdf-canvas-area { padding: 8px 4px 24px; width: 100%; }
    .pdfed-sidebar-toggle { min-width: 44px; min-height: 44px; }
    .pdfed-page-position { margin: -52px 0 8px auto; padding: 8px 10px; }
    .chatdoc-layout { height: calc(100dvh - 180px); min-height: 480px; }
    .chatdoc-header { flex-wrap: wrap; height: auto; padding: 12px; gap: 8px; }
    .chatdoc-header-right { width: 100%; justify-content: space-between; }
    .chatdoc-upload { padding: 24px 16px; }
    .chatdoc-viewer-panel { display: none; }
    .chatdoc-layout.mobile-preview .chatdoc-viewer-panel { display: flex; width: 100%; height: 100%; }
    .chatdoc-layout.mobile-preview .chatdoc-content-area { display: none; }
    .chatdoc-layout.mobile-preview { display: flex; flex-direction: column-reverse; }
    .chatdoc-layout.mobile-preview .chatdoc-chat-panel { flex: 0 0 auto; width: 100%; }
    .chatdoc-input-row { padding: 12px; gap: 8px; }
    .chatdoc-input-row textarea { font-size: 1rem; }
    .wm-studio-active .workspace-primary-action { left: auto; width: calc(100% - 144px); }
    .wm-mobile-settings-toggle { bottom: calc(12px + env(safe-area-inset-bottom)) !important; left: 16px !important; right: auto !important; width: 112px !important; min-height: 48px !important; padding: 8px !important; border-radius: var(--radius-control) !important; z-index: var(--z-toolbar) !important; }
    .wm-mobile-settings-toggle span { display: inline !important; }
    .wm-studio-btn-secondary span { display: inline !important; }
    .wm-topbar-row-1 { justify-content: space-between !important; padding: 12px !important; }
    #wm-current-filename { display: inline !important; max-width: 150px !important; }
    .wm-studio-sidebar-settings { z-index: var(--z-sheet) !important; border-radius: var(--radius-modal) var(--radius-modal) 0 0 !important; padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important; }
    #wm-studio-backdrop { z-index: calc(var(--z-sheet) - 1) !important; }
}
