:root{font-family:"Segoe UI","Malgun Gothic",Arial,sans-serif;color:#202124;background:#f3f5f7}*{box-sizing:border-box}body{margin:0}header{height:64px;background:#fff;border-bottom:1px solid #dfe3e8;display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:20}.brand{display:flex;gap:10px;align-items:baseline;font-size:18px}.brand b{font-size:20px}.brand span{color:#68717d}.toolbar{display:flex;gap:8px}.btn,button{border:1px solid #cfd5dc;background:#fff;border-radius:7px;padding:8px 13px;cursor:pointer;font-size:14px}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:#1267d6;color:#fff;border-color:#1267d6}.success{background:#18864b;color:#fff;border-color:#18864b}.danger{background:#d83b3b;color:#fff;border-color:#d83b3b}.hidden{display:none!important}.drop-zone{height:calc(100vh - 64px);display:grid;place-items:center;padding:30px}.drop-zone.drag{background:#e8f1ff}.drop-card{width:min(720px,95%);background:#fff;border:2px dashed #b7c0cb;border-radius:18px;padding:70px 30px;text-align:center;box-shadow:0 8px 28px #0000000d}.pdf-icon{display:inline-grid;place-items:center;width:64px;height:78px;background:#e34a42;color:#fff;font-weight:700;border-radius:8px;margin-bottom:10px}.drop-card h2{font-size:21px}.drop-card p{color:#6b7480}.workspace{height:calc(100vh - 64px);display:grid;grid-template-columns:260px 1fr}.sidebar{background:#fff;border-right:1px solid #d9dee5;padding:14px;overflow:auto}.file-info{font-size:13px;font-weight:600;margin-bottom:12px;word-break:break-all}.search-box{display:flex;gap:5px}.search-box input{min-width:0;flex:1;padding:8px;border:1px solid #cfd5dc;border-radius:6px}.search-box button{padding:7px 9px}.muted{color:#717b87;font-size:12px;margin:7px 0}.pages{display:flex;flex-direction:column;gap:6px;margin-top:10px}.page-item{padding:9px 10px;border:1px solid transparent;border-radius:6px;cursor:pointer;font-size:13px}.page-item:hover,.page-item.active{background:#eaf2ff;border-color:#b9d2f4}.viewer-wrap{min-width:0;display:flex;flex-direction:column}.viewer-toolbar{height:45px;background:#fff;border-bottom:1px solid #d9dee5;display:flex;align-items:center;justify-content:center;gap:8px;position:relative}.viewer-toolbar button{padding:5px 9px}.sep{width:1px;height:20px;background:#ddd;margin:0 5px}.hint{position:absolute;right:16px;color:#707983;font-size:12px}.canvas-scroll{flex:1;overflow:auto;padding:25px;text-align:center}.page-stage{position:relative;display:inline-block;background:white;box-shadow:0 2px 14px #0002;line-height:0}.page-stage img{display:block;user-select:none}.text-layer,.search-layer{position:absolute;inset:0;pointer-events:none}.text-box{position:absolute;border:1px solid transparent;pointer-events:auto;cursor:text;line-height:normal;background:transparent}.text-box:hover{border-color:#1b73e8;background:#1b73e80d}.text-box.selected{border:2px solid #f1a208;background:#f1a20818}.search-hit{position:absolute;background:#ffdf3a99;border:1px solid #d2a900;pointer-events:none}.modal{position:fixed;inset:0;background:#0006;display:grid;place-items:center;z-index:100}.modal-card{width:min(520px,92vw);background:#fff;border-radius:12px;padding:20px;box-shadow:0 16px 45px #0004}.modal-card h3{margin-top:0}.old-text{padding:8px 10px;background:#f5f6f8;border-radius:6px;color:#6c7480;margin-bottom:10px;white-space:pre-wrap}.modal textarea{width:100%;resize:vertical;padding:10px;font:inherit;border:1px solid #bfc6ce;border-radius:7px}.form-row{display:flex;justify-content:space-between;align-items:center;margin:12px 0}.form-row input[type=number]{width:80px;padding:6px}.modal-actions{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;margin-top:14px}#toast{position:fixed;right:22px;bottom:22px;background:#202124;color:#fff;padding:10px 14px;border-radius:8px;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none;z-index:200}#toast.show{opacity:1;transform:translateY(0)}

.inline-editor{position:absolute;z-index:30;pointer-events:auto;border:2px solid #1267d6;border-radius:3px;background:#fff;color:#111;padding:2px 4px;margin:0;outline:none;line-height:1.18;box-shadow:0 2px 8px #0002;min-width:40px;resize:none;overflow:hidden;white-space:pre-wrap}.text-box.editing{border-color:transparent!important;background:transparent!important}.page-stage.adding{cursor:crosshair}

.shortcut-card{margin-top:18px;padding:11px 10px;border:1px solid #dce2e8;background:#f8fafc;border-radius:8px}.shortcut-title{font-size:13px;font-weight:700;margin-bottom:8px}.shortcut-row{display:flex;align-items:center;gap:4px;min-height:26px;font-size:12px;color:#505965}.shortcut-row span{margin-left:auto}.shortcut-row b{font-weight:400;color:#8a929b}.shortcut-row kbd{font-family:inherit;font-size:11px;min-width:28px;text-align:center;padding:2px 5px;border:1px solid #c8cfd7;border-bottom-width:2px;background:#fff;border-radius:4px;color:#333}

.page-tools{margin:12px 0 8px;padding:10px;border:1px solid #dce2e8;border-radius:8px;background:#fbfcfd}.page-tools-title{font-size:13px;font-weight:700;margin-bottom:8px}.page-tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.page-tool-grid button{padding:7px 5px;font-size:12px}.danger-soft{color:#b3261e;border-color:#efc7c4;background:#fff7f6}.page-help{line-height:1.45;margin-bottom:0}.page-item{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:8px;padding:6px;user-select:none}.page-item.dragging{opacity:.45}.page-item.drag-over{border-color:#1267d6;background:#eaf2ff}.page-thumb{width:52px;height:68px;object-fit:contain;background:#fff;border:1px solid #d8dde3;box-shadow:0 1px 3px #0001}.page-meta{display:flex;flex-direction:column;gap:3px}.page-num{font-weight:600}.page-select-hint{font-size:11px;color:#7a838e}.page-item.selected-page{background:#eaf2ff;border-color:#8eb8ef}.changes-card{margin-top:14px;border:1px solid #dce2e8;border-radius:8px;background:#fff;overflow:hidden}.changes-title{padding:9px 10px;font-size:13px;font-weight:700;border-bottom:1px solid #edf0f3;display:flex;justify-content:space-between}.changes-title span{background:#eef3f8;border-radius:10px;padding:1px 7px;font-size:11px;color:#59636f}.changes{max-height:150px;overflow:auto;padding:7px 10px}.change-item{font-size:11px;line-height:1.45;padding:5px 0;border-bottom:1px dashed #edf0f3;word-break:break-word}.change-item:last-child{border-bottom:0}

.split-modal-card{width:min(560px,94vw)}.split-option{display:flex;align-items:flex-start;gap:10px;border:1px solid #dce2e8;border-radius:8px;padding:11px;margin:8px 0;cursor:pointer}.split-option:hover{background:#f7faff}.split-option>input{margin-top:4px}.split-option span{display:flex;flex-direction:column;gap:5px;flex:1}.split-option small{color:#69737f;font-size:12px}.split-option input[type=number]{width:70px;padding:4px 6px;border:1px solid #cfd5dc;border-radius:5px;margin:0 4px}.split-option input[type=text]{width:100%;padding:7px;border:1px solid #cfd5dc;border-radius:6px}.split-actions{grid-template-columns:auto 1fr auto}

/* v2.0.1: keep page actions visible above the document instead of in the scrolling sidebar */
.viewer-toolbar{height:86px;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:42px 42px;padding:0 14px;gap:0;position:sticky;top:0;z-index:15}
.viewer-nav{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;gap:8px}
.page-actions{grid-column:1 / -1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:7px;border-top:1px solid #eef1f4;min-width:0}
.page-actions-label{font-size:12px;font-weight:700;color:#59636f;margin-right:2px}
.page-actions button{padding:5px 10px;font-size:12px}
.page-help-inline{font-size:11px;color:#7a838e;margin-left:5px;white-space:nowrap}
.viewer-toolbar .hint{grid-column:3;grid-row:1;position:static;justify-self:end;align-self:center;white-space:nowrap}
.drop-card{cursor:pointer}
.drop-card.drag{background:#e8f1ff;border-color:#1267d6}
.drop-zone.drag{background:inherit}
@media(max-width:1100px){.viewer-toolbar .hint{display:none}.page-help-inline{display:none}}

/* v2.0.2: independent, always-visible scrolling for sidebar and PDF viewer */
html,body{height:100%;overflow:hidden}
.workspace{min-height:0;overflow:hidden}
.sidebar{min-height:0;overflow-y:scroll;overflow-x:hidden;scrollbar-gutter:stable}
.viewer-wrap{height:100%;min-height:0;overflow:hidden}
.canvas-scroll{
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  overflow-y:scroll;
  overflow-x:auto;
  scrollbar-gutter:stable;
  overscroll-behavior:contain;
}
/* Make the PDF pane scrollbar easy to see on Windows/Chrome/Edge. */
.canvas-scroll::-webkit-scrollbar,.sidebar::-webkit-scrollbar{width:14px;height:14px}
.canvas-scroll::-webkit-scrollbar-track,.sidebar::-webkit-scrollbar-track{background:#eef1f4}
.canvas-scroll::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background:#aeb7c2;border:3px solid #eef1f4;border-radius:8px}
.canvas-scroll::-webkit-scrollbar-thumb:hover,.sidebar::-webkit-scrollbar-thumb:hover{background:#8f9aa6}

/* v2.0.3: three-row tool area + text style controls */
.viewer-toolbar{height:124px;grid-template-rows:40px 40px 42px}
.viewer-nav{grid-row:1}
.page-actions{grid-row:2}
.text-style-bar{grid-column:1 / -1;grid-row:3;display:flex;align-items:center;justify-content:center;gap:7px;border-top:1px solid #eef1f4;min-width:0;background:#fbfcfd}
.style-label{font-size:12px;font-weight:700;color:#59636f;margin-right:2px}
.text-style-bar select,.text-style-bar input[type=number]{height:29px;border:1px solid #cfd5dc;border-radius:6px;background:#fff;padding:3px 7px;font:inherit;font-size:12px}
.text-style-bar select{width:138px}.size-wrap,.color-wrap{display:flex;align-items:center;gap:5px;font-size:12px;color:#59636f}.size-wrap input{width:68px}.color-wrap input[type=color]{width:34px;height:29px;padding:2px;border:1px solid #cfd5dc;border-radius:6px;background:#fff}.text-style-bar button{padding:5px 9px;font-size:12px}.style-info{font-size:11px;color:#77818d;max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.viewer-toolbar .hint{grid-row:1}
@media(max-width:1250px){.style-info{display:none}.text-style-bar select{width:115px}}

/* PDF pane always has its own visible document navigator on the right. */
.viewer-wrap{position:relative;padding-right:28px}
.canvas-scroll{padding-right:34px;scrollbar-gutter:stable both-edges}
.doc-scrollbar{position:absolute;right:3px;top:128px;bottom:4px;width:24px;z-index:25;display:flex;flex-direction:column;align-items:center;user-select:none}
.doc-scroll-track{position:relative;flex:1;width:14px;border-radius:8px;background:#e1e6eb;border:1px solid #ccd3db;cursor:pointer;box-shadow:inset 0 1px 2px #0001}
.doc-scroll-thumb{position:absolute;left:1px;top:0;width:10px;min-height:34px;border-radius:7px;background:#8794a2;cursor:grab;box-shadow:0 1px 2px #0002;will-change:transform}
.doc-scroll-thumb:hover{background:#697785}.doc-scroll-thumb:active{cursor:grabbing;background:#52606d}
.doc-scroll-label{font-size:9px;color:#64707d;writing-mode:vertical-rl;margin-top:5px;line-height:1}
/* Keep a native scrollbar for scrolling within a zoomed/tall current page too. */
.canvas-scroll{overflow-y:scroll!important;overflow-x:auto!important}

.inline-editor{color:#000}

/* v2.0.4 text effects */
.effect-check{display:flex;align-items:center;gap:3px;font-size:11px;color:#59636f;white-space:nowrap}.effect-check input{margin:0}.text-style-bar{flex-wrap:wrap;align-content:center}.inline-editor{-webkit-font-smoothing:antialiased}

/* v2.0.6: 편집 중 원본색이 밝아도 글자가 보이도록 표시 전용 배경/캐럿 */
.inline-editor{background:#fffbe6;caret-color:#111;box-shadow:0 2px 10px #0003}

.add-editor{border:2px solid #18864b!important;background:#fffbe6!important;min-width:90px}.page-stage.adding::after{content:'클릭하여 텍스트 위치 지정';position:absolute;top:10px;left:50%;transform:translateX(-50%);background:#202124;color:#fff;padding:6px 10px;border-radius:6px;font-size:12px;line-height:1;pointer-events:none;z-index:40}
/* v2.0.10: keep inline editor open while formatting and provide explicit apply/cancel. */
.style-apply{background:#18864b!important;color:#fff!important;border-color:#18864b!important}
#eyeDropperBtn.active{background:#1267d6;color:#fff;border-color:#1267d6}
.page-stage.eyedrop-active,.page-stage.eyedrop-active *{cursor:crosshair!important}
.inline-editor:focus{border-color:#1267d6;box-shadow:0 0 0 2px #1267d626,0 2px 10px #0003}
.add-editor{min-width:140px;min-height:38px}

.text-toggle-btn{min-width:34px;height:30px;padding:0 10px;font-size:15px;line-height:28px}
.text-toggle-btn.active{background:#e8f1ff;border-color:#1677ff;color:#0b57d0;box-shadow:inset 0 0 0 1px rgba(22,119,255,.16)}

/* v2.0.12 text formatting */
.text-style-bar{flex-wrap:wrap;row-gap:5px}.text-toggle-btn.active,.align-group .active{background:#dbeafe;border-color:#2563eb;color:#1d4ed8}.align-group{display:inline-flex;gap:2px}.align-group button{min-width:30px}.tracking-wrap{display:inline-flex;align-items:center;gap:4px;font-size:12px}.tracking-wrap input{width:54px;padding:5px 6px}.sep.mini{height:22px}

/* v2.0.14: compact PDF-editor style toolbar. Prevent layout shifts when text is selected. */
.viewer-wrap{padding-right:28px}
.viewer-toolbar.modern-toolbar{height:104px!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;padding:0!important;gap:0!important;background:#f7f9fb;border-bottom:1px solid #cfd6de;overflow:visible!important;position:sticky;top:0;z-index:30}
.tool-row{height:52px;min-height:52px;display:flex;align-items:center;gap:6px;padding:5px 10px;background:#fff;white-space:nowrap;min-width:0}
.tool-row-main{border-bottom:1px solid #e2e7ec}
.tool-row-text{overflow-x:auto!important;overflow-y:hidden!important;justify-content:flex-start!important;flex-wrap:nowrap!important;border-top:0!important;background:#f8fafc!important;scrollbar-width:thin}
.tool-row-text::-webkit-scrollbar{height:7px}.tool-row-text::-webkit-scrollbar-thumb{background:#c4ccd5;border-radius:6px}.tool-row-text::-webkit-scrollbar-track{background:#eef2f5}
.tool-group{display:flex;align-items:center;gap:5px;height:40px;flex:0 0 auto;position:relative;padding-top:12px}
.tool-group-title{position:absolute;top:0;left:2px;font-size:9px;line-height:11px;color:#7a8490;font-weight:600;letter-spacing:.1px}
.tool-divider{width:1px;height:34px;background:#dfe4e9;flex:0 0 1px;margin:0 3px}.toolbar-spacer{flex:1 1 auto;min-width:10px}
.modern-toolbar button,.modern-toolbar select,.modern-toolbar input{height:29px!important;border-radius:5px!important;font-size:12px!important}
.modern-toolbar button{padding:4px 9px!important;background:#fff;border:1px solid #cbd3dc}
.modern-toolbar button:hover:not(:disabled){background:#f0f5fb;border-color:#aab8c7}
.modern-toolbar .icon-btn{min-width:31px;padding:3px 7px!important;font-size:13px!important}
.modern-toolbar .danger-soft{color:#b42318;background:#fff7f6}
.page-jump-wrap{height:29px;display:flex;align-items:center;border:1px solid #cbd3dc;border-radius:5px;background:#fff;padding:0 6px;gap:5px}
#pageJumpInput{width:48px!important;height:25px!important;border:0!important;outline:0;background:transparent;text-align:right;padding:0 2px!important;font-weight:600;color:#26313d;-moz-appearance:textfield}
#pageJumpInput::-webkit-inner-spin-button,#pageJumpInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.page-count-sep{color:#9aa3ad}.page-count-sep+#pageCountLabel{min-width:22px;color:#4f5965;font-size:12px}
.zoom-label{min-width:40px;text-align:center;font-size:12px;font-weight:600;color:#3d4854}
.compact-hint{position:static!important;font-size:11px!important;color:#7a8490!important;max-width:390px;overflow:hidden;text-overflow:ellipsis}
.text-font-group select{width:142px!important}.font-size-input{width:58px!important;padding:3px 5px!important;border:1px solid #cbd3dc!important;background:#fff}
.color-input{width:30px!important;padding:2px!important;border:1px solid #cbd3dc!important;background:#fff}
.text-toggle-btn{width:30px!important;min-width:30px!important;padding:0!important;font-size:14px!important}.align-group{display:flex;gap:2px}.align-group button{width:29px!important;min-width:29px!important;padding:0!important}
.compact-number{display:flex;align-items:center;gap:3px;font-size:10px;color:#5f6974}.compact-number input{width:48px!important;padding:3px 4px!important;border:1px solid #cbd3dc!important;background:#fff}
.effect-check{font-size:10px!important;gap:2px!important}.effect-check input{height:auto!important}
.apply-group{padding-top:0!important}.apply-group .tool-group-title{display:none}.style-apply{background:#198754!important;color:#fff!important;border-color:#198754!important;font-weight:600}.hidden-style-info{display:none!important}
/* PDF content starts below the new 104px toolbar. */
.doc-scrollbar{top:108px!important}
/* Keep selected text boxes from affecting document or toolbar layout. */
.text-box,.inline-editor{box-sizing:border-box!important;max-width:none}.inline-editor{position:absolute!important}
@media(max-width:1180px){.compact-hint{display:none}.toolbar-spacer{min-width:0}.tool-row{padding-left:7px;padding-right:7px}}

.inline-mask{position:absolute;z-index:24;pointer-events:none;border-radius:1px;opacity:1;box-shadow:0 0 0 2px var(--inline-mask-bg,#fff)}.inline-editor{z-index:30!important}

/* v2.0.21: inline editor must stay single-row unless Alt+Enter adds a line. */
.inline-editor{scrollbar-width:none!important;overscroll-behavior:none!important;clip-path:none!important;}

/* v2.0.22 multi text selection */
.text-box.multi-selected{outline:2px solid #2563eb!important;background:rgba(37,99,235,.10)!important;}

/* v2.1.1 layout: persistent left page navigator + right info panel */
.workspace{grid-template-columns:220px minmax(0,1fr) 250px}
.sidebar{padding:12px 10px}
.right-sidebar{min-height:0;background:#fff;border-left:1px solid #d9dee5;overflow:hidden;display:flex;flex-direction:column}
.side-tabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #dfe3e8;background:#f7f9fb;flex:0 0 auto}
.side-tab{border:0;border-radius:0;background:transparent;padding:11px 6px;font-weight:600;color:#66717e}
.side-tab.active{color:#1267d6;background:#fff;border-bottom:2px solid #1267d6}
.side-pane{display:none;min-height:0;overflow:auto;padding:10px;flex:1}
.side-pane.active{display:block}
.right-card{margin-top:0}.right-sidebar .changes{max-height:none;overflow:visible}.right-sidebar .shortcut-card{margin-top:0}
.viewer-wrap{padding-right:28px}
.annotation-toolbar{background:#fbfcfe;border-bottom:1px solid #e4e8ed;display:flex;align-items:center;padding:5px 10px;min-height:42px;gap:12px;overflow-x:auto;white-space:nowrap}
.annotation-toolbar .tool-group{display:flex;align-items:center;gap:6px}.annotation-toolbar .tool-group-title{margin-right:5px}.annotation-toolbar button{padding:5px 9px}
.annotation-toolbar button.active-tool{background:#1267d6;color:white;border-color:#1267d6}
.annot-color-wrap{display:flex;align-items:center;gap:4px;font-size:12px}.annot-color-wrap input{width:31px;height:28px;border:0;background:transparent;padding:0}
.inline-hint{position:static;margin-left:auto}
.selection-marquee,.draw-preview{position:absolute;pointer-events:none;z-index:90;border:1.5px dashed #1267d6;background:#1267d61a}
.draw-preview.highlight{background:#fff20066;border-color:#d8c900}
.draw-preview.rect{background:transparent;border:2px solid var(--annot-color,#e11)}
.draw-preview.ellipse{background:transparent;border:2px solid var(--annot-color,#e11);border-radius:50%}
.draw-preview.line,.draw-preview.arrow{height:0!important;background:transparent;border:0;border-top:2px solid var(--annot-color,#e11);transform-origin:0 0}
.text-box.multi-selected{border:2px solid #1267d6;background:#1267d619}
.mouse-icon{display:inline-grid;min-width:28px;text-align:center;border:1px solid #c8cfd7;border-radius:4px;background:#fff;padding:2px 4px}
@media(max-width:1200px){.workspace{grid-template-columns:190px minmax(0,1fr) 210px}}
@media(max-width:950px){.workspace{grid-template-columns:180px minmax(0,1fr)}.right-sidebar{display:none}}

/* v2.1.1: clearer annotation toolbar, persistent help + changes, selectable PDF objects */
.annotation-toolbar{min-height:50px;padding:6px 10px;background:#fff}
.annotation-toolbar .annot-tools{height:44px;padding-top:13px;gap:5px}
.annot-tool-btn{height:31px!important;min-width:66px;padding:4px 10px!important;font-size:12px!important;border-radius:6px!important;font-weight:600;background:#fff}
#selectModeBtn{min-width:58px}.annot-tool-btn.danger-soft{min-width:76px}
.annot-color-wrap,.annotation-toolbar .compact-number{height:31px;display:flex;align-items:center;gap:5px;padding:0 6px;border:1px solid #d8dee6;border-radius:6px;background:#f8fafc;color:#53606d}
.annotation-toolbar .compact-number input{height:25px!important;width:48px!important}
.annotation-toolbar .inline-hint{font-size:11px;color:#74808c}

.object-layer{position:absolute;inset:0;pointer-events:none;z-index:14}
.pdf-object{position:absolute;pointer-events:auto;cursor:pointer;border:1px solid transparent;background:transparent}
.pdf-object:hover{border:1.5px dashed #2563eb;background:rgba(37,99,235,.06)}
.pdf-object.selected-object{border:2px solid #2563eb!important;background:rgba(37,99,235,.10)!important;box-shadow:0 0 0 1px #fff8 inset}
.pdf-object.annot{border-style:dashed}

.right-sidebar{padding:0;display:flex;flex-direction:column;overflow:hidden;background:#f7f9fb}
.right-help-panel{flex:0 0 auto;background:#fff;border-bottom:1px solid #d9dee5;padding:10px}
.right-changes-panel{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:#fff}
.side-section-title{font-size:13px;font-weight:700;color:#2f3a45;margin:0 0 8px 2px}
.compact-help{margin:0;border:1px solid #dce2e8;border-radius:8px;padding:8px;background:#fbfcfd}
.compact-help .shortcut-row{min-height:25px;padding:2px 2px;font-size:11px;gap:4px}
.compact-help kbd{font-size:10px;min-width:27px;text-align:center;padding:2px 4px}
.sticky-title{flex:0 0 auto;position:sticky;top:0;z-index:2;background:#fff;padding:10px 12px;border-bottom:1px solid #e3e7eb;margin:0}
.changes-fill{flex:1 1 auto;min-height:0;max-height:none!important;overflow:auto!important;padding:6px 12px 14px}
.right-changes-panel .change-item{font-size:11px;padding:7px 0;line-height:1.45}

@media(max-width:1280px){.annot-tool-btn{min-width:58px;padding-left:7px!important;padding-right:7px!important}.annotation-toolbar .inline-hint{display:none}}
/* Text remains the primary editable target when it overlaps an image object. */
.object-layer{z-index:12!important}.text-layer{z-index:16!important}.search-layer{z-index:18!important}

/* v2.1.2: clearer shape controls + clickable history */
#circleBtn,#ellipseBtn{min-width:58px}
.draw-preview.circle{border-radius:50%}
.draw-preview.ellipse{border-radius:50%}
.change-item.clickable-change{cursor:pointer;border-radius:5px;padding-left:5px;padding-right:5px}
.change-item.clickable-change:hover{background:#eef6ff;color:#0b5fc2}
.page-stage.history-flash{animation:historyFlash .9s ease-out}
@keyframes historyFlash{0%{box-shadow:0 0 0 4px rgba(18,103,214,.45)}100%{box-shadow:0 0 0 0 rgba(18,103,214,0)}}

/* v2.1.3 inline editor stabilization */
.inline-editor{overflow:hidden!important;overflow-x:hidden!important;overflow-y:hidden!important;resize:none!important;scrollbar-width:none!important;-ms-overflow-style:none!important;padding:3px 5px!important;} .inline-editor::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.inline-mask{overflow:hidden!important}

/* v2.1.4 brand / editor polish */
.brand-home{cursor:pointer;user-select:none;gap:9px!important;align-items:center!important;padding:5px 8px;border-radius:9px;transition:background .15s,transform .15s}
.brand-home:hover{background:#f2f6fb}.brand-home:active{transform:translateY(1px)}.brand-home:focus-visible{outline:2px solid #1267d6;outline-offset:2px}
.brand-mark{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(145deg,#1677e8,#0d5fc4);color:#fff;font-size:11px;font-weight:800;box-shadow:0 2px 7px #0002;letter-spacing:.2px}
.brand-text{display:flex;flex-direction:column;line-height:1.05}.brand-text b{font-size:17px!important;letter-spacing:.2px}.brand-text small{font-size:10px;color:#68717d;letter-spacing:1.35px;margin-top:3px}
.inline-mask{border-radius:2px!important}
.inline-editor{min-height:28px!important}

/* v2.1.5 */
.inline-mask{z-index:28!important;opacity:1!important}.inline-editor{z-index:31!important}.brand-mark{background:linear-gradient(145deg,#1677e8,#0d5fc4)!important;color:#fff!important}

/* v2.1.7: wider inline editing field for comfortable text editing */
.inline-editor:not(.add-editor){min-width:280px!important;}


/* v2.1.8: multi-document tabs, compact brand, quick color palettes */
.document-tabs{height:38px;background:#eef2f6;border-bottom:1px solid #d6dde6;display:flex;align-items:flex-end;padding:4px 14px 0;gap:6px;position:relative;z-index:18}
.document-tab-list{display:flex;align-items:flex-end;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:thin}
.document-tab{height:33px;min-width:145px;max-width:245px;display:flex;align-items:center;gap:7px;padding:0 8px 0 11px;border:1px solid #cbd4de;border-bottom-color:#aeb9c6;border-radius:7px 7px 0 0;background:#dde4eb;color:#3b4652;cursor:pointer;font-size:12px;user-select:none}
.document-tab:hover{background:#e8edf2}.document-tab.active{background:#fff;border-bottom-color:#fff;color:#17202a;font-weight:600}
.document-tab .tab-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.document-tab .tab-dirty{color:#d93025;font-size:15px;line-height:1}.document-tab .tab-close{border:0!important;background:transparent!important;padding:0!important;width:19px!important;height:19px!important;min-width:19px!important;border-radius:50%!important;font-size:15px!important;color:#697582}.document-tab .tab-close:hover{background:#d8dee5!important;color:#202124}
.new-doc-tab{height:30px!important;width:32px!important;padding:0!important;min-width:32px;border-radius:6px 6px 0 0!important;font-size:18px!important;background:#fff!important}.tab-limit-hint{align-self:center;color:#7b8794;font-size:10px;margin-left:1px}
body:has(.document-tabs:not(.hidden)) .workspace{height:calc(100vh - 102px)}
body:has(.document-tabs:not(.hidden)) .drop-zone{height:calc(100vh - 102px)}
.quick-colors{display:grid;grid-template-columns:repeat(5,15px);grid-auto-rows:15px;gap:2px;align-items:center;margin-left:2px;padding:2px 3px;background:#fff;border:1px solid #d7dee6;border-radius:5px}
.color-swatch{width:15px!important;height:15px!important;min-width:15px!important;padding:0!important;border:1px solid #ffffff!important;border-radius:3px!important;background:var(--sw)!important;box-shadow:0 0 0 1px #bdc5cf inset;cursor:pointer}.color-swatch:hover{transform:scale(1.15);box-shadow:0 0 0 2px #1267d6!important}.color-swatch.light{box-shadow:0 0 0 1px #aab3bd inset}
.annot-quick-colors{grid-template-columns:repeat(10,15px);grid-auto-rows:15px;margin-left:0;flex:0 0 auto}
.brand-mark{background:#1267d6!important;color:#fff!important;box-shadow:none!important}
.annotation-toolbar #addTextBtn{min-width:76px}
@media(max-width:1320px){.annot-quick-colors{grid-template-columns:repeat(5,15px)}.quick-colors{grid-template-columns:repeat(5,14px);grid-auto-rows:14px}.color-swatch{width:14px!important;height:14px!important;min-width:14px!important}}
.color-swatch.chosen{box-shadow:0 0 0 2px #1267d6!important;transform:scale(1.08)}

/* v2.2.1 session/UI polish */
.hidden-native-color{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.color-menu-btn{height:31px!important;display:inline-flex!important;align-items:center;gap:6px;min-width:86px;padding:0 9px!important}
.color-chip{width:15px;height:15px;border-radius:3px;background:var(--chip);border:1px solid #9ca8b5;box-shadow:inset 0 0 0 1px #fff6}
.color-panel-host{position:relative;background:#fff;border-bottom:1px solid #d9dee5}
.color-expand-panel{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#f8fafc;border-top:1px solid #e3e8ee;min-height:48px;box-shadow:inset 0 1px 0 #fff}
.color-expand-panel.hidden{display:none!important}.color-panel-title{font-size:12px;font-weight:700;color:#34404c;min-width:105px}
.color-swatch-grid{display:grid;grid-template-columns:repeat(10,22px);gap:5px}.color-swatch-grid button{width:22px!important;height:22px!important;min-width:22px!important;padding:0!important;border-radius:5px!important;border:1px solid #9fa9b4!important;box-shadow:inset 0 0 0 1px #fff7}.color-swatch-grid button:hover{outline:2px solid #1267d6;outline-offset:1px}
.rgb-row{display:flex;align-items:center;gap:6px;margin-left:auto}.rgb-row label{display:flex;align-items:center;gap:3px;font-size:11px;color:#596674}.rgb-row input[type=number]{width:48px;height:28px}.hex-input{width:76px;height:28px;font-family:Consolas,monospace}.rgb-row button{height:29px!important;padding:0 10px!important}
#addTextBtn{min-width:82px!important;height:31px!important;padding:4px 10px!important;border:1px solid #c9d3df!important;background:#fff!important;color:#283542!important;font-weight:600!important}#addTextBtn:hover{background:#eef6ff!important;border-color:#8ab8ef!important;color:#0b63c7!important}
.document-tab.active{border-top:3px solid #1267d6!important;color:#0b5fc2!important}.document-tab{border-top:3px solid #b8c3cf!important}.document-tabs{background:#e8eef5!important}.tab-limit-hint{font-weight:600;color:#657487}

/* v2.2.2 compact workspace: recover vertical canvas space when document tabs are visible */
header{height:56px!important;padding-top:0!important;padding-bottom:0!important}
.document-tabs{height:34px!important;padding-top:3px!important}
.document-tab{height:30px!important}
.new-doc-tab{height:28px!important}
body:has(.document-tabs:not(.hidden)) .workspace{height:calc(100vh - 90px)!important}
body:has(.document-tabs:not(.hidden)) .drop-zone{height:calc(100vh - 90px)!important}
.viewer-toolbar.modern-toolbar{height:88px!important}
.tool-row{height:44px!important;min-height:44px!important;padding-top:3px!important;padding-bottom:3px!important}
.annotation-toolbar{min-height:42px!important;height:42px!important;padding-top:3px!important;padding-bottom:3px!important}
.annotation-toolbar .annot-tools{height:36px!important;padding-top:7px!important}
.canvas-scroll{padding:12px 18px 18px!important}
@media(max-height:900px){
  header{height:52px!important}
  .document-tabs{height:32px!important}
  .document-tab{height:28px!important}
  body:has(.document-tabs:not(.hidden)) .workspace{height:calc(100vh - 84px)!important}
  body:has(.document-tabs:not(.hidden)) .drop-zone{height:calc(100vh - 84px)!important}
  .viewer-toolbar.modern-toolbar{height:80px!important}
  .tool-row{height:40px!important;min-height:40px!important;padding-top:2px!important;padding-bottom:2px!important}
  .annotation-toolbar{height:38px!important;min-height:38px!important;padding-top:2px!important;padding-bottom:2px!important}
  .annotation-toolbar .annot-tools{height:32px!important;padding-top:4px!important}
  .canvas-scroll{padding-top:8px!important}
}

/* v2.2.3: prevent text-toolbar labels from overlapping controls after compact-height change */
.viewer-toolbar.modern-toolbar{height:90px!important}
.tool-row-main{height:42px!important;min-height:42px!important}
.tool-row-text{height:48px!important;min-height:48px!important;padding-top:4px!important;padding-bottom:4px!important}
.tool-row-text .tool-group{height:40px!important;padding-top:12px!important}
.tool-row-text .tool-group-title{top:0!important;line-height:11px!important}
@media(max-height:900px){
  .viewer-toolbar.modern-toolbar{height:86px!important}
  .tool-row-main{height:40px!important;min-height:40px!important}
  .tool-row-text{height:46px!important;min-height:46px!important;padding-top:3px!important;padding-bottom:3px!important}
  .tool-row-text .tool-group{height:40px!important;padding-top:12px!important}
}

/* v2.2.5: toolbar alignment, working font colour popover, clean inline editor cover, compact help */
.inline-mask{box-shadow:none!important;border-radius:0!important}
.inline-editor{min-height:32px!important;padding:2px 5px!important}

/* Keep the text toolbar readable and vertically centered. */
.tool-row-text{height:48px!important;min-height:48px!important;padding:3px 10px!important;align-items:stretch!important}
.tool-row-text .tool-group{height:42px!important;min-height:42px!important;padding-top:12px!important;align-items:center!important}
.tool-row-text .tool-group-title{top:0!important;line-height:11px!important}
.tool-row-text button,.tool-row-text select,.tool-row-text input[type=number]{height:30px!important;min-height:30px!important}
.tool-row-text button{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}
.tool-row-text .text-toggle-btn,.tool-row-text .align-group button{height:30px!important;min-height:30px!important;line-height:1!important;padding:0!important}
.tool-row-text .text-toggle-btn b,.tool-row-text .text-toggle-btn i,.tool-row-text .text-toggle-btn u,.tool-row-text .text-toggle-btn s{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;margin:0!important}
.tool-row-text .compact-number input{height:30px!important}
.color-menu-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}

/* Annotation row: title is inline, never absolutely over the buttons. */
.annotation-toolbar{height:42px!important;min-height:42px!important;padding:4px 10px!important;overflow-x:auto!important;overflow-y:hidden!important}
.annotation-toolbar .annot-tools{height:34px!important;min-height:34px!important;padding-top:0!important;align-items:center!important;gap:6px!important}
.annotation-toolbar .annot-tools>.tool-group-title{position:static!important;display:inline-flex!important;align-items:center!important;height:30px!important;margin:0 4px 0 0!important;line-height:1!important;white-space:nowrap!important;font-size:10px!important}
.annotation-toolbar button,.annotation-toolbar .color-menu-btn{height:30px!important;min-height:30px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}
.annotation-toolbar .compact-number{height:30px!important;min-height:30px!important}
.annotation-toolbar .compact-number input{height:24px!important}

/* Colour chooser is a floating popover; it must never add a row to the workspace. */
.color-panel-host{position:static!important;height:0!important;min-height:0!important;border:0!important;overflow:visible!important}
.color-popover{position:fixed!important;z-index:120!important;width:286px!important;background:#fff!important;border:1px solid #cdd6e0!important;border-radius:9px!important;box-shadow:0 8px 24px #0003!important;padding:10px!important}
.color-popover.hidden{display:none!important}
.color-popover-title{font-size:12px!important;font-weight:700!important;color:#334155!important;margin:0 0 8px!important}
.color-swatch-grid{display:grid!important;grid-template-columns:repeat(5,44px)!important;gap:7px!important;margin:0 0 9px!important}
.color-swatch-grid .palette-swatch{width:44px!important;height:28px!important;min-width:44px!important;padding:0!important;border-radius:5px!important;border:1px solid #9da8b4!important;box-shadow:inset 0 0 0 1px #fff7!important}
.more-color-btn{width:100%!important;height:31px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;background:#f8fafc!important}
.rainbow-dot{width:15px;height:15px;border-radius:50%;background:conic-gradient(#f00,#ff0,#0c0,#0cf,#00f,#b0f,#f00);border:1px solid #aeb7c2}

/* Left/right side copy must not collide or wrap into adjacent rows. */
.file-info{line-height:1.35!important;margin-bottom:12px!important;overflow-wrap:anywhere!important}
.page-meta{min-width:0!important}.page-num,.page-select-hint{line-height:1.25!important}
.right-help-panel{padding:8px!important}
.side-section-title{margin-bottom:6px!important}
.compact-help{padding:6px!important}
.compact-help .shortcut-row{min-height:23px!important;height:23px!important;padding:1px 2px!important;font-size:10.5px!important;gap:3px!important;white-space:nowrap!important;overflow:hidden!important}
.compact-help .shortcut-row>span:last-child{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.compact-help .drag-help-row{display:flex!important;align-items:center!important;white-space:nowrap!important}
.compact-help .drag-help-row .mouse-icon{flex:0 0 auto!important}

@media(max-height:900px){
  .tool-row-text{height:46px!important;min-height:46px!important;padding-top:2px!important;padding-bottom:2px!important}
  .tool-row-text .tool-group{height:40px!important;min-height:40px!important;padding-top:11px!important}
}

/* v2.3.0 */
.form-line{display:grid;grid-template-columns:90px 1fr;gap:10px;align-items:center;margin:10px 0}.form-line input{height:34px;padding:0 10px;border:1px solid #cbd5e1;border-radius:6px;font:inherit}.modal-card h3{margin-top:0}.modal-card .muted{line-height:1.45}
