.codex-chat {max-width:1400px;margin:auto}
.codex-chat-heading {display:flex;align-items:center;justify-content:space-between;gap:20px}
.codex-chat-heading h2 {margin-bottom:8px}
.codex-chat-heading p,.codex-chat [data-codex-status] {color:var(--text-muted,#777)}
.codex-chat-layout {display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;margin-top:24px}
.codex-chat-layout aside,.codex-chat-main {border:1px solid var(--border,#ddd);border-radius:14px;padding:20px;min-width:0}
.codex-chat [data-chats] {display:grid;gap:8px;margin-top:14px;max-height:65vh;overflow:auto}
.codex-chat button {cursor:pointer;border:1px solid var(--border,#ccc);border-radius:8px;padding:10px 14px;background:var(--surface,#fff);color:inherit}
.codex-chat button:disabled {opacity:.5;cursor:default}
.codex-chat [data-chats] button {text-align:left;overflow-wrap:anywhere}
.codex-chat button.selected {border-color:#467765;background:#eef6f1;color:#244c3d}
.codex-chat label {display:grid;gap:8px;margin:12px 0}
.codex-chat input,.codex-chat textarea {width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--border,#ccc);border-radius:8px;background:var(--surface,#fff);color:inherit;font:inherit}
.codex-chat textarea {resize:vertical}
.codex-cli {display:flex;align-items:center;gap:10px;font-size:13px}
.codex-cli label {flex:1}
.codex-cli input {font-family:monospace}
.codex-messages {height:50vh;min-height:250px;overflow:auto;overscroll-behavior:contain;padding:10px 4px}
.codex-message {padding:16px;margin:12px 0;border-radius:10px;background:var(--surface,#f5f5f5);overflow-wrap:anywhere}
.codex-message.user {background:#edf5f0;color:#203e30;margin-left:10%}
.codex-message strong {display:block;margin-bottom:8px;font-size:13px}
.codex-message div {white-space:pre-wrap;line-height:1.6}
.codex-approval {padding:16px;border:1px solid #bf973e;border-radius:10px;margin:14px 0}
.codex-approval pre {white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto}
.codex-approval>button {margin-right:8px}
.codex-chat-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}
.codex-chat [data-send] {background:#244c3d;color:white}
@media(max-width:800px){.codex-chat-layout{grid-template-columns:1fr}.codex-chat [data-chats]{max-height:160px}.codex-chat-heading{align-items:flex-start}.codex-cli{flex-wrap:wrap}}
