.cr-dialog { width:min(1220px,95vw); max-width:95vw; max-height:93vh; box-sizing:border-box; padding:24px; border:1px solid var(--border,#d4d9cb); border-radius:18px; background:var(--bg,#fcfbf3); color:var(--text,#283b31); }
.cr-dialog::backdrop { background:rgba(20,35,28,.45); }
.cr-head { display:flex; align-items:center; gap:16px; }
.cr-head h2 { flex:1; margin:0; font-size:21px; }
.cr-title { margin:14px 0 6px; font-size:17px; overflow-wrap:anywhere; }
.cr-toolbar { display:flex; align-items:center; gap:12px; margin:15px 0; flex-wrap:wrap; }
.cr-toolbar label { display:flex; align-items:center; gap:9px; min-width:0; flex:1; }
.cr-toolbar select { min-width:0; width:100%; max-width:640px; }
.cr-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(285px,1fr); gap:24px; align-items:start; }
.cr-discussion,.cr-notes { min-width:0; }
.cr-notes { border-left:1px solid var(--border,#d4d9cb); padding-left:22px; }
.cr-notes h3 { margin:0 0 14px; font-size:16px; }
.cr-history { max-height:53vh; min-height:160px; overflow:auto; padding:0 8px 0 0; scrollbar-gutter:stable; }
.cr-message { padding:15px 0; border-bottom:1px solid var(--border,#d4d9cb); }
.cr-message:first-child { padding-top:0; }
.cr-message h4 { margin:0 0 8px; font-size:12px; font-weight:600; color:var(--muted,#62715f); }
.cr-message-content { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.85; }
.cr-message-user .cr-message-content { font-weight:500; }
.cr-empty,.cr-help { color:var(--muted,#62715f); font-size:12px; line-height:1.7; margin:8px 0 12px; }
.cr-empty { padding:12px 0; font-size:14px; }
.cr-field { display:block; font-size:13px; margin:13px 0; }
.cr-field textarea,.cr-toolbar select { padding:9px 10px; border:1px solid var(--border,#c4ceba); border-radius:8px; background:var(--card-bg,#fffef7); color:var(--text,#283b31); font:inherit; line-height:1.65; }
.cr-field textarea { display:block; box-sizing:border-box; width:100%; resize:vertical; margin-top:7px; }
.cr-field textarea:read-only { opacity:.8; background:var(--bg,#f2f3ea); }
.cr-sources { margin-top:12px; font-size:12px; color:var(--muted,#62715f); }
.cr-sources summary { cursor:pointer; }
.cr-sources li { margin:8px 0; line-height:1.65; white-space:pre-wrap; overflow-wrap:anywhere; }
.cr-path { font-size:12px; line-height:1.7; color:var(--muted,#62715f); overflow-wrap:anywhere; white-space:pre-wrap; }
.cr-status { margin:18px 0 0; padding:10px 12px; border-radius:8px; background:var(--hover,#ecf0e2); font-size:13px; line-height:1.7; white-space:pre-wrap; }
.cr-status.cr-error { color:var(--danger,#9e3930); }
.cr-status.cr-warning { color:var(--warning,#85580b); }
.cr-dialog button:disabled { cursor:not-allowed; opacity:.55; }
.cr-dialog[aria-busy=true] button:disabled { cursor:wait; }
@media(max-width:820px) { .cr-dialog { padding:16px; } .cr-grid { grid-template-columns:1fr; gap:22px; } .cr-notes { border-left:0; border-top:1px solid var(--border,#d4d9cb); padding:18px 0 0; } .cr-history { max-height:43vh; } .cr-toolbar label { flex-basis:100%; } }
@media(prefers-reduced-motion:reduce) { .cr-dialog * { scroll-behavior:auto !important; } }
