:root{--bg: #0b1426;--panel: #13213a;--border: #2e4a75;--text: #ffffff;--muted: #7c8ba3;--accent: #3aa0ff;--good: #3ce07a;--bad: #ff7a7a;color-scheme:dark;font-family:Segoe UI,Inter,system-ui,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text)}button,select,textarea{font:inherit;color:inherit}.app{display:flex;flex-direction:column;height:100%}.bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--panel)}.brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px}.logo{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:7px;background:var(--accent);color:var(--bg);font-size:16px}.phase{font-weight:400;font-size:12px;color:var(--muted)}.bar-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.bar-tools label{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}select,.export button,.ghost{background:var(--bg);border:1px solid var(--border);border-radius:7px;padding:5px 10px;font-size:12.5px}.export{display:flex;gap:6px}.export button,.ghost{cursor:pointer}.export button:hover:not(:disabled),.ghost:hover{border-color:var(--accent)}.export button:disabled{opacity:.4;cursor:default}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.work{flex:1;min-height:0;display:grid;grid-template-columns:minmax(300px,400px) 1fr}.editor{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--border)}.editor-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px}.editor-head h2{font-size:13px;margin:0;font-weight:600;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}.editor textarea{flex:1;min-height:0;resize:none;border:0;border-top:1px solid var(--border);padding:12px 14px;background:#091122;font-family:Consolas,Cascadia Mono,monospace;font-size:12px;line-height:1.5;-moz-tab-size:2;tab-size:2}.editor textarea:focus-visible{outline-offset:-2px}.status{border-top:1px solid var(--border);padding:10px 14px;font-size:12.5px;max-height:30%;overflow:auto}.status.good{color:var(--good)}.status.bad{color:var(--bad)}.status ul{margin:6px 0 0;padding-left:18px;color:var(--text)}.status li{margin-top:2px;font-family:Consolas,monospace;font-size:11.5px}.preview{min-width:0;min-height:0}.preview iframe{width:100%;height:100%;border:0;display:block}.preview.empty{display:grid;place-items:center;color:var(--muted)}@media (max-width: 860px){.work{grid-template-columns:1fr;grid-template-rows:minmax(60vh,auto) 1fr}.editor{border-right:0;border-bottom:1px solid var(--border)}.preview{min-height:70vh}}.left{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--border)}.left .editor{border-right:0}.tabs{display:flex;gap:2px;padding:8px 10px 0;border-bottom:1px solid var(--border)}.tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:7px 12px;cursor:pointer;font-size:12.5px;font-weight:600;color:var(--muted);letter-spacing:.03em}.tabs button[aria-selected=true]{color:var(--text);border-bottom-color:var(--accent)}.tabs .dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--bad);margin-left:6px;vertical-align:middle}.tabpanel{flex:1;min-height:0;display:flex;flex-direction:column}.tabpanel[hidden]{display:none}.tabpanel>*{flex:1;min-height:0}.prompt{display:flex;flex-direction:column;gap:14px;padding:14px;overflow:auto}.field{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;border:0;min-width:0}.field>span,.field legend{font-size:12px;color:var(--muted);font-weight:600;padding:0;margin-bottom:6px}.field legend em{font-weight:400;font-style:normal}.field.grow{flex:1;min-height:140px}.prompt textarea{flex:1;min-height:120px;resize:vertical;background:#091122;border:1px solid var(--border);border-radius:8px;padding:10px 12px;font-size:13px;line-height:1.5}.prompt textarea:focus-visible{outline-offset:0}.seg{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden;align-self:flex-start}.seg label{padding:6px 14px;font-size:12.5px;cursor:pointer;border-right:1px solid var(--border)}.seg label:last-child{border-right:0}.seg label.on{background:var(--accent);color:var(--bg);font-weight:600}.chips{display:flex;flex-wrap:wrap;gap:6px}.chips label{padding:4px 10px;font-size:12px;border:1px solid var(--border);border-radius:999px;cursor:pointer}.chips label.on{border-color:var(--accent);background:#3aa0ff29}.seg input,.chips input{position:absolute;opacity:0;pointer-events:none}.seg label:has(input:focus-visible),.chips label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:1px}fieldset:disabled label{cursor:default;opacity:.6}.actions{display:flex;justify-content:flex-end;gap:8px}.primary{background:var(--accent);color:var(--bg);border:0;border-radius:8px;padding:8px 18px;font-weight:600;font-size:13px;cursor:pointer;min-width:120px}.primary:disabled{opacity:.5;cursor:default}.prompt .status{border:1px solid var(--border);border-radius:8px;max-height:none;flex:none}.prompt .status .hint{color:var(--muted)}@media (max-width: 860px){.left{border-right:0;border-bottom:1px solid var(--border)}}.gate{min-height:100%;display:grid;place-items:center;padding:16px}.gate-card{width:min(420px,100%);background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:28px;display:flex;flex-direction:column;gap:14px}.gate-card p{margin:0;line-height:1.5}.gate-card .primary{align-self:flex-start}.muted{color:var(--muted)}.small{font-size:12px}.bad{color:var(--bad)}.user{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted)}.user span{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.field .hint{color:var(--muted);font-weight:400}
