.label-editor{display:block;width:100%;min-width:0;margin:0;background:#f4f6fb;color:#152441;font:15px/1.5 Arial,sans-serif;isolation:isolate}
.label-editor [hidden]{display:none!important}
.label-editor .editor-main{width:100%;max-width:1320px;margin:auto;padding:32px 24px}
.label-editor .workspace{margin:0;width:100%;max-width:none;min-width:0}
.label-editor .workspace>aside,.label-editor .workspace>.preview-panel{width:auto;min-width:0;margin:0;float:none;grid-column:auto;grid-row:auto}
.label-editor nav{position:static;width:auto;min-width:0;max-width:none;float:none}
.label-editor .actions{flex-wrap:wrap}
.label-editor .actions button{flex:1 1 auto}
.label-editor #fields label{min-width:0}
/* Template fields share the full sidebar width, including brand and article. */
.label-editor #fields>label{grid-column:1/-1}
/* Keep the export area compact; validation errors remain visible. */
.label-editor .preview-panel>.hint,
.label-editor .preview-panel:has(#download:not(:disabled))>#status,
.label-editor #export-status:empty{display:none}
.label-editor .layout-position-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px;margin-top:8px}
.label-editor .layout-position-options button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;max-width:none;width:100%;padding:7px 5px;border:1px solid #d5deed;border-radius:10px;background:transparent;color:#567196;font:600 12px/1.2 Arial,sans-serif;cursor:pointer}
.label-editor .layout-position-options button > svg{display:block;width:58px;max-width:100%;height:40px}
.label-editor .layout-position-options button[aria-pressed=true]{border-color:#0867f2;background:#edf3ff;color:#0867f2}
.label-editor .layout-position-options button:focus-visible{outline:2px solid #0867f2;outline-offset:2px}
html[data-theme=dark] .label-editor .layout-position-options button{color:#b4c8e3;border-color:#39506c}
html[data-theme=dark] .label-editor .layout-position-options button[aria-pressed=true]{background:#243653;color:#83b5ff;border-color:#599aff}
/* Keep hidden formatting checkboxes out of the global switch layout. */
.label-editor #custom-editor .icon-toolbar .format-toggle{width:30px;min-width:30px;height:30px;flex:0 0 30px}
.label-editor #custom-editor .format-toggle input[type="checkbox"]{position:absolute;inset:0;z-index:1;width:30px;height:30px;min-width:0;max-width:30px;margin:0!important;padding:0;opacity:0;flex:none}
.label-editor #custom-editor .format-toggle input[type="checkbox"]::after{content:none}
.label-editor #custom-editor .icon-toolbar .compact-font{height:30px}
.label-editor #custom-editor .icon-toolbar .compact-font select{height:30px;min-height:30px;margin:0!important;padding:5px!important;box-sizing:border-box}
.label-editor #print-label{display:none}
html[data-theme=dark] .label-editor{background:#111722;color:#e5eaf3}
@media(max-width:600px){.label-editor .editor-main{padding:20px 12px}.label-editor .workspace>aside,.label-editor .preview-panel{padding:16px}}
/* Printing deliberately affects only visibility; no interactive shell styles change. */
@media print{
  body:has(.label-editor)>main{display:block!important}
  body:has(.label-editor) *{visibility:hidden!important}
  body .label-editor #print-label,body .label-editor #print-label *{visibility:visible!important}
  body .label-editor #print-label{display:block!important;position:fixed!important;top:0!important;left:0!important;margin:0!important;padding:0!important}
  .label-editor #print-label>svg{display:block;width:100%;height:100%}
  .label-editor #click-spark,.label-editor #batch-pdf-progress{display:none!important}
}

/* Keep layout names and previews inside their own responsive choice. */
.label-editor .layout-position-options button{justify-content:flex-start;padding:9px 7px;box-sizing:border-box}
.label-editor .layout-position-options button > span{display:block;max-width:100%;overflow-wrap:anywhere;text-align:center}
.label-editor .layout-position-preview{display:grid;place-items:center;width:100%;height:72px;margin-bottom:5px}
.label-editor .layout-position-preview > svg{display:block;width:100%;height:72px}
/* Reserve a permanent action gutter, including full-information textareas. */
.label-editor #fields .clearable-value:has(.paste-value)>input,
.label-editor #fields .clearable-value:has(.paste-value)>textarea,
.label-editor #custom-editor .clearable-value:has(.paste-value)>input,
.label-editor #custom-editor .clearable-value:has(.paste-value)>textarea{padding-right:72px;box-sizing:border-box}
.label-editor .clearable-value .paste-value:hover,
.label-editor .clearable-value .clear-value:hover{background:#edf3ff;color:#245cc3}
html[data-theme=dark] .label-editor .clearable-value .paste-value,
html[data-theme=dark] .label-editor .clearable-value .clear-value{color:#b8c7dc}
html[data-theme=dark] .label-editor .clearable-value .paste-value:hover,
html[data-theme=dark] .label-editor .clearable-value .clear-value:hover{background:#31435c;color:#e9f1ff}
