.mm-template{margin:24px 0;padding:24px;border:1px solid var(--border,#dce3ee);border-radius:16px;background:var(--surface,#fff);color:var(--text,#17243b)}
.mmt-header,.mmt-footer{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.mmt-header h2{margin:0 0 8px;font-size:21px}.mmt-header p,.mmt-upload p,.mmt-controls p,.mmt-footer>span{font-size:13px;line-height:1.7;color:#637086}.mmt-header p{margin:0}.mmt-tabs{display:flex;gap:8px;margin:20px 0}.mmt-tabs [aria-pressed=true]{background:#edf2ff;border-color:#002fa7;color:#002fa7}.mmt-upload{padding:16px;background:#f5f7fb;border-radius:10px;margin-bottom:20px}.mmt-upload p{margin:10px 0 0}.mmt-workspace{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:24px}.mmt-preview{min-width:0;background:#f3f5f8;padding:16px;border-radius:12px}.mmt-board{position:relative;max-width:100%;margin:auto;touch-action:none;user-select:none;background:repeating-conic-gradient(#f1f1f1 0% 25%,#fff 0% 50%) 50%/18px 18px}.mmt-board canvas{display:block;width:100%;height:100%;object-fit:contain}.mmt-selecting{cursor:crosshair}.mmt-selection{position:absolute;box-sizing:border-box;border:2px solid #002fa7;cursor:move;touch-action:none;outline-offset:4px}.mmt-selection:focus-visible{outline:3px solid #ffbc37}.mmt-selection-label{position:absolute;left:-2px;bottom:100%;background:#002fa7;color:#fff;padding:3px 7px;white-space:nowrap;font-size:11px}.mmt-resize{position:absolute;right:-10px;bottom:-10px;width:22px;height:22px;background:#fff;border:2px solid #002fa7;border-radius:5px;cursor:nwse-resize;touch-action:none}.mmt-empty{min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:#637086;gap:12px}.mmt-empty p{margin:0}.mmt-empty strong{font-size:18px;color:#243652}.mmt-dimensions{text-align:center;font-size:12px;color:#637086;margin:12px 0 0}.mmt-controls{min-width:0}.mmt-controls h3{font-size:15px;margin:0 0 8px}.mmt-controls label{display:block;font-size:13px;font-weight:600;margin:20px 0 8px}.mmt-controls input[type=number]{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:10px;border:1px solid #ccd5e3;border-radius:8px;background:#fff;color:#17243b}.mmt-controls input[type=range]{width:100%;margin:8px 0 16px;accent-color:#002fa7}.mmt-controls .mm-actions{gap:8px}.mmt-controls .mm-button{font-size:13px;padding:9px 12px}.mmt-hint{margin-top:18px}.mmt-save-state{font-size:13px;font-weight:600;margin:18px 0 10px}.mmt-footer{align-items:center;border-top:1px solid #e4e9f1;padding-top:20px;margin-top:20px}.mmt-message{color:#275b42;font-size:13px}.mmt-error{color:#a62731;background:#fff2f2;padding:12px;border-radius:8px;font-size:13px}.mmt-default{background:#f5f7fb;padding:24px;border-radius:12px}.mmt-default h3{margin-top:0}.mm-template button:focus-visible{outline:3px solid #91b5ff;outline-offset:2px}.mm-template button:disabled{cursor:not-allowed;opacity:.5}
@media(max-width:760px){.mm-template{padding:16px;margin:16px 0}.mmt-workspace{grid-template-columns:minmax(0,1fr);gap:20px}.mmt-preview{padding:12px}.mmt-header{gap:10px}.mmt-header h2{font-size:19px}.mmt-tabs{margin:16px 0}.mmt-footer{align-items:stretch;flex-direction:column;gap:12px}.mmt-footer .mm-actions{width:100%}.mmt-footer .mm-actions button{flex:1}.mmt-controls .mm-button{min-height:40px}.mmt-resize{width:28px;height:28px;right:-13px;bottom:-13px}.mmt-upload .mm-actions{align-items:stretch}.mmt-upload .mm-actions button{white-space:normal}.mmt-empty{min-height:230px}}
.mmt-default-image{display:block;width:100%;max-width:420px;height:auto;margin:20px auto 0;border-radius:10px}
.mmt-style{border:0;border-bottom:1px solid #e4e9f1;padding:0 0 18px;margin:0 0 22px;min-width:0}.mmt-style legend{padding:0;font-size:15px;font-weight:700;margin-bottom:14px}.mmt-style-options{display:flex;gap:20px}.mmt-style-options label{display:flex;align-items:center;gap:7px;margin:0;font-weight:400}.mmt-style-options input{accent-color:#002fa7}.mmt-style .mmt-color-label{margin:18px 0 8px}.mmt-color{display:flex;gap:10px;align-items:center}.mmt-color input[type=color]{width:44px;height:40px;padding:3px;flex:none;border:1px solid #ccd5e3;border-radius:7px;background:#fff;cursor:pointer}.mmt-color input[type=text]{min-width:0;width:100%;height:40px;padding:8px 10px;border:1px solid #ccd5e3;border-radius:7px;background:#fff;color:#17243b;font:14px ui-monospace,monospace}.mmt-color input[aria-invalid=true]{border-color:#a62731}.mmt-style p{margin-bottom:0}.mmt-style .mmt-color-error{color:#a62731}.mmt-style:disabled{opacity:.55}
