/* Scoped provider switcher. Existing model/image controls remain untouched in API mode. */
.stella-codex-provider{margin:4px 0 6px;font:13px/1.45 system-ui,-apple-system,"Noto Sans KR",sans-serif}
.stella-codex-summary{width:fit-content;padding:5px 9px;border-radius:8px;color:#475569;cursor:pointer;font-size:12px;font-weight:650;list-style:none}.stella-codex-summary::-webkit-details-marker{display:none}.stella-codex-summary::before{content:'▸';margin-right:6px}.stella-codex-provider[open]>.stella-codex-summary::before{content:'▾'}.stella-codex-summary:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
.stella-codex-provider[data-connection-state="connected"]>.stella-codex-summary{color:#047857}
.stella-codex-settings{display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:8px 10px;align-items:end;margin-top:5px;padding:11px;border:1px solid rgba(148,163,184,.42);border-radius:13px;background:rgba(248,250,252,.72)}
.stella-codex-provider:not([open])>.stella-codex-settings,.stella-codex-provider [hidden]{display:none!important}
.stella-codex-provider-label{display:grid;gap:5px;font-weight:700;color:inherit}.stella-codex-provider-label select{min-height:38px;width:100%;padding:6px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;font:inherit}
.stella-codex-connect{min-height:38px;padding:7px 12px;border:1px solid #6366f1!important;border-radius:10px!important;background:#4f46e5!important;color:#fff!important;font:inherit;font-weight:800!important;cursor:pointer}
.stella-codex-status{align-self:center;font-size:12px;font-weight:700;color:#64748b}.stella-codex-status[data-kind="connected"]{color:#047857}.stella-codex-status[data-kind="error"],.stella-codex-status[data-kind="disconnected"]{color:#b45309}
.stella-codex-hint{grid-column:1/-1;color:#64748b;line-height:1.55}.stella-provider-disabled{opacity:.5;filter:saturate(.6);pointer-events:none}
body.dark .stella-codex-settings{background:rgba(22,27,34,.9);border-color:#30363d}body.dark .stella-codex-summary{color:#aab5c4}body.dark .stella-codex-provider[data-connection-state="connected"]>.stella-codex-summary{color:#e6edf3}body.dark .stella-codex-provider-label select{background:#0d1117;color:#e6edf3;border-color:#30363d}body.dark .stella-codex-status,body.dark .stella-codex-hint{color:#9ca3af}body.dark .stella-codex-status[data-kind="connected"]{color:#34d399}body.dark .stella-codex-status[data-kind="error"],body.dark .stella-codex-status[data-kind="disconnected"]{color:#fbbf24}
.stella-codex-dialog{width:min(560px,calc(100vw - 28px));max-width:560px;border:0;border-radius:18px;padding:0;background:#fff;color:#111827;box-shadow:0 24px 90px rgba(15,23,42,.35)}.stella-codex-dialog::backdrop{background:rgba(2,6,23,.72)}.stella-codex-dialog-card{padding:22px}.stella-codex-dialog h3{margin:0 0 10px;font-size:1.15rem}.stella-codex-dialog p{line-height:1.6}.stella-codex-account{font-weight:800}.stella-device-code{display:grid;gap:10px;margin:14px 0;padding:15px;border:1px solid #c7d2fe;border-radius:13px;background:#eef2ff}.stella-device-code-value{font:800 1.6rem/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;color:#312e81}.stella-device-actions,.stella-codex-dialog-footer{display:flex;gap:8px;flex-wrap:wrap}.stella-device-actions button,.stella-codex-dialog-footer button{min-height:40px;padding:8px 13px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#111827;font:inherit;font-weight:750;cursor:pointer}.stella-codex-dialog-footer{justify-content:flex-end;margin-top:18px}.stella-codex-dialog-footer .danger{margin-right:auto;border-color:#fca5a5;color:#b91c1c}.stella-codex-dialog-status{min-height:24px;color:#475569}.stella-codex-dialog.open{display:block;position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:10000}
body.dark .stella-codex-dialog{background:#161b22;color:#e6edf3}body.dark .stella-device-code{background:#111827;border-color:#374151}body.dark .stella-device-code-value{color:#c7d2fe}body.dark .stella-device-actions button,body.dark .stella-codex-dialog-footer button{background:#21262d;color:#e6edf3;border-color:#30363d}body.dark .stella-codex-dialog-status{color:#aab5c4}
@media(max-width:600px){.stella-codex-settings{grid-template-columns:1fr}.stella-codex-connect{width:100%}.stella-codex-status{align-self:auto}.stella-device-actions button{flex:1}.stella-codex-dialog-card{padding:18px}}
/* The main composer shares its menu row; legacy pages keep the disclosure card. */
.composer-tools .stella-codex-provider{margin:0;font:inherit}
.composer-tools .stella-codex-summary{width:auto;font-weight:650}
.composer-tools .stella-codex-summary::before,.composer-tools .stella-codex-provider[open]>.stella-codex-summary::before{content:'☰';margin:0}
.composer-tools .stella-codex-settings{display:grid;grid-template-columns:1fr;align-items:stretch;margin:0;padding:14px;gap:10px;background:#fff}
.composer-tools .stella-codex-settings .model-settings-head{margin-bottom:0}
body.dark .composer-tools .stella-codex-settings{background:#161b22}
