:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #171717;
  color: #f5f5f4;
  --canvas: #171717;
  --surface: #242424;
  --surface-raised: #2a2a2a;
  --surface-deep: #1d1d1d;
  --line: #454545;
  --line-soft: #353535;
  --text: #f5f5f4;
  --muted: #a1a1aa;
  --quiet: #71717a;
  --accent: #ff7a45;
  --danger: #fb7f7f;
  --composer-height: 168px;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--canvas); }
body.navigation-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(255, 122, 69, .82); outline-offset: 2px; }

.shell { width: min(100%, 940px); min-height: 100vh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom)); }
.shell-content { display: contents; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 30px; color: var(--muted); }
.topbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 10px; }
.brand-area { display: flex; min-width: 0; align-items: center; gap: 9px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 15px; font-weight: 720; letter-spacing: -.02em; }
.brand-context { display: grid; min-width: 0; gap: 1px; }
.brand-context small, .brand-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-context small { color: var(--quiet); font-size: 10px; font-weight: 650; letter-spacing: .04em; }
.brand-context strong { color: var(--text); font-size: 14px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: #202020; font-size: 16px; }
.navigation-trigger, .navigation-close, .navigation-new-session, .navigation-project-settings, .navigation-session-more { display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); background: #202020; }
.navigation-trigger { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; padding: 0; font-size: 19px; }
.navigation-trigger:hover, .navigation-trigger:focus-visible, .navigation-close:hover, .navigation-close:focus-visible, .navigation-new-session:hover, .navigation-new-session:focus-visible, .navigation-project-settings:hover, .navigation-project-settings:focus-visible, .navigation-session-more:hover, .navigation-session-more:focus-visible { border-color: #777; background: #303030; outline: none; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--quiet); font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #6b7280; }
.connection.online { color: #bdbdbd; }
.connection.online .dot { background: #5dd39e; box-shadow: 0 0 0 4px rgba(93, 211, 158, .1); }
.connection.warning .dot { background: #f5bc61; }
.browser-pane-trigger { position: relative; display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border: 1px solid transparent; border-radius: 12px; padding: 0; color: #a7a7a3; background: transparent; }
.browser-pane-trigger svg { width: 21px; height: 21px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.browser-pane-trigger svg circle { fill: currentColor; stroke: none; }
.browser-pane-trigger:hover, .browser-pane-trigger:focus-visible { border-color: #4b4b4b; color: var(--text); background: #272727; outline: none; }
.browser-pane-trigger.is-open { border-color: #5c473c; color: #ffe0d2; background: #30231e; }
.browser-trigger-status { position: absolute; right: 7px; bottom: 7px; width: 7px; height: 7px; border: 2px solid var(--canvas); border-radius: 50%; background: #6f6f6c; box-sizing: content-box; }
.browser-pane-trigger.is-ready .browser-trigger-status { background: #5dd39e; }
.browser-pane-trigger.is-user-control .browser-trigger-status { background: #f5bc61; }
.browser-pane-trigger.is-error .browser-trigger-status { background: #fb7f7f; }
.browser-pane-trigger.is-busy .browser-trigger-status { background: var(--accent); }

.navigation-backdrop { position: fixed; z-index: 30; inset: 0; pointer-events: none; opacity: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); transition: opacity .18s ease; }
.navigation-backdrop.is-open { pointer-events: auto; opacity: 1; }
.navigation-drawer { position: fixed; z-index: 31; inset: 0 auto 0 0; display: grid; width: min(360px, 90vw); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-right: 1px solid #484848; background: #1c1c1c; box-shadow: 18px 0 54px rgba(0, 0, 0, .44); transform: translateX(-104%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.navigation-drawer.is-open { transform: translateX(0); visibility: visible; transition: transform .2s ease; }
.navigation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 15px 12px; border-bottom: 1px solid var(--line-soft); }
.navigation-head strong { font-size: 16px; }
.navigation-close { width: 38px; height: 38px; border-radius: 10px; padding: 0; font-size: 24px; line-height: 1; }
.navigation-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 13px 12px 20px; }
.navigation-search { padding: 10px 11px; }
.navigation-create-project { width: 100%; margin-top: 9px; }
.navigation-list { display: grid; gap: 5px; margin-top: 13px; }
.navigation-project { min-width: 0; }
.navigation-project-row { display: flex; align-items: center; gap: 5px; }
.navigation-project-toggle { display: grid; min-width: 0; flex: 1; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 8px; color: var(--text); background: transparent; text-align: left; }
.navigation-project-toggle:hover, .navigation-project-toggle:focus-visible { background: #292929; outline: none; }
.navigation-project-toggle strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.navigation-project-toggle small { color: var(--quiet); font-size: 11px; }
.navigation-new-session, .navigation-project-settings { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; padding: 0; }
.navigation-project-settings { color: #aaa; font-size: 11px; letter-spacing: 1px; }
.navigation-new-session:disabled, .navigation-session:disabled { cursor: not-allowed; opacity: .45; }
.navigation-session-item { margin: 2px 0 2px 23px; }
.navigation-session-item.is-archived { opacity: .7; }
.navigation-session-row { display: flex; min-width: 0; align-items: center; gap: 4px; }
.navigation-session { display: grid; min-width: 0; flex: 1; gap: 3px; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; color: #d6d6d4; background: transparent; text-align: left; }
.navigation-session-more { flex: 0 0 auto; width: 31px; height: 31px; border-color: transparent; border-radius: 8px; padding: 0; color: #999; font-size: 9px; letter-spacing: 1px; }
.navigation-session:hover:not(:disabled), .navigation-session:focus-visible { border-color: #454545; background: #252525; outline: none; }
.navigation-session.is-current { border-color: rgba(255, 122, 69, .4); color: #ffe0d3; background: rgba(255, 122, 69, .1); }
.navigation-session span { overflow: hidden; font-size: 13px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.navigation-session-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px 0 6px; }
.navigation-session-actions[hidden] { display: none; }
.navigation-session-actions button { min-width: 0; border: 0; border-radius: 7px; padding: 7px 3px; color: #bbb; background: #242424; font-size: 10px; }
.navigation-session-actions button:hover:not(:disabled), .navigation-session-actions button:focus-visible { color: #fff; background: #343434; outline: none; }
.navigation-session-actions button.danger-text { color: #ffaaa5; }
.navigation-session-actions button:disabled { cursor: not-allowed; opacity: .42; }
.navigation-session small, .navigation-loading, .navigation-empty { color: var(--quiet); font-size: 10px; }
.navigation-loading, .navigation-empty { margin: 4px 0 8px 33px; padding: 6px 0; }
.navigation-no-results { padding: 30px 12px; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center; }
.navigation-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px 12px; padding: 11px 15px max(13px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: 11px; line-height: 1.5; }
.navigation-footer > small { grid-column: 1 / -1; color: #777; font-size: 10px; }
.navigation-archive-toggle { display: inline-flex; align-items: center; gap: 6px; color: #aaa; }
.navigation-archive-toggle input { accent-color: var(--accent); }
.navigation-footer-actions { display: flex; align-items: center; gap: 4px; }
.navigation-footer-actions button { border: 0; border-radius: 8px; padding: 7px 8px; color: #bbb; background: transparent; font-size: 11px; }
.navigation-footer-actions button:hover, .navigation-footer-actions button:focus-visible { color: #fff; background: #2e2e2e; outline: none; }

.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; color: var(--text); font-size: clamp(28px, 8vw, 42px); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin: 0; color: var(--text); font-size: 21px; line-height: 1.2; letter-spacing: -.03em; }
.lede { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 32px 0 13px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.panel, .project-card, .session-row, .message-card, .tool-card { border: 1px solid var(--line-soft); background: var(--surface); }
.panel { padding: 20px; border-radius: 20px; }
.workspace-home { display: grid; min-height: min(66svh, 560px); place-content: center; justify-items: center; gap: 12px; color: var(--muted); text-align: center; }
.workspace-home-mark { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #484848; border-radius: 15px; color: var(--accent); background: #202020; font-size: 23px; }
.workspace-home h1 { font-size: clamp(26px, 6vw, 36px); }
.workspace-home p { max-width: 390px; margin: 0; line-height: 1.55; }
.project-list, .session-list, .conversation { display: grid; gap: 10px; }
.github-connection { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 16px; padding: 16px 18px; }
.github-connection strong { display: block; font-size: 15px; }
.github-connection .eyebrow { margin-bottom: 5px; }
.github-connection .small-note { max-width: 560px; }
.project-card { width: 100%; padding: 18px; border-radius: 15px; color: inherit; text-align: left; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.project-card:hover, .project-card:focus-visible { border-color: #5a5a5a; background: #2b2b2b; transform: translateY(-1px); outline: none; }
.project-summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.45; }
.session-row { overflow: hidden; border-radius: 15px; transition: border-color .16s ease, background .16s ease; }
.session-row.is-archived { opacity: .72; }
.session-open { width: 100%; border: 0; padding: 17px 18px; color: inherit; background: transparent; text-align: left; }
.session-open:hover, .session-open:focus-visible { background: #2b2b2b; outline: none; }
.session-row:focus-within { border-color: #5b5b5b; }
.row-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-title { font-size: 16px; font-weight: 700; letter-spacing: -.018em; }
.row-meta { margin-top: 7px; color: var(--muted); font-size: 13px; }
.chevron { color: var(--accent); font-size: 22px; line-height: 1; }
.session-statuses { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.archive-tag { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid rgba(245, 188, 97, .34); border-radius: 999px; color: #f7ca80; font-size: 11px; font-weight: 700; }
.session-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px 13px; border-top: 1px solid var(--line-soft); }
.session-action { border: 1px solid #4a4a4a; border-radius: 9px; padding: 7px 9px; color: #dedede; background: #202020; font-size: 12px; font-weight: 680; }
.session-action:hover, .session-action:focus-visible { border-color: #797979; background: #292929; outline: none; }
.session-action:disabled { cursor: not-allowed; opacity: .45; }
.danger-text { color: #ffaaa5; }
.session-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; }
.session-search { min-width: 0; padding: 10px 12px; }
.archive-filter { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.archive-filter input { accent-color: var(--accent); }

.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #4b4b4b; border-radius: 999px; color: #c6c6c6; font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.status.running { border-color: rgba(93, 211, 158, .46); color: #8ee2b9; }
.status.error, .status.failed, .status.cancelled { border-color: rgba(251, 127, 127, .48); color: #ffaaa5; }
.status.succeeded, .status.idle { color: #d0d0d0; }

.action { border: 0; border-radius: 11px; padding: 11px 14px; color: #171717; background: #f0f0ed; font-weight: 760; transition: opacity .16s ease, transform .16s ease, background .16s ease; }
.action:hover { background: #fff; transform: translateY(-1px); }
.action:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.action.secondary { border: 1px solid #4d4d4d; color: #e1e1e1; background: transparent; }
.action.secondary:hover { background: #2d2d2d; }
.action.danger { color: #ffe9e6; background: #8a3b3b; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 9px; }
@media (max-width: 560px) { .github-connection { align-items: flex-start; flex-direction: column; } }

.auth { max-width: 500px; margin: clamp(35px, 12vh, 110px) auto 0; }
.auth h1 { overflow-wrap: anywhere; font-size: clamp(32px, 8vw, 44px); }
.field-label { display: block; margin: 22px 0 8px; color: #e7e7e7; font-size: 13px; font-weight: 680; }
.input, .composer textarea { width: 100%; border: 1px solid #484848; border-radius: 12px; outline: none; color: var(--text); background: var(--surface-deep); padding: 12px 13px; }
.input:focus, .composer textarea:focus { border-color: rgba(255, 122, 69, .82); box-shadow: 0 0 0 3px rgba(255, 122, 69, .12); }
.small-note { margin: 10px 0 0; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.form-error, .notice { margin-top: 13px; color: #ffaaa5; font-size: 13px; line-height: 1.45; }
.notice { color: #c8c8c8; }
.mode-notice { margin: 13px 0 0; padding: 10px 12px; border: 1px solid rgba(245, 188, 97, .3); border-radius: 12px; color: #f4cd91; background: rgba(124, 85, 28, .16); font-size: 13px; line-height: 1.5; }

.back { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; color: var(--muted); background: transparent; font-weight: 650; }
.back:hover { color: var(--text); }
.empty { padding: 26px 18px; border: 1px dashed #4a4a4a; border-radius: 14px; color: var(--muted); text-align: center; font-size: 14px; line-height: 1.55; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: end center; padding: 18px; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); }
.session-dialog, .project-dialog, .settings-dialog { width: min(100%, 520px); padding: 22px; border-color: #555; box-shadow: 0 24px 60px rgba(0, 0, 0, .46); }
.session-dialog .lede { margin-top: 12px; }
.project-dialog .input { display: block; }
.settings-dialog { display: grid; gap: 12px; }
.settings-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-dialog-head .eyebrow { margin-bottom: 5px; }
.settings-section { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid #444; border-radius: 14px; background: #202020; }
.settings-section > div:first-child { display: grid; min-width: 0; gap: 4px; }
.settings-section strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.settings-section .small-note { margin: 0; }
.settings-label { color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.project-description { min-height: 92px; resize: vertical; }
.project-binding { margin: 12px 0 0; color: #c5c5c5; font-size: 13px; }
.project-description-copy { margin-top: 12px; }

.conversation-head { position: sticky; top: 0; z-index: 2; margin: 0 -4px; padding: 6px 4px 14px; background: linear-gradient(var(--canvas) 78%, transparent); }
.conversation-head .row-main { align-items: flex-start; }
.shell.shell-workbench { width: min(100%, 1640px); height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.shell-workbench .topbar { margin-bottom: 16px; }
.workbench { display: grid; grid-template-columns: minmax(0, 760px); justify-content: center; gap: 16px; min-width: 0; min-height: 0; }
.workbench.has-browser { grid-template-columns: minmax(360px, .92fr) minmax(560px, 1.42fr); justify-content: stretch; }
.workbench-agent, .workbench-browser { min-width: 0; min-height: 0; }
.workbench-agent { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--canvas); }
.workbench-agent .conversation-head { position: relative; grid-row: 1; margin: 0; padding: 16px 16px 13px; border-bottom: 1px solid var(--line-soft); background: var(--canvas); }
.workbench-agent .conversation-alerts { display: grid; gap: 9px; }
.workbench-agent .conversation-alerts .mode-notice, .workbench-agent .conversation-alerts .notice { margin-top: 0; }
.conversation-scroller { min-height: 0; grid-row: 2; overflow: auto; overscroll-behavior: contain; padding: 14px 16px 0; }
.workbench-agent .conversation { padding-bottom: 18px; }
.workbench-agent .composer-wrap { position: relative; right: auto; bottom: auto; left: auto; z-index: 1; grid-row: 3; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--canvas) 22%); }
.workbench-agent .composer { width: 100%; }
.workbench-agent .media-card { scroll-margin-block-end: 18px; }
.workbench-browser { display: grid; min-height: 0; }
.browser-pane { position: relative; display: grid; min-width: 0; min-height: 0; height: 100%; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid #555; border-radius: 18px; background: #161616; box-shadow: 0 18px 52px rgba(0, 0, 0, .38); }
.browser-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border-bottom: 1px solid #414141; background: #242424; }
.browser-pane-head strong { display: block; color: #f4f4f1; font-size: 14px; }
.browser-pane-kicker { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.browser-pane-head [data-browser-status], .browser-pane-status { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.browser-pane-heading { min-width: 0; }
.browser-resolution { display: block; margin-top: 3px; color: #777; font-size: 10px; }
.browser-pane-actions, .browser-viewport-tools, .browser-pane-empty-actions { display: flex; align-items: center; gap: 7px; }
.browser-mobile-back, .browser-mobile-more, .browser-mobile-head-spacer, .browser-mobile-dock, .browser-mobile-menu { display: none; }
.browser-viewport-tools { padding: 4px; border: 1px solid #444; border-radius: 9px; color: #bdbdb9; background: #1d1d1d; font-size: 11px; font-variant-numeric: tabular-nums; }
.browser-tool { min-width: 25px; min-height: 25px; border: 1px solid #505050; border-radius: 6px; padding: 1px 6px; color: #e5e5e2; background: #2b2b2b; font-size: 15px; line-height: 1; }
.browser-tool:hover, .browser-tool:focus-visible, .browser-tool[aria-pressed="true"] { border-color: #797979; background: #3b3b3b; outline: none; }
.browser-tool-text { min-width: auto; font-size: 11px; font-weight: 680; }
.browser-close { flex: 0 0 auto; border: 1px solid #505050; border-radius: 8px; padding: 7px 9px; color: #dededb; background: #2a2a2a; font-size: 12px; font-weight: 680; }
.browser-close:hover, .browser-close:focus-visible { border-color: #777; background: #383838; outline: none; }
.browser-control { flex: 0 0 auto; border: 1px solid #79613d; border-radius: 8px; padding: 7px 9px; color: #ffdc9b; background: #352c20; font-size: 12px; font-weight: 700; }
.browser-control:hover:not(:disabled), .browser-control:focus-visible { border-color: #bd8845; background: #4a3824; outline: none; }
.browser-control.is-user-control { border-color: #4f806c; color: #bcebd7; background: #20342c; }
.browser-control.is-user-control:hover:not(:disabled), .browser-control.is-user-control:focus-visible { border-color: #68aa8e; background: #29483b; }
.browser-control:disabled { cursor: wait; opacity: .56; }
.browser-stop { flex: 0 0 auto; border: 1px solid #8d5a4f; border-radius: 8px; padding: 7px 9px; color: #ffc6b6; background: #342522; font-size: 12px; font-weight: 680; }
.browser-stop:hover:not(:disabled), .browser-stop:focus-visible { border-color: #d27a63; background: #4b2c26; outline: none; }
.browser-stop:disabled { cursor: wait; opacity: .56; }
.browser-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #0d0d0d; }
.browser-viewport { position: absolute; top: 50%; left: 50%; width: 1440px; height: 900px; overflow: visible; background: #0d0d0d; transform: translate(-50%, -50%); }
.browser-viewport > canvas { display: block; width: 100%; height: 100%; max-width: none; max-height: none; touch-action: none; user-select: none; -webkit-user-select: none; transform: translate(var(--browser-pan-x, 0px), var(--browser-pan-y, 0px)) scale(var(--browser-scale, 1)); transform-origin: center; }
.browser-pane.is-panning .browser-viewport > canvas { pointer-events: none; cursor: grab; }
.browser-pane.is-panning .browser-stage { cursor: grabbing; touch-action: none; }
.browser-pane-standby { grid-template-rows: auto minmax(0, 1fr); }
.browser-pane-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 0; padding: 24px; background: radial-gradient(circle at 78% 14%, rgba(255, 122, 69, .13), transparent 30%), #161616; }
.browser-pane-empty strong { color: #efefec; font-size: 16px; }
.browser-pane-empty p { max-width: 480px; margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.browser-pane-empty .action { flex: 0 0 auto; }
.browser-pane-empty-actions { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.conversation { padding-bottom: calc(var(--composer-height) + 18px); }
.conversation-turn { display: grid; gap: 10px; }
.conversation-turn-summary { border: 1px solid #4c4b49; border-radius: 16px; background: #2c2a28; }
.conversation-turn-summary-button { display: grid; width: 100%; gap: 6px; border: 0; padding: 14px 15px; color: inherit; background: transparent; text-align: left; }
.conversation-turn-summary-button:hover .conversation-turn-summary-action, .conversation-turn-summary-button:focus-visible .conversation-turn-summary-action { color: #ffd2c1; text-decoration: underline; text-underline-offset: 3px; }
.conversation-turn-summary-button:focus-visible { outline: 2px solid #ff9d78; outline-offset: -3px; }
.conversation-turn-summary-meta { color: #d3d0cb; font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.conversation-turn-summary-prompt { display: -webkit-box; overflow: hidden; color: #f1f1ef; font-size: 14px; line-height: 1.58; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.conversation-turn-summary-action, .conversation-turn-toggle { color: #ff9d78; font-size: 13px; font-weight: 700; }
.conversation-turn-actions { display: flex; justify-content: flex-end; margin-top: -4px; }
.conversation-turn-toggle { border: 0; padding: 0; background: transparent; }
.conversation-turn-toggle:hover, .conversation-turn-toggle:focus-visible { color: #ffd2c1; text-decoration: underline; text-underline-offset: 3px; outline: none; }
.message-card { position: relative; padding: 14px 15px; border-radius: 16px; }
.message-card.user { border-color: #4c4b49; background: #2c2a28; }
.message-card.assistant { background: #232323; }
.message-copy { position: absolute; top: 10px; right: 11px; z-index: 1; border: 1px solid #545454; border-radius: 8px; padding: 5px 8px; color: #e8e8e5; background: rgba(31, 31, 31, .94); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .14s ease, transform .14s ease, border-color .14s ease, background .14s ease; }
.message-card.user .message-copy { background: rgba(44, 42, 40, .96); }
.message-card:hover .message-copy, .message-card:focus-within .message-copy { opacity: 1; pointer-events: auto; transform: translateY(0); }
.message-copy:hover, .message-copy:focus-visible { border-color: #8b8b87; background: #373737; outline: none; }
.message-label { margin-bottom: 7px; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.message-card.user .message-label { color: #d3d0cb; }
.message-text { color: #f1f1ef; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.58; }
.turn-usage { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .11); color: #bdb9b3; font-size: 12px; line-height: 1.45; }
.turn-usage span { color: #d7a58f; }
.turn-usage.is-unavailable { color: #d7a58f; }
.message-body { color: #eeeeec; overflow-wrap: anywhere; font-size: 14px; line-height: 1.62; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote, .markdown-body pre, .markdown-body table, .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 0 0 13px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { color: #fafaf9; line-height: 1.25; letter-spacing: -.02em; }
.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 19px; }
.markdown-body h3 { font-size: 17px; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 15px; }
.markdown-body ul, .markdown-body ol { padding-left: 22px; }
.markdown-body li + li { margin-top: 5px; }
.markdown-body blockquote { padding: 2px 0 2px 12px; border-left: 3px solid rgba(255, 122, 69, .65); color: #c5c5c3; }
.markdown-body a { color: #ff9d78; text-decoration: underline; text-underline-offset: 2px; }
.markdown-body code { padding: 2px 5px; border-radius: 5px; color: #fff0e9; background: #191919; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .91em; }
.markdown-body .markdown-code { max-width: 100%; padding: 12px 13px; border: 1px solid #404040; border-radius: 10px; overflow: auto; background: #181818; }
.markdown-body .markdown-code code { display: block; padding: 0; color: #e5e5e5; white-space: pre; background: transparent; font-size: 12px; line-height: 1.55; }
.markdown-body hr { margin: 18px 0; border: 0; border-top: 1px solid #414141; }
.markdown-table-wrap { max-width: 100%; margin-bottom: 13px; overflow-x: auto; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.markdown-body th, .markdown-body td { min-width: 90px; padding: 7px 9px; border: 1px solid #454545; text-align: left; vertical-align: top; }
.markdown-body th { color: #efefed; background: #2d2d2d; font-weight: 700; }
.markdown-image-placeholder { color: var(--muted); font-style: italic; }
.message-body.is-collapsed { position: relative; max-height: 360px; overflow: hidden; }
.message-body.is-collapsed::after { position: absolute; right: 0; bottom: 0; left: 0; height: 90px; background: linear-gradient(transparent, #232323); content: ""; pointer-events: none; }
.message-toggle { display: block; margin: 11px 0 0; padding: 0; border: 0; color: #ff9d78; background: transparent; font-size: 13px; font-weight: 700; }
.message-toggle:hover, .message-toggle:focus-visible { color: #ffd2c1; text-decoration: underline; text-underline-offset: 3px; outline: none; }
.tool-list { display: grid; gap: 7px; margin: 0 0 4px; }
.tool-card { padding: 10px 12px; border-radius: 11px; }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-card span { color: #ddddda; font-size: 13px; }
.tool-card small { color: var(--muted); font-size: 11px; }
.tool-output-toggle { margin: 8px 0 0; border: 0; padding: 0; color: #ff9d78; background: transparent; font-size: 12px; font-weight: 700; }
.tool-output-toggle:hover, .tool-output-toggle:focus-visible { color: #ffd2c1; text-decoration: underline; text-underline-offset: 3px; outline: none; }
.tool-output { max-height: 360px; margin: 9px 0 0; padding: 10px 11px; overflow: auto; border: 1px solid #404040; border-radius: 9px; color: #e5e5e5; background: #181818; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.tool-output code { font: inherit; }
.tool-output-notice { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.process-stream { display: grid; gap: 9px; margin: 0; }
.process-thought, .process-tool-group, .work-summary { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-deep); }
.process-thought { padding: 12px 13px; }
.process-kicker { margin-bottom: 7px; color: var(--quiet); font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.process-thought-text { color: #d9d9d6; font-size: 13px; line-height: 1.58; }
.process-thought-text p { margin-bottom: 8px; }
.process-tool-group-toggle, .work-summary-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; border: 0; padding: 11px 13px; color: #e6e6e3; background: transparent; text-align: left; }
.process-tool-group-toggle:hover, .process-tool-group-toggle:focus-visible, .work-summary-toggle:hover, .work-summary-toggle:focus-visible { background: #292929; outline: none; }
.process-tool-group-toggle span, .work-summary-toggle span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.process-tool-group-toggle small, .work-summary-toggle small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.process-tool-rows { display: grid; gap: 7px; margin: 0; padding: 0 12px 12px; list-style: none; }
.process-tool-row { padding: 9px 10px; border: 1px solid #3c3c3c; border-radius: 9px; background: #191919; }
.process-tool-row.is-running { border-color: rgba(255, 157, 120, .5); }
.process-tool-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.process-tool-row-head code { min-width: 0; overflow-wrap: anywhere; color: #e8e8e5; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.process-tool-row-head small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.work-summary { margin: 0; border-color: #4a4744; background: #252321; }
.work-summary-toggle span { color: #f2eee9; }
.work-summary-toggle small { color: #e2a68d; }
.work-summary-content { display: grid; gap: 9px; padding: 0 11px 11px; border-top: 1px solid #3d3935; }
.work-summary-content .process-stream { padding-top: 11px; }
.process-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.media-card { width: min(100%, 640px); margin: 9px 0 5px; overflow: hidden; scroll-margin-block-end: calc(var(--composer-height) + 18px); border: 1px solid #454545; border-radius: 14px; background: #1e1e1e; }
.media-task-status { display: flex; align-items: center; gap: 9px; width: min(100%, 640px); margin: 9px 0 5px; padding: 9px 12px; border: 1px solid #3d3d3d; border-radius: 12px; background: #1d1d1d; color: #d8d8d5; }
.media-task-status span:last-child { display: grid; gap: 2px; }
.media-task-status strong { font-size: 12px; }
.media-task-status small { color: var(--muted); font-size: 11px; }
.media-task-indicator { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #8e8e8a; }
.media-task-status.is-working .media-task-indicator { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.media-task-status.is-completed .media-task-indicator { background: #65b87a; }
.media-task-status.is-failed .media-task-indicator, .media-task-status.is-cancelled .media-task-indicator { background: #d36b62; }
.media-card.is-collapsed { display: flex; align-items: center; gap: 9px; min-height: 76px; padding: 8px; }
.media-compact { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; border: 0; padding: 0; color: inherit; background: transparent; text-align: left; }
.media-compact:hover .media-compact-copy strong, .media-compact:focus-visible .media-compact-copy strong { color: #ffd2c1; }
.media-thumbnail { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; border: 1px solid #505050; border-radius: 10px; color: #f5f5f4; background: linear-gradient(145deg, #383838, #202020); font-size: 18px; }
.media-thumbnail-video { color: #ffc0aa; background: linear-gradient(145deg, #603327, #251f1e); }
.media-thumbnail-image { color: #b8dbff; background: linear-gradient(145deg, #2b4356, #1e252b); }
.media-compact-copy { display: grid; min-width: 0; gap: 4px; }
.media-compact-copy strong { overflow: hidden; color: #eeeeec; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.media-compact-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.media-expand, .media-collapse, .media-open, .media-retry { flex: 0 0 auto; border: 0; padding: 4px 0; color: #ff9d78; background: transparent; font-size: 12px; font-weight: 700; }
.media-expand:hover, .media-expand:focus-visible, .media-collapse:hover, .media-collapse:focus-visible, .media-open:hover, .media-open:focus-visible, .media-retry:hover, .media-retry:focus-visible { color: #ffd2c1; text-decoration: underline; text-underline-offset: 3px; outline: none; }
.media-card-head, .media-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; }
.media-card-head { border-bottom: 1px solid #383838; color: var(--accent); font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.media-card-head small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; }
.media-preview { display: grid; min-height: 116px; max-height: min(48svh, 440px); place-items: center; overflow: hidden; padding: 10px; background: #151515; }
.media-image, .media-player { display: block; max-width: 100%; max-height: min(48svh, 440px); border-radius: 9px; }
.media-image { object-fit: contain; }
.media-player { width: auto; height: auto; background: #080808; }
.media-loading { padding: 28px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.media-loading.media-error { display: grid; gap: 9px; justify-items: center; color: #ffaaa5; }
.media-card-footer strong { min-width: 0; overflow: hidden; color: #eeeeec; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.media-open:disabled { color: #777; }
.media-viewer { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0, 0, 0, .78); backdrop-filter: blur(7px); }
.media-viewer-dialog { display: grid; width: min(100%, 980px); max-height: calc(100svh - 36px); overflow: hidden; border: 1px solid #5a5a5a; border-radius: 18px; background: #1b1b1b; box-shadow: 0 28px 72px rgba(0, 0, 0, .56); }
.media-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #3d3d3d; }
.media-viewer-head > div { display: grid; min-width: 0; gap: 3px; }
.media-viewer-head strong { overflow: hidden; color: #f2f2ef; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.media-viewer-kicker { color: var(--accent); font-size: 10px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.media-viewer-close { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid #535353; border-radius: 9px; color: #f2f2ef; background: #292929; font-size: 23px; line-height: 1; }
.media-viewer-close:hover, .media-viewer-close:focus-visible { border-color: #787878; background: #363636; outline: none; }
.media-viewer-stage { display: grid; min-height: 0; place-items: center; overflow: auto; padding: 14px; background: #101010; }
.media-viewer-media { max-width: 100%; max-height: calc(100svh - 132px); border-radius: 10px; }

.composer-wrap { position: fixed; right: 0; bottom: 0; left: 0; z-index: 3; padding: 22px max(18px, env(safe-area-inset-right)) max(15px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); background: linear-gradient(transparent, var(--canvas) 30%); }
.composer { width: min(calc(100% - 36px), 900px); margin: 0 auto; overflow: visible; border: 1px solid #484848; border-radius: 24px; background: var(--surface); box-shadow: 0 16px 50px rgba(0, 0, 0, .34); }
.composer-config-controls { position: relative; display: flex; min-width: 0; max-width: calc(100% - 104px); align-items: center; justify-content: flex-end; gap: 1px; margin-left: auto; }
.composer-config-toggle { display: flex; min-width: 0; align-items: center; gap: 5px; border: 0; border-radius: 10px; padding: 7px 4px; color: #d8d8d6; background: transparent; font-size: 13px; text-align: left; }
.composer-config-toggle:hover:not(:disabled), .composer-config-toggle:focus-visible, .composer-config-toggle[aria-expanded="true"] { color: #fff; background: #303030; outline: none; }
.composer-config-toggle:disabled { cursor: not-allowed; opacity: .5; }
.composer-model-toggle { max-width: min(240px, 65%); padding-left: 8px; }
.composer-effort-toggle { flex: 0 0 auto; }
.composer-config-chevron { flex: 0 0 auto; margin-top: -2px; color: #929292; font-size: 17px; font-weight: 400; line-height: 1; transition: transform .16s ease; }
.composer-config-toggle[aria-expanded="true"] .composer-config-chevron { transform: rotate(180deg); }
.composer-config-popover { position: absolute; z-index: 12; right: 0; bottom: calc(100% + 15px); display: grid; width: min(360px, calc(100vw - 36px)); gap: 11px; padding: 12px; border: 1px solid #505050; border-radius: 19px; background: #292929; box-shadow: 0 20px 56px rgba(0, 0, 0, .54); }
.composer-config-popover[hidden] { display: none; }
.composer-popover-heading { display: flex; min-height: 28px; align-items: center; padding: 0 3px; }
.composer-popover-heading strong { color: #ececea; font-size: 15px; font-weight: 670; }
.composer-model-popover { max-height: min(62svh, 430px); }
.composer-provider-choices { display: flex; gap: 4px; padding: 3px; border: 1px solid #434343; border-radius: 12px; background: #292929; }
.composer-provider-choice { min-width: 0; min-height: 38px; flex: 1 1 0; overflow: hidden; border: 0; border-radius: 9px; padding: 7px 8px; color: #a9a9a5; background: transparent; font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.composer-provider-choice:hover:not(:disabled), .composer-provider-choice:focus-visible { color: #eee; background: #343434; outline: none; }
.composer-provider-choice.is-selected { color: #fff2eb; background: #47332a; }
.composer-model-list { display: grid; max-height: min(42svh, 280px); gap: 3px; overflow: auto; margin: 0 -4px -4px; padding: 4px; border-top: 1px solid #3e3e3e; }
.composer-model-choice { display: flex; min-width: 0; min-height: 44px; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 10px; padding: 10px 11px; color: #e2e2df; background: transparent; font-size: 13px; text-align: left; }
.composer-model-choice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-model-choice i { flex: 0 0 18px; color: var(--accent); font-size: 13px; font-style: normal; text-align: center; }
.composer-model-choice:hover:not(:disabled), .composer-model-choice:focus-visible { background: #383838; outline: none; }
.composer-model-choice.is-selected { color: #fff; background: #343434; }
.composer-effort-popover { width: min(330px, calc(100vw - 36px)); gap: 14px; padding: 15px 16px 14px; }
.composer-reasoning-readout { display: grid; justify-items: center; gap: 3px; padding: 0; }
.composer-reasoning-readout strong { color: #8eb2ee; font-size: 18px; font-weight: 680; }
.composer-reasoning-readout span { max-width: 100%; overflow: hidden; color: #a2a2a0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.composer-reasoning-slider { position: relative; height: 52px; }
.composer-reasoning-track { position: absolute; top: 20px; right: 22px; left: 22px; height: 12px; overflow: hidden; border-radius: 999px; background: #484848; }
.composer-reasoning-track i { display: block; width: var(--reasoning-progress, 0%); height: 100%; border-radius: inherit; background: #7c9fd8; }
.composer-reasoning-points { position: relative; display: flex; align-items: center; justify-content: space-between; }
.composer-reasoning-point { display: grid; width: 52px; height: 52px; place-items: center; border: 0; border-radius: 50%; padding: 0; background: transparent; }
.composer-reasoning-point i { width: 8px; height: 8px; border-radius: 50%; background: #8d8d8d; transition: width .14s ease, height .14s ease, background .14s ease, box-shadow .14s ease; }
.composer-reasoning-point:hover:not(:disabled) i, .composer-reasoning-point:focus-visible i { background: #d0d0cf; box-shadow: 0 0 0 5px rgba(255, 255, 255, .08); }
.composer-reasoning-point:focus-visible { outline: none; }
.composer-reasoning-point.is-selected i { width: 34px; height: 34px; background: #f4f4f1; box-shadow: 0 2px 9px rgba(0, 0, 0, .34); }
.composer-provider-choice:disabled, .composer-model-choice:disabled, .composer-reasoning-point:disabled { cursor: not-allowed; opacity: .48; }
.composer-input { display: grid; gap: 2px; padding: 7px 9px 8px 14px; }
.composer textarea { min-height: 62px; max-height: 164px; border: 0; padding: 9px 2px 4px; background: transparent; box-shadow: none; resize: none; font-size: 16px; line-height: 1.45; }
.composer textarea::placeholder { color: #898989; }
.composer textarea:focus { box-shadow: none; }
.pasted-media-list { display: grid; gap: 6px; padding: 5px 3px 2px 0; }
.pasted-media-chip { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-deep); }
.pasted-media-chip.uploading { border-color: rgba(255, 172, 79, .55); }
.pasted-media-chip.failed { border-color: rgba(242, 102, 102, .7); }
.pasted-media-preview, .pasted-media-icon { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 7px; color: var(--accent); background: #111; object-fit: cover; }
.pasted-media-copy { display: grid; min-width: 0; gap: 2px; }
.pasted-media-copy strong, .pasted-media-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pasted-media-copy strong { font-size: 12px; }
.pasted-media-copy small { color: var(--muted); font-size: 11px; }
.pasted-media-remove { margin-left: auto; flex: 0 0 auto; border: 0; padding: 4px 7px; color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.pasted-media-remove:hover { color: var(--text); }
.turn-input-assets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.turn-input-asset { max-width: 100%; overflow: hidden; padding: 4px 7px; border-radius: 7px; color: var(--muted); background: var(--surface-deep); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.composer-input-actions, .media-card-actions { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.composer-attachment-menu { position: relative; display: inline-flex; flex: 0 0 auto; }
.composer-plus { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #4d4d4d; border-radius: 50%; padding: 0; color: #ededeb; background: #292929; font-size: 25px; font-weight: 350; line-height: 1; }
.composer-plus:hover:not(:disabled), .composer-plus:focus-visible, .composer-plus[aria-expanded="true"] { border-color: #777; background: #363636; outline: none; }
.composer-plus:disabled { cursor: not-allowed; opacity: .45; }
.attachment-menu { position: absolute; z-index: 8; bottom: calc(100% + 9px); left: 0; display: grid; width: min(285px, calc(100vw - 54px)); gap: 3px; padding: 6px; border: 1px solid #505050; border-radius: 13px; background: #252525; box-shadow: 0 18px 48px rgba(0, 0, 0, .48); }
.attachment-menu[hidden] { display: none; }
.attachment-menu button { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; border: 0; border-radius: 9px; padding: 10px; color: var(--text); background: transparent; text-align: left; }
.attachment-menu button:hover, .attachment-menu button:focus-visible { background: #343434; outline: none; }
.attachment-menu button > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--accent); background: #1d1d1d; font-size: 17px; }
.attachment-menu button > span:last-child { display: grid; min-width: 0; gap: 2px; }
.attachment-menu strong { font-size: 13px; }
.attachment-menu small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.composer-model-name { overflow: hidden; color: #ededeb; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.composer-effort { flex: 0 0 auto; color: var(--quiet); font-size: 13px; font-weight: 500; }
.send { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; min-width: 42px; border-radius: 50%; padding: 0; font-size: 25px; font-weight: 450; line-height: 1; }
.send.is-stop { color: #f4f4f1; background: #414141; }
.send.is-stop:hover:not(:disabled) { background: #555; }
.stop-icon { width: 12px; height: 12px; border-radius: 2px; background: currentColor; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.boot { display: grid; place-content: center; min-height: 90vh; gap: 12px; color: var(--muted); text-align: center; }
.pulse { width: 12px; height: 12px; margin: 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 122, 69, .45); animation: pulse 1.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 11px rgba(255, 122, 69, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 122, 69, 0); } }
#media-viewer-root { display: contents; }

@media (min-width: 720px) {
  .shell { padding-right: 28px; padding-left: 28px; }
  .project-list { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 25px; }
  .modal-backdrop { place-items: center; }
}

@media (max-width: 1040px) {
  body.browser-pane-open { overflow: hidden; }
  .shell.shell-workbench { display: block; height: auto; min-height: 100svh; overflow: visible; }
  .shell-workbench .topbar { margin-bottom: 18px; }
  .workbench, .workbench.has-browser { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .workbench-agent { order: -1; height: calc(100dvh - 112px); min-height: 480px; }
  .workbench.has-browser .workbench-browser { position: fixed; z-index: 20; inset: 0; display: grid; min-height: 0; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); background: rgba(10, 10, 10, .88); backdrop-filter: blur(12px); }
  .workbench.has-browser .browser-pane { width: min(100%, 960px); height: 100%; min-height: 0; margin: 0 auto; }
}

@media (max-width: 720px), (max-height: 560px) and (hover: none) {
  .workbench.has-browser .workbench-browser { padding: 0; }
  .workbench.has-browser .browser-pane { width: 100%; border-width: 0; border-radius: 0; box-shadow: none; }
  .browser-pane.is-live { grid-template-rows: auto minmax(0, 1fr) auto; }
  .browser-pane-head { display: grid; grid-template-columns: minmax(64px, auto) minmax(0, 1fr) minmax(44px, auto); align-items: center; gap: 8px; min-height: 58px; padding: max(9px, env(safe-area-inset-top)) 10px 9px; background: rgba(28, 28, 28, .96); }
  .browser-pane-heading { text-align: center; }
  .browser-pane-head strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .browser-pane-kicker, .browser-resolution, .browser-pane-actions, .browser-pane-head > .browser-close { display: none; }
  .browser-pane-head [data-browser-status], .browser-pane-status { overflow: hidden; margin-top: 2px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .browser-mobile-back { display: inline-flex; min-width: 64px; min-height: 44px; align-items: center; gap: 2px; border: 0; padding: 0 4px; color: #f0d2c5; background: transparent; font-size: 13px; font-weight: 700; }
  .browser-mobile-back span { margin-top: -2px; font-size: 28px; font-weight: 360; line-height: .8; }
  .browser-mobile-back:focus-visible, .browser-mobile-more:focus-visible { border-radius: 10px; outline: 2px solid #ff9d78; outline-offset: -2px; }
  .browser-mobile-more { display: grid; width: 44px; height: 44px; place-items: center; justify-self: end; border: 1px solid #484848; border-radius: 12px; padding: 0; color: #e5e5e2; background: #292929; font-size: 22px; font-weight: 760; line-height: 1; }
  .browser-mobile-head-spacer { display: block; width: 44px; }
  .browser-stage { border-bottom: 1px solid #303030; }
  .browser-mobile-dock { display: block; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: rgba(28, 28, 28, .97); }
  .browser-mobile-primary { width: 100%; min-height: 48px; border-radius: 14px; font-size: 14px; }
  .browser-mobile-menu { position: absolute; z-index: 30; inset: 0; place-items: end stretch; }
  .browser-mobile-menu:not([hidden]) { display: grid; }
  .browser-mobile-menu-backdrop { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(3px); }
  .browser-mobile-sheet { position: relative; display: grid; gap: 10px; width: 100%; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); border: 1px solid #494949; border-bottom: 0; border-radius: 20px 20px 0 0; background: #252525; box-shadow: 0 -18px 48px rgba(0, 0, 0, .42); }
  .browser-mobile-sheet-head { display: flex; min-height: 38px; align-items: center; justify-content: space-between; padding-left: 3px; }
  .browser-mobile-sheet-head strong { font-size: 14px; }
  .browser-mobile-sheet-head button { width: 38px; height: 38px; border: 0; border-radius: 10px; color: #ccc; background: #333; font-size: 22px; line-height: 1; }
  .browser-mobile-adjust { display: grid; gap: 9px; padding: 12px; border: 1px solid #444; border-radius: 14px; background: #1d1d1d; }
  .browser-mobile-adjust > span { color: #aaa; font-size: 11px; font-weight: 720; }
  .browser-mobile-adjust-controls { display: grid; grid-template-columns: 42px 44px 42px 1fr 52px; align-items: center; gap: 7px; font-size: 11px; text-align: center; }
  .browser-mobile-adjust-controls .browser-tool { min-height: 40px; border-radius: 10px; }
  .browser-mobile-sheet-action { width: 100%; min-height: 46px; border: 1px solid #4c4c4c; border-radius: 13px; color: #e8e8e5; background: #303030; font-size: 14px; font-weight: 700; }
  .browser-mobile-sheet-action.is-danger { border-color: #704942; color: #ffc6b6; background: #342522; }
  .browser-mobile-sheet-action:disabled { cursor: wait; opacity: .56; }
  .browser-pane-empty { display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 20px 16px max(16px, env(safe-area-inset-bottom)); }
  .browser-pane-empty > div:first-child { align-self: center; padding: 0 4px; }
  .browser-pane-empty-actions { width: 100%; }
  .browser-pane-empty-actions .action { width: 100%; min-height: 48px; border-radius: 14px; }
  .browser-pane-empty-actions .browser-control, .browser-pane-empty-actions .browser-stop { display: none; }
}

@media (max-width: 560px) {
  .settings-section { align-items: stretch; flex-direction: column; }
  .topbar { margin-bottom: 22px; }
  .topbar-actions { gap: 7px; }
  .brand-mark { display: none; }
  .connection { font-size: 11px; }
  .composer-wrap { padding-top: 16px; }
  .composer { width: min(calc(100% - 24px), 900px); border-radius: 21px; }
  .composer-footer { flex-wrap: nowrap; }
  .composer-config-controls { max-width: calc(100% - 102px); }
  .composer-model-toggle { max-width: min(156px, 68%); }
  .composer-config-popover { right: -52px; width: min(360px, calc(100vw - 28px)); }
  .composer-effort-popover { width: min(330px, calc(100vw - 28px)); }
  .media-card { width: 100%; }
  .media-preview { max-height: min(46svh, 390px); }
  .media-image, .media-player { max-height: min(46svh, 390px); }
  .media-viewer { padding: 10px; }
  .media-viewer-dialog { max-height: calc(100svh - 20px); border-radius: 14px; }
  .media-viewer-media { max-height: calc(100svh - 112px); }
  .workbench { gap: 12px; }
  .workbench-agent { height: calc(100dvh - 104px - env(safe-area-inset-top)); min-height: 420px; border-radius: 15px; }
  .workbench-agent .conversation-head { padding: 14px 14px 12px; }
  .conversation-scroller { padding: 12px 14px 0; }
  .workbench-agent .composer-wrap { padding: 12px 10px max(12px, env(safe-area-inset-bottom)); }
}

@media (hover: none) {
  .message-copy { opacity: 1; pointer-events: auto; transform: none; }
}

@media (max-width: 440px) {
  .shell { padding-right: 14px; padding-left: 14px; }
  .session-toolbar { align-items: stretch; flex-direction: column; }
  .archive-filter { padding-left: 2px; }
}
