:root {
  color-scheme: light;
  --bg: #f7f7f6;
  --sidebar: #f3f3f2;
  --surface: #ffffff;
  --surface-2: #ececea;
  --hover: #e9e9e7;
  --selected: #e4e4e2;
  --ink: #252523;
  --muted: #858580;
  --faint: #aaa9a4;
  --line: #dfdfdc;
  --orange: #ed5b2a;
  --green: #0bbf63;
  --blue: #397bd8;
  --shadow: 0 14px 42px rgba(25, 25, 23, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--ink); font-size: 14px; }
button, input, textarea, select { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.codex-app { display: grid; grid-template-columns: 308px minmax(0, 1fr); width: 100%; height: 100%; }

.sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-header { display: flex; height: 76px; align-items: flex-end; justify-content: space-between; padding: 0 17px 11px; }
.icon-button, .new-task-button { border: 0; background: transparent; cursor: pointer; }
.brand-button { display: flex; align-items: center; gap: 5px; padding: 7px 2px; font-size: 17px; }
.brand-button strong { font-weight: 650; letter-spacing: -0.03em; }
.brand-button span { color: var(--muted); font-size: 13px; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #666662; }
.icon-button:hover { background: var(--hover); }
.icon-button:disabled { cursor: default; opacity: 0.35; }

.sidebar-search { display: flex; gap: 5px; margin: 0 12px 7px; }
.sidebar-search input { min-width: 0; flex: 1; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--surface); }
.sidebar-search input:focus { border-color: #b9b9b4; box-shadow: 0 0 0 3px rgba(0,0,0,.035); }
.sidebar-search button { width: 32px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 19px; }
.sidebar-search button:hover { background: var(--hover); }

.new-task-button { display: flex; width: calc(100% - 20px); height: 38px; align-items: center; gap: 10px; margin: 0 10px 8px; padding: 0 10px; border-radius: 8px; text-align: left; }
.new-task-button:hover { background: var(--hover); }
.new-task-icon { width: 16px; color: #555550; font-size: 17px; }
.sidebar-nav-button { display: flex; width: calc(100% - 20px); height: 34px; align-items: center; gap: 10px; margin: -3px 10px 8px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--ink); text-align: left; font-size: 13px; }
.sidebar-nav-button:hover { background: var(--hover); }
.sidebar-nav-button > span:first-child { width: 16px; color: #666660; font-size: 18px; line-height: 1; }

.project-tree { flex: 1; min-height: 0; overflow: auto; padding: 0 6px 16px; scrollbar-width: thin; scrollbar-color: #c7c7c3 transparent; }
.project-group { margin: 2px 0 4px; }
.project-row { display: flex; width: 100%; height: 31px; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; }
.project-row:hover { background: var(--hover); }
.project-row .folder { position: relative; display: block; width: 16px; height: 16px; flex: 0 0 16px; }
.project-row .folder svg { display: block; width: 16px; height: 16px; overflow: visible; }
.project-row .folder path { fill: #fafaf9; stroke: #aaa9a4; stroke-width: .85; stroke-linejoin: round; }
.project-row.remote .folder::after { position: absolute; right: -1px; bottom: 0; width: 5px; height: 5px; border: 1px solid var(--sidebar); border-radius: 50%; background: #49a8e8; content: ""; }
.project-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-host { color: var(--muted); font-size: 12px; }
.project-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.project-dot.offline { background: #d85a4a; box-shadow: 0 0 0 3px rgba(216,90,74,.1); }
.project-dot.checking { background: #d5a232; animation: pulse 1.2s ease-in-out infinite; }
.project-chevron { width: 12px; color: var(--faint); opacity: 0; transition: transform .16s ease; }
.project-row:hover .project-chevron { opacity: 1; }
.project-group.expanded .project-chevron { transform: rotate(90deg); }

.thread-list { display: none; padding: 0 3px 4px; }
.project-group.expanded .thread-list { display: block; }
.thread-row { display: flex; width: 100%; min-height: 31px; align-items: center; gap: 7px; padding: 6px 10px 6px 33px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.thread-row:hover { background: var(--hover); }
.thread-row.selected { background: var(--selected); }
.thread-row-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row.pinned .thread-row-title::before { margin-right: 5px; color: var(--muted); content: "⌖"; }
.thread-indicator { width: 16px; flex: 0 0 16px; color: var(--muted); font-size: 11px; text-align: center; }
.awaiting-view-dot { width: 8px; height: 8px; flex-basis: 8px; margin-right: 4px; border-radius: 50%; background: #3182f6; box-shadow: 0 0 0 1px rgba(49,130,246,.12); }
.context-ring {
  --context-progress: 0;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #555551 calc(var(--context-progress) * 1%), #cececa 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
}
.context-ring.indeterminate {
  background: conic-gradient(from -90deg, #555551 0 22%, #cececa 22% 100%);
  animation: spin .9s linear infinite;
}
.show-more { width: 100%; padding: 5px 10px 6px 36px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 12px; }
.show-more:hover { color: var(--ink); }

.connection-banner { display: flex; min-width: 0; align-items: center; gap: 8px; border: 1px solid #e5c4bb; background: #fff1ec; color: #8e4635; font-size: 12px; }
.connection-banner[hidden] { display: none; }
.connection-indicator { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #d85a4a; }
.connection-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-banner button { flex: none; padding: 3px 7px; border: 0; border-radius: 6px; background: rgba(142,70,53,.1); color: inherit; cursor: pointer; font-size: 11px; }
.connection-banner button:disabled { cursor: default; opacity: .55; }
.sidebar-connection { margin: 0 10px 8px; padding: 7px 8px; border-radius: 9px; }
.workspace-connection { z-index: 6; flex: none; margin: 8px 16px 0; padding: 7px 9px; border-radius: 9px; }

.sidebar-footer { display: flex; height: 48px; align-items: center; gap: 7px; padding: 0 15px; border-top: 1px solid var(--line); }
.sidebar-runtime { min-width: 0; flex: 1; color: var(--muted); font-size: 12px; }
.local-status { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.workspace { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; background: var(--bg); }
.automations-page { width: min(100%, 720px); flex: 1; overflow: auto; margin: 0 auto; padding: 42px 28px 58px; }
.automations-page[hidden] { display: none; }
.automations-page-header h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.automations-page-header p { margin: 7px 0 25px; color: var(--muted); font-size: 14px; }
.automation-search { display: flex; height: 40px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); }
.automation-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; }
.automation-filters { display: flex; gap: 6px; margin: 20px 0 12px; }
.automation-filters button { padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.automation-filters button[aria-selected="true"] { background: #ececea; color: var(--ink); font-weight: 600; }
.automation-list { border-top: 1px solid var(--line); }
.automation-row { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 11px; padding: 15px 8px; border-bottom: 1px solid var(--line); }
.automation-status { width: 12px; height: 12px; margin-top: 5px; border: 1px solid #a8a8a3; border-radius: 50%; }
.automation-status.active { border-color: #4d9e65; box-shadow: inset 0 0 0 3px #fff; background: #28a75a; }
.automation-status.paused { background: #d6d6d2; }
.automation-copy { display: grid; gap: 4px; min-width: 0; }
.automation-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 620; }
.automation-copy span, .automation-copy small { color: var(--muted); font-size: 12px; }
.automation-empty { margin: 26px 0; color: var(--muted); text-align: center; font-size: 13px; }
.task-header { position: relative; z-index: 8; display: flex; height: 72px; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 0 17px; border-bottom: 1px solid rgba(223,223,220,.7); background: rgba(247,247,246,.93); backdrop-filter: blur(16px); }
.task-header.is-empty .task-folder, .task-header.is-empty .task-header-actions { opacity: .35; }
.task-heading { display: flex; min-width: 0; align-items: center; gap: 10px; }
.task-folder { color: #555550; font-size: 19px; }
.task-heading div { min-width: 0; }
.task-heading h1 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.task-heading p { overflow: hidden; margin: 2px 0 0; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.task-header-actions { display: flex; align-items: center; gap: 3px; }
.menu-dots { letter-spacing: 1px; }
.mobile-back { display: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 28px; line-height: 1; }

.task-menu { position: absolute; z-index: 20; top: 48px; left: 154px; width: 222px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: rgba(250,250,249,.98); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.task-menu button { display: grid; width: 100%; grid-template-columns: 23px 1fr; align-items: center; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; }
.task-menu button:hover:not(:disabled) { background: var(--hover); }
.task-menu button:disabled { color: #aaa9a4; cursor: default; }
.task-menu button span:first-child { color: #666662; }
.task-menu hr { height: 1px; margin: 6px 2px; border: 0; background: var(--line); }

.conversation { flex: 1; min-height: 0; overflow-y: auto; padding: 34px max(24px, calc((100vw - 308px - 790px) / 2)) 190px; scroll-behavior: auto; }
.codex-app.has-attachments .conversation { padding-bottom: 260px; }
.conversation-inner { width: min(100%, 740px); margin: 0 auto; }
.welcome-state { display: grid; min-height: calc(100vh - 210px); place-content: center; justify-items: center; text-align: center; }
.welcome-mark { display: grid; width: 52px; height: 52px; margin-bottom: 15px; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 22px; box-shadow: 0 8px 25px rgba(0,0,0,.04); }
.welcome-state h2 { margin: 0 0 7px; font-size: 20px; }
.welcome-state p { margin: 0 0 18px; color: var(--muted); }
.welcome-state button { padding: 8px 15px; border: 0; border-radius: 9px; background: var(--ink); color: white; cursor: pointer; }

.message { width: min(100%, 740px); margin: 0 auto 28px; }
.message-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.message-body { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; line-height: 1.7; }
.message-body p { margin: 0 0 9px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body ul, .message-body ol { margin: 5px 0 10px; padding-left: 22px; }
.message-body li + li { margin-top: 3px; }
.message-body code { padding: 1px 4px; border-radius: 4px; background: #e9e9e7; font: 12px/1.5 "Cascadia Code", Consolas, monospace; }
.message-body pre { overflow: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #eeeeec; white-space: pre; font: 12px/1.55 "Cascadia Code", Consolas, monospace; }
.message-body pre code { padding: 0; background: transparent; font: inherit; }
.message-body pre[data-language]::before { display: block; margin-bottom: 7px; color: var(--muted); content: attr(data-language); font: 10px/1.2 system-ui, sans-serif; text-transform: uppercase; }
.message-body a { color: var(--blue); text-decoration: none; }
.message-body a:hover { text-decoration: underline; }
.local-file-link { display: inline-flex; align-items: center; gap: 4px; color: #3181d8 !important; font-weight: 550; }
.local-file-link::before { display: inline-grid; width: 15px; height: 15px; place-items: center; border-radius: 3px; background: #3181d8; color: white; content: "⌘"; font-size: 9px; line-height: 1; }
.resource-card-list { display: grid; gap: 9px; margin-top: 17px; }
.resource-card { display: grid; min-height: 72px; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #e2e2de; border-radius: 13px; background: #fbfbfa; color: var(--ink) !important; text-decoration: none !important; }
.resource-card:hover { border-color: #d2d2cd; background: #f7f7f5; }
.resource-card-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; background: #f0f3f4; color: #38aee5; font-size: 27px; }
.resource-card-copy { display: grid; min-width: 0; gap: 2px; }
.resource-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.resource-card-copy small { color: var(--muted); font-size: 11px; }
.resource-card-action { flex: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #555550; white-space: nowrap; font-size: 12px; }
.message.user { display: flex; flex-direction: column; align-items: flex-end; }
.message.user .message-label { display: none; }
.message.user .message-body { max-width: min(76%, 570px); padding: 11px 15px; border-radius: 18px; background: #e8e8e7; line-height: 1.55; }
.message-attachments { display: flex; max-width: min(88%, 620px); flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-bottom: 8px; }
.message-attachments img { display: block; width: 116px; height: 92px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.message.assistant .message-body { color: #2e2e2b; white-space: normal; }
.message.assistant .message-body h1, .message.assistant .message-body h2, .message.assistant .message-body h3, .message.assistant .message-body h4, .message.assistant .message-body h5, .message.assistant .message-body h6 { margin: 17px 0 8px; color: #252522; line-height: 1.3; letter-spacing: -.015em; }
.message.assistant .message-body h1:first-child, .message.assistant .message-body h2:first-child, .message.assistant .message-body h3:first-child { margin-top: 0; }
.message.assistant .message-body h1 { font-size: 20px; }
.message.assistant .message-body h2 { font-size: 18px; }
.message.assistant .message-body h3 { font-size: 16px; }
.message.assistant .message-body h4, .message.assistant .message-body h5, .message.assistant .message-body h6 { font-size: 14px; }
.message.assistant .message-body blockquote { margin: 9px 0 12px; padding: 2px 0 2px 12px; border-left: 3px solid #c9c9c4; color: #6f6f69; }
.message.assistant .message-body blockquote > :last-child { margin-bottom: 0; }
.message.assistant .message-body hr { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.message.assistant .message-body del { color: var(--muted); }
.markdown-task { display: flex; align-items: flex-start; gap: 7px; list-style: none; }
.markdown-task input { width: 14px; height: 14px; margin: 5px 0 0 -20px; accent-color: #62625d; }
.markdown-table-wrap { max-width: 100%; overflow-x: auto; margin: 9px 0 13px; border: 1px solid var(--line); border-radius: 9px; }
.markdown-table-wrap table { width: 100%; min-width: 360px; border-collapse: collapse; background: #fafaf8; font-size: 12px; }
.markdown-table-wrap th, .markdown-table-wrap td { padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.markdown-table-wrap th:last-child, .markdown-table-wrap td:last-child { border-right: 0; }
.markdown-table-wrap tbody tr:last-child td { border-bottom: 0; }
.markdown-table-wrap th { background: #f0f0ed; color: #555550; font-weight: 650; }
.message.phase-commentary .message-label { display: none; }
.message.phase-final_answer .message-label { display: none; }
.message.tool { margin-top: -8px; margin-bottom: 16px; }
.message.tool .message-label { display: flex; align-items: center; gap: 7px; color: #777772; }
.message.tool .message-label::before { content: "⌘"; }
.message.tool .message-body { color: #777772; font-size: 13px; }
.message.tool pre { max-height: 320px; overflow: auto; margin: 9px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f0f0ee; white-space: pre-wrap; font: 12px/1.55 "Cascadia Code", Consolas, monospace; }
.activity-cluster { width: min(100%, 740px); margin: -7px auto 18px; }
.activity-group { color: #74746f; font-size: 13px; }
.activity-group summary { display: flex; width: fit-content; align-items: center; gap: 7px; padding: 4px 1px; border-radius: 6px; cursor: pointer; list-style: none; }
.activity-group summary:hover { color: var(--ink); }
.activity-group summary::-webkit-details-marker { display: none; }
.activity-icon { display: inline-grid; width: 16px; place-items: center; color: #8a8a85; font-size: 14px; }
.activity-group[open] summary { color: var(--ink); }
.activity-list { display: grid; gap: 7px; margin: 6px 0 2px 23px; }
.activity-item { display: grid; grid-template-columns: 84px minmax(0,1fr) auto; gap: 8px; min-width: 0; }
.activity-item strong { overflow: hidden; color: #73736e; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.activity-item > span { overflow: hidden; color: #90908b; text-overflow: ellipsis; white-space: nowrap; }
.activity-item pre { grid-column: 1 / -1; max-height: 280px; overflow: auto; margin: 2px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f0f0ee; white-space: pre-wrap; font: 12px/1.5 "Cascadia Code", Consolas, monospace; }
.activity-status { align-self: center; color: #8b8b86; white-space: nowrap; font-size: 11px; font-style: normal; }
.activity-status.status-inProgress { color: #5d78a5; }
.activity-status.status-failed { color: #c1473e; }
.activity-meta { grid-column: 1 / -1; overflow: hidden; color: #a0a09a; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.file-change-list { display: grid; grid-column: 1 / -1; gap: 3px; min-width: 0; }
.file-change-list > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 7px; border-radius: 6px; background: #f3f3f1; }
.file-change-list > div > span:first-child { overflow: hidden; color: #777772; text-overflow: ellipsis; white-space: nowrap; font: 10px/1.45 "Cascadia Code", Consolas, monospace; }
.file-change-stats { display: flex; flex: none; gap: 5px; }
.file-change-stats i { font-size: 10px; font-style: normal; }
.agent-status-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 22px; }
.agent-status-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #e5e5e1; border-radius: 999px; background: #fafaf8; color: #7b7b76; }
.agent-status-chip i { color: #8d79cf; font-size: 8px; font-style: normal; }
.agent-status-chip strong { overflow: hidden; color: #777772; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 500; }
.agent-status-chip small { flex: none; color: #92928c; font-size: 10px; }
.agent-status-chip.status-interrupted i, .agent-status-chip.status-failed i { color: #c66a61; }
.file-change-summary { display: flex; width: fit-content; align-items: center; gap: 5px; margin: 8px auto 0; padding: 5px 11px; border: 1px solid #e6e6e2; border-radius: 999px; background: #fafaf8; color: #7c7c77; font-size: 12px; }
.diff-added { color: #0b9e50; }
.diff-removed { color: #d64d47; }
.turn-process { width: min(100%, 740px); margin: -4px auto 25px; color: var(--muted); }
.turn-process-shell { width: min(100%, 740px); margin: -4px auto 25px; }
.turn-process-shell > .turn-process { width: 100%; margin: 0; }
.turn-process-persistent { display: grid; gap: 16px; padding-top: 10px; }
.turn-process-persistent[hidden] { display: none; }
.turn-process-persistent .message { width: 100%; margin: 0; }
.turn-process > summary { display: grid; min-height: 54px; grid-template-columns: max-content 14px minmax(0,1fr); grid-template-rows: minmax(20px,auto) 1px; align-content: center; align-items: center; column-gap: 5px; row-gap: 10px; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.turn-process > summary::-webkit-details-marker { display: none; }
.turn-process > summary:focus { outline: none; }
.turn-process-label { flex: none; color: #858580; font-size: 12px; line-height: 1; }
.turn-process-chevron { display: grid; width: 14px; height: 14px; flex: none; place-items: center; color: #9d9d98; font-size: 18px; line-height: 1; transform: rotate(90deg); transition: transform .15s ease; }
.turn-process[open] .turn-process-chevron { transform: rotate(-90deg); }
.turn-process-rule { width: 100%; height: 1px; grid-column: 1 / -1; background: var(--line); }
.turn-process-content { padding: 9px 0 2px; color: #333330; }
.turn-process-content > :last-child { margin-bottom: 0; }
.turn-process-content .message { width: 100%; margin: 0 0 20px; }
.turn-process-content .message.phase-commentary .message-body { color: #343431; white-space: normal; font-size: 14px; line-height: 1.7; }
.turn-process-content .activity-cluster { width: 100%; margin: -3px 0 18px; }
.turn-process[data-status="inProgress"] .turn-process-label { color: #687b98; }
.turn-process[data-status="inProgress"] .turn-process-rule { background: linear-gradient(90deg, #ccd4df, var(--line)); }
.turn-process-expanded { width: min(100%, 740px); margin: -2px auto 24px; color: #333330; }
.turn-process-expanded > :last-child { margin-bottom: 0; }
.turn-process-expanded .message { width: 100%; margin: 0 0 20px; }
.turn-process-expanded .message.phase-commentary .message-body { color: #343431; font-size: 14px; line-height: 1.7; }
.agent-activity-group { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0 20px; }
.agent-activity-chips { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; }
.agent-activity-chip { display: inline-flex; max-width: 190px; min-height: 31px; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #e7e7e3; border-radius: 999px; background: #fbfbfa; color: #7b7b76; font-size: 12px; }
.agent-activity-chip i { width: 14px; height: 14px; flex: none; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #b7dcff, #659de2 47%, #8d78cf 100%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.45); }
.agent-activity-chip:nth-child(3n+2) i { background: radial-gradient(circle at 30% 30%, #d9c8ff, #9b7be0 47%, #7656b3 100%); }
.agent-activity-chip:nth-child(3n) i { background: radial-gradient(circle at 30% 30%, #ffd1e3, #e88bae 47%, #ca668d 100%); }
.agent-activity-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-activity-status { color: #8e8e89; white-space: nowrap; font-size: 12px; }
.reasoning-only { overflow: hidden; margin: -2px 0 16px; color: #a0a09a; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.reasoning-activity { position: relative; margin: -2px 0 18px; color: #8b8b86; }
.reasoning-activity > summary { display: flex; min-height: 30px; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.reasoning-activity > summary::-webkit-details-marker { display: none; }
.reasoning-activity > summary:focus { outline: none; }
.reasoning-activity > summary > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.reasoning-activity-chevron { display: grid; width: 14px; height: 14px; flex: none; place-items: center; color: #a6a6a1; font-size: 18px; transform: rotate(90deg); transition: transform .15s ease; }
.reasoning-activity[open] .reasoning-activity-chevron { transform: rotate(-90deg); }
.reasoning-activity-list { position: relative; display: grid; max-height: 300px; gap: 0; overflow-y: auto; padding: 2px 15px 4px 0; scrollbar-width: thin; scrollbar-color: #d2d2ce transparent; }
.reasoning-activity-list::after { position: sticky; bottom: 0; height: 18px; margin-top: -18px; background: linear-gradient(transparent, var(--bg)); content: ""; pointer-events: none; }
.reasoning-activity-row { display: grid; min-width: 0; min-height: 31px; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 1px; color: #858580; }
.reasoning-activity-icon { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #9b9b96; border-radius: 4px; color: #74746f; font: 9px/1 "Cascadia Code", Consolas, monospace; }
.reasoning-activity-row > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.reasoning-activity-meta { grid-column: 2; min-width: 0; overflow: hidden; color: #a0a09a; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.reasoning-activity-changes { grid-column: 2; margin: 4px 0 7px; }
.reasoning-activity-output { grid-column: 2; max-height: 260px; overflow: auto; margin: 5px 0 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f0f0ee; color: #666661; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.5 "Cascadia Code", Consolas, monospace; }
.reasoning-activity-row.status-failed { color: #b26961; }
.standalone-activity, .context-compaction { display: grid; min-width: 0; min-height: 31px; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 1px; margin: -2px 0 10px; color: #858580; }
.standalone-activity-icon, .context-compaction-icon { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #9b9b96; border-radius: 4px; color: #74746f; font: 9px/1 "Cascadia Code", Consolas, monospace; }
.context-compaction-icon { border-color: transparent; font: 12px/1 system-ui, sans-serif; }
.standalone-activity > span:last-child, .context-compaction > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.standalone-activity.status-failed { color: #b26961; }
.turn-file-card { width: min(100%, 740px); margin: -8px auto 27px; overflow: hidden; border: 1px solid #dededa; border-radius: 13px; background: #fafaf9; }
.turn-file-card-header { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.turn-file-card-open { display: grid; min-width: 0; flex: 1; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.turn-file-card-open:focus { outline: none; }
.turn-file-card-open:focus-visible { border-radius: 10px; box-shadow: 0 0 0 2px rgba(74,126,191,.28); }
.turn-file-card-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 11px; background: #f0f0ee; color: #696963; font-size: 22px; }
.turn-file-card-icon svg { width: 25px; height: 25px; }
.turn-file-card-copy { display: grid; min-width: 0; gap: 4px; }
.turn-file-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.turn-file-stats { display: flex; min-height: 16px; align-items: center; gap: 5px; }
.turn-file-stats i { font-size: 12px; font-style: normal; }
.turn-file-card-actions { position: relative; z-index: 1; display: flex; flex: none; align-items: center; gap: 5px; }
.turn-file-card-actions button { min-height: 36px; padding: 7px 12px; border: 1px solid #dededa; border-radius: 10px; background: #fdfdfc; color: #333330; cursor: pointer; font-size: 13px; }
.turn-file-card-actions button:hover { background: #f1f1ef; }
.turn-file-card-actions .turn-file-undo { padding-inline: 8px; border-color: transparent; background: transparent; }
.turn-file-card-actions button:disabled { cursor: default; opacity: .45; }
.turn-file-card-list { border-top: 1px solid #e6e6e2; }
.turn-file-card-row { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 15px; border: 0; border-bottom: 1px solid #eeeeeb; background: transparent; color: #6d6d68; cursor: pointer; text-align: left; }
.turn-file-card-row:hover { background: #f2f2f0; }
.turn-file-card-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.turn-file-large { margin-left: auto; color: #95958f; white-space: nowrap; font-size: 11px; }
.turn-file-card-more { width: 100%; min-height: 42px; padding: 9px 15px; border: 0; background: transparent; color: #555550; cursor: pointer; text-align: left; font-size: 12px; }
.turn-file-card-more:hover { background: #f2f2f0; }
.turn-inline-diff { display: grid; max-height: 360px; overflow: auto; margin: 0; padding: 10px 0; background: #f7f7f5; color: #666661; white-space: pre; font: 11px/1.55 "Cascadia Code", Consolas, monospace; }
.turn-inline-diff > span { display: block; min-width: max-content; padding: 0 14px; }
.turn-inline-diff > .line-added { background: rgba(35, 154, 86, .09); color: #267448; }
.turn-inline-diff > .line-removed { background: rgba(211, 74, 67, .08); color: #9b4641; }
.turn-inline-diff > .line-hunk { color: #657da0; }

.run-state { position: absolute; z-index: 5; right: 0; bottom: 146px; left: 308px; width: fit-content; max-width: calc(100% - 48px); margin: auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(248,248,247,.95); color: var(--muted); font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.run-state .context-ring { display: inline-block; margin-right: 6px; vertical-align: -3px; }
.spinner { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid #cfd9e8; border-top-color: #6d9cdd; border-radius: 50%; animation: spin .8s linear infinite; }

.goal-panel { position: absolute; z-index: 6; right: 24px; bottom: 126px; left: 24px; width: min(calc(100% - 48px), 740px); max-height: min(38vh, 320px); margin: auto; overflow: hidden; border: 1px solid #dededb; border-radius: 15px; background: rgba(252,252,250,.98); box-shadow: 0 10px 32px rgba(0,0,0,.08); backdrop-filter: blur(16px); }
.goal-panel[hidden] { display: none; }
.goal-panel.plan-only { display: flex; overflow: visible; flex-direction: column-reverse; gap: 8px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.goal-panel.plan-only .goal-main-row { align-self: center; width: fit-content; margin: 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: rgba(250,250,248,.98); box-shadow: 0 7px 22px rgba(0,0,0,.07); backdrop-filter: blur(14px); }
.goal-panel.plan-only .goal-toggle { min-height: 35px; padding: 5px 12px 5px 9px; }
.goal-panel.plan-only .goal-copy { flex: none; }
.goal-panel.plan-only .goal-copy small, .goal-panel.plan-only .goal-duration { display: none; }
.goal-panel.plan-only .goal-details { order: 2; width: 100%; max-height: min(31vh, 270px); padding: 12px 15px; border: 1px solid #dededb; border-radius: 15px; background: rgba(252,252,250,.98); box-shadow: 0 10px 32px rgba(0,0,0,.08); backdrop-filter: blur(16px); }
.goal-main-row { display: flex; min-width: 0; align-items: center; gap: 5px; padding: 5px 6px 5px 8px; }
.goal-toggle { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 4px 3px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.goal-toggle[aria-disabled="true"] { cursor: default; }
.goal-mark { display: grid; width: 19px; height: 19px; flex: none; place-items: center; color: #7d91ad; font-size: 14px; }
.goal-copy { display: flex; min-width: 0; flex: 1; align-items: baseline; gap: 4px; }
.goal-copy strong { flex: none; color: #555550; font-size: 12px; font-weight: 600; }
.goal-copy small { overflow: hidden; color: #8c8c86; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.goal-duration { flex: none; color: #8f8f89; white-space: nowrap; font-size: 10px; }
.goal-chevron { width: 12px; flex: none; color: #a0a09a; font-size: 16px; }
.goal-actions { display: flex; flex: none; align-items: center; gap: 1px; }
.goal-actions button { display: grid; width: 27px; height: 27px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #858580; cursor: pointer; font-size: 12px; }
.goal-actions button:hover { background: var(--hover); color: var(--ink); }
.goal-actions button:disabled { cursor: default; opacity: .45; }
.goal-details { max-height: min(30vh, 250px); overflow-y: auto; padding: 8px 12px 11px 35px; border-top: 1px solid var(--line); }
.goal-details > p { margin: 0 0 8px; color: #777772; font-size: 11px; line-height: 1.5; }
.goal-plan { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.goal-plan li { display: grid; min-height: 20px; grid-template-columns: 17px minmax(0,1fr); align-items: start; gap: 8px; color: #74746f; font-size: 13px; line-height: 1.42; }
.plan-step-mark { position: relative; display: inline-grid; width: 14px; height: 14px; margin-top: 2px; place-items: center; border: 1.5px solid #b8b8b2; border-radius: 50%; color: #fff; font-size: 9px; line-height: 1; }
.goal-plan li.plan-completed { color: #989892; }
.goal-plan li.plan-completed .plan-step-mark { border-color: #aebbb3; background: #fff; color: #739783; }
.goal-plan li.plan-completed .plan-step-mark::after { content: "✓"; font-weight: 700; transform: translateY(-.3px); }
.goal-plan li.plan-inProgress { color: #444440; font-weight: 550; }
.goal-plan li.plan-inProgress .plan-step-mark { border-color: #d4dce7; border-top-color: #6d9cdd; animation: spin .85s linear infinite; }
.goal-budget { margin-top: 9px; color: #94948e; font-size: 10px; }
.codex-app.has-goal .conversation { padding-bottom: 245px; }
.codex-app.has-expanded-plan .conversation { padding-bottom: 365px; }

.composer { position: absolute; z-index: 7; right: 24px; bottom: max(15px, env(safe-area-inset-bottom)); left: 24px; width: min(calc(100% - 48px), 740px); min-height: 100px; margin: auto; padding: 13px 13px 10px; border: 1px solid #dededb; border-radius: 20px; background: rgba(253,253,252,.98); box-shadow: 0 15px 50px rgba(0,0,0,.12); backdrop-filter: blur(16px); }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 210px; padding: 1px 2px 8px; resize: none; border: 0; outline: 0; background: transparent; font-size: 14px; line-height: 1.55; }
.composer textarea::placeholder { color: #adada8; }
.attachment-preview { display: flex; gap: 8px; overflow-x: auto; padding: 1px 1px 10px; scrollbar-width: thin; }
.attachment-preview[hidden] { display: none; }
.attachment-card { position: relative; width: 68px; height: 58px; flex: 0 0 68px; }
.attachment-card img { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.attachment-card button { position: absolute; top: -6px; right: -6px; display: grid; width: 19px; height: 19px; place-items: center; padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: #292927; color: white; cursor: pointer; font-size: 12px; line-height: 1; }
.composer-toolbar { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 14px; }
.composer-left, .composer-right { display: flex; min-width: 0; align-items: center; gap: 9px; }
.composer-icon { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 21px; }
.composer-icon:hover { background: var(--hover); }
.access-badge { display: inline-flex; min-width: 0; align-items: center; gap: 5px; padding: 4px 5px; border: 0; border-radius: 7px; background: transparent; color: #777772; cursor: pointer; font-size: 12px; }
.access-badge:hover { background: var(--hover); }
.access-badge:disabled { cursor: default; opacity: .5; }
.access-badge[data-permission-kind="full"] { color: var(--orange); }
.access-badge[data-permission-kind="guardian"] { color: #7c68b6; }
.access-badge-icon { flex: none; font-size: 11px; }
.access-badge-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-menu { position: absolute; z-index: 18; bottom: 46px; left: 12px; width: min(310px, calc(100% - 24px)); max-height: min(54dvh, 420px); overflow-y: auto; padding: 7px; border: 1px solid #deded9; border-radius: 13px; background: rgba(252,252,250,.99); box-shadow: 0 20px 55px rgba(30,30,27,.18); backdrop-filter: blur(18px); }
.access-menu-title { padding: 8px 10px 6px; color: #555550; font-size: 12px; font-weight: 650; }
.access-menu-status { padding: 12px 10px; color: var(--muted); font-size: 11px; }
.access-menu-options { display: grid; gap: 2px; }
.access-menu-option { display: grid; width: 100%; min-height: 48px; grid-template-columns: minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; text-align: left; }
.access-menu-option:hover:not(:disabled), .access-menu-option[aria-checked="true"] { background: #f0f0ed; }
.access-menu-option:disabled { cursor: default; opacity: .42; }
.access-menu-option strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.access-menu-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.access-menu-option[data-profile-id*="danger"] strong, .access-menu-option[data-profile-id*="full"] strong { color: var(--orange); }
.access-menu-check { color: var(--orange); text-align: center; }
.add-menu { position: absolute; z-index: 19; bottom: 46px; left: 12px; width: min(320px, calc(100% - 24px)); max-height: min(62dvh, 480px); overflow-y: auto; padding: 7px; border: 1px solid #deded9; border-radius: 13px; background: rgba(252,252,250,.99); box-shadow: 0 20px 55px rgba(30,30,27,.18); backdrop-filter: blur(18px); }
.add-menu button { display: grid; width: 100%; min-height: 44px; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 8px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.add-menu button:hover:not(:disabled) { background: var(--hover); }
.add-menu button:disabled { cursor: default; opacity: .42; }
.add-menu button > span:first-child { color: #777772; text-align: center; }
.add-menu strong, .add-menu small { display: block; }
.add-menu strong { font-size: 12px; font-weight: 600; }
.add-menu small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.add-menu hr { height: 1px; margin: 5px 2px; border: 0; background: var(--line); }
.composer-status { max-width: 290px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.model-label { padding: 5px 7px; border: 0; border-radius: 7px; background: transparent; color: #777772; white-space: nowrap; cursor: pointer; font-size: 12px; }
.model-label:hover { background: var(--hover); }
.model-label:disabled { cursor: default; opacity: .5; }
.send-button, .stop-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: #20201e; color: white; cursor: pointer; font-size: 18px; font-weight: 700; }
.send-button:disabled { background: #b9b9b5; cursor: default; }
.stop-button { font-size: 11px; }

.model-dialog { position: fixed; inset: auto 24px 118px auto; width: 330px; max-height: min(72vh, 680px); margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fbfbfa; box-shadow: 0 24px 70px rgba(25,25,23,.2); }
.model-dialog::backdrop { background: transparent; }
.model-dialog form { display: flex; max-height: inherit; flex-direction: column; }
.model-dialog header { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 11px; border-bottom: 1px solid var(--line); }
.model-dialog header p { margin: 0 0 2px; color: var(--muted); font-size: 11px; }
.model-dialog h2 { margin: 0; font-size: 16px; }
.model-dialog header button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 20px; }
.model-dialog header button:hover { background: var(--hover); }
.model-dialog section { min-height: 0; padding: 11px 10px 3px; }
.model-dialog section + section { border-top: 1px solid var(--line); }
.model-dialog h3 { margin: 0 7px 7px; color: var(--muted); font-size: 11px; font-weight: 500; }
.settings-options { display: grid; gap: 2px; max-height: 240px; overflow-y: auto; }
.settings-option { display: grid; width: 100%; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.settings-option:hover { background: var(--hover); }
.settings-option strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 520; }
.settings-option small { display: block; margin-top: 2px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.settings-option .check { color: transparent; font-size: 15px; }
.settings-option.selected .check { color: var(--ink); }
.model-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.model-dialog footer span { min-width: 0; flex: 1; color: var(--muted); font-size: 10px; }
.model-dialog footer button { padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.model-dialog footer button:hover { background: var(--hover); color: var(--ink); }

.diff-review-dialog { width: min(1080px, calc(100vw - 48px)); height: min(780px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid #d8d8d4; border-radius: 16px; background: #f8f8f7; box-shadow: 0 28px 90px rgba(20,20,18,.24); }
.diff-review-dialog::backdrop { background: rgba(25,25,23,.18); backdrop-filter: blur(2px); }
.diff-review-shell { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.diff-review-header { display: flex; min-height: 64px; flex: none; align-items: center; justify-content: space-between; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); background: #fbfbfa; }
.diff-review-header p { margin: 0 0 2px; color: var(--muted); font-size: 10px; }
.diff-review-header h2 { margin: 0; font-size: 15px; }
.diff-review-header button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #777772; cursor: pointer; font-size: 20px; }
.diff-review-header button:hover { background: var(--hover); }
.diff-review-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: 260px minmax(0,1fr); }
.diff-review-files { min-height: 0; overflow-y: auto; padding: 8px; border-right: 1px solid var(--line); background: #f4f4f2; }
.diff-review-files button { display: flex; width: 100%; min-height: 40px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: #656560; cursor: pointer; text-align: left; }
.diff-review-files button:hover, .diff-review-files button.selected { background: #e9e9e6; color: #2f2f2c; }
.diff-review-files button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.diff-review-content { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #fafaf9; }
.diff-review-content > header { display: flex; min-height: 45px; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.diff-review-content > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px/1.4 "Cascadia Code", Consolas, monospace; }
.diff-review-diff { min-height: 0; flex: 1; overflow: auto; }
.diff-review-diff .turn-inline-diff { max-height: none; min-height: 100%; }
.diff-review-empty { display: grid; min-height: 100%; place-items: center; padding: 24px; color: var(--muted); font-size: 12px; }

.new-task-dialog { width: min(94vw, 620px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: #fafaf9; box-shadow: 0 30px 90px rgba(0,0,0,.22); }
.new-task-dialog::backdrop { background: rgba(35,35,32,.2); backdrop-filter: blur(2px); }
.new-task-dialog form { padding: 22px; }
.new-task-dialog header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.new-task-dialog header p { margin: 0 0 3px; color: var(--orange); font-size: 12px; font-weight: 650; }
.new-task-dialog h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.new-task-dialog header button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 22px; }
.new-task-dialog header button:hover { background: var(--hover); }
.new-task-dialog label { display: block; margin-bottom: 15px; }
.new-task-dialog label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.new-task-dialog select, .new-task-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; background: white; }
.new-task-dialog select { height: 40px; padding: 0 10px; }
.new-task-dialog textarea { padding: 12px; resize: vertical; line-height: 1.6; }
.new-task-dialog select:focus, .new-task-dialog textarea:focus { border-color: #aaa9a4; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.new-task-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.new-task-dialog footer span { color: var(--muted); font-size: 11px; }
.new-task-dialog footer button { flex: none; padding: 9px 17px; border: 0; border-radius: 9px; background: var(--ink); color: white; cursor: pointer; font-weight: 600; }

.action-dialog { width: min(92vw, 430px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #fbfbfa; box-shadow: 0 26px 80px rgba(0,0,0,.22); }
.action-dialog::backdrop { background: rgba(35,35,32,.22); backdrop-filter: blur(2px); }
.action-dialog form { padding: 18px; }
.action-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.action-dialog h2 { margin: 0; font-size: 18px; }
.action-dialog header button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 21px; }
.action-dialog header button:hover { background: var(--hover); }
.action-dialog p { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.action-dialog label { display: block; margin-top: 15px; }
.action-dialog label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.action-dialog input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: white; font-size: 14px; }
.action-dialog input:focus { border-color: #aaa9a4; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.action-dialog footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.action-dialog footer button { min-width: 78px; padding: 9px 14px; border: 0; border-radius: 9px; background: var(--ink); color: white; cursor: pointer; font-weight: 600; }
.action-dialog footer button.secondary { background: var(--surface-2); color: var(--ink); }
.action-dialog footer button.danger { background: #b94832; }

.toast { position: fixed; z-index: 50; right: 18px; bottom: 18px; max-width: 360px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #22221f; color: white; box-shadow: var(--shadow); font-size: 12px; }
.loading-list { display: grid; width: min(100%, 740px); gap: 12px; margin: 20px auto; }
.loading-list i { height: 62px; border-radius: 12px; background: linear-gradient(90deg,#ececea,#f6f6f4,#ececea); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
.error-state, .small-empty { width: min(100%, 600px); margin: 30px auto; padding: 18px; border: 1px solid #e3c6bd; border-radius: 12px; background: #fff3ef; color: #94472e; text-align: center; }
.error-state p { margin: 6px 0 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .25; } }
@keyframes shimmer { to { background-position: -220% 0; } }

body.force-mobile { display: flex; justify-content: center; background: #d9d9d6; }
body.force-mobile .codex-app { display: block; width: min(100%, 390px); box-shadow: 0 0 60px rgba(0,0,0,.18); }
body.force-mobile .sidebar { width: 100%; height: 100%; border: 0; }
body.force-mobile .workspace { display: none; width: 100%; height: 100%; }
body.force-mobile .codex-app.show-workspace .sidebar { display: none; }
body.force-mobile .codex-app.show-workspace .workspace { display: flex; }
body.force-mobile .sidebar-header { height: 60px; }
body.force-mobile .project-tree { padding-bottom: 72px; }
body.force-mobile .sidebar-footer { height: 52px; }
body.force-mobile .task-header { height: 58px; padding: 0 10px 0 7px; }
body.force-mobile .automations-page { padding: 25px 16px 38px; }
body.force-mobile .automations-page-header h2 { font-size: 24px; }
body.force-mobile .automations-page-header p { margin-bottom: 19px; font-size: 13px; }
body.force-mobile .mobile-back { display: block; flex: none; }
body.force-mobile .task-folder { display: none; }
body.force-mobile .task-heading { flex: 1; }
body.force-mobile .task-heading h1 { font-size: 14px; }
body.force-mobile .task-heading p { font-size: 10px; }
body.force-mobile .task-menu { top: 50px; right: 10px; left: auto; width: 220px; }
body.force-mobile .workspace-connection { margin: 7px 10px 0; }
body.force-mobile .conversation { padding: 24px 16px 158px; }
body.force-mobile .conversation { scrollbar-width: none; }
body.force-mobile .conversation::-webkit-scrollbar { display: none; }
body.force-mobile .codex-app.has-attachments .conversation { padding-bottom: 230px; }
body.force-mobile .workspace:has(.run-state:not([hidden])) .conversation { padding-bottom: 208px; }
body.force-mobile .codex-app.has-attachments .workspace:has(.run-state:not([hidden])) .conversation { padding-bottom: 280px; }
body.force-mobile .message { margin-bottom: 23px; }
body.force-mobile .message.user .message-body { max-width: 88%; }
body.force-mobile .turn-process { margin-top: -3px; margin-bottom: 22px; }
body.force-mobile .turn-process-shell { margin-top: -3px; margin-bottom: 22px; }
body.force-mobile .turn-process-shell > .turn-process { margin: 0; }
body.force-mobile .turn-process > summary { min-height: 44px; }
body.force-mobile .turn-process-content { padding-top: 8px; }
body.force-mobile .turn-process-expanded { margin-top: 0; margin-bottom: 22px; }
body.force-mobile .agent-activity-group { gap: 7px; margin-bottom: 18px; }
body.force-mobile .agent-activity-chip { max-width: 165px; min-height: 30px; padding: 5px 9px; }
body.force-mobile .reasoning-activity-list { max-height: 280px; }
body.force-mobile .reasoning-activity-row { min-height: 30px; }
body.force-mobile .resource-card { min-height: 68px; grid-template-columns: 44px minmax(0,1fr) auto; padding: 9px 11px; }
body.force-mobile .resource-card-icon { width: 44px; height: 44px; }
body.force-mobile .resource-card-action { padding: 6px 8px; font-size: 11px; }
body.force-mobile .turn-file-card { margin-top: -5px; margin-bottom: 23px; }
body.force-mobile .turn-file-card-header { min-height: 68px; padding: 9px 11px; }
body.force-mobile .turn-file-card-open { grid-template-columns: 44px minmax(0,1fr); gap: 10px; }
body.force-mobile .turn-file-card-icon { width: 44px; height: 44px; }
body.force-mobile .turn-file-card-actions button { min-height: 35px; padding: 6px 11px; }
body.force-mobile .turn-file-large { display: none; }
body.force-mobile .activity-item { grid-template-columns: 70px minmax(0,1fr) auto; gap: 6px; }
body.force-mobile .activity-list, body.force-mobile .agent-status-list { margin-left: 18px; }
body.force-mobile .composer { right: 10px; bottom: max(9px, env(safe-area-inset-bottom)); left: 10px; width: auto; min-height: 92px; padding: 12px 13px 9px; border-radius: 17px; }
body.force-mobile .composer textarea { max-height: min(34dvh, 210px); }
body.force-mobile .composer-toolbar { gap: 8px; }
body.force-mobile .composer-left { flex: 1; gap: 7px; overflow: hidden; }
body.force-mobile .composer-right { flex: none; gap: 6px; }
body.force-mobile .access-badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.force-mobile .model-label { max-width: 96px; overflow: hidden; padding-inline: 5px; text-overflow: ellipsis; }
body.force-mobile .access-menu { right: 12px; left: 12px; width: auto; max-height: min(48dvh, 360px); }
body.force-mobile .add-menu { right: 12px; left: 12px; width: auto; max-height: min(56dvh, 430px); }
body.force-mobile .goal-panel { right: 10px; bottom: calc(max(9px, env(safe-area-inset-bottom)) + 118px); left: 10px; width: auto; max-height: min(34dvh, 280px); border-radius: 13px; }
body.force-mobile .goal-panel.plan-only { max-height: none; }
body.force-mobile .goal-panel.plan-only .goal-details { max-height: min(30dvh, 255px); border-radius: 13px; }
body.force-mobile .codex-app.has-attachments .goal-panel { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 190px); }
body.force-mobile .goal-main-row { padding-left: 6px; }
body.force-mobile .goal-copy { display: grid; gap: 1px; }
body.force-mobile .goal-copy strong { font-size: 11px; }
body.force-mobile .goal-actions button { width: 25px; height: 25px; }
body.force-mobile .codex-app.has-goal .conversation { padding-bottom: 225px; }
body.force-mobile .codex-app.has-expanded-plan .conversation { padding-bottom: min(47dvh, 385px); }
body.force-mobile .composer-status { display: none; }
body.force-mobile .access-badge, body.force-mobile .model-label { font-size: 11px; }
body.force-mobile .model-dialog { inset: auto 0 0; width: min(100%, 390px); max-height: min(68dvh, 620px); margin: 0 auto; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
body.force-mobile .model-dialog::backdrop { background: rgba(25,25,23,.18); backdrop-filter: blur(1px); }
body.force-mobile .model-dialog form { overflow-y: auto; }
body.force-mobile .model-dialog header { flex: none; padding: 13px 14px 9px; }
body.force-mobile .model-dialog section { min-height: auto; flex: 0 0 auto; padding: 9px 9px 2px; }
body.force-mobile .model-dialog h3 { margin-bottom: 5px; }
body.force-mobile .settings-options { max-height: none; overflow: visible; }
body.force-mobile .settings-option { min-height: 42px; padding: 7px 11px; }
body.force-mobile .model-dialog footer { flex: none; background: #fbfbfa; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
body.force-mobile .diff-review-dialog { width: min(100%, 390px); height: 100dvh; max-width: none; max-height: none; margin: 0 auto; border: 0; border-radius: 0; }
body.force-mobile .diff-review-header { min-height: 58px; padding: 8px 10px 8px 14px; }
body.force-mobile .diff-review-layout { display: flex; flex-direction: column; }
body.force-mobile .diff-review-files { display: flex; min-height: 49px; flex: none; gap: 5px; overflow-x: auto; overflow-y: hidden; padding: 7px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
body.force-mobile .diff-review-files button { width: auto; max-width: 210px; min-height: 34px; flex: 0 0 auto; padding: 6px 9px; background: #efefec; }
body.force-mobile .diff-review-content { flex: 1; }
body.force-mobile .diff-review-content > header { min-height: 42px; padding: 7px 10px; }
body.force-mobile .action-dialog { inset: auto 0 0; width: min(100%, 390px); max-width: none; margin: 0 auto; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
body.force-mobile .action-dialog form { padding: 18px 16px max(16px, env(safe-area-inset-bottom)); }
body.force-mobile .action-dialog footer { display: grid; grid-template-columns: 1fr 1fr; }
body.force-mobile .run-state { right: 12px; bottom: calc(max(9px, env(safe-area-inset-bottom)) + 128px); left: 12px; pointer-events: none; }
body.force-mobile .codex-app.has-attachments .run-state { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 200px); }
@media (max-width: 350px) {
  body.force-mobile .access-badge-label { display: none; }
  body.force-mobile .access-badge { width: 28px; justify-content: center; padding-inline: 0; }
  body.force-mobile .model-label { max-width: 78px; }
}
body.force-mobile .new-task-dialog { width: 390px; max-width: 100%; height: 100%; max-height: none; margin: 0 auto; border: 0; border-radius: 0; }
body.force-mobile .new-task-dialog form { display: flex; min-height: 100%; flex-direction: column; padding: 18px 16px 16px; }
body.force-mobile .new-task-dialog label:nth-of-type(2) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
body.force-mobile .new-task-dialog textarea { flex: 1; resize: none; }
body.force-mobile .new-task-dialog footer { align-items: stretch; flex-direction: column; }
body.force-mobile .new-task-dialog footer button { width: 100%; }

@media (max-width: 920px) {
  .codex-app { grid-template-columns: 270px minmax(0,1fr); }
  .conversation { padding-inline: 26px; }
  .run-state { left: 270px; }
}

@media (max-width: 720px) {
  html, body { overflow: hidden; background: var(--sidebar); }
  .codex-app { display: block; }
  .sidebar { width: 100%; height: 100%; border: 0; }
  .workspace { display: none; width: 100%; height: 100%; }
  .codex-app.show-workspace .sidebar { display: none; }
  .codex-app.show-workspace .workspace { display: flex; }
  .sidebar-header { height: calc(60px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .project-tree { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar-footer { height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .task-header { height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 7px; }
  .mobile-back { display: block; flex: none; }
  .task-folder { display: none; }
  .task-heading { flex: 1; }
  .task-heading h1 { font-size: 14px; }
  .task-heading p { font-size: 10px; }
  .task-menu { top: calc(50px + env(safe-area-inset-top)); right: 10px; left: auto; width: 220px; }
  .workspace-connection { margin: 7px 10px 0; }
  .conversation { padding: 24px 16px calc(158px + env(safe-area-inset-bottom)); }
  .codex-app.has-attachments .conversation { padding-bottom: calc(230px + env(safe-area-inset-bottom)); }
  .message { margin-bottom: 23px; }
  .message.user .message-body { max-width: 88%; }
  .turn-process { margin-top: -3px; margin-bottom: 22px; }
  .turn-process-shell { margin-top: -3px; margin-bottom: 22px; }
  .turn-process-shell > .turn-process { margin: 0; }
  .turn-process > summary { min-height: 44px; }
  .turn-process-content { padding-top: 8px; }
  .turn-process-expanded { margin-top: 0; margin-bottom: 22px; }
  .agent-activity-group { gap: 7px; margin-bottom: 18px; }
  .agent-activity-chip { max-width: 165px; min-height: 30px; padding: 5px 9px; }
  .resource-card { min-height: 68px; grid-template-columns: 44px minmax(0,1fr) auto; padding: 9px 11px; }
  .resource-card-icon { width: 44px; height: 44px; }
  .resource-card-action { padding: 6px 8px; font-size: 11px; }
  .turn-file-card { margin-top: -5px; margin-bottom: 23px; }
  .turn-file-card-header { min-height: 68px; padding: 9px 11px; }
  .turn-file-card-open { grid-template-columns: 44px minmax(0,1fr); gap: 10px; }
  .turn-file-card-icon { width: 44px; height: 44px; }
  .turn-file-card-actions button { min-height: 35px; padding: 6px 11px; }
  .turn-file-large { display: none; }
  .activity-item { grid-template-columns: 70px minmax(0,1fr) auto; gap: 6px; }
  .activity-list, .agent-status-list { margin-left: 18px; }
  .composer { right: 10px; bottom: max(9px, env(safe-area-inset-bottom)); left: 10px; width: auto; min-height: 92px; border-radius: 17px; }
  .goal-panel { right: 10px; bottom: calc(110px + env(safe-area-inset-bottom)); left: 10px; width: auto; max-height: min(34dvh, 280px); border-radius: 13px; }
  .goal-main-row { padding-left: 6px; }
  .goal-copy { display: grid; gap: 1px; }
  .goal-copy strong { font-size: 11px; }
  .goal-actions button { width: 25px; height: 25px; }
  .codex-app.has-goal .conversation { padding-bottom: calc(225px + env(safe-area-inset-bottom)); }
  .composer-status { display: none; }
  .access-badge { font-size: 11px; }
  .model-label { font-size: 11px; }
  .model-dialog { inset: auto 0 0; width: 100%; max-height: min(68dvh, 620px); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .model-dialog::backdrop { background: rgba(25,25,23,.18); backdrop-filter: blur(1px); }
  .model-dialog form { overflow-y: auto; }
  .model-dialog header { flex: none; padding: 13px 14px 9px; }
  .model-dialog section { min-height: auto; flex: 0 0 auto; padding: 9px 9px 2px; }
  .model-dialog h3 { margin-bottom: 5px; }
  .settings-options { max-height: none; overflow: visible; }
  .settings-option { min-height: 42px; padding: 7px 11px; }
  .model-dialog footer { flex: none; background: #fbfbfa; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .diff-review-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .diff-review-header { min-height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 14px; }
  .diff-review-layout { display: flex; flex-direction: column; }
  .diff-review-files { display: flex; min-height: 49px; flex: none; gap: 5px; overflow-x: auto; overflow-y: hidden; padding: 7px 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .diff-review-files button { width: auto; max-width: 210px; min-height: 34px; flex: 0 0 auto; padding: 6px 9px; background: #efefec; }
  .diff-review-content { flex: 1; }
  .diff-review-content > header { min-height: 42px; padding: 7px 10px; }
  .action-dialog { inset: auto 0 0; width: 100%; max-width: none; margin: 0; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .action-dialog form { padding: 18px 16px max(16px, env(safe-area-inset-bottom)); }
  .action-dialog footer { display: grid; grid-template-columns: 1fr 1fr; }
  .run-state { right: 12px; bottom: calc(120px + env(safe-area-inset-bottom)); left: 12px; }
  .new-task-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .new-task-dialog form { display: flex; min-height: 100%; flex-direction: column; padding: calc(18px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
  .new-task-dialog label:nth-of-type(2) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
  .new-task-dialog textarea { flex: 1; resize: none; }
  .new-task-dialog footer { align-items: stretch; flex-direction: column; }
  .new-task-dialog footer button { width: 100%; }
}
