/* Upload inputs remain structural, hidden controls inside their visible labels. */
#editor label.button input[type=file]{display:none!important}
#editor .body-toolbar{flex-wrap:wrap}
#editor .body-toolbar>button,#editor .body-toolbar>label.button{height:32px;min-height:32px;margin:0}
#editor .editor-meta label.button{width:max-content;max-width:100%;margin:0 0 12px}
#editor .editor-cover-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
#editor .editor-cover-actions label.button{margin:0}
.ek-dialog{width:min(880px,94vw);max-height:90dvh;border:1px solid #e5ddd3;border-radius:14px;padding:26px;background:#fcfbf9;color:#555967}
.ek-dialog::backdrop{background:#24201e57;backdrop-filter:blur(3px)}
.ek-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.ek-head h2{font-size:21px;margin:4px 0 8px}.ek-head p{font-size:12px;margin:0;line-height:1.8}.ek-head>button{font-size:23px;padding:0;width:32px;height:32px;min-height:32px}
.ek-dialog form{display:grid;gap:16px}.ek-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ek-fields>label{display:grid;gap:8px;font-size:12px;min-width:0}.ek-dialog input:not([type=checkbox]),.ek-dialog select,.ek-dialog textarea{width:100%;min-width:0;box-sizing:border-box;font:inherit;font-size:13px;background:#fff}.ek-dialog select,.ek-dialog input:not([type=checkbox]){height:40px}.ek-dialog textarea{line-height:1.9;resize:vertical}
.ek-scope-bar,.ek-file-tools,.ek-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ek-mode{display:flex;gap:5px;background:#f0ece6;border-radius:8px;padding:4px}.ek-mode>button{height:32px!important;min-height:32px!important;border:0;background:transparent;font-size:12px;padding:0 12px!important;box-shadow:none}.ek-mode>button.active{background:white;color:#b87d4d;box-shadow:0 1px 4px #5443330e}
.ek-check{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.8;margin:0}.ek-dialog .ek-check input{width:16px;height:16px;margin:2px 0 0;flex:0 0 16px}.ek-file-tools{justify-content:flex-start}.ek-file-tools input{flex:1;min-width:140px!important}.ek-file-tools button{height:32px!important;min-height:32px!important;font-size:11px;padding:0 10px!important}
.ek-files{max-height:230px;overflow:auto;border:1px solid #e8e1d9;border-radius:9px;background:white;padding:0 14px}.ek-file{display:flex;align-items:center;gap:10px;margin:0;padding:13px 0;border-bottom:1px solid #f0ece7}.ek-file:last-child{border:0}.ek-file>input{width:16px;height:16px;flex:0 0 16px;margin:0}.ek-file>span:first-of-type{flex:1;min-width:0}.ek-file strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}.ek-file small{display:block;font-size:11px;line-height:1.7;color:#a19a93;margin-top:4px}.ek-file-status{font-size:10px;color:#a49787;flex-shrink:0}.ek-empty{text-align:center;font-size:12px;color:#a39a91;padding:24px 12px}.ek-selection{font-size:12px;color:#9c8265;margin:0;line-height:1.8}.ek-selection.invalid,.ek-error{color:#b36251}.ek-error{background:#fff0ea;border:1px solid #efd6ca;padding:12px 15px;border-radius:8px;font-size:12px;line-height:1.8}
.ek-writing{grid-template-columns:1fr}.ek-consent{background:#f6f2ec;padding:12px 14px;border-radius:8px;color:#8e7c69}.ek-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid #e9e2d9;padding-top:18px}.ek-footer p{font-size:11px;line-height:1.8;color:#a39586;margin:0;max-width:470px}.ek-footer button{flex-shrink:0}.ek-task{font-size:12px;color:#a27f59;background:#f9f2e7;padding:14px;border-radius:8px;line-height:1.9}.ek-task.failed{color:#b36251;background:#fff0ea}.ek-task button{font-size:11px;height:28px!important;min-height:28px!important}.ek-result{border:1px solid #e5ddd2;border-radius:10px;background:white;padding:16px}.ek-result-head strong{font-size:14px;color:#866c51}.ek-result-head button{font-size:12px;height:32px!important;min-height:32px!important}.ek-result-notice,.ek-result details{font-size:12px;line-height:1.8;color:#9e8a73}.ek-result details{margin-top:14px}.ek-result summary{cursor:pointer}.ek-result-sources{max-height:180px;overflow:auto}.ek-result-sources p{font-size:11px;line-height:1.8;border-bottom:1px solid #f0ece7;padding-bottom:10px}
@media(max-width:650px){.ek-dialog{padding:18px}.ek-fields{grid-template-columns:1fr}.ek-footer{align-items:stretch;flex-direction:column;gap:12px}.ek-footer button{width:100%}.ek-file-tools{gap:8px}.ek-file-tools input{flex-basis:100%}.ek-scope-bar{gap:10px}.ek-mode{flex:1}.ek-mode>button{flex:1}#editor .body-toolbar>span{flex-basis:100%}}
.ek-footer{position:sticky;bottom:-26px;z-index:1;background:#fcfbf9;box-shadow:0 -10px 12px #fcfbf9;padding-bottom:20px}
.ek-footer-copy{min-width:0;display:grid;gap:8px}.ek-footer .ek-consent{padding:0;background:transparent;font-size:11px}
@media(max-width:650px){.ek-footer{bottom:-18px;padding-bottom:14px}}
.ek-task progress{display:block;width:100%;height:7px;margin-top:10px;accent-color:#b58b60}
