*{box-sizing:border-box}
:root{--green:#32A852;--yellow:#FFC107;--border:#D9DEE5;--bg:#F4F6F9;--text:#20242A;--muted:#68707A}
body{margin:0;background:var(--bg);color:var(--text);font-family:"Microsoft JhengHei","Segoe UI",sans-serif;overflow:hidden;height:100vh}
header{height:82px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:8px 24px;position:relative;z-index:30;border-bottom:1px solid #E9EDF1}
.brand{display:flex;align-items:center}.brand img{width:58px;height:58px;object-fit:contain;margin-right:12px}.title{font-size:26px}.title b{color:var(--green)}.sub{color:var(--muted);margin-top:2px;font-size:13px}.creator{text-align:right;color:var(--muted);font-size:12px;line-height:1.8}.creator b{color:#D99E00}
.mode-tabs{height:48px;background:#fff;display:flex;align-items:end;padding:0 18px;border-bottom:1px solid var(--border);gap:6px}
.mode-tab{height:40px;border:0;border-radius:10px 10px 0 0;padding:0 24px;background:#EEF1F4;color:#5B6570;font-weight:800;cursor:pointer;font-family:inherit}
.mode-tab.active{background:#FFF8D6;color:#7A5B00;border:1px solid #F3D86B;border-bottom-color:#FFF8D6}
.mode-panel{display:none;height:calc(100vh - 130px)}.mode-panel.active{display:block}
.organize-main{margin:12px 18px;display:flex;flex-direction:column;height:calc(100% - 50px);min-height:0}
.toolbar-card{min-height:64px;background:#fff;border:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:10px 12px;gap:10px;flex:0 0 auto}
.tools{display:flex;gap:8px;flex-wrap:wrap}
button{height:42px;border:0;border-radius:12px;padding:0 16px;font-weight:700;font-family:inherit;font-size:14px;cursor:pointer;color:var(--text)}
.green{background:#EAF8EE;color:#237A3B}.blue{background:#EAF3FF;color:#2869C7}.orange{background:#FFF4DD;color:#B87400}.red{background:#FDEDEC;color:#C73A32}.merge{background:var(--yellow);height:44px;font-size:15px}.merge:hover{background:#FFD84D}
.info{height:42px;margin-top:10px;background:#FFFBEA;display:flex;align-items:center;justify-content:space-between;padding:0 13px;font-size:13px;font-weight:700;color:var(--muted);flex:0 0 auto}.info span:first-child{color:var(--text)}
.canvas-card{margin-top:10px;background:#fff;border:1px solid var(--border);padding:10px;min-height:0;flex:1 1 auto;display:flex;overflow:hidden}
.grid{background:#F8F9FB;min-height:0;padding:16px;display:grid;grid-template-columns:repeat(auto-fill,190px);gap:16px;align-content:start;overflow:auto;flex:1 1 auto;width:100%;overscroll-behavior:contain}
.card{width:190px;height:285px;background:#fff;border:1px solid var(--border);padding:10px;position:relative;user-select:none}.card.selected{background:#FFF8D6;border:2px solid var(--yellow)}.card.deleted{background:#E5E7EB;border-color:#9CA3AF}
.thumbbox{width:168px;height:200px;display:flex;align-items:center;justify-content:center;position:relative}.thumbbox canvas{max-width:150px;max-height:200px;box-shadow:0 1px 3px #0002}.deleted-mask{position:absolute;inset:0;background:#ccc9;display:flex;align-items:center;justify-content:center;color:#900;font-size:21px;font-weight:bold}
.line{display:flex;justify-content:space-between;margin-top:12px;font-size:12px;font-weight:bold}.rotation{font-size:10px;color:var(--muted)}.filename{font-size:12px;margin-top:7px;line-height:1.4;overflow:hidden;height:34px;white-space:pre-line}.card.dragging{opacity:.35}.card.drop-before:before{content:"";position:absolute;left:-10px;top:0;width:5px;height:100%;background:var(--yellow);border-radius:3px}
#empty{flex:1 1 auto;background:#F8F9FB;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted)}#empty img{width:72px}#empty h2{color:var(--text);margin-bottom:4px}#empty p{max-width:620px}.hidden{display:none!important}
#status{height:38px;background:#fff;color:var(--muted);padding:9px 20px;font-size:12px;position:absolute;left:0;right:0;bottom:0;border-top:1px solid #E1E5EA}

/* Editor */
.editor-shell{height:100%;display:flex;flex-direction:column;min-height:0}
.editor-topbar{height:auto;min-height:64px;background:#fff;border-bottom:1px solid var(--border);padding:10px 14px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;flex:0 0 auto}
.editor-tools,.editor-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.editor-tool{background:#F1F3F5;color:#4B5560}.editor-tool.active{background:#FFF3B5;color:#6A5200;outline:2px solid var(--yellow)}
.editor-body{display:grid;grid-template-columns:190px minmax(320px,1fr) 280px;gap:0;min-height:0;flex:1 1 auto}
.page-sidebar,.property-panel{background:#fff;min-height:0;overflow:auto}.page-sidebar{border-right:1px solid var(--border)}.property-panel{border-left:1px solid var(--border);padding:12px}
.sidebar-title,.prop-title{height:42px;display:flex;align-items:center;font-weight:800;padding:0 12px;border-bottom:1px solid #ECEFF2}.prop-title{margin:-12px -12px 10px}
.editor-pages{padding:10px;display:flex;flex-direction:column;gap:10px}.side-empty{color:#8A939D;text-align:center;padding:30px 8px;font-size:13px}
.page-thumb{border:2px solid transparent;border-radius:8px;background:#F5F6F7;padding:6px;cursor:pointer}.page-thumb.active{border-color:var(--yellow);background:#FFF8D6}.page-thumb canvas{width:100%;height:auto;display:block;background:#fff}.page-thumb .thumb-label{text-align:center;font-size:12px;margin-top:5px;font-weight:700;color:#5A626B}
.editor-stage-wrap{background:#C9CDD3;min-width:0;min-height:0;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:24px}
.editor-welcome{margin:auto;background:#fff;border-radius:16px;padding:44px;text-align:center;max-width:620px;box-shadow:0 2px 12px #0001;color:var(--muted)}.editor-welcome img{width:76px}.editor-welcome h2{color:var(--text)}
.editor-stage{position:relative}.canvas-stack{position:relative;box-shadow:0 3px 18px #0003;background:#fff}.canvas-stack>canvas{display:block}.canvas-stack .canvas-container{position:absolute!important;left:0!important;top:0!important}
.property-panel label{display:block;font-size:12px;font-weight:700;color:#4D5660;margin:10px 0}.property-panel input[type=color]{width:100%;height:36px;border:1px solid var(--border);padding:3px;border-radius:8px;background:#fff}.property-panel input[type=number],.property-panel select{width:100%;height:36px;border:1px solid var(--border);border-radius:8px;padding:0 8px;background:#fff;font-family:inherit}.property-panel input[type=range]{width:100%}
.range-row{display:flex;gap:8px;align-items:center}.range-row span{min-width:42px;text-align:right;font-weight:700}.angle-row{display:grid;grid-template-columns:1fr repeat(4,44px);gap:5px}.mini-angle{height:36px;padding:0 5px;border-radius:8px;background:#F0F2F4;font-size:11px}
.check-row{display:flex!important;align-items:center;gap:8px}.check-row input{width:18px;height:18px}.prop-sep{height:1px;background:#E7EAED;margin:16px 0}.prop-subtitle{font-size:13px;font-weight:900;color:#38414A}.full{width:100%;margin-top:8px}.prop-note{font-size:11px;line-height:1.6;color:#737D87;background:#F7F8F9;border-radius:8px;padding:9px;margin-top:14px}
.editor-statusbar{height:36px;background:#fff;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 14px;color:var(--muted);font-size:12px;flex:0 0 auto}
.busy{position:fixed;inset:0;background:#ffffffdd;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}.spin{width:34px;height:34px;border:4px solid #ddd;border-top-color:var(--yellow);border-radius:50%;animation:s .8s linear infinite}@keyframes s{to{transform:rotate(360deg)}}

@media(max-width:1050px){.editor-body{grid-template-columns:150px minmax(300px,1fr) 240px}.editor-tools button,.editor-actions button{padding:0 10px;font-size:12px}}
@media(max-width:820px){header{height:70px;padding:6px 12px}.brand img{width:48px;height:48px}.title{font-size:21px}.creator{display:none}.mode-panel{height:calc(100vh - 118px)}.editor-body{grid-template-columns:110px minmax(260px,1fr)}.property-panel{position:absolute;right:0;top:0;bottom:36px;width:250px;z-index:40;box-shadow:-3px 0 10px #0002}.organize-main{margin:8px}.grid{grid-template-columns:repeat(auto-fill,170px)}}

/* V2.7.2 annotation refinements */
.canvas-stack canvas{image-rendering:auto}
.upper-canvas,.lower-canvas{backface-visibility:hidden;transform:translateZ(0)}
.editor-stage-wrap{scrollbar-gutter:stable}

.editor-stage-wrap{overflow:auto}.canvas-stack,#editorStage{transform-origin:top left}

/* V2.7.5B Pan Zoom Fix */
.panzoom-hint{
  font-size:12px;color:#6b7280;white-space:nowrap;padding:0 6px;
}
.editor-stage-wrap{
  display:block!important;
  position:relative;
  overflow:auto!important;
  padding:24px!important;
}
.editor-stage{
  position:relative;
  margin:0 auto;
  flex:none!important;
}
.editor-stage > .canvas-stack{
  position:absolute;
  left:0;
  top:0;
  transform-origin:top left;
}
body.tess-space-pan .editor-stage-wrap,
body.tess-space-pan .editor-stage-wrap canvas{
  cursor:grab!important;
}
body.tess-panning .editor-stage-wrap,
body.tess-panning .editor-stage-wrap canvas{
  cursor:grabbing!important;
}

/* V2.7.5C active editor tool */
.editor-tool.active-tool,
[data-tool].active-tool{
  outline:2px solid #f2b600;
  background:#fff3c4!important;
}

/* V2.7.5F compact properties */
.editor-props{padding:10px 11px!important;gap:5px!important}
.editor-props h3,.editor-props .prop-title{margin:0 0 5px!important;font-size:15px!important}
.editor-props label{margin:0!important;gap:4px!important;font-size:12px!important;line-height:1.2!important}
.editor-props input[type=number],.editor-props select{height:28px!important;min-height:28px!important;padding:3px 6px!important;font-size:12px!important}
.editor-props input[type=color]{width:36px!important;height:26px!important;padding:2px!important}
.editor-props input[type=range]{height:16px!important}
.editor-props .range-row{gap:5px!important;min-height:22px!important}
.editor-props .prop-subtitle{margin:4px 0 1px!important;padding-top:5px!important;font-size:12px!important}
.editor-props .prop-sep{margin:3px 0!important}
.editor-props .check-row{min-height:22px!important}


/* V2.7.5F2 standard quick colors */
.standard-color-palette{display:flex;gap:5px;flex-wrap:nowrap;margin:-1px 0 5px}
.standard-color-palette button{width:22px;height:22px;padding:0;border-radius:6px;border:1px solid rgba(32,36,42,.22);cursor:pointer;box-shadow:0 1px 1px rgba(0,0,0,.04)}
.standard-color-palette button:hover,.standard-color-palette button.selected{outline:2px solid #F2B600;outline-offset:1px}

/* =========================================================
   V2.7.5F6B Compact UI Fix — correct selectors, CSS only
   ========================================================= */

/* Mode tabs */
.mode-tabs{min-height:44px!important}
.mode-tab{
  min-height:40px!important;
  padding:8px 20px!important;
  font-size:15px!important;
  border-radius:11px 11px 0 0!important;
}

/* PDF Organizer top toolbar */
.toolbar-card{
  padding:8px 14px!important;
  gap:8px!important;
  min-height:58px!important;
}
.toolbar-card button{
  min-height:38px!important;
  padding:7px 14px!important;
  font-size:14px!important;
  border-radius:12px!important;
}
.toolbar-card .merge{
  min-height:40px!important;
  padding:7px 16px!important;
}

/* PDF Editor top toolbar */
.editor-topbar{
  padding:7px 14px!important;
  gap:6px!important;
}
.editor-tools,
.editor-actions{
  gap:6px!important;
  row-gap:6px!important;
}
.editor-tools button,
.editor-actions button{
  min-height:36px!important;
  padding:6px 12px!important;
  font-size:13px!important;
  border-radius:11px!important;
}
.editor-actions .panzoom-hint{
  font-size:11px!important;
  line-height:1.15!important;
  margin:0 3px!important;
}

/* Right properties panel compact */
.property-panel{padding:8px 11px 10px!important}
.property-panel .prop-title{
  height:35px!important;
  min-height:35px!important;
  padding:0 11px!important;
  margin:-8px -11px 7px!important;
  font-size:14px!important;
}
.property-panel label{
  margin:4px 0 2px!important;
  font-size:12px!important;
  line-height:1.2!important;
}
.property-panel input[type="color"]{
  height:28px!important;
  padding:2px!important;
  border-radius:6px!important;
}
.property-panel input[type="number"],
.property-panel select,
.property-panel input[type="text"]{
  min-height:29px!important;
  height:29px!important;
  padding:3px 7px!important;
  font-size:12px!important;
  border-radius:6px!important;
}
.property-panel input[type="range"]{
  height:14px!important;
  margin:0!important;
}
.property-panel .range-row{min-height:23px!important;gap:5px!important}
.property-panel .prop-sep{margin:7px 0!important}
.property-panel .prop-subtitle{margin:4px 0 2px!important;font-size:12px!important}
.property-panel .check-row{margin:3px 0!important;min-height:22px!important}
.property-panel .standard-color-palette{
  gap:4px!important;
  margin:1px 0 4px!important;
}
.property-panel .standard-color-palette button{
  width:21px!important;
  height:21px!important;
  border-radius:5px!important;
}


/* =========================================================
   V2.7.5F7 WORKSPACE FOCUS
   Goal: give maximum height to the actual PDF workspace.
   CSS ONLY — editor/PDF logic remains unchanged.
   ========================================================= */

/* Main brand/header area */
header,
.header,
.app-header,
.top-header {
  min-height:0 !important;
  padding-top:8px !important;
  padding-bottom:8px !important;
}

header .brand,
.header .brand,
.app-header .brand,
.brand {
  gap:9px !important;
}

header img,
.header img,
.app-header img,
.brand img,
.logo {
  max-height:48px !important;
  width:auto !important;
}

header h1,
.header h1,
.app-header h1,
.brand h1 {
  font-size:25px !important;
  line-height:1.05 !important;
  margin:0 !important;
}

header .subtitle,
.header .subtitle,
.app-header .subtitle,
.brand .subtitle,
.tagline {
  font-size:12px !important;
  line-height:1.15 !important;
  margin-top:3px !important;
}

header .creator,
header .version,
.header .creator,
.header .version,
.app-header .creator,
.app-header .version,
.meta,
.header-meta {
  font-size:11px !important;
  line-height:1.25 !important;
}

/* Tabs: keep clear selection, but consume less vertical space */
.mode-tabs {
  min-height:40px !important;
}
.mode-tab {
  min-height:36px !important;
  padding:6px 18px !important;
  font-size:14px !important;
}

/* Organizer toolbar */
.toolbar-card {
  min-height:50px !important;
  padding:6px 12px !important;
  gap:7px !important;
  margin-top:8px !important;
  margin-bottom:7px !important;
}
.toolbar-card button {
  min-height:34px !important;
  padding:5px 13px !important;
  font-size:13px !important;
  border-radius:11px !important;
}
.toolbar-card .merge {
  min-height:36px !important;
}

/* Organizer information/status strip */
.statusbar,
.work-info,
.info-bar,
.file-status {
  min-height:34px !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
  margin-top:6px !important;
  margin-bottom:6px !important;
}

/* Editor toolbar: compact container more than the buttons themselves */
.editor-topbar {
  padding:5px 12px !important;
  gap:5px !important;
  margin:0 !important;
}
.editor-tools,
.editor-actions {
  gap:5px !important;
  row-gap:5px !important;
}
.editor-tools button,
.editor-actions button {
  min-height:33px !important;
  padding:5px 11px !important;
  font-size:12.5px !important;
  border-radius:10px !important;
}
.editor-actions .panzoom-hint {
  font-size:10.5px !important;
  margin:0 2px !important;
}

/* Right property panel: retain F6B compactness, trim a little more whitespace */
.property-panel {
  padding-top:6px !important;
  padding-bottom:8px !important;
}
.property-panel .prop-title {
  height:32px !important;
  min-height:32px !important;
  margin-bottom:5px !important;
}
.property-panel label {
  margin-top:3px !important;
}
.property-panel .standard-color-palette {
  margin-bottom:3px !important;
}

/* Workspace should begin immediately after controls */
.editor-main,
.workspace,
.pages-area,
.organizer-area {
  margin-top:0 !important;
}

/* V2.7.5F8 Dual Opacity */
#strokeOpacityValue,#opacityValue{min-width:38px;text-align:right;font-size:12px}

/* V2.7.5F12 UX tools */
.icon-only-tool{min-width:42px!important;width:42px!important;padding:0!important;font-size:20px!important}
.native-color-input{position:fixed!important;left:-9999px!important;top:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
.color-trigger{width:100%;height:30px!important;padding:3px 7px!important;border:1px solid var(--border)!important;border-radius:7px!important;background:#fff!important;display:flex;align-items:center;gap:7px;color:#59616a!important;font-size:12px!important;font-weight:700!important}
.color-trigger-swatch{width:38px;height:20px;border-radius:5px;border:1px solid #0003;box-shadow:inset 0 0 0 1px #fff4}
.color-trigger-text{flex:1;text-align:left}.color-trigger-caret{color:#8a929a}
.color-popover{position:fixed;z-index:1000;width:178px;padding:9px;background:#fff;border:1px solid #d9dee5;border-radius:10px;box-shadow:0 8px 24px #0002}
.color-popover-grid{display:grid;grid-template-columns:repeat(5,26px);gap:7px;justify-content:center}
.color-popover-grid button{width:26px;height:26px;padding:0;border-radius:6px;border:1px solid #0003}
.color-popover-grid button:hover{outline:2px solid #f2b600;outline-offset:1px}
.more-color-btn{width:100%;height:28px!important;margin-top:8px;padding:0 8px!important;border-radius:7px!important;background:#f4f6f8!important;color:#59616a!important;font-size:12px!important}

/* V2.7.5F13 Single Toolbar */
.editor-topbar{
  display:flex!important;align-items:center!important;gap:6px!important;
  flex-wrap:nowrap!important;padding:5px 10px!important;overflow:visible!important;
}
.editor-tools,.editor-actions{
  display:flex!important;align-items:center!important;gap:4px!important;
  flex-wrap:nowrap!important;min-width:0!important;
}
.editor-tools{flex:0 1 auto!important}
.editor-actions{flex:1 1 auto!important}
.editor-tools button,.editor-actions button{
  min-height:32px!important;height:32px!important;margin:0!important;border-radius:8px!important;
}
.editor-topbar .icon-toolbar-btn,.editor-topbar .icon-only-tool{
  min-width:34px!important;width:34px!important;max-width:34px!important;
  padding:0!important;font-size:17px!important;line-height:30px!important;flex:0 0 34px!important;
}
.editor-topbar .compact-text-btn{padding:0 9px!important;white-space:nowrap!important;font-size:12px!important}
.editor-topbar #exportEdited{margin-left:auto!important}
.native-color-input{
  position:fixed!important;left:0!important;top:0!important;width:2px!important;height:2px!important;
  opacity:.001!important;pointer-events:none!important;border:0!important;padding:0!important;
}
@media (max-width:1050px){
  .editor-topbar{flex-wrap:wrap!important}
  .editor-tools,.editor-actions{flex-wrap:wrap!important}
  .editor-actions{flex-basis:100%!important}
}

/* V2.7.5F14 Color System */
.color-trigger{height:29px!important;padding:3px 6px!important}
.color-trigger-swatch{width:48px!important;height:19px!important}
.inline-common-colors{display:flex;align-items:center;gap:4px;margin-top:4px;margin-bottom:2px;height:20px}
.inline-common-colors button{width:20px;height:20px;min-width:20px;padding:0!important;border-radius:5px;border:1px solid #0002;box-shadow:inset 0 0 0 1px #fff3;cursor:pointer}
.inline-common-colors button:hover{outline:2px solid #f2b600;outline-offset:1px}
.color-popover{width:238px!important;padding:10px!important;border-radius:11px!important}
.color-popover-title{font-size:12px;font-weight:800;color:#59616a;margin:0 0 8px 2px}
.color-popover-grid{display:grid!important;grid-template-columns:repeat(5,34px)!important;gap:7px!important;justify-content:center!important}
.color-popover-grid button{width:34px!important;height:26px!important;border-radius:6px!important;padding:0!important;border:1px solid #0002!important}
.more-color-btn{margin-top:10px!important}

/* V2.7.5F15 */
.prop-help{display:block;margin-top:3px;font-size:10px;color:#8a9199;font-weight:400}

/* V2.7.5F16 Navigation / typography / tooltip */
.editor-tools button,.editor-actions button{
  min-height:38px!important;height:38px!important;
}
.editor-topbar .icon-toolbar-btn,.editor-topbar .icon-only-tool{
  min-width:40px!important;width:40px!important;max-width:40px!important;
  height:38px!important;min-height:38px!important;flex:0 0 40px!important;
  font-size:19px!important;line-height:36px!important;
}
.editor-topbar .compact-text-btn{
  min-height:38px!important;height:38px!important;padding:0 11px!important;font-size:13px!important;
}
.page-range-row{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.page-range-row label{min-width:0}
.page-range-row input{width:100%;box-sizing:border-box}
.tess-tooltip{
  position:fixed;z-index:99999;pointer-events:none;
  padding:6px 9px;border-radius:7px;
  background:rgba(38,43,48,.94);color:#fff;
  font-size:13px;font-weight:600;line-height:1.25;
  box-shadow:0 3px 12px rgba(0,0,0,.18);
  white-space:nowrap;
}
.tess-tooltip.hidden{display:none!important}

/* V2.7.5F18 Visual Polish — A-1 header + refined icons */
header{
  height:80px!important;
  padding:7px 20px!important;
  display:flex!important;
  align-items:stretch!important;
  gap:18px!important;
  border-bottom:1px solid #E7EBEF!important;
}
.header-left{
  display:flex;align-items:stretch;min-width:0;flex:1 1 auto;
}
.brand{
  flex:0 0 auto;
  padding-right:24px;
  margin-right:22px;
  position:relative;
}
.brand:after{
  content:"";position:absolute;right:0;top:12px;bottom:12px;width:1px;background:#E5E9ED;
}
.brand img{width:52px!important;height:52px!important;margin-right:11px!important}
.title{font-size:24px!important}
.sub{font-size:12px!important}
.creator{align-self:center;flex:0 0 auto;white-space:nowrap}

.mode-tabs{
  height:auto!important;background:transparent!important;
  display:flex!important;align-items:stretch!important;
  padding:0!important;border:0!important;gap:4px!important;
}
.mode-tab{
  position:relative;
  height:auto!important;min-width:126px;
  padding:0 20px!important;
  border:0!important;border-radius:10px 10px 0 0!important;
  background:transparent!important;color:#5B6570!important;
  font-size:14px!important;
}
.mode-tab:hover{background:#F7F8F9!important;color:#313840!important}
.mode-tab.active{
  background:linear-gradient(180deg,#FFFDF4 0%,#FFF8DE 100%)!important;
  color:#8A6200!important;
  outline:none!important;
}
.mode-tab.active:after{
  content:"";position:absolute;left:18px;right:18px;bottom:0;height:3px;
  border-radius:3px 3px 0 0;background:var(--yellow);
}
.mode-panel{height:calc(100vh - 80px)!important}

.tool-svg{
  width:23px;height:23px;display:block;margin:auto;
  overflow:visible;
}
.fit-svg{width:24px;height:24px}
.editor-topbar .icon-toolbar-btn,
.editor-topbar .icon-only-tool{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
.editor-topbar .icon-toolbar-btn:hover,
.editor-topbar .icon-only-tool:hover{
  background:#E9EDF1;
}
.editor-tool.active .tool-svg,
.editor-tool.active-tool .tool-svg{color:#5F4A00}

@media (max-width:1050px){
  header{height:auto!important;min-height:80px!important;flex-wrap:wrap!important}
  .header-left{flex-wrap:wrap}
  .brand{margin-right:12px;padding-right:14px}
  .mode-panel{height:calc(100vh - 118px)!important}
}

/* V2.7.5F18B Safe UI
   F18 stable baseline + visual-only changes. */

/* Toolbar grouping: creation/document controls left, completion controls right. */
.editor-topbar{
  flex-wrap:nowrap!important;
  gap:16px!important;
  min-height:52px!important;
  padding:7px 10px!important;
}
.editor-toolbar-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}
.editor-toolbar-main .editor-tools,
.editor-toolbar-main .editor-actions{
  flex-wrap:nowrap!important;
}
.toolbar-soft-divider{
  display:block;
  width:1px;
  height:24px;
  flex:0 0 1px;
  margin:0 2px;
  background:#E2E6E4;
}
.editor-completion-actions{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  flex:0 0 auto;
}

/* Compact shortcut hint: informational only; no button or behavior attached. */
.editor-shortcuts{
  height:27px;
  flex:0 0 27px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 12px;
  background:#FAFBFA;
  border-bottom:1px solid #E7EAE8;
  color:#747D78;
  font-size:11px;
  white-space:nowrap;
}
.editor-shortcuts i{
  width:2px;
  height:2px;
  border-radius:50%;
  background:#AAB2AD;
}
.editor-shortcuts kbd{
  padding:2px 4px;
  border:1px solid #DADFDA;
  border-bottom-color:#C9D0CA;
  border-radius:4px;
  background:#F1F3F1;
  color:#56615A;
  box-shadow:0 1px 0 #D3D8D4;
  font:600 10px/1 "Segoe UI",sans-serif;
}

/* All sliders: TESS-compatible muted forest green.
   Uses native accent-color intentionally: visual refresh without touching slider logic. */
input[type="range"]{
  accent-color:#4F8F68!important;
  cursor:pointer;
}
input[type="range"]:focus-visible{
  outline:2px solid rgba(79,143,104,.22);
  outline-offset:3px;
  border-radius:999px;
}

@media (max-width:1180px){
  .editor-shortcuts{
    justify-content:flex-start;
    overflow:hidden;
  }
}

/* V2.7.5F18B3 — simple all-left toolbar */
.editor-topbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  min-height:52px!important;
  padding:7px 10px!important;
}
.editor-toolbar-left{
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  gap:8px!important;
  min-width:0!important;
}
.editor-toolbar-left .editor-tools,
.editor-toolbar-left .editor-actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
}
.toolbar-soft-divider{
  width:1px!important;height:24px!important;
  background:#E2E6E4!important;
  flex:0 0 1px!important;
  margin:0 2px!important;
}
.editor-completion-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  margin-left:0!important;
  flex:0 0 auto!important;
}
.editor-shortcuts{display:none!important}

/* V2.7.5F18B4 hand/select pan */
body.tess-panning .editor-stage-wrap,
body.tess-panning .editor-stage-wrap canvas{
  cursor:grabbing!important;
}

/* V2.7.5F18B7 Burst Tool */
.burst-tool-svg{width:23px;height:23px}

/* V2.7.5F18B8 startup gate */
.startup-gate{
  position:fixed;inset:0;z-index:100000;
  display:flex;align-items:center;justify-content:center;
  background:rgba(244,246,249,.96);
  transition:opacity .16s ease;
}
.startup-gate.startup-ready{opacity:0;pointer-events:none}
.startup-card{
  min-width:270px;padding:24px 28px;text-align:center;
  background:#fff;border:1px solid #E1E5E8;border-radius:16px;
  box-shadow:0 10px 34px rgba(32,36,42,.10);
}
.startup-card img{width:54px;height:54px;object-fit:contain}
.startup-title{margin-top:7px;font-size:17px;font-weight:800;color:#27312B}
.startup-message{margin-top:7px;font-size:12px;color:#747C77}
#startupRetry{
  margin-top:14px;height:34px;padding:0 14px;border-radius:9px;
  background:#EAF8EE;color:#237A3B;
}

/* V2.7.5F19 Image Stamp */
.stamp-tool-svg{width:23px;height:23px}
.stamp-choose-btn{width:100%;height:34px;margin-top:5px;border:1px solid #D9DEE5;border-radius:8px;background:#fff;color:#344039;font-weight:700}
.stamp-choose-btn:hover{background:#F5F8F6;border-color:#B9C8BE}
.stamp-file-name{margin:5px 0 8px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#7A827D}


/* F20B3A — Focus Symbol compact popover */
.focus-symbol-wrap{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.focus-symbol-tool-btn{
  position:relative;
  gap:2px;
  min-width:34px;
}
.focus-symbol-tool-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:16px;
  font-size:16px;
  line-height:1;
}
.focus-symbol-caret{
  font-size:9px;
  line-height:1;
  opacity:.65;
  transform:translateY(1px);
}
.focus-symbol-popover{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:1000;
  display:none;
  grid-template-columns:repeat(3, 34px);
  gap:5px;
  padding:7px;
  background:#fff;
  border:1px solid #D9DEE5;
  border-radius:10px;
  box-shadow:0 8px 22px rgba(35,45,58,.16);
}
.focus-symbol-popover.open{
  display:grid;
}
.focus-symbol-popover button{
  width:34px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid #D9DEE5;
  border-radius:7px;
  background:#fff;
  color:#32363c;
  font:inherit;
  font-size:17px;
  line-height:1;
  cursor:pointer;
}
.focus-symbol-popover button:hover{
  background:#F4F6F9;
  border-color:#C8CED6;
}
.focus-symbol-popover button.active{
  background:#FFF8DA;
  border-color:#FFC107;
}


/* Future sponsor extension point — intentionally invisible until explicitly enabled. */
.tess-sponsor-slot[hidden]{display:none !important;}


/* TESS Contact TEST — isolated contact entry */
.tess-contact-link{height:auto!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#68707A!important;font-size:12px!important;font-weight:700!important;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.tess-contact-link:hover{color:#237A3B!important}
.tess-contact-modal{position:fixed;inset:0;z-index:2000;background:rgba(32,36,42,.35);display:flex;align-items:center;justify-content:center;padding:20px}
.tess-contact-card{position:relative;width:min(410px,calc(100vw - 32px));background:#fff;border:1px solid #D9DEE5;border-radius:18px;box-shadow:0 20px 56px rgba(30,40,50,.20);padding:26px 26px 24px;overflow:hidden}
.tess-contact-close{position:absolute;right:13px;top:12px;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:#F1F3F5;color:#5B6570;font-size:21px;font-weight:500}
.tess-contact-close:hover{background:#E8EBEE}
.tess-contact-title{font-size:21px;font-weight:900;color:#20242A;margin-right:38px;letter-spacing:.2px}
.tess-contact-sub{margin-top:8px;color:#68707A;font-size:13px;line-height:1.7}
.tess-contact-actions{display:grid;gap:10px;margin-top:18px}
.tess-contact-action{display:block;border:1px solid #D9DEE5;border-radius:12px;padding:13px 14px;text-decoration:none;background:#FAFBFC;color:#20242A}
.tess-contact-action:hover{border-color:#AFC7B7;background:#F4FAF6}
.tess-contact-action-title{display:block;font-size:14px;font-weight:900;color:#237A3B}
.tess-contact-action-note{display:block;margin-top:4px;font-size:12px;color:#68707A;line-height:1.45}
.tess-contact-email{margin-top:15px;padding-top:13px;border-top:1px solid #ECEFF2;color:#7A827D;font-size:11px;text-align:center}
.tess-contact-email-simple{margin-top:18px;padding:16px 18px;border:1px solid #D9DEE5;border-radius:13px;background:#F8FAF9;color:#237A3B;font-size:16px;font-weight:900;text-align:center;letter-spacing:.15px;user-select:text}
