/* Codex desktop layout, with a smaller drawer on phones. */
:root{color-scheme:light;--accent:#202123;--accent-rgb:32,33,35;--bg:#f3f3f3;--panel:#fafafa;--panel-solid:#fafafa;--surface:#f3f3f3;--surface-hover:#ececec;--line:#e4e4e4;--line-strong:#e5e5e5;--text:#242526;--muted:#777;--faint:#999;--main-bg:#fff;--header-bg:#fff;--composer-bg:#fff;--assistant-text:#242526;--send-text:#fff;--shadow-color:#00000008;--sidebar-width:320px}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
.wallpaper,.wallpaper-shade{display:none}
#app{inset:12px 12px 12px 72px;width:auto;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 40px #00000004}
#sidebar{background:var(--panel);box-shadow:none;backdrop-filter:none}
.app-rail{position:fixed;inset:12px auto 12px 8px;width:52px;display:flex;flex-direction:column;gap:14px;align-items:center;padding-top:6px}
.rail-button{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;color:var(--muted);cursor:pointer}.rail-button.active{background:#e8e8e8;color:var(--text)}.rail-button:hover{background:var(--surface-hover)}.rail-button svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.rail-button:last-child{margin-top:auto}
.brand{height:74px;padding:0 20px;gap:5px}.brand-mark-small{display:none}.brand strong{font-size:25px;font-weight:650;letter-spacing:-.6px}.brand strong::after{content:'⌄';font-size:19px;font-weight:400;margin-left:10px;color:var(--muted)}.brand #appearance{margin-left:auto}.icon-button{border-radius:8px}
.new-thread{margin:2px 12px 20px;border:0;background:transparent;box-shadow:none;border-radius:10px;padding:10px 12px;font-size:17px;display:flex;align-items:center;gap:10px}.new-thread:hover{transform:none;background:var(--surface-hover)}.new-thread span{color:var(--text);font-size:24px}
.new-thread svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.thread-title{font-weight:400}
.library-head{padding-bottom:4px}.task-label{display:none}.thread-search{margin:0 16px 9px;background:transparent;border:1px solid var(--line);height:34px}.thread-search input{font-size:12px}.thread-search:focus-within{background:var(--surface);border-color:var(--muted)}
.control-drawer{margin:0 16px 14px;background:transparent;border:0}.control-drawer summary{padding:6px 0;font-size:12px}
#threads{padding:0 10px 14px;scrollbar-color:#ddd transparent}.sidebar-section-title{font-size:13px;font-weight:500;letter-spacing:0;padding:15px 10px 8px;color:var(--faint)}
.project-head{grid-template-columns:16px 24px minmax(0,1fr) auto;min-height:40px;padding:4px 8px;border-radius:10px}.project-icon{border:0;background:none;color:var(--text);width:22px;height:22px;border-radius:0;font-size:21px}.project-copy{padding-left:4px}.project-copy strong{font-size:var(--sidebar-title-size,15px);font-weight:400}.project-copy small,.project-count{display:none}.project-threads{padding-left:28px}
.thread{padding:9px 10px;margin:2px 0;border-radius:12px;color:var(--text)}.thread.active{background:var(--surface-hover)}.thread.active::before{display:none}.thread-title{font-size:var(--sidebar-title-size,15px)}.thread-row{gap:10px;min-height:22px}.thread-row::before{content:'';flex:0 0 16px;width:16px;height:16px;border:1.5px solid currentColor;border-radius:50%;clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 80%,15% 65%,0 65%)}.project-threads .thread-row::before{display:none}.thread-meta,.thread-pin{display:none}.thread-running{width:12px;height:12px;border:1.5px solid var(--line-strong);border-top-color:var(--muted);background:none;box-shadow:none;animation:codexSpin 1s linear infinite;flex-shrink:0}.thread-running::after{display:none}@keyframes codexSpin{to{transform:rotate(360deg)}}
.sidebar-foot{height:48px;background:transparent;border-top:0;font-size:12px}.sidebar-foot .dot.online{box-shadow:none}.sidebar-foot #account{margin-left:auto}.sidebar-foot #logout{margin-left:0}
main{grid-template-rows:68px minmax(0,1fr) auto auto;background:var(--main-bg);backdrop-filter:none}header{border-bottom:0;padding:0 24px;background:var(--header-bg);backdrop-filter:none}.thread-heading{flex:1;display:flex;align-items:center;gap:10px}.thread-heading strong{font-size:18px;font-weight:600}.thread-heading #projectName,.thread-heading #cwd{display:none}.turn-status{max-width:45%;padding:0;border:0;background:none;box-shadow:none;text-align:right}#turnState{font-size:12px}#progressDetail{display:none}
#messages{padding:25px max(28px,calc((100% - 980px)/2)) 30px;scrollbar-color:#ddd transparent}.message{margin-bottom:34px}.message.user{border:0;border-radius:23px;padding:12px 20px;box-shadow:none;background:var(--surface);max-width:85%;line-height:1.7}.message.assistant{line-height:1.85;color:var(--assistant-text)}.message.assistant::before{display:none}.message a{color:#477fba}.message pre{background:var(--surface)}.message.user p{margin:0}.message-tools{display:flex;align-items:center;gap:12px;margin-top:12px;color:var(--faint)}.message-tools button{border:0;background:none;color:inherit;padding:3px;font-size:12px;cursor:pointer}.message-tools button:hover{color:var(--text)}.delivery-state{font-size:11px;color:var(--muted)}.delivery-state.delivered,.delivery-state.confirmed{color:var(--muted)}
#composer{width:min(calc(100% - 40px),1000px);padding:16px 16px 11px;border:1px solid var(--line-strong);border-radius:28px;margin-bottom:18px;grid-template-columns:40px minmax(0,1fr) 42px;grid-template-rows:auto auto;gap:8px 5px;backdrop-filter:none;box-shadow:0 3px 12px #00000004}#composer:focus-within{border-color:#d4d4d4;box-shadow:0 3px 12px #00000006}
#attachmentTray{grid-row:1;grid-column:1/-1}#attachmentTray.visible~#prompt{grid-row:2}#prompt{grid-row:1;grid-column:1/-1;min-height:62px;padding:3px 2px;font-size:var(--message-font-size,16px)}#attach{grid-row:3;grid-column:1;align-self:center;border:0;background:none;color:var(--text);font-size:28px}#send{grid-row:3;grid-column:3;width:40px;height:40px;border-radius:50%;background:var(--accent);color:var(--send-text);box-shadow:none;font-size:25px;font-weight:400}#send:disabled{background:var(--surface-hover);color:var(--faint)}#composer small{grid-row:3;grid-column:2;align-self:center;padding:0;align-items:center;font-size:11px}#composerProject{color:var(--muted)}#composer small span:last-child{display:none}.composer-settings{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-left:auto}.composer-settings select{max-width:170px;border:0;background:transparent;color:var(--text);font-size:13px;padding:5px 2px;cursor:pointer}.composer-settings label{display:flex;align-items:center;gap:4px}.access-label{color:#ec5b00;font-size:12px;white-space:nowrap}
.empty{margin-top:18vh}.empty .logo{filter:none;color:var(--text)}.empty h2{font-size:24px;letter-spacing:-.5px}.empty p{font-size:14px}.empty .logo svg{width:48px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.file-card{box-shadow:none;background:var(--surface);border:1px solid var(--line);border-radius:14px}.file-card-actions button{background:var(--composer-bg);color:var(--text);border-color:var(--line)}
.sidebar-backdrop{display:none}.toast{position:fixed;bottom:190px;left:50%;transform:translateX(-50%);background:var(--panel-solid);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:12px 18px;z-index:40;box-shadow:0 6px 30px #0001;max-width:90vw}
button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid #7da9d7;outline-offset:2px}.thread[role=button]:focus-visible{outline:2px solid #7da9d7}.thread[aria-current=true]{background:var(--surface-hover)}
@media(min-width:1500px){:root{--sidebar-width:360px}.brand{height:78px}.thread{padding:11px 12px}main{grid-template-rows:76px minmax(0,1fr) auto auto}#messages{padding-top:35px}}
@media(max-width:1000px) and (min-width:761px){:root{--sidebar-width:270px}#app{inset:8px 8px 8px 62px}.app-rail{width:44px}#messages{padding:20px}#composerProject{display:none}}
@media(max-width:760px){.app-rail{display:none}#app{inset:0;border:0;border-radius:0}#sidebar{width:min(86vw,330px);height:100dvh;background:var(--panel);z-index:22;border-right:1px solid var(--line);box-shadow:10px 0 45px #0002;transform:translateX(-105%)}#sidebar.open{transform:none}.sidebar-backdrop:has(+ #app #sidebar.open){display:block;position:fixed;inset:0;background:#0003;z-index:20}.brand{height:68px}.brand strong{font-size:24px}.new-thread{margin-bottom:12px}.project-head{min-height:44px}.thread{padding:10px}.thread-title{font-size:15px}.thread-heading strong{font-size:16px}main{grid-template-rows:58px minmax(0,1fr) auto auto;height:100dvh}header{padding:0 10px}header #menu{display:grid}.turn-status{max-width:40%;background:none!important;border:0!important}#messages{padding:20px 16px 20px}.message{margin-bottom:26px}.message.user{max-width:94%;border-radius:20px;padding:10px 15px}.message.assistant{font-size:16px;line-height:1.8}#composer{width:calc(100% - 20px);margin-bottom:calc(9px + env(safe-area-inset-bottom));padding:12px 12px 9px;border-radius:24px;grid-template-columns:34px minmax(0,1fr) 36px;gap:5px}#prompt{min-height:45px;font-size:16px}#send{width:36px;height:36px}#attach{width:30px;font-size:26px}.composer-settings select{font-size:12px;max-width:135px}.access-label,#composerProject{display:none}#approval{padding:0 12px}.modal-card{max-width:calc(100vw - 24px)}.toast{bottom:155px}.empty h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){.thread-running{animation:none}}
