[hidden]{display:none!important}
:root{--bg:#f3f5f2;--card:#fff;--ink:#17201c;--muted:#6c756f;--line:#e4e8e4;--accent:#0d6b47;--soft:#edf5f0;--danger:#9a3327;--radius:15.4px}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}
button,input,select{font:inherit}.top{height:72.6px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 19.8px;gap:19.8px}
.brand-wrap{display:flex;align-items:center;gap:11px;min-width:0;flex:0 0 auto}.header-project-fields{display:flex;align-items:center;gap:8.8px;min-width:0;flex:0 1 473px}.header-project-field{display:grid;gap:3.3px;min-width:0;flex:1 1 275px;font-size:9.9px;font-weight:750;color:var(--muted)}.header-project-field>span{white-space:nowrap}.header-project-field input{height:33px;padding:6.6px 9.9px;border-radius:8.8px;font-size:12.1px}.header-project-order{flex:0 1 159.5px}.top-actions{margin-left:auto}.brand-logo{width:46.2px;height:46.2px;display:block;flex:0 0 46.2px}.brand{display:flex;flex-direction:column;justify-content:center;line-height:1.05;min-width:0}.title{font-size:24.2px;font-weight:850;letter-spacing:-.035em}.subtitle{margin-top:5.5px;font-size:12.1px;font-weight:650;letter-spacing:.01em;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:8.8px}.privacy{font-size:13.2px;color:var(--muted);text-align:right}.top-icon{width:35.2px;height:35.2px;flex:0 0 auto;padding:0;margin:0;border-radius:50%;font-size:18.7px;font-weight:850;background:var(--soft);color:var(--accent);border:1px solid #d7e8de}.top-icon svg{width:19.8px;height:19.8px;display:block;fill:currentColor;stroke:none}.top-icon:hover{background:#e2efe7}
.tabsbar{height:46.2px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:6.6px;padding:5.5px 11px;overflow:visible;position:relative;z-index:30}.tabs-nav-controls{display:flex;align-items:center;gap:3.3px;flex:0 0 auto}.tabs-nav-button{width:28.6px;height:33px;flex:0 0 auto;padding:0;margin:0;border:0;border-radius:8.8px;background:transparent;color:var(--muted)}.tabs-nav-button svg{width:18.7px;height:18.7px;display:block;fill:currentColor}.tabs-nav-button:hover:not(:disabled){background:var(--soft);color:var(--accent)}.tabs-nav-button:disabled{opacity:.28;cursor:default}.tabs-menu-wrap{position:relative;display:flex}.tabs-menu-toggle[aria-expanded="true"]{background:var(--soft);color:var(--accent)}.tabs-menu{position:absolute;left:0;top:calc(100% + 7.7px);width:min(330px,72vw);max-height:min(484px,68vh);overflow:auto;padding:6.6px;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 11px 35.2px rgba(20,35,26,.18);z-index:1000}.tabs-menu-item{width:100%;min-width:0;margin:0;padding:8.8px 9.9px;border:0;border-radius:7.7px;background:transparent;color:var(--ink);display:flex;align-items:center;gap:8.8px;justify-content:flex-start;text-align:left}.tabs-menu-item:hover{background:var(--soft)}.tabs-menu-item.active{background:var(--soft);color:var(--accent);font-weight:800}.tabs-menu-number{flex:0 0 24.2px;font-size:9.9px;font-variant-numeric:tabular-nums;color:var(--muted);opacity:.82}.tabs-menu-item.active .tabs-menu-number{color:var(--accent)}.tabs-menu-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tabs-viewport{flex:0 1 auto;min-width:0;width:max-content;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior-x:contain}.tabs-viewport::-webkit-scrollbar{display:none}.tabs-list{display:flex;align-items:center;gap:5.5px;width:max-content;min-width:max-content}.drawing-tab{display:flex;align-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:9.9px;background:#f4f6f4;overflow:hidden;max-width:253px}.drawing-tab.active{border-color:var(--accent);background:var(--soft);box-shadow:0 0 0 1px rgba(13,107,71,.08)}.tab-main{width:auto;max-width:209px;margin:0;padding:7.7px 9.9px;background:transparent;border-radius:0;justify-content:flex-start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.1px}.drawing-tab.active .tab-main{color:var(--accent)}.tab-number{flex:0 0 auto;margin-right:6.6px;font-size:9.9px;font-variant-numeric:tabular-nums;letter-spacing:.03em;color:var(--muted);opacity:.78}.tab-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drawing-tab.active .tab-number{color:var(--accent);opacity:.9}.tab-duplicate,.tab-close{width:27.5px;height:27.5px;padding:0;margin:0 2px 0 0;border-radius:7.7px;background:transparent;color:var(--muted);font-size:15.4px}.tab-duplicate svg{width:17.6px;height:17.6px;display:block;fill:currentColor;pointer-events:none}.tab-duplicate:hover{background:var(--soft);color:var(--accent)}.tab-close{margin-right:3.3px}.tab-close:hover{background:#f4e9e7;color:var(--danger)}.add-tab{width:33px;height:33px;flex:0 0 auto;padding:0;margin:0;border:1px dashed #cbd4ce;border-radius:9.9px;background:#fff;color:var(--accent);font-size:19.8px}.quick-new,.quick-load,.quick-save,.quick-export{width:33px;height:33px;flex:0 0 auto;padding:0;margin:0;border:1px solid var(--line);border-radius:9.9px;background:#fff;color:var(--accent)}.quick-new svg,.quick-load svg,.quick-save svg,.quick-export svg{width:17.6px;height:17.6px;display:block;fill:currentColor}.quick-new:hover,.quick-load:hover,.quick-save:hover,.quick-export:hover{background:var(--soft)}.quick-new:disabled,.quick-load:disabled,.quick-save:disabled,.quick-export:disabled{opacity:.35}.app{height:calc(100% - 118.8px);display:grid;grid-template-columns:283.8px minmax(0,1fr) 352px}
.sidebar,.measure-panel{background:#fff;padding:11px;overflow:auto}.sidebar{border-right:1px solid var(--line)}.sidebar-collapse-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:5.5px;margin:0 0 7.7px}.project-edition-badge{display:inline-flex;align-items:center;min-width:0;max-width:154px;height:24.2px;margin-right:auto;padding:0 7.7px;border:1px solid var(--line);border-radius:1098.9px;background:var(--card);color:var(--muted);font-size:9.35px;font-weight:800;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;cursor:help}.project-edition-badge.project-edition-pro{background:rgba(13,107,71,.11);border-color:rgba(13,107,71,.22);color:var(--accent)}.project-edition-badge.project-edition-basic{background:#f1f3f1;color:#68716b}.project-edition-badge[hidden]{display:none!important}.sidebar-collapse-toolbar button{width:30.8px;height:30.8px;padding:0;margin:0;border:1px solid var(--line);border-radius:8.8px;background:var(--card);color:var(--muted)}.sidebar-collapse-toolbar button:hover{background:var(--soft);color:var(--accent)}.sidebar-collapse-toolbar svg{width:18.7px;height:18.7px;display:block;fill:currentColor;pointer-events:none}.sidebar .group.collapsible-group{padding:0;overflow:visible}.sidebar .group.collapsible-group>.group-collapse-head{display:flex;align-items:center;justify-content:space-between;gap:8.8px;min-height:37.4px;padding:8.8px 9.9px;cursor:pointer;user-select:none}.sidebar .group.collapsible-group>.group-collapse-head .group-title-row{flex:1;margin:0;min-width:0}.sidebar .group.collapsible-group>.group-collapse-head>.group-title{flex:1}.sidebar .group.collapsible-group>.group-collapse-head:hover .group-title{color:var(--ink)}.sidebar .group-collapse-toggle{width:26.4px;height:26.4px;flex:0 0 26.4px;padding:0;margin:0;border-radius:7.7px;background:transparent;color:var(--muted)}.sidebar .group-collapse-toggle:hover{background:var(--soft);color:var(--accent)}.sidebar .group-collapse-toggle svg{width:18.7px;height:18.7px;display:block;fill:currentColor;pointer-events:none}.sidebar .group-content{padding:0 11px 11px}.sidebar .collapsible-group.collapsed>.group-content{display:none}.sidebar .collapsible-group.collapsed>.group-collapse-head{min-height:39.6px}.sidebar .collapsible-group.collapsed>.group-collapse-head .group-title{color:var(--ink)}.sidebar .group-collapse-toggle .collapse-icon{display:block}.sidebar .group-collapse-toggle .expand-icon{display:none}.sidebar .collapsible-group.collapsed .group-collapse-toggle .collapse-icon{display:none}.sidebar .collapsible-group.collapsed .group-collapse-toggle .expand-icon{display:block}.measure-panel{border-left:1px solid var(--line);position:relative}.app.measure-collapsed{grid-template-columns:283.8px minmax(0,1fr) 41.8px}.measure-panel.collapsed{padding:8.8px 5.5px;overflow:hidden}.measure-panel.collapsed .measure-panel-content{display:none}.panel-toggle{width:30.8px;height:30.8px;padding:0;margin:0 0 8.8px auto;border-radius:8.8px;font-size:17.6px;background:#edf0ed;color:var(--ink)}.measure-panel.collapsed .panel-toggle{margin:0 auto}.panel-toggle span{display:block;transition:transform .15s}.measure-panel.collapsed .panel-toggle span{transform:rotate(180deg)}.group{border:1px solid var(--line);border-radius:14.3px;padding:11px;margin-bottom:8.8px}.group-title-row{display:flex;align-items:center;justify-content:space-between;gap:8.8px;margin-bottom:7.7px}.group-title{font-size:9.9px;letter-spacing:.11em;text-transform:uppercase;font-weight:850;color:var(--muted);margin:0}.info-help{position:relative;flex:0 0 auto}.info-btn{width:19.8px;height:19.8px;padding:0;margin:0;border-radius:50%;font-size:11px;font-weight:850;background:var(--soft);color:var(--accent);border:1px solid #d7e8de}.info-tooltip{position:absolute;z-index:30;top:26.4px;right:0;width:253px;padding:9.9px 11px;border:1px solid #d7e8de;border-radius:11px;background:#fff;color:var(--ink);font-size:12.1px;line-height:1.45;font-weight:500;letter-spacing:0;text-transform:none;box-shadow:0 8.8px 26.4px rgba(20,35,26,.14);opacity:0;visibility:hidden;transform:translateY(-3.3px);transition:.12s opacity,.12s transform,.12s visibility;pointer-events:none}.info-help:hover .info-tooltip,.info-help:focus-within .info-tooltip,.info-help.open .info-tooltip{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}.info-tooltip b{font-weight:800}.info-tooltip::before{content:'';position:absolute;top:-5.5px;right:8.8px;width:9.9px;height:9.9px;background:#fff;border-left:1px solid #d7e8de;border-top:1px solid #d7e8de;transform:rotate(45deg)}
button,.filebtn{display:flex;align-items:center;justify-content:center;width:100%;border:0;border-radius:9.9px;padding:7.7px 9.9px;font-size:12.1px;line-height:1.2;font-weight:750;cursor:pointer;background:#edf0ed;color:var(--ink);margin-top:5.5px;text-align:center}.primary{background:var(--accent);color:#fff}.danger{background:#f8ecea;color:var(--danger)}button.active{outline:2px solid var(--accent);outline-offset:1px;background:var(--soft);color:var(--accent)}button:disabled{opacity:.45;cursor:not-allowed}
input[type=file]{display:none}label.field{display:grid;gap:5.5px;font-size:12.1px;font-weight:750;color:var(--muted);margin-top:8.8px}.check-field{display:flex;align-items:center;gap:7.7px;margin-top:9.9px;font-size:12.1px;font-weight:750;color:var(--muted);cursor:pointer}.check-field input{margin:0;accent-color:var(--accent)}input[type=text],input[type=number],select{width:100%;border:1px solid #dce2dd;background:#fff;border-radius:11px;padding:9.9px 11px;color:var(--ink)}input[type=range]{width:100%;accent-color:var(--accent)}.range-head{display:flex;justify-content:space-between;gap:8.8px;align-items:center}.range-value{font-variant-numeric:tabular-nums;color:var(--ink)}
.row{display:grid;grid-template-columns:1fr 1fr;gap:7.7px}#calGeneral{grid-column:1/-1;width:100%}.guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:7.7px;margin-top:5.5px}.cal-edit{display:grid;grid-template-columns:19.8px minmax(0,1fr) 33px;gap:5.5px;align-items:center;margin-top:6.6px}.cal-edit span{font-size:12.1px;font-weight:800;color:var(--muted)}.cal-edit input{min-width:0;padding:7.7px 8.8px;border-radius:8.8px;font-size:12.1px}.cal-edit button{width:33px;height:33px;padding:0;margin:0;border-radius:8.8px;font-size:14.3px}.status{font-size:12.1px;line-height:1.45;color:var(--muted)}.status b{color:var(--ink)}.hint{padding:9.9px 11px;background:var(--soft);border-radius:11px;color:var(--accent);font-size:12.1px;line-height:1.45;margin-top:8.8px}
.workspace{position:relative;min-width:0;min-height:0;background:#dfe3df;overflow:hidden}.tool-dock{position:absolute;z-index:20;top:11px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5.5px;padding:6.6px;background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:14.3px;box-shadow:0 8.8px 26.4px rgba(20,35,26,.13);backdrop-filter:blur(8.8px)}.tool-dock button{width:41.8px;height:39.6px;margin:0;padding:0;border-radius:9.9px;font-size:22px;font-weight:750;overflow:hidden;color:#737c76;background:#f3f5f3;opacity:1;transition:.15s background,.15s color,.15s opacity,.15s box-shadow}.tool-dock button:hover:not(:disabled){background:#e9eeea;color:#3f4943}.tool-dock button svg,.tool-dock button img{width:22px;height:22px;display:block;pointer-events:none}.tool-dock button img{filter:opacity(.58)}.tool-dock button:hover:not(:disabled) img,.tool-dock button.active img{filter:opacity(1)}.tool-dock button:disabled{opacity:.22;background:#f7f8f7;color:#8d958f;cursor:not-allowed}.tool-dock button.active{outline:2px solid var(--accent);outline-offset:1px;background:var(--soft);color:var(--accent);opacity:1}.tool-dock button.toggle-on:not(.active){position:relative;outline:0;background:var(--soft);color:var(--accent);box-shadow:inset 0 0 0 1px rgba(13,107,71,.24)}.tool-dock button.toggle-on:not(.active)::after{content:"";position:absolute;right:5.5px;bottom:5.5px;width:6.6px;height:6.6px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--soft)}.tool-separator{width:1px;height:26.4px;background:var(--line);margin:0 2px}.segment-mode{display:none;align-items:center;gap:4.4px;margin-left:3.3px;padding-left:7.7px;border-left:1px solid var(--line)}.segment-mode.visible{display:flex}.segment-mode button{width:auto;min-width:63.8px;padding:0 8.8px;font-size:11px}.segment-mode button.active{background:var(--soft);color:var(--accent);outline:2px solid var(--accent);outline-offset:1px}.tool-dock .tool-name{width:auto;min-width:85.8px;padding:0 11px;font-size:12.1px}.workspace::after{content:"";position:absolute;inset:0;z-index:40;pointer-events:none;border:2px solid transparent;background:transparent;box-shadow:inset 0 0 0 0 rgba(13,107,71,0);transition:background .14s ease,border-color .14s ease,box-shadow .14s ease}.workspace.drag::after{border-color:var(--accent);background:rgba(13,107,71,.075);box-shadow:inset 0 0 0 7.7px rgba(13,107,71,.08),inset 0 0 46.2px rgba(13,107,71,.12)}html[data-theme="dark"] .workspace.drag::after{border-color:#78c4a4;background:rgba(120,196,164,.075);box-shadow:inset 0 0 0 7.7px rgba(120,196,164,.07),inset 0 0 46.2px rgba(120,196,164,.10)}.canvas-wrap{position:absolute;inset:0}canvas{display:block;width:100%;height:100%;cursor:default}.empty{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.empty-card{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:22px;padding:26.4px 33px;text-align:center;box-shadow:0 13.2px 44px rgba(20,35,26,.08)}.empty-card strong{display:block;font-size:20.9px;margin-bottom:5.5px}.empty-card span{font-size:13.2px;color:var(--muted)}
.measure-list{display:grid;gap:7.7px}.measure-item{border:1px solid var(--line);border-radius:12.1px;padding:9.9px;background:#fafbfa;cursor:pointer;transition:.15s border-color,.15s box-shadow,.15s background}.measure-item:hover{border-color:#c8d3cc;background:#fff}.measure-item.active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(13,107,71,.10);background:#fff}.measure-head{display:flex;justify-content:space-between;gap:8.8px;align-items:start}.measure-main{min-width:0}.measure-title{font-size:13.2px;font-weight:800;overflow-wrap:anywhere}.measure-value{font-size:12.1px;color:var(--accent);font-weight:800;margin-top:3.3px}.measure-meta{font-size:11px;color:var(--muted);margin-top:4.4px}.measure-actions{display:flex;gap:4.4px;flex:0 0 auto}.icon-btn{width:26.4px;height:26.4px;border-radius:7.7px;padding:0;margin:0;font-size:15.4px;line-height:1;background:#eef1ee;color:var(--ink)}.icon-btn.delete{background:#f8ecea;color:var(--danger)}.icon-btn.measurement-repeat{width:auto;min-width:30.8px;padding:0 5.5px;font-size:10.45px;font-weight:850;color:var(--muted)}.icon-btn.measurement-repeat.active{background:rgba(13,107,71,.11);color:var(--accent)}.edit-row{display:flex;gap:6.6px;margin-top:8.8px}.edit-row input{width:100%;border:1px solid #dce2dd;background:#fff;border-radius:8.8px;padding:7.7px 8.8px;color:var(--ink);font-size:12.1px}.edit-row button{width:auto;margin:0;padding:7.7px 9.9px;font-size:11px;border-radius:8.8px}.measurement-item-head{align-items:center;gap:5.5px}.measurement-item-title{min-width:0;flex:1;line-height:1.18}.measurement-item-head .measure-actions{margin-left:auto}.measurement-item-value{width:100%;margin-top:5.5px;line-height:1.25}.measurement-item-meta{width:100%;margin-top:3.3px;line-height:1.25}
.footer-note{font-size:11px;color:var(--muted);line-height:1.45;padding:2px 3.3px 8.8px}.footer-disclaimer{font-size:11px;color:#7a4d42;line-height:1.45;padding:8.8px 9.9px;margin:0 0 11px;border:1px solid #ead9d3;border-radius:11px;background:#fbf4f1}.hint-inline{font-size:11px;color:var(--muted);line-height:1.4;margin:3.3px 2px 7.7px}.context-warning{font-size:11px;line-height:1.45;color:#7a4d42;background:#fbf4f1;border:1px solid #ead9d3;border-radius:9.9px;padding:7.7px 8.8px;margin-top:7.7px}.kbd{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#eef1ee;border:1px solid #dde2de;border-radius:5.5px;padding:1px 4.4px}.help-modal{display:none;position:fixed;inset:0;z-index:1100;background:rgba(20,28,24,.72);padding:26.4px;align-items:center;justify-content:center}.help-dialog{width:min(836px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:17.6px;box-shadow:0 19.8px 66px rgba(0,0,0,.35)}.help-head{position:sticky;top:0;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:13.2px;padding:15.4px 19.8px;border-bottom:1px solid var(--line);z-index:1}.help-head h2{font-size:19.8px;margin:0}.help-close{width:auto;margin:0;padding:7.7px 12.1px}.help-body{padding:19.8px}.help-body h3{font-size:14.3px;margin:19.8px 0 7.7px}.help-body h3:first-child{margin-top:0}.help-body p,.help-body li{font-size:13.2px;line-height:1.55;color:#465049}.help-body ol,.help-body ul{padding-left:22px;margin:7.7px 0}.help-notice{padding:13.2px 14.3px;border:1px solid #ead9d3;border-radius:12.1px;background:#fbf4f1;color:#5e3d35}.help-notice strong{color:#3c2924}.support-dialog{width:min(506px,94vw)}.support-body{padding:19.8px}.support-body p{margin:0 0 15.4px;font-size:13.2px;line-height:1.55;color:#465049}.support-email{display:flex;align-items:center;justify-content:space-between;gap:11px;padding:12.1px 13.2px;border:1px solid var(--line);border-radius:12.1px;background:#fafbfa;font-size:14.3px;font-weight:800;color:var(--ink);overflow-wrap:anywhere}.support-actions{display:flex;gap:8.8px;margin-top:13.2px}.support-actions button{width:auto;margin:0;flex:1}.support-copy-status{min-height:19.8px;margin-top:8.8px;font-size:11px;color:var(--accent)}.duplicate-dialog{width:min(528px,94vw)}.duplicate-body{padding:19.8px}.duplicate-body p{margin:0 0 15.4px;font-size:13.2px;line-height:1.55;color:#465049}.duplicate-options{display:grid;gap:8.8px}.duplicate-options button{margin:0;padding:12.1px 13.2px;justify-content:flex-start;text-align:left}.duplicate-options button span{display:block}.duplicate-options button small{display:block;margin-top:3.3px;font-size:11px;font-weight:600;color:var(--muted);line-height:1.4}.duplicate-options .primary small{color:rgba(255,255,255,.82)}.measurement-group-delete-body{padding:19.8px}.measurement-group-delete-body p{margin:0 0 13.2px;font-size:13.2px;line-height:1.55;color:#465049}.measurement-group-delete-actions{display:flex;justify-content:flex-end;gap:8.8px;margin-top:15.4px}.measurement-group-delete-actions button{width:auto;margin:0}.measurement-group-delete-actions .primary:disabled{opacity:.62;color:#fff;background:var(--accent)}@media(max-width:990px){}
@media(max-width:1210px){.app{grid-template-columns:264px minmax(0,1fr) 308px}.app.measure-collapsed{grid-template-columns:264px minmax(0,1fr) 41.8px}}
@media(max-width:1210px){.privacy{display:none}.header-project-fields{flex-basis:396px}.header-project-field{flex-basis:242px}.header-project-order{flex-basis:143px}}@media(max-width:990px){.app{grid-template-columns:242px minmax(0,1fr)}.measure-panel{display:none}.privacy{display:none}.brand-wrap{gap:8.8px}.brand-logo{width:39.6px;height:39.6px;flex-basis:39.6px}.title{font-size:19.8px}.subtitle{font-size:11px}.header-project-fields{flex:1 1 auto}.header-project-field{min-width:132px}.header-project-order{min-width:115.5px}}

.pdf-modal{display:none;position:fixed;inset:0;z-index:1200;background:rgba(20,28,24,.76);padding:22px;align-items:center;justify-content:center}.pdf-dialog{width:min(1364px,98vw);height:min(990px,95vh);display:flex;flex-direction:column;background:#fff;border-radius:17.6px;overflow:hidden;box-shadow:0 22px 77px rgba(0,0,0,.38)}.pdf-head,.pdf-foot{display:flex;align-items:center;gap:11px;padding:13.2px 17.6px;border-color:var(--line);background:#fff}.pdf-head{justify-content:space-between;border-bottom:1px solid var(--line)}.pdf-head strong{font-size:16.5px}.pdf-head button,.pdf-foot button{width:auto;margin:0}.pdf-body{flex:1;min-height:0;display:grid;grid-template-columns:253px minmax(0,1fr);background:#dfe3df}.pdf-controls{padding:14.3px;background:#fff;border-right:1px solid var(--line);overflow:auto}.pdf-controls .field:first-child{margin-top:0}.pdf-preview-area{position:relative;min-width:0;min-height:0;overflow:auto;padding:19.8px;display:flex;align-items:flex-start;justify-content:center}.pdf-stage{position:relative;display:inline-block;line-height:0;box-shadow:0 3.3px 19.8px rgba(0,0,0,.22);background:#fff;user-select:none;touch-action:none}.pdf-stage canvas{display:block;width:auto;height:auto;max-width:none;cursor:crosshair}.pdf-selection{display:none;position:absolute;border:2px solid #0d6b47;background:rgba(13,107,71,.12);box-shadow:0 0 0 109998.9px rgba(20,28,24,.16)}.pdf-selection.movable{cursor:move}.pdf-selection.resizing{cursor:grabbing}.pdf-selection-handle{position:absolute;width:11px;height:11px;border-radius:50%;background:#0d6b47;border:2px solid #fff;box-shadow:0 1px 3.3px rgba(0,0,0,.25)}.pdf-selection-handle.nw{left:-6.6px;top:-6.6px;cursor:nwse-resize}.pdf-selection-handle.ne{right:-6.6px;top:-6.6px;cursor:nesw-resize}.pdf-selection-handle.se{right:-6.6px;bottom:-6.6px;cursor:nwse-resize}.pdf-selection-handle.sw{left:-6.6px;bottom:-6.6px;cursor:nesw-resize}.pdf-selection-handle.n{left:calc(50% - 5.5px);top:-6.6px;cursor:ns-resize}.pdf-selection-handle.s{left:calc(50% - 5.5px);bottom:-6.6px;cursor:ns-resize}.pdf-selection-handle.e{right:-6.6px;top:calc(50% - 5.5px);cursor:ew-resize}.pdf-selection-handle.w{left:-6.6px;top:calc(50% - 5.5px);cursor:ew-resize}.pdf-foot{justify-content:space-between;border-top:1px solid var(--line);flex-wrap:wrap}.pdf-foot-left,.pdf-foot-right{display:flex;gap:8.8px;align-items:center;flex-wrap:wrap}.pdf-status{font-size:12.1px;line-height:1.45;color:var(--muted)}.pdf-page-row{display:grid;grid-template-columns:37.4px 1fr 37.4px;gap:6.6px;align-items:center}.pdf-page-row button{width:37.4px;height:37.4px;margin:0;padding:0}.pdf-page-row input{text-align:center}.pdf-selection-info{margin-top:8.8px;padding:8.8px 9.9px;border-radius:9.9px;background:var(--soft);font-size:12.1px;line-height:1.45;color:var(--accent)}.pdf-zoom-row{display:grid;grid-template-columns:37.4px 1fr 37.4px;gap:6.6px;align-items:center}.pdf-zoom-row button{width:37.4px;height:37.4px;margin:0;padding:0}.pdf-zoom-value{text-align:center;font-size:12.1px;font-weight:800;color:var(--ink);padding:0 6.6px}
@media(max-width:836px){.pdf-body{grid-template-columns:1fr}.pdf-controls{border-right:0;border-bottom:1px solid var(--line);max-height:242px}.pdf-dialog{height:96vh}.pdf-foot{align-items:stretch}.pdf-foot-left,.pdf-foot-right{width:100%}.pdf-foot-right button{flex:1}}
.crop-actions{display:none;grid-template-columns:1fr 1fr;gap:7.7px;margin-top:5.5px}.crop-actions.visible{display:grid}.crop-selection-note{display:none;margin-top:6.6px;font-size:11px;line-height:1.4;color:var(--muted)}.crop-selection-note.visible{display:block}.preview-crop-stage{position:relative;display:inline-block;max-width:100%;max-height:100%;line-height:0;user-select:none}.preview-crop-stage.crop-active{cursor:crosshair}.preview-crop-selection{display:none;position:absolute;border:2px solid #d04444;background:rgba(208,68,68,.08);box-shadow:0 0 0 109998.9px rgba(20,28,24,.12);pointer-events:none}.preview-crop-selection.visible{display:block}.preview-crop-hint{position:absolute;left:50%;top:11px;transform:translateX(-50%);display:none;padding:6.6px 9.9px;border-radius:8.8px;background:rgba(255,255,255,.94);border:1px solid var(--line);font-size:11px;font-weight:750;color:var(--ink);white-space:nowrap;z-index:2}.preview-crop-stage.crop-active .preview-crop-hint{display:block}.preview-crop-button.active{outline:2px solid var(--accent);outline-offset:1px;background:var(--soft);color:var(--accent)}
.save-overlay{display:none;position:fixed;inset:0;z-index:1500;background:rgba(243,245,242,.72);backdrop-filter:blur(2px);align-items:center;justify-content:center}.save-overlay.visible{display:flex}.save-overlay-card{display:flex;align-items:center;gap:13.2px;padding:15.4px 19.8px;background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:15.4px;box-shadow:0 13.2px 39.6px rgba(20,35,26,.16);font-size:14.3px;font-weight:800;color:var(--ink)}.save-overlay-copy{display:flex;flex-direction:column;gap:3.3px;max-width:min(572px,72vw)}.save-overlay-hint{display:none;font-size:12.1px;line-height:1.4;font-weight:600;color:var(--muted)}.save-overlay-hint.visible{display:block}.save-spinner{width:22px;height:22px;border:3.3px solid #d7e8de;border-top-color:var(--accent);border-radius:50%;animation:save-spin .8s linear infinite}@keyframes save-spin{to{transform:rotate(360deg)}}

/* Univerzální dialogy JustMeasure – náhrada browserových alert/confirm/prompt. */
.jm-dialog-overlay{display:none;position:fixed;inset:0;z-index:2100;background:rgba(20,28,24,.72);padding:26.4px;align-items:center;justify-content:center;backdrop-filter:blur(2px)}
.jm-dialog-overlay.visible{display:flex}
.jm-dialog{width:min(550px,94vw);max-height:88vh;overflow:auto;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:17.6px;box-shadow:0 19.8px 66px rgba(0,0,0,.35)}
.jm-dialog-head{padding:16.5px 19.8px 11px;font-size:17.6px;font-weight:850;letter-spacing:-.01em}
.jm-dialog-body{padding:3.3px 19.8px 17.6px}
.jm-dialog-message{font-size:13.2px;line-height:1.55;color:#465049;white-space:pre-wrap;overflow-wrap:anywhere}
.jm-dialog-input{margin-top:13.2px;width:100%;border:1px solid #dce2dd;background:#fff;border-radius:11px;padding:11px 12.1px;color:var(--ink);font-size:14.3px}
.jm-dialog-actions{display:flex;justify-content:flex-end;gap:8.8px;padding:13.2px 19.8px 17.6px;border-top:1px solid var(--line)}
.jm-dialog-actions button{width:auto;min-width:90.2px;margin:0;padding:8.8px 14.3px}
.jm-dialog-actions .jm-dialog-confirm.danger{background:#9a3327;color:#fff}
html[data-theme="dark"] .jm-dialog{background:#1d2420;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .jm-dialog-message{color:#bdc7c1}
html[data-theme="dark"] .jm-dialog-input{background:#171d19;border-color:#3a463f;color:var(--ink)}
html[data-theme="dark"] .jm-dialog-actions{border-color:var(--line)}
html[data-theme="dark"] .jm-dialog-actions .jm-dialog-confirm.danger{background:#9a4037;color:#fff}

/* Dark mode ovlivňuje pouze rozhraní. Canvas s výkresem ani PNG export se nemění. */
.theme-icon .icon-sun{display:none}.theme-icon .icon-moon{display:block}
html[data-theme="dark"]{color-scheme:dark;--bg:#151a17;--card:#1d2420;--ink:#edf2ef;--muted:#9ba79f;--line:#343e38;--soft:#25372e;--danger:#e8897d}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .top,html[data-theme="dark"] .tabsbar,html[data-theme="dark"] .sidebar,html[data-theme="dark"] .measure-panel{background:#1d2420;border-color:var(--line)}
html[data-theme="dark"] .drawing-tab{background:#242c27;border-color:var(--line)}
html[data-theme="dark"] .drawing-tab.active{background:var(--soft);border-color:#78c4a4;box-shadow:0 0 0 1px rgba(120,196,164,.18)}html[data-theme="dark"] .drawing-tab.active .tab-main{color:#78c4a4}html[data-theme="dark"] .measure-value{color:#78c4a4}
html[data-theme="dark"] .tab-close:hover{background:#402a28;color:#f0a096}
html[data-theme="dark"] .add-tab,html[data-theme="dark"] .quick-new,html[data-theme="dark"] .quick-load,html[data-theme="dark"] .quick-save,html[data-theme="dark"] .quick-export{background:#202722;border-color:#46524b;color:#78c4a4}html[data-theme="dark"] .tabs-nav-button{background:transparent;color:#9ba79f}html[data-theme="dark"] .tabs-nav-button:hover:not(:disabled),html[data-theme="dark"] .tabs-menu-toggle[aria-expanded="true"]{background:#25372e;color:#78c4a4}html[data-theme="dark"] .tabs-menu{background:#202722;border-color:#46524b;box-shadow:0 11px 35.2px rgba(0,0,0,.36)}html[data-theme="dark"] .tabs-menu-item{background:transparent;color:var(--ink)}html[data-theme="dark"] .tabs-menu-item:hover,html[data-theme="dark"] .tabs-menu-item.active{background:#25372e;color:#78c4a4}
html[data-theme="dark"] .top-icon{background:#25372e;border-color:#365443;color:#78c4a4}
html[data-theme="dark"] .top-icon:hover{background:#2c4437}
html[data-theme="dark"] .theme-icon .icon-moon{display:none}html[data-theme="dark"] .theme-icon .icon-sun{display:block}
html[data-theme="dark"] .group{border-color:var(--line)}
html[data-theme="dark"] button,html[data-theme="dark"] .filebtn{background:#2a322d;color:var(--ink)}
html[data-theme="dark"] button.primary,html[data-theme="dark"] .filebtn.primary{background:var(--accent);color:#fff}
html[data-theme="dark"] button.danger{background:#402a28;color:#f0a096}
html[data-theme="dark"] button.active{background:var(--soft);color:#78c4a4}
html[data-theme="dark"] input[type=text],html[data-theme="dark"] input[type=number],html[data-theme="dark"] select{background:#171d19;border-color:#3a463f;color:var(--ink)}
html[data-theme="dark"] .cal-edit input,html[data-theme="dark"] .edit-row input{background:#171d19;border-color:#3a463f;color:var(--ink)}
html[data-theme="dark"] .hint{background:var(--soft);color:#8dd0b3}
html[data-theme="dark"] .context-warning,html[data-theme="dark"] .footer-disclaimer{background:#352824;border-color:#594039;color:#d7aca2}
html[data-theme="dark"] .kbd{background:#2b332e;border-color:#3d4942}
html[data-theme="dark"] .info-tooltip{background:#232b26;border-color:#3c4b43;color:var(--ink);box-shadow:0 8.8px 26.4px rgba(0,0,0,.35)}
html[data-theme="dark"] .info-tooltip::before{background:#232b26;border-color:#3c4b43}
html[data-theme="dark"] .tool-dock{background:rgba(29,36,32,.96);border-color:var(--line);box-shadow:0 8.8px 26.4px rgba(0,0,0,.28)}
html[data-theme="dark"] .tool-dock button{background:#28302b;color:#a6b0aa}
html[data-theme="dark"] .tool-dock button:hover:not(:disabled){background:#333d37;color:#e2e8e4}
html[data-theme="dark"] .tool-dock button.active{background:var(--soft);color:#78c4a4}html[data-theme="dark"] .tool-dock button.toggle-on:not(.active){background:var(--soft);color:#78c4a4;box-shadow:inset 0 0 0 1px rgba(120,196,164,.28)}html[data-theme="dark"] .tool-dock button.toggle-on:not(.active)::after{background:#78c4a4;box-shadow:0 0 0 2px var(--soft)}
html[data-theme="dark"] .tool-separator,html[data-theme="dark"] .segment-mode{border-color:var(--line)}
html[data-theme="dark"] .empty-card{background:rgba(29,36,32,.94);border-color:var(--line);box-shadow:0 13.2px 44px rgba(0,0,0,.22)}
html[data-theme="dark"] .measure-item{background:#202722;border-color:var(--line)}
html[data-theme="dark"] .measure-item:hover,html[data-theme="dark"] .measure-item.active{background:#252e28}
html[data-theme="dark"] .icon-btn{background:#303933;color:var(--ink)}
html[data-theme="dark"] .icon-btn.delete{background:#402a28;color:#f0a096}
html[data-theme="dark"] .panel-toggle{background:#2b332e;color:var(--ink)}
html[data-theme="dark"] .help-dialog,html[data-theme="dark"] .help-head{background:#1d2420;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .help-body p,html[data-theme="dark"] .help-body li,html[data-theme="dark"] .support-body p,html[data-theme="dark"] .duplicate-body p,html[data-theme="dark"] .measurement-group-delete-body p{color:#bdc7c1}
html[data-theme="dark"] .help-notice{background:#352824;border-color:#594039;color:#d7aca2}
html[data-theme="dark"] .help-notice strong{color:#f0d3cc}
html[data-theme="dark"] .support-email{background:#202722;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] 
html[data-theme="dark"] 
html[data-theme="dark"] 
html[data-theme="dark"] .pdf-dialog,html[data-theme="dark"] .pdf-head,html[data-theme="dark"] .pdf-foot,html[data-theme="dark"] .pdf-controls{background:#1d2420;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .pdf-preview-area{background:#161b18}
html[data-theme="dark"] .pdf-selection-info{background:var(--soft);color:#8dd0b3}
html[data-theme="dark"] .save-overlay{background:rgba(21,26,23,.72)}
html[data-theme="dark"] .save-overlay-card{background:rgba(29,36,32,.98);border-color:var(--line);color:var(--ink);box-shadow:0 13.2px 39.6px rgba(0,0,0,.35)}
.license-startup-overlay{position:fixed;inset:0;z-index:2200;background:rgba(243,245,242,.82);backdrop-filter:blur(3.3px);display:flex;align-items:center;justify-content:center;padding:26.4px;box-sizing:border-box;cursor:wait}.license-startup-overlay[hidden]{display:none!important}.license-startup-card{display:flex;align-items:center;gap:15.4px;max-width:min(506px,92vw);padding:19.8px 22px;background:rgba(255,255,255,.98);border:1px solid var(--line);border-radius:17.6px;box-shadow:0 17.6px 52.8px rgba(20,35,26,.18);color:var(--ink)}.license-startup-spinner{flex:0 0 auto;width:26.4px;height:26.4px;border:3.3px solid #d7e8de;border-top-color:var(--accent);border-radius:50%;animation:save-spin .8s linear infinite}.license-startup-copy{display:grid;gap:4.4px}.license-startup-copy strong{font-size:15.4px;line-height:1.35}.license-startup-copy span{font-size:13.2px;line-height:1.45;color:var(--muted)}
html[data-theme="dark"] .license-startup-overlay{background:rgba(21,26,23,.82)}html[data-theme="dark"] .license-startup-card{background:rgba(29,36,32,.98);border-color:var(--line);box-shadow:0 17.6px 52.8px rgba(0,0,0,.4)}

html[data-theme="dark"] #perspectivePreviewModal>div{background:#1d2420!important;color:var(--ink)}
html[data-theme="dark"] #perspectivePreviewModal>div>div:first-child,html[data-theme="dark"] #perspectivePreviewModal>div>div:last-child{border-color:var(--line)!important}
html[data-theme="dark"] #perspectivePreviewModal>div>div:nth-child(2){background:#161b18!important}

.calibration-axis{margin-top:8.8px;padding-top:7.7px;border-top:1px solid var(--line)}.calibration-axis:first-of-type{margin-top:7.7px}.cal-axis-head{display:flex;align-items:center;justify-content:space-between;gap:8.8px;margin-bottom:5.5px}.cal-axis-title{font-size:12.1px;font-weight:850;color:var(--ink)}.cal-axis-summary{font-size:11px;color:var(--muted);text-align:right}.cal-ref-list{display:grid;gap:5.5px}.cal-ref{display:grid;grid-template-columns:30.8px minmax(94.6px,1fr) 22px 28.6px;grid-template-areas:'label value toggle delete' 'label dev dev dev';gap:4.4px 6.6px;align-items:center;padding:6.6px;border:1px solid var(--line);border-radius:9.9px;background:#fafbfa}.cal-ref.outlier{border-color:#d59a79;background:#fff7f2}.cal-ref.inconsistent{border-color:#d8b65f;background:#fffaf0}.cal-ref.disabled{opacity:.52}.cal-ref-label{grid-area:label;font-size:11px;font-weight:850;color:var(--accent);text-align:center}.cal-ref.outlier .cal-ref-label{color:#a34d2c}.cal-ref.inconsistent .cal-ref-label{color:#8b6a13}.cal-ref input[type=number]{grid-area:value;min-width:0;padding:7.7px 8.8px;border-radius:7.7px;font-size:12.1px}.cal-ref-dev{grid-area:dev;font-size:9.9px;color:var(--muted);text-align:left;white-space:nowrap}.cal-ref button{width:28.6px;height:30.8px;margin:0;padding:0;border-radius:7.7px;font-size:13.2px}.cal-ref .cal-delete{grid-area:delete;background:#f8ecea;color:var(--danger)}.cal-toggle-check{grid-area:toggle;display:grid;place-items:center;margin:0;cursor:pointer}.cal-toggle-check input{width:17.6px;height:17.6px;margin:0;accent-color:var(--accent);cursor:pointer}.cal-quality{margin-top:6.6px;font-size:11px;line-height:1.4;color:var(--muted)}.cal-quality.warn{color:#8b6a13}.cal-quality.bad{color:#a34d2c}.icon-btn.visibility svg{width:16.5px;height:16.5px;display:block;fill:currentColor}.measure-item.measure-hidden{opacity:.62}.measure-item.measure-hidden .measure-title{text-decoration:line-through;text-decoration-thickness:1px}html[data-theme="dark"] .cal-ref{background:#171d19}html[data-theme="dark"] .cal-ref.outlier{background:#2b1d18;border-color:#8f5a42}html[data-theme="dark"] .cal-ref.inconsistent{background:#292417;border-color:#7c692d}html[data-theme="dark"] .cal-ref-label{color:#78c4a4}




/* Unified range slider styling for both light and dark mode */
input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  height:19.8px;
  background:transparent;
}
input[type="range"]::-webkit-slider-runnable-track{
  height:4.4px;
  background:#d6d8d7;
  border-radius:1098.9px;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:17.6px;
  height:17.6px;
  margin-top:-6.6px;
  border:2px solid #202524;
  border-radius:50%;
  background:#202524;
  box-shadow:0 0 0 2px rgba(32,37,36,.08);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb{
  background:#202524;
  border-color:#202524;
  box-shadow:0 0 0 3.3px rgba(32,37,36,.14);
}
input[type="range"]::-moz-range-track{
  height:4.4px;
  background:#d6d8d7;
  border-radius:1098.9px;
}
input[type="range"]::-moz-range-progress{
  height:4.4px;
  background:#202524;
  border-radius:1098.9px;
}
input[type="range"]::-moz-range-thumb{
  width:17.6px;
  height:17.6px;
  border:2px solid #202524;
  border-radius:50%;
  background:#202524;
  box-shadow:0 0 0 2px rgba(32,37,36,.08);
}
input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:focus::-moz-range-thumb{
  background:#202524;
  border-color:#202524;
  box-shadow:0 0 0 3.3px rgba(32,37,36,.14);
}

/* Dark-mode range slider fix: explicit custom track + thumb */
html[data-theme="dark"] input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  height:19.8px;
  background:transparent;
  accent-color:#78c4a4;
}
html[data-theme="dark"] input[type="range"]::-webkit-slider-runnable-track{
  height:4.4px;
  background:#5f6b65;
  border-radius:1098.9px;
}
html[data-theme="dark"] input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:17.6px;
  height:17.6px;
  margin-top:-6.6px;
  border:2px solid #78c4a4;
  border-radius:50%;
  background:#78c4a4;
  box-shadow:0 0 0 2px rgba(120,196,164,.12);
}
html[data-theme="dark"] input[type="range"]:hover::-webkit-slider-thumb,
html[data-theme="dark"] input[type="range"]:focus::-webkit-slider-thumb{
  background:#78c4a4;
  border-color:#78c4a4;
  box-shadow:0 0 0 3.3px rgba(120,196,164,.20);
}
html[data-theme="dark"] input[type="range"]::-moz-range-track{
  height:4.4px;
  background:#5f6b65;
  border-radius:1098.9px;
}
html[data-theme="dark"] input[type="range"]::-moz-range-progress{
  height:4.4px;
  background:#78c4a4;
  border-radius:1098.9px;
}
html[data-theme="dark"] input[type="range"]::-moz-range-thumb{
  width:17.6px;
  height:17.6px;
  border:2px solid #78c4a4;
  border-radius:50%;
  background:#78c4a4;
  box-shadow:0 0 0 2px rgba(120,196,164,.12);
}
html[data-theme="dark"] input[type="range"]:hover::-moz-range-thumb,
html[data-theme="dark"] input[type="range"]:focus::-moz-range-thumb{
  background:#78c4a4;
  border-color:#78c4a4;
  box-shadow:0 0 0 3.3px rgba(120,196,164,.20);
}



.rotation-row{display:grid;grid-template-columns:minmax(0,1fr) 63.8px 39.6px;gap:7.7px;align-items:end}
.rotation-row .field{margin-top:8.8px}.rotation-apply-btn{height:39.6px;padding:0 8.8px;margin:0;font-size:11px}
.rotation-center-btn{width:39.6px;height:39.6px;padding:0;margin:0;border:1px solid var(--line);border-radius:9.9px;background:#edf0ed;color:var(--ink)}
.rotation-center-btn svg{width:22px;height:22px;display:block;fill:currentColor}
.rotation-center-btn:hover:not(:disabled){background:var(--soft);color:var(--accent)}
.rotation-center-btn.active{outline:2px solid var(--accent);outline-offset:1px;background:var(--soft);color:var(--accent)}
.rotation-center-reset{margin-top:5.5px}
html[data-theme="dark"] .rotation-center-btn{background:#29332e;color:#dfe7e2;border-color:#425048}
html[data-theme="dark"] .rotation-center-btn:hover:not(:disabled),
html[data-theme="dark"] .rotation-center-btn.active{background:#31443a;color:#78c4a4;border-color:#78c4a4}



/* Unified custom checkboxes */
input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  width:19.8px;
  height:19.8px;
  min-width:19.8px;
  margin:0;
  border:0;
  border-radius:3.3px;
  background-color:transparent;
  background-repeat:no-repeat;
  background-position:center;
  background-size:19.8px 19.8px;
  cursor:pointer;
  vertical-align:middle;
  opacity:1;
  --checkbox-icon:#6c756f;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%236c756f' d='M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Z'/%3E%3C/svg%3E");
}
input[type="checkbox"]:checked{
  --checkbox-icon:#0d6b47;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%230d6b47' d='M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q8 0 15 1.5t14 4.5l-74 74H200v560h560v-266l80-80v346q0 33-23.5 56.5T760-120H200Zm261-160L235-506l56-56 170 170 367-367 57 55-424 424Z'/%3E%3C/svg%3E");
}
input[type="checkbox"]:hover:not(:disabled){
  filter:brightness(.88);
}
input[type="checkbox"]:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
input[type="checkbox"]:disabled{
  cursor:not-allowed;
  opacity:.42;
}
html[data-theme="dark"] input[type="checkbox"]{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%239ba7a0' d='M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Z'/%3E%3C/svg%3E");
}
html[data-theme="dark"] input[type="checkbox"]:checked{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='%2378c4a4' d='M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q8 0 15 1.5t14 4.5l-74 74H200v560h560v-266l80-80v346q0 33-23.5 56.5T760-120H200Zm261-160L235-506l56-56 170 170 367-367 57 55-424 424Z'/%3E%3C/svg%3E");
}


/* 0.3.1-alpha: keep left-panel info tooltips fully inside the scrollable sidebar. */
.sidebar .info-tooltip{position:fixed;top:0;left:0;right:auto;width:264px;max-width:calc(100vw - 26.4px);z-index:120;transform:translateY(-3.3px)}
.sidebar .info-help:hover .info-tooltip,.sidebar .info-help:focus-within .info-tooltip,.sidebar .info-help.open .info-tooltip{transform:translateY(0)}
.sidebar .info-tooltip::before{top:7.7px;left:-5.5px;right:auto}

/* i18n language selector */
.language-select{width:auto;min-width:118.8px;border:1px solid var(--line);background:var(--soft);border-radius:9.9px;padding:6.6px 8.8px;color:var(--ink);font-size:12.1px;font-weight:750}.language-select option:disabled{color:var(--muted)}html[data-theme="dark"] .language-select{background:#25372e;border-color:#365443;color:var(--ink)}

/* Undo / Redo controls */
.tabs-separator{width:1px;height:24.2px;flex:0 0 1px;background:var(--line);margin:0 1px}
.history-action{width:33px;height:33px;flex:0 0 auto;padding:0;margin:0;border:1px solid var(--line);border-radius:9.9px;background:#fff;color:var(--accent)}
.history-action svg{width:19.8px;height:19.8px;display:block;fill:currentColor}
.history-action:hover:not(:disabled){background:var(--soft)}
.history-action:disabled{opacity:.32;cursor:not-allowed}
.history-action.history-busy{opacity:.5}
html[data-theme="dark"] .history-action{background:#202722;border-color:#46524b;color:#78c4a4}
html[data-theme="dark"] .history-action:hover:not(:disabled){background:var(--soft)}
html[data-theme="dark"] .tabs-separator{background:var(--line)}
.tabs-zoom-controls{display:flex;align-items:center;gap:4.4px;flex:0 0 auto}
.zoom-action,.zoom-fit-action{height:33px;flex:0 0 auto;padding:0;margin:0;border:1px solid var(--line);border-radius:9.9px;background:#fff;color:var(--accent)}
.zoom-action{width:33px}
.zoom-action svg{width:19.8px;height:19.8px;display:block;fill:currentColor}
.zoom-fit-action{width:auto;padding:0 9.9px;font-size:11px;font-weight:750;color:var(--ink)}
.zoom-action:hover,.zoom-fit-action:hover{background:var(--soft)}
html[data-theme="dark"] .zoom-action,html[data-theme="dark"] .zoom-fit-action{background:#202722;border-color:#46524b;color:#78c4a4}
html[data-theme="dark"] .zoom-fit-action{color:var(--ink)}
html[data-theme="dark"] .zoom-action:hover,html[data-theme="dark"] .zoom-fit-action:hover{background:var(--soft)}

/* Pro 0.9.1.3-alpha — bottom operation timeline. It overlays the viewport so canvas coordinates stay unchanged. */
.timeline{position:absolute;z-index:26;left:11px;right:11px;bottom:11px;height:52.8px;display:flex;align-items:center;border:1px solid var(--line);border-radius:13.2px;background:rgba(255,255,255,.96);box-shadow:0 8.8px 26.4px rgba(20,35,26,.13);backdrop-filter:blur(8.8px);transition:height .16s ease,opacity .16s ease}
.timeline-toggle{width:35.2px;min-width:35.2px;height:50.6px;margin:0;padding:0;border:0;border-right:1px solid var(--line);border-radius:12.1px 0 0 12.1px;background:transparent;color:var(--muted);font-size:19.8px;display:grid;place-items:center}
.timeline-toggle:hover{background:var(--soft);color:var(--accent)}
.timeline-toggle-icon{width:22px;height:22px;display:block;fill:currentColor;pointer-events:none}
.timeline-expand-icon{display:none}
.timeline-scroll{min-width:0;flex:1;height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;display:flex;align-items:center}
.timeline-track{min-height:100%;display:flex;align-items:center;gap:0;padding:5.5px 8.8px;min-width:max-content;box-sizing:border-box}
.timeline-item{height:39.6px;width:auto!important;min-width:0;max-width:209px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:6.6px;margin:0;padding:0 11px 0 8.8px;border:1px solid var(--line);border-radius:9.9px;background:#f7f8f7;color:var(--ink);font-size:11px;font-weight:750;white-space:nowrap;cursor:pointer;box-sizing:border-box}
.timeline-icon{width:20.9px;height:20.9px;flex:0 0 20.9px;color:var(--accent)}
.timeline-icon svg{width:100%;height:100%;display:block;fill:currentColor}
.timeline-label{display:block;min-width:0;max-width:165px;overflow:hidden;text-overflow:ellipsis}
.timeline-separator{width:24.2px;min-width:24.2px;height:39.6px;display:grid;place-items:center;flex:0 0 24.2px;color:#a7afa9;font-size:17.6px;font-weight:700;line-height:1;pointer-events:none;user-select:none}
.timeline-item.timeline-future{opacity:.38;border-style:dashed}
.timeline-item.timeline-current{border-color:var(--accent);box-shadow:0 0 0 1px rgba(13,107,71,.12);background:var(--soft)}
.timeline-item.timeline-import{background:#fff}
.timeline-item:hover{border-color:#8ebaa8;background:#f0f6f3}
.timeline-item.timeline-selected{border-color:var(--accent);box-shadow:0 0 0 2px rgba(13,107,71,.18);background:#eaf5ef}
.timeline-item.timeline-future.timeline-selected{opacity:.72}
.timeline-empty{height:39.6px;display:flex;align-items:center;padding:0 8.8px;color:var(--muted);font-size:11px}
.timeline.collapsed{left:11px;right:auto;width:37.4px;height:35.2px}
.timeline.collapsed .timeline-scroll{display:none}
.timeline.collapsed .timeline-toggle{width:35.2px;min-width:35.2px;height:33px;border-right:0;border-radius:12.1px}
.timeline.collapsed .timeline-collapse-icon{display:none}
.timeline.collapsed .timeline-expand-icon{display:block}
html[data-theme="dark"] .timeline{background:rgba(29,36,32,.96);border-color:var(--line);box-shadow:0 8.8px 26.4px rgba(0,0,0,.28)}
html[data-theme="dark"] .timeline-item{background:#202722;border-color:#46524b;color:var(--ink)}
html[data-theme="dark"] .timeline-item.timeline-current{background:#25372e;border-color:#78c4a4;box-shadow:0 0 0 1px rgba(120,196,164,.12)}
html[data-theme="dark"] .timeline-item.timeline-import{background:#1d2420}
html[data-theme="dark"] .timeline-item:hover{background:#26342d;border-color:#608b76}
html[data-theme="dark"] .timeline-item.timeline-selected{background:#294235;border-color:#78c4a4;box-shadow:0 0 0 2px rgba(120,196,164,.16)}
html[data-theme="dark"] .timeline-icon{color:#78c4a4}

/* Pro 0.9.1.3-alpha — compact read-only timeline inspector modal. */
.timeline-inspector-dialog{width:min(462px,94vw)}
.timeline-inspector-modal-head{position:static}
.timeline-inspector-title-wrap{display:flex;align-items:center;gap:11px;min-width:0}
.timeline-inspector-title-wrap h2{font-size:16.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.timeline-inspector-icon{width:26.4px;height:26.4px;flex:0 0 26.4px;color:var(--accent)}
.timeline-inspector-icon svg{width:100%;height:100%;display:block;fill:currentColor}
.timeline-inspector-body{padding:15.4px 17.6px 17.6px}
.timeline-inspector-params{display:grid;gap:6.6px}
.timeline-inspector-row{display:grid;grid-template-columns:minmax(115.5px,.9fr) minmax(0,1.2fr);gap:11px;align-items:center;padding:7.7px 9.9px;border-radius:8.8px;background:#f6f8f7;font-size:12.1px}
.timeline-inspector-key{color:var(--muted);font-weight:700}
.timeline-inspector-value{color:var(--ink);font-weight:750;overflow-wrap:anywhere;text-align:right}
.timeline-inspector-note{margin-top:11px;font-size:11px;line-height:1.4;color:var(--muted)}
html[data-theme="dark"] .timeline-inspector-row{background:#202722}

/* Pro 0.9.1.3-alpha — Mesh Warp / inverse envelope. */
.mesh-warp-setup{margin-top:8.8px;padding:9.9px;border:1px solid var(--border,#d8ddd9);border-radius:8.8px;background:rgba(13,107,71,.035)}
.mesh-warp-density-grid{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7.7px;align-items:end}.mesh-warp-times{align-self:end;padding:0 0 9.9px;font-weight:800;color:var(--muted)}
.mesh-warp-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5.5px}.mesh-warp-actions button{min-width:0;padding-left:5.5px;padding-right:5.5px;overflow-wrap:anywhere}.mesh-preview-card{width:min(1210px,94vw);height:min(900px,94vh);max-height:94vh;display:flex;flex-direction:column;overflow:hidden}.mesh-preview-head{display:flex;align-items:center;justify-content:space-between;gap:13.2px;padding-bottom:11px}.mesh-preview-head .modal-title{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mesh-preview-zoom-controls{display:flex;align-items:center;gap:5.5px;flex:0 0 auto}.mesh-preview-zoom-controls button{width:auto;min-width:33px;margin:0;padding:6.6px 9.9px}.mesh-preview-zoom-controls span{min-width:52.8px;text-align:center;color:var(--muted);font-size:11px;font-weight:800}.mesh-preview-viewport{flex:1 1 auto;min-height:220px;overflow:auto;overscroll-behavior:contain;background:#202622;border:1px solid var(--line);border-radius:8.8px;scrollbar-width:thin}.mesh-preview-stage{display:flex;align-items:center;justify-content:center;min-width:100%;min-height:100%;line-height:0}.mesh-preview-stage img{display:block;flex:0 0 auto;max-width:none;max-height:none;background:#fff;user-select:none;-webkit-user-drag:none}.mesh-preview-actions{flex:0 0 auto;margin-top:11px}
@media(max-width:990px){.mesh-warp-actions{grid-template-columns:1fr}}

/* Pro 0.9.4-alpha — optional Mesh Warp straightness references. */
.mesh-reference-controls{margin-top:8.8px;padding-top:8.8px;border-top:1px solid var(--line)}
.mesh-reference-actions{display:flex;gap:6.6px;flex-wrap:wrap;margin-top:6.6px}
.mesh-reference-actions button{min-width:0;flex:1 1 auto}
.mesh-reference-list{display:grid;gap:5.5px;margin-top:7.7px;max-height:165px;overflow:auto}
.mesh-reference-item{display:grid;grid-template-columns:minmax(0,1fr) 33px;gap:5.5px;align-items:center;padding:4.4px 5.5px;border:1px solid var(--line);border-radius:8.8px;background:var(--card)}
.mesh-reference-item.selected{border-color:#a23c82;box-shadow:0 0 0 1px rgba(162,60,130,.16)}
.mesh-reference-select{min-width:0;padding:5.5px 7.7px!important;margin:0!important;text-align:left;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ink)!important;font-size:12.1px!important;font-weight:700!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mesh-reference-delete{width:30.8px!important;height:30.8px!important;min-width:30.8px!important;padding:0!important;margin:0!important;border-radius:7.7px!important;font-size:18.7px!important;line-height:1!important;color:#a23c82!important}
.mesh-draft-persistence-hint{margin-top:7.7px}


/* Pro 0.9.4.5-alpha — press-and-hold image state preview from timeline. */
.timeline-history-preview{position:absolute;z-index:25;inset:0;display:none;align-items:center;justify-content:center;background:#dfe3df;pointer-events:none;overflow:hidden}
.timeline-history-preview.visible{display:flex}
.timeline-history-preview img{width:100%;height:100%;object-fit:contain;display:block}
.timeline-history-preview-label{position:absolute;left:13.2px;top:13.2px;padding:6.6px 9.9px;border-radius:8.8px;background:rgba(24,32,28,.82);color:#fff;font-size:12.1px;font-weight:750;box-shadow:0 2px 8.8px rgba(0,0,0,.18)}
.timeline-item.timeline-previewing{border-color:var(--accent);box-shadow:0 0 0 2px rgba(13,107,71,.22)}
html[data-theme="dark"] .timeline-history-preview{background:#151a17}

/* 0.9.4.5-alpha — cancelable long-running transform overlay. */
.save-overlay-card{flex-wrap:wrap;justify-content:center}.save-overlay-cancel{margin-left:4.4px;white-space:nowrap}

/* 0.10.0.1-alpha — multi-drawing stitching selection and 2D layout workspace. */
.stitch-dialog{width:min(1078px,96vw)}
.stitch-body{padding:19.8px}
.stitch-intro{margin:0 0 14.3px;font-size:13.2px;line-height:1.5;color:#465049}
.stitch-tab-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(225.5px,1fr));gap:9.9px;max-height:54vh;overflow:auto;padding:1px}
.stitch-select-card{position:relative;display:grid;grid-template-columns:26.4px 79.2px minmax(0,1fr);align-items:center;gap:9.9px;padding:8.8px;border:1px solid var(--line);border-radius:12.1px;background:var(--card);cursor:pointer;min-width:0}
.stitch-select-card:hover{background:var(--soft)}
.stitch-select-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.stitch-select-card input{margin:0;width:17.6px;height:17.6px}
.stitch-thumb{height:59.4px;border:1px solid var(--line);border-radius:7.7px;background:#eef1ee;overflow:hidden;display:flex;align-items:center;justify-content:center}
.stitch-thumb img{width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.stitch-card-meta{min-width:0}
.stitch-card-name{display:flex;align-items:center;min-width:0;font-size:12.1px;font-weight:800;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stitch-tab-number{display:inline-block;min-width:1.8em;margin-right:6.6px;font-size:9.9px;font-variant-numeric:tabular-nums;letter-spacing:.03em;color:var(--muted);opacity:.82;vertical-align:baseline}
.stitch-card-name-text,.stitch-layout-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stitch-card-file{font-size:9.9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.stitch-actions{display:flex;justify-content:flex-end;gap:8.8px;margin-top:16.5px}
.stitch-actions button{width:auto;margin:0;min-width:105.6px}
.stitch-layout-head{display:flex;align-items:flex-end;justify-content:space-between;gap:17.6px;margin-bottom:13.2px}
.stitch-layout-head strong{font-size:14.3px;color:var(--ink)}
.stitch-layout-help{font-size:11px;color:var(--muted);line-height:1.45;margin-top:4.4px;max-width:671px}
.stitch-grid-size{display:flex;align-items:flex-end;gap:6.6px;flex:0 0 auto}
.stitch-grid-size label{display:grid;gap:3.3px;font-size:9.9px;color:var(--muted);font-weight:700}
.stitch-grid-size select{min-width:72.6px;padding:5.5px 7.7px;border:1px solid var(--line);border-radius:7.7px;background:var(--card);color:var(--ink)}
.stitch-grid{display:grid;gap:8.8px;padding:11px;border:1px solid var(--line);border-radius:13.2px;background:#eef1ee;min-height:198px}
.stitch-cell{min-width:0;min-height:132px;border:1px dashed #aeb9b2;border-radius:11px;background:rgba(255,255,255,.55);display:flex;align-items:stretch;justify-content:stretch;transition:.12s border-color,.12s background}
.stitch-cell{position:relative}
.stitch-cell.drag-over{border-color:var(--accent);background:var(--soft);box-shadow:inset 0 0 0 2px var(--accent),0 0 0 2px rgba(13,107,71,.14)}
.stitch-cell.drag-over::after{content:"";position:absolute;inset:-3.3px;border:3.3px solid var(--accent);border-radius:13.2px;background:rgba(13,107,71,.10);pointer-events:none;z-index:20}
.stitch-layout-card{position:relative;display:flex;flex-direction:column;width:100%;min-width:0;border:1px solid var(--line);border-radius:9.9px;background:var(--card);overflow:hidden;cursor:grab;user-select:none}
.stitch-layout-card:active{cursor:grabbing}
.stitch-layout-image{flex:1;min-height:79.2px;display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden}
.stitch-layout-image img{display:block;width:100%;height:100%;max-height:159.5px;object-fit:contain}
.stitch-layout-label{display:grid;grid-template-columns:28.6px minmax(0,1fr);align-items:center;gap:6.6px;padding:6.6px 7.7px;border-top:1px solid var(--line);background:var(--card)}
.stitch-layout-name{min-width:0;display:flex;align-items:center;white-space:nowrap;overflow:hidden}
.stitch-layout-letter{width:25.3px;height:25.3px;border-radius:7.7px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;font-size:12.1px;font-weight:900}
.stitch-layout-name{font-size:11px;font-weight:800;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stitch-empty-label{margin:auto;font-size:11px;color:var(--muted);pointer-events:none}
html[data-theme="dark"] .stitch-intro{color:#bdc7c1}
html[data-theme="dark"] .stitch-grid{background:#151b17}
html[data-theme="dark"] .stitch-cell{background:rgba(255,255,255,.025);border-color:#59635d}
html[data-theme="dark"] .stitch-thumb,html[data-theme="dark"] .stitch-layout-image{background:#111713}
@media(max-width:836px){.stitch-layout-head{align-items:stretch;flex-direction:column}.stitch-grid-size{align-self:flex-start}.stitch-tab-list{grid-template-columns:1fr}.stitch-cell{min-height:110px}}
/* 0.10.1.4-alpha — matching-points workspace */
.stitch-pair-head{display:flex;align-items:flex-end;justify-content:space-between;gap:13.2px;margin-bottom:11px}.stitch-pair-status{font-size:11px;font-weight:800;color:var(--accent)}
.stitch-pair-workspace{display:grid;grid-template-columns:1fr 1fr;gap:11px}.stitch-pane{min-width:0;border:1px solid var(--line);border-radius:11px;background:#111;overflow:hidden}.stitch-pane-label{padding:6.6px 8.8px;background:var(--card);border-bottom:1px solid var(--line);font-size:11px;font-weight:800;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stitch-pane canvas{display:block;width:100%;height:330px;background:#1a1a1a;cursor:crosshair;touch-action:none}
.stitch-pairs-bottom{display:grid;grid-template-columns:minmax(242px,.7fr) minmax(330px,1.3fr);gap:11px;margin-top:11px}.stitch-pair-list{max-height:209px;overflow:auto;border:1px solid var(--line);border-radius:9.9px;background:var(--card)}.stitch-pair-row{display:grid;grid-template-columns:30.8px 1fr auto;align-items:center;gap:7.7px;padding:6.6px 8.8px;border-bottom:1px solid var(--line);font-size:11px}.stitch-pair-row:last-child{border-bottom:0}.stitch-pair-badge{width:25.3px;height:25.3px;border-radius:6.6px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;font-weight:900}.stitch-pair-row button{width:auto;margin:0;padding:4.4px 7.7px;font-size:9.9px}.stitch-preview-wrap{border:1px solid var(--line);border-radius:9.9px;overflow:hidden;background:#111}.stitch-preview-wrap canvas{display:block;width:100%;height:209px;background:#111}.stitch-point-hover{cursor:grab}
@media(max-width:902px){.stitch-pair-workspace,.stitch-pairs-bottom{grid-template-columns:1fr}.stitch-pane canvas{height:264px}}

/* 0.10.1.4-alpha — fullscreen matching workspace with independent pane zoom. */
.stitch-select-card{grid-template-columns:26.4px 79.2px minmax(0,1fr)}
.stitch-card-meta{display:flex;align-items:center;min-height:59.4px}
.stitch-card-file{display:none!important}
.help-modal.stitch-points-mode{padding:8.8px}
.stitch-dialog.points-fullscreen{width:100%;height:100%;max-width:none;max-height:none;overflow:hidden;border-radius:13.2px}
.stitch-dialog.points-fullscreen .stitch-body{height:calc(100% - 63.8px);box-sizing:border-box;padding:13.2px;overflow:hidden}
.stitch-dialog.points-fullscreen #stitchStepPoints{height:100%;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:8.8px}
.stitch-dialog.points-fullscreen .stitch-pair-head{margin-bottom:0}
.stitch-dialog.points-fullscreen .stitch-pair-workspace{min-height:0;height:100%;gap:13.2px}
.stitch-dialog.points-fullscreen .stitch-pane{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0}
.stitch-pane-head{display:flex;align-items:center;justify-content:space-between;gap:8.8px;background:var(--card);border-bottom:1px solid var(--line);min-width:0}
.stitch-pane-head .stitch-pane-label{border-bottom:0;flex:1;min-width:0}
.stitch-zoom-controls{display:flex;align-items:center;gap:5.5px;padding:4.4px 6.6px;flex:0 0 auto}
.stitch-zoom-controls button{width:auto;min-width:33px;margin:0;padding:4.4px 7.7px;font-size:11px}
.stitch-zoom-controls span{min-width:46.2px;text-align:center;font-size:9.9px;font-weight:800;color:var(--muted)}
.stitch-dialog.points-fullscreen .stitch-pane canvas{width:100%;height:100%;min-height:286px}
.stitch-dialog.points-fullscreen .stitch-pairs-bottom{margin-top:0;min-height:101.2px;max-height:140.8px}
.stitch-dialog.points-fullscreen .stitch-pair-list{max-height:140.8px}
.stitch-dialog.points-fullscreen .stitch-preview-wrap canvas{height:105.6px}
.stitch-dialog.points-fullscreen .stitch-actions{margin-top:0}
@media(max-width:902px){.stitch-dialog.points-fullscreen .stitch-pair-workspace{grid-template-columns:1fr 1fr}.stitch-dialog.points-fullscreen .stitch-pairs-bottom{grid-template-columns:1fr 1fr}.stitch-zoom-controls span{display:none}.stitch-zoom-controls button{padding:4.4px 5.5px}}

/* 0.10.1.4-alpha — panning, larger matching markers and full workspace alignment preview. */
.stitch-preview-full{min-height:0;height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr);border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#111}
.stitch-preview-full canvas{display:block;width:100%;height:100%;min-height:330px;background:#111}
.stitch-dialog.points-fullscreen #stitchStepPoints.preview-mode .stitch-pair-workspace{display:none}
.stitch-dialog.points-fullscreen .stitch-pairs-bottom{grid-template-columns:1fr;min-height:79.2px;max-height:123.2px}
.stitch-dialog.points-fullscreen .stitch-pair-list{max-height:123.2px}

.stitch-dialog.points-fullscreen .stitch-preview-full{min-height:0;height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr)}
.stitch-dialog.points-fullscreen .stitch-preview-full canvas{display:block;width:100%;height:100%;min-height:330px;background:#111}

/* 0.10.1.4-alpha: zoomable/pannable stitching preview */
.stitch-preview-full canvas{cursor:default;touch-action:none}
.stitch-preview-full canvas:active{cursor:default}

/* 0.10.2.1-alpha: compact matching-point pairs */
.stitch-dialog.points-fullscreen .stitch-pair-list{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:6.6px;
  padding:6.6px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:9.9px;
  background:var(--card);
}
.stitch-dialog.points-fullscreen .stitch-pair-row{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:6.6px;
  padding:4.4px 6.6px;
  border:1px solid var(--line);
  border-radius:8.8px;
  font-size:11px;
  background:var(--panel);
  white-space:nowrap;
}
.stitch-dialog.points-fullscreen .stitch-pair-row:last-child{border-bottom:1px solid var(--line)}
.stitch-dialog.points-fullscreen .stitch-pair-row button{padding:3.3px 6.6px}
.stitch-dialog.points-fullscreen .stitch-pair-list .stitch-pair-row:only-child:has([data-del]){width:auto}
.stitch-dialog.points-fullscreen .stitch-pair-list .stitch-pair-row:not(:has([data-del])){
  flex:1 1 100%;
  justify-content:center;
  border:0;
  background:transparent;
}

/* 0.10.2.1-alpha — pair tabs in stitching workspace */
.stitch-pair-tabs{display:flex;align-items:center;gap:5.5px;overflow-x:auto;overflow-y:hidden;min-height:41.8px;padding:3.3px 2px;border-bottom:1px solid var(--line);scrollbar-width:thin;position:relative;z-index:20;pointer-events:auto}
.stitch-pair-tabs-row{display:flex;align-items:stretch;gap:11px;border-bottom:1px solid var(--line);min-width:0}.stitch-pair-tabs-row .stitch-pair-tabs{flex:1 1 auto;min-width:0;border-bottom:0}.stitch-pixel-grid-toggle{flex:0 0 auto;display:flex;align-items:center;gap:6.6px;padding:3.3px 4.4px 3.3px 8.8px;font-size:11px;font-weight:800;color:var(--muted);white-space:nowrap;cursor:pointer}.stitch-pixel-grid-toggle input{margin:0;width:15.4px;height:15.4px;accent-color:var(--accent)}
.stitch-overlap-control{flex:0 0 auto;display:flex;align-items:center;gap:6.6px;padding:3.3px 0 3.3px 8.8px;font-size:11px;font-weight:800;color:var(--muted);white-space:nowrap}.stitch-overlap-control select{width:auto;min-width:99px;margin:0;padding:5.5px 24.2px 5.5px 7.7px;border:1px solid var(--line);border-radius:7.7px;background:var(--card);color:var(--ink);font:inherit}
.stitch-pair-tab{flex:0 0 auto;width:auto;min-width:79.2px;margin:0;padding:7.7px 11px;border:1px solid var(--line);border-radius:9.9px;background:#f4f6f4;color:var(--muted);font-weight:800;white-space:nowrap;position:relative;z-index:21;pointer-events:auto;cursor:pointer}
.stitch-pair-tab:hover{color:var(--text);background:var(--soft)}
.stitch-pair-tab.active{background:var(--soft);color:var(--accent);border-color:var(--accent);box-shadow:0 0 0 1px rgba(13,107,71,.08)}
html[data-theme="dark"] .stitch-pair-tab{background:#252d29}
html[data-theme="dark"] .stitch-pair-tab.active{background:var(--soft);border-color:#78c4a4;color:#78c4a4;box-shadow:0 0 0 1px rgba(120,196,164,.18)}
.stitch-pair-tab.ready::after,.stitch-pair-tab.skipped::after,.stitch-pair-tab.partial::after{content:"";position:absolute;right:5.5px;top:5.5px;width:6.6px;height:6.6px;border-radius:50%}
.stitch-pair-tab.ready::after{background:var(--accent)}
.stitch-pair-tab.partial::after{background:#d49a22}
.stitch-pair-tab.skipped{opacity:.58;text-decoration:line-through}
.stitch-pair-tab.skipped::after{background:var(--muted)}
.stitch-dialog.points-fullscreen .stitch-pair-tabs{min-height:39.6px}

/* 0.10.5.5-alpha — keep pair tabs above canvases and clickable */
.stitch-dialog.points-fullscreen .stitch-pair-workspace{position:relative;z-index:1}

/* MultiStitch uses the same floating tool dock as the standard workspace. */
.stitch-dialog>.help-head{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;min-height:63.8px;box-sizing:border-box;padding-block:4px}.stitch-dialog>.help-head>h2{grid-column:1;grid-row:1;position:relative;z-index:2}.stitch-head-actions{grid-column:3;grid-row:1;position:relative;z-index:2;justify-self:end}.stitch-header-tools{position:static;grid-column:2;grid-row:1;z-index:3;display:none;transform:none;justify-self:center}.stitch-header-tools svg{shape-rendering:geometricPrecision}.help-modal.stitch-points-mode:not(.stitch-preview-mode) .stitch-header-tools{display:flex}.stitch-pane{position:relative}.stitch-pane-head{flex-wrap:wrap}.stitch-pane-head .stitch-pane-label{flex:1 1 150px}.stitch-pane-head .stitch-zoom-controls{margin-left:auto}.stitch-guide-edit-cursor{z-index:30}
html[data-theme="dark"] .stitch-overlap-control select{background:#252d29;color:#edf2ee}
@media(max-width:1100px){.stitch-overlap-control>span{display:none}.stitch-pane-head .stitch-zoom-controls{order:2}.stitch-pane-head .stitch-pane-label{order:1}}
.stitch-dialog.points-fullscreen #stitchStepPoints.preview-mode{grid-template-rows:auto auto minmax(0,1fr) auto auto}

/* 0.10.5.5-alpha — stitching layout UX + assembly orientation map */
.stitch-pair-head{align-items:flex-start}
.stitch-pair-side{display:flex;align-items:flex-start;justify-content:flex-end;gap:8.8px;flex:0 0 auto;min-width:0}
.stitch-pair-info{display:grid;gap:4.4px;justify-items:end;padding-top:2px}
.stitch-orientation-title{font-size:9.9px;font-weight:800;color:var(--muted);white-space:nowrap}
.stitch-orientation-grid{display:grid;gap:2px;padding:4.4px;border:1px solid var(--line);border-radius:7.7px;background:var(--card)}
.stitch-orientation-cell{width:19.8px;height:19.8px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:4.4px;background:var(--soft);color:var(--muted);font-size:8.8px;font-weight:900}
.stitch-orientation-cell.empty{background:transparent;border-style:dashed;opacity:.35}
.stitch-orientation-cell.active-a{background:#e84c4c;color:#fff;border-color:#e84c4c}
.stitch-orientation-cell.active-b{background:#3d8cff;color:#fff;border-color:#3d8cff}
html[data-theme="dark"] .stitch-orientation-grid{background:#151b17}
@media(max-width:902px){.stitch-pair-side{justify-content:flex-start}.stitch-pair-info{justify-items:start}.stitch-pair-tabs-row{gap:4.4px}.stitch-pixel-grid-toggle span{display:none}}

/* 0.10.5.5-alpha — partial assembly preview + layout editing */
.stitch-preview-notice{padding:7.7px 11px;border-bottom:1px solid var(--line);background:rgba(212,154,34,.13);color:var(--ink);font-size:11px;font-weight:700}
html[data-theme="dark"] .stitch-preview-notice{background:rgba(212,154,34,.16)}

/* 0.10.5.5-alpha — save action in stitching workspace */
.stitch-head-actions{display:flex;align-items:center;align-self:center;gap:8.8px}
.stitch-head-actions button,.stitch-head-actions .help-close{display:inline-flex;align-items:center;justify-content:center;width:auto;height:39.6px;box-sizing:border-box;margin:0;padding:0 12.1px;line-height:1}
.stitch-head-actions #stitchSaveProject{white-space:nowrap}

.helper-list-controls{display:flex;gap:11px;flex-wrap:wrap;margin:8.8px 0 11px}.helper-list-controls .check-field{margin:0}.helper-list{display:grid;gap:7.7px;max-height:253px;overflow:auto}.guide-list-item{cursor:pointer}.guide-list-item .measure-meta{margin-top:4.4px}.guide-handle{cursor:move}
.tool-dock button svg path,.tool-dock button svg g{fill:currentColor}

/* 0.10.5.5-alpha — Select tool and guide edit cursor indicator */
.guide-edit-cursor{position:absolute;z-index:31;width:28.6px;height:28.6px;display:none;align-items:center;justify-content:center;border-radius:7.7px;background:rgba(255,255,255,.94);border:1px solid var(--line);box-shadow:0 3.3px 11px rgba(20,35,26,.18);pointer-events:none;color:var(--accent);transform:translate(13.2px,13.2px)}.guide-edit-cursor.visible{display:flex}.guide-edit-cursor svg{width:18.7px;height:18.7px;display:block;fill:currentColor}html[data-theme="dark"] .guide-edit-cursor{background:rgba(40,48,43,.96);color:#78c4a4;box-shadow:0 3.3px 11px rgba(0,0,0,.28)}

/* 0.10.5.14 — empty workspace start actions */
.empty-start-card{pointer-events:auto;min-width:min(462px,calc(100vw - 77px));padding:30.8px 35.2px 26.4px}.empty-logo{display:block;width:59.4px;height:59.4px;margin:0 auto 15.4px}.empty-start-card strong{font-size:19.8px;margin-bottom:17.6px}.empty-start-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9.9px;flex-wrap:wrap;margin-bottom:13.2px}.empty-start-actions button,.empty-start-actions button.primary{width:auto;min-width:165px;margin:0;padding:9.9px 15.4px;border:1px solid #cfd6d1;background:#eef1ee;color:#202824;box-shadow:0 1px 0 rgba(255,255,255,.55) inset,0 3.3px 11px rgba(20,35,26,.04);transition:background .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease,transform .14s ease}.empty-start-actions button:hover:not(:disabled),.empty-start-actions button.primary:hover:not(:disabled){background:#f5f7f5;border-color:#bcc6bf;color:#111815;box-shadow:0 1px 0 rgba(255,255,255,.72) inset,0 6.6px 15.4px rgba(20,35,26,.08)}.empty-start-actions button:active:not(:disabled),.empty-start-actions button.primary:active:not(:disabled){transform:translateY(1px)}.empty-start-actions button:focus-visible,.empty-start-actions button.primary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.empty-start-hint{display:block}.empty-start-card span.empty-start-hint{font-size:12.1px;color:var(--muted)}
html[data-theme="dark"] .empty-start-actions button,html[data-theme="dark"] .empty-start-actions button.primary{background:#2a322d;border-color:#56625b;color:#edf2ee;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 6.6px 15.4px rgba(0,0,0,.18)}html[data-theme="dark"] .empty-start-actions button:hover:not(:disabled),html[data-theme="dark"] .empty-start-actions button.primary:hover:not(:disabled){background:#323b35;border-color:#6c7b73;color:#ffffff;box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 8.8px 19.8px rgba(0,0,0,.24)}


/* Pro 0.10.5.17-alpha: right panel vertical tabs + persistent collapsed rail */
.sidebar{position:relative;display:flex;flex-direction:column;padding:11px;overflow:hidden}
.sidebar-collapse-toolbar{flex:0 0 auto;padding-right:35.2px}
.sidebar-panel-content{flex:1 1 auto;min-height:0;height:auto;overflow:auto;padding-right:2px}
.sidebar-panel-toggle{position:absolute;z-index:7;top:11px;right:13.2px;width:30.8px;height:30.8px;margin:0;padding:0;border:1px solid var(--line);border-radius:8.8px;background:var(--card);color:var(--muted)}
.sidebar-panel-toggle:hover{background:var(--soft);color:var(--accent)}
.sidebar-panel-toggle svg{width:18.7px;height:18.7px;display:block;fill:currentColor;pointer-events:none;transition:transform .15s}
.sidebar.collapsed{padding:0;overflow:hidden}
.sidebar.collapsed .sidebar-panel-content,.sidebar.collapsed .sidebar-collapse-toolbar{display:none}
.sidebar.collapsed .sidebar-panel-toggle{top:8.8px;right:5.5px}
.sidebar.collapsed .sidebar-panel-toggle svg{transform:rotate(180deg)}
.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 352px}
.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr) 41.8px}
html[data-theme="dark"] .sidebar-panel-toggle{background:#2b332e;color:var(--ink)}
@media(max-width:1210px){.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 308px}.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr) 41.8px}}
@media(max-width:990px){.app,.app.measure-collapsed{grid-template-columns:242px minmax(0,1fr)}.app.sidebar-collapsed,.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr)}}
.measure-panel{padding:11px 46.2px 11px 11px;overflow:hidden}
.measure-panel-content{height:100%;overflow:auto;padding-right:2px}
.panel-toggle{position:absolute;z-index:7;top:8.8px;right:3.3px;width:30.8px;height:30.8px;margin:0;padding:0;border-radius:8.8px;font-size:17.6px;background:#edf0ed;color:var(--ink)}
.right-panel-tabs{position:absolute;z-index:6;top:48.4px;right:0;display:flex;flex-direction:column;gap:5.5px;align-items:flex-end}
.right-panel-tab{width:37.4px;height:123.2px;min-width:37.4px;margin:0;padding:8.8px 0;border:1px solid var(--line);border-right:0;border-radius:9.9px 0 0 9.9px;background:#edf0ed;color:var(--muted);box-shadow:none;overflow:hidden}
.right-panel-tab span{display:block;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;font-size:11px;line-height:1;font-weight:800;letter-spacing:.02em}
.right-panel-tab:hover:not(:disabled){background:#e5eae6;color:var(--ink)}
.right-panel-tab.active{outline:0;background:var(--soft);color:var(--accent);border-color:#b9d5c5;box-shadow:inset 3.3px 0 0 var(--accent)}
.right-panel-page[hidden]{display:none!important}
.right-panel-page>.group{margin-bottom:0}
.helper-list{max-height:none;overflow:visible}
.measure-panel.collapsed{padding:0;overflow:hidden}
.measure-panel.collapsed .measure-panel-content{display:none}
.measure-panel.collapsed .right-panel-tabs{display:flex}
.measure-panel.collapsed .panel-toggle{margin:0;right:3.3px}
html[data-theme="dark"] .right-panel-tab{background:#29312c;border-color:var(--line);color:#aeb8b2}
html[data-theme="dark"] .right-panel-tab:hover:not(:disabled){background:#333d37;color:#edf2ee}
html[data-theme="dark"] .right-panel-tab.active{background:#25392f;color:#78c4a4;border-color:#456354;box-shadow:inset 3.3px 0 0 #78c4a4}

/* Repeat perspective workflow */
.perspective-restart-dialog{width:min(660px,94vw)}
.perspective-restart-body{padding:19.8px}
.perspective-restart-body p{margin:0;font-size:13.2px;line-height:1.6;color:#465049}
.perspective-restart-warning{margin-top:14.3px;padding:11px 12.1px;border:1px solid #ead9d3;border-radius:11px;background:#fbf4f1;color:#7a4d42;font-size:12.1px;line-height:1.5}
.perspective-restart-actions{display:flex;justify-content:flex-end;gap:8.8px;flex-wrap:wrap;margin-top:19.8px}
.perspective-restart-actions button{width:auto;margin:0}
html[data-theme="dark"] .perspective-restart-body p{color:#bdc7c1}
html[data-theme="dark"] .perspective-restart-warning{background:#352824;border-color:#594039;color:#d7aca2}

/* 0.10.5.21-alpha UI cleanup */
.active-file-status{margin:2px 0 8.8px;padding:7.7px 8.8px;border-radius:8.8px;background:var(--soft)}
.sidebar-tool-block{margin-top:11px;padding-top:11px;border-top:1px solid var(--line)}
.sidebar-tool-block.compact-block{padding-top:8.8px}.sidebar-tool-head{display:grid;grid-template-columns:minmax(0,1fr) 24.2px;gap:6.6px;align-items:center}.sidebar-tool-head>button{margin:0}.sidebar-tool-label{font-size:11px;font-weight:850;color:var(--ink)}
.sidebar-tool-block .info-help{justify-self:end}.sidebar-tool-block .info-tooltip{width:264px}.sidebar-tool-block .field:first-child{margin-top:0}.mesh-warp-setup{display:block}.mesh-warp-actions{grid-template-columns:1fr 1fr 1fr}.mesh-warp-actions button{min-width:0;padding-left:5.5px;padding-right:5.5px}
.crop-confirm-float{display:none;position:absolute;z-index:31;width:auto;min-width:92.4px;margin:0;padding:8.8px 14.3px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.8);background:#202824;color:#fff;box-shadow:0 5.5px 19.8px rgba(0,0,0,.28);pointer-events:auto}.crop-confirm-float.visible{display:flex}.crop-confirm-float:hover:not(:disabled){background:#303a34}.crop-confirm-float.outside{transform:translate(-50%,-100%)}
.pdf-region-actions{position:absolute;z-index:32;display:grid;gap:6.6px;min-width:242px;max-width:min(330px,calc(100% - 22px));padding:9.9px 11px;border:1px solid rgba(255,255,255,.82);border-radius:11px;background:rgba(32,40,36,.97);color:#fff;box-shadow:0 7.7px 24.2px rgba(0,0,0,.3);pointer-events:auto;transform:translate(-50%,-100%);backdrop-filter:blur(6px)}.pdf-region-actions[hidden]{display:none!important}.pdf-region-actions.below{transform:translate(-50%,0)}.pdf-region-actions-context{font-size:11px;font-weight:800;line-height:1.25;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pdf-region-modes{display:flex;gap:6.6px}.pdf-region-modes[hidden]{display:none!important}.pdf-region-modes button{flex:1;width:auto;margin:0;padding:6.6px 8.8px;border:1px solid rgba(255,255,255,.18);background:#303a34;color:#fff}.pdf-region-modes button:hover:not(:disabled){background:#3a463f}.pdf-region-modes button.active{background:var(--accent);color:#fff;border-color:transparent}.pdf-region-modes #pdfRegionModeSubtract.active{background:#b7473c}.pdf-region-actions-status{font-size:11px;font-weight:800;line-height:1.25;text-align:center;white-space:nowrap}.pdf-region-actions-area{font-size:11px;font-weight:800;line-height:1.28;text-align:center;white-space:normal;color:#d9eee4}.pdf-region-actions-area[hidden]{display:none!important}.pdf-region-actions-buttons{display:flex;align-items:center;gap:6.6px}.pdf-region-actions-buttons button{width:auto;min-width:0;flex:1;margin:0;padding:7.7px 9.9px;border:1px solid rgba(255,255,255,.16);background:#303a34;color:#fff}.pdf-region-actions-buttons button:hover:not(:disabled){background:#3a463f}.pdf-region-actions-buttons button.primary{background:var(--accent);border-color:rgba(255,255,255,.22);color:#fff}.pdf-region-actions-buttons button.primary:hover:not(:disabled){background:#0b7b50}.pdf-region-actions-shortcuts{text-align:center;font-size:9.9px;line-height:1.2;color:rgba(255,255,255,.72)}.pdf-region-actions-shortcuts span{display:inline-block;padding:1.1px 4.4px;border:1px solid rgba(255,255,255,.22);border-radius:4.4px;background:rgba(255,255,255,.08);font-size:9.35px;font-weight:800;color:#fff}html[data-theme="dark"] .pdf-region-actions{background:rgba(237,242,238,.98);color:#18201c;border-color:#fff}html[data-theme="dark"] .pdf-region-modes button,html[data-theme="dark"] .pdf-region-actions-buttons button{background:#dfe6e1;color:#18201c;border-color:#c7d0ca}html[data-theme="dark"] .pdf-region-modes button:hover:not(:disabled),html[data-theme="dark"] .pdf-region-actions-buttons button:hover:not(:disabled){background:#fff}html[data-theme="dark"] .pdf-region-modes button.active,html[data-theme="dark"] .pdf-region-actions-buttons button.primary{background:var(--accent);color:#fff;border-color:transparent}html[data-theme="dark"] .pdf-region-modes #pdfRegionModeSubtract.active{background:#b7473c;color:#fff}html[data-theme="dark"] .pdf-region-actions-buttons button.primary:hover:not(:disabled){background:#0b7b50;color:#fff}html[data-theme="dark"] .pdf-region-actions-area{color:#355b49}html[data-theme="dark"] .pdf-region-actions-shortcuts{color:#5d6962}html[data-theme="dark"] .pdf-region-actions-shortcuts span{background:#fff;border-color:#cbd4ce;color:#344139}body.property-workspace-active #workspace>.pdf-region-actions,body.stitch-workspace-active #workspace>.pdf-region-actions{display:none!important}

html[data-theme="dark"] .active-file-status{background:#26312b}html[data-theme="dark"] .crop-confirm-float{background:#edf2ee;color:#18201c;border-color:#fff}html[data-theme="dark"] .crop-confirm-float:hover:not(:disabled){background:#fff}

/* 0.10.5.23-alpha — compact workflow blocks in left panel */
.sidebar-block-heading{display:flex;align-items:center;justify-content:space-between;gap:8.8px;margin-bottom:8.8px}
.sidebar-block-heading .group-title{margin:0}
.workflow-block{padding-top:13.2px}
.workflow-block #perspectiveTool,.workflow-block #meshWarpTool{margin-top:7.7px}
.workflow-actions{margin-top:8.8px}
.mesh-warp-setup{margin-top:0;padding:0;border:0;background:transparent}
.mesh-warp-setup>.status{margin-top:7.7px}
.mesh-reference-controls{margin-top:9.9px;padding-top:8.8px;border-top:1px solid var(--line)}
.mesh-warp-actions{grid-template-columns:1fr 1fr}
.perspective-preview-float{display:none;position:absolute;z-index:31;width:auto;min-width:149.6px;margin:0;padding:8.8px 14.3px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.8);background:#202824;color:#fff;box-shadow:0 5.5px 19.8px rgba(0,0,0,.28);pointer-events:auto}.perspective-preview-float.visible{display:flex}.perspective-preview-float:hover:not(:disabled){background:#303a34}.perspective-preview-float:disabled{display:none}html[data-theme="dark"] .perspective-preview-float{background:#edf2ee;color:#18201c;border-color:#fff}html[data-theme="dark"] .perspective-preview-float:hover:not(:disabled){background:#fff}.mesh-build-float{display:none;position:absolute;z-index:31;width:auto;min-width:127.6px;margin:0;padding:8.8px 14.3px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.8);background:#202824;color:#fff;box-shadow:0 5.5px 19.8px rgba(0,0,0,.28);pointer-events:auto}
.mesh-build-float.visible{display:flex}
.mesh-build-float:hover:not(:disabled){background:#303a34}
.mesh-build-float:disabled{display:none}
#meshWarpStatus.mesh-order-warning{color:#a34d2c;font-weight:750}
html[data-theme="dark"] .mesh-build-float{background:#edf2ee;color:#18201c;border-color:#fff}
html[data-theme="dark"] .mesh-build-float:hover:not(:disabled){background:#fff}
html[data-theme="dark"] #meshWarpStatus.mesh-order-warning{color:#f0a096}

/* 0.10.5.24 — collapsible workflow cards */
.sidebar .workflow-block{border:1px solid var(--line);border-radius:14.3px;background:var(--card);padding:0;margin:8.8px 0;overflow:visible}
.sidebar .workflow-block>.sidebar-block-heading{min-height:39.6px;margin:0;padding:8.8px 9.9px;cursor:pointer;user-select:none}
.sidebar .workflow-block>.sidebar-block-heading:hover .group-title{color:var(--ink)}
.workflow-card-toggle{width:26.4px;height:26.4px;flex:0 0 26.4px;padding:0;margin:0;border-radius:7.7px;background:transparent;color:var(--muted)}
.workflow-card-toggle:hover{background:var(--soft);color:var(--accent)}
.workflow-card-toggle svg{width:18.7px;height:18.7px;display:block;fill:currentColor;pointer-events:none}
.workflow-card-toggle .workflow-expand-icon{display:none}
.workflow-block.collapsed .workflow-card-toggle .workflow-collapse-icon{display:none}
.workflow-block.collapsed .workflow-card-toggle .workflow-expand-icon{display:block}
.workflow-card-content{padding:0 11px 11px}
.workflow-block.collapsed>.workflow-card-content{display:none}
html[data-theme="dark"] .sidebar .workflow-block{background:#202722;border-color:var(--line)}

/* 0.10.5.25 — standalone transformation cards */
.sidebar .active-tab-group{border:0;border-radius:0;padding:0;margin:0 0 8.8px;background:transparent}
.sidebar .active-tab-group>.sidebar-tool-block.compact-block{border-top:0;margin-top:15.4px;margin-bottom:15.4px;padding-top:0}
.sidebar .workflow-block.sidebar-tool-block{margin:8.8px 0;padding:0;border-top:1px solid var(--line)}
.sidebar .lens-block .lens-field{margin-top:0}
.sidebar .rotation-angle-field{margin-top:0}
.sidebar .rotation-angle-field input{margin-top:0}

/* 0.10.5.26 — sidebar card header alignment */
.sidebar .workflow-block>.sidebar-block-heading>.group-title{order:1}
.sidebar .workflow-block>.sidebar-block-heading>.info-help{order:2;margin-left:auto}
.sidebar .workflow-block>.sidebar-block-heading>.workflow-card-toggle{order:3;margin-left:0}

/* 0.10.5.28 — consistent spacing in Perspective workflow */
#perspectiveSetup>label.field{margin-bottom:0}
#perspectiveSetup>#perspectiveTool{margin:8.8px 0 8.8px!important}

.rotation-guides-check{margin-top:8.8px}
.cal-status{padding:7.7px 8.8px;border-radius:8.8px;background:var(--soft)}.cal-status.warn{border-left:3.3px solid #b89532}.cal-status.bad{border-left:3.3px solid #b45d3d}.cal-axis-state{font-size:11px;color:var(--muted)}.cal-global-diagnostic{margin-top:4.4px;padding-top:4.4px;border-top:1px solid var(--line);font-size:11px;line-height:1.35}.cal-diagnostic-warn{color:#8b6a13;font-weight:700}.cal-diagnostic-bad{color:#a34d2c;font-weight:700}.cal-diagnostic-note{margin-top:2px;color:var(--muted);font-weight:400}html[data-theme="dark"] .cal-diagnostic-warn{color:#d2b65f}html[data-theme="dark"] .cal-diagnostic-bad{color:#e59a7b}

/* Image display modes — affect only the drawing bitmap layer. */
.image-mode-label{margin-bottom:7.7px}.image-mode-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:7.7px}.image-mode-btn{height:39.6px;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:9.9px}.image-mode-btn:hover{background:var(--soft);color:var(--accent)}.image-mode-btn.active{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 0 0 2px rgba(13,107,71,.10)}.image-mode-icon{width:23.1px;height:23.1px;display:block;fill:currentColor;flex:0 0 auto}.image-contrast-field{margin-top:9.9px!important}.image-mode-btn:disabled{opacity:.45;cursor:default}.image-mode-block{margin-top:8.8px!important;margin-bottom:15.4px!important}

/* Pro 0.10.5.47-alpha: consolidated collapsible Image mode card */
.sidebar .image-mode-block>.workflow-card-content{padding:0 9.9px 11px}
.sidebar .image-mode-block .image-opacity-field{margin:0 0 11px}
.sidebar .image-mode-block .image-mode-buttons{margin-top:0}
.sidebar .image-mode-block{margin:8.8px 0!important}

.measurement-group-toolbar{display:flex;margin:0 0 11px}.measurement-group-toolbar button{width:100%;margin:0}
.measurement-groups{display:grid;gap:8.8px}.measurement-group-card{border:1px solid var(--line);border-radius:12.1px;background:#f6f8f6;overflow:hidden}.measurement-group-card.active{border-color:#b9d5c5;box-shadow:0 0 0 1px rgba(13,107,71,.08)}.measurement-group-card.drop-target{border-color:var(--accent);box-shadow:0 0 0 2px rgba(13,107,71,.14)}
.measurement-group-head{padding:7.7px 7.7px 7.7px 8.8px;background:#eef2ef}.measurement-group-card.active>.measurement-group-head{background:var(--soft)}.measurement-group-title-row{display:grid;grid-template-columns:26.4px minmax(0,1fr) 30.8px;align-items:center;gap:4.4px}.measurement-group-card.general .measurement-group-title-row{grid-template-columns:26.4px minmax(0,1fr) 30.8px 30.8px}.measurement-group-actions{display:grid;grid-template-columns:repeat(6,30.8px);justify-content:end;align-items:center;gap:4.4px;padding-top:4.4px}
.measurement-group-radio,.measurement-group-eye,.measurement-group-collapse,.measurement-group-menu,.measurement-group-labels,.measurement-group-repeat,.measurement-group-duplicate{width:28.6px;height:28.6px;padding:0;margin:0;border:0;background:transparent;box-shadow:none;display:grid;place-items:center;color:var(--muted)}.measurement-group-radio img{width:19.8px;height:19.8px;opacity:.72}.measurement-group-eye svg,.measurement-group-collapse svg,.measurement-group-labels svg,.measurement-group-labels img,.measurement-group-duplicate svg{width:18.7px;height:18.7px;fill:currentColor}.measurement-group-labels img{display:block;opacity:.72}.measurement-group-labels,.measurement-group-repeat,.measurement-group-duplicate{border-radius:8.8px}.measurement-group-repeat{font-size:10.45px;font-weight:850}.measurement-group-repeat:hover,.measurement-group-duplicate:hover{background:rgba(13,107,71,.08);color:var(--accent)}.measurement-group-repeat.active{background:rgba(13,107,71,.1);color:var(--accent)}.measurement-group-card.group-labels-hidden .measurement-group-labels{background:rgba(13,107,71,.1);color:var(--accent)}.measurement-group-delete-icon{width:28.6px;height:28.6px;padding:0;margin:0;border:0;border-radius:8.8px;background:rgba(166,55,55,.14);box-shadow:none;display:grid;place-items:center;color:#a33;font-size:20.9px;font-weight:700;line-height:1}.measurement-group-delete-icon:hover{background:rgba(166,55,55,.23);color:#8f2525}.measurement-group-delete-spacer,.measurement-group-duplicate-spacer,.measurement-group-repeat-spacer{width:28.6px;height:28.6px;display:block}.measurement-group-collapse svg{transition:transform .15s}.measurement-group-card.collapsed .measurement-group-collapse svg{transform:rotate(-90deg)}
.measurement-group-name{min-width:0;font-size:12.1px;font-weight:850;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.measurement-group-name-input{min-width:0;width:100%;padding:5.5px 7.7px;font-size:12.1px;border-radius:7.7px;border:1px solid var(--line)}.measurement-group-summary{display:flex;flex-wrap:wrap;gap:5.5px 13.2px;padding:6.6px 8.8px;border-top:1px solid var(--line);background:rgba(255,255,255,.48);font-size:11px;line-height:1.35}.measurement-group-summary-item{display:inline-flex;gap:4.4px;align-items:baseline;white-space:nowrap;color:var(--muted)}.measurement-group-summary-item b{font-size:11px;color:var(--ink);font-weight:800}.measurement-group-body{padding:7.7px;display:grid;gap:7.7px}.measurement-group-card.collapsed .measurement-group-body{display:none}.measurement-group-empty{padding:8.8px;color:var(--muted);font-size:11px;text-align:center}.measurement-group-card.group-hidden .measurement-group-name{opacity:.55}.measurement-group-card.group-hidden .measurement-group-summary,.measurement-group-card.group-hidden .measurement-group-body{opacity:.65}
.measure-item[draggable="true"]{cursor:grab}.measure-item.dragging{opacity:.45}.measurement-group-dialog{max-width:572px}.measurement-group-dialog select{width:100%;margin-top:6.6px}.measurement-group-dialog label{display:block;font-size:13.2px;font-weight:700}
html[data-theme="dark"] .measurement-group-card{background:#171d19}html[data-theme="dark"] .measurement-group-head{background:#202722}html[data-theme="dark"] .measurement-group-card.active>.measurement-group-head{background:#25392f}html[data-theme="dark"] .measurement-group-summary{background:rgba(255,255,255,.025)}

html[data-theme="dark"] .measurement-group-radio img{filter:invert(1);opacity:.86}html[data-theme="dark"] .measurement-group-labels img{filter:invert(1);opacity:.86}html[data-theme="dark"] .measurement-group-delete-icon{background:rgba(170,63,63,.22);color:#ff9b9b}html[data-theme="dark"] .measurement-group-delete-icon:hover{background:rgba(170,63,63,.32);color:#ffb2b2}

/* Pro 0.10.5.82-alpha — changelog modal and unread indicator */
.changelog-top-icon{position:relative;overflow:visible}
.changelog-unread-dot{display:none;position:absolute;right:-2px;top:-2px;width:8.8px;height:8.8px;border-radius:50%;background:#d92d3a;border:2px solid #fff;box-sizing:content-box;pointer-events:none}
.changelog-unread-dot.visible{display:block}
.changelog-dialog{width:min(748px,94vw)}
.changelog-body{padding:6.6px 19.8px 19.8px}
.changelog-release{padding:16.5px 0;border-bottom:1px solid var(--line)}
.changelog-release:last-child{border-bottom:0}
.changelog-release.unread{margin:0 -8.8px;padding:16.5px 8.8px;background:rgba(13,107,71,.055);border-radius:11px}
.changelog-release-head{display:flex;align-items:baseline;gap:9.9px;flex-wrap:wrap;margin-bottom:8.8px}
.changelog-version{font-size:15.4px;font-weight:850;color:var(--ink)}
.changelog-date{font-size:11px;color:var(--muted);font-weight:650}
.changelog-entry-list{display:grid;gap:7.7px}
.changelog-entry{display:flex;align-items:flex-start;gap:8.8px;font-size:13.2px;line-height:1.5;color:#465049}
.changelog-entry::before{content:'•';color:var(--muted);font-weight:900;line-height:1.5}
.changelog-entry-text{min-width:0}
.changelog-status{padding:19.8px 0;font-size:13.2px;color:var(--muted)}
html[data-theme="dark"] .changelog-unread-dot{border-color:#1d2420}
html[data-theme="dark"] .changelog-release.unread{background:rgba(120,196,164,.07)}
html[data-theme="dark"] .changelog-entry{color:#b7c3bb}
html[data-theme="dark"] 
.sidebar .image-mode-block .image-pixel-grid-check{margin:11px 0 0;align-items:flex-start}.sidebar .image-mode-block .image-pixel-grid-check span{line-height:19.8px}

.measure-geometry-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:5.5px;margin-top:8.8px}.measure-geometry-tools button{margin:0;padding:6.6px 5.5px;font-size:9.9px;border-radius:7.7px}.measure-geometry-tools button.active{background:var(--accent);border-color:var(--accent);color:#fff}.measure-geometry-hint{font-size:9.9px;color:var(--muted);margin-top:5.5px;line-height:1.35}

/* Pro 0.10.5.82-alpha — Trial licensing UI. */
.trial-pro-badge{display:inline-flex;align-items:center;justify-content:center;min-width:27.5px;height:16.5px;padding:0 5.5px;margin-left:6.6px;border-radius:1098.9px;background:rgba(13,107,71,.11);color:var(--accent);border:1px solid rgba(13,107,71,.22);font-size:8.8px;font-weight:900;line-height:1;letter-spacing:.055em;vertical-align:middle;box-sizing:border-box;pointer-events:none}.static-trial-pro-badge[hidden]{display:none!important}
[data-trial-pro-badge]{position:relative}.image-mode-pro-row{display:flex;align-items:center;justify-content:flex-start;margin:2px 0 5.5px;font-size:9.9px;font-weight:750;color:var(--muted)}.image-mode-pro-row .trial-pro-badge{margin-left:5.5px}.image-pixel-grid-check>.trial-pro-badge{margin-left:5.5px}.sidebar-block-heading .group-title{display:flex;align-items:center}.sidebar-block-heading .group-title>.trial-pro-badge{margin-left:6.6px}.measurement-group-toolbar{position:relative}.measurement-group-toolbar button{display:inline-flex;align-items:center;justify-content:center}.measurement-group-toolbar button>.trial-pro-badge{margin-left:6.6px}.row[data-trial-pro-badge]>.trial-pro-badge{margin-left:5.5px;align-self:center}.trial-diagnostic-marker{margin:8.8px 0 -3.3px;font-size:9.9px;font-weight:750;color:var(--muted);display:flex;align-items:center;justify-content:flex-start}.trial-diagnostic-marker[hidden]{display:none!important}.help-head h2{display:flex;align-items:center}.help-head h2>.trial-pro-badge{margin-left:7.7px}
.license-preview-pill{width:auto!important;min-height:33px!important;margin:0!important;padding:5.5px 9.9px!important;border-radius:1098.9px!important;background:var(--soft)!important;color:var(--accent)!important;border:1px solid rgba(13,107,71,.24)!important;font-size:11px!important;font-weight:850!important;box-shadow:none!important;white-space:nowrap}.license-preview-pill[hidden]{display:none!important}
.license-dialog{width:min(616px,94vw)}.license-dialog-body{padding:19.8px}.license-dialog-body p{margin:0 0 15.4px;font-size:13.2px;line-height:1.55;color:#465049}.license-plan-line{display:flex;align-items:center;justify-content:space-between;gap:13.2px;padding:11px 13.2px;margin-bottom:15.4px;border:1px solid var(--line);border-radius:11px;background:var(--soft);font-size:12.1px;color:var(--muted)}.license-plan-line strong{font-size:13.2px;color:var(--ink)}.license-preview-note{margin:0 0 14.3px;padding:9.9px 11px;border:1px solid rgba(13,107,71,.2);border-radius:9.9px;background:var(--soft);font-size:12.1px;line-height:1.45;color:var(--accent)}.license-preview-note[hidden]{display:none!important}.license-preview-toggle{width:auto;margin:0 0 15.4px}.license-footnote{font-size:11px!important;color:var(--muted)!important;margin-bottom:0!important}
html[data-theme="dark"] .trial-pro-badge{background:rgba(120,196,164,.12);border-color:rgba(120,196,164,.25);color:#78c4a4}html[data-theme="dark"] .project-edition-badge.project-edition-pro{background:rgba(120,196,164,.12);border-color:rgba(120,196,164,.25);color:#78c4a4}html[data-theme="dark"] .project-edition-badge.project-edition-basic{background:#2b332e;border-color:var(--line);color:#bdc7c1}html[data-theme="dark"] .license-preview-pill{color:#78c4a4!important;border-color:#365443!important}html[data-theme="dark"] .license-dialog-body p{color:#bdc7c1}
#calGeneral>.trial-pro-badge{margin-left:7.7px}

/* Real licensing UI — 0.10.5.82-alpha */
.license-dialog{width:min(616px,94vw)}
.license-dialog-body{padding:19.8px;display:grid;gap:13.2px}
.license-plan-line,.license-status-row{display:flex;align-items:center;justify-content:space-between;gap:15.4px;padding:9.9px 12.1px;border:1px solid var(--line);border-radius:11px;background:#fafbfa;font-size:13.2px}
.license-plan-line strong,.license-status-row strong{font-size:14.3px;color:var(--accent)}
.license-dialog-body>p{margin:0;font-size:13.2px;line-height:1.55;color:#465049}
.license-meta-line{font-size:11px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.license-device-line{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.license-feedback{padding:11px 12.1px;border-radius:11px;border:1px solid var(--line);font-size:12.1px;line-height:1.45}
.license-feedback[data-type="success"]{background:#edf8f2;border-color:#bcdcca;color:#0d6b47}
.license-feedback[data-type="warning"]{background:#fff8e8;border-color:#ead8a9;color:#765719}
.license-feedback[data-type="error"]{background:#fff1f1;border-color:#edc6c6;color:#8f2727}
.license-feedback a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:600}
.license-activation-section,.license-active-section{display:grid;gap:11px;padding:14.3px;border:1px solid var(--line);border-radius:13.2px;background:#fafbfa}
.license-key-field{display:grid;gap:6.6px;font-size:12.1px;font-weight:800;color:var(--ink)}
.license-key-field input{width:100%;box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.02em;text-transform:uppercase}
.license-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8.8px}
.license-action-row button,.license-trial-start,.license-active-section button,.license-preview-toggle{width:100%;margin:0}
.license-separator{display:flex;align-items:center;gap:11px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.license-separator::before,.license-separator::after{content:"";height:1px;background:var(--line);flex:1}
.license-trial-hint{font-size:11px;line-height:1.45;color:var(--muted)}
.license-preview-note{padding:11px 12.1px;border:1px solid #c6e0d1;border-radius:11px;background:#eff8f3;color:#285b42;font-size:12.1px;line-height:1.45}
.license-footnote{font-size:11px!important;color:var(--muted)!important}
.danger-outline{border-color:#e3bcbc!important;color:#a13d3d!important;background:#fffafa!important}
.danger-outline:hover{background:#fff0f0!important}
.license-needs-attention{position:relative}
.license-needs-attention::after{content:"";position:absolute;width:7.7px;height:7.7px;border-radius:50%;right:4.4px;top:4.4px;background:#d92d3a;border:1px solid #fff}
.license-gate{position:fixed;inset:0;z-index:1080;background:rgba(20,28,24,.82);backdrop-filter:blur(5.5px);display:flex;align-items:center;justify-content:center;padding:26.4px}
.license-gate[hidden]{display:none!important}
.license-gate-card{width:min(462px,92vw);background:#fff;border:1px solid var(--line);border-radius:19.8px;box-shadow:0 26.4px 88px rgba(0,0,0,.4);padding:28.6px;text-align:center;display:grid;justify-items:center;gap:12.1px}
.license-gate-logo{width:57.2px;height:57.2px;display:block}
.license-gate-card strong{font-size:19.8px;color:var(--ink)}
.license-gate-card span{font-size:13.2px;line-height:1.55;color:var(--muted);max-width:374px}
.license-gate-card button{width:auto;min-width:198px;margin:0}.license-gate-actions{display:flex;align-items:center;justify-content:center;gap:8.8px;flex-wrap:wrap;margin-top:4.4px}.license-gate-actions[hidden]{display:none!important}
html[data-license-locked="true"] body{overflow:hidden}
html[data-theme="dark"] .license-plan-line,html[data-theme="dark"] .license-status-row,html[data-theme="dark"] .license-activation-section,html[data-theme="dark"] .license-active-section{background:#171d1a;border-color:var(--line)}
html[data-theme="dark"] .license-dialog-body>p{color:#b7c0ba}
html[data-theme="dark"] .license-feedback[data-type="success"]{background:#153124;border-color:#285b42;color:#78c4a4}
html[data-theme="dark"] .license-feedback[data-type="warning"]{background:#332b18;border-color:#67582d;color:#dcc778}
html[data-theme="dark"] .license-feedback[data-type="error"]{background:#351d1d;border-color:#6d3434;color:#ed9999}
html[data-theme="dark"] .license-preview-note{background:#183026;border-color:#315a46;color:#9bd3b9}
html[data-theme="dark"] .danger-outline{background:#291b1b!important;border-color:#6a3a3a!important;color:#e59a9a!important}
html[data-theme="dark"] .danger-outline:hover{background:#352020!important}
html[data-theme="dark"] .license-gate{background:rgba(8,12,10,.86)}
html[data-theme="dark"] .license-gate-card{background:#1d2420;border-color:var(--line)}
html[data-theme="dark"] .license-needs-attention::after{border-color:#1d2420}
@media(max-width:616px){.license-action-row{grid-template-columns:1fr}.license-device-line{font-size:9.9px}.license-gate-actions{width:100%}.license-gate-actions button{width:100%;min-width:0}}
#retryLicenseValidation{width:100%;margin:0}

/* 0.10.5.82-alpha — Trial registration / legal documents */
.license-trial-registration{display:grid;gap:9.9px;padding:11px 0 0}
.license-trial-registration[hidden]{display:none!important}
.license-email-field{display:grid;gap:6.6px;font-size:12.1px;font-weight:800;color:var(--ink)}
.license-email-field input{width:100%;box-sizing:border-box;text-transform:none!important;letter-spacing:0!important;font-family:inherit!important}
.license-terms-check{display:flex;align-items:flex-start;gap:8.8px;font-size:12.1px;line-height:1.45;color:var(--ink);cursor:pointer}
.license-terms-check input{margin:2px 0 0;flex:0 0 auto}
.license-terms-check a,.license-privacy-line a{color:var(--accent);font-weight:750;text-decoration:none}
.license-terms-check a:hover,.license-privacy-line a:hover{text-decoration:underline}
.license-privacy-line{font-size:11px;line-height:1.45;color:var(--muted)}
html[data-theme="dark"] .license-terms-check{color:#d6ddd8}

/* 0.10.5.82-alpha: language selection is available before license activation. */
.license-dialog-head-actions{display:flex;align-items:center;gap:8.8px}.license-dialog-head-actions .language-select{min-width:129.8px}.license-gate-language{margin:2px 0 0;min-width:143px}.license-gate-card .license-gate-language{width:auto}.license-gate-card .language-select{font-size:12.1px}
@media(max-width:682px){.license-dialog-head-actions{gap:5.5px}.license-dialog-head-actions .language-select{min-width:110px}.license-dialog-head-actions #closeLicense{padding-left:8.8px;padding-right:8.8px}}

/* 0.10.5.82-alpha — masked license contact in license modal. */
.license-contact-line{font-weight:700;color:var(--ink)}
html[data-theme="dark"] .license-contact-line{color:#d6ddd8}

/* 0.10.5.82-alpha — two-step Trial email verification. */
.license-trial-verification{display:grid;gap:11px;padding:12.1px;border:1px solid var(--line);border-radius:12.1px;background:var(--soft)}
.license-trial-verification[hidden]{display:none!important}
.license-trial-verification-info{font-size:12.1px;line-height:1.5;color:var(--muted)}
.license-verification-field{display:grid;gap:6.6px;font-size:12.1px;font-weight:800;color:var(--ink)}
.license-verification-field input{width:100%;box-sizing:border-box;text-align:center;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:22px;font-weight:800;letter-spacing:.22em}
.license-change-email{width:auto!important;justify-self:start;margin:0!important;padding:6.6px 9.9px!important;font-size:11px!important}
html[data-theme="dark"] .license-trial-verification{background:#171d1a;border-color:var(--line)}

/* 0.10.5.82-alpha — unobtrusive Trial expiry countdown. */
.license-trial-countdown{width:auto!important;min-height:33px!important;margin:0!important;padding:5.5px 9.9px!important;border-radius:1098.9px!important;background:#fff8e8!important;color:#765719!important;border:1px solid #ead8a9!important;font-size:11px!important;font-weight:850!important;box-shadow:none!important;white-space:nowrap}.license-trial-countdown[hidden]{display:none!important}.license-trial-countdown:hover{background:#fff3d4!important}html[data-theme="dark"] .license-trial-countdown{background:#332b18!important;border-color:#67582d!important;color:#dcc778!important}html[data-theme="dark"] .license-trial-countdown:hover{background:#3d331c!important}

/* 0.10.5.104 licensing UX */
.license-key-hint-line{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:700;color:var(--ink)}
.license-portal-action{display:inline-flex;justify-content:center;margin-top:11px;text-decoration:none}
.license-portal-action[hidden]{display:none!important}
.license-legal-modal{z-index:1200}
.license-legal-dialog{width:min(946px,94vw);height:min(792px,86vh);overflow:hidden;display:flex;flex-direction:column}
.license-legal-dialog .help-head{flex:0 0 auto}
.license-legal-dialog iframe{display:block;width:100%;min-height:0;flex:1;border:0;background:#fff}
html[data-theme="dark"] .license-key-hint-line{color:#dce5df}
@media(max-width:682px){.license-legal-dialog{width:96vw;height:82vh}}


/* 0.10.5.104-alpha — contextual links to help.justmeasure.cz */
.context-help-link{display:inline-flex;align-items:center;justify-content:center;flex:0 0 19.8px;width:19.8px;height:19.8px;padding:0;margin:0;border:1px solid #d7e8de;border-radius:50%;background:var(--soft);color:var(--accent);font-size:11px;font-weight:850;line-height:1;text-decoration:none;cursor:pointer;box-shadow:none}
.context-help-link:hover,.context-help-link:focus-visible{background:#e2efe7;color:var(--accent);outline:none;box-shadow:0 0 0 2px rgba(13,107,71,.12)}
.sidebar-block-heading>.context-help-link{order:2}
.context-help-control-row{display:grid;grid-template-columns:minmax(0,1fr) 19.8px;align-items:center;gap:6.6px}
.context-help-control-row #calGeneral{grid-column:auto}
.context-help-control-row>.context-help-link{margin-top:5.5px}
.image-pixel-grid-row{display:flex;align-items:center;gap:5.5px;margin-top:11px;min-width:0}
.sidebar .image-mode-block .image-pixel-grid-row .image-pixel-grid-check{margin:0;min-width:0;align-items:center}
.image-pixel-grid-row>.trial-pro-badge{margin-left:0}
.measurement-group-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 19.8px;align-items:center;gap:6.6px}
.measurement-group-toolbar button{margin:0}
.measurement-group-toolbar>.context-help-link{width:19.8px}
html[data-theme="dark"] .context-help-link{background:#25372e;border-color:#365443;color:#78c4a4}
html[data-theme="dark"] .context-help-link:hover,html[data-theme="dark"] .context-help-link:focus-visible{background:#2c4437;color:#78c4a4;box-shadow:0 0 0 2px rgba(120,196,164,.12)}

/* Measurement group colors and derived group calculations */

.measurement-group-color,.measurement-group-color-spacer{width:25.3px;height:25.3px;display:block}
.measurement-group-color{padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;overflow:hidden;cursor:pointer}
.measurement-group-color::-webkit-color-swatch-wrapper{padding:2px}.measurement-group-color::-webkit-color-swatch{border:0;border-radius:50%}.measurement-group-color::-moz-color-swatch{border:0;border-radius:50%}
.measurement-calculation-section{margin-top:13.2px;padding-top:12.1px;border-top:1px solid var(--line)}
.measurement-calculation-heading{display:flex;align-items:center;justify-content:space-between;gap:8.8px;margin-bottom:8.8px}.measurement-calculation-heading strong{font-size:12.1px}.measurement-calculation-heading button{width:auto;margin:0;padding:6.6px 9.9px;font-size:11px}
.measurement-calculation-list{display:grid;gap:7.7px}.measurement-calculation-empty{padding:8.8px;color:var(--muted);font-size:11px;text-align:center}
.measurement-calculation-card{display:flex;align-items:flex-start;justify-content:space-between;gap:8.8px;padding:9.9px;border:1px solid var(--line);border-radius:11px;background:#f6f8f6}.measurement-calculation-main{min-width:0}.measurement-calculation-title{font-size:12.1px;font-weight:850;color:var(--ink)}.measurement-calculation-formula{margin-top:3.3px;font-size:10.45px;color:var(--muted);line-height:1.35;overflow-wrap:anywhere}.measurement-calculation-result{display:flex;gap:5.5px;align-items:baseline;margin-top:6.6px;font-size:11px;color:var(--muted)}.measurement-calculation-result b{font-size:12.1px;color:var(--ink)}.measurement-calculation-actions{display:flex;gap:4.4px}.measurement-calculation-actions button{width:27.5px;height:27.5px;padding:0;margin:0;display:grid;place-items:center}.measurement-calculation-actions .delete{color:#a33}
.measurement-calculation-dialog{width:min(616px,95vw)}.measurement-calculation-body{padding:19.8px}.measurement-calculation-body>label{display:grid;gap:5.5px;margin-bottom:13.2px;font-size:12.1px;font-weight:750}.measurement-calculation-body input,.measurement-calculation-body select{width:100%;margin:0}.measurement-calculation-terms-head{display:flex;align-items:center;justify-content:space-between;gap:8.8px;margin:16.5px 0 7.7px;font-size:12.1px;font-weight:800}.measurement-calculation-terms-head button{width:auto;margin:0;padding:6.6px 9.9px}.measurement-calculation-terms{display:grid;gap:6.6px}.measurement-calculation-term{display:grid;grid-template-columns:66px minmax(0,1fr) 33px;gap:6.6px;align-items:center}.measurement-calculation-term select{margin:0}.measurement-calculation-term button{width:33px;height:33px;padding:0;margin:0}.measurement-calculation-note{margin-top:9.9px;font-size:10.45px;line-height:1.45;color:var(--muted)}.measurement-calculation-footer{display:flex;justify-content:flex-end;gap:8.8px;margin-top:17.6px}.measurement-calculation-footer button{width:auto;margin:0}
html[data-theme="dark"] .measurement-calculation-card{background:#171d19}

/* PDF measurement report */
.pdf-report-dialog{width:min(880px,96vw);max-height:92vh;display:flex;flex-direction:column;overflow:hidden}.pdf-report-body{padding:18px 20px;overflow:auto}.pdf-report-intro{margin:0 0 14px;font-size:13px;line-height:1.5;color:var(--muted)}.pdf-report-tabs{display:grid;gap:10px}.pdf-report-tab-card{border:1px solid var(--line);border-radius:12px;background:#fafbfa;overflow:hidden}.pdf-report-tab-card.disabled{opacity:.58}.pdf-report-tab-title{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);cursor:pointer}.pdf-report-tab-title input,.pdf-report-option input{width:auto;margin:0}.pdf-report-tab-title strong{font-size:13px}.pdf-report-tab-options{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:12px 14px}.pdf-report-subtitle{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:7px}.pdf-report-option{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-height:30px;font-size:12.5px}.pdf-report-option-main{display:flex;align-items:center;gap:8px;min-height:30px;cursor:pointer}.pdf-report-option-main input{width:auto;margin:0}.pdf-report-option small{margin-left:auto;color:var(--muted);font-size:10.5px}.pdf-report-color{width:14px;height:14px;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);flex:0 0 auto}.pdf-report-option-labeltoggle{display:flex;align-items:center;gap:6px;font-size:10.5px;color:var(--muted);white-space:nowrap;cursor:pointer}.pdf-report-option-labeltoggle input{width:auto;margin:0}.pdf-report-empty{font-size:12px;color:var(--muted);padding:4px 0}.pdf-report-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;border-top:1px solid var(--line);background:#fff}.pdf-report-footer>div:last-child{display:flex;gap:8px}.pdf-report-footer button{width:auto;margin:0}.pdf-report-status{font-size:12px;color:var(--muted);min-height:18px}.quick-export.pdf-report-action svg{width:19px;height:19px}@media(max-width:720px){.pdf-report-tab-options{grid-template-columns:1fr}.pdf-report-footer{align-items:stretch;flex-direction:column}.pdf-report-footer>div:last-child{justify-content:flex-end}}html[data-theme="dark"] .pdf-report-dialog,html[data-theme="dark"] .pdf-report-footer{background:#1d2420;color:var(--ink)}html[data-theme="dark"] .pdf-report-tab-card{background:#222a25}

/* JustMeasure 5.2 — clearer first-run Trial activation hierarchy. */
.license-activation-section{padding:0;border:0;background:transparent;gap:12.1px}
.license-trial-card,.license-key-card{display:grid;gap:11px;padding:14.3px;border:1px solid var(--line);border-radius:13.2px}
.license-trial-card{background:#f0f8f4;border-color:#bcdcca;box-shadow:0 0 0 1px rgba(13,107,71,.025)}
.license-key-card{background:#fafbfa}
.license-trial-card[hidden],.license-key-card[hidden]{display:none!important}
.license-card-heading{display:grid;gap:4.4px}
.license-card-heading strong{font-size:16.5px;line-height:1.3;color:var(--ink)}
.license-card-heading span{font-size:12.1px;line-height:1.45;color:#52615a}
.license-trial-card .license-card-heading strong{color:var(--accent)}
.license-trial-registration{padding-top:2.2px}
.license-trial-start{font-weight:850}
.license-key-heading{margin-bottom:1.1px}
html[data-theme="dark"] .license-activation-section{background:transparent;border:0}
html[data-theme="dark"] .license-trial-card{background:#173026;border-color:#315a46;box-shadow:none}
html[data-theme="dark"] .license-key-card{background:#171d1a;border-color:var(--line)}
html[data-theme="dark"] .license-card-heading span{color:#afbbb4}
html[data-theme="dark"] .license-trial-card .license-card-heading strong{color:#78c4a4}

/* JustMeasure 5.2 — project property identification (RÚIAN). */
.header-property-button{position:relative;align-self:flex-end;width:auto;height:33px;flex:0 0 auto;margin:0;padding:0 10px;gap:6px;border:1px solid #d7e8de;border-radius:8.8px;background:var(--soft);color:var(--accent);white-space:nowrap}.header-property-button .property-set-dot{display:none;width:6px;height:6px;border-radius:50%;background:var(--accent)}.header-property-button.has-property{background:rgba(13,107,71,.11);border-color:rgba(13,107,71,.25)}.header-property-button.has-property .property-set-dot{display:block}.property-dialog{width:min(1030px,96vw);max-height:92vh;display:flex;flex-direction:column;overflow:hidden}.property-body{display:grid;grid-template-columns:minmax(300px,390px) minmax(0,1fr);min-height:430px;overflow:hidden}.property-search-panel,.property-detail-panel{padding:18px;overflow:auto}.property-search-panel{border-right:1px solid var(--line);background:#fafbfa}.property-search-field{margin-top:0!important}.property-search-button{margin-top:9px}.property-status{min-height:20px;margin:9px 1px 7px;font-size:11px;line-height:1.4;color:var(--muted)}.property-status.error{color:var(--danger)}.property-status.success{color:var(--accent)}.property-status.busy{color:var(--ink)}.property-search-results{display:grid;gap:7px}.property-result{display:block;width:100%;margin:0;padding:10px 11px;text-align:left;border:1px solid var(--line);background:#fff}.property-result:hover{border-color:#b8d6c9;background:var(--soft)}.property-result strong{display:block;font-size:12px;line-height:1.35}.property-result small{display:block;margin-top:4px;font-size:10.5px;font-weight:600;color:var(--muted)}.property-detail{min-height:100%}.property-empty{padding:16px;border:1px dashed #cfd7d1;border-radius:11px;color:var(--muted);font-size:12px;line-height:1.5;background:#fafbfa}.property-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.property-detail-grid>div{padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#fafbfa}.property-detail-grid span,.property-section-label{display:block;margin-bottom:4px;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.property-detail-grid b{display:block;font-size:12.5px;line-height:1.45;color:var(--ink)}.property-parcels{margin-top:14px}.property-parcel-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-bottom:1px solid var(--line);font-size:12px}.property-parcel-row:first-of-type{border-top:1px solid var(--line)}.property-parcel-row>span:last-child{color:var(--muted);white-space:nowrap}.property-source{margin-top:14px;font-size:10.5px;line-height:1.4;color:var(--muted)}.property-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 18px;border-top:1px solid var(--line);background:#fff}.property-foot>button,.property-foot-actions button{width:auto;margin:0}.property-foot-actions{display:flex;gap:8px}.property-foot-actions .primary{min-width:130px}html[data-theme="dark"] .header-property-button.has-property{background:rgba(120,196,164,.12);border-color:rgba(120,196,164,.25);color:#78c4a4}html[data-theme="dark"] .property-search-panel,html[data-theme="dark"] .property-detail-grid>div,html[data-theme="dark"] .property-empty{background:var(--card)}@media(max-width:1210px){.property-body{grid-template-columns:340px minmax(0,1fr)}}@media(max-width:760px){.property-body{grid-template-columns:1fr;overflow:auto}.property-search-panel{border-right:0;border-bottom:1px solid var(--line)}.property-detail-grid{grid-template-columns:1fr}.property-foot{align-items:stretch;flex-direction:column}.property-foot-actions{width:100%}.property-foot-actions button{flex:1}}

/* JustMeasure 5.2 C1 — georeferenced cadastral vector drawing. */
.cadastral-calibration-note{padding:10px 11px;margin-bottom:9px;border:1px solid rgba(13,107,71,.24);border-radius:9px;background:rgba(13,107,71,.07);color:var(--accent);font-size:11px;line-height:1.45}
#calibrationSection.cadastral-source>.field,#calibrationSection.cadastral-source>.row,#calibrationSection.cadastral-source>.context-help-control-row,#calibrationSection.cadastral-source>.trial-diagnostic-marker,#calibrationSection.cadastral-source>.calibration-axis,#calibrationSection.cadastral-source>.check-field{display:none!important}
.property-foot-actions{flex-wrap:wrap;justify-content:flex-end}.property-load-cadastral{min-width:178px}
html[data-theme="dark"] .cadastral-calibration-note{background:rgba(120,196,164,.09);border-color:rgba(120,196,164,.24);color:#78c4a4}
@media(max-width:900px){.property-load-cadastral{order:-1;flex-basis:100%!important}}

/* JustMeasure 5.2 C2 — cadastral snapping controls. */
.cadastral-snap-check{display:flex!important;align-items:center;gap:7px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(13,107,71,.18);color:inherit;font-size:11px}.cadastral-snap-check input{margin:0}
.cadastral-feature-help{margin-top:8px;padding-top:8px;border-top:1px solid rgba(13,107,71,.18);font-size:10px;line-height:1.45;color:var(--muted)}
.cadastral-feature-action{margin-top:8px;padding:9px;border-radius:8px;background:rgba(13,107,71,.10);border:1px solid rgba(13,107,71,.22)}
.cadastral-feature-title{margin-bottom:7px;font-size:11px;font-weight:750;color:var(--text)}
.cadastral-feature-action button{width:100%;min-height:30px;font-size:11px}
html[data-theme="dark"] .cadastral-feature-help{border-top-color:rgba(120,196,164,.18)}
html[data-theme="dark"] .cadastral-feature-action{background:rgba(120,196,164,.10);border-color:rgba(120,196,164,.22)}
html[data-theme="dark"] .cadastral-snap-check{border-top-color:rgba(120,196,164,.18)}

/* C3: interactive RÚIAN property map selector */
.property-search-actions{display:flex;gap:8px;margin-top:9px}.property-search-actions button{width:auto;margin:0;flex:1}.property-map-dialog{width:min(1180px,97vw);height:min(780px,94vh);max-height:94vh;display:flex;flex-direction:column;overflow:hidden}.property-map-body{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:0;flex:1}.property-map-side{padding:16px;border-right:1px solid var(--line);background:#fafbfa;overflow:auto}.property-map-side>.field{margin-top:0!important}.property-map-side>.primary{width:100%;margin-top:9px}.property-map-status{min-height:20px;margin:9px 1px 7px;font-size:11px;line-height:1.4;color:var(--muted)}.property-map-status.error{color:var(--danger)}.property-map-status.success{color:var(--accent)}.property-map-status.busy{color:var(--ink)}.property-map-area-results{max-height:330px;overflow:auto}.property-map-selection{margin-top:12px;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff;min-height:48px;font-size:11.5px;line-height:1.35}.property-map-selection b,.property-map-selection span{display:block}.property-map-selection span{margin-top:3px;color:var(--muted)}.property-map-stage{position:relative;min-width:0;min-height:420px;background:#eef2ef;overflow:hidden}.property-map-stage canvas{display:block;width:100%;height:100%;cursor:crosshair;touch-action:none}.property-map-stage canvas:active{cursor:grabbing}.property-map-controls{position:absolute;right:12px;top:12px;display:grid;gap:6px}.property-map-controls button{width:34px;height:34px;margin:0;padding:0;border-radius:8px;background:rgba(255,255,255,.94);font-size:19px;line-height:1}.property-map-help{position:absolute;left:12px;right:58px;bottom:10px;padding:6px 9px;border-radius:8px;background:rgba(255,255,255,.9);font-size:10.5px;line-height:1.35;color:#59655f;pointer-events:none}html[data-theme="dark"] .property-map-side{background:var(--card)}html[data-theme="dark"] .property-map-selection{background:var(--card)}html[data-theme="dark"] .property-map-help,html[data-theme="dark"] .property-map-controls button{background:rgba(32,38,34,.94);color:var(--ink)}@media(max-width:800px){.property-map-dialog{height:94vh}.property-map-body{grid-template-columns:1fr;grid-template-rows:auto minmax(360px,1fr)}.property-map-side{border-right:0;border-bottom:1px solid var(--line);max-height:290px}.property-map-area-results{max-height:120px}.property-search-actions{flex-direction:column}}

/* KN tabs: raster correction tools do not apply to georeferenced cadastral geometry. */
#app.cadastral-source .sidebar .image-mode-block,
#app.cadastral-source .sidebar .lens-block,
#app.cadastral-source .sidebar .perspective-block,
#app.cadastral-source .sidebar .mesh-block,
#app.cadastral-source .sidebar .rotation-block{display:none!important}

/* JustMeasure 5.2 E1 — orthophoto background for cadastral tabs. */
.cadastral-background-field{display:flex!important;flex-direction:column;gap:5px;margin-top:9px;padding-top:9px;border-top:1px solid rgba(13,107,71,.18);color:inherit}
.cadastral-background-field>span{font-size:10px;font-weight:750;color:var(--muted)}
.cadastral-background-field select{width:100%;min-height:31px}
.cadastral-background-status{margin-top:6px;font-size:10px;line-height:1.35;color:var(--muted)}
.cadastral-background-status.error{color:#a54a38}
html[data-theme="dark"] .cadastral-background-field{border-top-color:rgba(120,196,164,.18)}
html[data-theme="dark"] .cadastral-background-status.error{color:#e59c8b}


/* JustMeasure 5.2 E2 — cadastral display controls. */
.cadastral-orthophoto-opacity{display:flex!important;flex-direction:column;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(13,107,71,.18);color:inherit}
.cadastral-orthophoto-opacity[hidden]{display:none!important}
.cadastral-orthophoto-opacity>span{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;font-weight:750;color:var(--muted)}
.cadastral-orthophoto-opacity b{font-size:10px;color:var(--text);font-variant-numeric:tabular-nums}
.cadastral-orthophoto-opacity input[type=range]{width:100%;margin:0}
.cadastral-layer-controls{margin-top:8px;padding-top:8px;border-top:1px solid rgba(13,107,71,.18);display:grid;grid-template-columns:1fr 1fr;gap:6px 10px}
.cadastral-layer-title{grid-column:1/-1;font-size:10px;font-weight:750;color:var(--muted)}
.cadastral-layer-controls .check-field{display:flex!important;align-items:center;gap:6px;margin:0;font-size:10.5px;color:inherit}
.cadastral-layer-controls .check-field input{margin:0}
.cadastral-layer-controls.is-disabled{opacity:.55}
html[data-theme="dark"] .cadastral-orthophoto-opacity,html[data-theme="dark"] .cadastral-layer-controls{border-top-color:rgba(120,196,164,.18)}

/* 5.2 E4 — MultiStitch integrated into the main JustMeasure workspace. */
body.stitch-workspace-active .tabs-list .drawing-tab:not(.stitch-workspace-tab){opacity:.5;pointer-events:none}
body.stitch-workspace-active .stitch-workspace-tab{border-color:var(--accent);background:var(--soft);box-shadow:0 0 0 1px rgba(13,107,71,.08)}
body.stitch-workspace-active .stitch-workspace-tab .tab-main{color:var(--accent);font-weight:850;cursor:default}
body.stitch-workspace-active #addTab{opacity:.32}

#stitchModal.stitch-embedded-host{display:none;position:absolute;inset:0;z-index:12;width:auto;height:auto;padding:0!important;background:#dfe3df;align-items:stretch;justify-content:stretch}
#stitchModal.stitch-embedded-host .stitch-dialog{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none;background:var(--card);overflow:hidden;display:flex;flex-direction:column}
#stitchModal.stitch-embedded-host .stitch-dialog>.help-head{display:none!important}
#stitchModal.stitch-embedded-host .stitch-body{flex:1 1 auto;min-height:0;height:100%!important;padding:68px 17.6px 17.6px!important;overflow:auto;background:#f7f9f7}
#stitchModal.stitch-embedded-host #stitchStepSelect,
#stitchModal.stitch-embedded-host #stitchStepLayout{width:min(1100px,100%);margin:0 auto}
#stitchModal.stitch-embedded-host.stitch-points-mode .stitch-body{overflow:hidden;padding:63.8px 11px 11px!important}
#stitchModal.stitch-embedded-host .stitch-dialog.points-fullscreen{border-radius:0}
#stitchModal.stitch-embedded-host .stitch-dialog.points-fullscreen #stitchStepPoints{display:grid!important;height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr)!important;gap:8.8px}
#stitchModal.stitch-embedded-host .stitch-dialog.points-fullscreen #stitchStepPoints.preview-mode{grid-template-rows:auto minmax(0,1fr)!important}
#stitchModal.stitch-embedded-host .stitch-pair-head{margin:0;padding:0 2px;align-items:flex-start}
#stitchModal.stitch-embedded-host .stitch-pair-workspace{height:100%;min-height:0;grid-template-columns:1fr 1fr;gap:11px}
#stitchModal.stitch-embedded-host .stitch-pane{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr)}
#stitchModal.stitch-embedded-host .stitch-pane canvas{width:100%;height:100%;min-height:0}
#stitchModal.stitch-embedded-host .stitch-preview-full{height:100%;min-height:0}
#stitchModal.stitch-embedded-host .stitch-preview-full canvas{height:100%;min-height:0}
#stitchModal.stitch-embedded-host .stitch-zoom-controls{display:none}
#stitchModal.stitch-embedded-host .stitch-grid{max-height:calc(100vh - 310px);overflow:auto}

.stitch-right-panel{min-height:100%}
.stitch-right-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8.8px;padding:2px 0 11px;border-bottom:1px solid var(--line);margin-bottom:11px}
.stitch-right-head strong{display:block;font-size:14.3px;color:var(--ink)}
.stitch-right-stage{margin-top:3.3px;font-size:10.45px;font-weight:750;color:var(--muted)}
.stitch-right-head-actions{display:flex;gap:5.5px;flex:0 0 auto}
.stitch-right-head-actions button{width:auto;min-width:0;margin:0;padding:6.6px 8.8px;font-size:10.45px}
.stitch-right-setup-note{padding:11px;border:1px solid var(--line);border-radius:11px;background:var(--soft);font-size:11px;line-height:1.45;color:var(--muted)}
.stitch-right-points{display:grid;gap:11px}
.stitch-right-section{min-width:0;padding:9.9px;border:1px solid var(--line);border-radius:11px;background:var(--card)}
#rightPanelStitch .stitch-pair-side{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8.8px;width:100%;justify-content:stretch}
#rightPanelStitch .stitch-pair-info{justify-items:start;padding:0;min-width:0}
#rightPanelStitch .stitch-pair-status{line-height:1.4}
#rightPanelStitch .stitch-orientation-title{margin-top:5.5px}
#rightPanelStitch .stitch-orientation-grid{align-self:start;max-width:100%;overflow:auto}
#rightPanelStitch .stitch-pair-tabs-row{display:grid;grid-template-columns:1fr;gap:7.7px;border:0;min-width:0}
#rightPanelStitch .stitch-pair-tabs{width:100%;min-height:37.4px;padding:0 0 6.6px;border-bottom:1px solid var(--line);display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;gap:5.5px;overflow:visible;scrollbar-width:none}
#rightPanelStitch .stitch-pair-tab{min-width:63.8px;padding:6.6px 9.9px}
#rightPanelStitch .stitch-overlap-control{width:100%;padding:0;justify-content:space-between}
#rightPanelStitch .stitch-overlap-control select{min-width:121px}
#rightPanelStitch .stitch-pairs-bottom{display:block!important;margin:0;min-height:0!important;max-height:none!important}
#rightPanelStitch .stitch-pair-list{max-height:198px!important;border:0;border-radius:0}
#rightPanelStitch .stitch-pair-row{padding:6.6px 2px}
#rightPanelStitch .stitch-pair-row:last-child{border-bottom:0}
#rightPanelStitch #stitchPointsActions{display:grid;grid-template-columns:1fr 1fr;gap:6.6px;margin:0}
#rightPanelStitch #stitchPointsActions button{width:100%;min-width:0;margin:0;padding:7.7px 5.5px;font-size:10.45px}
#rightPanelStitch #stitchCreateDrawing{grid-column:1/-1}

body.stitch-workspace-active #workspace>.tool-dock{z-index:30}
body.stitch-workspace-active #workspace>.tool-dock button:disabled{opacity:.18}
body.stitch-workspace-active #stitchMatchTool:not(:disabled){opacity:1}
html[data-theme="dark"] #stitchModal.stitch-embedded-host{background:#111713}
html[data-theme="dark"] #stitchModal.stitch-embedded-host .stitch-body{background:#151b17}
html[data-theme="dark"] .stitch-right-section{background:#1d2520}
html[data-theme="dark"] .stitch-right-setup-note{background:#1d2b23}
@media(max-width:990px){#stitchModal.stitch-embedded-host.stitch-points-mode .stitch-body{padding-right:8.8px!important;padding-left:8.8px!important}}


/* JustMeasure 5.2 E4 — left workflow tabs: Obraz / Narovnání / Kalibrace. */
.app{grid-template-columns:325.6px minmax(0,1fr) 352px}
.app.measure-collapsed{grid-template-columns:325.6px minmax(0,1fr) 41.8px}
.sidebar{padding:11px 11px 11px 52.8px}
.sidebar-collapse-toolbar{padding-right:35.2px}
.left-panel-tabs{position:absolute;z-index:6;top:48.4px;left:0;display:flex;flex-direction:column;gap:5.5px;align-items:flex-start}
.left-panel-tab{width:37.4px;height:123.2px;min-width:37.4px;margin:0;padding:8.8px 0;border:1px solid var(--line);border-left:0;border-radius:0 9.9px 9.9px 0;background:#edf0ed;color:var(--muted);box-shadow:none;overflow:hidden}
.left-panel-tab span{display:block;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;font-size:11px;line-height:1;font-weight:800;letter-spacing:.02em}
.left-panel-tab:hover:not(:disabled){background:#e5eae6;color:var(--ink)}
.left-panel-tab.active{outline:0;background:var(--soft);color:var(--accent);border-color:#b9d5c5;box-shadow:inset -3.3px 0 0 var(--accent)}
.left-panel-page[hidden]{display:none!important}
.left-panel-pages{min-width:0}
.left-panel-page{min-width:0}
.left-panel-common{min-width:0}
.sidebar.collapsed .left-panel-tabs{display:flex}
body.stitch-workspace-active .left-panel-tabs{display:none}
html[data-theme="dark"] .left-panel-tab{background:#29312c;border-color:var(--line);color:#aeb8b2}
html[data-theme="dark"] .left-panel-tab:hover:not(:disabled){background:#333d37;color:#edf2ee}
html[data-theme="dark"] .left-panel-tab.active{background:#25392f;color:#78c4a4;border-color:#456354;box-shadow:inset -3.3px 0 0 #78c4a4}
@media(max-width:1210px){.app{grid-template-columns:305.8px minmax(0,1fr) 308px}.app.measure-collapsed{grid-template-columns:305.8px minmax(0,1fr) 41.8px}.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 308px}.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr) 41.8px}}
@media(max-width:990px){.app,.app.measure-collapsed{grid-template-columns:283.8px minmax(0,1fr)}.app.sidebar-collapsed,.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr)}}

/* E4 project tab + property workspace integration */
.project-panel-fields{display:grid!important;grid-template-columns:1fr;align-items:stretch;gap:9.9px;width:100%;min-width:0;flex:none!important;padding:2.2px 0 12.1px;margin-bottom:12.1px;border-bottom:1px solid var(--line)}
.project-panel-fields .header-project-field,.project-panel-fields .header-project-order{display:grid;gap:4.4px;min-width:0;flex:none!important;width:100%;font-size:9.9px;font-weight:750;color:var(--muted)}
.project-panel-fields .header-project-field>span{white-space:nowrap}
.project-panel-fields .header-project-field input{width:100%;height:35.2px;padding:6.6px 9.9px;border-radius:8.8px;font-size:12.1px}
.project-panel-fields .header-property-button{align-self:stretch;width:100%;height:36.3px;margin:1.1px 0 0;padding:0 10px;justify-content:center}
.project-panel-actions{display:grid;gap:8.8px}
.project-panel-actions>.filebtn{margin:0}
.project-panel-actions>.context-help-control-row{margin:0}
#sidebarPanel[data-left-tab="project"] #collapseAllSidebarGroups,#sidebarPanel[data-left-tab="project"] #expandAllSidebarGroups{visibility:hidden;pointer-events:none}

#propertyIdentificationModal.property-embedded-host{display:none;position:absolute;inset:0;z-index:35;width:auto;height:auto;padding:0!important;background:#f7f9f7;align-items:stretch;justify-content:stretch}
#propertyIdentificationModal.property-embedded-host .property-dialog{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none;overflow:hidden;display:flex;flex-direction:column;background:var(--card)}
#propertyIdentificationModal.property-embedded-host .help-head{position:static;flex:0 0 auto;padding:14.3px 19.8px}
#propertyIdentificationModal.property-embedded-host .property-body{flex:1 1 auto;min-height:0;grid-template-columns:minmax(286px,374px) minmax(0,1fr);overflow:hidden}
#propertyIdentificationModal.property-embedded-host .property-search-panel,#propertyIdentificationModal.property-embedded-host .property-detail-panel{min-height:0;overflow:auto}
#propertyIdentificationModal.property-embedded-host .property-foot{flex:0 0 auto}
body.property-workspace-active #workspace>.tool-dock{display:none}
body.property-workspace-active #workspace>.crop-confirm-float,body.property-workspace-active #workspace>.perspective-preview-float,body.property-workspace-active #workspace>.mesh-build-float{display:none!important}
html[data-theme="dark"] #propertyIdentificationModal.property-embedded-host{background:#151b17}
@media(max-width:990px){#propertyIdentificationModal.property-embedded-host .property-body{grid-template-columns:minmax(264px,330px) minmax(0,1fr)}}
@media(max-width:760px){#propertyIdentificationModal.property-embedded-host .property-body{grid-template-columns:1fr;overflow:auto}#propertyIdentificationModal.property-embedded-host .property-search-panel{border-right:0;border-bottom:1px solid var(--line)}}


/* E4 project property summary + compact privacy placement */
.top-actions>.privacy{display:none}
.project-property-summary{display:grid;gap:8.8px;margin-top:1.1px;padding:11px 11px 10px;border:1px solid #cfe1d7;border-radius:9.9px;background:#f5faf7}
.project-property-summary[hidden]{display:none!important}
.project-property-row{display:grid;gap:2.2px;min-width:0}
.project-property-row>span{font-size:9.35px;font-weight:800;letter-spacing:.045em;text-transform:uppercase;color:var(--muted)}
.project-property-row>b{font-size:11.55px;line-height:1.35;font-weight:750;color:var(--ink);overflow-wrap:anywhere}
.project-property-parcels{display:grid;gap:3.3px}
.project-property-parcel{display:flex;align-items:baseline;justify-content:space-between;gap:8.8px;padding:2.2px 0;border-bottom:1px solid rgba(90,110,98,.12);font-size:11.55px;line-height:1.3}
.project-property-parcel:last-child{border-bottom:0}
.project-property-parcel>b{min-width:0;overflow-wrap:anywhere}
.project-property-parcel>span{flex:0 0 auto;color:var(--muted);white-space:nowrap}
.project-property-empty{font-size:11.55px;color:var(--muted)}
.project-property-source{padding-top:5.5px;border-top:1px solid rgba(90,110,98,.12);font-size:9.35px;line-height:1.45;color:var(--muted)}
.project-privacy-details{margin-top:12.1px;border-top:1px solid var(--line);padding-top:9.9px}
.project-privacy-details summary{cursor:pointer;list-style:none;font-size:10.45px;font-weight:800;color:var(--muted);display:flex;align-items:center;gap:5.5px}
.project-privacy-details summary::-webkit-details-marker{display:none}
.project-privacy-details summary::before{content:"i";display:grid;place-items:center;width:16.5px;height:16.5px;flex:0 0 16.5px;border:1px solid #c8d5cd;border-radius:50%;font-size:9.35px;font-weight:900;color:var(--accent)}
.project-privacy-details[open] summary{color:var(--ink)}
.project-privacy-details .privacy{display:block!important;margin-top:7.7px;padding:8.8px 9.9px;border-radius:8.8px;background:#f4f6f4;text-align:left;font-size:9.9px;line-height:1.45;color:var(--muted)}
html[data-theme="dark"] .project-property-summary{background:#1f2b24;border-color:#395444}
html[data-theme="dark"] .project-property-parcel,html[data-theme="dark"] .project-property-source{border-color:rgba(190,210,198,.12)}
html[data-theme="dark"] .project-privacy-details .privacy{background:#202722}
html[data-theme="dark"] .project-privacy-details summary::before{border-color:#456354;color:#78c4a4}

/* E4 project tab — direct cadastral map action for identified property. */
.project-cadastral-load-wrap{width:100%;margin-top:-1.1px}
.project-cadastral-load-wrap[hidden]{display:none!important}
.project-cadastral-load{width:100%;min-height:36.3px;margin:0;font-size:11.55px}

/* E4 cadastral workspace UX */
.cadastral-take-geometry-float{display:none;position:absolute;z-index:31;width:auto;min-width:165px;margin:0;padding:8.8px 14.3px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.8);background:#202824;color:#fff;box-shadow:0 5.5px 19.8px rgba(0,0,0,.28);pointer-events:auto;white-space:nowrap}.cadastral-take-geometry-float.visible{display:flex}.cadastral-take-geometry-float:hover:not(:disabled){background:#303a34}.cadastral-take-geometry-float:disabled{display:none}html[data-theme="dark"] .cadastral-take-geometry-float{background:#edf2ee;color:#18201c;border-color:#fff}html[data-theme="dark"] .cadastral-take-geometry-float:hover:not(:disabled){background:#fff}body.property-workspace-active #workspace>.cadastral-take-geometry-float,body.stitch-workspace-active #workspace>.cadastral-take-geometry-float{display:none!important}.left-panel-tab:disabled{opacity:.35;cursor:not-allowed}.left-panel-tab:disabled:hover{background:#edf0ed;color:var(--muted)}html[data-theme="dark"] .left-panel-tab:disabled:hover{background:#29312c;color:#aeb8b2}

/* E10 — compact one-line measurement group headers + actions menu. */
.app{grid-template-columns:325.6px minmax(0,1fr) 385px}
.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 385px}
.measurement-group-card{overflow:visible}
.measurement-group-head{padding:7.7px 7.7px 7.7px 8.8px;border-radius:11px 11px 0 0}
.measurement-group-title-row,.measurement-group-card.general .measurement-group-title-row{display:flex;grid-template-columns:none;align-items:center;gap:4.4px;min-width:0}
.measurement-group-name{flex:1 1 auto;min-width:54px}
.measurement-group-name-input{flex:1 1 auto;min-width:54px}
.measurement-group-radio,.measurement-group-eye,.measurement-group-collapse,.measurement-group-menu,.measurement-group-labels,.measurement-group-repeat{flex:0 0 28.6px}
.measurement-group-color{flex:0 0 25.3px}
.measurement-group-menu-wrap{position:relative;flex:0 0 28.6px;width:28.6px;height:28.6px;z-index:8}
.measurement-group-menu svg{width:18.7px;height:18.7px;fill:currentColor}
.measurement-group-menu:hover,.measurement-group-menu[aria-expanded="true"]{background:rgba(13,107,71,.08);color:var(--accent);border-radius:8.8px}
.measurement-group-menu-dropdown{display:none;position:absolute;z-index:40;right:0;top:calc(100% + 5.5px);width:187px;padding:5.5px;background:#fff;border:1px solid var(--line);border-radius:9.9px;box-shadow:0 8.8px 26.4px rgba(20,35,26,.18)}
.measurement-group-menu-wrap.open .measurement-group-menu-dropdown{display:grid;gap:2.2px}
.measurement-group-menu-dropdown button{width:100%;height:auto;min-height:33px;margin:0;padding:6.6px 8.8px;border:0;border-radius:7.7px;background:transparent;color:var(--ink);display:flex;align-items:center;justify-content:flex-start;gap:7.7px;text-align:left;font-size:11px;font-weight:750;white-space:nowrap}
.measurement-group-menu-dropdown button:hover{background:var(--soft);color:var(--accent)}
.measurement-group-menu-dropdown button.danger{color:var(--danger)}
.measurement-group-menu-dropdown button.danger:hover{background:#f8ecea;color:#8f2525}
.measurement-group-menu-dropdown svg{width:17.6px;height:17.6px;fill:currentColor;flex:0 0 17.6px}
.measurement-group-menu-delete-mark{width:17.6px;flex:0 0 17.6px;text-align:center;font-size:19.8px;line-height:16px;font-weight:700}
html[data-theme="dark"] .measurement-group-menu-dropdown{background:#252e28;border-color:var(--line);box-shadow:0 8.8px 26.4px rgba(0,0,0,.35)}
html[data-theme="dark"] .measurement-group-menu-dropdown button.danger:hover{background:rgba(170,63,63,.22);color:#ffb2b2}
@media(max-width:1210px){.app{grid-template-columns:305.8px minmax(0,1fr) 345px}.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 345px}.app.measure-collapsed{grid-template-columns:305.8px minmax(0,1fr) 41.8px}.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr) 41.8px}}
@media(max-width:990px){.app,.app.measure-collapsed{grid-template-columns:283.8px minmax(0,1fr)}.app.sidebar-collapsed,.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr)}}

/* E11 — compact measurement actions menu; measurement sequence numbers stay internal only. */
.measure-item{overflow:visible}
.measurement-item-menu-wrap{position:relative;flex:0 0 26.4px;width:26.4px;height:26.4px;z-index:7}
.measurement-item-menu svg{width:16.5px;height:16.5px;fill:currentColor}
.measurement-item-menu:hover,.measurement-item-menu[aria-expanded="true"]{background:rgba(13,107,71,.08);color:var(--accent)}
.measurement-item-menu-dropdown{display:none;position:absolute;z-index:45;right:0;top:calc(100% + 5.5px);width:154px;padding:5.5px;background:#fff;border:1px solid var(--line);border-radius:9.9px;box-shadow:0 8.8px 26.4px rgba(20,35,26,.18)}
.measurement-item-menu-wrap.open .measurement-item-menu-dropdown{display:grid;gap:2.2px}
.measurement-item-menu-dropdown button{width:100%;height:auto;min-height:31px;margin:0;padding:6.6px 8.8px;border:0;border-radius:7.7px;background:transparent;color:var(--ink);display:flex;align-items:center;justify-content:flex-start;gap:7.7px;text-align:left;font-size:11px;font-weight:750;white-space:nowrap}
.measurement-item-menu-dropdown button:hover{background:var(--soft);color:var(--accent)}
.measurement-item-menu-dropdown button.danger{color:var(--danger)}
.measurement-item-menu-dropdown button.danger:hover{background:#f8ecea;color:#8f2525}
.measurement-item-menu-rename-mark,.measurement-item-menu-delete-mark{width:17.6px;flex:0 0 17.6px;text-align:center;line-height:16px}
.measurement-item-menu-rename-mark{font-size:15.4px}
.measurement-item-menu-delete-mark{font-size:19.8px;font-weight:700}
html[data-theme="dark"] .measurement-item-menu-dropdown{background:#252e28;border-color:var(--line);box-shadow:0 8.8px 26.4px rgba(0,0,0,.35)}
html[data-theme="dark"] .measurement-item-menu-dropdown button.danger:hover{background:rgba(170,63,63,.22);color:#ffb2b2}


/* E12 — flatter right-panel lists, safer menus and draggable group ordering. */
.app{grid-template-columns:325.6px minmax(0,1fr) 410px}
.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 410px}
.measure-list:not(.measurement-groups),.measurement-group-body,.helper-list{gap:0}
.measure-item{border:0;border-radius:0;padding:8.8px 2.2px;background:transparent;box-shadow:none;transition:.12s background,.12s opacity}
.measure-item:hover{border-color:transparent;background:rgba(13,107,71,.035)}
.measure-item.active{border-color:transparent;box-shadow:none;background:var(--soft);border-radius:7.7px}
.measure-item+.measure-item{border-top:1px solid var(--line)}
html[data-theme="dark"] .measure-item{background:transparent;border-color:transparent}
html[data-theme="dark"] .measure-item:hover{background:rgba(120,196,164,.055)}
html[data-theme="dark"] .measure-item.active{background:#25392f}
.measurement-group-menu-wrap.open,.measurement-item-menu-wrap.open{z-index:120}
.measurement-group-card{position:relative}
.measurement-group-name[draggable="true"]{cursor:grab;user-select:none}
.measurement-group-card.group-dragging{opacity:.5}
.measurement-group-card.group-drop-before::before,.measurement-group-card.group-drop-after::after{content:"";position:absolute;z-index:70;left:7.7px;right:7.7px;height:3px;border-radius:3px;background:var(--accent);pointer-events:none}
.measurement-group-card.group-drop-before::before{top:-6px}
.measurement-group-card.group-drop-after::after{bottom:-6px}
@media(max-width:1210px){.app{grid-template-columns:305.8px minmax(0,1fr) 365px}.app.sidebar-collapsed{grid-template-columns:41.8px minmax(0,1fr) 365px}.app.measure-collapsed{grid-template-columns:305.8px minmax(0,1fr) 41.8px}.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr) 41.8px}}
@media(max-width:990px){.app,.app.measure-collapsed{grid-template-columns:283.8px minmax(0,1fr)}.app.sidebar-collapsed,.app.sidebar-collapsed.measure-collapsed{grid-template-columns:41.8px minmax(0,1fr)}}

/* E13 — precise helper-line construction. */
.guide-precision-meta{margin-top:4.4px;color:var(--muted);font-size:10.5px;font-weight:700;line-height:1.35}
.guide-precision-actions{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,.72fr) minmax(0,1.55fr);gap:5.5px;margin-top:6.6px}
.guide-precision-actions button{min-width:0;height:29.7px;margin:0;padding:0 7.7px;border-radius:7.7px;font-size:10.5px;font-weight:800;white-space:nowrap}
.guide-precision-actions button:disabled{opacity:.42;cursor:not-allowed}
.guide-parallel-hint{margin-top:6.6px;padding:6.6px 7.7px;border-radius:7.7px;background:rgba(13,107,71,.08);color:var(--accent);font-size:10.5px;font-weight:750;line-height:1.35}
html[data-theme="dark"] .guide-parallel-hint{background:rgba(120,196,164,.09);color:#78c4a4}


/* E14 — keep long group names inside the right panel; add group rename menu item. */
.measure-panel-content{overflow-y:auto;overflow-x:hidden;min-width:0}
.measurement-groups,.measurement-group-card,.measurement-group-head,.measurement-group-title-row{min-width:0;max-width:100%;box-sizing:border-box}
.measurement-group-card{width:100%}
.measurement-group-title-row,.measurement-group-card.general .measurement-group-title-row{width:100%}
.measurement-group-name{flex:1 1 0;width:0;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.measurement-group-name-input{flex:1 1 0;width:0;min-width:0;max-width:100%}
.measurement-group-menu-rename-mark{width:17.6px;flex:0 0 17.6px;text-align:center;font-size:15.4px;line-height:16px}

/* E15 — contextual precision toolbar for selected guide lines; compact guide actions. */
.guide-precision-toolbar{display:none;position:absolute;z-index:34;align-items:center;gap:4.4px;padding:5.5px;background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:11px;box-shadow:0 7.7px 24.2px rgba(20,35,26,.2);backdrop-filter:blur(7px);pointer-events:auto}
.guide-precision-toolbar.visible{display:flex}
.guide-precision-toolbar button{width:33px;height:33px;margin:0;padding:0;border:0;border-radius:8.8px;background:#f3f5f3;color:#4d5851;display:grid;place-items:center;box-shadow:none}
.guide-precision-toolbar button:hover:not(:disabled){background:var(--soft);color:var(--accent)}
.guide-precision-toolbar button:disabled{opacity:.32;cursor:not-allowed}
.guide-precision-toolbar svg{width:18.7px;height:18.7px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
html[data-theme="dark"] .guide-precision-toolbar{background:rgba(37,46,40,.97);border-color:var(--line);box-shadow:0 7.7px 24.2px rgba(0,0,0,.38)}
html[data-theme="dark"] .guide-precision-toolbar button{background:#2b342e;color:#b7c1bb}
html[data-theme="dark"] .guide-precision-toolbar button:hover:not(:disabled){background:var(--soft);color:#78c4a4}
body.stitch-workspace-active #guidePrecisionToolbar,body.property-workspace-active #guidePrecisionToolbar{display:none!important}


/* 5.2 E18 — Consultation onboarding and support */
.trial-consultation-pill{width:auto!important;min-height:33px!important;margin:0!important;padding:5.5px 11px!important;border-radius:1098.9px!important;background:#edf6f1!important;color:var(--accent)!important;border:1px solid #c9e0d3!important;font-size:11px!important;font-weight:850!important;box-shadow:none!important;white-space:nowrap}.trial-consultation-pill[hidden]{display:none!important}.trial-consultation-pill:hover{background:#e3f0e9!important}
.trial-onboarding-help{margin-top:17.6px;padding-top:16.5px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:16.5px;text-align:left}.trial-onboarding-help[hidden]{display:none!important}.trial-onboarding-copy{display:grid;gap:4.4px;max-width:430px}.trial-onboarding-copy strong{font-size:13.2px!important;margin:0!important;color:var(--ink)}.trial-onboarding-copy span{font-size:11.5px;line-height:1.45;color:var(--muted)}.trial-onboarding-action{width:auto!important;min-width:190px!important;margin:0!important;flex:0 0 auto!important;padding:8.8px 13.2px!important;background:#edf6f1!important;border-color:#c9e0d3!important;color:var(--accent)!important;font-weight:800!important}.trial-onboarding-action:hover{background:#e3f0e9!important}
.trial-consultation-dialog{width:min(600px,94vw)}.consultation-support-intro{display:grid;gap:0}.consultation-support-intro[hidden]{display:none!important}.consultation-support-contact{margin:0 0 17.6px;font-size:13.2px;line-height:1.55;color:#465049}.consultation-support-contact a{color:var(--accent);font-weight:800;text-decoration:none}.consultation-support-contact a:hover{text-decoration:underline}.consultation-support-divider{border:0;border-top:1px solid var(--line);margin:0 0 17.6px}.consultation-support-callout{display:flex;align-items:center;justify-content:space-between;gap:17.6px}.consultation-support-callout p{margin:0;font-size:13.2px;line-height:1.55;color:#465049;max-width:390px}.consultation-support-callout button{width:auto!important;flex:0 0 auto;margin:0!important;white-space:nowrap}.trial-consultation-body{padding:19.8px}.trial-consultation-lead{margin:0 0 17.6px;font-size:13.2px;line-height:1.55;color:#465049}.trial-consultation-field{display:grid;gap:5.5px;margin-bottom:12.1px;font-size:11.5px;font-weight:800;color:var(--muted)}.trial-consultation-field input{width:100%;box-sizing:border-box}.trial-consultation-privacy{margin:2.2px 0 0;font-size:10.5px;line-height:1.45;color:var(--muted)}.trial-consultation-actions{display:flex;justify-content:flex-end;gap:8.8px;margin-top:15.4px}.trial-consultation-actions button{width:auto;margin:0}.trial-consultation-status{min-height:18px;margin-top:8.8px;font-size:11px;line-height:1.4;color:var(--accent)}.trial-consultation-status.error{color:#a63a2c}.trial-consultation-success{padding:6.6px 0 2.2px}.trial-consultation-success strong{display:block;font-size:16.5px;color:var(--ink);margin-bottom:6.6px}.trial-consultation-success p{margin:0 0 15.4px;font-size:13.2px;line-height:1.5;color:#465049}.trial-consultation-success button{width:auto;margin:0}.trial-consultation-honeypot{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important}
html[data-theme="dark"] .trial-consultation-pill,html[data-theme="dark"] .trial-onboarding-action{background:#213229!important;border-color:#3e5d4b!important;color:#b9e0c9!important}html[data-theme="dark"] .trial-consultation-pill:hover,html[data-theme="dark"] .trial-onboarding-action:hover{background:#273c31!important}html[data-theme="dark"] .trial-consultation-lead,html[data-theme="dark"] .trial-consultation-success p,html[data-theme="dark"] .consultation-support-contact,html[data-theme="dark"] .consultation-support-callout p{color:#bdc7c1}
@media(max-width:760px){.trial-consultation-pill{max-width:160px;overflow:hidden;text-overflow:ellipsis}.trial-onboarding-help{flex-direction:column;text-align:center;gap:11px}.trial-onboarding-copy{max-width:360px}.trial-onboarding-action{min-width:0!important;width:100%!important}.consultation-support-callout{flex-direction:column;align-items:stretch}.consultation-support-callout p{max-width:none}.consultation-support-callout button{width:100%!important}}

/* 5.2 E31 — unified tool hint bar and PDF region mode hover fix. */
html[data-theme="dark"] .pdf-region-modes button.active:hover:not(:disabled){background:var(--accent);color:#fff;border-color:transparent}
html[data-theme="dark"] .pdf-region-modes #pdfRegionModeSubtract.active:hover:not(:disabled){background:#b7473c;color:#fff;border-color:transparent}
.tool-hint-bar{position:absolute;z-index:25;left:11px;right:11px;bottom:72px;min-height:28.6px;display:flex;align-items:center;justify-content:center;gap:5.5px;padding:4.4px 11px;box-sizing:border-box;border:1px solid var(--line);border-radius:9.9px;background:rgba(255,255,255,.94);box-shadow:0 4.4px 15.4px rgba(20,35,26,.09);backdrop-filter:blur(7.7px);color:var(--muted);font-size:10.45px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.tool-hint-bar[hidden]{display:none!important}.tool-hint-bar strong{flex:0 0 auto;color:var(--ink);font-size:10.45px;font-weight:850}.tool-hint-bar #toolHintText{min-width:0;overflow:hidden;text-overflow:ellipsis}.tool-hint-separator{flex:0 0 auto;color:var(--muted)}.timeline.collapsed + .tool-hint-bar{bottom:54px}html[data-theme="dark"] .tool-hint-bar{background:rgba(29,36,32,.94);border-color:var(--line);box-shadow:0 4.4px 15.4px rgba(0,0,0,.22);color:#aeb9b2}html[data-theme="dark"] .tool-hint-bar strong{color:var(--ink)}body.property-workspace-active #workspace>.tool-hint-bar,body.stitch-workspace-active #workspace>.tool-hint-bar{display:none!important}
/* E33 — tool hint visibility controls */
.tool-hint-bar{padding-right:38px;pointer-events:none}
.tool-hint-close{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted);font-size:16px;font-weight:700;line-height:1;cursor:pointer;pointer-events:auto;box-shadow:none}
.tool-hint-close:hover,.tool-hint-close:focus-visible{background:var(--soft);color:var(--ink);outline:none}
.tool-hint-show{position:absolute;z-index:25;right:11px;bottom:72px;display:inline-flex;align-items:center;justify-content:center;width:28.6px;height:28.6px;margin:0;padding:0;border:1px solid var(--line);border-radius:50%;background:rgba(255,255,255,.94);color:var(--accent);font-size:12px;font-weight:850;line-height:1;box-shadow:0 4.4px 15.4px rgba(20,35,26,.09);backdrop-filter:blur(7.7px);cursor:pointer}
.tool-hint-show:hover,.tool-hint-show:focus-visible{background:var(--soft);outline:none;box-shadow:0 0 0 2px rgba(13,107,71,.12)}
.tool-hint-show[hidden]{display:none!important}.timeline.collapsed + .tool-hint-bar + .tool-hint-show{bottom:54px}
html[data-theme="dark"] .tool-hint-close{color:#aeb9b2}html[data-theme="dark"] .tool-hint-close:hover,html[data-theme="dark"] .tool-hint-close:focus-visible{background:#25372e;color:var(--ink)}
html[data-theme="dark"] .tool-hint-show{background:rgba(29,36,32,.94);border-color:var(--line);color:#78c4a4;box-shadow:0 4.4px 15.4px rgba(0,0,0,.22)}html[data-theme="dark"] .tool-hint-show:hover,html[data-theme="dark"] .tool-hint-show:focus-visible{background:#25372e;box-shadow:0 0 0 2px rgba(120,196,164,.12)}
body.property-workspace-active #workspace>.tool-hint-show,body.stitch-workspace-active #workspace>.tool-hint-show{display:none!important}

/* E45: exact supplied north-arrow toolbar SVG; recolor only at display time. */
#northArrowTool img{filter:brightness(0) saturate(100%) opacity(.58)}
#northArrowTool:hover:not(:disabled) img,#northArrowTool.active img{filter:brightness(0) saturate(100%) opacity(1)}
html[data-theme="dark"] #northArrowTool img{filter:brightness(0) invert(1) opacity(.64)}
html[data-theme="dark"] #northArrowTool:hover:not(:disabled) img,html[data-theme="dark"] #northArrowTool.active img{filter:brightness(0) invert(1) opacity(1)}

/* E46 — selected north-arrow angle editor */
.north-arrow-angle-toolbar{display:none;position:absolute;z-index:35;align-items:center;gap:6px;padding:5px 8px;background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:10px;box-shadow:0 7px 22px rgba(20,35,26,.20);backdrop-filter:blur(7px);pointer-events:auto;color:var(--text);font-size:11px;font-weight:700;white-space:nowrap}
.north-arrow-angle-toolbar.visible{display:flex}
.north-arrow-angle-toolbar label{display:flex;align-items:center;gap:5px;margin:0}
.north-arrow-angle-toolbar input{width:66px;height:30px;margin:0;padding:4px 7px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);font:700 12px Inter,system-ui,sans-serif;text-align:right;box-shadow:none}
.north-arrow-angle-toolbar input:focus{outline:2px solid color-mix(in srgb,var(--accent) 28%,transparent);border-color:var(--accent)}
.north-arrow-angle-toolbar .north-arrow-angle-unit{font-weight:800;color:var(--muted)}
html[data-theme="dark"] .north-arrow-angle-toolbar{background:rgba(37,46,40,.97);border-color:var(--line);box-shadow:0 7px 22px rgba(0,0,0,.38)}

/* E53 project calculations */
.project-calc-help{font-size:12px;line-height:1.55;color:var(--muted,#65746d);margin:0 0 15px}.project-calc-group{border:1px solid var(--border,#d6deda);border-radius:7px;margin-bottom:8px;padding:9px}.project-calc-group summary{cursor:pointer;display:flex;gap:8px;justify-content:space-between}.project-calc-group summary span{font-size:11px;opacity:.75}.project-calc-values{margin-top:10px}.project-calc-values>div{display:flex;justify-content:space-between;gap:8px;padding:4px 0}.project-calc-sources{border-top:1px solid #ddd;margin-top:7px;padding-top:7px;font-size:11px}.project-calc-sources>div{display:flex;flex-direction:column;padding:5px 0}.project-calc-sources span{opacity:.75}.right-panel-tabs{overflow-x:auto}.right-panel-tab{white-space:nowrap;flex-shrink:0}

/* E54 — compact project group totals and selectable drawing sources */
.project-calc-group{padding:7px 9px;margin-bottom:6px}
.project-calc-group summary{align-items:center;font-size:12px;line-height:1.3}
.project-calc-group summary strong{font-size:12px;font-weight:650}
.project-calc-group summary span{font-size:10px;white-space:nowrap}
.project-calc-values{margin-top:7px}
.project-calc-values>div{font-size:12px;line-height:1.35;padding:3px 0}
.project-calc-values>div b{font-size:12px}
.project-calc-sources{font-size:11px}
.project-calc-source-hint{font-size:10px;line-height:1.4;opacity:.7;margin:2px 0 5px}
.project-calc-sources label.project-calc-source{display:flex;flex-direction:row;align-items:flex-start;gap:8px;cursor:pointer;padding:5px 0}
.project-calc-source input{flex:0 0 auto;margin:2px 0 0;accent-color:var(--accent,#4da98a);cursor:pointer}
.project-calc-source-body{display:flex;flex:1;flex-direction:column;min-width:0;line-height:1.35}
.project-calc-source-body strong{font-size:11px;font-weight:600}
.project-calc-source-body small{font-size:10px;opacity:.75}
.project-calc-source.is-excluded .project-calc-source-body{opacity:.45}

/* E55: optional project-wide calculation selections in PDF report. */
.pdf-report-project-card{margin:0 0 14px}
.pdf-report-project-note{margin:0;padding:0 14px 12px;font-size:11px;line-height:1.5;color:var(--muted)}
.pdf-report-project-card .pdf-report-option-main{min-width:0}
.pdf-report-project-card .pdf-report-option-main>span:not(.pdf-report-color){min-width:0;overflow-wrap:anywhere}

/* E56 core drawing notes */
#noteTool img{width:22px;height:22px;display:block}#noteTool.active{background:#0d6b47;color:#fff}#noteTool.active img{filter:none}
.note-visibility{display:flex;gap:7px;align-items:center;margin:0 0 10px;font-size:12px}
.note-panel-info{font-size:11px;line-height:1.5;color:var(--muted,#858f89);margin:0 0 12px}
.note-list{display:flex;flex-direction:column;gap:9px}
.note-card{border:1px solid var(--border,#7d8981);border-radius:8px;padding:9px;min-width:0}
/* E57: Notes controls share the existing Measurements icon sizing and menu behavior. */
.note-card.note-card-hidden{opacity:.64}
.note-card-head{display:flex;align-items:center;gap:7.7px;margin-bottom:8px;min-width:0}
.note-card-title{flex:1;min-width:0;cursor:text;overflow-wrap:anywhere}
.note-card-actions{display:flex;gap:4.4px;margin-left:auto;flex:0 0 auto;align-items:center}
.note-card-actions .icon-btn{width:26.4px;height:26.4px;min-width:26.4px;padding:0;margin:0;font-size:15.4px;line-height:1;border-radius:7.7px}
.note-card-actions .measurement-item-menu-wrap{flex:0 0 26.4px}
.note-card .note-name-edit{margin:0 0 8px}
.note-number{background:#0d6b47;border:2px solid white;outline:1px solid #0b3022;color:white;display:flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 3px;border-radius:5px;font-size:12px;font-weight:800;box-sizing:border-box}
.note-card-body{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;cursor:text}
.note-card-body:hover{color:var(--accent)}
.note-card textarea{width:100%;min-height:78px;resize:vertical;font:12px/1.5 Inter,system-ui,sans-serif;box-sizing:border-box}
.note-edit-footer{display:flex;gap:6px;justify-content:flex-end;margin-top:7px}
.note-edit-footer button{width:auto;padding:5px 12px;font-size:12px}
.note-tooltip{position:absolute;z-index:90;max-width:280px;min-width:70px;padding:8px 10px;color:#fff;background:rgba(17,29,22,.98);border:1px solid #9dbcb0;border-radius:7px;box-shadow:0 4px 18px #0005;pointer-events:none;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.45 Inter,system-ui,sans-serif}.note-tooltip[hidden]{display:none!important}
.pdf-report-notes-option{margin-top:9px;border-top:1px solid #dce4df;padding-top:10px;font-size:13px}.pdf-report-notes-option label{display:flex;align-items:center;gap:7px}.pdf-report-notes-option small{color:#7e8881}

#noteTool img{filter:brightness(0) opacity(.58)}#noteTool:hover:not(:disabled) img,#noteTool.active img{filter:brightness(0) opacity(1)}html[data-theme='dark'] #noteTool img{filter:brightness(0) invert(1) opacity(.65)}html[data-theme='dark'] #noteTool:hover:not(:disabled) img,html[data-theme='dark'] #noteTool.active img{filter:brightness(0) invert(1) opacity(1)}

/* E59 – one cadastral coordinate point (right Measuring panel). */
.cadastral-point-panel[hidden]{display:none!important}
.cadastral-point-panel{margin-bottom:14px;padding:12px!important;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.cadastral-point-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;font-size:13px}
.cadastral-point-remove{margin:0!important;width:26px!important;height:26px!important;min-width:26px;padding:0!important;font-size:18px!important;line-height:1!important}
.cadastral-point-row{display:grid;grid-template-columns:69px minmax(0,1fr) 27px;gap:5px;align-items:center;margin:0 0 6px}
.cadastral-point-row label{font-size:10.5px;font-weight:700;margin:0;white-space:nowrap}
.cadastral-point-row input{margin:0!important;min-width:0!important;width:100%!important;padding:5px 6px!important;font-size:11px!important;font-variant-numeric:tabular-nums;height:28px!important;line-height:16px!important}
.cadastral-point-row button{margin:0!important;padding:0!important;width:27px!important;height:27px!important;font-size:14px!important}
.cadastral-point-copy-all{margin:5px 0 0!important;padding:7px!important;width:100%;font-size:11px!important}
.cadastral-point-help{font-size:10px;color:var(--muted);margin:5px 0}
/* The CAD point tool uses the app's own precision cursor; do not draw a second native crosshair. */
.cadastral-point-copy-icon{display:block;width:16px;height:16px;flex:0 0 16px;background:currentColor;-webkit-mask:url('../icons/kopirovat.svg') center/contain no-repeat;mask:url('../icons/kopirovat.svg') center/contain no-repeat}
.cadastral-point-row button{display:flex;align-items:center;justify-content:center}


/* E61: Compact two-row primary toolbar below 1790 px (optimized down to 1280 px).
   Keep the 21 controls in DOM/tab order, and fit the whole dock inside the
   canvas workspace with both side panels expanded (minimum width ~544 px).
   Contextual line/arc segment controls float below rather than forcing a
   third row. The embedded MultiStitch toolbar is intentionally unaffected. */
@media (max-width: 1789px) {
  #workspace > .tool-dock {
    display: grid;
    grid-template-columns: repeat(11, 41.8px);
    grid-template-rows: repeat(2, 39.6px);
    gap: 5.5px;
    align-content: center;
    align-items: center;
    justify-items: center;
    width: max-content;
    max-width: calc(100% - 8px);
    box-sizing: border-box;
  }
  #workspace > .tool-dock > .tool-separator { display: none; }
  #workspace > .tool-dock > button { flex: none; }
  #workspace > .tool-dock > .segment-mode.visible {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    box-sizing: border-box;
    margin: 0;
    padding: 5.5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 5px 20px rgba(20,35,26,.16);
    backdrop-filter: blur(8px);
    z-index: 1;
  }
  html[data-theme="dark"] #workspace > .tool-dock > .segment-mode.visible {
    background: rgba(29,36,32,.96);
    box-shadow: 0 5px 20px rgba(0,0,0,.3);
  }
}

/* E65: height of DMR terrain is a slightly longer field label. */
.cadastral-point-row label[for="cadastralPointHeight"]{font-size:10px}
