:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#25354a;background:#f5f7fa;font-size:14px;--blue:#245bdf;--border:#e4e9f0}*{box-sizing:border-box}body{margin:0}button,.button{font:inherit;border:1px solid var(--border);background:white;border-radius:8px;padding:9px 12px;color:#334760;cursor:pointer;text-decoration:none;display:inline-flex;justify-content:center;align-items:center;gap:7px;white-space:nowrap}button:hover,.button:hover{border-color:#94afe9;background:#f4f7ff}button:disabled{opacity:.45;cursor:wait}input,select{font:inherit;color:inherit;border:1px solid #dce3ee;border-radius:6px;padding:8px;background:white;max-width:100%}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #92b4ff;outline-offset:2px}input[type=file]{display:none}header{height:82px;padding:0 28px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:24px;background:white}.brand{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:750;color:#21354d;text-decoration:none}.brand small{font-size:8px;letter-spacing:1.8px;display:block;margin-top:5px;font-weight:650;color:#7e8b9d}.brand-icon{width:40px;height:44px;background:var(--blue);border-radius:11px;color:white;display:grid;place-items:center;font-size:27px;position:relative}.brand-icon span{position:absolute;bottom:-2px;right:-4px;font-size:18px;color:#ffd68b}.badge{font-size:9px;letter-spacing:1px;color:#668071;background:#eef6f0;border-radius:5px;padding:6px 8px}.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}#expiry{font-size:11px;color:#7a8697;margin-right:8px}.layout{display:grid;grid-template-columns:226px minmax(400px,1fr) 328px;min-height:calc(100vh - 82px)}aside{background:#fff;padding:24px 18px}.sources{border-right:1px solid var(--border)}.section-top{display:flex;justify-content:space-between;align-items:center;gap:10px}h2{font-size:14px;margin:0;font-weight:650}#file-count,.step{font-size:10px;color:#8995a5}.upload-button{border:1px dashed #9bb4e9;color:#245bdf;background:#f4f7ff;display:block;text-align:center;padding:13px 8px;margin:20px 0 10px;border-radius:8px;cursor:pointer;font-weight:600}.tiny{font-size:11px;line-height:1.65}.muted{color:#8290a2}.file{display:block;width:100%;text-align:left;white-space:normal;padding:12px 10px;margin-top:10px;border:1px solid var(--border);border-radius:9px;cursor:pointer}.file.active{background:#eff4ff;border-color:#c5d5fb}.file strong{font-size:12px;display:block;word-break:break-word}.file small{display:block;color:#8b98a8;margin-top:5px;font-size:10px}.source-help{margin-top:44px;border-top:1px solid var(--border);padding-top:20px}.source-help strong{font-size:12px}.source-help p{color:#8794a5;font-size:12px;line-height:1.7}.danger{font-size:11px;color:#a05858;margin-top:25px}main{min-width:0;padding:26px 25px 20px}.workspace-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:22px}.eyebrow{font-size:9px;letter-spacing:1.6px;color:#7c8ba2;font-weight:600}h1{font-size:25px;letter-spacing:-.8px;font-weight:650;margin:7px 0 0}.active-name{font-size:10px;color:#8390a3;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolbar{display:flex;align-items:center;background:white;border:1px solid var(--border);padding:8px;border-radius:10px 10px 0 0;gap:3px;flex-wrap:wrap}.toolbar button{border:0;padding:7px 9px;font-size:13px}.toolbar button span{font-size:11px}.toolbar-note{font-size:9px;color:#8c98a8;margin-left:auto;padding:5px}.divider{height:20px;border-left:1px solid var(--border);margin:0 4px}.canvas-area{height:510px;background:#eaf0f6;overflow:auto;display:flex;align-items:flex-start;padding:28px;position:relative;min-width:0;border-left:1px solid var(--border);border-right:1px solid var(--border)}.canvas-area.drag-over{background:#d7e5ff}.empty{text-align:center;margin:auto;width:100%;padding:35px 0}.empty-icon{background:white;width:68px;height:78px;display:grid;place-items:center;margin:0 auto 25px;border-radius:10px;box-shadow:0 10px 30px #344f7610;color:#4073e5;font-size:35px;border:1px solid #dce4f1}.empty h2{font-size:20px;font-weight:600;letter-spacing:-.4px}.empty p{font-size:12px;line-height:1.8;color:#7a8b9f;margin:13px 0 24px}.primary{background:var(--blue);color:white;border-color:var(--blue);font-weight:600;box-shadow:0 3px 8px #245bdf18}.primary:hover{background:#194dc7;color:white}.empty-tags{display:flex;justify-content:center;gap:16px;color:#8e9aab;font-size:10px;margin-top:26px}#page-wrap{position:relative;margin:0 auto;box-shadow:0 5px 24px #22364b20;flex-shrink:0;background:white}#pdf-canvas{display:block}#objects{position:absolute;inset:0}.edit-object{position:absolute;cursor:move;user-select:none;touch-action:none;white-space:pre;line-height:1.25;font-family:Arial,sans-serif}.edit-object.selected{outline:2px dashed #2b66df;outline-offset:3px}.edit-object img{width:100%;height:100%;pointer-events:none}.page-bar{display:flex;align-items:center;gap:8px;background:#fff;padding:10px;border:1px solid var(--border);border-radius:0 0 10px 10px;font-size:10px}.page-bar button{font-size:11px;padding:6px 8px}.page-bar input{width:53px;font-size:11px;padding:5px}.spacer{flex:1}#inspector{background:#fff;padding:8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;border:1px solid var(--border);font-size:11px}#inspector[hidden]{display:none}#inspector input{width:58px;padding:4px}#inspector input[type=color]{width:30px;height:27px;padding:2px}#inspector button{padding:5px 7px;font-size:11px}.jobs{margin-top:25px}.job{border:1px solid var(--border);background:white;border-radius:8px;padding:12px;margin-top:12px;font-size:12px}.job-top{display:flex;justify-content:space-between;gap:8px}.job a{font-size:11px;margin:8px 6px 0 0}.job progress{width:100%;height:4px;accent-color:var(--blue);margin-top:10px}.outputs{border-left:1px solid var(--border)}.intro{font-size:12px;line-height:1.65;margin:14px 0 19px}.quick-actions{display:flex;gap:7px}.quick-actions button{font-size:11px;flex:1}.output-card{border:1px solid #dce4ef;border-radius:10px;margin-top:16px;overflow:hidden;background:#fff}.output-header{background:#f7f9fc;padding:10px;display:flex;align-items:center;gap:7px}.output-header span{font-size:10px;color:#7190c5;font-weight:700}.output-header input{font-size:12px;width:100%;border:0;padding:5px;background:transparent;font-weight:600}.icon-button{border:0;padding:3px;background:transparent;color:#8a99ac}.segment{padding:12px;border-top:1px solid #eff2f7}.segment select{font-size:11px;width:100%;padding:7px}.segment label{display:block;font-size:9px;color:#8592a4;margin:10px 0 5px;text-transform:uppercase;letter-spacing:.7px}.segment input{width:100%;font-size:12px}.segment-footer{display:flex;gap:5px;margin-top:8px;align-items:center}.segment-footer select{width:86px;padding:4px;font-size:10px}.segment-footer button{font-size:11px;padding:4px 8px}.add-selection{font-size:10px;margin:0 12px 12px;color:#3c68bd}.wide{width:100%;justify-content:space-between;padding:13px 14px}.export-summary{font-size:11px;color:#617793;margin:22px 0 12px}details{margin-top:24px;border-top:1px solid var(--border);padding-top:16px;color:#77869a}summary{font-size:11px;cursor:pointer}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#243750;color:#fff;max-width:90vw;padding:14px 22px;border-radius:10px;box-shadow:0 10px 40px #20334c30;z-index:100;font-size:13px}body.embed header .badge,body.embed header .brand small{display:none}body.embed header{height:64px}#page-wrap[hidden]{display:none}@media(min-width:1550px){.canvas-area{height:620px}}@media(max-width:1150px){.layout{grid-template-columns:185px minmax(360px,1fr) 290px}main{padding:22px 15px}.toolbar-note{display:none}.active-name{display:none}.badge{display:none}.header-actions #expiry{display:none}}@media(max-width:920px){.layout{grid-template-columns:180px 1fr}.outputs{grid-column:1/-1;border-top:1px solid var(--border)}#outputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}.wide{max-width:400px}header{padding:0 15px}.header-actions .button{display:none}}@media(max-width:600px){.layout{display:block}.sources{padding:16px;border-bottom:1px solid var(--border)}.source-help,.sources>.tiny,.sources>.muted{display:none}.sources #files{display:flex;overflow:auto;gap:8px}.file{min-width:150px;max-width:200px}.upload-button{margin:10px 0}.danger{margin-top:10px}.brand{font-size:18px}header{height:70px}.canvas-area{height:440px;padding:15px}h1{font-size:23px}.page-bar{flex-wrap:wrap}.empty-tags{gap:10px}.outputs{padding:20px}main{padding:20px 12px}}

/* studio-ui-v2 */
:root{--blue:#3659e3;--border:#dfe5ef;color:#23324a;background:#eef2f7;font-size:14px}
[hidden]{display:none!important}
body{background:#eef2f7}header{height:72px;padding:0 24px;gap:20px;box-shadow:0 1px 8px #20304a06}
.brand{font-size:20px}.brand-icon{height:38px;width:36px;border-radius:10px}.badge{color:#356d58;font-weight:600}
button,.button{min-height:34px;transition:background .15s,border-color .15s}button:disabled{cursor:not-allowed}
.muted{color:#65758c}.tiny{font-size:12px}.layout{grid-template-columns:218px minmax(360px,1fr) 320px;min-height:calc(100vh - 72px)}
aside{padding:22px 16px}.sources{background:#f9fbfe}.section-top h2{font-size:14px;font-weight:700}
main{padding:20px;min-width:0}.workspace-title{margin-bottom:16px}h1{font-size:23px;letter-spacing:-.6px}.eyebrow{color:#627692;letter-spacing:1.3px}.active-name{font-size:12px;max-width:230px;color:#52657e}
.upload-button{border-style:solid;background:#fff;margin-top:18px;padding:13px}.file{padding:14px 11px;background:white}.file strong{font-size:13px}.file small{font-size:11px;color:#65758c}.file.active{border-color:#839aef;background:#edf2ff;box-shadow:inset 3px 0 #3659e3}.source-help{margin-top:28px}.source-help p{color:#65758c}
.toolbar{border-radius:12px 12px 0 0;padding:10px;gap:5px}.toolbar button{font-size:15px;padding:8px 10px}.toolbar button span{font-size:12px}.toolbar button:hover{background:#eef2ff;color:#3659e3}.toolbar-note{color:#61718a;font-size:10px}
#inspector{padding:12px;gap:12px;border-top:0}#inspector label{display:flex;align-items:center;gap:6px;color:#50617a}#inspector #text-field{display:flex;align-items:stretch;flex-direction:column;width:100%;font-weight:600}#inline-text{font:14px/1.5 Arial,sans-serif;resize:vertical;width:100%;min-height:64px;max-height:150px;border:1px solid #bdcae0;border-radius:8px;padding:10px;color:#20324d;background:#fafdff}#inline-text:focus{outline:2px solid #809aef;outline-offset:1px}#text-help{font-size:11px;font-weight:400;color:#63738a}#inline-text:invalid{border-color:#c44646}#edit-text{margin-left:auto}
.canvas-area{height:clamp(380px,58vh,820px);background-color:#e8edf4;background-image:radial-gradient(#c8d2e0 .65px,transparent .65px);background-size:16px 16px;padding:28px}#page-wrap{box-shadow:0 6px 28px #25395922}#objects{overflow:hidden}.edit-object.selected{outline:2px solid #3659e3;outline-offset:2px}.edit-object.selected:after{content:'';position:absolute;width:7px;height:7px;background:white;border:1px solid #3659e3;right:-5px;bottom:-5px;pointer-events:none}.page-bar{padding:10px;border-radius:0 0 12px 12px;gap:6px}.page-bar button{min-height:30px}.empty h2{font-size:24px;color:#273b58}.empty p{font-size:14px;color:#62738c}.empty-tags{font-size:12px;flex-wrap:wrap;color:#62738c}
.outputs{background:#fff}.intro{color:#64758a;font-size:13px}.quick-actions button{font-size:12px;min-height:38px}.output-card{border-color:#dce3ee;box-shadow:0 3px 12px #24345205;border-radius:12px}.output-header{padding:11px;background:#f4f6fc}.output-header input{font-size:13px}.segment{padding:13px}.segment select,.segment input{font-size:12px;min-height:35px}.segment label{font-size:10px;color:#596f8c}.segment-footer select{min-height:30px}.add-selection{font-size:12px;min-height:34px}.export-summary{font-size:12px}.wide{min-height:46px;border-radius:9px}details{color:#64758a}details summary{font-size:12px}
.jobs{margin-top:22px;scroll-margin-top:18px}.job{padding:16px;border-radius:12px;border-left:4px solid #b2bfd4}.job[data-state=done]{border-left-color:#249276}.job[data-state=failed]{border-left-color:#d45b5b}.job[data-state=running]{border-left-color:#3659e3}.job[data-state=queued]{border-left-color:#c29339}.job-top{font-size:14px}.job-message{color:#63738b;line-height:1.6;font-size:12px;margin:8px 0}.job a{font-size:12px;white-space:normal;overflow-wrap:anywhere}.job progress{display:block;margin:12px 0}
#export-status{font-size:12px;border:1px solid #e1e6ef;background:#f4f6fb;color:#566982;max-width:220px;white-space:normal}#export-status[data-state=done]{color:#17684e;background:#eef9f3;border-color:#cce9d9}#export-status[data-state=failed]{color:#a63f3f;background:#fff3f3}#export-status[data-state=queued],#export-status[data-state=running]{color:#3153b8;background:#eff3ff}#toast{bottom:20px;font-size:13px;line-height:1.5}
#studio-dialog{border:1px solid #dfe5ef;border-radius:16px;padding:26px;width:min(430px,92vw);color:#23324a;box-shadow:0 24px 90px #17243b30}#studio-dialog::backdrop{background:#17243b66}#studio-dialog h2{font-size:20px;margin-bottom:16px}#dialog-label{display:block;line-height:1.6;margin-bottom:12px}#dialog-input{width:100%}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
@media(min-width:1200px){body{height:100dvh;overflow:hidden}.layout{height:calc(100dvh - 72px);min-height:0}.sources,.outputs,main{overflow:auto;scrollbar-width:thin}.sources,.outputs{scrollbar-color:#c9d3e3 transparent}}
@media(max-width:1199px){.layout{grid-template-columns:185px minmax(330px,1fr) 290px}main{padding:16px 12px}.toolbar-note{display:none}header{padding:0 16px;gap:12px}.header-actions{gap:6px}#export-status{max-width:165px}.active-name{display:none}}
@media(max-width:1000px){.layout{grid-template-columns:180px minmax(0,1fr)}.outputs{grid-column:1/-1;border-top:1px solid var(--border)}#outputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}.header-actions .button{display:none}.wide{max-width:100%}}
@media(max-width:600px){body{height:auto;overflow:auto}.layout{display:block}header{height:auto;min-height:70px;padding:12px;flex-wrap:wrap;gap:10px}.brand{font-size:17px}.header-actions{margin-left:auto}#export-status{font-size:10px;max-width:125px}#full{display:none}.sources{padding:14px}.source-help{display:none}main{padding:18px 10px}.canvas-area{height:55vh;min-height:340px;padding:28px}.page-bar{flex-wrap:wrap}#select-page{order:2;width:100%}.toolbar{gap:2px}.toolbar button{padding:7px 8px}.outputs{padding:20px 14px}#outputs{display:block}.jobs>.section-top{align-items:flex-start;flex-direction:column}.empty h2{font-size:21px}.empty p{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* studio-ui-v3 editor tools */
#page-wrap{position:relative;user-select:none;touch-action:none}
#pdf-canvas{position:absolute;inset:0;display:block}
#text-layer,#objects{position:absolute;inset:0;overflow:hidden}
#text-layer{z-index:2;pointer-events:none}
#objects{z-index:3;pointer-events:none}
#page-wrap.select-mode #text-layer{pointer-events:auto}
.text-hit{position:absolute;background:transparent;border:1px solid transparent;box-sizing:border-box;cursor:text;pointer-events:auto;border-radius:2px}
.text-hit:hover{border-color:#7991ed;background:#7890ed18}
#page-wrap:not(.select-mode) .text-hit{pointer-events:none}
.edit-object{position:absolute;box-sizing:border-box;cursor:move;pointer-events:auto;touch-action:none;min-width:4px;min-height:4px}
.edit-object.text-object{white-space:pre-wrap;line-height:1.2;min-width:2px;min-height:1em;background:#ffffff10}
.edit-object.replace-text{background:#fff;border:1px dashed #5e78dc;border-radius:2px;overflow:hidden;white-space:pre-wrap;line-height:1.05}
.edit-object.highlight-object{border:1px dashed #b28a20}
.edit-object svg{display:block;width:100%;height:100%;overflow:visible;pointer-events:none}
.edit-object svg .hit-line{stroke:transparent;stroke-width:12;pointer-events:stroke}
.edit-object.selected{outline:2px solid #3659e3;outline-offset:2px}
.edit-object.selected:after{display:none!important}
.resize-handle{position:absolute;width:11px;height:11px;right:-7px;bottom:-7px;border:2px solid #3659e3;background:white;border-radius:2px;cursor:nwse-resize;pointer-events:auto;z-index:4}
.toolbar{position:relative;overflow:visible;z-index:10;flex-wrap:wrap}
.toolbar button.tool-active,#shape-toggle.tool-active{background:#e9efff;color:#294dc8;border-color:#aab9ef}
.tool-menu{position:relative;display:inline-flex}
#shape-toggle b{font-size:10px;margin-left:3px;color:#73839c}
.shape-menu{position:absolute;top:calc(100% + 7px);left:0;width:190px;background:#fff;border:1px solid #dce3ee;border-radius:10px;padding:6px;box-shadow:0 16px 45px #1e2d4724;z-index:80}
.shape-menu button{width:100%;justify-content:flex-start;border:0;background:transparent;text-align:left;padding:9px 10px;min-height:34px;border-radius:7px}
.shape-menu button:hover{background:#eef2ff}
#inspector #stroke-field{display:flex}
.context-menu{position:fixed;width:210px;padding:7px;background:#fff;border:1px solid #dce3ee;border-radius:11px;box-shadow:0 20px 60px #17243b35;z-index:9999}
.context-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:7px;padding:9px 10px;min-height:34px;color:#273951}
.context-menu button:hover{background:#eef2ff;color:#2e50c8}
.context-menu span{display:block;height:1px;background:#e8edf4;margin:5px 3px}
#tool-hint{margin-left:auto;max-width:310px;text-align:right}
.canvas-area.tool-text #page-wrap{cursor:text}.canvas-area.tool-rect #page-wrap,.canvas-area.tool-ellipse #page-wrap,.canvas-area.tool-highlight #page-wrap{cursor:crosshair}.canvas-area.tool-line #page-wrap,.canvas-area.tool-arrow #page-wrap,.canvas-area.tool-hline #page-wrap,.canvas-area.tool-vline #page-wrap{cursor:crosshair}.canvas-area.tool-pencil #page-wrap{cursor:crosshair}
.job-download-note{margin-top:8px;color:#6a7890;font-size:11px}
.job .primary{display:inline-flex;margin-top:4px}
#inline-text{font-family:Arial,"Liberation Sans",sans-serif}
@media(max-width:720px){#tool-hint{display:none}.shape-menu{position:fixed;left:12px;right:12px;top:auto;width:auto}.context-menu{width:200px}}


/* studio-ui-v4 polish — compact, calm, professional */
:root{--blue:#315ee8;--blue-2:#2348c9;--ink:#162033;--muted-2:#6f7f95;--border:#dce4ef;--panel:#ffffff;--bg:#f3f6fb;--soft:#f8faff;--shadow:0 12px 34px rgba(25,42,70,.08)}
html,body{min-height:100%;background:var(--bg);color:var(--ink)}
body{letter-spacing:-.005em}
header{height:64px;padding:0 20px;border-bottom:1px solid #e4eaf3;box-shadow:0 1px 10px rgba(35,52,78,.04);position:sticky;top:0;z-index:120;background:rgba(255,255,255,.97);backdrop-filter:saturate(160%) blur(10px)}
.brand{font-size:18px;gap:10px}.brand-icon{width:36px;height:36px;border-radius:10px;font-size:23px}.brand small{font-size:7px;margin-top:3px}.badge{font-size:8px;background:#eef7f1;color:#35664d;border:1px solid #dceee3}.header-actions{gap:8px}#expiry{margin:0 4px;font-size:10px}#export-status{min-height:32px;border-radius:9px}.header-actions button,.header-actions .button{min-height:34px;padding:7px 11px;font-size:11px}
.layout{grid-template-columns:230px minmax(520px,1fr) 340px;height:calc(100dvh - 64px);min-height:0}
aside{padding:18px 15px}.sources,.outputs{overflow:auto;scrollbar-width:thin;scrollbar-color:#c8d3e3 transparent}.sources{background:#fbfcff;border-right:1px solid #e1e7f0}.outputs{background:#fbfcff;border-left:1px solid #e1e7f0}
.section-top h2{font-size:13px;letter-spacing:-.1px}.upload-button{margin:14px 0 8px;padding:12px;border-radius:10px;border:1px solid #b8c9f3;background:#fff;color:#2853d6;box-shadow:0 2px 8px rgba(45,76,145,.04)}.upload-button:hover{background:#f5f8ff;border-color:#89a4ed}.file{padding:12px 10px;margin-top:8px;border-radius:10px;background:#fff;box-shadow:0 2px 8px rgba(22,35,55,.025)}.file.active{background:#eef3ff;border-color:#9db2f0;box-shadow:inset 3px 0 #315ee8,0 5px 16px rgba(49,94,232,.06)}.file strong{font-size:12px}.file small{font-size:10px}.source-help{margin-top:20px;padding-top:16px}.source-help p{font-size:11px;line-height:1.65}.danger{margin-top:18px;width:100%;background:#fff;color:#9e4f55;border-color:#edd6d8}
main{overflow:auto;scrollbar-width:thin;min-width:0;padding:14px 18px 24px}.workspace-title{min-height:44px;margin:0 0 10px;align-items:center}.workspace-title h1{font-size:19px;margin:3px 0 0;letter-spacing:-.45px}.eyebrow{font-size:8px;letter-spacing:1.35px}.active-name{max-width:260px;font-size:11px;background:#fff;border:1px solid #e1e7ef;border-radius:999px;padding:6px 10px}
.toolbar{border:1px solid #dce4ef;border-radius:13px 13px 0 0;padding:7px;background:#fff;box-shadow:0 5px 18px rgba(22,36,60,.035);gap:2px}.toolbar button{min-height:34px;border-radius:8px;padding:7px 9px;color:#31425c}.toolbar button span{font-size:11px}.toolbar button:hover{background:#f1f5ff;color:#274fcf}.toolbar button.tool-active,#shape-toggle.tool-active{background:#eaf0ff!important;color:#244bc8!important;box-shadow:inset 0 0 0 1px #b8c7f4}.divider{height:22px;margin:0 3px}.toolbar-note{font-size:9px;color:#77869a;padding:4px 6px}
#inspector{padding:10px 11px;border:1px solid #dce4ef;border-top:0;background:#fbfcff;gap:9px;box-shadow:0 6px 18px rgba(22,36,60,.025)}#inspector label{font-size:10px;gap:5px}#inspector input{height:30px;border-radius:7px;background:#fff}#inline-text{min-height:58px;max-height:110px;border-radius:8px;background:#fff}
.canvas-area{height:clamp(430px,62vh,760px);padding:26px;background-color:#e8edf5;background-image:linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%);background-size:28px 28px;background-position:0 0,0 14px;border-left:1px solid #dce4ef;border-right:1px solid #dce4ef}.canvas-area.drag-over{background:#dce8ff}#page-wrap{border-radius:2px;box-shadow:0 14px 40px rgba(27,42,64,.18),0 1px 2px rgba(20,30,45,.10)}
.page-bar{min-height:46px;padding:7px 10px;border-radius:0 0 13px 13px;background:#fff;box-shadow:0 8px 22px rgba(22,36,60,.035)}.page-bar button{min-height:30px;border-radius:8px}.page-bar #select-page{color:#284fc7;border-color:#bfd0f7;background:#f8faff}
.jobs{margin-top:18px}.jobs>.section-top{padding:0 2px}.job{border-radius:12px;padding:14px;background:#fff;box-shadow:0 5px 18px rgba(22,36,60,.035)}
.outputs .intro{font-size:11px;line-height:1.55;margin:10px 0 13px}.quick-actions{gap:7px}.quick-actions button{min-height:36px;border-radius:9px;background:#fff}.output-card{margin-top:12px;border-radius:12px;border:1px solid #dae3ef;box-shadow:0 5px 16px rgba(30,45,70,.045)}.output-header{padding:9px 10px;background:#f7f9fd}.output-header span{background:#eaf0ff;color:#315ee8;border-radius:999px;padding:4px 6px}.segment{padding:11px 12px}.segment label{margin:8px 0 4px}.segment select,.segment input{min-height:34px;border-radius:8px}.segment-footer{margin-top:7px}.add-selection{margin:0 12px 11px;min-height:32px;border-radius:8px;background:#f8faff}.export-summary{margin:16px 0 10px;padding:9px 10px;border-radius:9px;background:#f2f6ff;color:#4d6283}.wide{min-height:44px;border-radius:10px;background:linear-gradient(180deg,#3868ef,#2f59df);box-shadow:0 7px 18px rgba(49,94,232,.20)}.wide:hover{background:linear-gradient(180deg,#315fe5,#284fcc)}details{margin-top:18px;padding-top:13px}
.shape-menu,.context-menu{border-color:#d7e0eb;box-shadow:0 18px 55px rgba(18,31,52,.18);border-radius:12px}.shape-menu button,.context-menu button{border-radius:8px}
.resize-handle{width:12px;height:12px;right:-8px;bottom:-8px;border-radius:3px;box-shadow:0 1px 3px rgba(20,35,60,.18)}.edit-object.selected{outline:2px solid #315ee8;outline-offset:2px}
#toast{border-radius:11px;background:#17243a;box-shadow:0 14px 45px rgba(15,25,42,.28)}
@media(min-width:1500px){.layout{grid-template-columns:240px minmax(620px,1fr) 360px}.canvas-area{height:clamp(500px,65vh,820px)}}
@media(max-width:1200px){.layout{grid-template-columns:190px minmax(420px,1fr) 300px}.active-name{display:none}.toolbar-note{display:none}}
@media(max-width:980px){.layout{height:auto;grid-template-columns:180px minmax(0,1fr)}.outputs{grid-column:1/-1;max-height:none}.canvas-area{height:58vh}.header-actions .button{display:none}}
@media(max-width:650px){header{height:auto;min-height:60px;padding:10px 12px}.layout{display:block}.sources{max-height:none}.workspace-title{min-height:40px}.canvas-area{height:55vh;padding:14px}.toolbar{border-radius:11px 11px 0 0}.toolbar button{padding:6px 8px}.outputs{padding:16px 12px}}


/* studio-ui-v5 — production editor polish */
.canvas-area{background:#e9eef5;background-image:none!important;border-color:#d9e1eb!important}
#page-wrap{background:#fff;box-shadow:0 18px 48px rgba(31,45,67,.17),0 2px 6px rgba(31,45,67,.10)!important}
.toolbar{padding:8px 10px!important;gap:4px!important;border-color:#d9e2ee!important;box-shadow:0 5px 16px rgba(26,39,58,.05)!important}
.toolbar button{font-weight:520}.toolbar-note{font-size:10px!important;color:#6e7d90!important}
#inspector{display:flex;align-items:center;gap:14px!important;padding:9px 12px!important;background:#f8fafc!important;border-color:#d9e2ee!important;min-height:58px;flex-wrap:wrap}
#inspector[hidden]{display:none!important}.property-title{min-width:180px;max-width:280px;padding-right:14px;border-right:1px solid #e1e7ef}.property-title strong{font-size:11px;display:block;color:#26364c}.property-title span{display:block;font-size:9px;color:#758399;line-height:1.35;margin-top:3px}.property-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.property-controls label{display:flex!important;align-items:center!important;gap:5px!important;font-size:9px!important;color:#66768b}.property-controls input[type=number]{width:67px!important}.property-controls input[type=color]{width:30px!important;height:30px!important;padding:3px!important}.property-controls select{height:30px;padding:4px 7px}.fill-control{background:#fff;border:1px solid #dfe6ef;padding:3px 6px;border-radius:7px}.fill-control input[type=checkbox]{width:auto!important;height:auto!important}
.edit-object{user-select:none}.edit-object.text-object,.edit-object.replace-text{cursor:move;overflow:visible;border-radius:2px}.inline-text-object{width:100%;height:100%;white-space:pre-wrap;overflow:hidden;line-height:1.18;outline:none;cursor:inherit;word-break:break-word}.inline-text-object[contenteditable=true]{cursor:text;user-select:text;background:#fff;box-shadow:0 0 0 1px #315ee8 inset;padding:2px;overflow:auto}.edit-object.text-object.selected{background:rgba(255,255,255,.72)}.edit-object.replace-text{background:rgba(255,255,255,.96);border:1px dashed #e08a35!important}.edit-object.replace-text.selected{background:rgba(255,248,238,.96);outline-color:#e08a35!important}.replacement-badge{position:absolute;left:0;top:-22px;background:#8a561f;color:white;font-size:8px;line-height:16px;padding:0 6px;border-radius:4px;white-space:nowrap;pointer-events:none}
.resize-handle{display:none;position:absolute!important;width:11px!important;height:11px!important;border:2px solid #315ee8!important;background:#fff!important;border-radius:2px!important;z-index:8}.edit-object.selected>.resize-handle{display:block}.resize-nw{left:-7px;top:-7px;right:auto!important;bottom:auto!important;cursor:nwse-resize}.resize-ne{right:-7px;top:-7px;bottom:auto!important;cursor:nesw-resize}.resize-sw{left:-7px;bottom:-7px;right:auto!important;top:auto!important;cursor:nesw-resize}.resize-se{right:-7px;bottom:-7px;cursor:nwse-resize}
.line-endpoint{display:none;position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border:2px solid #315ee8;background:#fff;border-radius:50%;z-index:9;cursor:crosshair}.edit-object.selected>.line-endpoint{display:block}
.edit-object.selected{outline:1.5px solid #315ee8!important;outline-offset:2px!important}.edit-object.highlight-object.selected{outline-color:#bf8b16!important}
.range-status{font-size:9px;line-height:1.35;margin-top:5px;color:#738198}.range-status[data-state=ok]{color:#45805e}.range-status[data-state=error]{color:#b44951}.range-input.invalid-range{border-color:#d96c73!important;box-shadow:0 0 0 2px rgba(217,108,115,.10)}.field-label{font-size:9px!important;text-transform:uppercase;letter-spacing:.06em;color:#76859a!important;font-weight:650}.output-number{font-variant-numeric:tabular-nums}.compact-icon{min-width:32px!important;padding:6px!important}.text-danger{color:#a9575d!important;background:transparent!important;border-color:transparent!important}.add-selection{font-weight:600;color:#2f58d1!important;border-style:dashed!important;background:#fbfcff!important}
.output-card{overflow:hidden!important}.output-header input{font-weight:650;color:#25364e}.segment{background:#fff}.segment+ .segment{border-top:1px solid #edf1f6}.export-summary{font-size:10px!important}.wide{font-weight:650!important;letter-spacing:-.01em}
.sources,.outputs{background:#f8fafc!important}.file{border-color:#dde5ef!important}.file.active{background:#eef3ff!important}.source-help{border-top:1px solid #e5eaf1}
#toast{max-width:min(680px,calc(100vw - 32px))!important;line-height:1.45!important;font-size:12px!important;padding:12px 15px!important}
@media(max-width:1300px){.property-title{max-width:220px;min-width:150px}.property-controls{gap:6px}.property-controls label{font-size:8px!important}}

/* PDF Studio v0.2.3 — collapsible vertical properties drawer + rotation */
main{position:relative}
#inspector.properties-drawer{position:absolute!important;left:8px;top:112px;z-index:35;display:flex!important;align-items:flex-start!important;gap:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;max-width:260px!important;overflow:visible!important}
#inspector.properties-drawer[hidden]{display:none!important}
#properties-tab{width:34px!important;min-width:34px!important;height:116px!important;padding:8px 5px!important;border-radius:9px 0 0 9px!important;border:1px solid #d7e0eb!important;border-right:0!important;background:#263b57!important;color:#fff!important;box-shadow:0 8px 24px rgba(21,37,61,.15)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important}
#properties-tab span{writing-mode:vertical-rl;transform:rotate(180deg);font-size:10px!important;letter-spacing:.8px;font-weight:700}
#properties-tab b{font-size:18px;line-height:1;font-weight:500}
#properties-panel{width:218px;background:#fff;border:1px solid #d7e0eb;border-radius:0 10px 10px 10px;box-shadow:0 12px 32px rgba(21,37,61,.15);padding:12px;max-height:min(510px,calc(100vh - 210px));overflow:auto}
#properties-panel[hidden]{display:none!important}
#inspector.collapsed{max-width:34px!important}
#inspector .property-title{min-width:0!important;max-width:none!important;padding:0 0 10px!important;border-right:0!important;border-bottom:1px solid #e8edf3;margin-bottom:10px}
#inspector .property-title strong{font-size:12px!important;color:#20334d!important}
#inspector .property-title span{font-size:9px!important;line-height:1.45!important;margin-top:4px!important}
#inspector .property-controls{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:9px!important;width:100%}
#inspector .property-controls>label{display:grid!important;grid-template-columns:74px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;width:100%!important;font-size:9px!important;color:#5c6e85!important}
#inspector .property-controls>label>span:first-child{font-weight:650;color:#455970}
#inspector .property-controls input[type=number],#inspector .property-controls select{width:100%!important;height:32px!important}
#inspector .property-controls input[type=color]{width:38px!important;height:30px!important;justify-self:start}
#inspector .fill-control{background:#f8fafc!important;border:1px solid #e3e9f1!important;padding:7px!important;border-radius:8px!important}
.fill-row{display:flex;align-items:center;gap:8px}.fill-row input[type=checkbox]{width:16px!important;height:16px!important}.fill-row input[type=color]{width:38px!important}
.rotation-control{display:grid;grid-template-columns:30px minmax(54px,1fr) 12px 30px;align-items:center;gap:4px}.rotation-control button{height:30px!important;min-width:30px!important;padding:0!important;border-radius:7px!important}.rotation-control .degree{font-size:11px;color:#76869a}
#edit-text,#delete-selected{width:100%;justify-content:center;height:34px}#delete-selected{color:#b33b3b;border-color:#efcaca;background:#fffafa}#delete-selected:hover{background:#fff0f0;border-color:#e5aaaa}
.properties-tip{font-size:9px;line-height:1.45;color:#7a889a;margin:2px 0 0;padding-top:8px;border-top:1px solid #edf1f5}
.rotate-handle{display:none;position:absolute;left:50%;top:-31px;transform:translateX(-50%);width:19px;height:19px;border:2px solid #315ee8;background:#fff;color:#315ee8;border-radius:50%;z-index:12;cursor:grab;font-size:11px;line-height:15px;text-align:center;box-shadow:0 2px 6px rgba(20,40,80,.18);pointer-events:auto}
.rotate-handle:after{content:'';position:absolute;width:1px;height:10px;background:#315ee8;left:50%;top:17px;transform:translateX(-50%)}
.edit-object.selected>.rotate-handle{display:block}.rotate-handle:active{cursor:grabbing}
.edit-object.text-object .inline-text-object:empty{min-width:24px;min-height:1.25em}
.edit-object.text-object .inline-text-object[contenteditable=true]:empty{background:rgba(255,255,255,.94)}
.edit-object.replace-text .inline-text-object{transform-origin:50% 50%}
@media(max-width:900px){#inspector.properties-drawer{left:4px;top:105px}#properties-panel{width:205px;max-height:420px}#properties-tab{height:104px!important}}


/* studio-upload-overlay-v023d */

.studio-upload-overlay{
 position:fixed;
 inset:0;
 z-index:100000;
 display:flex;
 align-items:center;
 justify-content:center;
 padding:28px;
 background:rgba(16,29,48,.46);
 backdrop-filter:blur(5px);
 -webkit-backdrop-filter:blur(5px);
}

.studio-upload-overlay[hidden]{
 display:none!important;
}

.studio-upload-dialog{
 width:min(560px,calc(100vw - 32px));
 border:1px solid rgba(207,220,239,.9);
 border-radius:22px;
 padding:26px;
 background:#fff;
 box-shadow:
  0 30px 90px rgba(9,28,57,.25),
  0 8px 28px rgba(9,28,57,.12);
}

.studio-upload-brand{
 display:flex;
 align-items:center;
 gap:15px;
 margin-bottom:22px;
}

.studio-upload-icon{
 width:54px;
 height:54px;
 flex:0 0 54px;
 display:flex;
 align-items:center;
 justify-content:center;
 border-radius:16px;
 color:#fff;
 background:linear-gradient(
  135deg,
  #315fe5,
  #568cff
 );
 box-shadow:
  0 9px 25px
  rgba(49,95,229,.22);
}

.studio-upload-icon span{
 font-size:30px;
 line-height:1;
 transform:translateY(-1px);
}

.studio-upload-eyebrow{
 display:block;
 margin-bottom:3px;
 font-size:10px;
 font-weight:800;
 letter-spacing:.12em;
 color:#75859c;
}

.studio-upload-brand h2{
 margin:0;
 font-size:23px;
 line-height:1.2;
 color:#17243a;
 letter-spacing:-.025em;
}

.studio-upload-filebox{
 display:flex;
 align-items:center;
 gap:13px;
 padding:14px 15px;
 border:1px solid #dee7f3;
 border-radius:14px;
 background:#f8faff;
}

.studio-upload-file-icon{
 width:40px;
 height:40px;
 display:flex;
 align-items:center;
 justify-content:center;
 flex:0 0 40px;
 border-radius:11px;
 background:#edf3ff;
 color:#315fe5;
 font-size:10px;
 font-weight:900;
 letter-spacing:.05em;
}

.studio-upload-file-info{
 display:flex;
 flex-direction:column;
 gap:3px;
 min-width:0;
 flex:1;
}

.studio-upload-file-info strong{
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 color:#1e2c43;
 font-size:13px;
}

.studio-upload-file-info span{
 color:#78889e;
 font-size:11px;
}

.studio-upload-percent{
 flex:0 0 auto;
 font-size:30px;
 letter-spacing:-.04em;
 color:#315fe5;
 font-variant-numeric:tabular-nums;
}

.studio-upload-progress{
 height:11px;
 margin:18px 0 15px;
 overflow:hidden;
 border-radius:999px;
 background:#e8eef8;
}

.studio-upload-progress-bar{
 width:0;
 height:100%;
 border-radius:inherit;
 background:linear-gradient(
  90deg,
  #315fe5,
  #4d86ff
 );
 transition:width .12s linear;
}

.studio-upload-stats{
 display:grid;
 grid-template-columns:1.2fr 1fr 1fr;
 gap:10px;
 margin-bottom:18px;
}

.studio-upload-stats>div{
 min-width:0;
 padding:10px 11px;
 border:1px solid #e4ebf5;
 border-radius:11px;
 background:#fff;
}

.studio-upload-stats span{
 display:block;
 margin-bottom:4px;
 font-size:9px;
 font-weight:700;
 color:#8795a9;
 text-transform:uppercase;
 letter-spacing:.05em;
}

.studio-upload-stats strong{
 display:block;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
 font-size:11px;
 color:#26364d;
 font-variant-numeric:tabular-nums;
}

.studio-upload-status{
 display:flex;
 align-items:center;
 gap:12px;
 padding:13px 14px;
 border-radius:13px;
 background:#f4f7fc;
}

.studio-upload-status>div:last-child{
 display:flex;
 flex-direction:column;
 gap:3px;
 min-width:0;
}

.studio-upload-status strong{
 font-size:11px;
 color:#26364d;
}

.studio-upload-status span{
 font-size:10px;
 line-height:1.45;
 color:#718198;
}

.studio-upload-spinner{
 width:22px;
 height:22px;
 flex:0 0 22px;
 border:3px solid #d9e3f5;
 border-top-color:#315fe5;
 border-radius:50%;
 animation:studio-upload-spin .75s linear infinite;
}

.studio-upload-batch{
 min-height:12px;
 margin-top:10px;
 text-align:center;
 font-size:9px;
 font-weight:700;
 color:#8190a4;
}

.studio-upload-close{
 width:100%;
 margin-top:15px;
 min-height:42px;
 border:0;
 border-radius:11px;
 background:#26364d;
 color:#fff;
 font-weight:700;
 cursor:pointer;
}

.studio-upload-overlay[data-state="processing"]
.studio-upload-progress-bar{
 background:linear-gradient(
  90deg,
  #315fe5,
  #78a4ff,
  #315fe5
 );
 background-size:200% 100%;
 animation:
  studio-upload-processing
  1.4s linear infinite;
}

.studio-upload-overlay[data-state="done"]
.studio-upload-icon{
 background:#2d9b68;
}

.studio-upload-overlay[data-state="done"]
.studio-upload-progress-bar{
 background:#2d9b68;
}

.studio-upload-overlay[data-state="done"]
.studio-upload-percent{
 color:#2d9b68;
}

.studio-upload-overlay[data-state="error"]
.studio-upload-icon{
 background:#c95050;
}

.studio-upload-overlay[data-state="error"]
.studio-upload-progress-bar{
 background:#c95050;
}

.studio-upload-overlay[data-state="error"]
.studio-upload-percent{
 color:#c95050;
}

body.studio-upload-active{
 cursor:progress;
}

@keyframes studio-upload-spin{
 to{
  transform:rotate(360deg);
 }
}

@keyframes studio-upload-processing{
 from{
  background-position:0 0;
 }

 to{
  background-position:200% 0;
 }
}

@media(max-width:620px){

 .studio-upload-overlay{
  padding:14px;
 }

 .studio-upload-dialog{
  padding:20px;
  border-radius:18px;
 }

 .studio-upload-stats{
  grid-template-columns:1fr;
 }

 .studio-upload-percent{
  font-size:25px;
 }

}
