.template-editor{position:fixed;z-index:9999;right:14px;top:14px;width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;background:#111;color:#fff;border:1px solid #555;box-shadow:0 20px 70px #0009;font:13px/1.5 "Yu Gothic",sans-serif}
.template-editor *{box-sizing:border-box}
.template-editor__head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:13px 14px;background:#111;border-bottom:1px solid #333}
.template-editor__head strong{font-size:15px}.template-editor__min{width:34px;height:34px;padding:0!important;border-radius:50%}
.template-editor__body{padding:14px}.template-editor.is-collapsed .template-editor__body{display:none}
.template-editor__intro{margin:0 0 12px;color:#ddd}.template-editor__section{margin:12px 0;padding:12px;background:#1c1c1c;border:1px solid #363636;border-radius:8px}
.template-editor__section h3{margin:0 0 8px;font:700 13px/1.4 "Yu Gothic",sans-serif;color:#e7b85e}
.template-editor label{display:block;margin:9px 0 4px;color:#ddd;font-weight:700}.template-editor input[type="text"],.template-editor input[type="url"],.template-editor textarea,.template-editor select{display:block!important;width:100%;padding:10px 11px;border:1px solid #555;border-radius:5px;background:#080808;color:#fff;font:14px/1.45 "Yu Gothic",sans-serif}
.template-editor textarea{min-height:72px;resize:vertical}.template-editor input[type="file"]{display:none!important}.template-editor input[type="checkbox"]{display:inline-block!important;width:auto;margin-right:6px}
.template-editor__row{display:grid;grid-template-columns:1fr 1fr;gap:7px}.template-editor button{min-height:38px;padding:8px 10px;border:0;border-radius:5px;background:#eee;color:#111;font-weight:800;cursor:pointer}.template-editor button:disabled{opacity:.45;cursor:not-allowed}.template-editor button.primary{background:#e7b85e}.template-editor button.publish{width:100%;min-height:48px;background:#e7b85e;font-size:15px}
.template-editor__target{margin:7px 0;padding:8px;background:#080808;border-left:3px solid #ffdc58;color:#fff;overflow-wrap:anywhere}.template-editor__hint{display:block;margin-top:7px;color:#aaa}.template-editor__status{display:block;min-height:40px;margin-top:10px;padding:9px;background:#080808;color:#ddd;border-radius:5px}.template-editor__status.ok{color:#8ff0a4}.template-editor__status.error{color:#ff9a9a}
.template-editor__result{margin-top:12px;padding:12px;background:#102216;border:1px solid #2e8b57;border-radius:8px}.template-editor__result[hidden],.template-editor__selection[hidden]{display:none}.template-editor__result a{display:block;margin:5px 0;color:#8ecbff;overflow-wrap:anywhere}.template-editor__copy{width:100%;margin-top:7px}
.template-editor__result .template-editor__sms{display:block;margin-top:12px;padding:12px;border-radius:5px;background:#e7b85e;color:#111;text-align:center;text-decoration:none;font-weight:900}
.editor-selected{outline:4px solid #ffdc58!important;outline-offset:3px}.editor-active [contenteditable="true"]{outline:1px dashed #e7b85e;outline-offset:3px;cursor:text}.editor-active [contenteditable="true"]:focus{outline:3px solid #e7b85e}.template-user-text{white-space:pre-line}.template-editor__badge{display:inline-block;padding:3px 7px;border-radius:99px;background:#2a2a2a;color:#ddd;font-size:11px}
@media(max-width:800px){.template-editor{top:auto;right:8px;bottom:8px;width:calc(100vw - 16px);max-height:72dvh}.template-editor__head{padding:10px 12px}.template-editor__body{padding:11px}.template-editor__section{padding:10px}.template-editor__row{grid-template-columns:1fr}.template-editor button{min-height:44px}}
