:root{--bg: #12120f;--panel: #1b1b17;--panel-2: #23231e;--border: #33332b;--text: #ecebe4;--muted: #a5a295;--accent: #d97706;--danger: #e5484d;--ok: #46a758;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-size:14px}.app{display:flex;flex-direction:column;height:100vh}.topbar{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--panel)}.topbar .brand{font-weight:700;letter-spacing:.02em}.banner{padding:8px 16px}.banner.error{background:#e5484d26;color:#ffb3b5;border-bottom:1px solid var(--danger);cursor:pointer}.layout{flex:1;display:grid;grid-template-columns:260px minmax(320px,1fr) minmax(420px,1.2fr);min-height:0}.sites{border-right:1px solid var(--border);padding:12px;overflow-y:auto;background:var(--panel)}.sites h3{margin:0 0 8px;text-transform:uppercase;font-size:11px;letter-spacing:.08em;color:var(--muted)}.sites ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.sites li button{width:100%;text-align:left;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--text);padding:8px;cursor:pointer}.sites li:hover button{background:var(--panel-2)}.sites li.active button{border-color:var(--accent);background:#d977061f}.sites .name{display:block;font-weight:600}.sites .id{color:var(--muted);font-size:11px;font-family:ui-monospace,monospace}.chat{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--border)}.chat-head{display:flex;align-items:baseline;gap:8px;padding:12px 16px;border-bottom:1px solid var(--border)}.chat-head h2{margin:0;font-size:16px}.chat-head .id{color:var(--muted);font-size:11px;font-family:ui-monospace,monospace}.log{flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:4px;min-height:0}.log.empty{color:var(--muted)}.entry{display:flex;gap:8px;line-height:1.4}.entry .ts{color:var(--muted);font-size:11px;flex-shrink:0;margin-top:2px;font-family:ui-monospace,monospace}.entry.text .msg{white-space:pre-wrap;color:#d6d3c8}.entry.tool .msg{color:#8ab4f8}.entry.status .msg{color:var(--muted);font-style:italic}.entry.detector.report .msg{color:#f5c76a}.prompt{border-top:1px solid var(--border);padding:12px 16px}.prompt textarea{width:100%;resize:vertical;background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:10px;font:inherit}.prompt-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.check{display:flex;align-items:center;gap:6px;color:var(--muted);cursor:pointer}.preview-col{display:flex;flex-direction:column;min-height:0}.preview-head{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-bottom:1px solid var(--border);color:var(--muted)}.preview-head a{color:var(--accent)}.preview{flex:1 1 55%;min-height:240px;width:100%;border:0;background:#fff}.panel{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:16px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.panel-head h3{margin:0}.muted{color:var(--muted)}.summary{margin:8px 0}.ok{color:var(--ok)}.issues{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;overflow-y:auto}.issue{border:1px solid var(--border);border-radius:8px;padding:8px 10px;background:var(--panel-2)}.issue.error{border-left:3px solid var(--danger)}.issue.warning{border-left:3px solid #f5c76a}.issue .loc{color:var(--muted);font-size:11px;font-family:ui-monospace,monospace;margin-left:6px}.issue p{margin:4px 0 0}.issue .suggestion{color:var(--muted)}.btn{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 14px;cursor:pointer;font:inherit}.btn:hover{border-color:var(--accent)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.primary{background:var(--accent);border-color:var(--accent);color:#1a1205;font-weight:600}.btn.small{padding:4px 10px;font-size:12px}.modal{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:10}.form{width:460px;max-width:92vw;max-height:88vh;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.form h2{margin:0}.form label{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:12px}.form input,.form select,.form textarea{background:var(--panel-2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 10px;font:inherit}.swatches{border:1px solid var(--border);border-radius:8px;padding:10px;display:flex;flex-direction:row;gap:16px}.swatches legend{color:var(--muted);font-size:12px;padding:0 6px}.swatches label{color:var(--muted);font-size:11px}.row{display:flex;gap:8px}.empty-state{grid-column:2 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted)}.empty-state h2{color:var(--text)}
