/* Inherit Mnemosyne's palette and native controls for every appearance preset. */
.codex-quota{margin-top:16px;padding:18px;color:var(--settings-ink);background:var(--settings-card);border:1px solid var(--settings-line);border-radius:16px}
.codex-quota-header,.codex-quota-label{display:flex;align-items:center;justify-content:space-between;gap:12px}
.codex-quota-header h4{margin:0;font-size:15px}
.codex-quota-refresh{min-height:44px;padding:8px 12px;border:1px solid var(--settings-line);border-radius:10px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.codex-quota-refresh:disabled{opacity:.5;cursor:wait}
.codex-quota-row{margin-top:18px}
.codex-quota-label{font-size:13px;flex-wrap:wrap}
.codex-quota-progress{display:block;width:100%;height:10px;margin:10px 0;appearance:none;border:0;border-radius:8px;overflow:hidden;background:var(--settings-line);accent-color:var(--settings-accent)}
.codex-quota-progress::-webkit-progress-bar{background:var(--settings-line);border-radius:8px}
.codex-quota-progress::-webkit-progress-value{background:var(--settings-accent);border-radius:8px}
.codex-quota-progress::-moz-progress-bar{background:var(--settings-accent);border-radius:8px}
.codex-quota-note,.codex-quota-reset{margin:8px 0 0;font-size:12px;line-height:1.6;color:var(--settings-soft);overflow-wrap:anywhere}
.codex-quota.is-stale .codex-quota-progress{opacity:.45}
.codex-turn > .assistant-reply,.codex-turn > .codex-execution{margin-bottom:14px}
.codex-turn > .codex-state{font-size:12px;color:var(--page-subtext,var(--dim));margin:8px 0}
.codex-turn.is-generating > .codex-state{display:none}
.codex-tools > summary,.codex-requests > summary{min-height:44px;display:list-item;align-content:center;font-size:13px;color:var(--page-subtext,var(--dim));padding:5px 0}
.codex-tool-body{min-width:0}
.codex-work-history > summary{min-height:44px;align-content:center;font-size:13px;color:var(--page-subtext,var(--dim));cursor:pointer}
.codex-work-body{border-left:1px solid var(--page-line,#8883);padding:6px 0 2px 12px}
.codex-work-body > .assistant-reply,.codex-work-body > .codex-execution{margin-bottom:14px}
.codex-approval[data-pending="true"]{border:2px solid var(--page-accent,#b58c5d);background:var(--page-card,var(--surface));color:var(--page-text,var(--text));box-shadow:0 2px 12px #00000009}
.codex-approval pre{font:12px/1.6 Consolas,monospace;white-space:pre-wrap;overflow:auto;max-height:180px;background:var(--page-bg,#8881);padding:10px;border-radius:7px;overflow-wrap:anywhere;user-select:text}
.codex-approval small{display:block;overflow-wrap:anywhere}
#codex-live-status{flex:0 0 auto;display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:36px;max-width:var(--content-max,100%);margin:0 auto;padding:6px 16px;border:0;border-top:1px solid var(--page-line,#8882);background:var(--page-bg,var(--bg));color:var(--page-subtext,var(--dim));font:inherit;font-size:12px;line-height:1.5;text-align:left;cursor:pointer}
#codex-live-status[hidden]{display:none}
#codex-live-status::before{content:"";width:7px;height:7px;flex-shrink:0;border-radius:50%;background:currentColor;animation:codex-pulse 1.4s ease-in-out infinite}
#codex-live-status.has-request{color:var(--page-accent,var(--text));font-weight:600}
.codex-live-label{flex:1;min-width:0}.codex-live-clock,.codex-live-jump{flex:none;font-size:11px}
#codex-live-status.has-request .codex-live-clock{display:none}
@keyframes codex-pulse{0%,100%{opacity:.35}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){#codex-live-status::before{animation:none}}
.codex-approval-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.codex-approval button{font:inherit;padding:9px 12px;min-height:42px;border:1px solid var(--line,#8886);border-radius:10px;color:inherit;background:transparent;cursor:pointer}.codex-approval button:disabled{opacity:.45}
.codex-execution{font-size:12px;line-height:1.55;margin:4px 0 12px;max-width:100%;overflow-wrap:anywhere}.codex-state{opacity:.65;margin-bottom:7px}.codex-tools,.codex-files{border:1px solid var(--line,#8884);border-radius:10px;margin:7px 0;padding:9px 12px}.codex-execution summary{cursor:pointer;min-height:26px}.codex-tool{padding:10px 0;border-top:1px solid #8883}.codex-tool small{display:block;opacity:.65}
.codex-execution pre{font:12px/1.6 Consolas,monospace;white-space:pre-wrap;overflow:auto;max-height:380px;background:var(--bg-secondary,#8881);padding:10px;border-radius:7px;tab-size:2;user-select:text}.codex-diff{border-left:3px solid #6b9b78}.codex-approval{border:1px solid #ba985b;border-radius:10px;padding:12px;margin:10px 0}.codex-question{display:block;margin:12px 0}.codex-question input,.codex-question select{display:block;box-sizing:border-box;width:100%;padding:9px;margin-top:6px;background:transparent;border:1px solid #8886;border-radius:8px;color:inherit}.codex-error{color:var(--danger,#b95050)}

.server-connection-status{position:fixed;z-index:1000;top:calc(env(safe-area-inset-top,0px) + 16px);left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(520px,calc(100vw - 32px));border:1px solid var(--line,#8885);border-radius:14px;background:var(--surface,var(--bg,#faf9f5));color:var(--text,#252525);padding:14px 18px;font-size:14px;line-height:1.6;box-shadow:0 4px 24px #0002}
