/* V56: seven control families, scoped to the six editor parameter panels. */
.editor-modules{--control-unit:20px;--control-gap:4px;--text-select-width:96px;--image-select-width:110px;--value-width:38px;--control-font:500 10px 'DM Sans',Arial,sans-serif}
.editor-modules .editor-module .toolsBox,.editor-modules .editor-module .color-module-body{height:auto!important;min-height:0!important;padding-top:0!important}
.editor-modules .editor-module .toolsTable{border-collapse:separate;border-spacing:0;margin:0!important}
.editor-modules .editor-module .toolsTable tr,.editor-modules .editor-module .toolsTable td{height:var(--control-unit)!important;vertical-align:middle!important}
.editor-modules .editor-module .toolsTitleCell{padding:0 6px 0 0!important;font:var(--control-font)!important;line-height:1.2!important}
.editor-modules .editor-module .toolsEditCell{padding:0!important}
.editor-modules .editor-module .tools3rdCell{width:var(--value-width)!important;padding:0 0 0 6px!important}
/* 1 — payload: three units. */
.editor-modules .editor-module textarea#text{height:calc(3 * var(--control-unit) + 2 * var(--control-gap))!important;min-height:calc(3 * var(--control-unit) + 2 * var(--control-gap))!important;max-height:calc(3 * var(--control-unit) + 2 * var(--control-gap))!important;padding:6px!important;font:var(--control-font)!important;line-height:1.35!important}
/* 2 — actions: the same compact control as Undo/Redo. */
.editor-modules .editor-module .editor-history-actions button,
.editor-modules .editor-module .editor-advanced-content,
.editor-modules .editor-module #editDots{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;height:var(--control-unit)!important;min-height:var(--control-unit)!important;min-width:62px!important;max-width:100%;padding:0 6px!important;margin:0;border:1px solid #4b5358!important;border-radius:2px!important;background:#292e32!important;color:#d8dde0!important;font:600 9px 'DM Sans',Arial,sans-serif!important;line-height:1!important;cursor:pointer;text-transform:uppercase!important}
.editor-modules .editor-module #editDots{display:flex;margin:var(--control-gap) auto 0}
.editor-modules .editor-module .editor-history-actions{gap:var(--control-gap);margin:var(--control-gap) 0 0!important}
.editor-modules .editor-module .editor-history-actions button:hover,.editor-modules .editor-module .editor-advanced-content:hover,.editor-modules .editor-module #editDots:hover{background:#343a3e!important}
/* 3 — text selects: identical width, height, typography and padding. */
.editor-modules .editor-module .toolsTable select,.editor-modules .editor-module .color-mode-select{box-sizing:border-box;width:var(--text-select-width)!important;min-width:var(--text-select-width)!important;max-width:100%!important;height:var(--control-unit)!important;min-height:var(--control-unit)!important;margin:0!important;padding:0 3px!important;border:1px solid #42494e!important;border-radius:2px!important;background:#15181b!important;color:#e2e6e8!important;font:var(--control-font)!important;letter-spacing:normal!important;text-transform:none!important}
/* 4 — image selects: two units, same trigger and image bounds. */
.editor-modules .editor-module[data-module="modules"] .toolsTitleCell{width:30px!important;padding-right:4px!important}
.editor-modules .editor-module .sel-box,.editor-modules .editor-module .sel-box-select{box-sizing:border-box;width:var(--image-select-width)!important;min-width:0!important;max-width:100%!important}
.editor-modules .editor-module .sel-box-select{height:calc(2 * var(--control-unit) + var(--control-gap))!important;min-height:calc(2 * var(--control-unit) + var(--control-gap))!important;padding:3px 18px 3px 3px!important;font:var(--control-font)!important}
.editor-modules .editor-module .sel-box-select:before{top:calc(50% - 4px)!important;right:6px!important}
.editor-modules .editor-module .sel-box-select img{width:calc(2 * var(--control-unit) - 8px)!important;height:calc(2 * var(--control-unit) - 8px)!important;object-fit:contain}
/* 5 — sliders with a uniform right-hand numeric box. */
.editor-modules .editor-module .toolsTable input.numInd,.editor-modules .editor-module .toolsTable input.numInf{box-sizing:border-box;width:var(--value-width)!important;min-width:var(--value-width)!important;height:var(--control-unit)!important;min-height:var(--control-unit)!important;padding:0 3px!important;text-align:center;font:var(--control-font)!important;font-variant-numeric:tabular-nums}
.editor-modules .editor-module .ui-slider{height:3px!important;margin:0 5px!important}
.editor-modules .editor-module .ui-slider-handle{box-sizing:border-box;width:14px!important;height:14px!important;top:-6px!important;margin-left:-7px!important}
/* 6 — checkboxes: one row, one checkbox size. */
.editor-modules .editor-module .toolsTable input[type=checkbox]{appearance:auto;box-sizing:border-box;width:14px!important;height:14px!important;min-height:0!important;margin:0 4px 0 0!important;vertical-align:middle;accent-color:#cbd2d6}
/* 7 — color cells: two units, with the same swatch size as image choices. */
.editor-modules .editor-module .color-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--control-gap)}
.editor-modules .editor-module .color-channel{height:calc(2 * var(--control-unit) + var(--control-gap))!important;min-height:calc(2 * var(--control-unit) + var(--control-gap))!important;box-sizing:border-box;padding:3px!important;gap:4px}
.editor-modules .editor-module .color-channel i{flex:0 0 22px;width:22px;height:calc(2 * var(--control-unit) - 8px);box-sizing:border-box}
.editor-modules .editor-module .color-sync-row{height:var(--control-unit);min-height:var(--control-unit);margin:var(--control-gap) 0 0;gap:4px}
.editor-modules .editor-module :is(button,select,input,textarea):focus-visible{outline:2px solid #ccd4d8!important;outline-offset:2px}
@media(min-width:1180px){
 .editor-tooldeck,.editor-modules,.editor-modules>tbody,.editor-modules .editor-modules-row{height:auto!important}
 .editor-modules .editor-module{height:auto!important;min-height:0!important;padding-bottom:6px!important}
 body:not(.intro-active) #editor{top:calc(60px + var(--editor-deck-height,190px))!important}
}
@media(max-width:640px){
 .editor-modules{--control-unit:32px;--control-gap:6px;--text-select-width:158px;--image-select-width:158px;--value-width:46px;--control-font:500 12px 'DM Sans',Arial,sans-serif}
 .editor-modules .editor-module .editor-history-actions button,.editor-modules .editor-module .editor-advanced-content,.editor-modules .editor-module #editDots{font-size:11px!important;min-width:76px!important}
 .editor-modules .editor-module[data-module="modules"] .toolsTitleCell{width:72px!important}
 .editor-modules .editor-module .toolsTable input[type=checkbox]{width:18px!important;height:18px!important}
 .editor-modules .editor-module .ui-slider-handle{width:22px!important;height:22px!important;top:-10px!important;margin-left:-11px!important}
 .editor-modules .editor-module .color-channel i{flex-basis:32px;width:32px}
}
/* Alpha preview: checkerboard belongs to the image, never behind option text. */
.editor-modules .editor-module .sel-box[fieldName="bitsStyle"] img,.editor-modules .editor-module .sel-box[fieldName="finderDotsStyle"] img{background-color:#bbb!important;background-image:conic-gradient(#eee 25%,#aaa 0 50%,#eee 0 75%,#aaa 0)!important;background-size:10px 10px!important;border:1px solid #777!important;box-sizing:border-box}
.editor-modules .editor-module[data-module="modules"] .toolsTable td:not(.toolsTitleCell){width:auto!important}
.editor-modules .editor-module[data-module="modules"] .toolsTable td>div{width:var(--image-select-width)!important}
.editor-modules .editor-module[data-module="modules"] .sel-box,.editor-modules .editor-module[data-module="modules"] .sel-box-select{width:var(--image-select-width)!important;max-width:none!important}
.editor-modules .editor-module .ui-slider{position:relative}
.editor-modules .editor-module .ui-slider-handle{position:absolute!important;display:block!important}
.editor-modules .editor-module .color-module-body{padding-top:0!important}
.editor-modules .editor-module #QRPadding{width:var(--text-select-width)!important;min-width:var(--text-select-width)!important;max-width:none!important;height:var(--control-unit)!important;min-height:var(--control-unit)!important}

/* Five equal tracks. A two/three-track control includes the intervening gaps. */
.editor-modules .editor-module .editor-control-grid{
 display:grid;grid-template-rows:repeat(5,var(--control-unit));grid-template-columns:minmax(0,1fr);
 gap:var(--control-gap);height:calc(5 * var(--control-unit) + 4 * var(--control-gap));
 padding:0!important;margin:0!important;min-height:0;
}
.editor-modules .editor-module .editor-control-grid :is(.toolsBox,.toolsTable,.toolsTable>tbody){display:contents!important}
.editor-modules .editor-module .toolsTable tr{min-height:0;height:var(--control-unit)!important;align-items:center;gap:0}
.editor-modules .editor-module .toolsTable tr:not([style*="display:none"]):not([style*="display: none"]){display:flex!important}
.editor-modules .editor-module .toolsTable td{box-sizing:border-box;min-width:0;height:auto!important;padding-top:0!important;padding-bottom:0!important}
.editor-modules .editor-module .toolsTitleCell{flex:0 0 var(--label-width,60px);width:var(--label-width,60px)!important}
.editor-modules .editor-module .toolsEditCell{flex:1;width:auto!important}
.editor-modules .editor-module .tools3rdCell{flex:0 0 calc(var(--value-width) + 6px);width:calc(var(--value-width) + 6px)!important}
.editor-modules .editor-module[data-module="content"]{--label-width:70px}
.editor-modules .editor-module[data-module="modules"]{--label-width:40px}
.editor-modules .editor-module[data-module="structure"]{--label-width:78px}
.editor-modules .editor-module[data-module="advanced"]{--label-width:76px}
.editor-modules .editor-module[data-module="content"] .toolsTable tr:first-child{grid-row:1 / span 3;height:100%!important}
.editor-modules .editor-module[data-module="content"] .toolsTable tr:first-child td{height:100%!important}
.editor-modules .editor-module[data-module="content"] textarea#text{display:block;margin:0!important;width:100%!important;box-sizing:border-box}
.editor-modules .editor-module[data-module="content"] .toolsTable tr:nth-child(2){grid-row:4}
.editor-modules .editor-module .editor-history-actions,.editor-modules .editor-module #editDots{grid-row:5;align-self:center;justify-self:center;margin:0!important;display:flex;align-items:center;justify-content:center;height:var(--control-unit)}
.editor-modules .editor-module[data-module="modules"] .toolsTable tr{grid-row:span 2;height:100%!important}
.editor-modules .editor-module .sel-box{position:relative!important;top:auto!important;left:auto!important;margin:0!important}
.editor-modules .editor-module .color-channel-grid{grid-row:1 / span 4;display:grid;grid-template-rows:repeat(2,minmax(0,1fr));height:100%;margin:0!important;padding:0!important}
.editor-modules .editor-module .color-sync-row{grid-row:5;margin:0!important;padding:0!important;align-self:center}
.editor-modules .editor-module h4{margin-bottom:5px!important}
@media(min-width:1180px){
 .editor-modules .editor-module{height:156px!important;min-height:156px!important;box-sizing:border-box}
}
@media(max-width:640px){
 .editor-modules .editor-module{--label-width:90px}
 .editor-modules .editor-module[data-module="content"]{--label-width:100px}
 .editor-modules .editor-module[data-module="modules"]{--label-width:72px}
 .editor-modules .editor-module[data-module="advanced"]{--label-width:100px}
}

/* V57: exactly 2 + 1 + 2 rows, including the finder-mode switch. */
.editor-module[data-module="modules"] .finder-mode-row {grid-row:3!important;height:var(--control-unit)!important;justify-content:center;}
.finder-mode-row label{display:flex;align-items:center;gap:4px;font:var(--control-font);white-space:nowrap;}
.editor-module[data-module="modules"] .toolsTable tr:last-child{grid-row:4 / span 2!important;}
#finderDotsSelector[hidden], .sel-box[hidden]{display:none!important;}
[fieldName="finderDotsStyle"] img{background:repeating-conic-gradient(#aaa 0% 25%,#eee 0% 50%) 0 / 8px 8px;}

.intro-help{color:inherit;font:500 11px Arial,sans-serif;white-space:nowrap;margin-left:16px;}
@media(max-width:640px){.intro-help{font-size:10px;margin-left:8px;}.intro-nav .intro-nav-meta{display:none;}}

/* Explicit hand tool works over the QR overlay, including its handles. */
.workspace-hand #QRcodeCanvas,.workspace-hand #QRcodeCanvas *{pointer-events:none!important;}
.workspace-hand #editorzoomable,.workspace-hand #ImageContainer{cursor:grab!important;}
.editor-workspace-hand[aria-pressed="true"]{background:#62676b!important;color:#fff!important;}
