#reply-template-open { display:block; width:100%; margin:0 0 12px; text-align:left; }
.reply-suggestions-head,.reply-suggestion-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.reply-suggestions-head { margin-bottom:5px; }
.reply-suggestions-head button { padding:5px 9px; font-size:12px; }
.reply-suggestion-actions { flex:none; flex-wrap:wrap; }
.reply-template-manager { width:min(1120px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:22px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:white; overflow:auto; }
.reply-template-manager::backdrop { background:rgba(21,37,29,.4); }
.reply-template-head { display:flex; justify-content:space-between; align-items:start; gap:14px; margin-bottom:14px; }
.reply-template-head h2,.reply-template-head h3 { margin:0; }
.reply-template-head p,.reply-template-hint { margin:5px 0 10px; color:var(--muted); font-size:12px; }
.reply-template-head > button { flex:none; }
.reply-template-grid { display:grid; grid-template-columns:minmax(240px,.85fr) minmax(0,2fr); gap:22px; }
.reply-template-library { min-width:0; }
.reply-template-actions { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:12px; }
.reply-template-actions button { padding:7px 10px; font-size:12px; }
.reply-template-list { margin:8px 0 0; padding:0; list-style:none; max-height:65vh; overflow:auto; }
.reply-template-list button { display:block; width:100%; padding:11px; text-align:left; color:var(--ink); background:white; border:1px solid transparent; font-size:13px; overflow-wrap:anywhere; }
.reply-template-list button:hover { background:var(--paper); }
.reply-template-list button[aria-current="true"] { border-color:#b7d5c4; background:var(--accent-soft); }
.reply-template-list small { display:block; margin-top:4px; color:var(--muted); }
.reply-template-form { display:grid; gap:12px; min-width:0; }
.reply-template-form textarea { min-height:240px; resize:vertical; line-height:1.5; }
.reply-template-form h3 { font-size:16px; margin:0; }
.reply-template-variables { display:flex; flex-wrap:wrap; gap:5px; }
.reply-template-variables button { padding:4px 7px; font-size:11px; }
.reply-template-preview { margin:0; padding:12px; max-height:240px; overflow:auto; border:1px solid var(--line); border-radius:8px; background:var(--paper); white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; }
#reply-template-edit-status { color:var(--warning); font-size:12px; }
.reply-template-status { min-height:20px; margin:12px 0 0; color:var(--muted); }
.reply-template-status.error { color:var(--danger); }
@media(max-width:700px) { .reply-template-manager { width:calc(100vw - 12px); padding:14px; } .reply-template-grid { grid-template-columns:minmax(0,1fr); } .reply-template-list { max-height:180px; } .reply-suggestion { flex-wrap:wrap; } }
