.scoped-tone-dialog{position:fixed;inset:0;margin:auto;width:min(800px,calc(100vw - 24px));max-height:90vh;padding:0;border:1px solid var(--line,#ddd);border-radius:20px;color:var(--tx,#222);background:white;box-sizing:border-box}
.scoped-tone-dialog::backdrop{background:#0008}
.scoped-tone-shell{display:flex;flex-direction:column;height:min(780px,88vh);box-sizing:border-box;padding:20px;gap:12px}
.scoped-tone-head{display:flex;align-items:center;gap:12px}.scoped-tone-head h2{flex:1;margin:0;font-size:20px}
.scoped-tone-dialog button,.linked-tone-button{min-height:44px;min-width:44px;border:1px solid var(--line,#ccc);border-radius:12px;background:white;color:inherit;padding:8px 12px;cursor:pointer}
.scoped-tone-dialog button:focus-visible,.linked-tone-button:focus-visible,.scoped-tone-dialog textarea:focus-visible{outline:3px solid #0071e3;outline-offset:2px}
.scoped-tone-dialog button[aria-pressed=true]{background:var(--ac-tint,#eaf3ff);border-color:var(--ac,#0071e3);color:var(--ac,#0071e3)}
.scoped-tone-tabs,.scoped-tone-actions{display:flex;flex-wrap:wrap;gap:8px}.scoped-tone-list{overflow:auto;min-height:0;flex:1;scroll-padding:12px}
.scoped-tone-tabs{flex-wrap:nowrap;overflow-x:auto;flex-shrink:0;padding:4px}.scoped-tone-tabs button{white-space:nowrap;flex-shrink:0}
.scoped-tone-head,.scoped-tone-actions,.scoped-tone-shell>p,.scoped-tone-shell>button{flex-shrink:0}
.scoped-tone-card{border:1px solid var(--line,#ccc);border-radius:14px;padding:14px;margin-bottom:12px}.scoped-tone-card header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.scoped-tone-card header b{flex:1;min-width:130px}
.scoped-tone-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7;padding:12px;border:1px dashed var(--line,#ccc);border-radius:10px;background:#fafafa}
.scoped-tone-dialog p{margin:0;line-height:1.6}.scoped-tone-note{font-size:13px;color:var(--tx2,#555)}.scoped-tone-dialog textarea{width:100%;min-height:140px;box-sizing:border-box;margin:10px 0;padding:12px;font:inherit}
.scoped-tone-error{color:#a31515;min-height:20px;font-size:13px}.scoped-tone-dialog button:disabled{opacity:.6;cursor:wait}
.linked-tone-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.linked-tone-button{flex:1;min-width:180px;text-align:left;font-weight:700}
@media(max-width:540px){.scoped-tone-shell{padding:14px}.scoped-tone-head h2{font-size:17px}.scoped-tone-card{padding:10px}.scoped-tone-card header b{flex-basis:100%}}
