body.editor-active .site-header{height:66px;padding:0 28px}body.editor-active .desktop-nav{display:none}body.editor-active .header-actions>.button{display:none}body.editor-active .workspace{max-width:1920px;padding:22px 24px 40px;margin:auto}.workspace-heading{gap:20px}.workspace-heading h1{font-size:27px;margin-bottom:7px}.workspace-heading p{font-size:12px;line-height:1.6}.workspace-heading .back-link{margin-bottom:12px}.editor-session-actions{display:flex;align-items:center;gap:14px;margin-left:auto;flex-shrink:0}.editor-session-actions .button{font-size:12px;min-height:42px;padding:10px 14px}.editor-history{display:flex;gap:2px}.editor-history svg{width:19px;height:19px}.workspace-heading>.local-label{display:none}.editing-toolbar{display:flex;gap:3px;align-items:stretch;border:1px solid var(--line);border-radius:11px;background:#fff;padding:7px;margin:0 0 16px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#d8cbea transparent}.editor-tool{flex:1 0 74px;display:flex;align-items:center;justify-content:center;gap:6px;flex-direction:column;padding:9px 5px;border:0;border-radius:7px;background:transparent;font-size:10px;line-height:1.35;color:#5a5265;min-height:64px}.editor-tool svg{width:21px;height:21px}.editor-tool:hover{background:#f7f4fc;color:var(--purple)}.editor-tool.active{background:#ede6ff;color:#5425d1;font-weight:650}.editor-tool span{text-align:center}.editor-layout{grid-template-columns:74px minmax(0,1fr) 310px;gap:16px;align-items:start}.editor-rail{display:flex;flex-direction:column;gap:4px;padding:6px 3px;border:1px solid var(--line);border-radius:10px;background:#fff;position:sticky;top:8px}.editor-rail button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;border-radius:7px;padding:11px 3px;color:#696071;font-size:9px;line-height:1.4;min-height:66px}.editor-rail svg{width:21px;height:21px}.editor-rail button:hover{background:#f7f4fb;color:var(--purple)}.editor-rail button.active{background:var(--purple);color:#fff}.editor-rail button.active:hover{background:var(--purple-dark)}.editor-tool-options{padding:12px 15px;background:#f8f6fc;border-bottom:1px solid var(--line)}.editor-options-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.editor-options-heading strong{font-size:12px;line-height:1.4}.editor-options-heading .icon-button{width:26px;height:26px}.editor-options-heading svg{width:16px;height:16px}.editor-options-fields{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.editor-options-fields>label{display:flex;flex-direction:column;gap:5px;flex:1 1 110px;font-size:10px;color:#63556e;min-width:0}.editor-options-fields label:has(textarea){flex-basis:220px}.editor-options-fields label:has(input[type=color]),.editor-options-fields label:has(input[type=number]){flex:0 0 85px}.editor-options-fields input,.editor-options-fields select,.editor-options-fields textarea{width:100%;min-height:36px;border:1px solid #dcd3e8;border-radius:6px;padding:7px 9px;font-size:12px;color:#2a2234;background:#fff}.editor-options-fields input[type=color]{padding:4px;width:54px;cursor:pointer}.editor-options-fields textarea{resize:vertical;line-height:1.5}.editor-option-button{min-height:36px;padding:8px 11px;font-size:11px;line-height:1.4;border:1px solid #d4c6e9;border-radius:6px;background:#fff;color:#5b359f}.editor-option-button:hover{background:#eee6ff;border-color:#ad8cde}.editor-tool-hint{font-size:10px;line-height:1.65;color:#6d5e7b;margin:9px 0 0;max-width:90ch}#editor-draft-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:9px}#editor-draft-actions>span{font-size:10px;color:#6c597d}.editor-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.editor-canvas.drawing-mode{pointer-events:auto;cursor:crosshair;touch-action:none}.editor-canvas.text-mode{pointer-events:auto}.editor-canvas.busy{pointer-events:none}.editor-canvas .editor-text-hit{fill:transparent;stroke:transparent;stroke-width:1;pointer-events:auto;cursor:text}.editor-canvas .editor-text-hit:hover,.editor-canvas .editor-text-hit:focus{fill:#6236e815;stroke:#6236e8;outline:none}.editor-canvas text{pointer-events:none}.editor-view-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:5px 14px;background:#fdfcfe}.editor-page-jump,.editor-zoom{display:flex;align-items:center;gap:7px;font-size:10px;color:#776982}.editor-page-jump input{width:45px;border:1px solid #e4dcec;border-radius:5px;padding:3px 5px;font-size:11px;background:#fff;color:var(--ink)}.editor-zoom .icon-button{width:28px;height:28px}.editor-zoom svg{width:14px;height:14px}#editor-zoom-select{width:auto;max-width:190px;min-height:36px;padding:5px 8px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:12px;font-variant-numeric:tabular-nums}.editor-page-list{display:flex;gap:7px;flex-wrap:wrap;flex-basis:100%;max-height:180px;overflow:auto;padding:5px 0}.editor-page-list button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px;border:1px solid #ddd3e8;border-radius:6px;background:#fff;min-width:45px;font-size:11px;color:#6c5a7c}.editor-page-list button.active{background:#ede5ff;border-color:#8b61d6;color:#5624b7}.editor-page-list svg{width:22px;height:22px}.document-preview{overflow:auto;overflow-anchor:none}
.editor-layout .pdf-page-stage{max-width:none;flex-shrink:0}
.editor-layout .document-preview .pdf-page-stage>img{display:block;width:100%;height:auto;max-width:none;max-height:none}.document-panel{min-width:0}.control-panel{min-width:0}.workspace:fullscreen{overflow:auto;background:#fff;max-width:none;padding:24px}.workspace:fullscreen .workspace-heading>.local-label{display:none}.editor-layout .document-preview{max-height:1050px}.pdf-page-stage:has(.editor-canvas.drawing-mode){touch-action:none}.editor-tool-options .editor-option-button:focus-visible{outline-offset:2px}
@media(min-width:1500px){.editor-layout{grid-template-columns:78px minmax(0,1fr) 350px}.editor-tool{font-size:11px;flex-basis:88px}.editor-tool svg{width:23px;height:23px}.editor-tool-options{padding:14px 20px}}
@media(max-width:1100px){body.editor-active .workspace{padding:18px 16px 30px}.editor-layout{grid-template-columns:64px minmax(0,1fr) 290px;gap:12px}.editor-rail button{font-size:8px}.editor-tool{flex:0 0 83px}.workspace-heading h1{font-size:24px}.workspace-heading p{max-width:55ch}.editor-session-actions{gap:8px}.editor-session-actions .button{font-size:11px;padding:10px}.document-preview{padding:18px}.editor-layout .panel-body{padding:18px}}
@media(max-width:900px){.editor-layout{grid-template-columns:58px minmax(0,1fr)}.editor-layout .control-panel{grid-column:2}.editor-rail{grid-row:1 / span 2}.editor-session-actions{flex-direction:column;align-items:flex-end;gap:6px}.editor-history .icon-button{width:30px;height:30px}.workspace-heading{margin-bottom:17px}.editor-layout .document-preview{max-height:850px}}
@media(max-width:600px){body.editor-active .site-header{padding:0 16px;height:60px}body.editor-active .workspace{padding:16px 12px 30px}.workspace-heading{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}.workspace-heading>div:first-child{width:100%}.workspace-heading h1{font-size:23px}.workspace-heading p{font-size:11px;margin-bottom:0}.workspace-heading .back-link{margin-bottom:10px;font-size:11px}.editor-session-actions{flex-direction:row;width:100%;justify-content:space-between;margin:0}.editor-session-actions .button{min-height:40px;font-size:11px}.editor-history .icon-button{width:35px;height:35px}.editing-toolbar{padding:5px;margin-bottom:10px;border-radius:8px}.editor-tool{flex-basis:75px;font-size:9px;min-height:61px;padding:7px 4px}.editor-tool svg{width:20px;height:20px}.editor-layout{grid-template-columns:minmax(0,1fr);gap:12px}.editor-rail{position:static;grid-row:auto;grid-column:1;display:flex;flex-direction:row;overflow:auto;gap:3px;padding:4px;border-radius:8px}.editor-rail button{flex:0 0 62px;min-height:57px;font-size:8px;padding:6px 3px;gap:5px}.editor-rail svg{width:18px;height:18px}.editor-layout .control-panel{grid-column:1;order:initial}.editor-layout .document-preview{max-height:650px;padding:12px}.editor-tool-options{padding:10px}.editor-options-fields{gap:8px}.editor-options-fields>label{font-size:10px;flex-basis:100px}.editor-options-fields label:has(textarea){flex-basis:100%}.editor-options-fields label:has(input[type=color]),.editor-options-fields label:has(input[type=number]){flex-basis:80px}.editor-options-fields input,.editor-options-fields select,.editor-options-fields textarea{font-size:13px;min-height:38px}.editor-option-button{font-size:11px;min-height:39px}.editor-tool-hint{font-size:10px}.editor-view-tools{padding:5px 10px}.document-toolbar #current-filename{max-width:calc(100vw - 180px)}.editor-options-heading strong{font-size:12px}.editor-page-list{max-height:140px}}

.workspace-heading>div:first-child{min-width:0}
.editor-session-actions .editor-voice{min-height:44px;white-space:normal;text-align:center}
.editor-session-actions .editor-voice svg{flex-shrink:0}
.editor-session-actions .editor-voice.recording{background:#b42345;border-color:#b42345;color:#fff}
.editor-session-actions .editor-voice.recording:hover{background:#941a37}
#editor-download{background:#fff;border-color:#c8b9e7;color:var(--purple);white-space:normal;text-align:center}
#editor-download:hover:not(:disabled){background:#f5f0ff;border-color:var(--purple)}
@media(min-width:761px) and (max-width:1100px){
  .workspace-heading{flex-wrap:wrap}
  .workspace-heading>div:first-child{width:100%}
  .editor-session-actions{flex-direction:row;justify-content:flex-end;flex-wrap:wrap;max-width:100%}
}

.editor-mobile-dock,.editor-mobile-status{display:none}
.editor-return-document{display:flex;align-items:center;gap:8px;width:100%;min-height:46px;padding:12px 16px;border:0;border-bottom:1px solid var(--line);background:#faf8ff;color:var(--purple);font:inherit;font-weight:600;text-align:left;cursor:pointer}
.editor-return-document svg{width:20px;height:20px;flex-shrink:0}
.editor-return-document:focus-visible{outline:3px solid var(--purple);outline-offset:-3px}
.resume-document{margin-bottom:20px}
.document-panel{scroll-margin-top:16px}
@media(max-width:760px){
  .workspace:not([data-mobile-view="chat"]):not([data-mobile-view="controls"]) .editor-mobile-status:not([hidden]){display:block;margin:0 0 16px;padding:12px 14px;border:1px solid var(--line);border-radius:8px;font-size:14px;line-height:1.6;background:#faf8ff;overflow-wrap:anywhere}
  .workspace .editor-mobile-status.error{color:#8c2444;border-color:#e5b6c4;background:#fff5f7}
  body.editor-active .workspace{padding:18px 12px calc(110px + env(safe-area-inset-bottom));scroll-margin-top:12px;min-height:calc(100dvh - 74px)}
  .workspace-heading{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:16px}
  .workspace-heading>div:first-child{width:100%}
  .workspace-heading h1{font-size:24px;line-height:1.2}
  .workspace-heading p{display:none}
  .workspace-heading .back-link{font-size:13px;min-height:44px;margin-bottom:10px}
  .editor-session-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;width:100%;margin:0}
  .editor-session-actions .editor-voice{grid-column:1 / -1;grid-row:1;width:100%;font-size:14px;min-height:48px}
  .editor-session-actions .editor-history{grid-column:1;grid-row:2}
  .editor-session-actions #editor-download{grid-column:2;grid-row:2;max-width:100%}
  .editor-session-actions .button{font-size:13px;min-height:44px}
  .editor-history .icon-button{width:44px;height:44px}
  .workspace:is([data-mobile-view="tools"],[data-mobile-view="chat"],[data-mobile-view="controls"]) .editor-session-actions :is(.editor-history,#editor-download){display:none}
  .workspace[data-mobile-view="chat"] .chat-intro{display:none}
  .editor-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
  .editor-layout .control-panel{grid-column:1}
  .workspace[data-mobile-view="document"] .editing-toolbar,.workspace[data-mobile-view="document"] .editor-rail,.workspace[data-mobile-view="document"] .control-panel,
  .workspace[data-mobile-view="chat"] .editing-toolbar,.workspace[data-mobile-view="chat"] .editor-rail,.workspace[data-mobile-view="chat"] .document-panel,
  .workspace[data-mobile-view="controls"] .editing-toolbar,.workspace[data-mobile-view="controls"] .editor-rail,.workspace[data-mobile-view="controls"] .document-panel,
  .workspace[data-mobile-view="tools"] .document-panel,.workspace[data-mobile-view="tools"] .control-panel{display:none}
  .workspace[data-mobile-view="tools"] .editing-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;overflow:visible;margin-bottom:16px}
  .workspace[data-mobile-view="tools"] .editor-tool{min-width:0;min-height:80px;font-size:12px;padding:12px 6px;gap:8px;overflow-wrap:anywhere}
  .workspace[data-mobile-view="tools"] .editor-tool svg{width:24px;height:24px}
  .workspace[data-mobile-view="tools"] .editor-rail{position:static;grid-column:1;grid-row:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;overflow:visible}
  .workspace[data-mobile-view="tools"] .editor-rail button{font-size:12px;min-height:80px;padding:12px 5px;overflow-wrap:anywhere}
  .workspace[data-mobile-view="tools"] .editor-rail svg{width:23px;height:23px}
  .editor-mobile-dock{position:fixed;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));left:0;right:0;bottom:0;z-index:50;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:4px;background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 22px #241b3a08}
  .editor-mobile-dock button{border:0;background:transparent;color:#5f566b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:58px;border-radius:9px;padding:6px 2px;font-size:11px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
  .editor-mobile-dock svg{width:22px;height:22px}
  .editor-mobile-dock button[aria-pressed="true"]{color:var(--purple);background:#f0eaff}
  .editor-mobile-dock .editor-mobile-download{background:var(--purple);color:#fff}
  .editor-mobile-dock button:focus-visible{outline:3px solid var(--purple);outline-offset:-3px}
  .editor-mobile-dock .editor-mobile-download:focus-visible{outline-color:#fff}
  .editor-mobile-dock button:disabled{opacity:.5}
  .editor-layout .document-preview{padding:12px;max-height:calc(100dvh - 250px);min-height:220px;overscroll-behavior:contain}
  .document-toolbar{padding:10px 12px;gap:8px}
  .file-title{min-width:0;font-size:12px}
  .document-toolbar #current-filename{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .page-controls{flex-shrink:0;gap:2px;font-size:12px}
  .page-controls .icon-button,.editor-zoom .icon-button{width:44px;height:44px}
  .editor-view-tools{gap:8px;padding:6px 10px;flex-wrap:wrap}
  .editor-page-jump,.editor-zoom{font-size:13px}
  .editor-page-jump input{font-size:16px;min-height:44px;width:50px}
  #editor-zoom-select{font-size:16px;min-height:44px;max-width:180px}
  .editor-tool-options{padding:16px}
  .editor-options-heading strong{font-size:16px}
  .editor-options-heading .icon-button{width:44px;height:44px;flex-shrink:0}
  .editor-options-fields{gap:12px}
  .editor-options-fields>label{font-size:13px;flex-basis:120px}
  .editor-options-fields input,.editor-options-fields select,.editor-options-fields textarea{font-size:16px;min-height:44px}
  .editor-option-button{font-size:13px;min-height:44px;padding:10px 12px}
  .editor-tool-hint{font-size:13px;line-height:1.6}
  .editor-page-list button{min-width:44px;min-height:44px;font-size:13px}
  .editor-layout .panel-body{padding:18px}
  .control-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0 6px}
  .control-tab{min-width:0;min-height:48px;font-size:13px;padding:12px 4px;white-space:normal;overflow-wrap:anywhere}
  .control-tab svg{flex-shrink:0}
  .workspace textarea,.workspace select,.workspace input:not([type=checkbox]):not([type=color]){font-size:16px}
  .workspace .field-label,.chat-intro,.chat-message,.chat-message p,.panel-footer{font-size:14px}
  .chat-composer textarea{min-height:112px}
  .chat-composer button,.chat-secondary-actions button,.selection-toolbar button{min-height:44px}
  .selection-toolbar-main strong,.selection-ratio-label,#selection-dimensions{font-size:13px}
  .selection-step,.selection-size{min-width:44px;font-size:13px}
  .selection-handle{width:44px;height:44px}
  .selection-handle::after{width:12px;height:12px;left:16px;top:16px}
  #selection-hint{font-size:12px;min-height:0}
  .plan-primary{flex-direction:column;align-items:stretch;gap:12px}
  .plan-primary>.button{width:100%;max-width:none}
  .plan-summary{font-size:14px}
  .plan-details{font-size:13px}
  #command-plan.document-action-bar{scroll-margin-top:12px;position:relative;top:auto;padding:14px}
  .document-action-bar .button{min-height:48px;font-size:14px}
  .document-action-bar summary{font-size:13px;min-height:40px}
  .workspace .text-button{min-height:44px;font-size:13px}
  .editor-drop{padding:24px 18px;min-height:300px}
  .editor-drop p{font-size:14px}
  .editor-drop .button{width:100%;font-size:14px}
  .toast{bottom:calc(88px + env(safe-area-inset-bottom))}
}

@media(max-width:380px){
  .editor-session-actions{grid-template-columns:1fr}
  .editor-session-actions .editor-history{grid-row:3;justify-content:center}
  .editor-session-actions #editor-download{grid-column:1;grid-row:2;width:100%}
}

@media(max-width:1100px),(any-pointer:coarse){
  .workspace .editor-options-fields :is(input,select,textarea),.workspace #tool-controls :is(input,select,textarea),.workspace #ai-controls :is(input,select,textarea),.workspace .chat-composer textarea,.workspace .selection-toolbar-main select{font-size:16px;min-height:44px}
  .workspace #editor-zoom-select,.workspace .editor-page-jump input{font-size:16px;min-height:44px}
  .workspace :is(.editor-history,.editor-zoom,.page-controls,.editor-options-heading,.files-list,.chat-attachment) .icon-button{width:44px;height:44px;flex:0 0 44px}
  .workspace .editor-option-button,.workspace .pdf-inline-text__button{min-height:44px;min-width:44px;max-width:100%;overflow-wrap:anywhere}
  .workspace .command-examples button{min-height:44px;padding:9px 11px;font-size:12px}
  .workspace .selection-step,.workspace .selection-size{min-width:44px;min-height:44px}
  .workspace .selection-ratio-label{min-height:44px;gap:8px}
  .workspace .selection-ratio-label input{width:20px;height:20px;flex-shrink:0}
  .workspace .chat-composer-actions .record-button{width:44px;height:44px}
  .workspace .chat-composer-actions .chat-attach,.workspace .chat-composer-actions .button{min-height:44px}
}

.editor-scan-text{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:#f6f2fc;border-bottom:1px solid var(--line);color:var(--ink)}
.editor-scan-text[hidden]{display:none}
.editor-scan-text strong{display:block;font-size:14px}.editor-scan-text p{margin:4px 0 0;max-width:65ch;font-size:12px;line-height:1.5;color:#62556f}
.editor-scan-actions{display:flex;align-items:flex-end;gap:8px;flex-shrink:0}.editor-scan-actions label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#62556f}.editor-scan-actions select{min-width:120px;min-height:40px;padding:7px;padding-inline-end:30px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--ink);font:inherit;font-size:13px}.editor-scan-actions button{display:flex;align-items:center;gap:6px;min-height:40px}.editor-scan-actions svg{width:18px;height:18px}
.scan-text-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.scan-text-comparison figure{min-width:0;margin:0}.scan-text-comparison figcaption{margin-bottom:6px;color:var(--ink);font-size:13px;font-weight:600}.scan-text-comparison__image{overflow:auto;max-height:230px;background:#fff;border:1px solid var(--line);border-radius:6px;overscroll-behavior:contain}.scan-text-comparison__image:focus-visible{outline:2px solid #6236e8;outline-offset:2px}.scan-text-comparison__image svg{display:block;max-width:100%;min-height:70px}.scan-text-comparison__note{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;color:#62556f}.scan-text-comparison>.text-button{grid-column:1/-1;justify-self:start;min-height:40px}
@media(max-width:1100px){.editor-scan-text{flex-wrap:wrap}.editor-scan-actions{flex-shrink:1;flex-wrap:wrap}}
@media(max-width:760px){.editor-scan-text{padding:12px;gap:10px}.editor-scan-text p{font-size:13px}.editor-scan-actions{width:100%}.editor-scan-actions select,.editor-scan-actions button{min-height:44px}.scan-text-comparison{grid-template-columns:minmax(0,1fr)}.scan-text-comparison__note{font-size:13px}}
