/* Authentic Dark macOS Codex (Astra) client window — keep composer anchored as conversations scroll. */
.os-desktop[data-app="codex"] mm-browser[native-client] .br-scroll{background:#14161b;overflow:hidden!important}
mm-codex-workspace{display:block;width:100%;height:100%;min-height:0;container-type:inline-size;background:#14161b;color:#e6e8ef;color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue","PingFang SC",sans-serif;text-align:left}
mm-codex-workspace *,mm-codex-workspace *::before,mm-codex-workspace *::after{box-sizing:border-box}
mm-codex-workspace [hidden]{display:none!important}
.cx-window{height:100%;display:grid;grid-template-rows:clamp(13px,3.6cqw,27px) minmax(0,1fr);font:400 clamp(8.5px,2.42cqw,15px)/1.42 -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",sans-serif}
.cx-window svg{display:block;width:1.1em;height:1.1em;flex:none}
:is(.br-frame,mm-codex-workspace) .cx-window button{display:inline-flex;align-items:center;justify-content:center;gap:.35em;padding:.17em .35em;font:inherit;background:transparent;color:inherit;border:0;border-radius:.38em;cursor:pointer}
:is(.br-frame,mm-codex-workspace) .cx-window button:hover:not(:disabled){background:rgba(255,255,255,.08)}
.cx-window button:focus-visible,.cx-window textarea:focus-visible{outline:1.5px solid #6b9eff;outline-offset:-1px}
.cx-titlebar{display:flex;align-items:center;gap:1.9cqw;padding:0 1.65cqw;background:#111318;color:#9398a6}
.cx-lights{display:flex;gap:.62cqw;align-items:center}
:is(.br-frame,mm-codex-workspace) .cx-lights button{display:block;width:1.02cqw;height:1.02cqw;min-width:3px;min-height:3px;border-radius:50%;padding:0;background:#ff5f57}
:is(.br-frame,mm-codex-workspace) .cx-lights button:nth-child(2){background:#febc2e}:is(.br-frame,mm-codex-workspace) .cx-lights button:nth-child(3){background:#28c840}
.cx-layout{display:grid;position:relative;grid-template-columns:var(--cx-rail) minmax(0,1fr);min-height:0}
.cx-side{min-width:0;overflow:auto;background:#101217;border-inline-end:1px solid rgba(255,255,255,.075);padding:1.35cqw 1.2cqw;scrollbar-width:thin;scrollbar-color:#2a2e39 transparent}
.cx-brand{display:flex;align-items:center;gap:1.05cqw;margin:0 0 1.75cqw;padding:0 .4cqw;color:#f3f4f8}
.cx-brand b{font-size:clamp(11px,3.1cqw,18px);line-height:1.05;font-weight:620;letter-spacing:-.035em}
.cx-brand>svg{width:clamp(11px,3.2cqw,20px);height:auto}
:is(.br-frame,mm-codex-workspace) .cx-side .cx-new{display:flex;justify-content:flex-start;font-size:.89em;gap:.6em;padding:.34em .48em;margin-bottom:1.4cqw;white-space:nowrap;color:#e4e7ef}
.cx-side small{display:block;color:#787e8e;font-size:.79em;padding:0 .55em;margin-bottom:.42em}
:is(.br-frame,mm-codex-workspace) .cx-history button{display:block;width:100%;padding:.38em .57em;text-align:left;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:.92em;color:#a9afbe}
:is(.br-frame,mm-codex-workspace) .cx-history button[aria-current=true]{color:#f5f6fa;background:rgba(255,255,255,.1)}
.cx-projects{margin-top:2.2cqw}.cx-projects div{display:flex;align-items:center;gap:.45em;font-size:.84em;color:#9da4b4;padding-inline:.45em}
.cx-main{display:flex;flex-direction:column;position:relative;min-width:0;min-height:0;background:#15171d}
.cx-head{display:flex;align-items:center;justify-content:space-between;gap:.6em;padding:.55cqw 2.85cqw;min-height:4.9cqw;border-bottom:1px solid rgba(255,255,255,.06)}
.cx-title{font-size:.96em;font-weight:580;color:#eef0f6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-head button{color:#9aa0b0!important}
.cx-log,.cx-inspector{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#2b2f3a transparent}
.cx-log{display:flex;flex-direction:column;align-items:stretch;gap:1.75cqw;padding:1.4cqw 3.35cqw 1.6cqw}
.cx-msg{max-width:100%;flex:none}.cx-msg p{margin:0!important;font:inherit;line-height:1.48;white-space:pre-wrap;overflow-wrap:anywhere;color:inherit}
.cx-msg.user{align-self:flex-end;max-width:92%;border-radius:2.55cqw;background:#252934;border:1px solid rgba(255,255,255,.08);padding:.85cqw 1.85cqw;color:#f3f5f9}
.cx-msg.assistant{align-self:flex-start;color:#dfe3ec}
.cx-msg small{display:block;color:#8c93a4;font-size:.8em}
.cx-empty{flex:1;display:grid;justify-items:center;align-content:center;gap:.7em;color:#e6e8ef}.cx-empty svg{width:2.5em;height:2.5em}.cx-empty strong{font-weight:500;font-size:1.45em;letter-spacing:-.035em}
.cx-composer{flex:none;position:relative;margin:0 2.8cqw 1.55cqw;padding:1.15cqw 1.65cqw .85cqw;border:1px solid rgba(255,255,255,.11);border-radius:clamp(7px,2.45cqw,17px);background:#1c1f28;box-shadow:0 .5cqw 1.6cqw rgba(0,0,0,.32)}
.cx-composer:focus-within{border-color:rgba(130,170,255,.48)}
.cx-composer .cdx-input{display:block;width:100%;min-width:0;border:0;outline:0;resize:none;background:none;color:#f3f5fa;font:inherit;font-size:1em;line-height:1.45;min-height:1.55em;height:1.55em;margin:0;padding:0}
.cx-composer .cdx-input::placeholder{color:#787f90}
.cx-compose-controls{display:flex;align-items:center;gap:.6cqw;color:#9da3b3;margin-top:.65cqw;min-height:3.9cqw}
.cx-spacer{flex:1}:is(.br-frame,mm-codex-workspace) .cx-compose-controls button{font-size:.83em}.cx-compose-controls .cx-model svg{width:.75em;height:.75em}
:is(.br-frame,mm-codex-workspace) .cx-compose-controls .cx-send{width:4cqw;height:4cqw;min-width:12px;min-height:12px;border-radius:50%;background:#f3f5f9;color:#111318;padding:.65cqw;opacity:1}
:is(.br-frame,mm-codex-workspace) .cx-compose-controls .cx-send:disabled{background:#2d313d;color:#686f80;cursor:default}
.cx-send svg{width:100%;height:100%;stroke-width:2}
.cx-options{z-index:2;position:absolute;bottom:100%;right:1.4cqw;min-width:15cqw;max-width:90%;padding:.6cqw;background:#1e212b;border:1px solid rgba(255,255,255,.13);border-radius:1.6cqw;box-shadow:0 1cqw 2.8cqw rgba(0,0,0,.55);color:#eef0f6}
:is(.br-frame,mm-codex-workspace) .cx-options button{display:flex;width:100%;padding:.45em .65em;justify-content:space-between;font-size:.9em}
:is(.br-frame,mm-codex-workspace) .cx-attached button{font-size:.8em;background:#262a35;color:#dbe1ef;margin-bottom:.35em}
.cx-inspector{padding:.75cqw 2.5cqw;color:#dfe3ec;background:#13151b}
.cx-inspector header{display:flex;align-items:center;justify-content:space-between;font-size:.9em;color:#eef0f6}
.cx-inspector .code-lines{margin:.55em 0;background:#0e1015;border:1px solid rgba(255,255,255,.085);border-radius:.65em}
.cx-inspector .code-lines>div{font-size:clamp(7.6px,1.85cqw,12px);overflow:auto;color:#d8deea}
.cx-inspector .code-lines i{color:#667085}
.cx-inspector .line-old{background:rgba(248,81,73,.16);color:#ffdcd7}.cx-inspector .line-old i{color:#ff7b72}
.cx-inspector .line-new{background:rgba(46,160,67,.18);color:#aff5b4}.cx-inspector .line-new i{color:#56d364}


.cx-entryline{display:flex;align-items:center;gap:.45em}
.cx-entryline .cdx-input{flex:1;min-width:0}
:is(.br-frame,mm-codex-workspace) .cx-entryline .cx-take{flex:none;color:#939aa9;background:transparent;padding:.18em;min-width:1.55em;min-height:1.55em}
.cx-take svg{width:1em;height:1em}
:is(.br-frame,mm-codex-workspace) .cx-entryline .cx-take:hover{color:#fff;background:rgba(255,255,255,.1)}

:is(.br-frame,mm-codex-workspace) .cx-msg .cx-artifact{margin-top:.6em;max-width:100%;gap:.45em;padding:.38em .65em;border:1px solid rgba(255,255,255,.11);border-radius:.55em;background:#1d2029;color:#ced4e2;font:500 .88em/1.35 -apple-system,BlinkMacSystemFont,sans-serif}
.cx-empty-diff,.cx-receipt{margin:1cqw auto 0;max-width:44em}
.cx-empty-diff{display:grid;gap:.55em;padding:1.3em 1em;border-top:1px solid rgba(255,255,255,.09);text-align:center}
.cx-empty-diff code,.cx-empty-diff small{font:500 .86em/1.3 ui-monospace,monospace;color:#8b92a3}
.cx-receipt{color:#e5e8f0;padding:.65em 1.1em;background:#1b1e26;border:1px solid rgba(255,255,255,.1);border-radius:.6em;font:500 .96em/1.4 ui-monospace,SFMono-Regular,"PingFang SC",monospace}
.cx-receipt strong{font-weight:620;color:#fff}.cx-receipt dl{margin:.55em 0 0}
.cx-receipt dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:1em;padding:.15em 0}
.cx-receipt dl>div:last-child{margin-top:.35em;padding-top:.35em;border-top:1px dashed rgba(255,255,255,.16)}
.cx-receipt dt{color:#9299aa}.cx-receipt dd{margin:0;text-align:right}

.cx-fixture{min-height:100%;padding:2.5cqw 4.5cqw;background:#fcfcfa;color:#292b2e;text-align:left}
.cx-fixture header{display:flex;justify-content:space-between;gap:1em;border-bottom:1px solid #e3e3df;padding-bottom:1.5cqw;font:500 1.9cqw/1.4 ui-monospace,monospace;color:#77797d}
:is(.br-frame,mm-codex-workspace) .cx-fixture h3{margin:2cqw 0 1.8cqw;font:590 4.1cqw/1.1 var(--ui);letter-spacing:-.04em}
.cx-ab{display:inline-flex;gap:.4cqw;padding:.3cqw;border-radius:1.2cqw;background:#ececea}
:is(.br-frame,mm-codex-workspace) .cx-ab button{padding:.45cqw 1.25cqw;border-radius:.9cqw;font:500 2cqw/1.35 var(--ui);color:#686a6e}
:is(.br-frame,mm-codex-workspace) .cx-ab button[aria-pressed=true]{background:white;color:#26282c;box-shadow:0 1px 3px #0001}
.cx-baseline{position:relative;margin:2cqw 0 1.5cqw;padding-bottom:2px}.cx-baseline::after{content:"";position:absolute;left:0;right:0;bottom:0;border-bottom:1px dashed #b8bfca;pointer-events:none}
:is(.br-frame,mm-codex-workspace) .cx-baseline button{padding:1cqw 2.1cqw;background:#26282e;color:#fff;border-radius:1.3cqw;font:500 2.45cqw/1.3 var(--ui)}
.cx-baseline[data-offset="2"] button{transform:translateY(2px)}
.cx-fixture>code{color:#6c7077;font:500 1.95cqw/1.3 ui-monospace,monospace}

.cx-inspector .cx-preview-file{margin:.25em 0;padding:.25em 0;color:#7cb4ff!important;font:500 .91em/1.4 ui-monospace,monospace}
.cx-proof h3{margin-bottom:1.2cqw!important}
.cx-proof-mode,.cx-proof-foot{display:flex;align-items:center;gap:1.5cqw}
.cx-proof-mode>span,.cx-proof-entry>span,.cx-proof-foot output{font:500 1.95cqw/1.4 var(--ui);color:#656a73}
.cx-proof-entry{display:grid;gap:.55cqw;margin:1.65cqw 0 1.1cqw}
.cx-proof-entry textarea{width:100%;resize:none;padding:.8cqw 1.1cqw;border:1px solid #d9dce0;border-radius:1.1cqw;font:400 2.36cqw/1.4 var(--ui);color:#272b31;background:white}
:is(.br-frame,mm-codex-workspace) .cx-proof-foot button{padding:.65cqw 1.6cqw;border-radius:1.15cqw;background:#282b30;color:white;font-size:2.1cqw}
:is(.br-frame,mm-codex-workspace) .cx-proof-sent{margin-top:1.35cqw;padding:.65cqw 1.25cqw;border-left:2px solid #8d9aa6;color:#525961;font:400 2.12cqw/1.42 var(--ui)}

/* Preserve a full-size thread and composer in the short mirrored viewport. */
mm-codex-workspace{--cx-rail:clamp(24px,4.6cqw,34px);--cx-inset:clamp(10px,2.5cqw,22px)}
.cx-window{grid-template-rows:clamp(15px,3.45cqw,27px) minmax(0,1fr);font-size:clamp(10.5px,2.5cqw,15px)}
.cx-titlebar{gap:1.35cqw;padding-inline:1.45cqw;border-bottom:1px solid rgba(255,255,255,.075)}
.cx-appname{display:none;font-size:clamp(10px,2.5cqw,15px);font-weight:610;letter-spacing:-.025em;color:#e8eaf2}
.cx-rail{display:flex;flex-direction:column;align-items:center;gap:clamp(4px,1.1cqw,9px);padding-block:1.25cqw;background:#0c0e12;border-inline-end:1px solid rgba(255,255,255,.075)}
:is(.br-frame,mm-codex-workspace) .cx-rail button,.cx-railmark{display:grid;place-items:center;width:calc(var(--cx-rail) - 5px);height:calc(var(--cx-rail) - 5px);border-radius:.9cqw}
.cx-rail button{color:#8f96a6!important}.cx-railmark{background:transparent}.cx-railmark img{display:block;width:100%;height:100%;object-fit:contain;border-radius:22%}
.cx-rail svg,.cx-railmark svg{width:clamp(11px,2.4cqw,17px);height:auto}
.cx-brand{padding-inline:.48em;margin-bottom:1.15cqw;gap:.35em;align-items:center}
.cx-brand b{font-size:clamp(11.5px,2.7cqw,16.5px);letter-spacing:-.035em}.cx-brand>svg{width:.73em;height:.73em;color:#82899a}
.cx-side .cx-new{width:100%}.cx-side small{padding-inline:.55em}
.cx-projects>div>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cx-projects>div svg{flex:none}.cx-main{min-height:0;min-width:0}
.cx-head{min-height:clamp(20px,4.8cqw,35px);padding:.6cqw var(--cx-inset);gap:1em}
.cx-head strong{font-weight:590;font-size:.99em}
.cx-head [data-cx=review]{min-width:1.84em;min-height:1.84em}
.cx-log{padding:1.6cqw var(--cx-inset) 1.2cqw;gap:1.75cqw}
.cx-msg{width:100%;max-width:42em;margin-inline:auto}
.cx-msg.user{width:auto;max-width:90%;align-self:flex-end;margin-inline:0 .05em;padding:.57em .85em;border-radius:1.03em}
.cx-msg.assistant{align-self:stretch;margin-inline:0}
.cx-msg p{line-height:1.45}:is(.br-frame,mm-codex-workspace) .cx-msg .cx-artifact{max-width:100%;white-space:normal;margin-top:.4em}
.cx-composer{margin:.5cqw var(--cx-inset) 1.65cqw;padding:1cqw 1.6cqw .8cqw;min-width:0}
.cx-inspector{padding:0 var(--cx-inset) 1.3cqw;scrollbar-gutter:stable}
.cx-inspector>header{position:sticky;top:0;z-index:1;padding:.55em 0;background:#13151b;border-bottom:1px solid rgba(255,255,255,.08)}
.cx-inspector .code-lines{overflow:auto}.cx-inspector .code-lines>div{min-width:max-content;overflow:visible}
.cx-receipt,.cx-empty-diff{max-width:37em}
mm-codex-workspace:not([side-open]):not([compact]) .cx-side{display:none}
mm-codex-workspace[side-open]:not([compact]) .cx-layout{grid-template-columns:var(--cx-rail) clamp(100px,20.5cqw,158px) minmax(0,1fr)}
mm-codex-workspace:not([compact])[side-open] .cx-rail [data-cx=new]{display:none}
mm-codex-workspace[compact]{--cx-rail:clamp(22px,6.25cqw,29px);--cx-inset:clamp(8px,2.6cqw,14px)}
mm-codex-workspace[compact] .cx-window{font-size:clamp(10.5px,2.85cqw,12.5px);grid-template-rows:clamp(15px,3.9cqw,21px) minmax(0,1fr)}
mm-codex-workspace[compact] .cx-appname,mm-codex-workspace:not([side-open]) .cx-appname{display:block}
mm-codex-workspace[compact] .cx-side{position:absolute;z-index:4;inset:0 auto 0 var(--cx-rail);width:clamp(125px,38cqw,175px);padding:.75em .6em;transform:translateX(-.5em);opacity:0;visibility:hidden;box-shadow:1.2cqw 0 3.4cqw rgba(0,0,0,.55);transition:transform .16s ease-out,opacity .14s,visibility .16s}
mm-codex-workspace[compact][side-open] .cx-side{opacity:1;visibility:visible;transform:none}
:is(.br-frame,mm-codex-workspace) .cx-window .cx-scrim{position:absolute;inset:0 0 0 var(--cx-rail);z-index:3;border-radius:0;background:rgba(4,6,11,.56)}
mm-codex-workspace[compact] .cx-head{min-height:4.8cqw}
mm-codex-workspace[compact] .cx-log{gap:1.38cqw;padding-top:.85cqw}
@media(prefers-reduced-motion:reduce){mm-codex-workspace[compact] .cx-side{transition:none}}

.cx-side{display:flex;flex-direction:column;gap:.4em}
.cx-side .cx-brand,.cx-side .cx-new,.cx-side>small,.cx-projects{flex:none}
.cx-history{flex:1;min-height:2.3em;overflow-y:auto;scrollbar-width:thin}
.cx-projects{padding-top:.7em;border-top:1px solid rgba(255,255,255,.08);margin-top:.45em}
.cx-log .cx-msg.assistant,.cx-msg.user,.cx-msg p{overflow-wrap:anywhere}
.cx-empty{gap:.65em;padding:.6em .4em}
.cx-empty strong{text-align:center;line-height:1.18}.cx-empty svg{width:2.25em;height:2.25em}
.cx-proof .cx-proof-foot{flex-wrap:wrap;align-items:baseline}.cx-proof-foot output{flex:1;min-width:12em}
.cx-empty-diff,.cx-receipt{margin-block:.65em;overflow-wrap:anywhere}
.cx-receipt dl>div{align-items:baseline;gap:.7em}.cx-receipt dt{flex:1;min-width:0}.cx-receipt dd{max-width:72%}

.cx-inspector>header>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-inspector .cx-preview-file{margin-inline-start:auto;flex:none;white-space:nowrap}
mm-codex-workspace[compact][inspecting] .cx-head{display:none}
mm-codex-workspace[compact][inspecting] .cx-inspector>header{min-height:5.1cqw}
mm-codex-workspace[side-open] .cx-rail [data-cx=new]{visibility:hidden}

/* In a phone-sized remote window, use the native title bar as the conversation header. */
.cx-bar-thread,:is(.br-frame,mm-codex-workspace) .cx-window .cx-bar-review{display:none}
mm-codex-workspace[compact] .cx-window{--cx-reading:clamp(12px,3.3cqw,17px);grid-template-rows:clamp(20px,5.9cqw,27px) minmax(0,1fr)}
mm-codex-workspace[compact] .cx-titlebar{gap:1.2cqw;padding-inline:1.65cqw;background:#111318;color:#9398a6}
mm-codex-workspace[compact] .cx-titlebar .cx-appname{margin-left:.2cqw;flex:none;font-size:clamp(9px,2.42cqw,12px);font-weight:555;color:#9ea4b3}
mm-codex-workspace[compact] .cx-bar-thread{display:flex;gap:1.35cqw;align-items:center;min-width:0;flex:1;font-size:clamp(9.5px,2.62cqw,13px);color:#eef0f6}
.cx-bar-thread>span{color:#666c7b;font-weight:400}.cx-bar-thread strong{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
mm-codex-workspace[compact] .cx-titlebar .cx-bar-review{display:inline-flex;color:#9da3b3;min-width:1.85em;min-height:1.85em;margin-left:auto}
mm-codex-workspace[compact] .cx-head{display:none}
mm-codex-workspace[compact] .cx-log{padding:clamp(7px,2.4cqw,12px) var(--cx-reading) 1.35cqw;gap:clamp(7px,2.1cqw,12px)}
mm-codex-workspace[compact] .cx-msg.user{width:fit-content;max-width:83%;margin-inline:0;align-self:flex-end;padding:.52em .78em;border-radius:1em}
mm-codex-workspace[compact] .cx-msg.user p{text-wrap:balance;line-height:1.4}
mm-codex-workspace[compact] .cx-msg.assistant{max-width:100%}
mm-codex-workspace[compact] .cx-msg.assistant p{line-height:1.44;text-wrap:pretty}
mm-codex-workspace[compact] .cx-composer{margin:.55cqw var(--cx-reading) 2.15cqw;padding:1.3cqw 1.9cqw 1cqw;border-radius:clamp(9px,2.75cqw,14px)}
mm-codex-workspace[compact] .cx-inspector{padding-inline:var(--cx-reading)}
mm-codex-workspace[compact] .cx-inspector>header{gap:.65em}

:is(.br-frame,mm-codex-workspace) .cx-msg .cx-change-preview{display:grid;justify-content:stretch;align-items:start;gap:.25em;max-width:100%;border:1px solid rgba(255,255,255,.085);border-inline-start:2.5px solid #4ade80;border-radius:.55em;background:rgba(255,255,255,.035);padding:.42em .72em;margin-top:.6em;color:#cfd6e4;text-align:left}
.cx-change-file{display:flex;align-items:center;gap:.5em}.cx-change-file b{font:570 1em/1.25 ui-monospace,SFMono-Regular,Menlo,monospace;color:#edf0f7}
.cx-change-file small{margin-inline-start:auto;color:#4ade80!important;white-space:nowrap}
.cx-change-file i{font-style:normal;color:#f87171}.cx-change-preview>code{font:400 .95em/1.33 ui-monospace,SFMono-Regular,Menlo,monospace;color:#86efac;white-space:normal;overflow-wrap:anywhere}
.cx-change-preview>code i{font-style:normal;color:#4ade80}
mm-codex-workspace[compact] .cx-msg.user{max-width:min(84%,24em)}
mm-codex-workspace[compact] .cx-msg.user p{text-wrap:pretty}
