/* Studio v4, layout only; preserve PDF processing and all original control IDs */
#editorOverlay.studio-v4,#textEditorOverlay.studio-v4{padding:0!important;background:#111827!important}
.studio-v4 .editor-wrapper{background:#f3f6fb!important;color:#1b293e!important;position:relative!important;max-width:none!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;border-radius:0!important;padding:0!important;margin:0!important}
.studio-v4 .studio-header{height:65px;display:flex;align-items:center;gap:25px;padding:0 76px 0 24px;background:#fff;border-bottom:1px solid #dce4ef;position:sticky;top:0;z-index:25}
.studio-v4 .studio-brand{font-weight:900;letter-spacing:1px;color:#185bd1;font-size:18px;white-space:nowrap}.studio-v4 .studio-document-name{font-size:14px;font-weight:650;color:#40516b}
.studio-v4 .studio-original-title,.studio-v4 .studio-original-desc{display:none!important}
.studio-v4 .modal-close{position:fixed!important;right:17px!important;top:13px!important;z-index:40!important;width:38px!important;height:38px!important;background:#e9eff9!important;color:#1f334f!important}
.studio-v4 .studio-workspace{display:grid!important;grid-template-columns:190px minmax(0,1fr) 240px;grid-template-rows:minmax(0,1fr) auto;gap:12px;padding:12px!important;margin:0!important;max-width:none!important;width:100%;height:calc(100dvh - 65px);align-items:stretch;box-sizing:border-box}
.studio-v4 .studio-workspace.hidden{display:none!important}
.studio-v4 .studio-tools,.studio-v4 .studio-properties{min-width:0;min-height:0;overflow-y:auto;background:#fff;border:1px solid #dce4ef;border-radius:14px;padding:14px;box-shadow:0 2px 10px #192c4b08}
.studio-v4 .studio-tools{grid-column:1;grid-row:1}.studio-v4 .studio-properties{grid-column:3;grid-row:1}.studio-v4 .studio-rail-title{font-size:13px;letter-spacing:.02em;color:#263c5a;margin:0 0 14px;font-weight:800}.studio-v4 .studio-help{font-size:12px;color:#6a7890;line-height:1.5;margin:0 0 14px}
.studio-v4 .editor-toolbar,.studio-v4 .text-toolbar{display:block!important;background:none!important;border:0!important;padding:0!important;margin:0!important;max-height:none!important;overflow:visible!important;box-shadow:none!important;width:100%!important}
.studio-v4 .editor-toolbar::before,.studio-v4 .text-toolbar::before{display:none!important}
.studio-v4 .studio-tool-group{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}
.studio-v4 .studio-tool-group>.tool-btn,.studio-v4 .studio-tool-group>.te-mode-group{min-width:0!important;min-height:61px!important;width:100%!important;height:auto!important;display:flex!important;flex-direction:column;justify-content:center;align-items:center;gap:5px;border:1px solid #e1e7f0!important;border-radius:10px!important;font-size:20px!important;padding:8px 2px!important;background:#f8faff!important;color:#263b5a!important}
.studio-v4 .studio-tool-group>.tool-btn.active{background:#e6efff!important;border-color:#6495f3!important;color:#145ad1!important}
.studio-v4 .studio-tool-label{display:block;font-size:10px;font-weight:600;line-height:1.2;white-space:normal;text-align:center}
.studio-v4 .studio-tool-group>.tool-divider,.studio-v4 .studio-tool-group>.toolbar-divider{grid-column:1/-1;width:100%;height:1px;margin:4px 0;background:#e4eaf2}
.studio-v4 .studio-tool-group>.te-mode-group{grid-column:1/-1;display:flex!important;flex-direction:row;min-height:56px!important}.studio-v4 .te-mode-btn{display:inline-flex;align-items:center;flex-direction:column;gap:3px;min-height:48px;flex:1}.studio-v4 .te-mode-btn .studio-tool-label{font-size:9px}
.studio-v4 .studio-stage{grid-column:2;grid-row:1;min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px}.studio-v4 .studio-stage-header{display:flex;justify-content:space-between;align-items:center;padding:0 8px;min-height:25px}.studio-v4 .studio-stage-caption{font-size:12px;color:#61718b}
.studio-v4 .studio-stage>.editor-canvas-wrap{flex:1 1 auto;min-height:0!important;max-height:none!important;height:auto!important;margin:0!important;overflow:auto!important;border-radius:13px!important;background:#e2e8f2!important;border:1px solid #cbd5e1!important}
.studio-v4 .studio-stage .editor-canvas-scroll{height:100%!important;min-height:100%!important;max-height:none!important;padding:24px!important;box-sizing:border-box}.studio-v4 .studio-stage>.editor-pages{margin:0!important;padding:9px!important;background:#fff;border:1px solid #dce4ef;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:12px}
.studio-v4 .studio-property-group{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-bottom:16px}.studio-v4 .studio-property-group>label{width:100%;font-size:12px;color:#4a5a70}.studio-v4 .studio-property-group select,.studio-v4 .studio-property-group input{max-width:100%;min-width:0}.studio-v4 .studio-property-group>.line-width-picker{display:flex;flex-wrap:wrap;width:100%;gap:6px}.studio-v4 .studio-property-group>.color-swatch{width:27px!important;height:27px!important;flex:none!important}
.studio-v4 .studio-zoom-group{border-top:1px solid #e4eaf2;padding-top:14px}.studio-v4 .studio-zoom-group .zoom-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:6px}.studio-v4 .te-format-panel{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;background:#f6f9fd!important;border:1px solid #e1e8f2!important;border-radius:10px;padding:10px!important;margin:0 0 14px!important}.studio-v4 .te-format-panel label{font-size:11px}.studio-v4 .te-format-panel select,.studio-v4 .te-format-panel input{max-width:100%}
.studio-v4 .studio-footer{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:18px;position:relative;background:#fff;border:1px solid #dce4ef;border-radius:12px;padding:10px 14px;min-height:57px}.studio-v4 .studio-save-button{width:auto!important;min-width:155px!important;max-width:220px!important;height:41px!important;min-height:41px!important;margin:0!important;padding:0 18px!important;border-radius:9px!important;background:#1965df!important;color:#fff!important;font-size:13px!important;font-weight:800!important;box-shadow:none!important;white-space:nowrap}.studio-v4 .studio-save-button:hover{background:#1153bd!important}.studio-v4 .studio-save-info{position:absolute;left:16px;max-width:30%;font-size:11px;color:#64748b}.studio-v4 .studio-keyboard-help{position:absolute;right:16px;max-width:27%;font-size:10px!important;color:#748197!important;line-height:1.3;margin:0!important;text-align:right!important}
.studio-v4 .studio-status{position:fixed;bottom:78px;left:50%;transform:translateX(-50%);z-index:40;max-width:min(600px,90vw)}
.studio-v4 .drop-zone{max-width:650px;margin:12vh auto!important}
@media(max-width:1000px){.studio-v4 .studio-workspace{grid-template-columns:145px minmax(0,1fr) 190px;gap:8px;padding:8px!important}.studio-v4 .studio-tools,.studio-v4 .studio-properties{padding:9px}.studio-v4 .studio-save-info,.studio-v4 .studio-keyboard-help{display:none}}
@media(max-width:680px){.studio-v4 .studio-header{height:54px;padding-left:12px}.studio-v4 .studio-workspace{height:calc(100dvh - 54px);grid-template-columns:1fr;grid-template-rows:auto minmax(260px,1fr) auto auto;overflow-y:auto}.studio-v4 .studio-tools{grid-column:1;grid-row:1;max-height:145px;overflow-y:auto}.studio-v4 .studio-tools .studio-tool-group{grid-template-columns:repeat(5,minmax(0,1fr))}.studio-v4 .studio-tool-group>.tool-btn{min-height:55px!important}.studio-v4 .studio-stage{grid-column:1;grid-row:2;min-height:260px}.studio-v4 .studio-properties{grid-column:1;grid-row:3;max-height:190px}.studio-v4 .studio-footer{grid-column:1;grid-row:4}.studio-v4 .studio-stage .editor-canvas-scroll{padding:10px!important}.studio-v4 .studio-document-name{font-size:11px}}
