#templates-dialog{background:var(--n140-surface,#fffefa);width:min(960px,calc(100vw - 32px));max-width:calc(100vw - 24px);box-sizing:border-box;padding:24px}#templates-dialog .dialog-title{gap:12px;align-items:center}#templates-dialog .dialog-title h2{margin:0;min-width:0}#templates-dialog .template-body{min-width:0}#templates-dialog input,#templates-dialog textarea{box-sizing:border-box;max-width:100%;width:100%}#templates-dialog input[type=checkbox]{width:auto}#templates-dialog .template-library-head,#templates-dialog .template-library-filters{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:16px 0}#templates-dialog .template-library-filters>label{flex:1;min-width:180px}#templates-dialog .template-kind{display:flex;gap:4px;flex-wrap:wrap}#templates-dialog .template-kind button{padding:9px 12px;border-radius:12px}#templates-dialog .template-kind [aria-pressed=true]{background:#246b4a;color:#fff}#templates-dialog .template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}#templates-dialog .template-card{border:1px solid var(--n140-line,#c4d8c7);border-radius:18px;padding:18px;background:var(--n140-surface,#fffefa);min-width:0;overflow-wrap:anywhere}#templates-dialog .template-card h3{margin:12px 0 8px}#templates-dialog .template-card p{margin:8px 0 14px}#templates-dialog small{display:block;color:var(--muted,#52685e)}#templates-dialog .template-card-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;border-top:1px solid var(--n140-line,#c4d8c7);padding-top:12px}#templates-dialog .template-card-more{margin-top:12px}#templates-dialog .template-card-more button{display:block;margin:6px 0;text-align:left}#templates-dialog .template-tree{margin:16px 0;border:1px solid var(--n140-line,#c4d8c7);border-radius:14px;padding:12px;overflow-wrap:anywhere}#templates-dialog .template-tree details{padding:10px 0;border-top:1px solid var(--n140-line,#c4d8c7)}#templates-dialog .template-tree summary{display:list-item;padding:4px}#templates-dialog .template-tree-title{display:inline-block;max-width:100%}#templates-dialog .template-tree ul{padding-left:22px}#templates-dialog .template-tree li{margin:10px 0}#templates-dialog .template-portable-note{padding:14px;border-radius:12px;background:var(--n140-tint,#edf3e9)}#templates-dialog .save-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}#templates-dialog .template-form,#templates-dialog .template-edit-form,#templates-dialog .template-import-form{display:grid;gap:16px}#templates-dialog .template-form label{margin:0}#templates-dialog .file-checkbox{display:flex;flex-direction:row;align-items:flex-start;gap:10px}#templates-dialog .template-error{color:#9e3428}#templates-dialog button{white-space:normal;max-width:100%}@media(max-width:620px){#templates-dialog{padding:18px;width:calc(100vw - 24px)}#templates-dialog .template-grid{grid-template-columns:minmax(0,1fr)}#templates-dialog .template-library-filters>label{flex-basis:100%}#templates-dialog .template-card{padding:14px}#templates-dialog .template-card-actions button{min-height:44px}#templates-dialog .template-kind{width:100%}#templates-dialog .template-kind button{flex:1}#templates-dialog .save-actions button{flex:1}}
