/* Scoped to Codex; sunset home, SSH and independent Claude pages are unchanged. */
#cxHeader,#cxDrawer{display:none}body.cx-mobile{--cx-bg:#212121;--cx-surface:#2f2f2f;--cx-user:#303030;--cx-text:#ececec;--cx-muted:#aaa;--cx-line:#ffffff16;--cx-sidebar:#171717;--cx-ink:#111;color:var(--cx-text);background:var(--cx-bg);color-scheme:dark}
body.cx-mobile[data-cx-theme=light]{--cx-bg:#fff;--cx-surface:#f4f4f4;--cx-user:#f1f1f1;--cx-text:#171717;--cx-muted:#737373;--cx-line:#00000012;--cx-sidebar:#f9f9f9;--cx-ink:#fff;color-scheme:light}
body.cx-mobile:before{display:none}body.cx-mobile[data-tab] #app{background:var(--cx-bg);padding-bottom:calc(var(--nav-h) + var(--workspace-bottom));max-width:900px}
body.cx-mobile[data-tab] #app>.top,body.cx-mobile[data-tab] #app>.ai-actions:not(.hidden),body.cx-mobile[data-tab] #app>#sub:not(.hidden),body.cx-mobile .engine-bar{display:none!important}
body.cx-mobile #cxHeader{display:flex;align-items:center;direction:ltr;padding:6px 14px 12px;gap:10px;flex:none;min-height:66px;color:var(--cx-text)}
#cxHeader button{border:0;background:transparent;color:inherit;min-width:42px;min-height:42px;border-radius:24px;padding:9px;display:grid;place-items:center}#cxHeader svg,#cxDrawer svg,.cx-setting svg,.cx-response-actions svg{width:22px;height:22px;flex:none}#cxHeader .cx-title{display:flex;align-items:flex-start;flex-direction:column;gap:2px;padding:6px 8px;text-align:left;min-width:0}#cxHeader .cx-title b{font:650 20px/1.2 system-ui}#cxHeader .cx-title span{font:11px/1.3 system-ui;color:var(--cx-muted);max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#cxHeader .cx-header-end{margin-left:auto;display:flex;gap:2px}#cxHeader button:active{background:var(--cx-surface)}
body.cx-mobile[data-tab] .chat{padding:22px 22px 10px;gap:28px;scroll-behavior:auto}body.cx-mobile[data-tab] .msg{font-size:16px;line-height:1.9;color:var(--cx-text);box-shadow:none;animation:none}body.cx-mobile[data-tab] .msg.bot{background:transparent;border:0;border-radius:0;padding:0;width:100%;max-width:100%;align-self:stretch}body.cx-mobile[data-tab] .msg.user{background:var(--cx-accent-bubble);border:0;border-radius:25px;padding:10px 18px;max-width:86%;align-self:flex-start;margin-left:auto;margin-right:0;color:var(--cx-text)}body.cx-mobile:has([data-cx-theme]){color:var(--cx-text)}body.cx-mobile[style*="--cx-accent-bubble: #"] .msg.user{color:#171717}
body.cx-mobile .msg pre{background:var(--cx-sidebar);color:var(--cx-text);border:1px solid var(--cx-line);border-radius:14px;padding:42px 15px 15px;direction:ltr;text-align:left;font-size:13px}body.cx-mobile .copy-code{color:var(--cx-muted);top:10px;right:12px}body.cx-mobile .msg code.i{background:var(--cx-surface);color:var(--cx-text)}body.cx-mobile .msg .meta{color:var(--cx-muted);font-size:10px}body.cx-mobile .msg .show{color:var(--cx-text)}
.cx-response-actions{display:flex;direction:ltr;gap:5px;margin-top:10px}.cx-response-actions button{display:grid;place-items:center;background:none;color:var(--cx-muted);border:0;border-radius:8px;width:34px;height:34px}.cx-response-actions svg{width:18px;height:18px}.cx-response-actions button:hover{background:var(--cx-surface)}
body.cx-mobile .empty{display:flex;flex-direction:column;justify-content:center;flex:1;min-height:240px;padding:20px 0;gap:22px;color:var(--cx-text)}body.cx-mobile .empty h2{font-size:25px;line-height:1.7;font-weight:600;margin:0;text-align:center}.cx-suggestions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.cx-suggestions button{border:1px solid var(--cx-line);border-radius:22px;padding:10px 13px;color:var(--cx-muted);background:transparent;font:12px Vazirmatn,system-ui}
body.cx-mobile[data-tab] .composer{padding:10px 12px 12px;background:var(--cx-bg)}body.cx-mobile[data-tab] .composer .row{direction:ltr;border:1px solid var(--cx-line);border-radius:29px;background:var(--cx-surface);min-height:60px;box-shadow:none;gap:3px;padding:7px}body.cx-mobile .composer textarea{font-size:16px;color:var(--cx-text);direction:rtl;min-width:0;padding:8px 3px}html[dir=ltr] body.cx-mobile .composer textarea{direction:ltr}body.cx-mobile .composer textarea::placeholder{color:var(--cx-muted)}body.cx-mobile .composer .round{border:0;border-radius:50%;width:40px;height:40px;min-width:40px}body.cx-mobile .composer #btnAttach,body.cx-mobile .composer #btnMic{color:var(--cx-text);background:transparent}body.cx-mobile .composer #btnAttach svg{stroke:var(--cx-text)}body.cx-mobile .composer #btnMic svg{fill:var(--cx-text)}body.cx-mobile .composer #btnSend{background:var(--cx-text);color:var(--cx-bg)}body.cx-mobile .composer #btnSend svg{width:23px;height:23px;fill:none;stroke:var(--cx-bg)}body.cx-mobile .composer #btnMic.rec{background:#a12e35}body.cx-mobile .recbar{background:var(--cx-surface)!important}
body.cx-mobile[data-tab] .busy{margin:0 22px 12px;max-height:23vh;color:var(--cx-muted)}body.cx-mobile[data-tab] .busy #busyText{color:var(--cx-muted)!important;opacity:1;animation:none;white-space:pre-wrap}body.cx-mobile #btnStop{background:var(--cx-surface);color:var(--cx-text);border-radius:18px;padding:7px 12px}body.cx-mobile .jump-latest{bottom:100px;background:var(--cx-surface);color:var(--cx-text);border-color:var(--cx-line)}body.cx-mobile .toast{bottom:100px;background:var(--cx-text);color:var(--cx-bg);border:0}
body.cx-mobile #cxDrawer:not([hidden]){display:block;position:fixed;inset:0;z-index:60;color:var(--cx-text)}#cxDrawer .cx-scrim{position:absolute;inset:0;background:#0008;border:0;width:100%;height:100%}#cxDrawer aside{position:absolute;left:0;top:0;bottom:0;width:min(86vw,350px);background:var(--cx-sidebar);padding:calc(var(--workspace-top) + 12px) 14px calc(var(--workspace-bottom) + 14px);display:flex;flex-direction:column;gap:9px;direction:rtl;box-shadow:10px 0 40px #0003}html[dir=ltr] #cxDrawer aside{direction:ltr}.cx-drawer-top{display:flex;direction:ltr;justify-content:space-between;margin-bottom:12px}.cx-drawer-top button{background:none;color:inherit;border:0;padding:10px}.cx-search{display:flex;gap:8px;align-items:center;background:var(--cx-surface);border-radius:24px;padding:10px 14px;color:var(--cx-muted)}.cx-search input{width:100%;border:0;background:none;outline:none;color:var(--cx-text);font:14px Vazirmatn,system-ui;min-width:0}.cx-nav-row{display:flex;align-items:center;gap:12px;min-height:48px;background:transparent;border:0;color:inherit;text-align:start;font:14px Vazirmatn,system-ui;padding:10px}.cx-section{font:12px/1.6 Vazirmatn,system-ui;color:var(--cx-muted);margin:18px 10px 7px}#cxSessions{flex:1;overflow:auto;min-height:0}.cx-session{display:block;max-width:100%;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start;background:none;color:var(--cx-text);border:0;border-radius:10px;font:14px/1.7 Vazirmatn,system-ui;padding:12px}.cx-session.selected{background:var(--cx-surface)}.cx-profile{display:flex;align-items:center;gap:12px;border:0;border-top:1px solid var(--cx-line);padding:15px 5px 0;background:none;color:var(--cx-text);text-align:start}.cx-profile>span:nth-child(2){flex:1}.cx-profile small{display:block;color:var(--cx-muted);font-size:11px}.cx-avatar{width:38px;height:38px;border-radius:50%;background:#537d76;color:white;display:inline-grid;place-items:center;font:600 18px system-ui}.cx-muted{font-size:12px;color:var(--cx-muted);padding:10px}
body.cx-mobile .sheet{padding:calc(var(--workspace-top) + 10px) 0 0;z-index:65}body.cx-mobile .sheet .sheet-body{background:var(--cx-bg);border:1px solid var(--cx-line);border-bottom:0;border-radius:24px 24px 0 0;box-shadow:none;max-width:760px;padding:14px 18px calc(var(--workspace-bottom) + 20px);max-height:100%;color:var(--cx-text)}body.cx-mobile .sheet[data-cx-page=settings] .sheet-body{height:100%;background:var(--cx-sidebar)}body.cx-mobile .sheet h3{color:var(--cx-text);text-align:center;margin:0 0 20px;font-size:18px}body.cx-mobile .sheet .sheet-close{background:var(--cx-surface);color:var(--cx-text);border:0;border-radius:20px;margin-bottom:9px;min-width:72px}body.cx-mobile .sheet p,body.cx-mobile .sheet .control-description{color:var(--cx-muted)}body.cx-mobile .sheet .control-row{flex-direction:column;gap:0}body.cx-mobile .sheet .control-grid{gap:0;background:var(--cx-surface);border-radius:16px;overflow:hidden}body.cx-mobile .sheet .control-row button,body.cx-mobile .sheet .workspace-options button,body.cx-mobile .sheet .item{background:var(--cx-surface);color:var(--cx-text);border:0;border-bottom:1px solid var(--cx-line);border-radius:0;min-height:50px}body.cx-mobile .sheet .setting-icon{color:var(--cx-text)}body.cx-mobile .sheet .btn{background:var(--cx-text);color:var(--cx-bg);border:0}body.cx-mobile .sheet .usage{background:var(--cx-surface);border-color:var(--cx-line);color:var(--cx-text)}body.cx-mobile .sheet .bar i{background:var(--cx-text)}body.cx-mobile .sheet .workspace-options{display:flex;flex-direction:column;border:0;border-radius:16px;overflow:hidden;padding:0;gap:0}.cx-settings-profile{display:flex;align-items:center;gap:12px;padding:12px 8px}.cx-group{background:var(--cx-surface);border-radius:15px;overflow:hidden}.cx-setting{display:flex;gap:12px;align-items:center;width:100%;text-align:start;background:transparent;color:var(--cx-text);border:0;border-bottom:1px solid var(--cx-line);padding:15px 13px;min-height:54px;font:14px/1.5 Vazirmatn,system-ui}.cx-setting:last-child{border:0}.cx-setting>span{flex:1}.cx-setting small{font:11px system-ui;color:var(--cx-muted);max-width:36%;overflow-wrap:anywhere}.cx-setting>svg:last-child{width:13px;color:var(--cx-muted);transform:rotate(180deg)}html[dir=ltr] .cx-setting>svg:last-child{transform:none}
@media(min-width:700px){body.cx-mobile[data-tab] .chat{padding-inline:60px}body.cx-mobile[data-tab] .composer{padding-inline:50px}#cxHeader{padding-inline:30px!important}}@media(max-width:359px){#cxHeader{gap:3px!important;padding-inline:8px!important}#cxHeader .cx-title span{max-width:135px}body.cx-mobile[data-tab] .chat{padding-inline:16px}.cx-setting{font-size:13px}}

body.cx-mobile textarea:focus-visible{outline:none}body.cx-mobile button:focus-visible{outline:2px solid var(--cx-muted);outline-offset:2px}
body.cx-mobile .sheet .sheet-body{animation:none}

#cxVoice{display:none}body.cx-mobile .composer #cxVoice{display:grid;background:var(--cx-text);color:var(--cx-bg);border-radius:50%}body.cx-mobile #cxVoice svg{fill:none;stroke:currentColor;width:23px;height:23px}body.cx-mobile .composer:has(#btnSend:not(.hidden)) #cxVoice,body.cx-mobile .composer:has(#recBar:not(.hidden)) #cxVoice{display:none}
body.cx-mobile #cxHeader>button:first-child,body.cx-mobile #cxHeader .cx-title,body.cx-mobile .cx-header-end{background:var(--cx-bg);box-shadow:0 3px 15px #0000000d;border:1px solid var(--cx-line);border-radius:26px}body.cx-mobile #cxHeader .cx-title{padding:7px 13px}body.cx-mobile #cxHeader .cx-header-end{gap:0}
.cx-voice-intro{text-align:center;padding:20px 10px}.cx-orb{width:150px;height:150px;border-radius:50%;margin:10px auto 28px;background:radial-gradient(circle at 35% 25%,#fff 3%,#dbf5ff 24%,#78cafa 47%,#387de4 70%,#214b9b 100%);box-shadow:inset -15px -10px 25px #2468a838}

/* Symmetric voice mark centered inside the round control. */
body.cx-mobile .composer #cxVoice{padding:0;place-items:center;line-height:1;flex:0 0 40px}
body.cx-mobile .composer #cxVoice svg{display:block;margin:0;transform:none;flex:none}

/* Native Latin typography with locally served Arabic faces and real weights. */
@font-face{font-family:"Codex Arabic";font-style:normal;font-weight:400;font-display:swap;src:url("codex-arabic-400.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Codex Arabic";font-style:normal;font-weight:500;font-display:swap;src:url("codex-arabic-500.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:"Codex Arabic";font-style:normal;font-weight:600;font-display:swap;src:url("codex-arabic-600.woff2") format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF}

body.cx-mobile{--cx-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Codex Arabic",sans-serif;--cx-ui-font:"Codex Arabic",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-family:var(--cx-font);font-size:16px;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-synthesis:none}
body.cx-mobile button,body.cx-mobile input,body.cx-mobile textarea{font-family:var(--cx-font);letter-spacing:normal}
body.cx-mobile[data-tab] .msg{font-family:var(--cx-font);font-size:16px;line-height:1.85;font-weight:400}
body.cx-mobile[data-tab] .msg.user{padding:11px 17px;border-radius:24px;max-width:88%}
body.cx-mobile .msg .t{white-space:pre-wrap;word-break:normal;overflow-wrap:anywhere}
body.cx-mobile .msg pre,body.cx-mobile .msg code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:14px;line-height:1.6}
body.cx-mobile .msg .meta{font-size:12px}.cx-response-actions{margin-top:12px;gap:8px}.cx-response-actions button{width:36px;height:36px}
body.cx-mobile #cxHeader{padding:6px 14px 14px;gap:10px}body.cx-mobile #cxHeader .cx-title b{font-size:19px;font-weight:600;letter-spacing:-.3px}body.cx-mobile #cxHeader .cx-title span{font-size:12px;color:var(--cx-muted)}body.cx-mobile #cxHeader .cx-title{gap:3px}
body.cx-mobile .composer .row{border-radius:30px;min-height:60px;padding:6px 7px;border-color:var(--cx-line)}body.cx-mobile .composer textarea{font:400 16px/1.65 var(--cx-font);padding:8px 4px}
body.cx-mobile .cx-suggestions button{font:400 14px/1.6 var(--cx-font);padding:10px 15px}body.cx-mobile .empty h2{font:500 26px/1.7 var(--cx-font)}
body.cx-mobile .cx-search input{font:400 15px/1.6 var(--cx-font)}.cx-search{padding:11px 14px}
body.cx-mobile .cx-nav-row,body.cx-mobile .cx-session{font:400 15px/1.6 var(--cx-font)}body.cx-mobile .cx-section{font:500 13px/1.7 var(--cx-font);margin:22px 12px 9px}
.cx-session-row{display:flex;align-items:center;border-radius:12px;min-height:50px}.cx-session-row.selected{background:var(--cx-surface)}.cx-session-row .cx-session{flex:1;width:0;min-width:0;max-width:100%;padding:13px 12px;background:none;border-radius:0}
.cx-session-more{display:grid;place-items:center;flex:none;min-width:44px;height:44px;border:0;background:transparent;color:var(--cx-muted);border-radius:12px}.cx-session-more svg{width:21px;height:21px}.cx-session-row:hover{background:var(--cx-surface)}
body.cx-mobile .cx-setting{font:400 15px/1.6 var(--cx-font);padding:15px 14px;min-height:57px;gap:12px}body.cx-mobile .cx-setting small{font:400 13px/1.5 var(--cx-font)}body.cx-mobile .sheet .control-row button,body.cx-mobile .sheet .workspace-options button{font:400 15px/1.7 var(--cx-font)}body.cx-mobile .sheet h3{font:600 19px/1.6 var(--cx-font)}
body.cx-mobile .cx-profile{font:400 15px/1.6 var(--cx-font)}body.cx-mobile .cx-profile small{font-size:12px}.cx-settings-profile b{font-weight:500}
body.cx-mobile .sheet .sheet-close{min-width:44px;font:400 14px/1.5 var(--cx-font)}body.cx-mobile .sheet .control-description{font-size:14px}
.cx-selected-title,.cx-delete-description{font:400 16px/1.8 var(--cx-font);overflow-wrap:anywhere;padding:4px 10px 16px;text-align:center}
.cx-delete-actions{display:flex;gap:12px;padding:10px 0}.cx-delete-actions button{flex:1;font:500 15px/1.6 var(--cx-font);border-radius:22px;background:var(--cx-surface);padding:12px}.cx-delete-actions .cx-danger{background:#a92835;color:#fff}.cx-setting[data-cx=delete-selected]{color:#ee6674}
body.cx-mobile #cxLive,body.cx-mobile #cxLive button{font-family:var(--cx-font)}
@media(max-width:359px){body.cx-mobile #cxHeader{gap:6px;padding-inline:10px}body.cx-mobile .cx-setting{font-size:14px}.cx-setting small{max-width:32%}body.cx-mobile .empty h2{font-size:23px}}

/* Model and reasoning controls belong inside the message composer. */
#cxComposerControls{display:none}
body.cx-mobile .composer #row{display:flex;flex-wrap:wrap;align-items:center;gap:3px;border-radius:26px}
body.cx-mobile .composer #input{order:0;flex:1 0 100%;width:100%;box-sizing:border-box;margin:0;padding:8px 10px}
body.cx-mobile .composer #btnAttach{order:1}
body.cx-mobile .composer #cxComposerControls{order:2;display:flex;flex:1;min-width:0;gap:2px;align-items:center}
body.cx-mobile #cxComposerControls button{display:block;min-width:0;max-width:100%;min-height:40px;padding:7px 5px;border:0;border-radius:18px;background:transparent;color:var(--cx-text);font:500 13px/1.5 var(--cx-font);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.cx-mobile #cxComposerModel{flex:1}body.cx-mobile #cxComposerSpeed{flex:0 1 auto}
body.cx-mobile #cxComposerControls button:active{background:var(--cx-line)}
body.cx-mobile .composer #btnMic{order:3}body.cx-mobile .composer #btnSend,body.cx-mobile .composer #cxVoice{order:4}
body.cx-mobile .composer #recBar{order:-1;flex-basis:100%}
body.cx-mobile .composer:has(#recBar:not(.hidden)) #cxComposerControls{display:none}

/* Preserve workspace tabs in Codex. */
body.cx-mobile[data-tab]>nav.tabs#workspaceDock{background:var(--cx-bg);border-color:var(--cx-line);box-shadow:none}
body.cx-mobile #workspaceDock button{color:var(--cx-muted)}
body.cx-mobile #workspaceDock button.on{color:var(--cx-text);background:var(--cx-surface);border-color:var(--cx-line);box-shadow:none}
body.cx-mobile.keyboard-open[data-tab] #app{padding-bottom:4px}

/* Explicit state markers belong only to selected Codex choices. */
body.cx-mobile .sheet .cx-option{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:start}
body.cx-mobile .sheet .cx-option::before,body.cx-mobile .sheet .cx-option::after{content:none}
body.cx-mobile .sheet .cx-check{flex:none;color:#4c8df6;font:600 20px/1 system-ui}
body.cx-mobile .sheet [aria-busy=true] button{pointer-events:none}

/* Three visible tabs must occupy all columns after Settings was hidden. */
body.cx-mobile[data-tab=codex] #workspaceDock{grid-template-columns:repeat(3,minmax(0,1fr))!important}
